public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhiguang Liu" <zhiguang.liu@intel.com>
To: devel@edk2.groups.io
Cc: Zhiguang Liu <zhiguang.liu@intel.com>,
	Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
	Rahul Kumar <rahul1.kumar@intel.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH 2/4] UefiCpuPkg/SecCore: Remove AP waking Vector logic in SecCore
Date: Mon, 10 Jul 2023 11:17:04 +0800	[thread overview]
Message-ID: <20230710031706.1329-3-zhiguang.liu@intel.com> (raw)
In-Reply-To: <20230710031706.1329-1-zhiguang.liu@intel.com>

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 <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 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


  parent reply	other threads:[~2023-07-10  3:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  3:17 [PATCH 0/4] Remove AP waking vector in Reset Vector Zhiguang Liu
2023-07-10  3:17 ` [PATCH 1/4] BaseTools: Remove logic to create AP waking vector in GenFv Zhiguang Liu
2023-07-10 11:38   ` 回复: [edk2-devel] " gaoliming
2023-07-10  3:17 ` Zhiguang Liu [this message]
2023-07-10  3:17 ` [PATCH 3/4] OvmfPkg: Remove applicationProcessorEntryPoint Zhiguang Liu
2023-07-24 10:17   ` [edk2-devel] " Anthony PERARD via groups.io
2023-07-10  3:17 ` [PATCH 4/4] UefiCpuPk/ResetVector: Remove AP waking vector from ResetVector Zhiguang Liu
2023-07-10  3:35 ` [edk2-devel] [PATCH 0/4] Remove AP waking vector in Reset Vector Ni, Ray
     [not found] ` <1770634CE62FBB6D.7145@groups.io>
2023-07-24  2:47   ` [edk2-devel] [PATCH 3/4] OvmfPkg: Remove applicationProcessorEntryPoint Zhiguang Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230710031706.1329-3-zhiguang.liu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox