mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
Minor coding style adjustment for DiskIo, Partition, English and Ebc modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5200 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d29270810c
commit
ea7cb08c0a
@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef _DISK_IO_H
|
#ifndef _DISK_IO_H_
|
||||||
#define _DISK_IO_H
|
#define _DISK_IO_H_
|
||||||
|
|
||||||
#include <Uefi.h>
|
#include <Uefi.h>
|
||||||
#include <Protocol/BlockIo.h>
|
#include <Protocol/BlockIo.h>
|
||||||
@ -69,9 +69,9 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gDiskIoComponentName2;
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DiskIoDriverBindingSupported (
|
DiskIoDriverBindingSupported (
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||||
IN EFI_HANDLE ControllerHandle,
|
IN EFI_HANDLE ControllerHandle,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,9 +91,9 @@ DiskIoDriverBindingSupported (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DiskIoDriverBindingStart (
|
DiskIoDriverBindingStart (
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||||
IN EFI_HANDLE ControllerHandle,
|
IN EFI_HANDLE ControllerHandle,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,7 +166,7 @@ PartitionInstallElToritoChildHandles (
|
|||||||
Check += CheckBuffer[Index];
|
Check += CheckBuffer[Index];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Check & 0xFFFF) {
|
if ((Check & 0xFFFF) != 0) {
|
||||||
DEBUG ((EFI_D_ERROR, "EltCheckBootCatalog: El Torito boot catalog header checksum failed\n"));
|
DEBUG ((EFI_D_ERROR, "EltCheckBootCatalog: El Torito boot catalog header checksum failed\n"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ PartitionRestoreGptTable (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Restore Partition Table to its alternate place
|
Restore Partition Table to its alternate place.
|
||||||
(Primary -> Backup or Backup -> Primary)
|
(Primary -> Backup or Backup -> Primary)
|
||||||
|
|
||||||
@param[in] PartHeader Partition table header structure
|
@param[in] PartHeader Partition table header structure
|
||||||
@ -97,7 +97,7 @@ PartitionCheckGptEntry (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Checks the CRC32 value in the table header
|
Checks the CRC32 value in the table header.
|
||||||
|
|
||||||
@param MaxSize Max Size limit
|
@param MaxSize Max Size limit
|
||||||
@param Size The size of the table
|
@param Size The size of the table
|
||||||
@ -116,7 +116,7 @@ PartitionCheckCrcAltSize (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Checks the CRC32 value in the table header
|
Checks the CRC32 value in the table header.
|
||||||
|
|
||||||
@param MaxSize Max Size limit
|
@param MaxSize Max Size limit
|
||||||
@param Hdr Table to check
|
@param Hdr Table to check
|
||||||
@ -133,7 +133,7 @@ PartitionCheckCrc (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Updates the CRC32 value in the table header
|
Updates the CRC32 value in the table header.
|
||||||
|
|
||||||
@param Size The size of the table
|
@param Size The size of the table
|
||||||
@param Hdr Table to update
|
@param Hdr Table to update
|
||||||
@ -147,7 +147,7 @@ PartitionSetCrcAltSize (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Updates the CRC32 value in the table header
|
Updates the CRC32 value in the table header.
|
||||||
|
|
||||||
@param Hdr Table to update
|
@param Hdr Table to update
|
||||||
|
|
||||||
@ -619,7 +619,7 @@ Done:
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Restore Partition Table to its alternate place
|
Restore Partition Table to its alternate place.
|
||||||
(Primary -> Backup or Backup -> Primary)
|
(Primary -> Backup or Backup -> Primary)
|
||||||
|
|
||||||
@param[in] PartHeader Partition table header structure
|
@param[in] PartHeader Partition table header structure
|
||||||
@ -681,7 +681,7 @@ PartitionCheckGptEntry (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Updates the CRC32 value in the table header
|
Updates the CRC32 value in the table header.
|
||||||
|
|
||||||
@param Hdr Table to update
|
@param Hdr Table to update
|
||||||
|
|
||||||
@ -696,7 +696,7 @@ PartitionSetCrc (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Updates the CRC32 value in the table header
|
Updates the CRC32 value in the table header.
|
||||||
|
|
||||||
@param Size The size of the table
|
@param Size The size of the table
|
||||||
@param Hdr Table to update
|
@param Hdr Table to update
|
||||||
@ -707,7 +707,6 @@ PartitionSetCrcAltSize (
|
|||||||
IN UINTN Size,
|
IN UINTN Size,
|
||||||
IN OUT EFI_TABLE_HEADER *Hdr
|
IN OUT EFI_TABLE_HEADER *Hdr
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
UINT32 Crc;
|
UINT32 Crc;
|
||||||
|
|
||||||
@ -718,7 +717,7 @@ PartitionSetCrcAltSize (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Checks the CRC32 value in the table header
|
Checks the CRC32 value in the table header.
|
||||||
|
|
||||||
@param MaxSize Max Size limit
|
@param MaxSize Max Size limit
|
||||||
@param Hdr Table to check
|
@param Hdr Table to check
|
||||||
@ -738,7 +737,7 @@ PartitionCheckCrc (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Checks the CRC32 value in the table header
|
Checks the CRC32 value in the table header.
|
||||||
|
|
||||||
@param MaxSize Max Size limit
|
@param MaxSize Max Size limit
|
||||||
@param Size The size of the table
|
@param Size The size of the table
|
||||||
@ -768,7 +767,7 @@ PartitionCheckCrcAltSize (
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MaxSize && Size > MaxSize) {
|
if ((MaxSize != 0) && (Size > MaxSize)) {
|
||||||
DEBUG ((EFI_D_ERROR, "CheckCrc32: Size > MaxSize\n"));
|
DEBUG ((EFI_D_ERROR, "CheckCrc32: Size > MaxSize\n"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ PartitionValidMbr (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Non of the regions overlapped so MBR is O.K.
|
// None of the regions overlapped so MBR is O.K.
|
||||||
//
|
//
|
||||||
return MbrValid;
|
return MbrValid;
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef _PARTITION_H
|
#ifndef _PARTITION_H_
|
||||||
#define _PARTITION_H
|
#define _PARTITION_H_
|
||||||
|
|
||||||
#include <Uefi.h>
|
#include <Uefi.h>
|
||||||
#include <Protocol/BlockIo.h>
|
#include <Protocol/BlockIo.h>
|
||||||
@ -150,10 +150,10 @@ PartitionDriverBindingStart (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PartitionDriverBindingStop (
|
PartitionDriverBindingStop (
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||||
IN EFI_HANDLE ControllerHandle,
|
IN EFI_HANDLE ControllerHandle,
|
||||||
IN UINTN NumberOfChildren,
|
IN UINTN NumberOfChildren,
|
||||||
IN EFI_HANDLE *ChildHandleBuffer
|
IN EFI_HANDLE *ChildHandleBuffer
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -313,12 +313,11 @@ PartitionInstallChildHandle (
|
|||||||
IN EFI_BLOCK_IO_PROTOCOL *ParentBlockIo,
|
IN EFI_BLOCK_IO_PROTOCOL *ParentBlockIo,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode,
|
IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode,
|
||||||
IN UINT64 Start,
|
IN EFI_LBA Start,
|
||||||
IN UINT64 End,
|
IN EFI_LBA End,
|
||||||
IN UINT32 BlockSize,
|
IN UINT32 BlockSize,
|
||||||
IN BOOLEAN InstallEspGuid
|
IN BOOLEAN InstallEspGuid
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Install child handles if the Handle supports GPT partition structure.
|
Install child handles if the Handle supports GPT partition structure.
|
||||||
@ -341,8 +340,7 @@ PartitionInstallGptChildHandles (
|
|||||||
IN EFI_DISK_IO_PROTOCOL *DiskIo,
|
IN EFI_DISK_IO_PROTOCOL *DiskIo,
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
|
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Install child handles if the Handle supports El Torito format.
|
Install child handles if the Handle supports El Torito format.
|
||||||
@ -366,8 +364,7 @@ PartitionInstallElToritoChildHandles (
|
|||||||
IN EFI_DISK_IO_PROTOCOL *DiskIo,
|
IN EFI_DISK_IO_PROTOCOL *DiskIo,
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
|
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Install child handles if the Handle supports MBR format.
|
Install child handles if the Handle supports MBR format.
|
||||||
@ -390,8 +387,7 @@ PartitionInstallMbrChildHandles (
|
|||||||
IN EFI_DISK_IO_PROTOCOL *DiskIo,
|
IN EFI_DISK_IO_PROTOCOL *DiskIo,
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
|
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -122,7 +122,7 @@ InitializeUnicodeCollationEng (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Index = 0; mOtherChars[Index]; Index++) {
|
for (Index = 0; mOtherChars[Index] != 0; Index++) {
|
||||||
Index2 = mOtherChars[Index];
|
Index2 = mOtherChars[Index];
|
||||||
mEngInfoMap[Index2] |= CHAR_FAT_VALID;
|
mEngInfoMap[Index2] |= CHAR_FAT_VALID;
|
||||||
}
|
}
|
||||||
@ -191,8 +191,8 @@ EngStriColl (
|
|||||||
IN CHAR16 *Str2
|
IN CHAR16 *Str2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
while (*Str1) {
|
while (*Str1 != 0) {
|
||||||
if (ToUpper (*Str1) != ToUpper (*Str2)) {
|
if (TO_UPPER (*Str1) != TO_UPPER (*Str2)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ EngStriColl (
|
|||||||
Str2 += 1;
|
Str2 += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ToUpper (*Str1) - ToUpper (*Str2);
|
return TO_UPPER (*Str1) - TO_UPPER (*Str2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -219,8 +219,8 @@ EngStrLwr (
|
|||||||
IN OUT CHAR16 *Str
|
IN OUT CHAR16 *Str
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
while (*Str) {
|
while (*Str != 0) {
|
||||||
*Str = ToLower (*Str);
|
*Str = TO_LOWER (*Str);
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -241,8 +241,8 @@ EngStrUpr (
|
|||||||
IN OUT CHAR16 *Str
|
IN OUT CHAR16 *Str
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
while (*Str) {
|
while (*Str != 0) {
|
||||||
*Str = ToUpper (*Str);
|
*Str = TO_UPPER (*Str);
|
||||||
Str += 1;
|
Str += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -280,7 +280,7 @@ EngMetaiMatch (
|
|||||||
//
|
//
|
||||||
// End of pattern. If end of string, TRUE match
|
// End of pattern. If end of string, TRUE match
|
||||||
//
|
//
|
||||||
if (*String) {
|
if (*String != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -290,7 +290,7 @@ EngMetaiMatch (
|
|||||||
//
|
//
|
||||||
// Match zero or more chars
|
// Match zero or more chars
|
||||||
//
|
//
|
||||||
while (*String) {
|
while (*String != 0) {
|
||||||
if (EngMetaiMatch (This, String, Pattern)) {
|
if (EngMetaiMatch (This, String, Pattern)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -304,7 +304,7 @@ EngMetaiMatch (
|
|||||||
//
|
//
|
||||||
// Match any one char
|
// Match any one char
|
||||||
//
|
//
|
||||||
if (!*String) {
|
if (*String == 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,7 +316,7 @@ EngMetaiMatch (
|
|||||||
// Match char set
|
// Match char set
|
||||||
//
|
//
|
||||||
CharC = *String;
|
CharC = *String;
|
||||||
if (!CharC) {
|
if (CharC == 0) {
|
||||||
//
|
//
|
||||||
// syntax problem
|
// syntax problem
|
||||||
//
|
//
|
||||||
@ -325,7 +325,7 @@ EngMetaiMatch (
|
|||||||
|
|
||||||
Index3 = 0;
|
Index3 = 0;
|
||||||
CharP = *Pattern++;
|
CharP = *Pattern++;
|
||||||
while (CharP) {
|
while (CharP != 0) {
|
||||||
if (CharP == ']') {
|
if (CharP == ']') {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ EngMetaiMatch (
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ToUpper (CharC) >= ToUpper (Index3) && ToUpper (CharC) <= ToUpper (CharP)) {
|
if (TO_UPPER (CharC) >= TO_UPPER (Index3) && TO_UPPER (CharC) <= TO_UPPER (CharP)) {
|
||||||
//
|
//
|
||||||
// if in range, it's a match
|
// if in range, it's a match
|
||||||
//
|
//
|
||||||
@ -351,7 +351,7 @@ EngMetaiMatch (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Index3 = CharP;
|
Index3 = CharP;
|
||||||
if (ToUpper (CharC) == ToUpper (CharP)) {
|
if (TO_UPPER (CharC) == TO_UPPER (CharP)) {
|
||||||
//
|
//
|
||||||
// if char matches
|
// if char matches
|
||||||
//
|
//
|
||||||
@ -363,7 +363,7 @@ EngMetaiMatch (
|
|||||||
//
|
//
|
||||||
// skip to end of match char set
|
// skip to end of match char set
|
||||||
//
|
//
|
||||||
while (CharP && CharP != ']') {
|
while ((CharP != 0) && (CharP != ']')) {
|
||||||
CharP = *Pattern;
|
CharP = *Pattern;
|
||||||
Pattern += 1;
|
Pattern += 1;
|
||||||
}
|
}
|
||||||
@ -373,7 +373,7 @@ EngMetaiMatch (
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
CharC = *String;
|
CharC = *String;
|
||||||
if (ToUpper (CharC) != ToUpper (CharP)) {
|
if (TO_UPPER (CharC) != TO_UPPER (CharP)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ EngFatToStr (
|
|||||||
//
|
//
|
||||||
// No DBCS issues, just expand and add null terminate to end of string
|
// No DBCS issues, just expand and add null terminate to end of string
|
||||||
//
|
//
|
||||||
while (*Fat && FatSize) {
|
while ((*Fat != 0) && (FatSize != 0)) {
|
||||||
*String = *Fat;
|
*String = *Fat;
|
||||||
String += 1;
|
String += 1;
|
||||||
Fat += 1;
|
Fat += 1;
|
||||||
@ -446,7 +446,7 @@ EngStrToFat (
|
|||||||
BOOLEAN SpecialCharExist;
|
BOOLEAN SpecialCharExist;
|
||||||
|
|
||||||
SpecialCharExist = FALSE;
|
SpecialCharExist = FALSE;
|
||||||
while (*String && FatSize) {
|
while ((*String != 0) && (FatSize != 0)) {
|
||||||
//
|
//
|
||||||
// Skip '.' or ' ' when making a fat name
|
// Skip '.' or ' ' when making a fat name
|
||||||
//
|
//
|
||||||
@ -455,7 +455,7 @@ EngStrToFat (
|
|||||||
// If this is a valid fat char, move it.
|
// If this is a valid fat char, move it.
|
||||||
// Otherwise, move a '_' and flag the fact that the name needs an Lfn
|
// Otherwise, move a '_' and flag the fact that the name needs an Lfn
|
||||||
//
|
//
|
||||||
if (*String < 0x100 && (mEngInfoMap[*String] & CHAR_FAT_VALID)) {
|
if (*String < 0x100 && ((mEngInfoMap[*String] & CHAR_FAT_VALID) != 0)) {
|
||||||
*Fat = mEngUpperMap[*String];
|
*Fat = mEngUpperMap[*String];
|
||||||
} else {
|
} else {
|
||||||
*Fat = '_';
|
*Fat = '_';
|
||||||
|
@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef _UNICODE_COLLATION_ENG_H
|
#ifndef _UNICODE_COLLATION_ENG_H_
|
||||||
#define _UNICODE_COLLATION_ENG_H
|
#define _UNICODE_COLLATION_ENG_H_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -32,8 +32,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
//
|
//
|
||||||
#define CHAR_FAT_VALID 0x01
|
#define CHAR_FAT_VALID 0x01
|
||||||
|
|
||||||
#define ToUpper(a) (CHAR16) (a <= 0xFF ? mEngUpperMap[a] : a)
|
#define TO_UPPER(a) (CHAR16) (a <= 0xFF ? mEngUpperMap[a] : a)
|
||||||
#define ToLower(a) (CHAR16) (a <= 0xFF ? mEngLowerMap[a] : a)
|
#define TO_LOWER(a) (CHAR16) (a <= 0xFF ? mEngLowerMap[a] : a)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prototypes
|
// Prototypes
|
||||||
@ -54,11 +54,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EngStriColl (
|
EngStriColl (
|
||||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||||
IN CHAR16 *Str1,
|
IN CHAR16 *Str1,
|
||||||
IN CHAR16 *Str2
|
IN CHAR16 *Str2
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Performs a case-insensitive comparison of a Null-terminated Unicode
|
Performs a case-insensitive comparison of a Null-terminated Unicode
|
||||||
@ -75,11 +74,10 @@ EngStriColl (
|
|||||||
BOOLEAN
|
BOOLEAN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EngMetaiMatch (
|
EngMetaiMatch (
|
||||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||||
IN CHAR16 *String,
|
IN CHAR16 *String,
|
||||||
IN CHAR16 *Pattern
|
IN CHAR16 *Pattern
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts all the Unicode characters in a Null-terminated Unicode string to
|
Converts all the Unicode characters in a Null-terminated Unicode string to
|
||||||
@ -92,10 +90,9 @@ EngMetaiMatch (
|
|||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EngStrLwr (
|
EngStrLwr (
|
||||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||||
IN OUT CHAR16 *Str
|
IN OUT CHAR16 *Str
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts all the Unicode characters in a Null-terminated Unicode string to upper
|
Converts all the Unicode characters in a Null-terminated Unicode string to upper
|
||||||
@ -108,10 +105,9 @@ EngStrLwr (
|
|||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EngStrUpr (
|
EngStrUpr (
|
||||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||||
IN OUT CHAR16 *Str
|
IN OUT CHAR16 *Str
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
|
Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
|
||||||
@ -128,12 +124,11 @@ EngStrUpr (
|
|||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EngFatToStr (
|
EngFatToStr (
|
||||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||||
IN UINTN FatSize,
|
IN UINTN FatSize,
|
||||||
IN CHAR8 *Fat,
|
IN CHAR8 *Fat,
|
||||||
OUT CHAR16 *String
|
OUT CHAR16 *String
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts a Null-terminated Unicode string to legal characters in a FAT
|
Converts a Null-terminated Unicode string to legal characters in a FAT
|
||||||
@ -153,12 +148,11 @@ EngFatToStr (
|
|||||||
BOOLEAN
|
BOOLEAN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EngStrToFat (
|
EngStrToFat (
|
||||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||||
IN CHAR16 *String,
|
IN CHAR16 *String,
|
||||||
IN UINTN FatSize,
|
IN UINTN FatSize,
|
||||||
OUT CHAR8 *Fat
|
OUT CHAR8 *Fat
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The user Entry Point for English module.
|
The user Entry Point for English module.
|
||||||
@ -178,7 +172,7 @@ EFIAPI
|
|||||||
InitializeUnicodeCollationEng (
|
InitializeUnicodeCollationEng (
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,8 +67,8 @@ UINT64
|
|||||||
STATIC
|
STATIC
|
||||||
INT16
|
INT16
|
||||||
VmReadIndex16 (
|
VmReadIndex16 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT32 CodeOffset
|
IN UINT32 CodeOffset
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,8 +84,8 @@ VmReadIndex16 (
|
|||||||
STATIC
|
STATIC
|
||||||
INT32
|
INT32
|
||||||
VmReadIndex32 (
|
VmReadIndex32 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT32 CodeOffset
|
IN UINT32 CodeOffset
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,8 +101,8 @@ VmReadIndex32 (
|
|||||||
STATIC
|
STATIC
|
||||||
INT64
|
INT64
|
||||||
VmReadIndex64 (
|
VmReadIndex64 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT32 CodeOffset
|
IN UINT32 CodeOffset
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -117,8 +117,8 @@ VmReadIndex64 (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT8
|
UINT8
|
||||||
VmReadMem8 (
|
VmReadMem8 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINTN Addr
|
IN UINTN Addr
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -165,8 +165,8 @@ VmReadMem32 (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
VmReadMem64 (
|
VmReadMem64 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINTN Addr
|
IN UINTN Addr
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -181,8 +181,8 @@ VmReadMem64 (
|
|||||||
STATIC
|
STATIC
|
||||||
UINTN
|
UINTN
|
||||||
VmReadMemN (
|
VmReadMemN (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINTN Addr
|
IN UINTN Addr
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -211,9 +211,9 @@ VmReadMemN (
|
|||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
VmWriteMem8 (
|
VmWriteMem8 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINTN Addr,
|
IN UINTN Addr,
|
||||||
IN UINT8 Data
|
IN UINT8 Data
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -242,9 +242,9 @@ VmWriteMem8 (
|
|||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
VmWriteMem16 (
|
VmWriteMem16 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINTN Addr,
|
IN UINTN Addr,
|
||||||
IN UINT16 Data
|
IN UINT16 Data
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -273,9 +273,9 @@ VmWriteMem16 (
|
|||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
VmWriteMem32 (
|
VmWriteMem32 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINTN Addr,
|
IN UINTN Addr,
|
||||||
IN UINT32 Data
|
IN UINT32 Data
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -441,8 +441,8 @@ VmReadImmed64 (
|
|||||||
STATIC
|
STATIC
|
||||||
UINTN
|
UINTN
|
||||||
ConvertStackAddr (
|
ConvertStackAddr (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINTN Addr
|
IN UINTN Addr
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -792,7 +792,7 @@ ExecutePOP (
|
|||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ExecuteSignedDataManip (
|
ExecuteSignedDataManip (
|
||||||
IN VM_CONTEXT *VmPtr
|
IN VM_CONTEXT *VmPtr
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -815,7 +815,7 @@ ExecuteSignedDataManip (
|
|||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ExecuteUnsignedDataManip (
|
ExecuteUnsignedDataManip (
|
||||||
IN VM_CONTEXT *VmPtr
|
IN VM_CONTEXT *VmPtr
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -923,9 +923,9 @@ ExecuteMOVsnw (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteNOT (
|
ExecuteNOT (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -944,9 +944,9 @@ ExecuteNOT (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteNEG (
|
ExecuteNEG (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -965,9 +965,9 @@ ExecuteNEG (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteADD (
|
ExecuteADD (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -986,9 +986,9 @@ ExecuteADD (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteSUB (
|
ExecuteSUB (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1007,9 +1007,9 @@ ExecuteSUB (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteMUL (
|
ExecuteMUL (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1028,9 +1028,9 @@ ExecuteMUL (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteMULU (
|
ExecuteMULU (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1049,9 +1049,9 @@ ExecuteMULU (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteDIV (
|
ExecuteDIV (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1070,9 +1070,9 @@ ExecuteDIV (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteDIVU (
|
ExecuteDIVU (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1091,9 +1091,9 @@ ExecuteDIVU (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteMOD (
|
ExecuteMOD (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1112,9 +1112,9 @@ ExecuteMOD (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteMODU (
|
ExecuteMODU (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1133,9 +1133,9 @@ ExecuteMODU (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteAND (
|
ExecuteAND (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1154,9 +1154,9 @@ ExecuteAND (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteOR (
|
ExecuteOR (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1175,9 +1175,9 @@ ExecuteOR (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteXOR (
|
ExecuteXOR (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1196,9 +1196,9 @@ ExecuteXOR (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteSHL (
|
ExecuteSHL (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1217,9 +1217,9 @@ ExecuteSHL (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteSHR (
|
ExecuteSHR (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1238,9 +1238,9 @@ ExecuteSHR (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteASHR (
|
ExecuteASHR (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1259,9 +1259,9 @@ ExecuteASHR (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteEXTNDB (
|
ExecuteEXTNDB (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1280,9 +1280,9 @@ ExecuteEXTNDB (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteEXTNDW (
|
ExecuteEXTNDW (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1301,9 +1301,9 @@ ExecuteEXTNDW (
|
|||||||
STATIC
|
STATIC
|
||||||
UINT64
|
UINT64
|
||||||
ExecuteEXTNDD (
|
ExecuteEXTNDD (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINT64 Op1,
|
IN UINT64 Op1,
|
||||||
IN UINT64 Op2
|
IN UINT64 Op2
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -239,8 +239,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EbcExecute (
|
EbcExecute (
|
||||||
IN VM_CONTEXT *VmPtr
|
IN VM_CONTEXT *VmPtr
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -253,8 +252,7 @@ EbcExecute (
|
|||||||
UINT64
|
UINT64
|
||||||
GetVmVersion (
|
GetVmVersion (
|
||||||
VOID
|
VOID
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Writes UINTN data to memory address.
|
Writes UINTN data to memory address.
|
||||||
@ -284,8 +282,7 @@ VmWriteMemN (
|
|||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN UINTN Addr,
|
IN UINTN Addr,
|
||||||
IN UINTN Data
|
IN UINTN Data
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Writes 64-bit data to memory address.
|
Writes 64-bit data to memory address.
|
||||||
@ -312,11 +309,10 @@ VmWriteMemN (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
VmWriteMem64 (
|
VmWriteMem64 (
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
UINTN Addr,
|
IN UINTN Addr,
|
||||||
IN UINT64 Data
|
IN UINT64 Data
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Define a protocol for an EBC VM test interface.
|
// Define a protocol for an EBC VM test interface.
|
||||||
@ -385,7 +381,6 @@ EbcExecuteInstructions (
|
|||||||
IN EFI_EBC_VM_TEST_PROTOCOL *This,
|
IN EFI_EBC_VM_TEST_PROTOCOL *This,
|
||||||
IN VM_CONTEXT *VmPtr,
|
IN VM_CONTEXT *VmPtr,
|
||||||
IN OUT UINTN *InstructionCount
|
IN OUT UINTN *InstructionCount
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
#endif // ifndef _EBC_EXECUTE_H_
|
#endif // ifndef _EBC_EXECUTE_H_
|
||||||
|
@ -52,8 +52,8 @@ STATIC
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcUnloadImage (
|
EbcUnloadImage (
|
||||||
IN EFI_EBC_PROTOCOL *This,
|
IN EFI_EBC_PROTOCOL *This,
|
||||||
IN EFI_HANDLE ImageHandle
|
IN EFI_HANDLE ImageHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,10 +79,10 @@ STATIC
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcCreateThunk (
|
EbcCreateThunk (
|
||||||
IN EFI_EBC_PROTOCOL *This,
|
IN EFI_EBC_PROTOCOL *This,
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN VOID *EbcEntryPoint,
|
IN VOID *EbcEntryPoint,
|
||||||
OUT VOID **Thunk
|
OUT VOID **Thunk
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,8 +100,8 @@ STATIC
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcGetVersion (
|
EbcGetVersion (
|
||||||
IN EFI_EBC_PROTOCOL *This,
|
IN EFI_EBC_PROTOCOL *This,
|
||||||
IN OUT UINT64 *Version
|
IN OUT UINT64 *Version
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -187,7 +187,7 @@ EbcDebugPeriodic (
|
|||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
InitEbcVmTestProtocol (
|
InitEbcVmTestProtocol (
|
||||||
IN EFI_HANDLE *Handle
|
IN EFI_HANDLE *IHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -216,8 +216,8 @@ STATIC
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcRegisterICacheFlush (
|
EbcRegisterICacheFlush (
|
||||||
IN EFI_EBC_PROTOCOL *This,
|
IN EFI_EBC_PROTOCOL *This,
|
||||||
IN EBC_ICACHE_FLUSH Flush
|
IN EBC_ICACHE_FLUSH Flush
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -235,8 +235,8 @@ STATIC
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcDebugGetMaximumProcessorIndex (
|
EbcDebugGetMaximumProcessorIndex (
|
||||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||||
OUT UINTN *MaxProcessorIndex
|
OUT UINTN *MaxProcessorIndex
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -264,9 +264,9 @@ STATIC
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcDebugRegisterPeriodicCallback (
|
EbcDebugRegisterPeriodicCallback (
|
||||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||||
IN UINTN ProcessorIndex,
|
IN UINTN ProcessorIndex,
|
||||||
IN EFI_PERIODIC_CALLBACK PeriodicCallback
|
IN EFI_PERIODIC_CALLBACK PeriodicCallback
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -298,10 +298,10 @@ STATIC
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcDebugRegisterExceptionCallback (
|
EbcDebugRegisterExceptionCallback (
|
||||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||||
IN UINTN ProcessorIndex,
|
IN UINTN ProcessorIndex,
|
||||||
IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
|
IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
|
||||||
IN EFI_EXCEPTION_TYPE ExceptionType
|
IN EFI_EXCEPTION_TYPE ExceptionType
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -324,10 +324,10 @@ STATIC
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcDebugInvalidateInstructionCache (
|
EbcDebugInvalidateInstructionCache (
|
||||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||||
IN UINTN ProcessorIndex,
|
IN UINTN ProcessorIndex,
|
||||||
IN VOID *Start,
|
IN VOID *Start,
|
||||||
IN UINT64 Length
|
IN UINT64 Length
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -101,9 +101,8 @@ EbcCreateThunks (
|
|||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN VOID *EbcEntryPoint,
|
IN VOID *EbcEntryPoint,
|
||||||
OUT VOID **Thunk,
|
OUT VOID **Thunk,
|
||||||
IN UINT32 Flags
|
IN UINT32 Flags
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Add a thunk to our list of thunks for a given image handle.
|
Add a thunk to our list of thunks for a given image handle.
|
||||||
@ -120,11 +119,10 @@ EbcCreateThunks (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EbcAddImageThunk (
|
EbcAddImageThunk (
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN VOID *ThunkBuffer,
|
IN VOID *ThunkBuffer,
|
||||||
IN UINT32 ThunkSize
|
IN UINT32 ThunkSize
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// The interpreter calls these when an exception is detected,
|
// The interpreter calls these when an exception is detected,
|
||||||
@ -143,11 +141,10 @@ EbcAddImageThunk (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EbcDebugSignalException (
|
EbcDebugSignalException (
|
||||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||||
IN EXCEPTION_FLAGS ExceptionFlags,
|
IN EXCEPTION_FLAGS ExceptionFlags,
|
||||||
IN VM_CONTEXT *VmPtr
|
IN VM_CONTEXT *VmPtr
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Define a constant of how often to call the debugger periodic callback
|
// Define a constant of how often to call the debugger periodic callback
|
||||||
@ -161,21 +158,20 @@ EbcDebugSignalException (
|
|||||||
//
|
//
|
||||||
// External low level functions that are native-processor dependent
|
// External low level functions that are native-processor dependent
|
||||||
//
|
//
|
||||||
/**
|
/**
|
||||||
The VM thunk code stuffs an EBC entry point into a processor
|
The VM thunk code stuffs an EBC entry point into a processor
|
||||||
register. Since we can't use inline assembly to get it from
|
register. Since we can't use inline assembly to get it from
|
||||||
the interpreter C code, stuff it into the return value
|
the interpreter C code, stuff it into the return value
|
||||||
register and return.
|
register and return.
|
||||||
|
|
||||||
@return The contents of the register in which the entry point is passed.
|
@return The contents of the register in which the entry point is passed.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINTN
|
UINTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcLLGetEbcEntryPoint (
|
EbcLLGetEbcEntryPoint (
|
||||||
VOID
|
VOID
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the caller's value of the stack pointer.
|
Returns the caller's value of the stack pointer.
|
||||||
@ -183,15 +179,14 @@ EbcLLGetEbcEntryPoint (
|
|||||||
We adjust it by 4 here because when they called us, the return address
|
We adjust it by 4 here because when they called us, the return address
|
||||||
is put on the stack, thereby lowering it by 4 bytes.
|
is put on the stack, thereby lowering it by 4 bytes.
|
||||||
|
|
||||||
@return The current value of the stack pointer for the caller.
|
@return The current value of the stack pointer for the caller.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINTN
|
UINTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcLLGetStackPointer (
|
EbcLLGetStackPointer (
|
||||||
VOID
|
VOID
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is called to execute an EBC CALLEX instruction.
|
This function is called to execute an EBC CALLEX instruction.
|
||||||
@ -204,7 +199,7 @@ EbcLLGetStackPointer (
|
|||||||
@param CallAddr The function address.
|
@param CallAddr The function address.
|
||||||
@param EbcSp The new EBC stack pointer.
|
@param EbcSp The new EBC stack pointer.
|
||||||
@param FramePtr The frame pointer.
|
@param FramePtr The frame pointer.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -212,8 +207,7 @@ EbcLLCALLEXNative (
|
|||||||
IN UINTN CallAddr,
|
IN UINTN CallAddr,
|
||||||
IN UINTN EbcSp,
|
IN UINTN EbcSp,
|
||||||
IN VOID *FramePtr
|
IN VOID *FramePtr
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is called to execute an EBC CALLEX instruction.
|
This function is called to execute an EBC CALLEX instruction.
|
||||||
@ -237,8 +231,7 @@ EbcLLCALLEX (
|
|||||||
IN UINTN NewStackPointer,
|
IN UINTN NewStackPointer,
|
||||||
IN VOID *FramePtr,
|
IN VOID *FramePtr,
|
||||||
IN UINT8 Size
|
IN UINT8 Size
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
When EBC calls native, on return the VM has to stuff the return
|
When EBC calls native, on return the VM has to stuff the return
|
||||||
@ -246,15 +239,14 @@ EbcLLCALLEX (
|
|||||||
in the register, so simply return and the caller should get the
|
in the register, so simply return and the caller should get the
|
||||||
return result properly.
|
return result properly.
|
||||||
|
|
||||||
@return The unmodified value returned by the native code.
|
@return The unmodified value returned by the native code.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
INT64
|
INT64
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EbcLLGetReturnValue (
|
EbcLLGetReturnValue (
|
||||||
VOID
|
VOID
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the stack index and buffer assosicated with the Handle parameter.
|
Returns the stack index and buffer assosicated with the Handle parameter.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user