From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.32065.1688959036830470108 for ; Sun, 09 Jul 2023 20:17:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Uzo8brj/; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: zhiguang.liu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688959039; x=1720495039; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eLH5W4aMGkgMxhhf6qQJcLsgQO1KwMuBDt9VycLbtPE=; b=Uzo8brj/O9B9Gh+Gbj7HosZcwWpPyeqkeiAi8M9er/jAvGRd9HAr/sOb SLNilcg7CYp8Z+c6Fs/Jvg2XoXd1pogh3dqBdXqnhseZIBuweUxNH8LbW 2sOwLYjLEhuXegyL7Qh1NjZYV53tWjAuvxKvNIZMeXnTVDJoLf5w5haOT Z5LZYEBJfYJ1u32I5SgViUogQodxyFyj4JtAo9tDa/o7bAkA4TP2fM4Cr B5gRWJ6/yqRA1VAnoNTnGPx7x7OQaKWknGR7WAFe54lFowxAlz48mDz7w mEPme396PTloZeJYwxz4NoJKtSZruqcYPq48Tu+rJXqMtcgG0ooyCUKT0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10766"; a="430319075" X-IronPort-AV: E=Sophos;i="6.01,193,1684825200"; d="scan'208";a="430319075" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2023 20:17:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10766"; a="834113163" X-IronPort-AV: E=Sophos;i="6.01,193,1684825200"; d="scan'208";a="834113163" Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.151]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2023 20:17:17 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Zhiguang Liu , Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [PATCH 2/4] UefiCpuPkg/SecCore: Remove AP waking Vector logic in SecCore Date: Mon, 10 Jul 2023 11:17:04 +0800 Message-Id: <20230710031706.1329-3-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20230710031706.1329-1-zhiguang.liu@intel.com> References: <20230710031706.1329-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4494 There are two part of AP waking Vector logic in SecCore. The first one working with GenFv to find a free 4K aligned space, use the 4K aligned address as AP waking Vector and jump to 4G-30h, and finally jump to ApStartup.. The second one hard code uses 4G-1000h as AP waking Vector and jump to ApStartup. Both usages are no longer used. Remove them. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Zhiguang Liu --- UefiCpuPkg/SecCore/Ia32/ResetVec.nasmb | 36 +++----------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/UefiCpuPkg/SecCore/Ia32/ResetVec.nasmb b/UefiCpuPkg/SecCore/Ia32/ResetVec.nasmb index 1dfc4efe4c..df5f439c4e 100644 --- a/UefiCpuPkg/SecCore/Ia32/ResetVec.nasmb +++ b/UefiCpuPkg/SecCore/Ia32/ResetVec.nasmb @@ -24,18 +24,6 @@ USE16 ORG 0h -; -; 0xFFFFF000 -; -; We enter here with CS:IP = 0xFF00:0x0000. Do a far-jump to change CS to 0xF000 -; and IP to ApStartup. -; -ApVector: - mov di, "AP" - jmp 0xF000:0xF000+ApStartup - - TIMES 0xFC0-($-$$) nop - ; ; This should be at 0xFFFFFFC0 ; @@ -45,14 +33,7 @@ ApVector: ; ReservedData: DD 0eeeeeeeeh, 0eeeeeeeeh - TIMES 0xFD0-($-$$) nop -; -; This is located at 0xFFFFFFD0 -; - mov di, "PA" - jmp ApStartup - - TIMES 0xFE0-($-$$) nop + TIMES 0x20-($-$$) nop ; ; Pointer to the entry point of the PEI core ; It is located at 0xFFFFFFE0, and is fixed up by some build tool @@ -70,7 +51,7 @@ ASM_PFX(InterruptHandler): jmp $ iret - TIMES 0xFF0-($-$$) nop + TIMES 0x30-($-$$) nop ; ; For IA32, the reset vector must be at 0xFFFFFFF0, i.e., 4G-16 byte ; Execution starts here upon power-on/platform-reset. @@ -78,7 +59,6 @@ ASM_PFX(InterruptHandler): ResetHandler: nop nop -ApStartup: ; ; Jmp Rel16 instruction ; Use machine code directly in case of the assembler optimization @@ -90,17 +70,7 @@ ApStartup: DB 0e9h DW -3 - - TIMES 0xFF8-($-$$) nop -; -; Ap reset vector segment address is at 0xFFFFFFF8 -; This will be fixed up by some build tool, -; so if the value 1..8 appears in the final FD image, -; tool failure occurs -; -ApSegAddress: dd 12345678h - - TIMES 0xFFC-($-$$) nop + TIMES 0x3C-($-$$) nop ; ; BFV Base is at 0xFFFFFFFC ; This will be fixed up by some build tool, -- 2.31.1.windows.1