Reviewed-by: James Lu <james...@intel.com>
Thanks, James -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Dhaval Sharma Sent: Wednesday, March 15, 2023 8:19 PM To: devel@edk2.groups.io Cc: Dong, Guo <guo.d...@intel.com>; Ni, Ray <ray...@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james...@intel.com>; Guo, Gua <gua....@intel.com> Subject: [edk2-devel] [PATCH v4 2/2] UefiPayloadPkg: Move INT prog outside common flow 8259 is very arch specific programming. It needs to be moved out to the respective arch flow. Added in both x64 and x32 paths Test: Able to boot UEFI shell with Coreboot Tianocore payload on x86 qemu Cc: Guo Dong <guo.d...@intel.com> Cc: Ray Ni <ray...@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james...@intel.com> Cc: Gua Guo <gua....@intel.com> Signed-off-by: Dhaval Sharma <dha...@rivosinc.com> Reviewed-by: Gua Guo <gua....@intel.com> --- Notes: v3: - Added legacy INT intialization to X64 path as well v4: - Updated reviewed-by tag UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c | 6 ++++++ UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c | 6 ------ UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c b/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c index 9d2bfb2fa654..d41e5024b4a1 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c +++ b/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c @@ -271,6 +271,12 @@ HandOffToDxeCore ( // Initialize floating point operating environment to be compliant with UEFI spec. InitializeFloatingPointUnits (); + // + // Mask off all legacy 8259 interrupt sources // + IoWrite8 (LEGACY_8259_MASK_REGISTER_MASTER, 0xFF); + IoWrite8 (LEGACY_8259_MASK_REGISTER_SLAVE, 0xFF); + // // Clear page 0 and mark it as allocated if NULL pointer detection is enabled. // diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c index 07f4c1d29686..45127689a24b 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c @@ -478,12 +478,6 @@ _ModuleEntryPoint ( Status = UniversalLoadDxeCore (DxeFv, &DxeCoreEntryPoint); ASSERT_EFI_ERROR (Status); - // - // Mask off all legacy 8259 interrupt sources - // - IoWrite8 (LEGACY_8259_MASK_REGISTER_MASTER, 0xFF); - IoWrite8 (LEGACY_8259_MASK_REGISTER_SLAVE, 0xFF); - Hob.HandoffInformationTable = (EFI_HOB_HANDOFF_INFO_TABLE *)GetFirstHob (EFI_HOB_TYPE_HANDOFF); HandOffToDxeCore (DxeCoreEntryPoint, Hob); diff --git a/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c b/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c index 84a6112ce64a..1dfb7459e85a 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c +++ b/UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c @@ -43,6 +43,12 @@ HandOffToDxeCore ( // Initialize floating point operating environment to be compliant with UEFI spec. InitializeFloatingPointUnits (); + // + // Mask off all legacy 8259 interrupt sources // + IoWrite8 (LEGACY_8259_MASK_REGISTER_MASTER, 0xFF); + IoWrite8 (LEGACY_8259_MASK_REGISTER_SLAVE, 0xFF); + // // Clear page 0 and mark it as allocated if NULL pointer detection is enabled. // -- 2.40.0.rc0.57.g454dfcbddf -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#103796): https://edk2.groups.io/g/devel/message/103796 Mute This Topic: https://groups.io/mt/97625908/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-