]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/MonoStatusCode/PlatformStatusCode.h
UefiCpuPkg/PiSmmCpuDxeSmm: patch "gSmmCr3" with PatchInstructionX86()
[mirror_edk2.git] / Vlv2TbltDevicePkg / MonoStatusCode / PlatformStatusCode.h
index 51e13e03dee0cf788378b86bdacdf95ad1572457..b83c71fbf0f1d4391456b47e23eba8fa111c1ca3 100644 (file)
-/*++\r
-\r
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>\r
-                                                                                   \r\r
-  This program and the accompanying materials are licensed and made available under\r\r
-  the terms and conditions of the BSD License that accompanies this distribution.  \r\r
-  The full text of the license may be found at                                     \r\r
-  http://opensource.org/licenses/bsd-license.php.                                  \r\r
-                                                                                   \r\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,            \r\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.    \r\r
-                                                                                   \r\r
-\r
-Module Name:\r
-\r
-  PlatformStatusCode.h\r
-\r
-Abstract:\r
-\r
-  Contains Platform specific implementations required to use status codes.\r
-\r
---*/\r
-\r
-#ifndef _PLATFORM_STATUS_CODE_H_\r
-#define _PLATFORM_STATUS_CODE_H_\r
-\r
-\r
-#define CONFIG_PORT0    0x4E\r
-#define INDEX_PORT0     0x4E\r
-#define DATA_PORT0      0x4F\r
-#define PCI_IDX        0xCF8\r
-#define PCI_DAT        0xCFC\r
-\r
-#include "MonoStatusCode.h"\r
-\r
-/*++\r
-\r
-Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved\r
-                                                                                   \r\r
-  This program and the accompanying materials are licensed and made available under\r\r
-  the terms and conditions of the BSD License that accompanies this distribution.  \r\r
-  The full text of the license may be found at                                     \r\r
-  http://opensource.org/licenses/bsd-license.php.                                  \r\r
-                                                                                   \r\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,            \r\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.    \r\r
-                                                                                   \r\r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
-\r
-\r
-Module Name:\r
-\r
-  Port80StatusCodeLib.h\r
-\r
-Abstract:\r
-\r
-  Lib to provide status code reporting via port 80.\r
-\r
---*/\r
-\r
-#ifndef _PEI_PORT_80_STATUS_CODE_H_\r
-#define _PEI_PORT_80_STATUS_CODE_H_\r
-\r
-\r
-\r
-//\r
-// Status code reporting function\r
-//\r
-EFI_STATUS\r
-Port80ReportStatusCode (\r
-  IN CONST EFI_PEI_SERVICES         **PeiServices,\r
-  IN EFI_STATUS_CODE_TYPE           CodeType,\r
-  IN EFI_STATUS_CODE_VALUE          Value,\r
-  IN UINT32                         Instance,\r
-  IN CONST EFI_GUID                 * CallerId,\r
-  IN CONST EFI_STATUS_CODE_DATA     * Data OPTIONAL\r
-  );\r
-\r
-#endif\r
-\r
-/*++\r
-\r
-Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved\r
-                                                                                   \r\r
-  This program and the accompanying materials are licensed and made available under\r\r
-  the terms and conditions of the BSD License that accompanies this distribution.  \r\r
-  The full text of the license may be found at                                     \r\r
-  http://opensource.org/licenses/bsd-license.php.                                  \r\r
-                                                                                   \r\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,            \r\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.    \r\r
-                                                                                   \r\r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
-\r
-\r
-Module Name:\r
-\r
-  SerialStatusCodeLib.h\r
-\r
-Abstract:\r
-\r
-  Lib to provide Serial I/O status code reporting.\r
-\r
---*/\r
-\r
-#ifndef _PEI_SERIAL_STATUS_CODE_LIB_H_\r
-#define _PEI_SERIAL_STATUS_CODE_LIB_H_\r
-\r
-\r
-#include <Guid/StatusCodeDataTypeId.h>\r
-#include <Guid/StatusCodeDataTypeDebug.h>\r
-#include <Library/ReportStatusCodeLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-\r
-//\r
-// Initialization function\r
-//\r
-VOID\r
-SerialInitializeStatusCode (\r
-  VOID\r
-  );\r
-\r
-//\r
-// Status code reporting function\r
-//\r
-EFI_STATUS\r
-SerialReportStatusCode (\r
-  IN CONST EFI_PEI_SERVICES         **PeiServices,\r
-  IN EFI_STATUS_CODE_TYPE     CodeType,\r
-  IN EFI_STATUS_CODE_VALUE    Value,\r
-  IN UINT32                   Instance,\r
-  IN CONST EFI_GUID                 * CallerId,\r
-  IN CONST EFI_STATUS_CODE_DATA     * Data OPTIONAL\r
-  );\r
-\r
-#endif\r
-\r
-extern EFI_PEI_PROGRESS_CODE_PPI    mStatusCodePpi;\r
-extern EFI_PEI_PPI_DESCRIPTOR mPpiListStatusCode;\r
-#define EFI_SIGNATURE_16(A, B)        ((A) | (B << 8))\r
-#define EFI_SIGNATURE_32(A, B, C, D)  (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))\r
-#define STATUSCODE_PEIM_SIGNATURE EFI_SIGNATURE_32 ('p', 's', 't', 'c')\r
-\r
-typedef struct {\r
-  UINT32                    Signature;\r
-  EFI_FFS_FILE_HEADER       *FfsHeader;\r
-  EFI_PEI_NOTIFY_DESCRIPTOR StatusCodeNotify;\r
-} STATUSCODE_CALLBACK_STATE_INFORMATION;\r
-\r
-#pragma pack(1)\r
-typedef struct {\r
-  UINT16  Limit;\r
-  UINT32  Base;\r
-} GDT_DSCRIPTOR;\r
-#pragma pack()\r
-\r
-#define STATUSCODE_PEIM_FROM_THIS(a) \\r
-  BASE_CR ( \\r
-  a, \\r
-  STATUSCODE_CALLBACK_STATE_INFORMATION, \\r
-  StatusCodeNotify \\r
-  )\r
-\r
-VOID\r
-EFIAPI\r
-PlatformInitializeStatusCode (\r
-  IN EFI_FFS_FILE_HEADER       *FfsHeader,\r
-  IN CONST EFI_PEI_SERVICES    **PeiServices\r
-  );\r
-\r
-\r
-//\r
-// Function declarations\r
-//\r
-/**\r
-  Install Firmware Volume Hob's once there is main memory\r
-\r
-  @param PeiServices        General purpose services available to every PEIM.\r
-  @param NotifyDescriptor   Not Used\r
-  @param Ppi                Not Used\r
-\r
-  @retval Status            EFI_SUCCESS if the interface could be successfully\r
-                            installed\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-MemoryDiscoveredPpiNotifyCallback (\r
-  IN EFI_PEI_SERVICES           **PeiServices,\r
-  IN EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyDescriptor,\r
-  IN VOID                       *Ppi\r
-  );\r
-\r
-#endif\r
+/*++
+
+  Copyright (c) 2004  - 2017, Intel Corporation. All rights reserved.<BR>
+                                                                                   \r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.  \r
+  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
+                                                                                   \r
+
+Module Name:
+
+  PlatformStatusCode.h
+
+Abstract:
+
+  Contains Platform specific implementations required to use status codes.
+
+--*/
+
+#ifndef _PLATFORM_STATUS_CODE_H_
+#define _PLATFORM_STATUS_CODE_H_
+
+
+#define CONFIG_PORT0    0x4E
+#define INDEX_PORT0     0x4E
+#define DATA_PORT0      0x4F
+#define PCI_IDX        0xCF8
+#define PCI_DAT        0xCFC
+
+#include "MonoStatusCode.h"
+#ifndef _PEI_PORT_80_STATUS_CODE_H_
+#define _PEI_PORT_80_STATUS_CODE_H_
+
+
+
+//
+// Status code reporting function
+//
+EFI_STATUS
+Port80ReportStatusCode (
+  IN CONST EFI_PEI_SERVICES         **PeiServices,
+  IN EFI_STATUS_CODE_TYPE           CodeType,
+  IN EFI_STATUS_CODE_VALUE          Value,
+  IN UINT32                         Instance,
+  IN CONST EFI_GUID                 * CallerId,
+  IN CONST EFI_STATUS_CODE_DATA     * Data OPTIONAL
+  );
+
+#endif
+
+#ifndef _PEI_SERIAL_STATUS_CODE_LIB_H_
+#define _PEI_SERIAL_STATUS_CODE_LIB_H_
+
+
+#include <Guid/StatusCodeDataTypeId.h>
+#include <Guid/StatusCodeDataTypeDebug.h>
+#include <Library/ReportStatusCodeLib.h>
+#include <Library/PrintLib.h>
+#include <Library/BaseMemoryLib.h>
+
+//
+// Initialization function
+//
+VOID
+SerialInitializeStatusCode (
+  VOID
+  );
+
+//
+// Status code reporting function
+//
+EFI_STATUS
+SerialReportStatusCode (
+  IN CONST EFI_PEI_SERVICES         **PeiServices,
+  IN EFI_STATUS_CODE_TYPE     CodeType,
+  IN EFI_STATUS_CODE_VALUE    Value,
+  IN UINT32                   Instance,
+  IN CONST EFI_GUID                 * CallerId,
+  IN CONST EFI_STATUS_CODE_DATA     * Data OPTIONAL
+  );
+
+#endif
+
+extern EFI_PEI_PROGRESS_CODE_PPI    mStatusCodePpi;
+extern EFI_PEI_PPI_DESCRIPTOR mPpiListStatusCode;
+#define EFI_SIGNATURE_16(A, B)        ((A) | (B << 8))
+#define EFI_SIGNATURE_32(A, B, C, D)  (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))
+#define STATUSCODE_PEIM_SIGNATURE EFI_SIGNATURE_32 ('p', 's', 't', 'c')
+
+typedef struct {
+  UINT32                    Signature;
+  EFI_FFS_FILE_HEADER       *FfsHeader;
+  EFI_PEI_NOTIFY_DESCRIPTOR StatusCodeNotify;
+} STATUSCODE_CALLBACK_STATE_INFORMATION;
+
+#pragma pack(1)
+typedef struct {
+  UINT16  Limit;
+  UINT32  Base;
+} GDT_DSCRIPTOR;
+#pragma pack()
+
+#define STATUSCODE_PEIM_FROM_THIS(a) \
+  BASE_CR ( \
+  a, \
+  STATUSCODE_CALLBACK_STATE_INFORMATION, \
+  StatusCodeNotify \
+  )
+
+VOID
+EFIAPI
+PlatformInitializeStatusCode (
+  IN EFI_FFS_FILE_HEADER       *FfsHeader,
+  IN CONST EFI_PEI_SERVICES    **PeiServices
+  );
+
+
+//
+// Function declarations
+//
+/**
+  Install Firmware Volume Hob's once there is main memory
+
+  @param PeiServices        General purpose services available to every PEIM.
+  @param NotifyDescriptor   Not Used
+  @param Ppi                Not Used
+
+  @retval Status            EFI_SUCCESS if the interface could be successfully
+                            installed
+
+**/
+EFI_STATUS
+EFIAPI
+MemoryDiscoveredPpiNotifyCallback (
+  IN EFI_PEI_SERVICES           **PeiServices,
+  IN EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyDescriptor,
+  IN VOID                       *Ppi
+  );
+
+#endif