BootScriptExecuter.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /** @file
  2. This file declares the Boot Script Executer PPI.
  3. This PPI is published by a PEIM upon dispatch and provides an execution engine for the
  4. Framework boot script. This PEIM should be platform neutral and have no specific knowledge of
  5. platform instructions or other information. The ability to interpret the boot script depends on the
  6. abundance of other PPIs that are available. For example, if the script requests an SMBus command
  7. execution, the PEIM looks for a relevant PPI that is available to execute it, rather than executing it
  8. by issuing the native IA-32 instruction.
  9. Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
  10. SPDX-License-Identifier: BSD-2-Clause-Patent
  11. @par Revision Reference:
  12. This PPI is defined in Framework of EFI BootScript spec.
  13. Version 0.91.
  14. **/
  15. #ifndef _PEI_BOOT_SCRIPT_EXECUTER_PPI_H_
  16. #define _PEI_BOOT_SCRIPT_EXECUTER_PPI_H_
  17. #define EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI_GUID \
  18. { \
  19. 0xabd42895, 0x78cf, 0x4872, {0x84, 0x44, 0x1b, 0x5c, 0x18, 0x0b, 0xfb, 0xff } \
  20. }
  21. typedef struct _EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI;
  22. /**
  23. Executes the Framework boot script table.
  24. @param PeiServices A pointer to the system PEI Services Table.
  25. @param This A pointer to the EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI instance.
  26. @param Address The physical memory address where the table is stored.
  27. It must be zero if the table to be executed is stored in
  28. a firmware volume file.
  29. @param FvFile The firmware volume file name that contains the table to
  30. be executed. It must be NULL if the table to be executed
  31. is stored in physical memory.
  32. @retval EFI_SUCCESS The boot script table was executed successfully.
  33. @retval EFI_INVALID_PARAMETER Address is zero and FvFile is NULL.
  34. @retval EFI_NOT_FOUND The file name specified in FvFile cannot be found.
  35. @retval EFI_UNSUPPORTED The format of the boot script table is invalid.
  36. Or, an unsupported opcode occurred in the table.
  37. Or there were opcode execution errors, such as an
  38. insufficient dependency.
  39. **/
  40. typedef
  41. EFI_STATUS
  42. (EFIAPI *EFI_PEI_BOOT_SCRIPT_EXECUTE)(
  43. IN EFI_PEI_SERVICES **PeiServices,
  44. IN EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI *This,
  45. IN EFI_PHYSICAL_ADDRESS Address,
  46. IN EFI_GUID *FvFile OPTIONAL
  47. );
  48. ///
  49. /// EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI produces the function which interprets and
  50. /// executes the Framework boot script table.
  51. ///
  52. struct _EFI_PEI_BOOT_SCRIPT_EXECUTER_PPI {
  53. ///
  54. /// Executes a boot script table.
  55. ///
  56. EFI_PEI_BOOT_SCRIPT_EXECUTE Execute;
  57. };
  58. extern EFI_GUID gEfiPeiBootScriptExecuterPpiGuid;
  59. #endif