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