From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: hao.a.wu@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Mon, 08 Apr 2019 20:03:45 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 20:03:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,327,1549958400"; d="scan'208";a="149206501" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.8]) by orsmga002.jf.intel.com with ESMTP; 08 Apr 2019 20:03:43 -0700 From: "Wu, Hao A" To: devel@edk2.groups.io Cc: Hao Wu , Xiaohu Zhou Subject: [edk2-platforms/devel-MinPlatform][PATCH v1] PurleyOpenBoardPkg/BoardMtOlympus: Drop the consume of 8259 PIC driver Date: Tue, 9 Apr 2019 11:03:29 +0800 Message-Id: <20190409030329.10556-1-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 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 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Xiaohu Zhou --- 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.
+Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.
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