Add DxeBootScriptLibNull in IntelFrameworkPkg.

Add IsaBusDxe in IntelFrameworkModulePkg.
Add Pcat.h in "IntelFrameworkModulePkg/IndustryStandard"


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2948 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
yshang1
2007-07-02 09:09:00 +00:00
parent 9262714181
commit c3902377a9
19 changed files with 4838 additions and 5 deletions

View File

@@ -0,0 +1,530 @@
/*++
Copyright (c) 2006, Intel Corporation. All rights reserved.
This software and associated documentation (if any) is furnished
under a license and may only be used or copied in accordance
with the terms of the license. Except as permitted by such
license, no part of this software or documentation may be
reproduced, stored in a retrieval system, or transmitted in any
form or by any means without the express written consent of
Intel Corporation.
Module Name:
EfiScriptLib.h
Abstract:
--*/
#ifndef _BOOT_SCRIPT_LIB_H_
#define _BOOT_SCRIPT_LIB_H_
#include <PiPei.h>
#include <Ppi/BootScriptExecuter.h>
#include <IndustryStandard/SmBus.h>
EFI_STATUS
EFIAPI
BootScriptSaveIoWrite (
IN UINT16 TableName,
IN EFI_BOOT_SCRIPT_WIDTH Width,
IN UINT64 Address,
IN UINTN Count,
IN VOID *Buffer
)
/*++
Routine Description:
Save I/O write to boot script with opcode EFI_BOOT_SCRIPT_IO_WRITE_OPCODE
Arguments:
TableName - Desired boot script table
Width - The width of the I/O operations.
Address - The base address of the I/O operations.
Count - The number of I/O operations to perform.
Buffer - The source buffer from which to write data.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveIoReadWrite (
IN UINT16 TableName,
IN EFI_BOOT_SCRIPT_WIDTH Width,
IN UINT64 Address,
IN VOID *Data,
IN VOID *DataMask
)
/*++
Routine Description:
Save I/O modify to boot script with opcode EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE
Arguments:
TableName - Desired boot script table
Width - The width of the I/O operations.
Address - The base address of the I/O operations.
Data - A pointer to the data to be OR-ed.
DataMask - A pointer to the data mask to be AND-ed with the data read from the register.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveMemWrite (
IN UINT16 TableName,
IN EFI_BOOT_SCRIPT_WIDTH Width,
IN UINT64 Address,
IN UINTN Count,
IN VOID *Buffer
)
/*++
Routine Description:
Save memory write to boot script with opcode EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE
Arguments:
TableName - Desired boot script table
Width - The width of the memory operations.
Address - The base address of the memory operations.
Count - The number of memory operations to perform.
Buffer - The source buffer from which to write the data.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveMemReadWrite (
IN UINT16 TableName,
IN EFI_BOOT_SCRIPT_WIDTH Width,
IN UINT64 Address,
IN VOID *Data,
IN VOID *DataMask
)
/*++
Routine Description:
Save memory modify to boot script with opcode EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE
Arguments:
TableName - Desired boot script table
Width - The width of the memory operations.
Address - The base address of the memory operations.
Data - A pointer to the data to be OR-ed.
DataMask - A pointer to the data mask to be AND-ed with the data read from the register.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSavePciCfgWrite (
IN UINT16 TableName,
IN EFI_BOOT_SCRIPT_WIDTH Width,
IN UINT64 Address,
IN UINTN Count,
IN VOID *Buffer
)
/*++
Routine Description:
Save PCI configuration space write operation to boot script with opcode
EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE
Arguments:
TableName - Desired boot script table
Width - The width of the PCI operations
Address - The address within the PCI configuration space.
Count - The number of PCI operations to perform.
Buffer - The source buffer from which to write the data.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSavePciCfgReadWrite (
IN UINT16 TableName,
IN EFI_BOOT_SCRIPT_WIDTH Width,
IN UINT64 Address,
IN VOID *Data,
IN VOID *DataMask
)
/*++
Routine Description:
Save PCI configuration space modify operation to boot script with opcode
EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE
Arguments:
TableName - Desired boot script table
Width - The width of the PCI operations
Address - The address within the PCI configuration space.
Data - A pointer to the data to be OR-ed.
DataMask - A pointer to the data mask to be AND-ed with the data read from the register.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveSmbusExecute (
IN UINT16 TableName,
IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
IN EFI_SMBUS_DEVICE_COMMAND Command,
IN EFI_SMBUS_OPERATION Operation,
IN BOOLEAN PecCheck,
IN UINTN *Length,
IN VOID *Buffer
)
/*++
Routine Description:
Save SMBus command execution to boot script with opcode
EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE
Arguments:
TableName - Desired boot script table
SlaveAddress - The SMBus address for the slave device that the operation is targeting.
Command - The command that is transmitted by the SMBus host controller to the
SMBus slave device.
Operation - Indicates which particular SMBus protocol it will use to execute the
SMBus transactions.
PecCheck - Defines if Packet Error Code (PEC) checking is required for this operation.
Length - A pointer to signify the number of bytes that this operation will do.
Buffer - Contains the value of data to execute to the SMBUS slave device.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveStall (
IN UINT16 TableName,
IN UINTN Duration
)
/*++
Routine Description:
Save execution stall on the processor to boot script with opcode
EFI_BOOT_SCRIPT_STALL_OPCODE
Arguments:
TableName - Desired boot script table
Duration - Duration in microseconds of the stall.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveDispatch (
IN UINT16 TableName,
IN EFI_PHYSICAL_ADDRESS EntryPoint
)
/*++
Routine Description:
Save dispatching specified arbitrary code to boot script with opcode
EFI_BOOT_SCRIPT_DISPATCH_OPCODE
Arguments:
TableName - Desired boot script table
EntryPoint - Entry point of the code to be dispatched.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveDispatch2 (
IN UINT16 TableName,
IN EFI_PHYSICAL_ADDRESS EntryPoint,
IN EFI_PHYSICAL_ADDRESS Context
)
/*++
Routine Description:
Save dispatching specified arbitrary code to boot script with opcode
EFI_BOOT_SCRIPT_DISPATCH_OPCODE
Arguments:
TableName - Desired boot script table
EntryPoint - Entry point of the code to be dispatched.
Context - The data that will be passed into code.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveDispatch2Image (
IN UINT16 TableName,
IN EFI_GUID *FfsName,
IN EFI_PHYSICAL_ADDRESS Context,
IN EFI_HANDLE ParentHandle
)
/*++
Routine Description:
Save dispatching specified arbitrary code to boot script with opcode
EFI_BOOT_SCRIPT_DISPATCH_OPCODE
Arguments:
TableName - Desired boot script table
FfsName - The file name of the code to be dispatched.
Context - The data that will be passed into code.
ParentHandle - The caller's image handle.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveInformation (
IN UINT16 TableName,
IN UINT32 Length,
IN EFI_PHYSICAL_ADDRESS Buffer
)
/*++
Routine Description:
Save information specified by Buffer, length is specified by Length, to
boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE
Arguments:
TableName - Desired boot script table
FfsName - The file name of the code to be dispatched.
Context - The data that will be passed into code.
ParentHandle - The caller's image handle.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveInformationUnicodeString (
IN UINT16 TableName,
IN CONST CHAR16 *String
)
/*++
Routine Description:
Save unicode string information specified by Buffer to
boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE
Arguments:
TableName - Desired boot script table
FfsName - The file name of the code to be dispatched.
Context - The data that will be passed into code.
ParentHandle - The caller's image handle.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveInformationAsciiString (
IN UINT16 TableName,
IN CONST CHAR8 *String
)
/*++
Routine Description:
Save ASCII string information specified by Buffer to
boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE
Arguments:
TableName - Desired boot script table
FfsName - The file name of the code to be dispatched.
Context - The data that will be passed into code.
ParentHandle - The caller's image handle.
Returns:
EFI_NOT_FOUND - BootScriptSave Protocol not exist.
EFI_STATUS - BootScriptSave Protocol exist, always returns EFI_SUCCESS
--*/
;
EFI_STATUS
EFIAPI
BootScriptSaveInitialize (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
/*++
Routine Description:
Intialize Boot Script Lib if it has not yet been initialized.
Arguments:
ImageHandle - The firmware allocated handle for the EFI image.
SystemTable - A pointer to the EFI System Table.
Returns:
EFI_STATUS always returns EFI_SUCCESS
--*/
;
#endif

View File

@@ -21,7 +21,51 @@
#ifndef _PEI_BOOT_SCRIPT_EXECUTER_PPI_H
#define _PEI_BOOT_SCRIPT_EXECUTER_PPI_H
#include <PiPei.h>
#define EFI_ACPI_S3_RESUME_SCRIPT_TABLE 0x00
//
// Boot Script Opcode Definitions
//
#define EFI_BOOT_SCRIPT_IO_WRITE_OPCODE 0x00
#define EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE 0x01
#define EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE 0x02
#define EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE 0x03
#define EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE 0x04
#define EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE 0x05
#define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE 0x06
#define EFI_BOOT_SCRIPT_STALL_OPCODE 0x07
#define EFI_BOOT_SCRIPT_DISPATCH_OPCODE 0x08
//
// Extensions to boot script definitions
//
#define EFI_BOOT_SCRIPT_MEM_POLL_OPCODE 0x09
#define EFI_BOOT_SCRIPT_INFORMATION_OPCODE 0x0A
#define EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE 0x0B
#define EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE 0x0C
#define EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE 0x0D
#define EFI_BOOT_SCRIPT_TABLE_OPCODE 0xAA
#define EFI_BOOT_SCRIPT_TERMINATE_OPCODE 0xFF
//
// EFI Boot Script Width
//
typedef enum {
EfiBootScriptWidthUint8,
EfiBootScriptWidthUint16,
EfiBootScriptWidthUint32,
EfiBootScriptWidthUint64,
EfiBootScriptWidthFifoUint8,
EfiBootScriptWidthFifoUint16,
EfiBootScriptWidthFifoUint32,
EfiBootScriptWidthFifoUint64,
EfiBootScriptWidthFillUint8,
EfiBootScriptWidthFillUint16,
EfiBootScriptWidthFillUint32,
EfiBootScriptWidthFillUint64,
EfiBootScriptWidthMaximum
} EFI_BOOT_SCRIPT_WIDTH;
#define EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI_GUID \
{ \