]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Ppi/BootScriptExecuter.h
Add DxeBootScriptLibNull in IntelFrameworkPkg.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Ppi / BootScriptExecuter.h
1 /** @file
2 This file declares Boot Script Executer PPI.
3
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: BootScriptExecuter.h
14
15 @par Revision Reference:
16 This PPI is defined in Framework of EFI BootScript spec.
17 Version 0.91.
18
19 **/
20
21 #ifndef _PEI_BOOT_SCRIPT_EXECUTER_PPI_H
22 #define _PEI_BOOT_SCRIPT_EXECUTER_PPI_H
23
24 #define EFI_ACPI_S3_RESUME_SCRIPT_TABLE 0x00
25
26 //
27 // Boot Script Opcode Definitions
28 //
29
30 #define EFI_BOOT_SCRIPT_IO_WRITE_OPCODE 0x00
31 #define EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE 0x01
32 #define EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE 0x02
33 #define EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE 0x03
34 #define EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE 0x04
35 #define EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE 0x05
36 #define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE 0x06
37 #define EFI_BOOT_SCRIPT_STALL_OPCODE 0x07
38 #define EFI_BOOT_SCRIPT_DISPATCH_OPCODE 0x08
39
40 //
41 // Extensions to boot script definitions
42 //
43 #define EFI_BOOT_SCRIPT_MEM_POLL_OPCODE 0x09
44 #define EFI_BOOT_SCRIPT_INFORMATION_OPCODE 0x0A
45 #define EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE 0x0B
46 #define EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE 0x0C
47 #define EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE 0x0D
48 #define EFI_BOOT_SCRIPT_TABLE_OPCODE 0xAA
49 #define EFI_BOOT_SCRIPT_TERMINATE_OPCODE 0xFF
50
51 //
52 // EFI Boot Script Width
53 //
54 typedef enum {
55 EfiBootScriptWidthUint8,
56 EfiBootScriptWidthUint16,
57 EfiBootScriptWidthUint32,
58 EfiBootScriptWidthUint64,
59 EfiBootScriptWidthFifoUint8,
60 EfiBootScriptWidthFifoUint16,
61 EfiBootScriptWidthFifoUint32,
62 EfiBootScriptWidthFifoUint64,
63 EfiBootScriptWidthFillUint8,
64 EfiBootScriptWidthFillUint16,
65 EfiBootScriptWidthFillUint32,
66 EfiBootScriptWidthFillUint64,
67 EfiBootScriptWidthMaximum
68 } EFI_BOOT_SCRIPT_WIDTH;
69
70 #define EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI_GUID \
71 { \
72 0xabd42895, 0x78cf, 0x4872, {0x84, 0x44, 0x1b, 0x5c, 0x18, 0x0b, 0xfb, 0xff } \
73 }
74
75 typedef struct _EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI;
76
77 /**
78 Executes the Framework boot script table.
79
80 @param PeiServices A pointer to the system PEI Services Table.
81 @param This A pointer to the EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI instance.
82 @param Address The physical memory address where the table is stored.
83 It must be zero if the table to be executed is stored in a firmware volume file.
84 @param FvFile The firmware volume file name that contains the table to
85 be executed. It must be NULL if the table to be executed is stored in physical memory.
86
87 @retval EFI_SUCCESS The boot script table was executed successfully.
88 @retval EFI_INVALID_PARAMETER Address is zero and FvFile is NULL.
89 @retval EFI_NOT_FOUND The file name specified in FvFile cannot be found.
90 @retval EFI_UNSUPPORTED The format of the boot script table is invalid.
91 Or An unsupported opcode occurred in the table.
92 Or There were opcode execution errors, such as an insufficient dependency.
93
94 **/
95 typedef
96 EFI_STATUS
97 (EFIAPI *EFI_PEI_BOOT_SCRIPT_EXECUTE) (
98 IN EFI_PEI_SERVICES **PeiServices,
99 IN EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI *This,
100 IN EFI_PHYSICAL_ADDRESS Address,
101 IN EFI_GUID *FvFile OPTIONAL
102 );
103
104 /**
105 @par Ppi Description:
106 This PPI produces functions to interpret and execute the Framework boot script table.
107
108 @param Execute
109 Executes a boot script table.
110
111 **/
112 struct _EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI {
113 EFI_PEI_BOOT_SCRIPT_EXECUTE Execute;
114 };
115
116 extern EFI_GUID gEfiPeiBootScriptExecuterPpiGuid;
117
118 #endif