summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Include
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-21 14:25:43 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-21 14:25:43 +0000
commit56836fe92b0a7284bc2e964065e00ad867145826 (patch)
tree6528bf8403b71144f6c7e33a2b51d305b032b1a8 /EdkModulePkg/Include
parent3f566587aea64bb986866c7f69a6b82891bf59db (diff)
downloadedk2-platforms-56836fe92b0a7284bc2e964065e00ad867145826.tar.xz
1) Check in Pei/Dxe status code;
2) OemHookStatusCodeLib and SerialPortLib class and null instance; 3) Remove all referenced code from EdkModulePkg,EdkNt32Pkg. 4) Add Nt32OemHookStatusCodeLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1067 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Include')
-rw-r--r--EdkModulePkg/Include/EdkDxe.h1
-rw-r--r--EdkModulePkg/Include/EdkPeim.h1
-rw-r--r--EdkModulePkg/Include/Guid/MemoryStatusCodeRecord.h54
-rw-r--r--EdkModulePkg/Include/Library/EdkDxeSalLib.h7
-rw-r--r--EdkModulePkg/Include/Library/OemHookStatusCodeLib.h70
-rw-r--r--EdkModulePkg/Include/Library/SerialPortLib.h74
6 files changed, 207 insertions, 0 deletions
diff --git a/EdkModulePkg/Include/EdkDxe.h b/EdkModulePkg/Include/EdkDxe.h
index d78893242e..f07f27e8b2 100644
--- a/EdkModulePkg/Include/EdkDxe.h
+++ b/EdkModulePkg/Include/EdkDxe.h
@@ -56,6 +56,7 @@ Abstract:
#include <Guid/PeiPeCoffLoader.h>
#include <Guid/CapsuleVendor.h>
#include <Guid/CompatibleMemoryTested.h>
+#include <Guid/MemoryStatusCodeRecord.h>
#include <Ppi/StatusCodeMemory.h>
diff --git a/EdkModulePkg/Include/EdkPeim.h b/EdkModulePkg/Include/EdkPeim.h
index 3c1799996d..a39ed5cdb4 100644
--- a/EdkModulePkg/Include/EdkPeim.h
+++ b/EdkModulePkg/Include/EdkPeim.h
@@ -46,6 +46,7 @@ Abstract:
#include <Guid/MemoryTypeInformation.h>
#include <Guid/CapsuleVendor.h>
#include <Guid/BootState.h>
+#include <Guid/MemoryStatusCodeRecord.h>
#include <Ppi/PeiInMemory.h>
#include <Ppi/FlashMap.h>
diff --git a/EdkModulePkg/Include/Guid/MemoryStatusCodeRecord.h b/EdkModulePkg/Include/Guid/MemoryStatusCodeRecord.h
new file mode 100644
index 0000000000..0c0fd9a051
--- /dev/null
+++ b/EdkModulePkg/Include/Guid/MemoryStatusCodeRecord.h
@@ -0,0 +1,54 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MemoryStatusCodeRecord.h
+
+Abstract:
+
+ GUID used to identify status code records HOB that originate from the PEI status code
+
+--*/
+
+#ifndef _MEMORY_STATUS_CODE_RECORD_H__
+#define _MEMORY_STATUS_CODE_RECORD_H__
+
+#define MEMORY_STATUS_CODE_RECORD_GUID \
+ { \
+ 0x60cc026, 0x4c0d, 0x4dda, {0x8f, 0x41, 0x59, 0x5f, 0xef, 0x0, 0xa5, 0x2} \
+ }
+
+/**
+ Memory status code records packet structure :
+ +---------------+----------+----------+-----+----------+-----+----------+
+ | Packet Header | Record 1 | Record 2 | ... + Record n | ... | Record m |
+ +---------------+----------+----------+-----+----------+-----+----------+
+ ^ ^ ^
+ +--------- RecordIndex -----------+ |
+ +---------------- MaxRecordsNumber----------------------+
+**/
+typedef struct {
+ UINT16 PacketIndex; // Index of the Packet.
+ UINT16 RecordIndex; // Index of record in the packet.
+ UINT32 MaxRecordsNumber; // Max number of records in the packet.
+} MEMORY_STATUSCODE_PACKET_HEADER;
+
+typedef struct {
+ EFI_STATUS_CODE_TYPE CodeType;
+ EFI_STATUS_CODE_VALUE Value;
+ UINT32 Instance;
+} MEMORY_STATUSCODE_RECORD;
+
+
+extern EFI_GUID gMemoryStatusCodeRecordGuid;
+
+#endif
diff --git a/EdkModulePkg/Include/Library/EdkDxeSalLib.h b/EdkModulePkg/Include/Library/EdkDxeSalLib.h
index 9d21846289..d5fe5ed141 100644
--- a/EdkModulePkg/Include/Library/EdkDxeSalLib.h
+++ b/EdkModulePkg/Include/Library/EdkDxeSalLib.h
@@ -23,6 +23,7 @@ Abstract:
//#include <Ipf/SalApi.h>
EFI_STATUS
+EFIAPI
RegisterEsalFunction (
IN UINT64 FunctionId,
IN EFI_GUID *ClassGuid,
@@ -49,6 +50,7 @@ Returns:
;
EFI_STATUS
+EFIAPI
RegisterEsalClass (
IN EFI_GUID *ClassGuid,
IN VOID *ModuleGlobal,
@@ -74,6 +76,7 @@ Returns:
;
SAL_RETURN_REGS
+EFIAPI
EfiCallEsalService (
IN EFI_GUID *ClassGuid,
IN UINT64 FunctionId,
@@ -112,6 +115,7 @@ Returns:
;
SAL_RETURN_REGS
+EFIAPI
SetEsalVirtualEntryPoint (
IN UINT64 EntryPoint,
IN UINT64 Gp
@@ -119,6 +123,7 @@ SetEsalVirtualEntryPoint (
;
SAL_RETURN_REGS
+EFIAPI
SetEsalPhysicalEntryPoint (
IN UINT64 EntryPoint,
IN UINT64 Gp
@@ -126,12 +131,14 @@ SetEsalPhysicalEntryPoint (
;
SAL_RETURN_REGS
+EFIAPI
GetEsalEntryPoint (
VOID
)
;
VOID
+EFIAPI
SalFlushCache (
IN EFI_PHYSICAL_ADDRESS Start,
IN UINT64 Length
diff --git a/EdkModulePkg/Include/Library/OemHookStatusCodeLib.h b/EdkModulePkg/Include/Library/OemHookStatusCodeLib.h
new file mode 100644
index 0000000000..2d172259f5
--- /dev/null
+++ b/EdkModulePkg/Include/Library/OemHookStatusCodeLib.h
@@ -0,0 +1,70 @@
+
+/** @file
+ OEM hook status code library functions with no library constructor/destructor
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ Module Name: OemHookStatusCodeLib.h
+
+**/
+
+#ifndef __OEM_HOOK_STATUSCODE_LIB__
+#define __OEM_HOOK_STATUSCODE_LIB__
+
+/**
+
+ Initialize OEM status code device .
+
+**/
+VOID
+EFIAPI
+OemHookStatusCodeInitialize (
+ VOID
+ );
+
+/**
+ Report status code to OEM device.
+
+ @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitionsˇ± below.
+
+ @param Value Describes the current status of a hardware or software entity.
+ This included information about the class and subclass that is used to classify the entity
+ as well as an operation. For progress codes, the operation is the current activity.
+ For error codes, it is the exception. For debug codes, it is not defined at this time.
+ Type EFI_STATUS_CODE_VALUE is defined in ˇ°Related Definitionsˇ± below.
+ Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
+
+ @param Instance The enumeration of a hardware or software entity within the system.
+ A system may contain multiple entities that match a class/subclass pairing.
+ The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
+ not meaningful, or not relevant. Valid instance numbers start with 1.
+
+
+ @param CallerId This optional parameter may be used to identify the caller.
+ This parameter allows the status code driver to apply different rules to different callers.
+ Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
+
+
+ @param Data This optional parameter may be used to pass additional data
+
+ @return The function always return EFI_SUCCESS.
+
+**/
+EFI_STATUS
+EFIAPI
+OemHookStatusCodeReport (
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID *CallerId, OPTIONAL
+ IN EFI_STATUS_CODE_DATA *Data OPTIONAL
+ );
+
+#endif
diff --git a/EdkModulePkg/Include/Library/SerialPortLib.h b/EdkModulePkg/Include/Library/SerialPortLib.h
new file mode 100644
index 0000000000..8fe04e9a7d
--- /dev/null
+++ b/EdkModulePkg/Include/Library/SerialPortLib.h
@@ -0,0 +1,74 @@
+
+/** @file
+ Serial I/O Port library functions with no library constructor/destructor
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ Module Name: SerialPortLib.h
+
+**/
+
+#ifndef __SERIAL_PORT_LIB__
+#define __SERIAL_PORT_LIB__
+
+/**
+
+ Programmed hardware of Serial port.
+
+**/
+EFI_STATUS
+EFIAPI
+SerialPortInitialize (
+ VOID
+ );
+
+/**
+ Write data to serial device.
+
+ If the buffer is NULL, then ASSERT();
+ if NumberOfBytes is zero, then ASSERT().
+
+ @param Buffer Point of data buffer which need to be writed.
+ @param NumberOfBytes Number of output bytes which are cached in Buffer.
+
+ @retval 0 Write data failed.
+ @retval !0 Actual number of bytes writed to serial device.
+
+**/
+UINTN
+EFIAPI
+SerialPortWrite (
+ IN UINT8 *Buffer,
+ IN UINTN NumberOfBytes
+);
+
+
+/**
+ Read data from serial device and save the datas in buffer.
+
+ If the buffer is NULL, then ASSERT();
+ if NumberOfBytes is zero, then ASSERT().
+
+ @param Buffer Point of data buffer which need to be writed.
+ @param NumberOfBytes Number of output bytes which are cached in Buffer.
+
+ @retval 0 Read data failed.
+ @retval !0 Aactual number of bytes read from serial device.
+
+**/
+UINTN
+EFIAPI
+SerialPortRead (
+ OUT UINT8 *Buffer,
+ IN UINTN NumberOfBytes
+);
+
+
+#endif