public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms/devel-MinPlatform][PATCH v1] PurleyOpenBoardPkg/BoardMtOlympus: Drop the consume of 8259 PIC driver
@ 2019-04-09  3:03 Wu, Hao A
  0 siblings, 0 replies; only message in thread
From: Wu, Hao A @ 2019-04-09  3:03 UTC (permalink / raw)
  To: devel; +Cc: Hao Wu, Xiaohu Zhou

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.zhou@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Xiaohu Zhou <bowen.zhou@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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-09  3:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09  3:03 [edk2-platforms/devel-MinPlatform][PATCH v1] PurleyOpenBoardPkg/BoardMtOlympus: Drop the consume of 8259 PIC driver Wu, Hao A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox