mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
EmulatorPkg/Unix: Fix various typos
Fix various typos in comments and documentation. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-6-philmd@redhat.com>
This commit is contained in:
parent
de949fdbcf
commit
26cfe2c659
@ -62,8 +62,8 @@ define RemoveFirmwareSymbolFile
|
|||||||
end
|
end
|
||||||
|
|
||||||
if gInXcode == 1
|
if gInXcode == 1
|
||||||
# in Xcode the program is already runing. Issuing a run command
|
# in Xcode the program is already running. Issuing a run command
|
||||||
# will cause a fatal debugger error. The break point sciprt that
|
# will cause a fatal debugger error. The break point script that
|
||||||
# is used to source this script sets gInCode to 1.
|
# is used to source this script sets gInCode to 1.
|
||||||
else
|
else
|
||||||
#
|
#
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
Tested on Mac OS X.
|
Tested on Mac OS X.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
Portitions copyright (c) 2011, Apple Inc. All rights reserved.
|
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ EmuBlockIoReadBlocks (
|
|||||||
Done:
|
Done:
|
||||||
if (Token != NULL) {
|
if (Token != NULL) {
|
||||||
if (Token->Event != NULL) {
|
if (Token->Event != NULL) {
|
||||||
// Caller is responcible for signaling EFI Event
|
// Caller is responsible for signaling EFI Event
|
||||||
Token->TransactionStatus = Status;
|
Token->TransactionStatus = Status;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -429,7 +429,7 @@ Done:
|
|||||||
the Event is NULL.
|
the Event is NULL.
|
||||||
@retval EFI_WRITE_PROTECTED The device can not be written to.
|
@retval EFI_WRITE_PROTECTED The device can not be written to.
|
||||||
@retval EFI_NO_MEDIA There is no media in the device.
|
@retval EFI_NO_MEDIA There is no media in the device.
|
||||||
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
|
@retval EFI_MEDIA_CHANGED The MediaId does not match the current device.
|
||||||
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.
|
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.
|
||||||
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
|
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
|
||||||
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
|
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
|
||||||
@ -477,7 +477,7 @@ EmuBlockIoWriteBlocks (
|
|||||||
Done:
|
Done:
|
||||||
if (Token != NULL) {
|
if (Token != NULL) {
|
||||||
if (Token->Event != NULL) {
|
if (Token->Event != NULL) {
|
||||||
// Caller is responcible for signaling EFI Event
|
// Caller is responsible for signaling EFI Event
|
||||||
Token->TransactionStatus = Status;
|
Token->TransactionStatus = Status;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -500,7 +500,7 @@ Done:
|
|||||||
@retval EFI_SUCCESS The flush request was queued if Event is not NULL.
|
@retval EFI_SUCCESS The flush request was queued if Event is not NULL.
|
||||||
All outstanding data was written correctly to the
|
All outstanding data was written correctly to the
|
||||||
device if the Event is NULL.
|
device if the Event is NULL.
|
||||||
@retval EFI_DEVICE_ERROR The device reported an error while writting back
|
@retval EFI_DEVICE_ERROR The device reported an error while writing back
|
||||||
the data.
|
the data.
|
||||||
@retval EFI_WRITE_PROTECTED The device cannot be written to.
|
@retval EFI_WRITE_PROTECTED The device cannot be written to.
|
||||||
@retval EFI_NO_MEDIA There is no media in the device.
|
@retval EFI_NO_MEDIA There is no media in the device.
|
||||||
@ -529,7 +529,7 @@ EmuBlockIoFlushBlocks (
|
|||||||
|
|
||||||
if (Token != NULL) {
|
if (Token != NULL) {
|
||||||
if (Token->Event != NULL) {
|
if (Token->Event != NULL) {
|
||||||
// Caller is responcible for signaling EFI Event
|
// Caller is responsible for signaling EFI Event
|
||||||
Token->TransactionStatus = EFI_SUCCESS;
|
Token->TransactionStatus = EFI_SUCCESS;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -544,7 +544,7 @@ EmuBlockIoFlushBlocks (
|
|||||||
|
|
||||||
@param[in] This Indicates a pointer to the calling context.
|
@param[in] This Indicates a pointer to the calling context.
|
||||||
@param[in] ExtendedVerification Indicates that the driver may perform a more
|
@param[in] ExtendedVerification Indicates that the driver may perform a more
|
||||||
exhausive verfication operation of the device
|
exhaustive verification operation of the device
|
||||||
during reset.
|
during reset.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was reset.
|
@retval EFI_SUCCESS The device was reset.
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
The mUnixThunkTable exists so that a change to EFI_EMU_THUNK_PROTOCOL
|
The mUnixThunkTable exists so that a change to EFI_EMU_THUNK_PROTOCOL
|
||||||
will cause an error in initializing the array if all the member functions
|
will cause an error in initializing the array if all the member functions
|
||||||
are not added. It looks like adding a element to end and not initializing
|
are not added. It looks like adding a element to end and not initializing
|
||||||
it may cause the table to be initaliized with the members at the end being
|
it may cause the table to be initialized with the members at the end being
|
||||||
set to zero. This is bad as jumping to zero will crash.
|
set to zero. This is bad as jumping to zero will crash.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
|
@ -38,7 +38,7 @@ UINTN gFdInfoCount = 0;
|
|||||||
EMU_FD_INFO *gFdInfo;
|
EMU_FD_INFO *gFdInfo;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Array that supports seperate memory rantes.
|
// Array that supports separate memory ranges.
|
||||||
// The memory ranges are set in system.cmd via the EFI_MEMORY_SIZE variable.
|
// The memory ranges are set in system.cmd via the EFI_MEMORY_SIZE variable.
|
||||||
// The number of array elements is allocated base on parsing
|
// The number of array elements is allocated base on parsing
|
||||||
// EFI_MEMORY_SIZE and the memory is never freed.
|
// EFI_MEMORY_SIZE and the memory is never freed.
|
||||||
@ -379,7 +379,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The file was opened and mapped.
|
EFI_SUCCESS - The file was opened and mapped.
|
||||||
EFI_NOT_FOUND - FileName was not found in the current directory
|
EFI_NOT_FOUND - FileName was not found in the current directory
|
||||||
EFI_DEVICE_ERROR - An error occured attempting to map the opened file
|
EFI_DEVICE_ERROR - An error occurred attempting to map the opened file
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -523,7 +523,7 @@ Arguments:
|
|||||||
PeiCorePe32File - SEC PE32
|
PeiCorePe32File - SEC PE32
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Success means control is transfered and thus we should never return
|
Success means control is transferred and thus we should never return
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -611,7 +611,7 @@ Routine Description:
|
|||||||
It allows discontinuous memory regions to be supported by the emulator.
|
It allows discontinuous memory regions to be supported by the emulator.
|
||||||
It uses gSystemMemory[] and gSystemMemoryCount that were created by
|
It uses gSystemMemory[] and gSystemMemoryCount that were created by
|
||||||
parsing the host environment variable EFI_MEMORY_SIZE.
|
parsing the host environment variable EFI_MEMORY_SIZE.
|
||||||
The size comes from the varaible and the address comes from the call to
|
The size comes from the variable and the address comes from the call to
|
||||||
UnixOpenFile.
|
UnixOpenFile.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
@ -661,7 +661,7 @@ Routine Description:
|
|||||||
|
|
||||||
This is all of GCD for system memory passed to DXE Core. FV
|
This is all of GCD for system memory passed to DXE Core. FV
|
||||||
mapping and other device mapped into system memory are not
|
mapping and other device mapped into system memory are not
|
||||||
inlcuded in the check.
|
included in the check.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
Index - Which memory region to use
|
Index - Which memory region to use
|
||||||
@ -775,7 +775,7 @@ SecPeCoffGetEntryPoint (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Return the FD Size and base address. Since the FD is loaded from a
|
Return the FD Size and base address. Since the FD is loaded from a
|
||||||
file into host memory only the SEC will know it's address.
|
file into host memory only the SEC will know its address.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
Index - Which FD, starts at zero.
|
Index - Which FD, starts at zero.
|
||||||
@ -898,7 +898,7 @@ Routine Description:
|
|||||||
The ModHandle is needed to unload the image.
|
The ModHandle is needed to unload the image.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
ImageContext - Input data returned from PE Laoder Library. Used to find the
|
ImageContext - Input data returned from PE Loader Library. Used to find the
|
||||||
.PDB file name of the PE Image.
|
.PDB file name of the PE Image.
|
||||||
ModHandle - Returned from LoadLibraryEx() and stored for call to
|
ModHandle - Returned from LoadLibraryEx() and stored for call to
|
||||||
FreeLibrary().
|
FreeLibrary().
|
||||||
@ -922,7 +922,7 @@ AddHandle (
|
|||||||
for (Index = 0; Index < mImageContextModHandleArraySize; Index++, Array++) {
|
for (Index = 0; Index < mImageContextModHandleArraySize; Index++, Array++) {
|
||||||
if (Array->ImageContext == NULL) {
|
if (Array->ImageContext == NULL) {
|
||||||
//
|
//
|
||||||
// Make a copy of the stirng and store the ModHandle
|
// Make a copy of the string and store the ModHandle
|
||||||
//
|
//
|
||||||
Array->ImageContext = ImageContext;
|
Array->ImageContext = ImageContext;
|
||||||
Array->ModHandle = ModHandle;
|
Array->ModHandle = ModHandle;
|
||||||
@ -933,7 +933,7 @@ AddHandle (
|
|||||||
//
|
//
|
||||||
// No free space in mImageContextModHandleArray so grow it by
|
// No free space in mImageContextModHandleArray so grow it by
|
||||||
// IMAGE_CONTEXT_TO_MOD_HANDLE entires. realloc will
|
// IMAGE_CONTEXT_TO_MOD_HANDLE entires. realloc will
|
||||||
// copy the old values to the new locaiton. But it does
|
// copy the old values to the new location. But it does
|
||||||
// not zero the new memory area.
|
// not zero the new memory area.
|
||||||
//
|
//
|
||||||
PreviousSize = mImageContextModHandleArraySize * sizeof (IMAGE_CONTEXT_TO_MOD_HANDLE);
|
PreviousSize = mImageContextModHandleArraySize * sizeof (IMAGE_CONTEXT_TO_MOD_HANDLE);
|
||||||
@ -961,11 +961,11 @@ Routine Description:
|
|||||||
Return the ModHandle and delete the entry in the array.
|
Return the ModHandle and delete the entry in the array.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
ImageContext - Input data returned from PE Laoder Library. Used to find the
|
ImageContext - Input data returned from PE Loader Library. Used to find the
|
||||||
.PDB file name of the PE Image.
|
.PDB file name of the PE Image.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
ModHandle - ModHandle assoicated with ImageContext is returned
|
ModHandle - ModHandle associated with ImageContext is returned
|
||||||
NULL - No ModHandle associated with ImageContext
|
NULL - No ModHandle associated with ImageContext
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -1129,7 +1129,7 @@ SecGdbScriptBreak (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Adds the image to a gdb script so it's symbols can be loaded.
|
Adds the image to a gdb script so its symbols can be loaded.
|
||||||
The AddFirmwareSymbolFile helper macro is used.
|
The AddFirmwareSymbolFile helper macro is used.
|
||||||
|
|
||||||
@param ImageContext The PE/COFF image context
|
@param ImageContext The PE/COFF image context
|
||||||
@ -1202,7 +1202,7 @@ SecPeCoffRelocateImageExtraAction (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Adds the image to a gdb script so it's symbols can be unloaded.
|
Adds the image to a gdb script so its symbols can be unloaded.
|
||||||
The RemoveFirmwareSymbolFile helper macro is used.
|
The RemoveFirmwareSymbolFile helper macro is used.
|
||||||
|
|
||||||
@param ImageContext The PE/COFF image context
|
@param ImageContext The PE/COFF image context
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
is just a template that needs to get filled in.
|
is just a template that needs to get filled in.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||||
Portitions copyright (c) 2011, Apple Inc. All rights reserved.
|
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ PthreadCreate (
|
|||||||
EnabledOnEntry = FALSE;
|
EnabledOnEntry = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Aquire lock for global, SecFakePthreadStart runs in a different thread.
|
// Acquire lock for global, SecFakePthreadStart runs in a different thread.
|
||||||
pthread_mutex_lock (&mThreadMangle.Mutex);
|
pthread_mutex_lock (&mThreadMangle.Mutex);
|
||||||
mThreadMangle.Start = Start;
|
mThreadMangle.Start = Start;
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
//
|
//
|
||||||
// Gaskets are EFI ABI to UNIX ABI calls
|
// Gaskets are EFI ABI to UNIX ABI calls
|
||||||
// EFI ABI code will sub 40 (0x28) from %rsp before calling a function
|
// EFI ABI code will sub 40 (0x28) from %rsp before calling a function
|
||||||
// This is the 32 (0x20) byte to spill registers and 8 bytes to align stack on 16 byte boundry.
|
// This is the 32 (0x20) byte to spill registers and 8 bytes to align stack on 16 byte boundary.
|
||||||
//
|
//
|
||||||
.text
|
.text
|
||||||
|
|
||||||
// 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundry
|
// 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundary
|
||||||
// Any call with 0 - 4 arguments allocates 40 bytes on the stack.
|
// Any call with 0 - 4 arguments allocates 40 bytes on the stack.
|
||||||
// For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56,
|
// For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56,
|
||||||
// 7 or 8 args is 72, and 9 or 10 args is 88
|
// 7 or 8 args is 72, and 9 or 10 args is 88
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||||
# Portitions copyright (c) 2011, Apple Inc. All rights reserved.
|
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright 2014 Apple Inc. All righes reserved.
|
# Copyright 2014 Apple Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
#
|
#
|
||||||
@ -278,7 +278,7 @@ def EFI_DEVICE_PATH_PROTOCOL_TypeSummary (valobj,internal_dict):
|
|||||||
|
|
||||||
Address = long ("%d" % valobj.addr)
|
Address = long ("%d" % valobj.addr)
|
||||||
if (Address == lldb.LLDB_INVALID_ADDRESS):
|
if (Address == lldb.LLDB_INVALID_ADDRESS):
|
||||||
# Need to reserach this, it seems to be the nested struct case
|
# Need to research this, it seems to be the nested struct case
|
||||||
ExprStr = ""
|
ExprStr = ""
|
||||||
elif (Type & 0x7f == 0x7f):
|
elif (Type & 0x7f == 0x7f):
|
||||||
ExprStr = "End Device Path" if SubType == 0xff else "End This Instance"
|
ExprStr = "End Device Path" if SubType == 0xff else "End This Instance"
|
||||||
@ -304,7 +304,7 @@ def EFI_DEVICE_PATH_PROTOCOL_TypeSummary (valobj,internal_dict):
|
|||||||
|
|
||||||
def TypePrintFormating(debugger):
|
def TypePrintFormating(debugger):
|
||||||
#
|
#
|
||||||
# Set the default print formating for EFI types in lldb.
|
# Set the default print formatting for EFI types in lldb.
|
||||||
# seems lldb defaults to decimal.
|
# seems lldb defaults to decimal.
|
||||||
#
|
#
|
||||||
category = debugger.GetDefaultCategory()
|
category = debugger.GetDefaultCategory()
|
||||||
@ -390,7 +390,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dict):
|
|||||||
FileName = frame.thread.process.ReadCStringFromMemory (FileNamePtr, FileNameLen, Error)
|
FileName = frame.thread.process.ReadCStringFromMemory (FileNamePtr, FileNameLen, Error)
|
||||||
if not Error.Success():
|
if not Error.Success():
|
||||||
print "!ReadCStringFromMemory() did not find a %d byte C string at %x" % (FileNameLen, FileNamePtr)
|
print "!ReadCStringFromMemory() did not find a %d byte C string at %x" % (FileNameLen, FileNamePtr)
|
||||||
# make breakpoint command contiue
|
# make breakpoint command continue
|
||||||
return False
|
return False
|
||||||
|
|
||||||
debugger = frame.thread.process.target.debugger
|
debugger = frame.thread.process.target.debugger
|
||||||
@ -410,12 +410,12 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dict):
|
|||||||
if not target.RemoveModule (SBModule):
|
if not target.RemoveModule (SBModule):
|
||||||
print "!lldb.target.RemoveModule (%s) FAILED" % SBModule
|
print "!lldb.target.RemoveModule (%s) FAILED" % SBModule
|
||||||
|
|
||||||
# make breakpoint command contiue
|
# make breakpoint command continue
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def GuidToCStructStr (guid, Name=False):
|
def GuidToCStructStr (guid, Name=False):
|
||||||
#
|
#
|
||||||
# Convert a 16-byte bytesarry (or bytearray compat object) to C guid string
|
# Convert a 16-byte bytesarray (or bytearray compat object) to C guid string
|
||||||
# { 0xB402621F, 0xA940, 0x1E4A, { 0x86, 0x6B, 0x4D, 0xC9, 0x16, 0x2B, 0x34, 0x7C } }
|
# { 0xB402621F, 0xA940, 0x1E4A, { 0x86, 0x6B, 0x4D, 0xC9, 0x16, 0x2B, 0x34, 0x7C } }
|
||||||
#
|
#
|
||||||
# Name=True means lookup name in GuidNameDict and us it if you find it
|
# Name=True means lookup name in GuidNameDict and us it if you find it
|
||||||
@ -522,7 +522,7 @@ def __lldb_init_module (debugger, internal_dict):
|
|||||||
if len(data) >= 2:
|
if len(data) >= 2:
|
||||||
guid_dict[data[0].upper()] = data[1].strip('\n')
|
guid_dict[data[0].upper()] = data[1].strip('\n')
|
||||||
|
|
||||||
# init EFI specific type formaters
|
# init EFI specific type formatters
|
||||||
TypePrintFormating (debugger)
|
TypePrintFormating (debugger)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user