+++ /dev/null
-/** @file\r
- Describes the protocol interface to the EBC interpreter.\r
-\r
- Copyright (c) 2006, Intel Corporation \r
- All rights reserved. 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: Ebc.h\r
-\r
-**/\r
-\r
-#ifndef __EFI_EBC_PROTOCOL_H__\r
-#define __EFI_EBC_PROTOCOL_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
-// Protocol Guid Name defined in spec.\r
-//\r
-#define EFI_EBC_PROTOCOL_GUID EFI_EBC_INTERPRETER_PROTOCOL_GUID\r
-\r
-//\r
-// Define for forward reference.\r
-//\r
-typedef struct _EFI_EBC_PROTOCOL EFI_EBC_PROTOCOL;\r
-\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
- @param This protocol instance pointer\r
- @param 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
- @param EbcEntryPoint the entry point for the image (as defined in the file header)\r
- @param Thunk pointer to thunk pointer where the address of the created\r
- thunk is returned.\r
-\r
- @return 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
- 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
- @param This protocol instance pointer\r
- @param ImageHandle the handle of the image being unloaded.\r
-\r
- @return 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
- 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
- @param Start physical start address of CPU instruction cache to flush.\r
- @param Length how many bytes to flush of the instruction cache.\r
-\r
- @return 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
- 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
- @param This protocol instance pointer\r
- @param Flush pointer to the function to call to flush the CPU instruction\r
- cache.\r
-\r
- @return 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
- 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
- @param This protocol instance pointer\r
- @param Version pointer to where to return the VM version\r
-\r
- @return 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