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
This commit is contained in:
yshang1
2006-07-21 14:25:43 +00:00
parent 3f566587ae
commit 56836fe92b
42 changed files with 3353 additions and 1956 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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

View File

@@ -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<6E><73> 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 <20><>Related Definitions<6E><73> 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

View File

@@ -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