The commit will: A) Add explicit logic to disable the 8259 interrupts in BoardInitLib; B) Remove the consumption of 8259 PIC driver from the DSC/FDF files for the BoardMtOlympus platform.
Cc: Xiaohu Zhou <bowen.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a...@intel.com> Reviewed-by: Xiaohu Zhou <bowen.z...@intel.com> --- Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.dsc | 2 -- Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPcd.dsc | 1 - Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.fdf | 2 -- Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/Library/BoardInitLib/PeiMtOlympusInitPreMemLib.c | 25 +++++++++++++++++++- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.dsc b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.dsc index 384e70a832..94ea16bb9e 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.dsc +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.dsc @@ -231,6 +231,4 @@ [Components.X64] MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf - PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf - !include $(BOARD_PKG)/$(BOARD_NAME)/PlatformPkgBuildOption.dsc diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPcd.dsc b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPcd.dsc index bfdf5c0c38..fc63ca628a 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPcd.dsc +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPcd.dsc @@ -195,7 +195,6 @@ [PcdsFixedAtBuild.common] gMinPlatformPkgTokenSpaceGuid.PcdWsmtProtectionFlags|0x07 [PcdsFixedAtBuild.X64] - gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeMask|0x0eB8 gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear|2015 gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|2099 # Change PcdBootManagerMenuFile to UiApp diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.fdf b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.fdf index 610aa18d49..3ae913e2ed 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.fdf +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkg.fdf @@ -301,8 +301,6 @@ [FV.FvUefiBootUncompact] INF ShellBinPkg/UefiShell/UefiShell.inf -INF PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf - INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/Library/BoardInitLib/PeiMtOlympusInitPreMemLib.c b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/Library/BoardInitLib/PeiMtOlympusInitPreMemLib.c index 34f635a485..d0453ad10d 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/Library/BoardInitLib/PeiMtOlympusInitPreMemLib.c +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/Library/BoardInitLib/PeiMtOlympusInitPreMemLib.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -80,6 +80,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "SioRegs.h" +#define LEGACY_8259_MASK_REGISTER_MASTER 0x21 +#define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1 + extern GPIO_INIT_CONFIG mGpioTableMicrosoftWcs[]; extern UINTN mGpioTableSizeMicrosoftWcs; @@ -413,6 +416,20 @@ PchLanConfig ( return EFI_SUCCESS; } +/** + Write to mask registers of master and slave 8259 PICs. + +**/ +VOID +STATIC +Mask8259Interrupts ( + VOID + ) +{ + IoWrite8 (LEGACY_8259_MASK_REGISTER_MASTER, 0xFF); + IoWrite8 (LEGACY_8259_MASK_REGISTER_SLAVE, 0xFF); +} + EFI_STATUS EFIAPI MtOlympusBoardInitBeforeMemoryInit ( @@ -495,6 +512,12 @@ MtOlympusBoardInitBeforeMemoryInit ( // PchLanConfig (&SystemConfiguration); + // + // The 8259 PIC is still functional and not masked by default even if APIC is + // enabled. So need to disable all 8259 interrupts. + // + Mask8259Interrupts (); + return EFI_SUCCESS; } -- 2.12.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#38676): https://edk2.groups.io/g/devel/message/38676 Mute This Topic: https://groups.io/mt/30995305/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-