]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/FspSecCore/SecMain.h
IntelFsp2Pkg: PeiService pointer not reset to 0 in SecMain
[mirror_edk2.git] / IntelFsp2Pkg / FspSecCore / SecMain.h
index 33f73625ca29d7bf88b33138a400bd194a2e3ac4..af7f3879600731ee2d8fb89a7d7d135ea59451fa 100644 (file)
@@ -1,13 +1,7 @@
 /** @file\r
 \r
-  Copyright (c) 2014 - 2016, 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
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #include <Library/FspCommonLib.h>\r
 #include <FspEas.h>\r
 \r
-#define SEC_IDT_ENTRY_COUNT    34\r
-\r
 typedef VOID (*PEI_CORE_ENTRY) ( \\r
   IN CONST  EFI_SEC_PEI_HAND_OFF    *SecCoreData, \\r
   IN CONST  EFI_PEI_PPI_DESCRIPTOR  *PpiList \\r
 );\r
 \r
 typedef struct _SEC_IDT_TABLE {\r
-  EFI_PEI_SERVICES  *PeiService;\r
-  UINT64            IdtTable[SEC_IDT_ENTRY_COUNT];\r
+  //\r
+  // Reserved 8 bytes preceding IDT to store EFI_PEI_SERVICES**, since IDT base\r
+  // address should be 8-byte alignment.\r
+  // Note: For IA32, only the 4 bytes immediately preceding IDT is used to store\r
+  // EFI_PEI_SERVICES**\r
+  //\r
+  UINT64            PeiService;\r
+  UINT64            IdtTable[FixedPcdGet8 (PcdFspMaxInterruptSupported)];\r
 } SEC_IDT_TABLE;\r
 \r
 /**\r
@@ -105,7 +103,7 @@ InitializeFloatingPointUnits (
 \r
 \r
   @param[in] SizeOfRam          Size of the temporary memory available for use.\r
-  @param[in] TempRamBase        Base address of tempory ram\r
+  @param[in] TempRamBase        Base address of temporary ram\r
   @param[in] BootFirmwareVolume Base address of the Boot Firmware Volume.\r
   @param[in] PeiCore            PeiCore entry point.\r
   @param[in] BootLoaderStack    BootLoader stack.\r
@@ -137,4 +135,17 @@ ProcessLibraryConstructorList (
   VOID\r
   );\r
 \r
+/**\r
+\r
+  Return value of esp.\r
+\r
+  @return  value of esp.\r
+\r
+**/\r
+UINT32\r
+EFIAPI\r
+AsmReadEsp (\r
+  VOID\r
+  );\r
+\r
 #endif\r