]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootModulePkg/CbSupportPei/CbSupportPei.c
CorebootModulePkg/CbSupportPei: Mask off all legacy 8259 interrupt sources
[mirror_edk2.git] / CorebootModulePkg / CbSupportPei / CbSupportPei.c
index 148062ff399171c369696605626b5c2ff9a8d192..8ec7ba8d903058b6ddaef606b93c601094fcbe5e 100644 (file)
@@ -2,7 +2,7 @@
   This PEIM will parse coreboot table in memory and report resource information into pei core. \r
   This file contains the main entrypoint of the PEIM.\r
   \r
-Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -14,6 +14,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 #include "CbSupportPei.h"\r
 \r
+#define LEGACY_8259_MASK_REGISTER_MASTER  0x21\r
+#define LEGACY_8259_MASK_REGISTER_SLAVE   0xA1\r
+\r
 EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {\r
   { EfiACPIReclaimMemory,   0x008 },     \r
   { EfiACPIMemoryNVS,       0x004 },     \r
@@ -374,7 +377,13 @@ CbPeiEntryPoint (
                CopyMem (pFbInfo, &FbInfo, sizeof (FRAME_BUFFER_INFO)); \r
                DEBUG ((EFI_D_ERROR, "Create frame buffer info guid hob\n"));           \r
        }\r
-         \r
+\r
+  //\r
+  // Mask off all legacy 8259 interrupt sources\r
+  //\r
+  IoWrite8 (LEGACY_8259_MASK_REGISTER_MASTER, 0xFF);\r
+  IoWrite8 (LEGACY_8259_MASK_REGISTER_SLAVE,  0xFF);\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r