UefiCpuPkg/MpInitLib: Add MP_ASSEMBLY_ADDRESS_MAP
In MpInitLibInitialize(), invoke AsmGetAddress() to get get assembly functions' entry addresses and the sizes from returned MP_ASSEMBLY_ADDRESS_MAP structure. v5: 1. Add more detailed comments for structure MP_ASSEMBLY_ADDRESS_MAP. v4: 1. Add AsmRelocateApLoop information return in AsmGetAddress(). v3: 1. Rename AsmRellocateApLoop to AsmRelocateApLoop. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
This commit is contained in:
@@ -35,6 +35,18 @@
|
||||
#include <Library/MtrrLib.h>
|
||||
#include <Library/HobLib.h>
|
||||
|
||||
//
|
||||
// AP reset code information including code address and size,
|
||||
// this structure will be shared be C code and assembly code.
|
||||
// It is natural aligned by design.
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 *RendezvousFunnelAddress;
|
||||
UINTN ModeEntryOffset;
|
||||
UINTN RendezvousFunnelSize;
|
||||
UINT8 *RelocateApLoopFuncAddress;
|
||||
UINTN RelocateApLoopFuncSize;
|
||||
} MP_ASSEMBLY_ADDRESS_MAP;
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
@@ -81,5 +93,18 @@ VOID
|
||||
IN UINTN ApTargetCState,
|
||||
IN UINTN PmCodeSegment
|
||||
);
|
||||
|
||||
/**
|
||||
Assembly code to get starting address and size of the rendezvous entry for APs.
|
||||
Information for fixing a jump instruction in the code is also returned.
|
||||
|
||||
@param[out] AddressMap Output buffer for address map information.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
AsmGetAddressMap (
|
||||
OUT MP_ASSEMBLY_ADDRESS_MAP *AddressMap
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user