mov dword [ebx], RendezvousFunnelProcStart\r
mov dword [ebx + 4h], Flat32Start - RendezvousFunnelProcStart\r
mov dword [ebx + 8h], RendezvousFunnelProcEnd - RendezvousFunnelProcStart\r
+ mov dword [ebx + 0Ch], AsmRelocateApLoopStart\r
+ mov dword [ebx + 10h], AsmRelocateApLoopEnd - AsmRelocateApLoopStart\r
\r
popad\r
ret\r
VOID\r
)\r
{\r
- return EFI_UNSUPPORTED;\r
+ MP_ASSEMBLY_ADDRESS_MAP AddressMap;\r
+ UINTN ApResetVectorSize;\r
+\r
+ AsmGetAddressMap (&AddressMap);\r
+ ApResetVectorSize = AddressMap.RendezvousFunnelSize + sizeof (MP_CPU_EXCHANGE_INFO);\r
+ return EFI_SUCCESS;\r
}\r
\r
/**\r
#include <Library/MtrrLib.h>\r
#include <Library/HobLib.h>\r
\r
+//\r
+// AP reset code information including code address and size,\r
+// this structure will be shared be C code and assembly code.\r
+// It is natural aligned by design.\r
+//\r
+typedef struct {\r
+ UINT8 *RendezvousFunnelAddress;\r
+ UINTN ModeEntryOffset;\r
+ UINTN RendezvousFunnelSize;\r
+ UINT8 *RelocateApLoopFuncAddress;\r
+ UINTN RelocateApLoopFuncSize;\r
+} MP_ASSEMBLY_ADDRESS_MAP;\r
\r
#pragma pack(1)\r
\r
IN UINTN ApTargetCState,\r
IN UINTN PmCodeSegment\r
);\r
+\r
+/**\r
+ Assembly code to get starting address and size of the rendezvous entry for APs.\r
+ Information for fixing a jump instruction in the code is also returned.\r
+\r
+ @param[out] AddressMap Output buffer for address map information.\r
+**/\r
+VOID\r
+EFIAPI\r
+AsmGetAddressMap (\r
+ OUT MP_ASSEMBLY_ADDRESS_MAP *AddressMap\r
+ );\r
+\r
#endif\r
\r
mov qword [rcx], rax\r
mov qword [rcx + 8h], LongModeStart - RendezvousFunnelProcStart\r
mov qword [rcx + 10h], RendezvousFunnelProcEnd - RendezvousFunnelProcStart\r
+ mov rax, ASM_PFX(AsmRelocateApLoop)\r
+ mov qword [rcx + 18h], rax\r
+ mov qword [rcx + 20h], AsmRelocateApLoopEnd - AsmRelocateApLoopStart\r
ret\r
\r
;-------------------------------------------------------------------------------------\r