summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Include')
-rw-r--r--MdeModulePkg/Include/Guid/DriverSampleHii.h41
-rw-r--r--MdeModulePkg/Include/Guid/HiiResourceSampleHii.h23
-rw-r--r--MdeModulePkg/Include/Guid/Ip4ConfigHii.h25
-rw-r--r--MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h31
-rw-r--r--MdeModulePkg/Include/Guid/MtcVendor.h31
-rw-r--r--MdeModulePkg/Include/Guid/PlatDriOverrideHii.h25
-rw-r--r--MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h37
-rw-r--r--MdeModulePkg/Include/Guid/VlanConfigHii.h25
-rw-r--r--MdeModulePkg/Include/Guid/ZeroGuid.h25
-rw-r--r--MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h124
-rw-r--r--MdeModulePkg/Include/Protocol/EbcVmTest.h142
11 files changed, 529 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Guid/DriverSampleHii.h b/MdeModulePkg/Include/Guid/DriverSampleHii.h
new file mode 100644
index 0000000000..01c571fcd5
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/DriverSampleHii.h
@@ -0,0 +1,41 @@
+/** @file
+ GUIDs used as HII FormSet and HII Package list GUID in Driver Sample driver.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __DRIVER_SAMPLE_HII_GUID_H__
+#define __DRIVER_SAMPLE_HII_GUID_H__
+
+#define DRIVER_SAMPLE_FORMSET_GUID \
+ { \
+ 0xA04A27f4, 0xDF00, 0x4D42, {0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D} \
+ }
+
+#define DRIVER_SAMPLE_INVENTORY_GUID \
+ { \
+ 0xb3f56470, 0x6141, 0x4621, {0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8} \
+ }
+
+#define EFI_USER_INFO_ACCESS_SETUP_ADMIN_GUID \
+ { 0x85b75607, 0xf7ce, 0x471e, { 0xb7, 0xe4, 0x2a, 0xea, 0x5f, 0x72, 0x32, 0xee } }
+
+#define EFI_IFR_REFRESH_ID_OP_GUID \
+ { \
+ 0xF5E655D9, 0x02A6, 0x46f2, {0x9E, 0x76, 0xB8, 0xBE, 0x8E, 0x60, 0xAB, 0x22} \
+ }
+
+extern EFI_GUID gDriverSampleFormSetGuid;
+extern EFI_GUID gDriverSampleInventoryGuid;
+extern EFI_GUID gEfiUserInfoAccessSetupAdminGuid;
+extern EFI_GUID gEfiIfrRefreshIdOpGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h b/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h
new file mode 100644
index 0000000000..2a86cad7bf
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h
@@ -0,0 +1,23 @@
+/** @file
+ GUID used as HII FormSet GUID in HII Resource Sample driver.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __HII_RESOURCE_SAMPLE_HII_GUID_H__
+#define __HII_RESOURCE_SAMPLE_HII_GUID_H__
+
+#define HII_RESOURCE_SAMPLE_FORM_SET_GUID \
+ { 0x4f4ef7f0, 0xaa29, 0x4ce9, { 0xba, 0x41, 0x64, 0x3e, 0x1, 0x23, 0xa9, 0x9f }}
+
+extern EFI_GUID gHiiResourceSamleFormSetGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/Ip4ConfigHii.h b/MdeModulePkg/Include/Guid/Ip4ConfigHii.h
new file mode 100644
index 0000000000..87c54a0194
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/Ip4ConfigHii.h
@@ -0,0 +1,25 @@
+/** @file
+ GUIDs used as HII FormSet and HII Package list GUID in Ip4ConfigDxe driver.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __IP4_CONFIG_HII_GUID_H__
+#define __IP4_CONFIG_HII_GUID_H__
+
+#define EFI_NIC_IP4_CONFIG_NVDATA_GUID \
+ { \
+ 0x9d5b53f, 0xf4b0, 0x4f59, { 0xa0, 0xb1, 0x7b, 0x57, 0xd3, 0x5c, 0xe, 0x5 } \
+ }
+
+extern EFI_GUID gNicIp4ConfigNvDataGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h b/MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h
new file mode 100644
index 0000000000..4eb4c828ff
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h
@@ -0,0 +1,31 @@
+/** @file
+ GUIDs used as HII FormSet and HII Package list GUID in IP4 IScsiDxe driver.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __IP4_ISCSI_CONFIG_HII_GUID_H__
+#define __IP4_ISCSI_CONFIG_HII_GUID_H__
+
+#define IP4_ISCSI_CONFIG_GUID \
+ { \
+ 0x6456ed61, 0x3579, 0x41c9, { 0x8a, 0x26, 0x0a, 0x0b, 0xd6, 0x2b, 0x78, 0xfc } \
+ }
+
+#define ISCSI_CHAP_AUTH_INFO_GUID \
+ { \
+ 0x786ec0ac, 0x65ae, 0x4d1b, {0xb1, 0x37, 0xd, 0x11, 0xa, 0x48, 0x37, 0x97} \
+ }
+
+extern EFI_GUID gIp4IScsiConfigGuid;
+extern EFI_GUID gIScsiCHAPAuthInfoGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/MtcVendor.h b/MdeModulePkg/Include/Guid/MtcVendor.h
new file mode 100644
index 0000000000..77bc2ae1b8
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/MtcVendor.h
@@ -0,0 +1,31 @@
+/** @file
+ GUID is for MTC variable.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __MTC_VENDOR_GUID_H__
+#define __MTC_VENDOR_GUID_H__
+
+//
+// Vendor GUID of the variable for the high part of monotonic counter (UINT32).
+//
+#define MTC_VENDOR_GUID \
+ { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } }
+
+//
+// Name of the variable for the high part of monotonic counter
+//
+#define MTC_VARIABLE_NAME L"MTC"
+
+extern EFI_GUID gMtcVendorGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h b/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h
new file mode 100644
index 0000000000..bd8e493ef9
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h
@@ -0,0 +1,25 @@
+/** @file
+ GUIDs used as HII FormSet and HII Package list GUID in PlatDriOverride driver.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __PLATFORM_DRIVER_OVERRIDE_HII_GUID_H__
+#define __PLATFORM_DRIVER_OVERRIDE_HII_GUID_H__
+
+#define PLAT_OVER_MNGR_GUID \
+ { \
+ 0x8614567d, 0x35be, 0x4415, {0x8d, 0x88, 0xbd, 0x7d, 0xc, 0x9c, 0x70, 0xc0} \
+ }
+
+extern EFI_GUID gPlatformOverridesManagerGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h b/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h
new file mode 100644
index 0000000000..57d81643c6
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h
@@ -0,0 +1,37 @@
+/** @file
+ USB KeyBoard Layout GUIDs
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __USB_KEYBOARD_LAYOUT_GUID_H__
+#define __USB_KEYBOARD_LAYOUT_GUID_H__
+
+//
+// GUID for USB keyboard HII package list.
+//
+#define USB_KEYBOARD_LAYOUT_PACKAGE_GUID \
+ { \
+ 0xc0f3b43, 0x44de, 0x4907, { 0xb4, 0x78, 0x22, 0x5f, 0x6f, 0x62, 0x89, 0xdc } \
+ }
+
+//
+// GUID for USB keyboard layout
+//
+#define USB_KEYBOARD_LAYOUT_KEY_GUID \
+ { \
+ 0x3a4d7a7c, 0x18a, 0x4b42, { 0x81, 0xb3, 0xdc, 0x10, 0xe3, 0xb5, 0x91, 0xbd } \
+ }
+
+extern EFI_GUID gUsbKeyboardLayoutPackageGuid;
+extern EFI_GUID gUsbKeyboardLayoutKeyGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/VlanConfigHii.h b/MdeModulePkg/Include/Guid/VlanConfigHii.h
new file mode 100644
index 0000000000..3848ce733d
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/VlanConfigHii.h
@@ -0,0 +1,25 @@
+/** @file
+ GUIDs used as HII FormSet and HII Package list GUID in VlanConfig driver.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __VLAN_CONFIG_HII_GUID_H__
+#define __VLAN_CONFIG_HII_GUID_H__
+
+#define VLAN_CONFIG_FORM_SET_GUID \
+ { \
+ 0xd79df6b0, 0xef44, 0x43bd, {0x97, 0x97, 0x43, 0xe9, 0x3b, 0xcf, 0x5f, 0xa8 } \
+ }
+
+extern EFI_GUID gVlanConfigFormSetGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Guid/ZeroGuid.h b/MdeModulePkg/Include/Guid/ZeroGuid.h
new file mode 100644
index 0000000000..7ba8dda205
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/ZeroGuid.h
@@ -0,0 +1,25 @@
+/** @file
+ GUID has all zero values.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __ZERO_GUID_H__
+#define __ZERO_GUID_H__
+
+#define ZERO_GUID \
+ { \
+ 0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} \
+ }
+
+extern EFI_GUID gZeroGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h b/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h
new file mode 100644
index 0000000000..1db01e3e48
--- /dev/null
+++ b/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h
@@ -0,0 +1,124 @@
+/** @file
+ EBC Simple Debugger protocol for debug EBC code.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials
+are licensed and made available under the terms and conditions
+of the BSD License which accompanies this distribution. The
+full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _EBC_SIMPLE_DEBUGGER_PROTOCOL_H_
+#define _EBC_SIMPLE_DEBUGGER_PROTOCOL_H_
+
+#include <Protocol\DebugSupport.h>
+#include <Protocol\EbcVmTest.h>
+
+#define EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL_GUID \
+ { \
+ 0x2a72d11e, 0x7376, 0x40f6, { 0x9c, 0x68, 0x23, 0xfa, 0x2f, 0xe3, 0x63, 0xf1 } \
+ }
+
+//
+// Defines for a simple EBC debugger interface
+//
+typedef struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL;
+
+/**
+ Trig Exception on EBC VM.
+
+ @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.
+ @param[in] VmPtr A pointer to a VM context.
+ @param[in] ExceptionType Exception to be trigged.
+
+ @retval EFI_UNSUPPORTED No support for it.
+ @retval EFI_SUCCESS Exception is trigged.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EBC_DEBUGGER_SIGNAL_EXCEPTION) (
+ IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,
+ IN VM_CONTEXT *VmPtr,
+ IN EFI_EXCEPTION_TYPE ExceptionType
+ );
+
+/**
+ Given a pointer to a new VM context, debug one or more instructions.
+
+ @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.
+ @param[in] VmPtr A pointer to a VM context.
+
+ @retval EFI_UNSUPPORTED No support for it.
+ @retval EFI_SUCCESS Debug one or more instructions.
+
+**/
+typedef
+VOID
+(EFIAPI *EBC_DEBUGGER_DEBUG) (
+ IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,
+ IN VM_CONTEXT *VmPtr
+ );
+
+/**
+ Given a pointer to a new VM context, dump one or more instructions.
+
+ @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.
+ @param[in] VmPtr A pointer to a VM context.
+ @param[in] DasmString Dump string buffer.
+ @param[in] DasmStringSize Dump string size.
+
+ @retval EFI_UNSUPPORTED No support for it.
+ @retval EFI_SUCCESS Dump one or more instructions.
+
+**/
+typedef
+UINT32
+(EFIAPI *EBC_DEBUGGER_DASM) (
+ IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,
+ IN VM_CONTEXT *VmPtr,
+ IN UINT16 *DasmString OPTIONAL,
+ IN UINT32 DasmStringSize
+ );
+
+/**
+ This interface allows you to configure the EBC debug support
+ driver. For example, turn on or off saving and printing of
+ delta VM even if called. Or to even disable the entire interface,
+ in which case all functions become no-ops.
+
+ @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.
+ @param[in] ConfigId ID to be configured.
+ @param[in] ConfigValue Value to be set.
+
+ @retval EFI_UNSUPPORTED No support for it.
+ @retval EFI_SUCCESS Configure EBC debug.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EBC_DEBUGGER_CONFIGURE) (
+ IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,
+ IN UINT32 ConfigId,
+ IN UINTN ConfigValue
+ );
+
+//
+// Prototype for the actual EBC debug support protocol interface
+//
+struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL {
+ EBC_DEBUGGER_DEBUG Debugger;
+ EBC_DEBUGGER_SIGNAL_EXCEPTION SignalException;
+ EBC_DEBUGGER_DASM Dasm;
+ EBC_DEBUGGER_CONFIGURE Configure;
+};
+
+extern EFI_GUID gEfiEbcSimpleDebuggerProtocolGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Protocol/EbcVmTest.h b/MdeModulePkg/Include/Protocol/EbcVmTest.h
new file mode 100644
index 0000000000..b84608357b
--- /dev/null
+++ b/MdeModulePkg/Include/Protocol/EbcVmTest.h
@@ -0,0 +1,142 @@
+/** @file
+ EBC VM Test protocol for test purposes.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials
+are licensed and made available under the terms and conditions
+of the BSD License which accompanies this distribution. The
+full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _EBC_VM_TEST_PROTOCOL_H_
+#define _EBC_VM_TEST_PROTOCOL_H_
+
+//
+// Define a protocol for an EBC VM test interface.
+//
+#define EFI_EBC_VM_TEST_PROTOCOL_GUID \
+ { \
+ 0xAAEACCFD, 0xF27B, 0x4C17, { 0xB6, 0x10, 0x75, 0xCA, 0x1F, 0x2D, 0xFB, 0x52 } \
+ }
+
+//
+// Define for forward reference.
+//
+typedef struct _EFI_EBC_VM_TEST_PROTOCOL EFI_EBC_VM_TEST_PROTOCOL;
+
+///
+/// instruction pointer for the VM
+///
+typedef UINT8 *VMIP;
+
+typedef INT64 VM_REGISTER;
+typedef UINT32 EXCEPTION_FLAGS;
+
+typedef struct {
+ VM_REGISTER Gpr[8]; ///< General purpose registers.
+ ///< Flags register:
+ ///< 0 Set to 1 if the result of the last compare was true
+ ///< 1 Set to 1 if stepping
+ UINT64 Flags; ///< 2..63 Reserved.
+ VMIP Ip; ///< Instruction pointer.
+ UINTN LastException;
+ EXCEPTION_FLAGS ExceptionFlags; ///< to keep track of exceptions
+ UINT32 StopFlags;
+ UINT32 CompilerVersion; ///< via break(6)
+ UINTN HighStackBottom; ///< bottom of the upper stack
+ UINTN LowStackTop; ///< top of the lower stack
+ UINT64 StackRetAddr; ///< location of final return address on stack
+ UINTN *StackMagicPtr; ///< pointer to magic value on stack to detect corruption
+ EFI_HANDLE ImageHandle; ///< for this EBC driver
+ EFI_SYSTEM_TABLE *SystemTable; ///< for debugging only
+ UINTN LastAddrConverted; ///< for debug
+ UINTN LastAddrConvertedValue; ///< for debug
+ VOID *FramePtr;
+ VOID *EntryPoint; ///< entry point of EBC image
+ UINTN ImageBase;
+ VOID *StackPool;
+ VOID *StackTop;
+} VM_CONTEXT;
+
+/**
+ Given a pointer to a new VM context, execute one or more instructions. This
+ function is only used for test purposes.
+
+ @param[in] This A pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
+ @param[in] VmPtr A pointer to a VM context.
+ @param[in, out] InstructionCount A pointer to a UINTN value holding the number of
+ instructions to execute. If it holds value of 0,
+ then the instruction to be executed is 1.
+
+ @retval EFI_UNSUPPORTED At least one of the opcodes is not supported.
+ @retval EFI_SUCCESS All of the instructions are executed successfully.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EBC_VM_TEST_EXECUTE) (
+ IN EFI_EBC_VM_TEST_PROTOCOL *This,
+ IN VM_CONTEXT *VmPtr,
+ IN OUT UINTN *InstructionCount
+ );
+
+/**
+ Convert AsmText to the instruction. This function is only used for test purposes.
+
+ @param[in] This A pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
+ @param[in] AsmText A pointer to EBC ASM text code.
+ @param[out] Buffer Buffer to store the instruction.
+ @param[out] BufferLen Size of buffer that is requried to store data.
+
+ @retval EFI_UNSUPPORTED This functionality is unsupported.
+ @retval EFI_SUCCESS Successfully convert AsmText to the instruction.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EBC_VM_TEST_ASM) (
+ IN EFI_EBC_VM_TEST_PROTOCOL *This,
+ IN CHAR16 *AsmText,
+ IN OUT INT8 *Buffer,
+ IN OUT UINTN *BufferLen
+ );
+
+/**
+ Dump the executed instruction. This function is only used for test purposes.
+
+ @param[in] This A pointer to the EFI_EBC_VM_TEST_PROTOCOL structure.
+ @param[out] AsmText Contain the disasm text.
+ @param[out] Buffer Buffer to store the instruction.
+ @param[out] BufferLen Size of buffer that is requried to store data.
+
+ @retval EFI_UNSUPPORTED This functionality is unsupported.
+ @retval EFI_SUCCESS Successfully dump the executed instruction.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EBC_VM_TEST_DASM) (
+ IN EFI_EBC_VM_TEST_PROTOCOL *This,
+ IN OUT CHAR16 *AsmText,
+ IN OUT INT8 *Buffer,
+ IN OUT UINTN *Len
+ );
+
+//
+// Prototype for the actual EBC test protocol interface
+//
+struct _EFI_EBC_VM_TEST_PROTOCOL {
+ EBC_VM_TEST_EXECUTE Execute;
+ EBC_VM_TEST_ASM Assemble;
+ EBC_VM_TEST_DASM Disassemble;
+};
+
+extern EFI_GUID gEfiEbcVmTestProtocolGuid;
+
+#endif