public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: devel@edk2.groups.io
Cc: Hao Wu <hao.a.wu@intel.com>, Xiaohu Zhou <bowen.zhou@intel.com>
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	[thread overview]
Message-ID: <20190409030329.10556-1-hao.a.wu@intel.com> (raw)

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


                 reply	other threads:[~2019-04-09  3:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190409030329.10556-1-hao.a.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox