Date   

[PATCH v2 05/78] EmulatorPkg/Unix: Fix various typos

Philippe Mathieu-Daudé <philmd@...>
 

From: Antoine Coeur <coeur@...>

Fix various typos in comments and documentation.

Cc: Jordan Justen <jordan.l.justen@...>
Cc: Andrew Fish <afish@...>
Cc: Ray Ni <ray.ni@...>
Signed-off-by: Antoine Coeur <coeur@...>
Reviewed-by: Philippe Mathieu-Daude <philmd@...>
Reviewed-by: Ray Ni <ray.ni@...>
Signed-off-by: Philippe Mathieu-Daude <philmd@...>
---
EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c | 2 +-
EmulatorPkg/Unix/Host/BlockIo.c | 12 ++++-----
EmulatorPkg/Unix/Host/EmuThunk.c | 2 +-
EmulatorPkg/Unix/Host/Host.c | 26 ++++++++++----------
EmulatorPkg/Unix/Host/LinuxPacketFilter.c | 2 +-
EmulatorPkg/Unix/Host/Pthreads.c | 2 +-
EmulatorPkg/Unix/GdbRun.sh | 4 +--
EmulatorPkg/Unix/Host/X64/Gasket.S | 4 +--
EmulatorPkg/Unix/Host/X64/SwitchStack.S | 2 +-
EmulatorPkg/Unix/lldbefi.py | 14 +++++------
10 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c b/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
index 3013bbc86b27..441f1e8d0afe 100644
--- a/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
+++ b/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
@@ -5,7 +5,7 @@
Tested on Mac OS X.

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

diff --git a/EmulatorPkg/Unix/Host/BlockIo.c b/EmulatorPkg/Unix/Host/BlockIo.c
index 07e39347e42b..18368060d59a 100644
--- a/EmulatorPkg/Unix/Host/BlockIo.c
+++ b/EmulatorPkg/Unix/Host/BlockIo.c
@@ -398,7 +398,7 @@ EmuBlockIoReadBlocks (
Done:
if (Token != NULL) {
if (Token->Event != NULL) {
- // Caller is responcible for signaling EFI Event
+ // Caller is responsible for signaling EFI Event
Token->TransactionStatus = Status;
return EFI_SUCCESS;
}
@@ -429,7 +429,7 @@ Done:
the Event is NULL.
@retval EFI_WRITE_PROTECTED The device can not be written to.
@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_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,
@@ -477,7 +477,7 @@ EmuBlockIoWriteBlocks (
Done:
if (Token != NULL) {
if (Token->Event != NULL) {
- // Caller is responcible for signaling EFI Event
+ // Caller is responsible for signaling EFI Event
Token->TransactionStatus = Status;
return EFI_SUCCESS;
}
@@ -500,7 +500,7 @@ Done:
@retval EFI_SUCCESS The flush request was queued if Event is not NULL.
All outstanding data was written correctly to the
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.
@retval EFI_WRITE_PROTECTED The device cannot be written to.
@retval EFI_NO_MEDIA There is no media in the device.
@@ -529,7 +529,7 @@ EmuBlockIoFlushBlocks (

if (Token != NULL) {
if (Token->Event != NULL) {
- // Caller is responcible for signaling EFI Event
+ // Caller is responsible for signaling EFI Event
Token->TransactionStatus = EFI_SUCCESS;
return EFI_SUCCESS;
}
@@ -544,7 +544,7 @@ EmuBlockIoFlushBlocks (

@param[in] This Indicates a pointer to the calling context.
@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.

@retval EFI_SUCCESS The device was reset.
diff --git a/EmulatorPkg/Unix/Host/EmuThunk.c b/EmulatorPkg/Unix/Host/EmuThunk.c
index 1e9dc99187db..b8b0651c6ab0 100644
--- a/EmulatorPkg/Unix/Host/EmuThunk.c
+++ b/EmulatorPkg/Unix/Host/EmuThunk.c
@@ -6,7 +6,7 @@
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
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.

Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
diff --git a/EmulatorPkg/Unix/Host/Host.c b/EmulatorPkg/Unix/Host/Host.c
index b431a4c2ed39..b4e5510613c8 100644
--- a/EmulatorPkg/Unix/Host/Host.c
+++ b/EmulatorPkg/Unix/Host/Host.c
@@ -38,7 +38,7 @@ UINTN gFdInfoCount = 0;
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 number of array elements is allocated base on parsing
// EFI_MEMORY_SIZE and the memory is never freed.
@@ -379,7 +379,7 @@ Arguments:
Returns:
EFI_SUCCESS - The file was opened and mapped.
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
@@ -523,7 +523,7 @@ Arguments:
PeiCorePe32File - SEC PE32

Returns:
- Success means control is transfered and thus we should never return
+ Success means control is transferred and thus we should never return

**/
VOID
@@ -611,7 +611,7 @@ Routine Description:
It allows discontinuous memory regions to be supported by the emulator.
It uses gSystemMemory[] and gSystemMemoryCount that were created by
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.

Arguments:
@@ -661,7 +661,7 @@ Routine Description:

This is all of GCD for system memory passed to DXE Core. FV
mapping and other device mapped into system memory are not
- inlcuded in the check.
+ included in the check.

Arguments:
Index - Which memory region to use
@@ -775,7 +775,7 @@ SecPeCoffGetEntryPoint (

Routine Description:
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:
Index - Which FD, starts at zero.
@@ -898,7 +898,7 @@ Routine Description:
The ModHandle is needed to unload the image.

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.
ModHandle - Returned from LoadLibraryEx() and stored for call to
FreeLibrary().
@@ -922,7 +922,7 @@ AddHandle (
for (Index = 0; Index < mImageContextModHandleArraySize; Index++, Array++) {
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->ModHandle = ModHandle;
@@ -933,7 +933,7 @@ AddHandle (
//
// No free space in mImageContextModHandleArray so grow it by
// 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.
//
PreviousSize = mImageContextModHandleArraySize * sizeof (IMAGE_CONTEXT_TO_MOD_HANDLE);
@@ -961,11 +961,11 @@ Routine Description:
Return the ModHandle and delete the entry in the array.

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.

Returns:
- ModHandle - ModHandle assoicated with ImageContext is returned
+ ModHandle - ModHandle associated with ImageContext is returned
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.

@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.

@param ImageContext The PE/COFF image context
diff --git a/EmulatorPkg/Unix/Host/LinuxPacketFilter.c b/EmulatorPkg/Unix/Host/LinuxPacketFilter.c
index a8028d18ff56..2b772ab884c2 100644
--- a/EmulatorPkg/Unix/Host/LinuxPacketFilter.c
+++ b/EmulatorPkg/Unix/Host/LinuxPacketFilter.c
@@ -6,7 +6,7 @@
is just a template that needs to get filled in.

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

diff --git a/EmulatorPkg/Unix/Host/Pthreads.c b/EmulatorPkg/Unix/Host/Pthreads.c
index f07bcfce66f3..025687c356fd 100644
--- a/EmulatorPkg/Unix/Host/Pthreads.c
+++ b/EmulatorPkg/Unix/Host/Pthreads.c
@@ -133,7 +133,7 @@ PthreadCreate (
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);
mThreadMangle.Start = Start;

diff --git a/EmulatorPkg/Unix/GdbRun.sh b/EmulatorPkg/Unix/GdbRun.sh
index 8c761ff2c9b5..b050ad5e2c5c 100644
--- a/EmulatorPkg/Unix/GdbRun.sh
+++ b/EmulatorPkg/Unix/GdbRun.sh
@@ -62,8 +62,8 @@ define RemoveFirmwareSymbolFile
end

if gInXcode == 1
- # in Xcode the program is already runing. Issuing a run command
- # will cause a fatal debugger error. The break point sciprt that
+ # in Xcode the program is already running. Issuing a run command
+ # will cause a fatal debugger error. The break point script that
# is used to source this script sets gInCode to 1.
else
#
diff --git a/EmulatorPkg/Unix/Host/X64/Gasket.S b/EmulatorPkg/Unix/Host/X64/Gasket.S
index a9ca707562f9..030faa8e4c36 100644
--- a/EmulatorPkg/Unix/Host/X64/Gasket.S
+++ b/EmulatorPkg/Unix/Host/X64/Gasket.S
@@ -15,11 +15,11 @@
//
// Gaskets are EFI ABI to UNIX ABI calls
// 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

-// 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.
// 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
diff --git a/EmulatorPkg/Unix/Host/X64/SwitchStack.S b/EmulatorPkg/Unix/Host/X64/SwitchStack.S
index 4126cc99124a..36838bf29efb 100644
--- a/EmulatorPkg/Unix/Host/X64/SwitchStack.S
+++ b/EmulatorPkg/Unix/Host/X64/SwitchStack.S
@@ -1,7 +1,7 @@
#------------------------------------------------------------------------------
#
# 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
#
#------------------------------------------------------------------------------
diff --git a/EmulatorPkg/Unix/lldbefi.py b/EmulatorPkg/Unix/lldbefi.py
index 7f99a7f83fcc..c3fb2675cbc1 100755
--- a/EmulatorPkg/Unix/lldbefi.py
+++ b/EmulatorPkg/Unix/lldbefi.py
@@ -1,7 +1,7 @@
#!/usr/bin/python

#
-# Copyright 2014 Apple Inc. All righes reserved.
+# Copyright 2014 Apple Inc. All rights reserved.
#
# 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)
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 = ""
elif (Type & 0x7f == 0x7f):
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):
#
- # 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.
#
category = debugger.GetDefaultCategory()
@@ -390,7 +390,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dict):
FileName = frame.thread.process.ReadCStringFromMemory (FileNamePtr, FileNameLen, Error)
if not Error.Success():
print "!ReadCStringFromMemory() did not find a %d byte C string at %x" % (FileNameLen, FileNamePtr)
- # make breakpoint command contiue
+ # make breakpoint command continue
return False

debugger = frame.thread.process.target.debugger
@@ -410,12 +410,12 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dict):
if not target.RemoveModule (SBModule):
print "!lldb.target.RemoveModule (%s) FAILED" % SBModule

- # make breakpoint command contiue
+ # make breakpoint command continue
return 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 } }
#
# 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:
guid_dict[data[0].upper()] = data[1].strip('\n')

- # init EFI specific type formaters
+ # init EFI specific type formatters
TypePrintFormating (debugger)


--
2.21.0


[PATCH v2 03/78] EmbeddedPkg/VirtualKeyboard: Fix few typos

Philippe Mathieu-Daudé <philmd@...>
 

From: Antoine Coeur <coeur@...>

Fix few typos in the documentation.

Cc: Leif Lindholm <leif.lindholm@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>
Signed-off-by: Antoine Coeur <coeur@...>
Reviewed-by: Philippe Mathieu-Daude <philmd@...>
Signed-off-by: Philippe Mathieu-Daude <philmd@...>
---
.../Drivers/VirtualKeyboardDxe/VirtualKeyboard.h | 14 +++++++-------
.../Drivers/VirtualKeyboardDxe/VirtualKeyboard.c | 16 ++++++++--------
2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.h b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.h
index 29bc7a06fb16..026449046653 100644
--- a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.h
+++ b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.h
@@ -323,7 +323,7 @@ VirtualKeyboardReset (
);

/**
- Reset the input device and optionaly run diagnostics
+ Reset the input device and optionally run diagnostics

@param This Protocol instance pointer.
@param ExtendedVerification Driver may perform diagnostics on reset.
@@ -373,7 +373,7 @@ VirtualKeyboardSetState (


@retval EFI_SUCCESS The notification function was registered successfully.
- @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data structures.
+ @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necessary data structures.
@retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.

**/
@@ -429,7 +429,7 @@ VirtualKeyboardFreeNotifyList (
state data for the key that was pressed.

@retval TRUE Key be pressed matches a registered key.
- @retval FLASE Match failed.
+ @retval FALSE Match failed.

**/
BOOLEAN
@@ -441,7 +441,7 @@ IsKeyRegistered (
/**
Waiting on the keyboard event, if there's any key pressed by the user, signal the event

- @param Event The event that be siganlled when any key has been stroked.
+ @param Event The event that be signalled when any key has been stroked.
@param Context Pointer of the protocol EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

**/
@@ -455,7 +455,7 @@ VirtualKeyboardWaitForKey (
/**
Waiting on the keyboard event, if there's any key pressed by the user, signal the event

- @param Event The event that be siganlled when any key has been stroked.
+ @param Event The event that be signalled when any key has been stroked.
@param Context Pointer of the protocol EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.

**/
@@ -514,14 +514,14 @@ VirtualKeyboardReadKeyStroke (

/**
Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
+ be used to test for existence of a keystroke via WaitForEvent () call.

@param This Protocol instance pointer.
@param KeyData A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.

@retval EFI_SUCCESS The keystroke information was returned.
- @retval EFI_NOT_READY There was no keystroke data availiable.
+ @retval EFI_NOT_READY There was no keystroke data available.
@retval EFI_DEVICE_ERROR The keystroke information was not returned due to
hardware errors.
@retval EFI_INVALID_PARAMETER KeyData is NULL.
diff --git a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c
index 750371a06723..e9d0b72ee6c3 100644
--- a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c
+++ b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c
@@ -437,7 +437,7 @@ VirtualKeyboardFreeNotifyList (
pressed.

@retval TRUE Key be pressed matches a registered key.
- @retval FLASE Match failed.
+ @retval FALSE Match failed.

**/
BOOLEAN
@@ -476,7 +476,7 @@ IsKeyRegistered (
Signal the event if there is key available

@param Event the event object
- @param Context waitting context
+ @param Context waiting context

**/
VOID
@@ -580,7 +580,7 @@ VirtualKeyboardReset (
}

/**
- Reset the input device and optionaly run diagnostics
+ Reset the input device and optionally run diagnostics

@param This Protocol instance pointer.
@param ExtendedVerification Driver may perform diagnostics on reset.
@@ -621,7 +621,7 @@ VirtualKeyboardResetEx (

/**
Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
+ be used to test for existence of a keystroke via WaitForEvent () call.

@param VirtualKeyboardPrivate Virtualkeyboard driver private structure.
@param KeyData A pointer to a buffer that is filled in
@@ -629,7 +629,7 @@ VirtualKeyboardResetEx (
that was pressed.

@retval EFI_SUCCESS The keystroke information was returned.
- @retval EFI_NOT_READY There was no keystroke data availiable.
+ @retval EFI_NOT_READY There was no keystroke data available.
@retval EFI_DEVICE_ERROR The keystroke information was not returned
due to hardware errors.
@retval EFI_INVALID_PARAMETER KeyData is NULL.
@@ -731,14 +731,14 @@ VirtualKeyboardReadKeyStroke (

/**
Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
+ be used to test for existence of a keystroke via WaitForEvent () call.

@param This Protocol instance pointer.
@param KeyData A pointer to a buffer that is filled in with the
keystroke state data for the key that was pressed.

@retval EFI_SUCCESS The keystroke information was returned.
- @retval EFI_NOT_READY There was no keystroke data availiable.
+ @retval EFI_NOT_READY There was no keystroke data available.
@retval EFI_DEVICE_ERROR The keystroke information was not returned
due to hardware errors.
@retval EFI_INVALID_PARAMETER KeyData is NULL.
@@ -808,7 +808,7 @@ VirtualKeyboardSetState (

@retval EFI_SUCCESS The notification function was registered
successfully.
- @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary
+ @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necessary
data structures.
@retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.

--
2.21.0


[PATCH v2 02/78] EmbeddedPkg/VirtualKeyboard: Fix a typo in EFI_INVALID_PARAMETER

Philippe Mathieu-Daudé <philmd@...>
 

Correctly write 'EFI_INVALID_PARAMETER' in documentation.

Cc: Leif Lindholm <leif.lindholm@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>
Signed-off-by: Philippe Mathieu-Daude <philmd@...>
---
.../VirtualKeyboardDxe/VirtualKeyboard.h | 22 +++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.h b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.h
index 8757b678d161..29bc7a06fb16 100644
--- a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.h
+++ b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.h
@@ -206,9 +206,9 @@ VirtualKeyboardDriverBindingStop (
This and the language specified by Language was
returned in DriverName.

- @retval EFI_INVALID_PAVIRTUALETER Language is NULL.
+ @retval EFI_INVALID_PARAMETER Language is NULL.

- @retval EFI_INVALID_PAVIRTUALETER DriverName is NULL.
+ @retval EFI_INVALID_PARAMETER DriverName is NULL.

@retval EFI_UNSUPPORTED The driver specified by This does not support
the language specified by Language.
@@ -274,14 +274,14 @@ VirtualKeyboardComponentNameGetDriverName (
driver specified by This was returned in
DriverName.

- @retval EFI_INVALID_PAVIRTUALETER ControllerHandle is NULL.
+ @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.

- @retval EFI_INVALID_PAVIRTUALETER ChildHandle is not NULL and it is not a valid
+ @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
EFI_HANDLE.

- @retval EFI_INVALID_PAVIRTUALETER Language is NULL.
+ @retval EFI_INVALID_PARAMETER Language is NULL.

- @retval EFI_INVALID_PAVIRTUALETER ControllerName is NULL.
+ @retval EFI_INVALID_PARAMETER ControllerName is NULL.

@retval EFI_UNSUPPORTED The driver specified by This is not currently
managing the controller specified by
@@ -351,7 +351,7 @@ VirtualKeyboardResetEx (
@retval EFI_DEVICE_ERROR The device is not functioning correctly and could
not have the setting adjusted.
@retval EFI_UNSUPPORTED The device does not have the ability to set its state.
- @retval EFI_INVALID_PAVIRTUALETER KeyToggleState is NULL.
+ @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.

**/
EFI_STATUS
@@ -374,7 +374,7 @@ VirtualKeyboardSetState (

@retval EFI_SUCCESS The notification function was registered successfully.
@retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data structures.
- @retval EFI_INVALID_PAVIRTUALETER KeyData or NotifyHandle is NULL.
+ @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.

**/
EFI_STATUS
@@ -393,7 +393,7 @@ VirtualKeyboardRegisterKeyNotify (
@param NotificationHandle The handle of the notification function being unregistered.

@retval EFI_SUCCESS The notification function was unregistered successfully.
- @retval EFI_INVALID_PAVIRTUALETER The NotificationHandle is invalid.
+ @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.

**/
EFI_STATUS
@@ -412,7 +412,7 @@ VirtualKeyboardUnregisterKeyNotify (
@param ListHead The list head

@retval EFI_SUCCESS Free the notify list successfully
- @retval EFI_INVALID_PAVIRTUALETER ListHead is invalid.
+ @retval EFI_INVALID_PARAMETER ListHead is invalid.

**/
EFI_STATUS
@@ -524,7 +524,7 @@ VirtualKeyboardReadKeyStroke (
@retval EFI_NOT_READY There was no keystroke data availiable.
@retval EFI_DEVICE_ERROR The keystroke information was not returned due to
hardware errors.
- @retval EFI_INVALID_PAVIRTUALETER KeyData is NULL.
+ @retval EFI_INVALID_PARAMETER KeyData is NULL.

**/
EFI_STATUS
--
2.21.0


[PATCH v2 00/78] Fix a bunch of typos (part 1)

Philippe Mathieu-Daudé <philmd@...>
 

Around February of this year, Antoine posted various patches fixing
a huge quantity of typos, over 8000+ lines (such [1]).

This series salvages a third of his work.
I recommend to review the patches with using the '--word-diff=color'
git option.

Since v1 [2]:
- Addressed review comments from
. Laszlo Ersek
. David Woodhouse
. Maciej Rabeda
- Added Antoine S-o-b (see [3] and [4])

You can fetch the series here:
https://gitlab.com/philmd/edk2/commits/typos-part1-v2

Regards,

Phil.

[1] https://edk2.groups.io/g/devel/message/43043
[2] https://edk2.groups.io/g/devel/message/51606
[3] https://edk2.groups.io/g/devel/topic/65782892#52057
[4] https://edk2.groups.io/g/devel/message/52069

Cc: coeur@...
Cc: liming.gao@...

Antoine Coeur (70):
CryptoPkg/OpensslLib: Fix few typos
EmbeddedPkg/VirtualKeyboard: Fix few typos
EmulatorPkg/Sec: Fix various typos
EmulatorPkg/Unix: Fix various typos
EmulatorPkg/Win: Fix various typos
FatPkg/EnhancedFatDxe: Fix various typos
FatPkg/FatPei: Fix few typos
MdeModulePkg/Application: Improve French translation
MdeModulePkg/Application: Fix various typos
MdeModulePkg/Bus/Ata: Fix various typos
MdeModulePkg/Bus/I2c: Fix few typos
MdeModulePkg/Bus/Isa: Fix various typos
MdeModulePkg/Bus/Scsi: Fix various typos
MdeModulePkg/Bus/Sd: Fix various typos
MdeModulePkg/Core/Pei: Fix various typos
MdeModulePkg/Core/PiSmmCore: Fix various typos
MdeModulePkg/UsbMass: Fix various typos
MdeModulePkg/UsbMouse: Fix few typos
MdeModulePkg/UsbBus: Fix various typos
MdeModulePkg/Usb: Fix various typos
MdePkg/IndustryStandard: Fix various typos
MdePkg/Library/Dxe: Fix various typos
MdePkg/Library/Pci: Fix various typos
MdePkg/Library/Smm: Fix various typos
MdePkg/Ppi: Fix various typos
MdePkg/Register: Fix various typos
NetworkPkg/ArpDxe: Fix various typos
NetworkPkg/Dhcp4Dxe: Fix various typos
NetworkPkg/Dhcp6Dxe: Fix various typos
NetworkPkg/DnsDxe: Fix various typos
NetworkPkg/DpcDxe: Fix few typos
NetworkPkg/HttpBootDxe: Fix various typos
NetworkPkg/HttpDxe: Fix various typos
NetworkPkg/Ip4Dxe: Fix various typos
NetworkPkg/Ip6Dxe: Fix various typos
NetworkPkg/IScsiDxe: Fix various typos
NetworkPkg/Library: Fix various typos
NetworkPkg/MnpDxe: Fix various typos
NetworkPkg/Mtftp4Dxe: Fix various typos
NetworkPkg/Mtftp6Dxe: Fix various typos
NetworkPkg/SnpDxe: Fix few typos
NetworkPkg/TcpDxe/Sock: Fix few typos
NetworkPkg/TcpDxe/Tcp: Fix various typos
NetworkPkg/Tls: Fix few typos
NetworkPkg/Udp4Dxe: Fix various typos
NetworkPkg/Udp6Dxe: Fix various typos
NetworkPkg/UefiPxeBcDxe: Fix various typos
NetworkPkg/VlanConfigDxe: Fix few typos
OvmfPkg/Acpi: Fix few typos
OvmfPkg/Csm: Fix various typos
OvmfPkg/Qemu: Fix various typos
OvmfPkg/Virtio: Fix few typos
OvmfPkg/Xen: Fix various typos
PcAtChipsetPkg: Fix few typos
SecurityPkg: Fix few typos
SecurityPkg/Hash2DxeCrypto: Fix few typos
SecurityPkg/Library/Tpm: Fix various typos
SecurityPkg/Tcg: Fix various typos
SecurityPkg/VariableAuthenticated: Fix few typos
ShellPkg/Application: Fix various typos
ShellPkg/DynamicCommand: Fix various typos
SignedCapsulePkg: Fix various typos
SignedCapsulePkg/Universal: Fix various typos
SourceLevelDebugPkg/DebugAgent: Fix various typos
SourceLevelDebugPkg/DebugCommunicationLib: Fix various typos
SourceLevelDebugPkg: Fix few typos
StandaloneMmPkg: Fix few typos
UefiCpuPkg/CpuDxe: Fix few typos
UefiCpuPkg/PiSmm: Fix various typos
UefiCpuPkg/Smm: Fix various typos

Philippe Mathieu-Daude (8):
EmbeddedPkg/VirtualKeyboard: Fix a typo in EFI_INVALID_PARAMETER
MdeModulePkg/UsbBusDxe: Fix a typo
NetworkPkg: Fix a typo
NetworkPkg/DnsDxe: Fix a typo
NetworkPkg/HttpBootDxe: Fix a typo in variable name
OvmfPkg/Csm/LegacyBios: Fix a typo
OvmfPkg/Xen: Fix a typo
StandaloneMmPkg: Fix a typo

SignedCapsulePkg/SignedCapsulePkg.dec | 4 +-
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf | 2 +-
.../Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf | 2 +-
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf | 10 ++--
MdePkg/Library/DxePcdLib/DxePcdLib.inf | 2 +-
NetworkPkg/MnpDxe/MnpDxe.inf | 2 +-
.../LegacyBootMaintUiLib.inf | 2 +-
.../FvbServicesRuntimeDxe.inf | 4 +-
.../FvbServicesSmm.inf | 4 +-
SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf | 2 +-
.../PlatformSecureLibNull.inf | 2 +-
SecurityPkg/Tcg/TcgSmm/TcgSmm.inf | 2 +-
.../DebugCommunicationLibSerialPort.inf | 2 +-
.../StandaloneMmPeCoffExtraActionLib.inf | 2 +-
.../VirtualKeyboardDxe/VirtualKeyboard.h | 36 ++++++-------
EmulatorPkg/Sec/Sec.h | 4 +-
EmulatorPkg/Win/Host/WinGop.h | 2 +-
EmulatorPkg/Win/Host/WinHost.h | 2 +-
FatPkg/EnhancedFatDxe/Fat.h | 6 +--
FatPkg/FatPei/FatLitePeim.h | 2 +-
.../BootManagerMenuApp/BootManagerMenu.h | 2 +-
.../UiApp/FrontPageCustomizedUiSupport.h | 2 +-
MdeModulePkg/Bus/Ata/AhciPei/AhciPei.h | 4 +-
.../Bus/Ata/AtaAtapiPassThru/AhciMode.h | 4 +-
.../Ata/AtaAtapiPassThru/AtaAtapiPassThru.h | 4 +-
.../Bus/Ata/AtaAtapiPassThru/IdeMode.h | 2 +-
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h | 12 ++---
MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.h | 4 +-
.../Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h | 14 ++---
MdeModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.h | 2 +-
MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.h | 2 +-
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h | 4 +-
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h | 10 ++--
MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.h | 2 +-
MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.h | 6 +--
MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.h | 2 +-
MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.h | 6 +--
MdeModulePkg/Bus/Sd/SdDxe/SdDxe.h | 2 +-
MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.h | 2 +-
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h | 14 ++---
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h | 2 +-
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +-
MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h | 2 +-
MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h | 2 +-
MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h | 2 +-
MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h | 10 ++--
MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h | 2 +-
.../Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h | 4 +-
.../Bus/Usb/UsbMassStorageDxe/UsbMassBot.h | 4 +-
.../Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h | 2 +-
.../Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h | 2 +-
.../UsbMouseAbsolutePointer.h | 2 +-
MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h | 2 +-
MdeModulePkg/Core/Pei/PeiMain.h | 4 +-
MdeModulePkg/Core/PiSmmCore/HeapGuard.h | 2 +-
MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 12 ++---
.../Core/PiSmmCore/PiSmmCorePrivateData.h | 6 +--
MdePkg/Include/IndustryStandard/Acpi10.h | 4 +-
MdePkg/Include/IndustryStandard/Acpi20.h | 4 +-
MdePkg/Include/IndustryStandard/Acpi30.h | 4 +-
MdePkg/Include/IndustryStandard/Acpi40.h | 2 +-
MdePkg/Include/IndustryStandard/Acpi50.h | 6 +--
MdePkg/Include/IndustryStandard/Acpi51.h | 4 +-
MdePkg/Include/IndustryStandard/Acpi60.h | 4 +-
MdePkg/Include/IndustryStandard/Acpi61.h | 4 +-
MdePkg/Include/IndustryStandard/Acpi62.h | 8 +--
MdePkg/Include/IndustryStandard/Atapi.h | 40 +++++++-------
MdePkg/Include/IndustryStandard/ElTorito.h | 4 +-
MdePkg/Include/IndustryStandard/Emmc.h | 2 +-
.../IndustryStandard/IpmiNetFnBridge.h | 4 +-
MdePkg/Include/IndustryStandard/Nvme.h | 10 ++--
MdePkg/Include/IndustryStandard/Pci22.h | 20 +++----
MdePkg/Include/IndustryStandard/PeImage.h | 2 +-
MdePkg/Include/IndustryStandard/Scsi.h | 2 +-
MdePkg/Include/IndustryStandard/SmBus.h | 2 +-
MdePkg/Include/IndustryStandard/Tpm12.h | 2 +-
MdePkg/Include/Library/DxeServicesLib.h | 2 +-
MdePkg/Include/Library/PciCf8Lib.h | 4 +-
MdePkg/Include/Library/PciExpressLib.h | 4 +-
MdePkg/Include/Library/PciLib.h | 4 +-
MdePkg/Include/Library/PciSegmentLib.h | 4 +-
MdePkg/Include/Library/SmmLib.h | 4 +-
MdePkg/Include/Library/SmmMemLib.h | 4 +-
MdePkg/Include/Library/SmmPeriodicSmiLib.h | 6 +--
MdePkg/Include/Ppi/BlockIo.h | 4 +-
MdePkg/Include/Ppi/BlockIo2.h | 2 +-
MdePkg/Include/Ppi/Capsule.h | 2 +-
MdePkg/Include/Ppi/Decompress.h | 2 +-
MdePkg/Include/Ppi/DeviceRecoveryModule.h | 2 +-
MdePkg/Include/Ppi/IsaHc.h | 2 +-
MdePkg/Include/Ppi/MpServices.h | 2 +-
MdePkg/Include/Ppi/Pcd.h | 4 +-
MdePkg/Include/Ppi/RecoveryModule.h | 2 +-
MdePkg/Include/Ppi/TemporaryRamDone.h | 2 +-
MdePkg/Include/Ppi/VectorHandoffInfo.h | 2 +-
MdePkg/Include/Register/Amd/Cpuid.h | 8 +--
MdePkg/Include/Register/Amd/Fam17Msr.h | 2 +-
MdePkg/Include/Register/Amd/Msr.h | 2 +-
.../Register/Intel/Msr/GoldmontPlusMsr.h | 2 +-
.../Include/Register/Intel/Msr/SkylakeMsr.h | 2 +-
.../Register/Intel/StmResourceDescriptor.h | 2 +-
NetworkPkg/ArpDxe/ArpDriver.h | 10 ++--
NetworkPkg/ArpDxe/ArpImpl.h | 14 ++---
NetworkPkg/Dhcp4Dxe/Dhcp4Driver.h | 4 +-
NetworkPkg/Dhcp4Dxe/Dhcp4Io.h | 2 +-
NetworkPkg/Dhcp4Dxe/Dhcp4Option.h | 18 +++----
NetworkPkg/Dhcp6Dxe/Dhcp6Driver.h | 4 +-
NetworkPkg/Dhcp6Dxe/Dhcp6Utility.h | 12 ++---
NetworkPkg/DnsDxe/DnsDriver.h | 12 ++---
NetworkPkg/DnsDxe/DnsImpl.h | 28 +++++-----
NetworkPkg/DpcDxe/Dpc.h | 2 +-
NetworkPkg/HttpBootDxe/HttpBootConfig.h | 2 +-
NetworkPkg/HttpBootDxe/HttpBootDhcp4.h | 2 +-
NetworkPkg/HttpBootDxe/HttpBootDhcp6.h | 4 +-
NetworkPkg/HttpBootDxe/HttpBootDxe.h | 6 +--
NetworkPkg/HttpBootDxe/HttpBootSupport.h | 10 ++--
NetworkPkg/HttpDxe/HttpDriver.h | 8 +--
NetworkPkg/HttpDxe/HttpProto.h | 16 +++---
NetworkPkg/HttpDxe/HttpsSupport.h | 2 +-
NetworkPkg/IScsiDxe/IScsiMisc.h | 8 +--
NetworkPkg/IScsiDxe/IScsiProto.h | 10 ++--
NetworkPkg/Include/Library/HttpLib.h | 2 +-
NetworkPkg/Include/Library/IpIoLib.h | 4 +-
NetworkPkg/Include/Library/NetLib.h | 2 +-
NetworkPkg/Include/Library/TcpIoLib.h | 6 +--
NetworkPkg/Include/Library/UdpIoLib.h | 6 +--
NetworkPkg/Include/Protocol/Dpc.h | 2 +-
NetworkPkg/Ip4Dxe/Ip4Common.h | 14 ++---
NetworkPkg/Ip4Dxe/Ip4Config2Impl.h | 2 +-
NetworkPkg/Ip4Dxe/Ip4Driver.h | 6 +--
NetworkPkg/Ip4Dxe/Ip4Icmp.h | 10 ++--
NetworkPkg/Ip4Dxe/Ip4If.h | 4 +-
NetworkPkg/Ip4Dxe/Ip4Igmp.h | 4 +-
NetworkPkg/Ip4Dxe/Ip4Impl.h | 8 +--
NetworkPkg/Ip4Dxe/Ip4Input.h | 6 +--
NetworkPkg/Ip4Dxe/Ip4Option.h | 4 +-
NetworkPkg/Ip4Dxe/Ip4Output.h | 4 +-
NetworkPkg/Ip4Dxe/Ip4Route.h | 12 ++---
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h | 4 +-
NetworkPkg/Ip6Dxe/Ip6Driver.h | 8 +--
NetworkPkg/Ip6Dxe/Ip6Icmp.h | 4 +-
NetworkPkg/Ip6Dxe/Ip6If.h | 4 +-
NetworkPkg/Ip6Dxe/Ip6Impl.h | 8 +--
NetworkPkg/Ip6Dxe/Ip6Input.h | 6 +--
NetworkPkg/Ip6Dxe/Ip6Mld.h | 2 +-
NetworkPkg/Ip6Dxe/Ip6Nd.h | 4 +-
NetworkPkg/Ip6Dxe/Ip6Route.h | 10 ++--
NetworkPkg/MnpDxe/MnpDriver.h | 6 +--
NetworkPkg/MnpDxe/MnpImpl.h | 14 ++---
NetworkPkg/Mtftp4Dxe/Mtftp4Driver.h | 2 +-
NetworkPkg/Mtftp4Dxe/Mtftp4Impl.h | 2 +-
NetworkPkg/Mtftp4Dxe/Mtftp4Option.h | 6 +--
NetworkPkg/Mtftp4Dxe/Mtftp4Support.h | 2 +-
NetworkPkg/Mtftp6Dxe/Mtftp6Driver.h | 4 +-
NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h | 4 +-
NetworkPkg/Mtftp6Dxe/Mtftp6Option.h | 2 +-
NetworkPkg/Mtftp6Dxe/Mtftp6Support.h | 2 +-
NetworkPkg/SnpDxe/Snp.h | 8 +--
NetworkPkg/TcpDxe/SockImpl.h | 2 +-
NetworkPkg/TcpDxe/Socket.h | 36 ++++++-------
NetworkPkg/TcpDxe/TcpDriver.h | 8 +--
NetworkPkg/TcpDxe/TcpFunc.h | 4 +-
NetworkPkg/TcpDxe/TcpMain.h | 4 +-
NetworkPkg/TcpDxe/TcpOption.h | 6 +--
NetworkPkg/TcpDxe/TcpProto.h | 14 ++---
.../TlsAuthConfigDxe/TlsAuthConfigImpl.h | 2 +-
NetworkPkg/TlsDxe/TlsDriver.h | 4 +-
NetworkPkg/Udp4Dxe/Udp4Driver.h | 4 +-
NetworkPkg/Udp4Dxe/Udp4Impl.h | 4 +-
NetworkPkg/Udp6Dxe/Udp6Driver.h | 6 +--
NetworkPkg/Udp6Dxe/Udp6Impl.h | 12 ++---
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h | 2 +-
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h | 8 +--
NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.h | 4 +-
NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h | 16 +++---
NetworkPkg/VlanConfigDxe/VlanConfigImpl.h | 6 +--
OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.h | 10 ++--
.../BiosThunk/VideoDxe/VesaBiosExtensions.h | 8 +--
OvmfPkg/Csm/Include/Framework/BootScript.h | 2 +-
.../FrameworkInternalFormRepresentation.h | 2 +-
OvmfPkg/Csm/Include/Protocol/IsaAcpi.h | 2 +-
OvmfPkg/Csm/Include/Protocol/IsaIo.h | 2 +-
OvmfPkg/Csm/Include/Protocol/LegacyBios.h | 6 +--
.../Csm/Include/Protocol/LegacyBiosPlatform.h | 4 +-
OvmfPkg/Csm/Include/Protocol/VgaMiniPort.h | 2 +-
.../Csm/LegacyBiosDxe/LegacyBiosInterface.h | 8 +--
.../LegacyBootMaintUiLib/LegacyBootMaintUi.h | 4 +-
.../LegacyBootMaintUiVfr.h | 2 +-
.../IndustryStandard/Xen/arch-arm/xen.h | 2 +-
.../IndustryStandard/Xen/grant_table.h | 4 +-
.../Include/IndustryStandard/Xen/io/blkif.h | 2 +-
OvmfPkg/Include/Library/VirtioLib.h | 2 +-
OvmfPkg/Include/Protocol/XenBus.h | 4 +-
OvmfPkg/Include/Protocol/XenIo.h | 2 +-
OvmfPkg/XenBusDxe/DriverBinding.h | 2 +-
OvmfPkg/XenBusDxe/EventChannel.h | 2 +-
OvmfPkg/XenBusDxe/GrantTable.h | 4 +-
OvmfPkg/XenPvBlkDxe/BlockIo.h | 6 +--
OvmfPkg/XenPvBlkDxe/DriverBinding.h | 2 +-
.../Include/Library/TcgStorageCoreLib.h | 4 +-
SecurityPkg/Include/Library/TpmCommLib.h | 4 +-
SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h | 6 +--
ShellPkg/Application/Shell/ConsoleLogger.h | 4 +-
.../Application/Shell/FileHandleWrappers.h | 6 +--
ShellPkg/Application/Shell/Shell.h | 2 +-
ShellPkg/Application/Shell/ShellEnvVar.h | 36 ++++++-------
ShellPkg/Application/Shell/ShellManParser.h | 10 ++--
.../Shell/ShellParametersProtocol.h | 20 +++----
ShellPkg/Application/Shell/ShellProtocol.h | 12 ++---
ShellPkg/DynamicCommand/DpDynamicCommand/Dp.h | 2 +-
.../DynamicCommand/TftpDynamicCommand/Tftp.h | 2 +-
.../Include/Guid/EdkiiSystemFmpCapsule.h | 4 +-
.../Include/Library/IniParsingLib.h | 14 ++---
.../SystemFirmwareUpdate/SystemFirmwareDxe.h | 2 +-
.../Include/Ia32/ProcessorContext.h | 2 +-
.../Include/Library/DebugCommunicationLib.h | 2 +-
.../Include/TransferProtocol.h | 6 +--
.../DebugAgent/DebugAgentCommon/DebugMp.h | 6 +--
.../DebugAgentCommon/Ia32/ArchDebugSupport.h | 2 +-
.../DebugAgentCommon/Ia32/DebugException.h | 2 +-
.../DebugAgentCommon/X64/ArchDebugSupport.h | 2 +-
.../DebugAgentCommon/X64/DebugException.h | 2 +-
.../DebugCommunicationLibUsb3Internal.h | 4 +-
UefiCpuPkg/CpuDxe/CpuDxe.h | 2 +-
UefiCpuPkg/CpuDxe/CpuGdt.h | 2 +-
UefiCpuPkg/CpuDxe/CpuMp.h | 4 +-
UefiCpuPkg/CpuDxe/CpuPageTable.h | 2 +-
.../Include/Library/SmmCpuFeaturesLib.h | 4 +-
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.h | 4 +-
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 12 ++---
.../TlsAuthConfigDxe/TlsAuthConfigVfr.vfr | 6 +--
CryptoPkg/Library/OpensslLib/rand_pool.c | 8 +--
.../Library/OpensslLib/rand_pool_noise.c | 2 +-
.../VirtualKeyboardDxe/VirtualKeyboard.c | 16 +++---
EmulatorPkg/Sec/Sec.c | 5 +-
EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c | 2 +-
EmulatorPkg/Unix/Host/BlockIo.c | 12 ++---
EmulatorPkg/Unix/Host/EmuThunk.c | 2 +-
EmulatorPkg/Unix/Host/Host.c | 26 +++++-----
EmulatorPkg/Unix/Host/LinuxPacketFilter.c | 2 +-
EmulatorPkg/Unix/Host/Pthreads.c | 2 +-
EmulatorPkg/Win/Host/WinBlockIo.c | 4 +-
EmulatorPkg/Win/Host/WinFileSystem.c | 2 +-
EmulatorPkg/Win/Host/WinGopInput.c | 4 +-
EmulatorPkg/Win/Host/WinGopScreen.c | 14 ++---
EmulatorPkg/Win/Host/WinHost.c | 10 ++--
FatPkg/EnhancedFatDxe/Delete.c | 2 +-
FatPkg/EnhancedFatDxe/DirectoryManage.c | 2 +-
FatPkg/EnhancedFatDxe/Fat.c | 2 +-
FatPkg/EnhancedFatDxe/FileName.c | 2 +-
FatPkg/EnhancedFatDxe/FileSpace.c | 6 +--
FatPkg/EnhancedFatDxe/Flush.c | 4 +-
FatPkg/FatPei/FatLiteApi.c | 2 +-
FatPkg/FatPei/Mbr.c | 2 +-
.../Application/CapsuleApp/CapsuleApp.c | 2 +-
.../Application/CapsuleApp/CapsuleDump.c | 4 +-
.../MemoryProfileInfo/MemoryProfileInfo.c | 2 +-
.../UiApp/FrontPageCustomizedUiSupport.c | 2 +-
MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c | 8 +--
.../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 14 ++---
.../Ata/AtaAtapiPassThru/AtaAtapiPassThru.c | 8 +--
.../Bus/Ata/AtaAtapiPassThru/IdeMode.c | 16 +++---
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c | 10 ++--
.../Bus/Ata/AtaBusDxe/AtaPassThruExecute.c | 4 +-
MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c | 4 +-
MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c | 2 +-
MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.c | 6 +--
.../Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c | 16 +++---
.../Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c | 20 +++----
.../Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c | 4 +-
MdeModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.c | 2 +-
MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c | 4 +-
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 6 +--
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 32 ++++++------
.../Bus/Sd/EmmcBlockIoPei/EmmcHcMem.c | 2 +-
MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c | 12 ++---
MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.c | 12 ++---
MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c | 2 +-
MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHcMem.c | 2 +-
MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c | 6 +--
MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c | 10 ++--
MdeModulePkg/Bus/Sd/SdDxe/SdDxe.c | 2 +-
MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c | 2 +-
MdeModulePkg/Bus/Usb/UsbBotPei/PeiAtapi.c | 2 +-
MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.c | 2 +-
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c | 12 ++---
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c | 2 +-
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 2 +-
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c | 4 +-
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 8 +--
MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c | 2 +-
MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c | 2 +-
MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 8 +--
MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c | 6 +--
.../Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 4 +-
.../Bus/Usb/UsbMassStorageDxe/UsbMassBot.c | 4 +-
.../Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c | 4 +-
.../Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c | 4 +-
.../Usb/UsbMouseAbsolutePointerDxe/MouseHid.c | 2 +-
.../UsbMouseAbsolutePointer.c | 2 +-
MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c | 2 +-
MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c | 2 +-
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 10 ++--
MdeModulePkg/Core/Pei/FwVol/FwVol.c | 4 +-
MdeModulePkg/Core/Pei/Hob/Hob.c | 2 +-
MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 2 +-
MdeModulePkg/Core/PiSmmCore/Dependency.c | 4 +-
MdeModulePkg/Core/PiSmmCore/Dispatcher.c | 24 ++++-----
MdeModulePkg/Core/PiSmmCore/HeapGuard.c | 4 +-
MdeModulePkg/Core/PiSmmCore/Locate.c | 8 +--
.../Core/PiSmmCore/MemoryAttributesTable.c | 8 +--
MdeModulePkg/Core/PiSmmCore/Page.c | 4 +-
MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 10 ++--
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 8 +--
MdeModulePkg/Core/PiSmmCore/Smi.c | 2 +-
.../Core/PiSmmCore/SmramProfileRecord.c | 4 +-
.../DxeExtractGuidedSectionLib.c | 10 ++--
MdePkg/Library/DxeHobLib/HobLib.c | 2 +-
MdePkg/Library/DxeIoLibCpuIo2/IoLib.c | 2 +-
.../DxeRuntimePciExpressLib/PciExpressLib.c | 6 +--
.../Library/DxeServicesLib/DxeServicesLib.c | 12 ++---
.../DxeServicesTableLib/DxeServicesTableLib.c | 2 +-
MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c | 2 +-
.../DxeRuntimePciSegmentLib.c | 2 +-
.../PciSegmentLibCommon.c | 4 +-
MdePkg/Library/SmmMemLib/SmmMemLib.c | 4 +-
.../Library/SmmPciExpressLib/PciExpressLib.c | 4 +-
.../Library/SmmPciLibPciRootBridgeIo/PciLib.c | 6 +--
.../SmmPeriodicSmiLib/SmmPeriodicSmiLib.c | 42 +++++++--------
.../SmmServicesTableLib/SmmServicesTableLib.c | 2 +-
NetworkPkg/ArpDxe/ArpDriver.c | 14 ++---
NetworkPkg/ArpDxe/ArpImpl.c | 16 +++---
NetworkPkg/ArpDxe/ArpMain.c | 10 ++--
NetworkPkg/Dhcp4Dxe/Dhcp4Driver.c | 8 +--
NetworkPkg/Dhcp4Dxe/Dhcp4Impl.c | 6 +--
NetworkPkg/Dhcp4Dxe/Dhcp4Io.c | 12 ++---
NetworkPkg/Dhcp4Dxe/Dhcp4Option.c | 26 +++++-----
NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c | 12 ++---
NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c | 12 ++---
NetworkPkg/Dhcp6Dxe/Dhcp6Io.c | 26 +++++-----
NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c | 16 +++---
NetworkPkg/DnsDxe/DnsDriver.c | 12 ++---
NetworkPkg/DnsDxe/DnsImpl.c | 28 +++++-----
NetworkPkg/DnsDxe/DnsProtocol.c | 16 +++---
NetworkPkg/DpcDxe/Dpc.c | 6 +--
NetworkPkg/HttpBootDxe/HttpBootConfig.c | 4 +-
NetworkPkg/HttpBootDxe/HttpBootDhcp4.c | 2 +-
NetworkPkg/HttpBootDxe/HttpBootDhcp6.c | 10 ++--
NetworkPkg/HttpBootDxe/HttpBootDxe.c | 8 +--
NetworkPkg/HttpBootDxe/HttpBootImpl.c | 2 +-
NetworkPkg/HttpBootDxe/HttpBootSupport.c | 12 ++---
NetworkPkg/HttpDxe/HttpDriver.c | 12 ++---
NetworkPkg/HttpDxe/HttpImpl.c | 10 ++--
NetworkPkg/HttpDxe/HttpProto.c | 22 ++++----
NetworkPkg/HttpDxe/HttpsSupport.c | 2 +-
NetworkPkg/IScsiDxe/ComponentName.c | 2 +-
NetworkPkg/IScsiDxe/IScsiCHAP.c | 4 +-
NetworkPkg/IScsiDxe/IScsiConfig.c | 6 +--
NetworkPkg/IScsiDxe/IScsiDhcp.c | 4 +-
NetworkPkg/IScsiDxe/IScsiDriver.c | 10 ++--
NetworkPkg/IScsiDxe/IScsiMisc.c | 6 +--
NetworkPkg/IScsiDxe/IScsiProto.c | 40 +++++++-------
NetworkPkg/Ip4Dxe/Ip4Common.c | 10 ++--
NetworkPkg/Ip4Dxe/Ip4Config2Impl.c | 10 ++--
NetworkPkg/Ip4Dxe/Ip4Config2Nv.c | 4 +-
NetworkPkg/Ip4Dxe/Ip4Driver.c | 10 ++--
NetworkPkg/Ip4Dxe/Ip4Icmp.c | 2 +-
NetworkPkg/Ip4Dxe/Ip4If.c | 14 ++---
NetworkPkg/Ip4Dxe/Ip4Igmp.c | 8 +--
NetworkPkg/Ip4Dxe/Ip4Impl.c | 14 ++---
NetworkPkg/Ip4Dxe/Ip4Input.c | 28 +++++-----
NetworkPkg/Ip4Dxe/Ip4Option.c | 4 +-
NetworkPkg/Ip4Dxe/Ip4Output.c | 12 ++---
NetworkPkg/Ip4Dxe/Ip4Route.c | 14 ++---
NetworkPkg/Ip6Dxe/Ip6Common.c | 2 +-
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 10 ++--
NetworkPkg/Ip6Dxe/Ip6ConfigNv.c | 6 +--
NetworkPkg/Ip6Dxe/Ip6Driver.c | 12 ++---
NetworkPkg/Ip6Dxe/Ip6Icmp.c | 6 +--
NetworkPkg/Ip6Dxe/Ip6If.c | 10 ++--
NetworkPkg/Ip6Dxe/Ip6Impl.c | 10 ++--
NetworkPkg/Ip6Dxe/Ip6Input.c | 20 +++----
NetworkPkg/Ip6Dxe/Ip6Mld.c | 8 +--
NetworkPkg/Ip6Dxe/Ip6Nd.c | 12 ++---
NetworkPkg/Ip6Dxe/Ip6Output.c | 2 +-
NetworkPkg/Ip6Dxe/Ip6Route.c | 6 +--
NetworkPkg/Library/DxeHttpLib/DxeHttpLib.c | 4 +-
NetworkPkg/Library/DxeIpIoLib/DxeIpIoLib.c | 16 +++---
NetworkPkg/Library/DxeNetLib/DxeNetLib.c | 26 +++++-----
NetworkPkg/Library/DxeNetLib/NetBuffer.c | 4 +-
NetworkPkg/Library/DxeTcpIoLib/DxeTcpIoLib.c | 10 ++--
NetworkPkg/Library/DxeUdpIoLib/DxeUdpIoLib.c | 10 ++--
NetworkPkg/MnpDxe/MnpConfig.c | 14 ++---
NetworkPkg/MnpDxe/MnpDriver.c | 10 ++--
NetworkPkg/MnpDxe/MnpIo.c | 8 +--
NetworkPkg/MnpDxe/MnpMain.c | 6 +--
NetworkPkg/Mtftp4Dxe/Mtftp4Driver.c | 4 +-
NetworkPkg/Mtftp4Dxe/Mtftp4Impl.c | 10 ++--
NetworkPkg/Mtftp4Dxe/Mtftp4Option.c | 20 +++----
NetworkPkg/Mtftp4Dxe/Mtftp4Rrq.c | 10 ++--
NetworkPkg/Mtftp4Dxe/Mtftp4Support.c | 6 +--
NetworkPkg/Mtftp4Dxe/Mtftp4Wrq.c | 8 +--
NetworkPkg/Mtftp6Dxe/Mtftp6Driver.c | 4 +-
NetworkPkg/Mtftp6Dxe/Mtftp6Impl.c | 4 +-
NetworkPkg/Mtftp6Dxe/Mtftp6Option.c | 4 +-
NetworkPkg/Mtftp6Dxe/Mtftp6Rrq.c | 10 ++--
NetworkPkg/Mtftp6Dxe/Mtftp6Support.c | 8 +--
NetworkPkg/Mtftp6Dxe/Mtftp6Wrq.c | 4 +-
NetworkPkg/SnpDxe/Callback.c | 2 +-
NetworkPkg/SnpDxe/Shutdown.c | 2 +-
NetworkPkg/SnpDxe/Snp.c | 6 +--
NetworkPkg/SnpDxe/WaitForPacket.c | 2 +-
NetworkPkg/TcpDxe/SockImpl.c | 4 +-
NetworkPkg/TcpDxe/SockInterface.c | 10 ++--
NetworkPkg/TcpDxe/TcpDispatcher.c | 6 +--
NetworkPkg/TcpDxe/TcpDriver.c | 10 ++--
NetworkPkg/TcpDxe/TcpInput.c | 8 +--
NetworkPkg/TcpDxe/TcpMain.c | 4 +-
NetworkPkg/TcpDxe/TcpMisc.c | 2 +-
NetworkPkg/TcpDxe/TcpOption.c | 2 +-
NetworkPkg/TcpDxe/TcpOutput.c | 4 +-
NetworkPkg/TcpDxe/TcpTimer.c | 2 +-
.../TlsAuthConfigDxe/TlsAuthConfigImpl.c | 6 +--
NetworkPkg/TlsDxe/TlsDriver.c | 4 +-
NetworkPkg/Udp4Dxe/Udp4Driver.c | 4 +-
NetworkPkg/Udp4Dxe/Udp4Impl.c | 12 ++---
NetworkPkg/Udp4Dxe/Udp4Main.c | 4 +-
NetworkPkg/Udp6Dxe/Udp6Driver.c | 8 +--
NetworkPkg/Udp6Dxe/Udp6Impl.c | 18 +++----
NetworkPkg/Udp6Dxe/Udp6Main.c | 12 ++---
NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c | 4 +-
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c | 10 ++--
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c | 18 +++----
NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | 4 +-
NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c | 10 ++--
NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.c | 12 ++---
NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c | 8 +--
NetworkPkg/VlanConfigDxe/VlanConfigDriver.c | 8 +--
OvmfPkg/AcpiPlatformDxe/BootScript.c | 2 +-
OvmfPkg/AcpiPlatformDxe/Qemu.c | 4 +-
OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 2 +-
OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c | 4 +-
OvmfPkg/Csm/CsmSupportLib/LegacyPlatform.c | 6 +--
OvmfPkg/Csm/LegacyBiosDxe/LegacyBios.c | 6 +--
OvmfPkg/Csm/LegacyBiosDxe/LegacyBootSupport.c | 4 +-
OvmfPkg/Csm/LegacyBiosDxe/LegacyPci.c | 8 +--
OvmfPkg/Csm/LegacyBiosDxe/Thunk.c | 4 +-
.../LegacyBootMaintUiLib/LegacyBootMaintUi.c | 14 ++---
OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c | 18 +++----
OvmfPkg/Library/DxePciLibI440FxQ35/PciLib.c | 4 +-
OvmfPkg/Library/PciHostBridgeLib/XenSupport.c | 4 +-
.../QemuBootOrderLib/QemuBootOrderLib.c | 2 +-
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c | 2 +-
OvmfPkg/Library/VirtioLib/VirtioLib.c | 2 +-
.../XenConsoleSerialPortLib.c | 6 +--
.../QemuFlashFvbServicesRuntimeDxe/FvbInfo.c | 4 +-
.../FwBlockService.c | 8 +--
OvmfPkg/QemuVideoDxe/Driver.c | 2 +-
OvmfPkg/VirtioNetDxe/DriverBinding.c | 2 +-
OvmfPkg/VirtioNetDxe/SnpSharedHelpers.c | 2 +-
OvmfPkg/VirtioRngDxe/VirtioRng.c | 2 +-
OvmfPkg/VirtioScsiDxe/VirtioScsi.c | 2 +-
OvmfPkg/XenBusDxe/XenBus.c | 2 +-
OvmfPkg/XenBusDxe/XenBusDxe.c | 6 +--
OvmfPkg/XenBusDxe/XenStore.c | 4 +-
OvmfPkg/XenPvBlkDxe/BlockFront.c | 2 +-
OvmfPkg/XenPvBlkDxe/BlockIo.c | 8 +--
OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.c | 2 +-
.../Library/AcpiTimerLib/AcpiTimerLib.c | 2 +-
.../Library/SerialIoLib/SerialPortLib.c | 6 +--
SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.c | 2 +-
.../DxeTcgPhysicalPresenceLib.c | 2 +-
.../DxeTpm2MeasureBootLib.c | 2 +-
.../DxeTpmMeasureBootLib.c | 2 +-
.../HashLibBaseCryptoRouterDxe.c | 2 +-
.../HashLibBaseCryptoRouterPei.c | 2 +-
.../TcgStorageCoreLib/TcgStorageCore.c | 2 +-
.../TcgStorageCoreLib/TcgStorageUtil.c | 2 +-
.../Library/Tpm12DeviceLibDTpm/Tpm12Tis.c | 4 +-
.../Tpm2CommandLib/Tpm2Miscellaneous.c | 2 +-
.../Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 4 +-
.../Library/Tpm2DeviceLibDTpm/Tpm2Tis.c | 6 +--
SecurityPkg/Library/TpmCommLib/TisPc.c | 2 +-
.../Pkcs7VerifyDxe/Pkcs7VerifyDxe.c | 2 +-
.../RandomNumberGenerator/RngDxe/RngDxe.c | 2 +-
.../Tcg/MemoryOverwriteControl/TcgMor.c | 10 ++--
.../Tcg/Opal/OpalPassword/OpalDriver.c | 2 +-
SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 8 +--
.../PhysicalPresencePei/PhysicalPresencePei.c | 2 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 2 +-
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 4 +-
SecurityPkg/Tcg/TcgPei/TcgPei.c | 8 +--
.../SecureBootConfigFileExplorer.c | 2 +-
.../SecureBootConfigImpl.c | 2 +-
ShellPkg/Application/Shell/ConsoleLogger.c | 12 ++---
ShellPkg/Application/Shell/ConsoleWrappers.c | 2 +-
.../Application/Shell/FileHandleWrappers.c | 8 +--
ShellPkg/Application/Shell/Shell.c | 8 +--
ShellPkg/Application/Shell/ShellEnvVar.c | 8 +--
ShellPkg/Application/Shell/ShellManParser.c | 20 +++----
.../Shell/ShellParametersProtocol.c | 26 +++++-----
ShellPkg/Application/Shell/ShellProtocol.c | 36 ++++++-------
ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c | 4 +-
.../DynamicCommand/DpDynamicCommand/DpApp.c | 2 +-
.../DpDynamicCommand/DpDynamicCommand.c | 4 +-
.../DynamicCommand/DpDynamicCommand/DpTrace.c | 4 +-
.../DynamicCommand/TftpDynamicCommand/Tftp.c | 8 +--
.../TftpDynamicCommand/TftpApp.c | 2 +-
.../TftpDynamicCommand/TftpDynamicCommand.c | 4 +-
.../Library/IniParsingLib/IniParsingLib.c | 26 +++++-----
.../ParseConfigProfile.c | 2 +-
.../RecoveryModuleLoadPei.c | 14 ++---
.../SystemFirmwareUpdate/ParseConfigProfile.c | 2 +-
.../SystemFirmwareCommonDxe.c | 4 +-
.../SystemFirmwareReportDxe.c | 8 +--
.../SystemFirmwareUpdateDxe.c | 4 +-
.../DebugAgentDxe/DebugAgentDxe.c | 2 +-
.../DebugAgentPei/DebugAgentPei.c | 2 +-
.../DebugAgent/DebugAgentCommon/DebugAgent.c | 52 +++++++++----------
.../DxeDebugAgent/DxeDebugAgentLib.c | 2 +-
.../DebugAgent/DxeDebugAgent/SerialIo.c | 6 +--
.../SecPeiDebugAgent/SecPeiDebugAgentLib.c | 10 ++--
.../SmmDebugAgent/SmmDebugAgentLib.c | 10 ++--
.../DebugCommunicationLibSerialPort.c | 2 +-
.../DebugCommunicationLibUsb3Common.c | 2 +-
.../DebugCommunicationLibUsb3Dxe.c | 2 +-
.../DebugCommunicationLibUsb3Transfer.c | 4 +-
StandaloneMmPkg/Core/Dependency.c | 2 +-
StandaloneMmPkg/Core/Dispatcher.c | 2 +-
StandaloneMmPkg/Core/FwVol.c | 2 +-
StandaloneMmPkg/Core/StandaloneMmCore.c | 2 +-
UefiCpuPkg/CpuDxe/CpuDxe.c | 8 +--
UefiCpuPkg/CpuDxe/CpuGdt.c | 2 +-
UefiCpuPkg/CpuDxe/CpuMp.c | 4 +-
UefiCpuPkg/CpuDxe/CpuPageTable.c | 6 +--
.../PeiDxeSmmCpuException.c | 4 +-
.../CpuExceptionHandlerLib/SmmException.c | 2 +-
.../SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 4 +-
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c | 4 +-
.../PiSmmCommunicationPei.c | 2 +-
.../PiSmmCommunicationSmm.c | 2 +-
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 4 +-
.../PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 4 +-
UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 6 +--
UefiCpuPkg/PiSmmCpuDxeSmm/X64/Semaphore.c | 2 +-
EmulatorPkg/Sec/Ia32/SwitchRam.S | 18 +++----
EmulatorPkg/Sec/Ia32/SwitchRam.asm | 20 +++----
EmulatorPkg/Sec/X64/SwitchRam.S | 2 +-
EmulatorPkg/Sec/X64/SwitchRam.asm | 2 +-
EmulatorPkg/Unix/GdbRun.sh | 4 +-
EmulatorPkg/Unix/Host/X64/Gasket.S | 4 +-
EmulatorPkg/Unix/Host/X64/SwitchStack.S | 2 +-
EmulatorPkg/Unix/lldbefi.py | 14 ++---
.../Application/UiApp/FrontPageStrings.uni | 6 +--
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.uni | 2 +-
.../Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.uni | 2 +-
MdePkg/Library/DxePcdLib/DxePcdLib.uni | 2 +-
NetworkPkg/MnpDxe/MnpDxe.uni | 4 +-
OvmfPkg/AcpiTables/Facp.aslc | 8 +--
OvmfPkg/AcpiTables/Facs.aslc | 2 +-
OvmfPkg/AcpiTables/Madt.aslc | 2 +-
.../LegacyBootMaintUiLib.uni | 8 +--
OvmfPkg/QemuVideoDxe/VbeShim.asm | 14 ++---
SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.uni | 4 +-
.../PlatformSecureLibNull.uni | 2 +-
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.uni | 2 +-
SecurityPkg/Tcg/TcgSmm/TcgSmm.uni | 2 +-
ShellPkg/Application/ShellCTestApp/README.txt | 2 +-
.../DebugAgentCommon/Ia32/AsmFuncs.nasm | 4 +-
.../DebugCommunicationLibSerialPort.uni | 2 +-
.../SmmCpuFeaturesLib/X64/SmiEntry.nasm | 2 +-
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm | 2 +-
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmInit.nasm | 2 +-
573 files changed, 1805 insertions(+), 1806 deletions(-)

--
2.21.0


[PATCH v2 01/78] CryptoPkg/OpensslLib: Fix few typos

Philippe Mathieu-Daudé <philmd@...>
 

From: Antoine Coeur <coeur@...>

Fix few typos in comments.

Cc: Jian J Wang <jian.j.wang@...>
Cc: Xiaoyu Lu <xiaoyux.lu@...>
Signed-off-by: Antoine Coeur <coeur@...>
Reviewed-by: Philippe Mathieu-Daude <philmd@...>
Signed-off-by: Philippe Mathieu-Daude <philmd@...>
---
CryptoPkg/Library/OpensslLib/rand_pool.c | 8 ++++----
CryptoPkg/Library/OpensslLib/rand_pool_noise.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/CryptoPkg/Library/OpensslLib/rand_pool.c b/CryptoPkg/Library/OpensslLib/rand_pool.c
index 9d2a4ad13823..9f3983f7c35b 100644
--- a/CryptoPkg/Library/OpensslLib/rand_pool.c
+++ b/CryptoPkg/Library/OpensslLib/rand_pool.c
@@ -129,7 +129,7 @@ RandGetSeed128 (
AES_KEY AESKey;

//
- // Chose an arbitary key and zero the feed_forward_value (FFV)
+ // Chose an arbitrary key and zero the feed_forward_value (FFV)
//
for (Index = 0; Index < 16; Index++) {
Key[Index] = (UINT8) Index;
@@ -287,7 +287,7 @@ int rand_pool_add_additional_data(RAND_POOL *pool)
}

/*
- * Dummy Implememtation for UEFI
+ * Dummy Implementation for UEFI
*
* This is OpenSSL required interface.
*/
@@ -297,7 +297,7 @@ int rand_pool_init(void)
}

/*
- * Dummy Implememtation for UEFI
+ * Dummy Implementation for UEFI
*
* This is OpenSSL required interface.
*/
@@ -306,7 +306,7 @@ void rand_pool_cleanup(void)
}

/*
- * Dummy Implememtation for UEFI
+ * Dummy Implementation for UEFI
*
* This is OpenSSL required interface.
*/
diff --git a/CryptoPkg/Library/OpensslLib/rand_pool_noise.c b/CryptoPkg/Library/OpensslLib/rand_pool_noise.c
index c16ed8b45496..212834e27acc 100644
--- a/CryptoPkg/Library/OpensslLib/rand_pool_noise.c
+++ b/CryptoPkg/Library/OpensslLib/rand_pool_noise.c
@@ -22,7 +22,7 @@ GetRandomNoise64 (
)
{
//
- // Return FALSE will fallback to use PerformaceCounter to
+ // Return FALSE will fallback to use PerformanceCounter to
// generate noise.
//
return FALSE;
--
2.21.0


[Patch 1/1] UefiCpuPkg: Remove redundant alignment check when calculate microcode patch size.

Siyuan, Fu
 

This patch removes the unnecessary alignment check on microcode patch TotalSize
introduced by commit d786a172. The TotalSize has already been checked with 1K
alignment and MAX_ADDRESS in previous code as below:

if ( (UINTN)MicrocodeEntryPoint > (MAX_ADDRESS - TotalSize) ||
((UINTN)MicrocodeEntryPoint + TotalSize) > MicrocodeEnd ||
(DataSize & 0x3) != 0 ||
(TotalSize & (SIZE_1KB - 1)) != 0 ||
TotalSize < DataSize
) {

Cc: Eric Dong <eric.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Hao A Wu <hao.a.wu@...>
Signed-off-by: Siyuan Fu <siyuan.fu@...>
---
UefiCpuPkg/Library/MpInitLib/Microcode.c | 24 +++++-------------------
UefiCpuPkg/Library/MpInitLib/MpLib.h | 3 +--
2 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c
index 3da5bfb9cf2f..a9d06dd4099a 100644
--- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
+++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
@@ -1,7 +1,7 @@
/** @file
Implementation of loading microcode on processors.

- Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent

**/
@@ -397,16 +397,7 @@ LoadMicrocodePatchWorker (
Patches[Index].Size
);

- //
- // Zero-fill the padding area
- // Please note that AlignedSize will be no less than Size
- //
- ZeroMem (
- Walker + Patches[Index].Size,
- Patches[Index].AlignedSize - Patches[Index].Size
- );
-
- Walker += Patches[Index].AlignedSize;
+ Walker += Patches[Index].Size;
}

//
@@ -578,14 +569,9 @@ LoadMicrocodePatch (
//
// Store the information of this microcode patch
//
- if (TotalSize > ALIGN_VALUE (TotalSize, SIZE_1KB) ||
- ALIGN_VALUE (TotalSize, SIZE_1KB) > MAX_UINTN - TotalLoadSize) {
- goto OnExit;
- }
- PatchInfoBuffer[PatchCount - 1].Address = (UINTN) MicrocodeEntryPoint;
- PatchInfoBuffer[PatchCount - 1].Size = TotalSize;
- PatchInfoBuffer[PatchCount - 1].AlignedSize = ALIGN_VALUE (TotalSize, SIZE_1KB);
- TotalLoadSize += PatchInfoBuffer[PatchCount - 1].AlignedSize;
+ PatchInfoBuffer[PatchCount - 1].Address = (UINTN) MicrocodeEntryPoint;
+ PatchInfoBuffer[PatchCount - 1].Size = TotalSize;
+ TotalLoadSize += TotalSize;
}

//
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpInitLib/MpLib.h
index 6609c958ce8a..b6e5a1afab00 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
@@ -1,7 +1,7 @@
/** @file
Common header file for MP Initialize Library.

- Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent

**/
@@ -54,7 +54,6 @@
typedef struct {
UINTN Address;
UINTN Size;
- UINTN AlignedSize;
} MICROCODE_PATCH_INFO;

//
--
2.19.1.windows.1


[Patch 1/1] UefiCpuPkg: Always load microcode patch on AP processor.

Siyuan, Fu
 

This patch updates the microcode loader to always perform a microcode detect
and load on both BSP and AP processor. This is to fix a potential microcode
revision mismatch issue in below situation:
1. Assume there are two microcode co-exists in flash: one production version
and one debug version microcode.
2. FIT loads production microcode to BSP and all AP.
3. UefiCpuPkg loader loads debug microcode to BSP, and skip the loading on AP.
As a result, different microcode patches are loaded to BSP and AP, and trigger
microcode mismatch error during OS boot.

Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=2431

Cc: Eric Dong <eric.dong@...>
Cc: Ray Ni <ray.ni@...>
Signed-off-by: Siyuan Fu <siyuan.fu@...>
---
UefiCpuPkg/Library/MpInitLib/Microcode.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c
index 3da5bfb9cf2f..fa6f9681e55a 100644
--- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
+++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
@@ -1,7 +1,7 @@
/** @file
Implementation of loading microcode on processors.

- Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent

**/
@@ -105,12 +105,6 @@ MicrocodeDetect (

CurrentRevision = GetCurrentMicrocodeSignature ();
IsBspCallIn = (ProcessorNumber == (UINTN)CpuMpData->BspNumber) ? TRUE : FALSE;
- if (CurrentRevision != 0 && !IsBspCallIn) {
- //
- // Skip loading microcode if it has been loaded successfully
- //
- return;
- }

GetProcessorLocationByApicId (GetInitialApicId (), NULL, NULL, &ThreadId);
if (ThreadId != 0) {
--
2.19.1.windows.1


Re: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence Interface

Yao, Jiewen
 

Some other comment:

6. I disagree to move NvData.h to securityPkg.
This is designed to be an internal variable.
Why it need to move to security pkg to share with other driver?

I agree that duplicating code is bad solution.
And exposing internal data structure is as bad as duplicating code.

By design, the platform can have its own TCG platform lib and its own NvData.h.
Would you please help me understand why this is needed?

7. Removing assert has no relationship with this extend PPI interface.
If you want, please file another Bugzilla and handle it separately.

8. Fixing bug to follow spec is good.
But I do not see the relationship with the PPI interface extension.
Please file another Bugzilla and handle that separately.


Thank you
Yao Jiewen

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao, Jiewen
Sent: Friday, January 3, 2020 1:30 PM
To: Gao, Zhichao <zhichao.gao@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Zhang, Chao B
<chao.b.zhang@...>; Justen, Jordan L <jordan.l.justen@...>;
Laszlo Ersek <lersek@...>; Ard Biesheuvel <ard.biesheuvel@...>;
Marc-André Lureau <marcandre.lureau@...>; Stefan Berger
<stefanb@...>
Subject: Re: [edk2-devel] [PATCH 00/13] Extend and fix the TCG/TCG2 Physical
Presence Interface

What is the platform use case?
Please give at least some examples.


-----Original Message-----
From: Gao, Zhichao <zhichao.gao@...>
Sent: Friday, January 3, 2020 1:08 PM
To: Yao, Jiewen <jiewen.yao@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Zhang, Chao B
<chao.b.zhang@...>; Justen, Jordan L <jordan.l.justen@...>;
Laszlo Ersek <lersek@...>; Ard Biesheuvel
<ard.biesheuvel@...>;
Marc-André Lureau <marcandre.lureau@...>; Stefan Berger
<stefanb@...>
Subject: RE: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence
Interface

See below.

-----Original Message-----
From: Yao, Jiewen
Sent: Friday, January 3, 2020 11:09 AM
To: Gao, Zhichao <zhichao.gao@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Zhang, Chao B
<chao.b.zhang@...>; Justen, Jordan L <jordan.l.justen@...>;
Laszlo Ersek <lersek@...>; Ard Biesheuvel
<ard.biesheuvel@...>; Marc-André Lureau
<marcandre.lureau@...>; Stefan Berger <stefanb@...>
Subject: RE: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence
Interface

Hi
I am not clear on the purpose of this extension.

The Bugzilla just describes the solution.
But what is the problem you are trying to resolve?

I completely don’t understand.

Please do consider add the background information there.
Or it is hard for me to comment.


Thank you
Yao Jiewen

-----Original Message-----
From: Gao, Zhichao <zhichao.gao@...>
Sent: Friday, January 3, 2020 11:04 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen <jiewen.yao@...>; Wang, Jian J
<jian.j.wang@...>; Zhang, Chao B <chao.b.zhang@...>;
Justen, Jordan L <jordan.l.justen@...>; Laszlo Ersek
<lersek@...>; Ard Biesheuvel <ard.biesheuvel@...>;
Marc-André Lureau <marcandre.lureau@...>; Stefan Berger
<stefanb@...>
Subject: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence
Interface

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2443

1. Add two interfaces Tcg2PpVendorLibExecutePendingRequestEx and
Tcg2PpVendorLibSubmitRequestToPreOSFunctionEx to Tcg2PpVendorLib.
It
has one more parameter PPData (type EFI_TCG2_PHYSICAL_PRESENCE) to
transfer more data.
2. Use the Ex version instead of original one in
Tcg2PhysicalPresenceLib 3. Add a pcd
PcdPhysicalPresenceUserConfirmTimeout to control the user confirm
input key timeout.
4. Add FunctionIndex to structure type EFI_TCG2_PHYSICAL_PRESENCE to
transfer
mTcgNvs->PhysicalPresence.Parameter data.
5. Add parameter FunctionIndex to
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx
to initialize the PPdata.
Background:
Some platforms implement their own Tcg2PpVendorLib and want to operate
with more parameters.

#1-#2 and #4-#5 changes aim to add extend the interface with PPdata. PPdata
pointer can transfer most of the required parameter to do the operation.
All the extend changes is for the PPdata and transfer to the platform
implemented interfaces. This would affect the platforms which implement
their
own Tcg2PpVendorLib.
But for open source platform, I didn't see any implementation of it.

#3 aims to add a pcd to let the customers to decide whether to wait for the
input forever or with a timeout count.

6. Move Tcg2ConfigNvData.h from SecurityPkg/Tcg/Tcg2Config to
SecurityPkg/Include.
It is useful for platform code to implement their own
Tcg2PhysicalPresenceLib.

#6 is a movement to decrease the duplicated code at platform side if the
platform code implement its own TCG library or driver.

7. Replace the ASSERT with error code return in TpmPhysicalPresenceLib
#7 aims to remove the ASSERT because it is not critical. ASSERT when fail to
call
TpmPhysicalPresence and GetTpmCapability is not a good behavior.

8. Fix one operation
(PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE) flow of
TcgPhysicalPresenceLib (refer to Physical Presence Interface Spec Page 37).
#8 is a bug fix to follow the spec.

Thanks,
Zhichao


Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Chao Zhang <chao.b.zhang@...>
Cc: Jordan Justen <jordan.l.justen@...>
Cc: Laszlo Ersek <lersek@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>
Cc: Marc-André Lureau <marcandre.lureau@...>
Cc: Stefan Berger <stefanb@...>
Signed-off-by: Zhichao Gao <zhichao.gao@...> Zhichao Gao (13):
SecurityPkg/Tcg2PpVerndorLib: Add two Ex function to handle PPdata
SecurityPkg/Tcg2PpVendorLib: Add implementation of new Ex function
SecurityPkg/Tcg2PhysicalPresenceLib: Use the new Ex function
SecurityPkg/SmmTcg2PhysicalPresenceLib: Use the new Ex function
SecurityPkg/dec: Add a pcd for user response wait time
OvmfPkg/Tcg2PhysicalPresenceLib: Use pcd for user response wait time
SecurityPkg/Tcg2PhysicalPresenceLib: Use Pcd for user resp wait time
SecurityPkg/TcgPyhsicalPresenceLib: Use Pcd for user resp wait time
SecurityPkg/Tcg2PhysicalPresenceData.h: Add FunctionIndex for PPdata
SecurityPkg/Tcg2PhysicalPresenceLib: Extend the submit preOS func
SecurityPkg: Move the Tcg2ConfigNvData.h to Include folder
SecurityPkg/TcgPhysicalPresenceLib: Replace the ASSERT with error code
SecurityPkg/TcgPhysicalPresenceLib: Fix the operation of 11

.../DxeTcg2PhysicalPresenceLib.c | 63 +++++++---
.../DxeTcg2PhysicalPresenceLib.inf | 6 +-
.../Include/Guid/Tcg2PhysicalPresenceData.h | 3 +-
.../Include/Library/Tcg2PhysicalPresenceLib.h | 4 +-
SecurityPkg/Include/Library/Tcg2PpVendorLib.h | 54 ++++++++-
.../Tcg2Config => Include}/Tcg2ConfigNvData.h | 2 +-
.../DxeTcg2PhysicalPresenceLib.c | 68 ++++++++---
.../DxeTcg2PhysicalPresenceLib.inf | 4 +-
.../DxeTcgPhysicalPresenceLib.c | 110 ++++++++++++------
.../DxeTcgPhysicalPresenceLib.inf | 6 +-
.../SmmTcg2PhysicalPresenceLib.c | 15 ++-
.../Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c | 61 +++++++++-
SecurityPkg/SecurityPkg.dec | 7 +-
SecurityPkg/SecurityPkg.uni | 7 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf | 3 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 3 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 4 +-
SecurityPkg/Tcg/Tcg2Config/TpmDetection.c | 4 +-
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 10 +-
21 files changed, 347 insertions(+), 95 deletions(-) rename
SecurityPkg/{Tcg/Tcg2Config => Include}/Tcg2ConfigNvData.h (94%)

--
2.21.0.windows.1


Re: [PATCH] MdeModulePkg PeiCore: Install SEC PPIs before library constructor call

Liming Gao
 

This change looks good. What functionality test have been done?

-----Original Message-----
From: Pankaj Bansal <pankaj.bansal@...>
Sent: 2019年12月29日 12:54
To: devel@edk2.groups.io
Cc: Pankaj Bansal <pankaj.bansal@...>; Bi, Dandan <dandan.bi@...>; Gao, Liming <liming.gao@...>
Subject: [PATCH] MdeModulePkg PeiCore: Install SEC PPIs before library constructor call

Install PPIs received from SEC phase before library constructor call, so that any platform specific library can make use of the PPIs exposed by SEC phase.

Since SEC phase can expose HOBs also in PPI list, we need to Initialize memory service before installing SEC PPIs.

Therefore, the sequence becomes:
Initialize memory -> install SEC PPIs -> Call libraries' constructors

Signed-off-by: Pankaj Bansal <pankaj.bansal@...>

Cc: Dandan Bi <dandan.bi@...>
Cc: Liming Gao <liming.gao@...>
---
MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 24 ++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
index 025d7f98ec..3dd69ddde0 100644
--- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
+++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
@@ -366,14 +366,23 @@ PeiCore (
SetPeiServicesTablePointer ((CONST EFI_PEI_SERVICES **)&PrivateData.Ps);

//
- // Initialize libraries that the PEI Core is linked against
+ // Initialize PEI Core Services
//
- ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES **)&PrivateData.Ps);
+ InitializeMemoryServices (&PrivateData, SecCoreData, OldCoreData);
+
+ if (OldCoreData == NULL) {
+ //
+ // If SEC provided the PpiList, process it.
+ //
+ if (PpiList != NULL) {
+ ProcessPpiListFromSec ((CONST EFI_PEI_SERVICES **) &PrivateData.Ps, PpiList);
+ }
+ }

//
- // Initialize PEI Core Services
+ // Initialize libraries that the PEI Core is linked against
//
- InitializeMemoryServices (&PrivateData, SecCoreData, OldCoreData);
+ ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES
+ **)&PrivateData.Ps);

//
// Update performance measurements
@@ -410,13 +419,6 @@ PeiCore (
EFI_PROGRESS_CODE,
(EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT)
);
-
- //
- // If SEC provided the PpiList, process it.
- //
- if (PpiList != NULL) {
- ProcessPpiListFromSec ((CONST EFI_PEI_SERVICES **) &PrivateData.Ps, PpiList);
- }
} else {
//
// Try to locate Temporary RAM Done Ppi.
--
2.17.1


Re: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence Interface

Yao, Jiewen
 

What is the platform use case?
Please give at least some examples.

-----Original Message-----
From: Gao, Zhichao <zhichao.gao@...>
Sent: Friday, January 3, 2020 1:08 PM
To: Yao, Jiewen <jiewen.yao@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Zhang, Chao B
<chao.b.zhang@...>; Justen, Jordan L <jordan.l.justen@...>;
Laszlo Ersek <lersek@...>; Ard Biesheuvel <ard.biesheuvel@...>;
Marc-André Lureau <marcandre.lureau@...>; Stefan Berger
<stefanb@...>
Subject: RE: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence
Interface

See below.

-----Original Message-----
From: Yao, Jiewen
Sent: Friday, January 3, 2020 11:09 AM
To: Gao, Zhichao <zhichao.gao@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Zhang, Chao B
<chao.b.zhang@...>; Justen, Jordan L <jordan.l.justen@...>;
Laszlo Ersek <lersek@...>; Ard Biesheuvel
<ard.biesheuvel@...>; Marc-André Lureau
<marcandre.lureau@...>; Stefan Berger <stefanb@...>
Subject: RE: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence
Interface

Hi
I am not clear on the purpose of this extension.

The Bugzilla just describes the solution.
But what is the problem you are trying to resolve?

I completely don’t understand.

Please do consider add the background information there.
Or it is hard for me to comment.


Thank you
Yao Jiewen

-----Original Message-----
From: Gao, Zhichao <zhichao.gao@...>
Sent: Friday, January 3, 2020 11:04 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen <jiewen.yao@...>; Wang, Jian J
<jian.j.wang@...>; Zhang, Chao B <chao.b.zhang@...>;
Justen, Jordan L <jordan.l.justen@...>; Laszlo Ersek
<lersek@...>; Ard Biesheuvel <ard.biesheuvel@...>;
Marc-André Lureau <marcandre.lureau@...>; Stefan Berger
<stefanb@...>
Subject: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence
Interface

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2443

1. Add two interfaces Tcg2PpVendorLibExecutePendingRequestEx and
Tcg2PpVendorLibSubmitRequestToPreOSFunctionEx to Tcg2PpVendorLib. It
has one more parameter PPData (type EFI_TCG2_PHYSICAL_PRESENCE) to
transfer more data.
2. Use the Ex version instead of original one in
Tcg2PhysicalPresenceLib 3. Add a pcd
PcdPhysicalPresenceUserConfirmTimeout to control the user confirm
input key timeout.
4. Add FunctionIndex to structure type EFI_TCG2_PHYSICAL_PRESENCE to
transfer
mTcgNvs->PhysicalPresence.Parameter data.
5. Add parameter FunctionIndex to
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx
to initialize the PPdata.
Background:
Some platforms implement their own Tcg2PpVendorLib and want to operate
with more parameters.

#1-#2 and #4-#5 changes aim to add extend the interface with PPdata. PPdata
pointer can transfer most of the required parameter to do the operation.
All the extend changes is for the PPdata and transfer to the platform
implemented interfaces. This would affect the platforms which implement their
own Tcg2PpVendorLib.
But for open source platform, I didn't see any implementation of it.

#3 aims to add a pcd to let the customers to decide whether to wait for the
input forever or with a timeout count.

6. Move Tcg2ConfigNvData.h from SecurityPkg/Tcg/Tcg2Config to
SecurityPkg/Include.
It is useful for platform code to implement their own
Tcg2PhysicalPresenceLib.

#6 is a movement to decrease the duplicated code at platform side if the
platform code implement its own TCG library or driver.

7. Replace the ASSERT with error code return in TpmPhysicalPresenceLib
#7 aims to remove the ASSERT because it is not critical. ASSERT when fail to call
TpmPhysicalPresence and GetTpmCapability is not a good behavior.

8. Fix one operation
(PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE) flow of
TcgPhysicalPresenceLib (refer to Physical Presence Interface Spec Page 37).
#8 is a bug fix to follow the spec.

Thanks,
Zhichao


Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Chao Zhang <chao.b.zhang@...>
Cc: Jordan Justen <jordan.l.justen@...>
Cc: Laszlo Ersek <lersek@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>
Cc: Marc-André Lureau <marcandre.lureau@...>
Cc: Stefan Berger <stefanb@...>
Signed-off-by: Zhichao Gao <zhichao.gao@...> Zhichao Gao (13):
SecurityPkg/Tcg2PpVerndorLib: Add two Ex function to handle PPdata
SecurityPkg/Tcg2PpVendorLib: Add implementation of new Ex function
SecurityPkg/Tcg2PhysicalPresenceLib: Use the new Ex function
SecurityPkg/SmmTcg2PhysicalPresenceLib: Use the new Ex function
SecurityPkg/dec: Add a pcd for user response wait time
OvmfPkg/Tcg2PhysicalPresenceLib: Use pcd for user response wait time
SecurityPkg/Tcg2PhysicalPresenceLib: Use Pcd for user resp wait time
SecurityPkg/TcgPyhsicalPresenceLib: Use Pcd for user resp wait time
SecurityPkg/Tcg2PhysicalPresenceData.h: Add FunctionIndex for PPdata
SecurityPkg/Tcg2PhysicalPresenceLib: Extend the submit preOS func
SecurityPkg: Move the Tcg2ConfigNvData.h to Include folder
SecurityPkg/TcgPhysicalPresenceLib: Replace the ASSERT with error code
SecurityPkg/TcgPhysicalPresenceLib: Fix the operation of 11

.../DxeTcg2PhysicalPresenceLib.c | 63 +++++++---
.../DxeTcg2PhysicalPresenceLib.inf | 6 +-
.../Include/Guid/Tcg2PhysicalPresenceData.h | 3 +-
.../Include/Library/Tcg2PhysicalPresenceLib.h | 4 +-
SecurityPkg/Include/Library/Tcg2PpVendorLib.h | 54 ++++++++-
.../Tcg2Config => Include}/Tcg2ConfigNvData.h | 2 +-
.../DxeTcg2PhysicalPresenceLib.c | 68 ++++++++---
.../DxeTcg2PhysicalPresenceLib.inf | 4 +-
.../DxeTcgPhysicalPresenceLib.c | 110 ++++++++++++------
.../DxeTcgPhysicalPresenceLib.inf | 6 +-
.../SmmTcg2PhysicalPresenceLib.c | 15 ++-
.../Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c | 61 +++++++++-
SecurityPkg/SecurityPkg.dec | 7 +-
SecurityPkg/SecurityPkg.uni | 7 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf | 3 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 3 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 4 +-
SecurityPkg/Tcg/Tcg2Config/TpmDetection.c | 4 +-
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 10 +-
21 files changed, 347 insertions(+), 95 deletions(-) rename
SecurityPkg/{Tcg/Tcg2Config => Include}/Tcg2ConfigNvData.h (94%)

--
2.21.0.windows.1


Re: [PATCH v2 0/1] MdeModulePkg/Usb/EfiKey: Fix endpoint selection

Wu, Hao A
 

I found that besides the UsbKbDxe & UsbMouseDxe drivers, UsbMouseAbsolutePointerDxe
has a similar issue. Could you help to address it as well?

Really sorry about this, I should have caught this earlier.

Best Regards,
Hao Wu

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
MrChromebox
Sent: Friday, January 03, 2020 11:43 AM
To: devel@edk2.groups.io
Cc: Matt DeVillier
Subject: [edk2-devel] [PATCH v2 0/1] MdeModulePkg/Usb/EfiKey: Fix
endpoint selection

USB keyboard initialization fails if the OUT interrupt
endpoint precedes the IN endpoint. Fix that.

Matt DeVillier (1):
MdeModulePkg/Usb/EfiKey: Fix endpoint selection

MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--
2.20.1



Event: TianoCore Design Meeting - APAC/NAMO #cal-invite

devel@edk2.groups.io Calendar <devel@...>
 

TianoCore Design Meeting - APAC/NAMO

When:
Friday, 10 January 2020
9:30am to 10:30am
(UTC+08:00) Asia/Chongqing
Repeats: Every 2 weeks on Friday, 100 times

Where:
BlueJeans Meeting

Organizer: Ray Ni ray.ni@...

Description:

For more info, see here:

https://www.tianocore.org/design-meeting/

To join the meeting on a computer or mobile phone:

https://bluejeans.com/889357567?src=calendarLink

Phone Dial-in

+1.408.740.7256 (US (San Jose))

+1.408.317.9253 (US (Primary, San Jose))

Global Numbers: https://www.bluejeans.com/numbers

Meeting ID: 889 357 567

Room System

199.48.152.152 or bjn.vc

Meeting ID: 889 357 567

Want to test your video connection?

https://bluejeans.com/111


Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: build_linux_installer.py path fixes

Philippe Mathieu-Daudé <philmd@...>
 

Hi Nate,

From: Nate DeSimone <nathaniel.l.desimone@...>
Make path handling in build_linux_installer.py more platform agnostic
Cc: Ashley DeSimone <ashley.e.desimone@...>
Cc: Puja Pandya <puja.pandya@...>
Cc: Erik Bjorge <erik.c.bjorge@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@...>
---
build-scripts/build_linux_installer.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/build-scripts/build_linux_installer.py b/build-scripts/build_linux_installer.py
index 84ccf79..df316b9 100755
--- a/build-scripts/build_linux_installer.py
+++ b/build-scripts/build_linux_installer.py
@@ -21,7 +21,7 @@ def main():
os.environ['BUILD_NUMBER'] = args.build
# Step 1: Create required directory structure
- dist_root = os.path.abspath('../dist/self_extract')
+ dist_root = os.path.abspath('..{0}dist{0}self_extract'.format(os.sep))
The rest of this file already use os.path.join(), can we use it instead of format(os.sep)?

dist_root = os.path.abspath(os.path.join('..', 'dist', 'self_extract'))

if not os.path.isdir(os.path.join(dist_root, 'wheels')):
os.makedirs(os.path.join(dist_root, 'wheels'))
if not os.path.isdir(os.path.join(dist_root, 'config')):
@@ -35,7 +35,7 @@ def main():
return 1
# Step 3: Copy required files
- inst_root = os.path.abspath('../edkrepo_installer')
+ inst_root = os.path.abspath('..{0}edkrepo_installer'.format(os.sep))
inst_root = os.path.abspath(os.path.join('..', 'edkrepo_installer'))

ven_root = os.path.join(inst_root, 'Vendor')
linux_root = os.path.join(inst_root, 'linux-scripts')
try:
@@ -55,7 +55,7 @@ def main():
# Step 4: Package installer files
try:
- subprocess.run('./final_copy.py', check=True)
+ subprocess.run('.{0}final_copy.py'.format(os.sep), check=True)
Maybe we can directly simplify as:

subprocess.run('final_copy.py', check=True)

except:
print('Failed to generate installer package')
return 1
@@ -65,7 +65,7 @@ def main():
shutil.rmtree(dist_root, ignore_errors=True)
except:
print('Failed to remove temporary files')
- os.unlink('./final_copy.py')
+ os.unlink('.{0}final_copy.py'.format(os.sep))
Similarly:

os.unlink('final_copy.py')

return 0
--
2.20.1


Re: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence Interface

Gao, Zhichao
 

See below.

-----Original Message-----
From: Yao, Jiewen
Sent: Friday, January 3, 2020 11:09 AM
To: Gao, Zhichao <zhichao.gao@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Zhang, Chao B
<chao.b.zhang@...>; Justen, Jordan L <jordan.l.justen@...>;
Laszlo Ersek <lersek@...>; Ard Biesheuvel
<ard.biesheuvel@...>; Marc-André Lureau
<marcandre.lureau@...>; Stefan Berger <stefanb@...>
Subject: RE: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence
Interface

Hi
I am not clear on the purpose of this extension.

The Bugzilla just describes the solution.
But what is the problem you are trying to resolve?

I completely don’t understand.

Please do consider add the background information there.
Or it is hard for me to comment.


Thank you
Yao Jiewen

-----Original Message-----
From: Gao, Zhichao <zhichao.gao@...>
Sent: Friday, January 3, 2020 11:04 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen <jiewen.yao@...>; Wang, Jian J
<jian.j.wang@...>; Zhang, Chao B <chao.b.zhang@...>;
Justen, Jordan L <jordan.l.justen@...>; Laszlo Ersek
<lersek@...>; Ard Biesheuvel <ard.biesheuvel@...>;
Marc-André Lureau <marcandre.lureau@...>; Stefan Berger
<stefanb@...>
Subject: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence
Interface

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2443

1. Add two interfaces Tcg2PpVendorLibExecutePendingRequestEx and
Tcg2PpVendorLibSubmitRequestToPreOSFunctionEx to Tcg2PpVendorLib. It
has one more parameter PPData (type EFI_TCG2_PHYSICAL_PRESENCE) to
transfer more data.
2. Use the Ex version instead of original one in
Tcg2PhysicalPresenceLib 3. Add a pcd
PcdPhysicalPresenceUserConfirmTimeout to control the user confirm
input key timeout.
4. Add FunctionIndex to structure type EFI_TCG2_PHYSICAL_PRESENCE to
transfer
mTcgNvs->PhysicalPresence.Parameter data.
5. Add parameter FunctionIndex to
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx
to initialize the PPdata.
Background:
Some platforms implement their own Tcg2PpVendorLib and want to operate with more parameters.

#1-#2 and #4-#5 changes aim to add extend the interface with PPdata. PPdata pointer can transfer most of the required parameter to do the operation.
All the extend changes is for the PPdata and transfer to the platform implemented interfaces. This would affect the platforms which implement their own Tcg2PpVendorLib.
But for open source platform, I didn't see any implementation of it.

#3 aims to add a pcd to let the customers to decide whether to wait for the input forever or with a timeout count.

6. Move Tcg2ConfigNvData.h from SecurityPkg/Tcg/Tcg2Config to
SecurityPkg/Include.
It is useful for platform code to implement their own Tcg2PhysicalPresenceLib.
#6 is a movement to decrease the duplicated code at platform side if the platform code implement its own TCG library or driver.

7. Replace the ASSERT with error code return in TpmPhysicalPresenceLib
#7 aims to remove the ASSERT because it is not critical. ASSERT when fail to call TpmPhysicalPresence and GetTpmCapability is not a good behavior.

8. Fix one operation
(PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE) flow of
TcgPhysicalPresenceLib (refer to Physical Presence Interface Spec Page 37).
#8 is a bug fix to follow the spec.

Thanks,
Zhichao


Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Chao Zhang <chao.b.zhang@...>
Cc: Jordan Justen <jordan.l.justen@...>
Cc: Laszlo Ersek <lersek@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>
Cc: Marc-André Lureau <marcandre.lureau@...>
Cc: Stefan Berger <stefanb@...>
Signed-off-by: Zhichao Gao <zhichao.gao@...> Zhichao Gao (13):
SecurityPkg/Tcg2PpVerndorLib: Add two Ex function to handle PPdata
SecurityPkg/Tcg2PpVendorLib: Add implementation of new Ex function
SecurityPkg/Tcg2PhysicalPresenceLib: Use the new Ex function
SecurityPkg/SmmTcg2PhysicalPresenceLib: Use the new Ex function
SecurityPkg/dec: Add a pcd for user response wait time
OvmfPkg/Tcg2PhysicalPresenceLib: Use pcd for user response wait time
SecurityPkg/Tcg2PhysicalPresenceLib: Use Pcd for user resp wait time
SecurityPkg/TcgPyhsicalPresenceLib: Use Pcd for user resp wait time
SecurityPkg/Tcg2PhysicalPresenceData.h: Add FunctionIndex for PPdata
SecurityPkg/Tcg2PhysicalPresenceLib: Extend the submit preOS func
SecurityPkg: Move the Tcg2ConfigNvData.h to Include folder
SecurityPkg/TcgPhysicalPresenceLib: Replace the ASSERT with error code
SecurityPkg/TcgPhysicalPresenceLib: Fix the operation of 11

.../DxeTcg2PhysicalPresenceLib.c | 63 +++++++---
.../DxeTcg2PhysicalPresenceLib.inf | 6 +-
.../Include/Guid/Tcg2PhysicalPresenceData.h | 3 +-
.../Include/Library/Tcg2PhysicalPresenceLib.h | 4 +-
SecurityPkg/Include/Library/Tcg2PpVendorLib.h | 54 ++++++++-
.../Tcg2Config => Include}/Tcg2ConfigNvData.h | 2 +-
.../DxeTcg2PhysicalPresenceLib.c | 68 ++++++++---
.../DxeTcg2PhysicalPresenceLib.inf | 4 +-
.../DxeTcgPhysicalPresenceLib.c | 110 ++++++++++++------
.../DxeTcgPhysicalPresenceLib.inf | 6 +-
.../SmmTcg2PhysicalPresenceLib.c | 15 ++-
.../Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c | 61 +++++++++-
SecurityPkg/SecurityPkg.dec | 7 +-
SecurityPkg/SecurityPkg.uni | 7 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf | 3 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 3 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 4 +-
SecurityPkg/Tcg/Tcg2Config/TpmDetection.c | 4 +-
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 10 +-
21 files changed, 347 insertions(+), 95 deletions(-) rename
SecurityPkg/{Tcg/Tcg2Config => Include}/Tcg2ConfigNvData.h (94%)

--
2.21.0.windows.1


[PATCH v2 2/2] MdeModulePkg/Usb/UsbMouse: Fix endpoint selection

MrChromebox
 

The endpoint selected by the driver needs to not
only be an interrupt type, but have direction IN
as required to set up an asynchronous interrupt transfer.

Currently, the driver assumes that the first INT endpoint
will be of type IN, but that is not true of all devices,
and will silently fail on devices which have the OUT endpoint
before the IN. Adjust the endpoint selection loop to explictly
check for direction IN.

Signed-off-by: Matt DeVillier <matt.devillier@...>
---
MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
index 677815a8ad..143ff15eb0 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
@@ -203,7 +203,7 @@ USBMouseDriverBindingStart (
EndpointNumber = UsbMouseDevice->InterfaceDescriptor.NumEndpoints;

//
- // Traverse endpoints to find interrupt endpoint
+ // Traverse endpoints to find interrupt endpoint IN
//
Found = FALSE;
for (Index = 0; Index < EndpointNumber; Index++) {
@@ -213,7 +213,8 @@ USBMouseDriverBindingStart (
&EndpointDescriptor
);

- if ((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) {
+ if (((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) &&
+ ((EndpointDescriptor.EndpointAddress & USB_ENDPOINT_DIR_IN) != 0)) {
//
// We only care interrupt endpoint here
//
--
2.20.1


[PATCH v2 1/1] MdeModulePkg/Usb/EfiKey: Fix endpoint selection

MrChromebox
 

The endpoint selected by the driver needs to not
only be an interrupt type, but have direction IN
as required to set up an asynchronous interrupt transfer.

Currently, the driver assumes that the first INT endpoint
will be of type IN, but that is not true of all devices,
and will silently fail on devices which have the OUT endpoint
before the IN. Adjust the endpoint selection loop to explictly
check for direction IN.

Test: detachable keyboard on Google Pixel Slate now works.

Signed-off-by: Matt DeVillier <matt.devillier@...>
---
MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
index 27685995c2..ccb389067a 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
@@ -215,7 +215,7 @@ USBKeyboardDriverBindingStart (
EndpointNumber = UsbKeyboardDevice->InterfaceDescriptor.NumEndpoints;

//
- // Traverse endpoints to find interrupt endpoint
+ // Traverse endpoints to find interrupt endpoint IN
//
Found = FALSE;
for (Index = 0; Index < EndpointNumber; Index++) {
@@ -226,7 +226,8 @@ USBKeyboardDriverBindingStart (
&EndpointDescriptor
);

- if ((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) {
+ if (((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) &&
+ ((EndpointDescriptor.EndpointAddress & USB_ENDPOINT_DIR_IN) != 0)) {
//
// We only care interrupt endpoint here
//
--
2.20.1


[PATCH v2 0/1] MdeModulePkg/Usb/EfiKey: Fix endpoint selection

MrChromebox
 

USB keyboard initialization fails if the OUT interrupt
endpoint precedes the IN endpoint. Fix that.

Matt DeVillier (1):
MdeModulePkg/Usb/EfiKey: Fix endpoint selection

MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--
2.20.1


Re: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence Interface

Yao, Jiewen
 

Hi
I am not clear on the purpose of this extension.

The Bugzilla just describes the solution.
But what is the problem you are trying to resolve?

I completely don’t understand.

Please do consider add the background information there.
Or it is hard for me to comment.


Thank you
Yao Jiewen

-----Original Message-----
From: Gao, Zhichao <zhichao.gao@...>
Sent: Friday, January 3, 2020 11:04 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen <jiewen.yao@...>; Wang, Jian J <jian.j.wang@...>;
Zhang, Chao B <chao.b.zhang@...>; Justen, Jordan L
<jordan.l.justen@...>; Laszlo Ersek <lersek@...>; Ard Biesheuvel
<ard.biesheuvel@...>; Marc-André Lureau
<marcandre.lureau@...>; Stefan Berger <stefanb@...>
Subject: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence Interface

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2443

1. Add two interfaces Tcg2PpVendorLibExecutePendingRequestEx and
Tcg2PpVendorLibSubmitRequestToPreOSFunctionEx to Tcg2PpVendorLib. It has
one
more parameter PPData (type EFI_TCG2_PHYSICAL_PRESENCE) to transfer more
data.
2. Use the Ex version instead of original one in Tcg2PhysicalPresenceLib
3. Add a pcd PcdPhysicalPresenceUserConfirmTimeout to control the user
confirm
input key timeout.
4. Add FunctionIndex to structure type EFI_TCG2_PHYSICAL_PRESENCE to
transfer
mTcgNvs->PhysicalPresence.Parameter data.
5. Add parameter FunctionIndex to
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx
to initialize the PPdata.
6. Move Tcg2ConfigNvData.h from SecurityPkg/Tcg/Tcg2Config to
SecurityPkg/Include.
It is useful for platform code to implement their own Tcg2PhysicalPresenceLib.
7. Replace the ASSERT with error code return in TpmPhysicalPresenceLib
8. Fix one operation
(PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE) flow of
TcgPhysicalPresenceLib (refer to Physical Presence Interface Spec Page 37).

Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Chao Zhang <chao.b.zhang@...>
Cc: Jordan Justen <jordan.l.justen@...>
Cc: Laszlo Ersek <lersek@...>
Cc: Ard Biesheuvel <ard.biesheuvel@...>
Cc: Marc-André Lureau <marcandre.lureau@...>
Cc: Stefan Berger <stefanb@...>
Signed-off-by: Zhichao Gao <zhichao.gao@...>
Zhichao Gao (13):
SecurityPkg/Tcg2PpVerndorLib: Add two Ex function to handle PPdata
SecurityPkg/Tcg2PpVendorLib: Add implementation of new Ex function
SecurityPkg/Tcg2PhysicalPresenceLib: Use the new Ex function
SecurityPkg/SmmTcg2PhysicalPresenceLib: Use the new Ex function
SecurityPkg/dec: Add a pcd for user response wait time
OvmfPkg/Tcg2PhysicalPresenceLib: Use pcd for user response wait time
SecurityPkg/Tcg2PhysicalPresenceLib: Use Pcd for user resp wait time
SecurityPkg/TcgPyhsicalPresenceLib: Use Pcd for user resp wait time
SecurityPkg/Tcg2PhysicalPresenceData.h: Add FunctionIndex for PPdata
SecurityPkg/Tcg2PhysicalPresenceLib: Extend the submit preOS func
SecurityPkg: Move the Tcg2ConfigNvData.h to Include folder
SecurityPkg/TcgPhysicalPresenceLib: Replace the ASSERT with error code
SecurityPkg/TcgPhysicalPresenceLib: Fix the operation of 11

.../DxeTcg2PhysicalPresenceLib.c | 63 +++++++---
.../DxeTcg2PhysicalPresenceLib.inf | 6 +-
.../Include/Guid/Tcg2PhysicalPresenceData.h | 3 +-
.../Include/Library/Tcg2PhysicalPresenceLib.h | 4 +-
SecurityPkg/Include/Library/Tcg2PpVendorLib.h | 54 ++++++++-
.../Tcg2Config => Include}/Tcg2ConfigNvData.h | 2 +-
.../DxeTcg2PhysicalPresenceLib.c | 68 ++++++++---
.../DxeTcg2PhysicalPresenceLib.inf | 4 +-
.../DxeTcgPhysicalPresenceLib.c | 110 ++++++++++++------
.../DxeTcgPhysicalPresenceLib.inf | 6 +-
.../SmmTcg2PhysicalPresenceLib.c | 15 ++-
.../Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c | 61 +++++++++-
SecurityPkg/SecurityPkg.dec | 7 +-
SecurityPkg/SecurityPkg.uni | 7 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf | 3 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 3 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 4 +-
SecurityPkg/Tcg/Tcg2Config/TpmDetection.c | 4 +-
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 10 +-
21 files changed, 347 insertions(+), 95 deletions(-)
rename SecurityPkg/{Tcg/Tcg2Config => Include}/Tcg2ConfigNvData.h (94%)

--
2.21.0.windows.1


[PATCH 13/13] SecurityPkg/TcgPhysicalPresenceLib: Fix the operation of 11

Gao, Zhichao
 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2443

Refer to Physical Presence Interface Spec Page 37, the firmware
may perform the PLATFORM RESET imediately after the
TPM_PhysicalSetDeactivated = TRUE but that requires tracking
the next command.
Change the operation to match the spec.

Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Chao Zhang <chao.b.zhang@...>
Signed-off-by: Zhichao Gao <zhichao.gao@...>
---
.../DxeTcgPhysicalPresenceLib.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
index 7fb2ef9735..de339c9703 100644
--- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
+++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
@@ -346,9 +346,16 @@ ExecutePhysicalPresence (
return TpmResponse;

case PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE:
- TpmResponse = ExecutePhysicalPresence (TcgProtocol, PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE, PpiFlags);
- if (TpmResponse == 0) {
+ //
+ // PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE + PHYSICAL_PRESENCE_DEACTIVATE_DISABLE
+ // PHYSICAL_PRESENCE_DEACTIVATE_DISABLE will be executed after reboot
+ //
+ if ((PpiFlags->PPFlags & TCG_VENDOR_LIB_FLAG_RESET_TRACK) == 0) {
+ TpmResponse = ExecutePhysicalPresence (TcgProtocol, PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE, PpiFlags);
+ PpiFlags->PPFlags |= TCG_VENDOR_LIB_FLAG_RESET_TRACK;
+ } else {
TpmResponse = ExecutePhysicalPresence (TcgProtocol, PHYSICAL_PRESENCE_DEACTIVATE_DISABLE, PpiFlags);
+ PpiFlags->PPFlags &= ~TCG_VENDOR_LIB_FLAG_RESET_TRACK;
}
return TpmResponse;

--
2.21.0.windows.1


[PATCH 12/13] SecurityPkg/TcgPhysicalPresenceLib: Replace the ASSERT with error code

Gao, Zhichao
 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2443

Replace the ASSERT with the error code return in the TpmPhysicalPresence
and GetTpmCapability.
Add missing error checking after call TpmPhysicalPresence in
TcgPhysicalPresenceLibProcessRequest.

Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Chao Zhang <chao.b.zhang@...>
Signed-off-by: Zhichao Gao <zhichao.gao@...>
---
.../DxeTcgPhysicalPresenceLib.c | 23 +++++++++++++++----
1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
index 14423991f0..7fb2ef9735 100644
--- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
+++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
@@ -104,9 +104,13 @@ GetTpmCapability (
sizeof (RecvBuffer),
(UINT8*)&RecvBuffer
);
- ASSERT_EFI_ERROR (Status);
- ASSERT (TpmRsp->tag == SwapBytes16 (TPM_TAG_RSP_COMMAND));
- ASSERT (TpmRsp->returnCode == 0);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ if ((TpmRsp->tag != SwapBytes16 (TPM_TAG_RSP_COMMAND)) || (TpmRsp->returnCode != 0)) {
+ return EFI_DEVICE_ERROR;
+ }

TpmPermanentFlags = (TPM_PERMANENT_FLAGS *)&RecvBuffer[sizeof (TPM_RSP_COMMAND_HDR) + sizeof (UINT32)];

@@ -159,8 +163,14 @@ TpmPhysicalPresence (
sizeof (TpmRsp),
(UINT8*)&TpmRsp
);
- ASSERT_EFI_ERROR (Status);
- ASSERT (TpmRsp.tag == SwapBytes16 (TPM_TAG_RSP_COMMAND));
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ if (TpmRsp.tag != SwapBytes16 (TPM_TAG_RSP_COMMAND)) {
+ return EFI_DEVICE_ERROR;
+ }
+
if (TpmRsp.returnCode != 0) {
//
// If it fails, some requirements may be needed for this command.
@@ -1298,6 +1308,9 @@ TcgPhysicalPresenceLibProcessRequest (
// Set operator physical presence flags
//
TpmPhysicalPresence (TcgProtocol, TPM_PHYSICAL_PRESENCE_PRESENT);
+ if (EFI_ERROR (Status)) {
+ return;
+ }

//
// Execute pending TPM request.
--
2.21.0.windows.1