+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name: \r
- \r
- Ebc.h\r
- \r
-Abstract:\r
-\r
- Describes the protocol interface to the EBC interpreter.\r
- \r
---*/\r
-\r
-#ifndef _EBC_H_\r
-#define _EBC_H_\r
-\r
-#define EFI_EBC_INTERPRETER_PROTOCOL_GUID \\r
- { \\r
- 0x13AC6DD1, 0x73D0, 0x11D4, {0xB0, 0x6B, 0x00, 0xAA, 0x00, 0xBD, 0x6D, 0xE7} \\r
- }\r
-\r
-//\r
-// Define for forward reference.\r
-//\r
-EFI_FORWARD_DECLARATION (EFI_EBC_PROTOCOL);\r
-\r
-/*++\r
-\r
-Routine Description:\r
- \r
- Create a thunk for an image entry point. In short, given the physical address\r
- of the entry point for a loaded image, create a thunk that does some \r
- fixup of arguments (and perform any other necessary overhead) and then\r
- calls the original entry point. The caller can then use the returned pointer\r
- to the created thunk as the new entry point to image.\r
-\r
-Arguments:\r
-\r
- This - protocol instance pointer\r
- ImageHandle - handle to the image. The EBC interpreter may use this to keep\r
- track of any resource allocations performed in loading and\r
- executing the image.\r
- EbcEntryPoint - the entry point for the image (as defined in the file header)\r
- Thunk - pointer to thunk pointer where the address of the created\r
- thunk is returned.\r
-\r
-Returns:\r
-\r
- Standard EFI_STATUS\r
-\r
---*/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_EBC_CREATE_THUNK) (\r
- IN EFI_EBC_PROTOCOL * This,\r
- IN EFI_HANDLE ImageHandle,\r
- IN VOID *EbcEntryPoint,\r
- OUT VOID **Thunk\r
- );\r
-\r
-/*++\r
-\r
-Routine Description:\r
- \r
- Perform any cleanup necessary when an image is unloaded. Basically it gives\r
- the EBC interpreter the chance to free up any resources allocated during\r
- load and execution of an EBC image.\r
-\r
-Arguments:\r
-\r
- This - protocol instance pointer\r
- ImageHandle - the handle of the image being unloaded.\r
-\r
-Returns:\r
-\r
- Standard EFI_STATUS.\r
-\r
---*/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_EBC_UNLOAD_IMAGE) (\r
- IN EFI_EBC_PROTOCOL * This,\r
- IN EFI_HANDLE ImageHandle\r
- );\r
-\r
-/*++\r
-\r
-Routine Description:\r
- \r
- The I-Cache-flush registration service takes a pointer to a function to\r
- call to flush the I-Cache. Here's the prototype for that function pointer.\r
-\r
-Arguments:\r
-\r
- Start - physical start address of CPU instruction cache to flush.\r
- Length - how many bytes to flush of the instruction cache.\r
-\r
-Returns:\r
-\r
- Standard EFI_STATUS.\r
-\r
---*/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EBC_ICACHE_FLUSH) (\r
- IN EFI_PHYSICAL_ADDRESS Start,\r
- IN UINT64 Length\r
- );\r
-\r
-/*++\r
-\r
-Routine Description:\r
- \r
- This routine is called by the core firmware to provide the EBC driver with\r
- a function to call to flush the CPU's instruction cache following creation\r
- of a thunk. It is not required.\r
-\r
-Arguments:\r
-\r
- This - protocol instance pointer\r
- Flush - pointer to the function to call to flush the CPU instruction\r
- cache.\r
-\r
-Returns:\r
-\r
- Standard EFI_STATUS.\r
-\r
---*/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_EBC_REGISTER_ICACHE_FLUSH) (\r
- IN EFI_EBC_PROTOCOL * This,\r
- IN EBC_ICACHE_FLUSH Flush\r
- );\r
-\r
-/*++\r
-\r
-Routine Description:\r
- \r
- This routine can be called to get the VM revision. It returns the same\r
- value as the EBC BREAK 1 instruction returns.\r
-\r
-Arguments:\r
-\r
- This - protocol instance pointer\r
- Version - pointer to where to return the VM version\r
-\r
-Returns:\r
-\r
- Standard EFI_STATUS.\r
-\r
---*/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_EBC_GET_VERSION) (\r
- IN EFI_EBC_PROTOCOL * This,\r
- IN OUT UINT64 *Version\r
- );\r
-\r
-//\r
-// Prototype for the actual EBC protocol interface\r
-//\r
-struct _EFI_EBC_PROTOCOL {\r
- EFI_EBC_CREATE_THUNK CreateThunk;\r
- EFI_EBC_UNLOAD_IMAGE UnloadImage;\r
- EFI_EBC_REGISTER_ICACHE_FLUSH RegisterICacheFlush;\r
- EFI_EBC_GET_VERSION GetVersion;\r
-};\r
-\r
-//\r
-// Extern the global EBC protocol GUID\r
-//\r
-extern EFI_GUID gEfiEbcProtocolGuid;\r
-\r
-#endif\r