diff options
Diffstat (limited to 'EdkModulePkg/Universal')
67 files changed, 782 insertions, 591 deletions
diff --git a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c index 973f13d0f3..34d6f266e9 100644 --- a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c +++ b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c @@ -531,6 +531,7 @@ ConSplitterTextOutConstructor ( return Status;
}
+STATIC
EFI_STATUS
ConSplitterSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
@@ -717,6 +718,7 @@ Returns: );
}
+STATIC
EFI_STATUS
EFIAPI
ConSplitterStart (
@@ -1026,6 +1028,7 @@ Returns: return Status;
}
+STATIC
EFI_STATUS
EFIAPI
ConSplitterStop (
@@ -1499,6 +1502,7 @@ Returns: return EFI_NOT_FOUND;
}
+STATIC
EFI_STATUS
ConSplitterGrowMapTable (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
@@ -1575,6 +1579,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
ConSplitterAddOutputMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
@@ -1642,6 +1647,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
VOID
ConSplitterGetIntersection (
IN INT32 *TextOutModeMap,
@@ -1694,6 +1700,7 @@ ConSplitterGetIntersection ( return ;
}
+STATIC
VOID
ConSplitterSyncOutputMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
@@ -1712,7 +1719,6 @@ Returns: --*/
{
- INT32 CurrentMode;
INT32 CurrentMaxMode;
INT32 Mode;
INT32 Index;
@@ -1726,7 +1732,6 @@ Returns: //
// Must make sure that current mode won't change even if mode number changes
//
- CurrentMode = Private->TextOutMode.Mode;
CurrentMaxMode = Private->TextOutMode.MaxMode;
TextOutModeMap = Private->TextOutModeMap;
StepSize = Private->TextOutListCount;
@@ -1771,6 +1776,7 @@ Returns: return ;
}
+STATIC
EFI_STATUS
ConSplitterGetIntersectionBetweenConOutAndStrErr (
VOID
@@ -1796,8 +1802,6 @@ Returns: UINTN Indexj;
UINTN Rows;
UINTN Columns;
- INT32 ConOutCurrentMode;
- INT32 StdErrCurrentMode;
INT32 ConOutMaxMode;
INT32 StdErrMaxMode;
INT32 Mode;
@@ -1808,8 +1812,6 @@ Returns: INT32 *StdErrMapTable;
TEXT_OUT_SPLITTER_QUERY_DATA *ConOutQueryData;
TEXT_OUT_SPLITTER_QUERY_DATA *StdErrQueryData;
- UINTN ConOutStepSize;
- UINTN StdErrStepSize;
BOOLEAN FoundTheSameTextOut;
UINTN ConOutMapTableSize;
UINTN StdErrMapTableSize;
@@ -1843,16 +1845,12 @@ Returns: //
// Must make sure that current mode won't change even if mode number changes
//
- ConOutCurrentMode = mConOut.TextOutMode.Mode;
ConOutMaxMode = mConOut.TextOutMode.MaxMode;
ConOutModeMap = mConOut.TextOutModeMap;
- ConOutStepSize = mConOut.TextOutListCount;
ConOutQueryData = mConOut.TextOutQueryData;
- StdErrCurrentMode = mStdErr.TextOutMode.Mode;
StdErrMaxMode = mStdErr.TextOutMode.MaxMode;
StdErrModeMap = mStdErr.TextOutModeMap;
- StdErrStepSize = mStdErr.TextOutListCount;
StdErrQueryData = mStdErr.TextOutQueryData;
//
@@ -1933,6 +1931,7 @@ Returns: }
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+STATIC
EFI_STATUS
ConSplitterAddGraphicsOutputMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
@@ -2726,6 +2725,7 @@ ConSplitterSimplePointerReset ( return ReturnStatus;
}
+STATIC
EFI_STATUS
EFIAPI
ConSplitterSimplePointerPrivateGetState (
diff --git a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h index 8ca743cbe5..4509390e83 100644 --- a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h +++ b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h @@ -578,7 +578,7 @@ DevNullGopSync ( )
;
-#if (EFI_SPECIFICATION < 0x00020000)
+#if (EFI_SPECIFICATION_VERSION < 0x00020000)
EFI_STATUS
EFIAPI
ConSpliterUgaDrawGetMode (
diff --git a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c index 4bc15e6681..cec8adb2fb 100644 --- a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c +++ b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c @@ -355,6 +355,7 @@ Routine Description: return ReturnStatus;
}
+STATIC
EFI_STATUS
DevNullGraphicsOutputBlt (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
diff --git a/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c b/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c index 25b0429b1b..866aaad444 100644 --- a/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c +++ b/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c @@ -1032,10 +1032,8 @@ GraphicsConsoleConOutTestString ( UINT16 GlyphWidth;
UINT32 GlyphStatus;
UINT16 Count;
- GRAPHICS_CONSOLE_DEV *Private;
GLYPH_UNION *Glyph;
- Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
GlyphStatus = 0;
Count = 0;
diff --git a/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c b/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c index 6621b64ace..45eb632e26 100644 --- a/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c +++ b/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c @@ -402,9 +402,9 @@ TerminalDriverBindingStart ( Mode->BaudRate,
Mode->ReceiveFifoDepth,
(UINT32) SerialInTimeOut,
- Mode->Parity,
+ (EFI_PARITY_TYPE) (Mode->Parity),
(UINT8) Mode->DataBits,
- Mode->StopBits
+ (EFI_STOP_BITS_TYPE) (Mode->StopBits)
);
if (EFI_ERROR (Status)) {
//
@@ -897,6 +897,7 @@ TerminalUpdateConsoleDevVariable ( VariableSize,
Variable
);
+ ASSERT_EFI_ERROR (Status);
gBS->FreePool (Variable);
return ;
@@ -1015,6 +1016,7 @@ TerminalRemoveConsoleDevVariable ( VariableSize,
NewVariable
);
+ ASSERT_EFI_ERROR (Status);
}
if (NewVariable != NULL) {
diff --git a/EdkModulePkg/Universal/Console/Terminal/Dxe/TerminalConIn.c b/EdkModulePkg/Universal/Console/Terminal/Dxe/TerminalConIn.c index 3c621384f8..4dbb17eaf7 100644 --- a/EdkModulePkg/Universal/Console/Terminal/Dxe/TerminalConIn.c +++ b/EdkModulePkg/Universal/Console/Terminal/Dxe/TerminalConIn.c @@ -268,9 +268,9 @@ TerminalConInCheckForKey ( Mode->BaudRate,
Mode->ReceiveFifoDepth,
(UINT32) SerialInTimeOut,
- Mode->Parity,
+ (EFI_PARITY_TYPE) (Mode->Parity),
(UINT8) Mode->DataBits,
- Mode->StopBits
+ (EFI_STOP_BITS_TYPE) (Mode->StopBits)
);
if (EFI_ERROR (Status)) {
@@ -681,6 +681,7 @@ UnicodeFiFoGetKeyCount ( }
}
+STATIC
VOID
UnicodeToEfiKeyFlushState (
IN TERMINAL_DEV *TerminalDevice
@@ -1162,6 +1163,7 @@ ESC R ESC r ESC R = Reset System TimerRelative,
(UINT64)20000000
);
+ ASSERT_EFI_ERROR (Status);
continue;
}
diff --git a/EdkModulePkg/Universal/DataHub/DataHub/Dxe/DataHub.c b/EdkModulePkg/Universal/DataHub/DataHub/Dxe/DataHub.c index 01e7a6ed69..0ff5b4fd87 100644 --- a/EdkModulePkg/Universal/DataHub/DataHub/Dxe/DataHub.c +++ b/EdkModulePkg/Universal/DataHub/DataHub/Dxe/DataHub.c @@ -50,6 +50,7 @@ GetNextDataRecord ( IN OUT UINT64 *PtrCurrentMTC
);
+STATIC
EFI_STATUS
EFIAPI
DataHubLogData (
@@ -177,6 +178,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
EFIAPI
DataHubGetNextRecord (
@@ -306,6 +308,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
EFIAPI
DataHubRegisterFilterDriver (
@@ -404,6 +407,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
EFIAPI
DataHubUnregisterFilterDriver (
diff --git a/EdkModulePkg/Universal/DebugSupport/Dxe/ipf/plDebugSupport.h b/EdkModulePkg/Universal/DebugSupport/Dxe/ipf/plDebugSupport.h index 10563ec8d1..71c9578e1e 100644 --- a/EdkModulePkg/Universal/DebugSupport/Dxe/ipf/plDebugSupport.h +++ b/EdkModulePkg/Universal/DebugSupport/Dxe/ipf/plDebugSupport.h @@ -294,4 +294,26 @@ Returns: --*/
;
+VOID
+CommonHandler (
+ IN EFI_EXCEPTION_TYPE ExceptionType,
+ IN EFI_SYSTEM_CONTEXT Context
+ )
+/*++
+
+Routine Description:
+ C routine that is called for all registered exceptions. This is the main
+ exception dispatcher. Must be public because it's referenced from AsmFuncs.s.
+
+Arguments:
+ ExceptionType - Exception Type
+ Context - System Context
+
+Returns:
+
+ Nothing
+
+--*/
+;
+
#endif
diff --git a/EdkModulePkg/Universal/Debugger/Debugport/Dxe/DebugPort.c b/EdkModulePkg/Universal/Debugger/Debugport/Dxe/DebugPort.c index 2152f75cf4..88d19d4ad0 100644 --- a/EdkModulePkg/Universal/Debugger/Debugport/Dxe/DebugPort.c +++ b/EdkModulePkg/Universal/Debugger/Debugport/Dxe/DebugPort.c @@ -29,19 +29,91 @@ Revision History #include "DebugPort.h"
//
-// Misc. functions local to this module
+// Misc. functions local to this module..
//
STATIC
VOID
GetDebugPortVariable (
- DEBUGPORT_DEVICE *DebugPortDevice
- );
+ DEBUGPORT_DEVICE *DebugPortDevice
+ )
+/*++
-EFI_STATUS
-EFIAPI
-ImageUnloadHandler (
- EFI_HANDLE ImageHandle
- );
+Routine Description:
+ Local worker function to obtain device path information from DebugPort variable.
+ Records requested settings in DebugPort device structure.
+
+Arguments:
+ DEBUGPORT_DEVICE *DebugPortDevice,
+
+Returns:
+
+ Nothing
+
+--*/
+{
+ UINTN DataSize;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ EFI_STATUS Status;
+
+ DataSize = 0;
+
+ Status = gRT->GetVariable (
+ (CHAR16 *) EFI_DEBUGPORT_VARIABLE_NAME,
+ &gEfiDebugPortVariableGuid,
+ NULL,
+ &DataSize,
+ DebugPortDevice->DebugPortVariable
+ );
+
+ if (Status == EFI_BUFFER_TOO_SMALL) {
+ if (gDebugPortDevice->DebugPortVariable != NULL) {
+ gBS->FreePool (gDebugPortDevice->DebugPortVariable);
+ }
+
+ DebugPortDevice->DebugPortVariable = AllocatePool (DataSize);
+ if (DebugPortDevice->DebugPortVariable != NULL) {
+ gRT->GetVariable (
+ (CHAR16 *) EFI_DEBUGPORT_VARIABLE_NAME,
+ &gEfiDebugPortVariableGuid,
+ NULL,
+ &DataSize,
+ DebugPortDevice->DebugPortVariable
+ );
+ DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) DebugPortDevice->DebugPortVariable;
+ while (!EfiIsDevicePathEnd (DevicePath) && !EfiIsUartDevicePath (DevicePath)) {
+ DevicePath = EfiNextDevicePathNode (DevicePath);
+ }
+
+ if (EfiIsDevicePathEnd (DevicePath)) {
+ gBS->FreePool (gDebugPortDevice->DebugPortVariable);
+ DebugPortDevice->DebugPortVariable = NULL;
+ } else {
+ gBS->CopyMem (
+ &DebugPortDevice->BaudRate,
+ &((UART_DEVICE_PATH *) DevicePath)->BaudRate,
+ sizeof (((UART_DEVICE_PATH *) DevicePath)->BaudRate)
+ );
+ DebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;
+ DebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;
+ gBS->CopyMem (
+ &DebugPortDevice->Parity,
+ &((UART_DEVICE_PATH *) DevicePath)->Parity,
+ sizeof (((UART_DEVICE_PATH *) DevicePath)->Parity)
+ );
+ gBS->CopyMem (
+ &DebugPortDevice->DataBits,
+ &((UART_DEVICE_PATH *) DevicePath)->DataBits,
+ sizeof (((UART_DEVICE_PATH *) DevicePath)->DataBits)
+ );
+ gBS->CopyMem (
+ &DebugPortDevice->StopBits,
+ &((UART_DEVICE_PATH *) DevicePath)->StopBits,
+ sizeof (((UART_DEVICE_PATH *) DevicePath)->StopBits)
+ );
+ }
+ }
+ }
+}
//
// Globals
@@ -57,8 +129,6 @@ EFI_DRIVER_BINDING_PROTOCOL gDebugPortDriverBinding = { };
DEBUGPORT_DEVICE *gDebugPortDevice;
-static UINT32 mHid16550;
-static UINT32 mHidStdPcComPort;
//
// implementation code
@@ -90,9 +160,6 @@ Returns: --*/
{
- mHid16550 = EFI_ACPI_16550UART_HID;
- mHidStdPcComPort = EFI_ACPI_PC_COMPORT_HID;
-
//
// Allocate and Initialize dev structure
//
@@ -113,9 +180,9 @@ Returns: gDebugPortDevice->BaudRate = DEBUGPORT_UART_DEFAULT_BAUDRATE;
gDebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;
gDebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;
- gDebugPortDevice->Parity = DEBUGPORT_UART_DEFAULT_PARITY;
+ gDebugPortDevice->Parity = (EFI_PARITY_TYPE) DEBUGPORT_UART_DEFAULT_PARITY;
gDebugPortDevice->DataBits = DEBUGPORT_UART_DEFAULT_DATA_BITS;
- gDebugPortDevice->StopBits = DEBUGPORT_UART_DEFAULT_STOP_BITS;
+ gDebugPortDevice->StopBits = (EFI_STOP_BITS_TYPE) DEBUGPORT_UART_DEFAULT_STOP_BITS;
return EFI_SUCCESS;
}
@@ -521,11 +588,9 @@ Returns: --*/
{
- DEBUGPORT_DEVICE *DebugPortDevice;
UINTN BufferSize;
UINTN BitBucket;
- DebugPortDevice = DEBUGPORT_DEVICE_FROM_THIS (This);
while (This->Poll (This) == EFI_SUCCESS) {
BufferSize = 1;
This->Read (This, 0, &BufferSize, &BitBucket);
@@ -694,92 +759,6 @@ Returns: return Status;
}
-//
-// Misc. functions local to this module..
-//
-STATIC
-VOID
-GetDebugPortVariable (
- DEBUGPORT_DEVICE *DebugPortDevice
- )
-/*++
-
-Routine Description:
- Local worker function to obtain device path information from DebugPort variable.
- Records requested settings in DebugPort device structure.
-
-Arguments:
- DEBUGPORT_DEVICE *DebugPortDevice,
-
-Returns:
-
- Nothing
-
---*/
-{
- UINTN DataSize;
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
- EFI_STATUS Status;
-
- DataSize = 0;
-
- Status = gRT->GetVariable (
- (CHAR16 *) EFI_DEBUGPORT_VARIABLE_NAME,
- &gEfiDebugPortVariableGuid,
- NULL,
- &DataSize,
- DebugPortDevice->DebugPortVariable
- );
-
- if (Status == EFI_BUFFER_TOO_SMALL) {
- if (gDebugPortDevice->DebugPortVariable != NULL) {
- gBS->FreePool (gDebugPortDevice->DebugPortVariable);
- }
-
- DebugPortDevice->DebugPortVariable = AllocatePool (DataSize);
- if (DebugPortDevice->DebugPortVariable != NULL) {
- gRT->GetVariable (
- (CHAR16 *) EFI_DEBUGPORT_VARIABLE_NAME,
- &gEfiDebugPortVariableGuid,
- NULL,
- &DataSize,
- DebugPortDevice->DebugPortVariable
- );
- DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) DebugPortDevice->DebugPortVariable;
- while (!EfiIsDevicePathEnd (DevicePath) && !EfiIsUartDevicePath (DevicePath)) {
- DevicePath = EfiNextDevicePathNode (DevicePath);
- }
-
- if (EfiIsDevicePathEnd (DevicePath)) {
- gBS->FreePool (gDebugPortDevice->DebugPortVariable);
- DebugPortDevice->DebugPortVariable = NULL;
- } else {
- gBS->CopyMem (
- &DebugPortDevice->BaudRate,
- &((UART_DEVICE_PATH *) DevicePath)->BaudRate,
- sizeof (((UART_DEVICE_PATH *) DevicePath)->BaudRate)
- );
- DebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;
- DebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;
- gBS->CopyMem (
- &DebugPortDevice->Parity,
- &((UART_DEVICE_PATH *) DevicePath)->Parity,
- sizeof (((UART_DEVICE_PATH *) DevicePath)->Parity)
- );
- gBS->CopyMem (
- &DebugPortDevice->DataBits,
- &((UART_DEVICE_PATH *) DevicePath)->DataBits,
- sizeof (((UART_DEVICE_PATH *) DevicePath)->DataBits)
- );
- gBS->CopyMem (
- &DebugPortDevice->StopBits,
- &((UART_DEVICE_PATH *) DevicePath)->StopBits,
- sizeof (((UART_DEVICE_PATH *) DevicePath)->StopBits)
- );
- }
- }
- }
-}
EFI_STATUS
EFIAPI
diff --git a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c index aff628b54a..cce223fe03 100644 --- a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c +++ b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c @@ -21,6 +21,7 @@ Abstract: #include "DevicePath.h"
+STATIC
CHAR16 *
StrDuplicate (
IN CONST CHAR16 *Src
@@ -48,6 +49,7 @@ StrDuplicate ( return ReturnStr;
}
+STATIC
CHAR16 *
GetParamByNodeName (
IN CHAR16 *Str,
@@ -118,6 +120,7 @@ GetParamByNodeName ( return ParamStr;
}
+STATIC
CHAR16 *
SplitStr (
IN OUT CHAR16 **List,
@@ -176,6 +179,7 @@ SplitStr ( return ReturnStr;
}
+STATIC
CHAR16 *
GetNextParamStr (
IN OUT CHAR16 **List
@@ -187,6 +191,7 @@ GetNextParamStr ( return SplitStr (List, L',');
}
+STATIC
CHAR16 *
GetNextDeviceNodeStr (
IN OUT CHAR16 **DevicePath,
@@ -273,6 +278,7 @@ GetNextDeviceNodeStr ( return ReturnStr;
}
+STATIC
BOOLEAN
IsHexDigit (
OUT UINT8 *Digit,
@@ -312,6 +318,7 @@ IsHexDigit ( return FALSE;
}
+STATIC
CHAR16
NibbleToHexChar (
IN UINT8 Nibble
@@ -337,6 +344,7 @@ NibbleToHexChar ( return (CHAR16)(Nibble - 0xA + L'A');
}
+STATIC
EFI_STATUS
HexStringToBuf (
IN OUT UINT8 *Buf,
@@ -410,7 +418,7 @@ HexStringToBuf ( } else {
Byte = Buf[Idx / 2];
Byte &= 0x0F;
- Byte |= Digit << 4;
+ Byte = (UINT8) (Byte | Digit << 4);
}
Buf[Idx / 2] = Byte;
@@ -423,6 +431,7 @@ HexStringToBuf ( return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
BufToHexString (
IN OUT CHAR16 *Str,
@@ -481,6 +490,7 @@ BufToHexString ( return EFI_SUCCESS;
}
+STATIC
CHAR16 *
TrimHexStr (
IN CHAR16 *Str
@@ -519,6 +529,7 @@ TrimHexStr ( return Str;
}
+STATIC
UINTN
Xtoi (
IN CHAR16 *Str
@@ -552,6 +563,7 @@ Returns: return Rvalue;
}
+STATIC
VOID
Xtoi64 (
IN CHAR16 *Str,
@@ -578,6 +590,7 @@ Returns: HexStringToBuf ((UINT8 *) Data, &Length, TrimHexStr (Str), NULL);
}
+STATIC
UINTN
Atoi (
IN CHAR16 *str
@@ -633,6 +646,7 @@ Returns: return Rvalue;
}
+STATIC
EFI_STATUS
StrToBuf (
OUT UINT8 *Buf,
@@ -659,11 +673,11 @@ StrToBuf ( // and for even characters, the lower nibble.
//
if ((Index & 1) == 0) {
- Byte = Digit << 4;
+ Byte = (UINT8) (Digit << 4);
} else {
Byte = Buf[Index / 2];
Byte &= 0xF0;
- Byte |= Digit;
+ Byte = (UINT8) (Byte | Digit);
}
Buf[Index / 2] = Byte;
@@ -672,6 +686,7 @@ StrToBuf ( return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
StrToGuid (
IN CHAR16 *Str,
@@ -734,6 +749,7 @@ StrToGuid ( return EFI_SUCCESS;
}
+STATIC
VOID
StrToIPv4Addr (
IN OUT CHAR16 **Str,
@@ -747,6 +763,7 @@ StrToIPv4Addr ( }
}
+STATIC
VOID
StrToIPv6Addr (
IN OUT CHAR16 **Str,
@@ -763,6 +780,7 @@ StrToIPv6Addr ( }
}
+STATIC
VOID
StrToAscii (
IN CHAR16 *Str,
@@ -783,6 +801,7 @@ StrToAscii ( *AsciiStr = Dest + 1;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextPci (
IN CHAR16 *TextDeviceNode
@@ -806,6 +825,7 @@ DevPathFromTextPci ( return (EFI_DEVICE_PATH_PROTOCOL *) Pci;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextPcCard (
IN CHAR16 *TextDeviceNode
@@ -826,6 +846,7 @@ DevPathFromTextPcCard ( return (EFI_DEVICE_PATH_PROTOCOL *) Pccard;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextMemoryMapped (
IN CHAR16 *TextDeviceNode
@@ -851,6 +872,7 @@ DevPathFromTextMemoryMapped ( return (EFI_DEVICE_PATH_PROTOCOL *) MemMap;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
ConvertFromTextVendor (
IN CHAR16 *TextDeviceNode,
@@ -884,6 +906,7 @@ ConvertFromTextVendor ( return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextVenHw (
IN CHAR16 *TextDeviceNode
@@ -896,6 +919,7 @@ DevPathFromTextVenHw ( );
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextCtrl (
IN CHAR16 *TextDeviceNode
@@ -915,6 +939,7 @@ DevPathFromTextCtrl ( return (EFI_DEVICE_PATH_PROTOCOL *) Controller;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextAcpi (
IN CHAR16 *TextDeviceNode
@@ -942,6 +967,7 @@ DevPathFromTextAcpi ( return (EFI_DEVICE_PATH_PROTOCOL *) Acpi;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
ConvertFromTextAcpi (
IN CHAR16 *TextDeviceNode,
@@ -964,6 +990,7 @@ ConvertFromTextAcpi ( return (EFI_DEVICE_PATH_PROTOCOL *) Acpi;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextPciRoot (
IN CHAR16 *TextDeviceNode
@@ -972,6 +999,7 @@ DevPathFromTextPciRoot ( return ConvertFromTextAcpi (TextDeviceNode, 0x0a0341d0);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextFloppy (
IN CHAR16 *TextDeviceNode
@@ -980,6 +1008,7 @@ DevPathFromTextFloppy ( return ConvertFromTextAcpi (TextDeviceNode, 0x060441d0);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextKeyboard (
IN CHAR16 *TextDeviceNode
@@ -988,6 +1017,7 @@ DevPathFromTextKeyboard ( return ConvertFromTextAcpi (TextDeviceNode, 0x030141d0);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextSerial (
IN CHAR16 *TextDeviceNode
@@ -996,6 +1026,7 @@ DevPathFromTextSerial ( return ConvertFromTextAcpi (TextDeviceNode, 0x050141d0);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextParallelPort (
IN CHAR16 *TextDeviceNode
@@ -1004,6 +1035,7 @@ DevPathFromTextParallelPort ( return ConvertFromTextAcpi (TextDeviceNode, 0x040141d0);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextAcpiEx (
IN CHAR16 *TextDeviceNode
@@ -1025,10 +1057,10 @@ DevPathFromTextAcpiEx ( HIDSTRStr = GetNextParamStr (&TextDeviceNode);
CIDSTRStr = GetNextParamStr (&TextDeviceNode);
UIDSTRStr = GetNextParamStr (&TextDeviceNode);
- Length = sizeof (ACPI_EXTENDED_HID_DEVICE_PATH) +
- (UINT16) StrLen (HIDSTRStr) + 1 +
- (UINT16) StrLen (UIDSTRStr) + 1 +
- (UINT16) StrLen (CIDSTRStr) + 1;
+
+ Length = (UINT16) (sizeof (ACPI_EXTENDED_HID_DEVICE_PATH) + StrLen (HIDSTRStr) + 1);
+ Length = (UINT16) (Length + StrLen (UIDSTRStr) + 1);
+ Length = (UINT16) (Length + StrLen (CIDSTRStr) + 1);
AcpiExt = (ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR *) CreateDeviceNode (
ACPI_DEVICE_PATH,
ACPI_EXTENDED_DP,
@@ -1053,6 +1085,7 @@ DevPathFromTextAcpiEx ( return (EFI_DEVICE_PATH_PROTOCOL *) AcpiExt;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextAcpiExp (
IN CHAR16 *TextDeviceNode
@@ -1103,6 +1136,7 @@ DevPathFromTextAcpiExp ( return (EFI_DEVICE_PATH_PROTOCOL *) AcpiExt;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextAta (
IN CHAR16 *TextDeviceNode
@@ -1123,13 +1157,14 @@ DevPathFromTextAta ( SlaveMasterStr = GetNextParamStr (&TextDeviceNode);
LunStr = GetNextParamStr (&TextDeviceNode);
- Atapi->PrimarySecondary = (StrCmp (PrimarySecondaryStr, L"Primary") == 0) ? (UINT8) 0 : (UINT8) 1;
- Atapi->SlaveMaster = (StrCmp (SlaveMasterStr, L"Master") == 0) ? (UINT8) 0 : (UINT8) 1;
+ Atapi->PrimarySecondary = (UINT8) ((StrCmp (PrimarySecondaryStr, L"Primary") == 0) ? 0 : 1);
+ Atapi->SlaveMaster = (UINT8) ((StrCmp (SlaveMasterStr, L"Master") == 0) ? 0 : 1);
Atapi->Lun = (UINT16) Xtoi (LunStr);
return (EFI_DEVICE_PATH_PROTOCOL *) Atapi;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextScsi (
IN CHAR16 *TextDeviceNode
@@ -1153,6 +1188,7 @@ DevPathFromTextScsi ( return (EFI_DEVICE_PATH_PROTOCOL *) Scsi;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextFibre (
IN CHAR16 *TextDeviceNode
@@ -1177,6 +1213,7 @@ DevPathFromTextFibre ( return (EFI_DEVICE_PATH_PROTOCOL *) Fibre;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromText1394 (
IN CHAR16 *TextDeviceNode
@@ -1198,6 +1235,7 @@ DevPathFromText1394 ( return (EFI_DEVICE_PATH_PROTOCOL *) F1394;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsb (
IN CHAR16 *TextDeviceNode
@@ -1221,6 +1259,7 @@ DevPathFromTextUsb ( return (EFI_DEVICE_PATH_PROTOCOL *) Usb;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextI2O (
IN CHAR16 *TextDeviceNode
@@ -1241,6 +1280,7 @@ DevPathFromTextI2O ( return (EFI_DEVICE_PATH_PROTOCOL *) I2O;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextInfiniband (
IN CHAR16 *TextDeviceNode
@@ -1275,6 +1315,7 @@ DevPathFromTextInfiniband ( return (EFI_DEVICE_PATH_PROTOCOL *) InfiniBand;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextVenMsg (
IN CHAR16 *TextDeviceNode
@@ -1287,6 +1328,7 @@ DevPathFromTextVenMsg ( );
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextVenPcAnsi (
IN CHAR16 *TextDeviceNode
@@ -1303,6 +1345,7 @@ DevPathFromTextVenPcAnsi ( return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextVenVt100 (
IN CHAR16 *TextDeviceNode
@@ -1319,6 +1362,7 @@ DevPathFromTextVenVt100 ( return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextVenVt100Plus (
IN CHAR16 *TextDeviceNode
@@ -1335,6 +1379,7 @@ DevPathFromTextVenVt100Plus ( return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextVenUtf8 (
IN CHAR16 *TextDeviceNode
@@ -1351,6 +1396,7 @@ DevPathFromTextVenUtf8 ( return (EFI_DEVICE_PATH_PROTOCOL *) Vendor;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUartFlowCtrl (
IN CHAR16 *TextDeviceNode
@@ -1378,6 +1424,7 @@ DevPathFromTextUartFlowCtrl ( return (EFI_DEVICE_PATH_PROTOCOL *) UartFlowControl;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextSAS (
IN CHAR16 *TextDeviceNode
@@ -1442,6 +1489,7 @@ DevPathFromTextSAS ( return (EFI_DEVICE_PATH_PROTOCOL *) Sas;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextDebugPort (
IN CHAR16 *TextDeviceNode
@@ -1460,6 +1508,7 @@ DevPathFromTextDebugPort ( return (EFI_DEVICE_PATH_PROTOCOL *) Vend;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextMAC (
IN CHAR16 *TextDeviceNode
@@ -1486,6 +1535,7 @@ DevPathFromTextMAC ( return (EFI_DEVICE_PATH_PROTOCOL *) MAC;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextIPv4 (
IN CHAR16 *TextDeviceNode
@@ -1508,7 +1558,7 @@ DevPathFromTextIPv4 ( );
StrToIPv4Addr (&RemoteIPStr, &IPv4->RemoteIpAddress);
- IPv4->Protocol = (StrCmp (ProtocolStr, L"UDP") == 0) ? (UINT16) 0 : (UINT16) 1;
+ IPv4->Protocol = (UINT16) ((StrCmp (ProtocolStr, L"UDP") == 0) ? 0 : 1);
if (StrCmp (TypeStr, L"Static") == 0) {
IPv4->StaticIpAddress = TRUE;
} else {
@@ -1523,6 +1573,7 @@ DevPathFromTextIPv4 ( return (EFI_DEVICE_PATH_PROTOCOL *) IPv4;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextIPv6 (
IN CHAR16 *TextDeviceNode
@@ -1545,7 +1596,7 @@ DevPathFromTextIPv6 ( );
StrToIPv6Addr (&RemoteIPStr, &IPv6->RemoteIpAddress);
- IPv6->Protocol = (StrCmp (ProtocolStr, L"UDP") == 0) ? (UINT16) 0 : (UINT16) 1;
+ IPv6->Protocol = (UINT16) ((StrCmp (ProtocolStr, L"UDP") == 0) ? 0 : 1);
if (StrCmp (TypeStr, L"Static") == 0) {
IPv6->StaticIpAddress = TRUE;
} else {
@@ -1560,6 +1611,7 @@ DevPathFromTextIPv6 ( return (EFI_DEVICE_PATH_PROTOCOL *) IPv6;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUart (
IN CHAR16 *TextDeviceNode
@@ -1582,7 +1634,7 @@ DevPathFromTextUart ( );
Uart->BaudRate = (StrCmp (BaudStr, L"DEFAULT") == 0) ? 115200 : Atoi (BaudStr);
- Uart->DataBits = (StrCmp (DataBitsStr, L"DEFAULT") == 0) ? (UINT8) 8 : (UINT8) Atoi (DataBitsStr);
+ Uart->DataBits = (UINT8) ((StrCmp (DataBitsStr, L"DEFAULT") == 0) ? 8 : Atoi (DataBitsStr));
switch (*ParityStr) {
case L'D':
Uart->Parity = 0;
@@ -1626,6 +1678,7 @@ DevPathFromTextUart ( return (EFI_DEVICE_PATH_PROTOCOL *) Uart;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
ConvertFromTextUsbClass (
IN CHAR16 *TextDeviceNode,
@@ -1670,6 +1723,7 @@ ConvertFromTextUsbClass ( }
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbClass (
IN CHAR16 *TextDeviceNode
@@ -1683,6 +1737,7 @@ DevPathFromTextUsbClass ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbAudio (
IN CHAR16 *TextDeviceNode
@@ -1697,6 +1752,7 @@ DevPathFromTextUsbAudio ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbCDCControl (
IN CHAR16 *TextDeviceNode
@@ -1711,6 +1767,7 @@ DevPathFromTextUsbCDCControl ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbHID (
IN CHAR16 *TextDeviceNode
@@ -1725,6 +1782,7 @@ DevPathFromTextUsbHID ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbImage (
IN CHAR16 *TextDeviceNode
@@ -1739,6 +1797,7 @@ DevPathFromTextUsbImage ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbPrinter (
IN CHAR16 *TextDeviceNode
@@ -1753,6 +1812,7 @@ DevPathFromTextUsbPrinter ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbMassStorage (
IN CHAR16 *TextDeviceNode
@@ -1767,6 +1827,7 @@ DevPathFromTextUsbMassStorage ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbHub (
IN CHAR16 *TextDeviceNode
@@ -1781,6 +1842,7 @@ DevPathFromTextUsbHub ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbCDCData (
IN CHAR16 *TextDeviceNode
@@ -1795,6 +1857,7 @@ DevPathFromTextUsbCDCData ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbSmartCard (
IN CHAR16 *TextDeviceNode
@@ -1809,6 +1872,7 @@ DevPathFromTextUsbSmartCard ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbVideo (
IN CHAR16 *TextDeviceNode
@@ -1823,6 +1887,7 @@ DevPathFromTextUsbVideo ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbDiagnostic (
IN CHAR16 *TextDeviceNode
@@ -1837,6 +1902,7 @@ DevPathFromTextUsbDiagnostic ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbWireless (
IN CHAR16 *TextDeviceNode
@@ -1851,6 +1917,7 @@ DevPathFromTextUsbWireless ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbDeviceFirmwareUpdate (
IN CHAR16 *TextDeviceNode
@@ -1866,6 +1933,7 @@ DevPathFromTextUsbDeviceFirmwareUpdate ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbIrdaBridge (
IN CHAR16 *TextDeviceNode
@@ -1881,6 +1949,7 @@ DevPathFromTextUsbIrdaBridge ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbTestAndMeasurement (
IN CHAR16 *TextDeviceNode
@@ -1896,6 +1965,7 @@ DevPathFromTextUsbTestAndMeasurement ( return ConvertFromTextUsbClass (TextDeviceNode, &UsbClassText);
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUsbWwid (
IN CHAR16 *TextDeviceNode
@@ -1922,6 +1992,7 @@ DevPathFromTextUsbWwid ( return (EFI_DEVICE_PATH_PROTOCOL *) UsbWwid;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextUnit (
IN CHAR16 *TextDeviceNode
@@ -1942,6 +2013,7 @@ DevPathFromTextUnit ( return (EFI_DEVICE_PATH_PROTOCOL *) LogicalUnit;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextiSCSI (
IN CHAR16 *TextDeviceNode
@@ -1999,6 +2071,7 @@ DevPathFromTextiSCSI ( return (EFI_DEVICE_PATH_PROTOCOL *) iSCSI;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextHD (
IN CHAR16 *TextDeviceNode
@@ -2054,6 +2127,7 @@ DevPathFromTextHD ( return (EFI_DEVICE_PATH_PROTOCOL *) Hd;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextCDROM (
IN CHAR16 *TextDeviceNode
@@ -2080,6 +2154,7 @@ DevPathFromTextCDROM ( return (EFI_DEVICE_PATH_PROTOCOL *) CDROM;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextVenMEDIA (
IN CHAR16 *TextDeviceNode
@@ -2092,6 +2167,7 @@ DevPathFromTextVenMEDIA ( );
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextFilePath (
IN CHAR16 *TextDeviceNode
@@ -2110,6 +2186,7 @@ DevPathFromTextFilePath ( return (EFI_DEVICE_PATH_PROTOCOL *) File;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextMedia (
IN CHAR16 *TextDeviceNode
@@ -2130,6 +2207,7 @@ DevPathFromTextMedia ( return (EFI_DEVICE_PATH_PROTOCOL *) Media;
}
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
DevPathFromTextBBS (
IN CHAR16 *TextDeviceNode
diff --git a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c index 25c88e07d6..03150706c7 100644 --- a/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c +++ b/EdkModulePkg/Universal/DevicePath/Dxe/DevicePathToText.c @@ -21,6 +21,7 @@ Abstract: #include "DevicePath.h"
+STATIC
EFI_DEVICE_PATH_PROTOCOL *
UnpackDevicePath (
IN EFI_DEVICE_PATH_PROTOCOL *DevPath
@@ -95,6 +96,7 @@ UnpackDevicePath ( return NewPath;
}
+STATIC
VOID *
ReallocatePool (
IN VOID *OldPool,
@@ -136,6 +138,7 @@ ReallocatePool ( return NewPool;
}
+STATIC
CHAR16 *
CatPrint (
IN OUT POOL_PRINT *Str,
@@ -177,7 +180,8 @@ CatPrint ( Str->Str = AllocateZeroPool (Size);
ASSERT (Str->Str != NULL);
} else {
- Size = StrSize (AppendStr) + StrSize (Str->Str) - sizeof (UINT16);
+ Size = StrSize (AppendStr) - sizeof (UINT16);
+ Size = Size + StrSize (Str->Str);
Str->Str = ReallocatePool (
Str->Str,
StrSize (Str->Str),
@@ -196,6 +200,7 @@ CatPrint ( return Str->Str;
}
+STATIC
VOID
DevPathToTextPci (
IN OUT POOL_PRINT *Str,
@@ -210,6 +215,7 @@ DevPathToTextPci ( CatPrint (Str, L"Pci(%x,%x)", Pci->Function, Pci->Device);
}
+STATIC
VOID
DevPathToTextPccard (
IN OUT POOL_PRINT *Str,
@@ -224,6 +230,7 @@ DevPathToTextPccard ( CatPrint (Str, L"PcCard(%x)", Pccard->FunctionNumber);
}
+STATIC
VOID
DevPathToTextMemMap (
IN OUT POOL_PRINT *Str,
@@ -243,6 +250,7 @@ DevPathToTextMemMap ( );
}
+STATIC
VOID
DevPathToTextVendor (
IN OUT POOL_PRINT *Str,
@@ -357,6 +365,7 @@ DevPathToTextVendor ( CatPrint (Str, L")");
}
+STATIC
VOID
DevPathToTextController (
IN OUT POOL_PRINT *Str,
@@ -375,6 +384,7 @@ DevPathToTextController ( );
}
+STATIC
VOID
DevPathToTextAcpi (
IN OUT POOL_PRINT *Str,
@@ -424,6 +434,7 @@ DevPathToTextAcpi ( #define NextStrA(a) ((UINT8 *) (((UINT8 *) (a)) + AsciiStrLen ((CHAR8 *) (a)) + 1))
+STATIC
VOID
DevPathToTextExtAcpi (
IN OUT POOL_PRINT *Str,
@@ -433,12 +444,14 @@ DevPathToTextExtAcpi ( )
{
ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR *AcpiExt;
+ UINT8 *NextString;
AcpiExt = DevPath;
if (AllowShortcuts) {
+ NextString = NextStrA (AcpiExt->HidUidCidStr);
if ((*(AcpiExt->HidUidCidStr) == '\0') &&
- (*(NextStrA (NextStrA (AcpiExt->HidUidCidStr))) == '\0') &&
+ (*(NextStrA (NextString)) == '\0') &&
(AcpiExt->UID == 0)
) {
if ((AcpiExt->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
@@ -462,6 +475,8 @@ DevPathToTextExtAcpi ( return ;
}
+ NextString = NextStrA (AcpiExt->HidUidCidStr);
+ NextString = NextStrA (NextString);
if ((AcpiExt->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
CatPrint (
Str,
@@ -470,7 +485,7 @@ DevPathToTextExtAcpi ( AcpiExt->CID,
AcpiExt->UID,
AcpiExt->HidUidCidStr,
- NextStrA (NextStrA (AcpiExt->HidUidCidStr)),
+ NextString,
NextStrA (AcpiExt->HidUidCidStr)
);
} else {
@@ -481,12 +496,13 @@ DevPathToTextExtAcpi ( AcpiExt->CID,
AcpiExt->UID,
AcpiExt->HidUidCidStr,
- NextStrA (NextStrA (AcpiExt->HidUidCidStr)),
+ NextString,
NextStrA (AcpiExt->HidUidCidStr)
);
}
}
+STATIC
VOID
DevPathToTextAtapi (
IN OUT POOL_PRINT *Str,
@@ -512,6 +528,7 @@ DevPathToTextAtapi ( }
}
+STATIC
VOID
DevPathToTextScsi (
IN OUT POOL_PRINT *Str,
@@ -526,6 +543,7 @@ DevPathToTextScsi ( CatPrint (Str, L"Scsi(%x,%x)", Scsi->Pun, Scsi->Lun);
}
+STATIC
VOID
DevPathToTextFibre (
IN OUT POOL_PRINT *Str,
@@ -540,6 +558,7 @@ DevPathToTextFibre ( CatPrint (Str, L"Fibre(%lx,%lx)", Fibre->WWN, Fibre->Lun);
}
+STATIC
VOID
DevPathToText1394 (
IN OUT POOL_PRINT *Str,
@@ -554,6 +573,7 @@ DevPathToText1394 ( CatPrint (Str, L"I1394(%lx)", F1394->Guid);
}
+STATIC
VOID
DevPathToTextUsb (
IN OUT POOL_PRINT *Str,
@@ -568,6 +588,7 @@ DevPathToTextUsb ( CatPrint (Str, L"USB(%x,%x)", Usb->ParentPortNumber, Usb->InterfaceNumber);
}
+STATIC
VOID
DevPathToTextUsbWWID (
IN OUT POOL_PRINT *Str,
@@ -588,6 +609,7 @@ DevPathToTextUsbWWID ( );
}
+STATIC
VOID
DevPathToTextLogicalUnit (
IN OUT POOL_PRINT *Str,
@@ -602,6 +624,7 @@ DevPathToTextLogicalUnit ( CatPrint (Str, L"Unit(%x)", LogicalUnit->Lun);
}
+STATIC
VOID
DevPathToTextUsbClass (
IN OUT POOL_PRINT *Str,
@@ -794,6 +817,7 @@ DevPathToTextUsbClass ( );
}
+STATIC
VOID
DevPathToTextI2O (
IN OUT POOL_PRINT *Str,
@@ -808,6 +832,7 @@ DevPathToTextI2O ( CatPrint (Str, L"I2O(%x)", I2O->Tid);
}
+STATIC
VOID
DevPathToTextMacAddr (
IN OUT POOL_PRINT *Str,
@@ -836,6 +861,7 @@ DevPathToTextMacAddr ( CatPrint (Str, L",%x)", MAC->IfType);
}
+STATIC
VOID
DevPathToTextIPv4 (
IN OUT POOL_PRINT *Str,
@@ -875,6 +901,7 @@ DevPathToTextIPv4 ( );
}
+STATIC
VOID
DevPathToTextIPv6 (
IN OUT POOL_PRINT *Str,
@@ -950,6 +977,7 @@ DevPathToTextIPv6 ( );
}
+STATIC
VOID
DevPathToTextInfiniBand (
IN OUT POOL_PRINT *Str,
@@ -972,6 +1000,7 @@ DevPathToTextInfiniBand ( );
}
+STATIC
VOID
DevPathToTextUart (
IN OUT POOL_PRINT *Str,
@@ -1051,6 +1080,7 @@ DevPathToTextUart ( }
}
+STATIC
VOID
DevPathToTextiSCSI (
IN OUT POOL_PRINT *Str,
@@ -1086,6 +1116,7 @@ DevPathToTextiSCSI ( CatPrint (Str, L"%s)", (iSCSI->NetworkProtocol == 0) ? L"TCP" : L"reserved");
}
+STATIC
VOID
DevPathToTextHardDrive (
IN OUT POOL_PRINT *Str,
@@ -1134,6 +1165,7 @@ DevPathToTextHardDrive ( CatPrint (Str, L"%lx,%lx)", Hd->PartitionStart, Hd->PartitionSize);
}
+STATIC
VOID
DevPathToTextCDROM (
IN OUT POOL_PRINT *Str,
@@ -1153,6 +1185,7 @@ DevPathToTextCDROM ( CatPrint (Str, L"CDROM(%x,%lx,%lx)", Cd->BootEntry, Cd->PartitionStart, Cd->PartitionSize);
}
+STATIC
VOID
DevPathToTextFilePath (
IN OUT POOL_PRINT *Str,
@@ -1167,6 +1200,7 @@ DevPathToTextFilePath ( CatPrint (Str, L"%s", Fp->PathName);
}
+STATIC
VOID
DevPathToTextMediaProtocol (
IN OUT POOL_PRINT *Str,
@@ -1181,6 +1215,7 @@ DevPathToTextMediaProtocol ( CatPrint (Str, L"Media(%g)", &MediaProt->Protocol);
}
+STATIC
VOID
DevPathToTextBBS (
IN OUT POOL_PRINT *Str,
@@ -1233,6 +1268,7 @@ DevPathToTextBBS ( CatPrint (Str, L",%x)", Bbs->StatusFlag);
}
+STATIC
VOID
DevPathToTextEndInstance (
IN OUT POOL_PRINT *Str,
@@ -1244,6 +1280,7 @@ DevPathToTextEndInstance ( CatPrint (Str, L",");
}
+STATIC
VOID
DevPathToTextNodeUnknown (
IN OUT POOL_PRINT *Str,
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c index ce6b0d5353..8dd0b4b497 100644 --- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c +++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c @@ -31,6 +31,7 @@ Abstract: #include "Partition.h"
+STATIC
BOOLEAN
PartitionValidMbr (
IN MASTER_BOOT_RECORD *Mbr,
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c index 77cee2442b..6a896e4e72 100644 --- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c +++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c @@ -437,6 +437,7 @@ PartitionDriverBindingStop ( return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
EFIAPI
PartitionReset (
@@ -469,6 +470,7 @@ PartitionReset ( );
}
+STATIC
EFI_STATUS
EFIAPI
PartitionReadBlocks (
@@ -524,6 +526,7 @@ PartitionReadBlocks ( return Private->DiskIo->ReadDisk (Private->DiskIo, MediaId, Offset, BufferSize, Buffer);
}
+STATIC
EFI_STATUS
EFIAPI
PartitionWriteBlocks (
@@ -580,6 +583,7 @@ PartitionWriteBlocks ( return Private->DiskIo->WriteDisk (Private->DiskIo, MediaId, Offset, BufferSize, Buffer);
}
+STATIC
EFI_STATUS
EFIAPI
PartitionFlushBlocks (
diff --git a/EdkModulePkg/Universal/Ebc/Dxe/EbcExecute.c b/EdkModulePkg/Universal/Ebc/Dxe/EbcExecute.c index 70db1574bf..ce9b3aa547 100644 --- a/EdkModulePkg/Universal/Ebc/Dxe/EbcExecute.c +++ b/EdkModulePkg/Universal/Ebc/Dxe/EbcExecute.c @@ -1098,7 +1098,6 @@ Returns: UINT8 Operands;
VOID *EbcEntryPoint;
VOID *Thunk;
- EFI_STATUS Status;
UINT64 U64EbcEntryPoint;
INT32 Offset;
@@ -1162,7 +1161,7 @@ Returns: //
// Now create a new thunk
//
- Status = EbcCreateThunks (VmPtr->ImageHandle, EbcEntryPoint, &Thunk, 0);
+ EbcCreateThunks (VmPtr->ImageHandle, EbcEntryPoint, &Thunk, 0);
//
// Finally replace the EBC entry point memory with the thunk address
diff --git a/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c b/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c index eceb59185b..283cdaa038 100644 --- a/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c +++ b/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c @@ -76,6 +76,7 @@ PushU64 ( *(UINT64 *) VmPtr->R[0] = Arg;
}
+STATIC
UINT64
EbcInterpret (
UINT64 Arg1,
@@ -468,14 +469,14 @@ Returns: //
// Next is jumbled data, including opcode and rest of address
//
- Code[2] = LShiftU64 (Imm7b, 13)
- | LShiftU64 (0x00, 20) // vc
- | LShiftU64 (Ic, 21)
- | LShiftU64 (Imm5c, 22)
- | LShiftU64 (Imm9d, 27)
- | LShiftU64 (I, 36)
- | LShiftU64 ((UINT64)MOVL_OPCODE, 37)
- | LShiftU64 ((RegNum & 0x7F), 6);
+ Code[2] = LShiftU64 (Imm7b, 13);
+ Code[2] = Code[2] | LShiftU64 (0x00, 20); // vc
+ Code[2] = Code[2] | LShiftU64 (Ic, 21);
+ Code[2] = Code[2] | LShiftU64 (Imm5c, 22);
+ Code[2] = Code[2] | LShiftU64 (Imm9d, 27);
+ Code[2] = Code[2] | LShiftU64 (I, 36);
+ Code[2] = Code[2] | LShiftU64 ((UINT64)MOVL_OPCODE, 37);
+ Code[2] = Code[2] | LShiftU64 ((RegNum & 0x7F), 6);
WriteBundle ((VOID *) Ptr, 0x05, Code[0], Code[1], Code[2]);
@@ -533,14 +534,14 @@ Returns: //
// Next is jumbled data, including opcode and rest of address
//
- Code[2] = LShiftU64 (Imm7b, 13)
- | LShiftU64 (0x00, 20) // vc
- | LShiftU64 (Ic, 21)
- | LShiftU64 (Imm5c, 22)
- | LShiftU64 (Imm9d, 27)
- | LShiftU64 (I, 36)
- | LShiftU64 ((UINT64)MOVL_OPCODE, 37)
- | LShiftU64 ((RegNum & 0x7F), 6);
+ Code[2] = LShiftU64 (Imm7b, 13);
+ Code[2] = Code[2] | LShiftU64 (0x00, 20); // vc
+ Code[2] = Code[2] | LShiftU64 (Ic, 21);
+ Code[2] = Code[2] | LShiftU64 (Imm5c, 22);
+ Code[2] = Code[2] | LShiftU64 (Imm9d, 27);
+ Code[2] = Code[2] | LShiftU64 (I, 36);
+ Code[2] = Code[2] | LShiftU64 ((UINT64)MOVL_OPCODE, 37);
+ Code[2] = Code[2] | LShiftU64 ((RegNum & 0x7F), 6);
WriteBundle ((VOID *) Ptr, 0x05, Code[0], Code[1], Code[2]);
@@ -604,14 +605,14 @@ Returns: //
// Next is jumbled data, including opcode and rest of address
//
- Code[2] = LShiftU64(Imm7b, 13)
- | LShiftU64 (0x00, 20) // vc
- | LShiftU64 (Ic, 21)
- | LShiftU64 (Imm5c, 22)
- | LShiftU64 (Imm9d, 27)
- | LShiftU64 (I, 36)
- | LShiftU64 ((UINT64)MOVL_OPCODE, 37)
- | LShiftU64 ((RegNum & 0x7F), 6);
+ Code[2] = LShiftU64(Imm7b, 13);
+ Code[2] = Code[2] | LShiftU64 (0x00, 20); // vc
+ Code[2] = Code[2] | LShiftU64 (Ic, 21);
+ Code[2] = Code[2] | LShiftU64 (Imm5c, 22);
+ Code[2] = Code[2] | LShiftU64 (Imm9d, 27);
+ Code[2] = Code[2] | LShiftU64 (I, 36);
+ Code[2] = Code[2] | LShiftU64 ((UINT64)MOVL_OPCODE, 37);
+ Code[2] = Code[2] | LShiftU64 ((RegNum & 0x7F), 6);
WriteBundle ((VOID *) Ptr, 0x05, Code[0], Code[1], Code[2]);
@@ -722,8 +723,11 @@ Returns: return EFI_INVALID_PARAMETER;
}
- Low64 = LShiftU64 (Slot1, 46) | LShiftU64 (Slot0, 5) | Template;
- High64 = RShiftU64 (Slot1, 18) | LShiftU64 (Slot2, 23);
+ Low64 = LShiftU64 (Slot1, 46);
+ Low64 = Low64 | LShiftU64 (Slot0, 5) | Template;
+
+ High64 = RShiftU64 (Slot1, 18);
+ High64 = High64 | LShiftU64 (Slot2, 23);
//
// Now write it all out
@@ -816,14 +820,13 @@ Returns: CodeTwo5c = RShiftU64 (*((UINT64 *)CalleeAddr + 3), 45) & 0x1F;
CodeTwo9d = RShiftU64 (*((UINT64 *)CalleeAddr + 3), 50) & 0x1FF;
- TargetEbcAddr = CodeTwo7b
- | LShiftU64 (CodeTwo9d, 7)
- | LShiftU64 (CodeTwo5c, 16)
- | LShiftU64 (CodeTwoIc, 21)
- | LShiftU64 (CodeOne18, 22)
- | LShiftU64 (CodeOne23, 40)
- | LShiftU64 (CodeTwoI, 63)
- ;
+ TargetEbcAddr = CodeTwo7b;
+ TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeTwo9d, 7);
+ TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeTwo5c, 16);
+ TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeTwoIc, 21);
+ TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeOne18, 22);
+ TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeOne23, 40);
+ TargetEbcAddr = TargetEbcAddr | LShiftU64 (CodeTwoI, 63);
Action:
if (IsThunk == 1){
diff --git a/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/EmuVariable.c b/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/EmuVariable.c index 0eef1acfc4..b9563f131b 100644 --- a/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/EmuVariable.c +++ b/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/EmuVariable.c @@ -26,6 +26,7 @@ Revision History //
ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
+STATIC
UINT32
EFIAPI
ArrayLength (
@@ -62,6 +63,7 @@ Returns: return (Count * 2) + 2;
}
+STATIC
VARIABLE_STORE_STATUS
EFIAPI
GetVariableStoreStatus (
@@ -103,6 +105,7 @@ Returns: }
}
+STATIC
UINT8 *
EFIAPI
GetVariableDataPtr (
@@ -133,6 +136,7 @@ Returns: return (UINT8 *) ((UINTN) GET_VARIABLE_NAME_PTR (Variable) + Variable->NameSize + GET_PAD_SIZE (Variable->NameSize));
}
+STATIC
VARIABLE_HEADER *
EFIAPI
GetNextVariablePtr (
@@ -173,6 +177,7 @@ Returns: return VarHeader;
}
+STATIC
VARIABLE_HEADER *
EFIAPI
GetEndPointer (
@@ -200,6 +205,7 @@ Returns: return (VARIABLE_HEADER *) ((UINTN) VolHeader + VolHeader->Size);
}
+STATIC
EFI_STATUS
EFIAPI
FindVariable (
@@ -413,7 +419,7 @@ Returns: Variable.StartPtr = (VARIABLE_HEADER *) ((UINTN) (Global->VolatileVariableBase + sizeof (VARIABLE_STORE_HEADER)));
Variable.EndPtr = (VARIABLE_HEADER *) GetEndPointer ((VARIABLE_STORE_HEADER *) ((UINTN) Global->VolatileVariableBase));
} else {
- return EFI_NOT_FOUND;
+ goto Error;
}
Variable.CurrPtr = Variable.StartPtr;
@@ -449,6 +455,7 @@ Returns: }
}
+Error:
return EFI_NOT_FOUND;
}
@@ -755,6 +762,7 @@ Returns: }
#endif
+STATIC
EFI_STATUS
EFIAPI
InitializeVariableStore (
diff --git a/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/Ipf/InitVariable.c b/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/Ipf/InitVariable.c index ee2a4852a0..da71705dae 100644 --- a/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/Ipf/InitVariable.c +++ b/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/Ipf/InitVariable.c @@ -26,6 +26,7 @@ Revision History //
extern ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
+STATIC
SAL_RETURN_REGS
EsalVariableCommonEntry (
IN UINT64 FunctionId,
diff --git a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwWorkSpace.c b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwWorkSpace.c index 820655c76b..40e56ad1fb 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwWorkSpace.c +++ b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwWorkSpace.c @@ -193,7 +193,7 @@ Notes: }
State ^= FTW_POLARITY_REVERT;
- State |= NewBit;
+ State = (UINT8) (State | NewBit);
State ^= FTW_POLARITY_REVERT;
//
diff --git a/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.c b/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.c index e091ae18fb..48ed607961 100644 --- a/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.c +++ b/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.c @@ -91,7 +91,6 @@ Returns: --*/
{
UINT32 TestPattern;
- UINT32 TestMask;
EFI_PHYSICAL_ADDRESS TempAddress;
UINT32 SpanSize;
@@ -101,7 +100,6 @@ Returns: );
TestPattern = TEST_PATTERN;
- TestMask = 0;
SpanSize = 0;
//
diff --git a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c index f79038657a..478729ea82 100644 --- a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c +++ b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c @@ -51,6 +51,7 @@ EFI_GUID mEfiMtcGuid = { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, //
// Worker functions
//
+STATIC
EFI_STATUS
EFIAPI
MonotonicCounterDriverGetNextMonotonicCount (
@@ -132,6 +133,7 @@ Returns: @retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.
**/
+STATIC
EFI_STATUS
EFIAPI
MonotonicCounterDriverGetNextHighMonotonicCount (
@@ -181,6 +183,7 @@ Returns: }
+STATIC
VOID
EFIAPI
EfiMtcEventHandler (
diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h b/EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h index a391709c9e..6d5a616af4 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h @@ -494,6 +494,23 @@ typedef union { #include "dhcp.h"
#include "tftp.h"
+VOID
+InitArpHeader (
+ VOID
+ )
+/*++
+Routine description:
+ Initialize ARP packet header.
+
+Parameters:
+ none
+
+Returns:
+ none
+
+--*/
+;
+
#endif /* _BC_H */
/* EOF - bc.h */
diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c index 303f3547ae..f3969b90e8 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c @@ -45,17 +45,6 @@ PxeBcDriverStop ( IN EFI_HANDLE *ChildHandleBuffer
);
-extern
-VOID
-InitArpHeader (
- VOID
- );
-extern
-VOID
-OptionsStrucInit (
- VOID
- );
-
//
// helper routines
//
@@ -310,8 +299,8 @@ IpChecksum2 ( {
UINT32 Sum;
- Sum = (UINT16)~IpChecksum (Header, HeaderLen) + (UINT16)~IpChecksum (Message, MessageLen);
-
+ Sum = (UINT16)~IpChecksum (Header, HeaderLen);
+ Sum = Sum + (UINT16)~IpChecksum (Message, MessageLen);
//
// in case above carried
//
@@ -1597,7 +1586,6 @@ BcStop ( //
// Lock the instance data
//
- EFI_PXE_BASE_CODE_MODE *PxebcMode;
EFI_SIMPLE_NETWORK_PROTOCOL *SnpPtr;
EFI_SIMPLE_NETWORK_MODE *SnpModePtr;
EFI_STATUS StatCode;
@@ -1619,7 +1607,6 @@ BcStop ( EfiAcquireLock (&Private->Lock);
- PxebcMode = Private->EfiBc.Mode;
SnpPtr = Private->SimpleNetwork;
SnpModePtr = SnpPtr->Mode;
@@ -2069,13 +2056,11 @@ BcSetStationIP ( --*/
{
EFI_PXE_BASE_CODE_MODE *PxebcMode;
- EFI_STATUS StatCode;
PXE_BASECODE_DEVICE *Private;
//
// Lock the instance data and make sure started
//
- StatCode = EFI_SUCCESS;
if (This == NULL) {
DEBUG ((EFI_D_ERROR, "BC *This pointer == NULL"));
diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/dhcp.h b/EdkModulePkg/Universal/Network/PxeBc/Dxe/dhcp.h index cd448b37a5..102d30b8c0 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/dhcp.h +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/dhcp.h @@ -622,6 +622,11 @@ typedef struct DhcpReceiveBufferStruct { #define CREDENTIALS_TYPE (1 << 3)
#define USE_THREE_BYTE (1 << 4)
+VOID
+OptionsStrucInit (
+ VOID
+ );
+
#endif // _DHCP_H
/* EOF - dhcp.h */
diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c index 57664d81e2..bb7022ba74 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c @@ -211,7 +211,7 @@ OptionsStrucInit ( CopyMem (DHCPOpStart.DhcpClassIdentifier.Data.UndiMajor, "yyy", sizeof ("yyy"));
CopyMem (DHCPOpStart.DhcpClassIdentifier.Data.UndiMinor, "xxx", sizeof ("xxx"));
DHCPOpStart.End[0] = OP_END;
-};
+}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
@@ -399,6 +399,7 @@ STATIC UINT8 OurDhcpOptions[MAX_OUR_OPT] = { #pragma pack()
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
CHAR8 *
PxeBcLibGetSmbiosString (
IN SMBIOS_STRUCTURE_POINTER *Smbios,
@@ -855,6 +856,7 @@ DecodeOptions ( }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
VOID
Parse (
DHCP_RECEIVE_BUFFER *RxBufPtr,
@@ -958,6 +960,7 @@ CopyParse ( }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
BOOLEAN
AckEdit (
DHCP_RECEIVE_BUFFER *DhcpRxBuf
@@ -984,6 +987,7 @@ AckEdit ( //
// if a discover type packet, make sure all required fields are present
//
+STATIC
BOOLEAN
DHCPOfferAckEdit (
DHCP_RECEIVE_BUFFER *DhcpRxBuf
@@ -1126,6 +1130,7 @@ DHCPOfferAckEdit ( }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
BOOLEAN
DHCPAckEdit (
DHCP_RECEIVE_BUFFER *RxBufPtr
@@ -1139,6 +1144,7 @@ DHCPAckEdit ( //
// get an offer/ack
//
+STATIC
EFI_STATUS
GetOfferAck (
PXE_BASECODE_DEVICE *Private,
@@ -1249,6 +1255,7 @@ Returns: //
// get DHCPOFFER's
//
+STATIC
EFI_STATUS
GetOffers (
PXE_BASECODE_DEVICE *Private
@@ -2146,6 +2153,7 @@ DoDhcpDora ( //
// determine if the server ip is in the ip list
//
+STATIC
BOOLEAN
InServerList (
EFI_IP_ADDRESS *ServerIpPtr,
@@ -2172,6 +2180,7 @@ InServerList ( }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
BOOLEAN
ExtractBootServerList (
UINT16 Type,
@@ -2209,6 +2218,7 @@ ExtractBootServerList ( }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
VOID
FreeMem (
PXE_BASECODE_DEVICE *Private
@@ -2226,6 +2236,7 @@ FreeMem ( }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
BOOLEAN
GetMem (
PXE_BASECODE_DEVICE *Private
@@ -2443,6 +2454,7 @@ VerifyCredentialOption ( }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
EFI_STATUS
DoDiscover (
PXE_BASECODE_DEVICE *Private,
@@ -3210,13 +3222,11 @@ Returns: {
EFI_PXE_BASE_CODE_MODE *PxebcMode;
EFI_STATUS Status;
- EFI_STATUS StatCode;
PXE_BASECODE_DEVICE *Private;
//
// Lock the instance data and make sure started
//
- StatCode = EFI_SUCCESS;
if (This == NULL) {
DEBUG ((EFI_D_ERROR, "BC *This pointer == NULL"));
diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c index e6e91c3c10..b99f2d303d 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c @@ -36,6 +36,7 @@ Revision History #include "Bc.h"
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
UINT64
Swap64 (
UINT64 n
@@ -1182,6 +1183,7 @@ Returns: }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
EFI_STATUS
MtftpDownload (
PXE_BASECODE_DEVICE *Private,
@@ -1930,6 +1932,7 @@ Returns: }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+STATIC
EFI_STATUS
PxeBcMtftp (
PXE_BASECODE_DEVICE *Private,
diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c index 182462c02f..6659bc4022 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c @@ -393,24 +393,23 @@ Returns: if (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key) == EFI_NOT_READY) {
UINT8 Buffer[512];
UINTN BufferSize;
- EFI_STATUS Status;
BufferSize = sizeof Buffer;
- Status = Private->EfiBc.UdpRead (
- &Private->EfiBc,
- EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP |
- EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT |
- EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT,
- NULL, /* dest ip */
- NULL, /* dest port */
- NULL, /* src ip */
- NULL, /* src port */
- NULL, /* hdr size */
- NULL, /* hdr ptr */
- &BufferSize,
- Buffer
- );
+ Private->EfiBc.UdpRead (
+ &Private->EfiBc,
+ EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP |
+ EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT |
+ EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT,
+ NULL, /* dest ip */
+ NULL, /* dest port */
+ NULL, /* src ip */
+ NULL, /* src port */
+ NULL, /* hdr size */
+ NULL, /* hdr ptr */
+ &BufferSize,
+ Buffer
+ );
continue;
}
@@ -870,6 +869,7 @@ Returns: return NULL;
}
+STATIC
UINT8 *
PxeBcFindDhcpOpt (
EFI_PXE_BASE_CODE_PACKET *PacketPtr,
@@ -1088,7 +1088,6 @@ Returns: if (Private->EfiBc.Mode->BisSupported && Private->EfiBc.Mode->BisDetected && Private->EfiBc.Mode->PxeBisReplyReceived) {
UINT64 CredentialLen;
- UINTN BlockSize;
UINT8 CredentialFilename[256];
UINT8 *op;
VOID *CredentialBuffer;
@@ -1399,11 +1398,6 @@ Returns: AsciiPrint ("Running LoadFile()\n");
//
- // Resolve Warning 4 unreferenced parameter problem
- //
- FilePath = NULL;
-
- //
// If either if these parameters are NULL, we cannot continue.
//
if (This == NULL || BufferSize == NULL) {
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/Snp.h b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/Snp.h index 05c5a8bb92..3055b8683a 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/Snp.h +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/Snp.h @@ -385,11 +385,45 @@ snp_undi32_receive ( )
;
+VOID
+EFIAPI
+SnpWaitForPacketNotify (
+ IN EFI_EVENT Event,
+ IN VOID *SnpPtr
+ );
+
+EFI_STATUS
+pxe_start (
+ SNP_DRIVER *snp
+ );
+
+EFI_STATUS
+pxe_stop (
+ SNP_DRIVER *snp
+ );
+
+EFI_STATUS
+pxe_init (
+ SNP_DRIVER *snp,
+ UINT16 OpFlags
+ );
+
+EFI_STATUS
+pxe_shutdown (
+ SNP_DRIVER *snp
+ );
+
+EFI_STATUS
+pxe_get_stn_addr (
+ SNP_DRIVER *snp
+ );
+
typedef
EFI_STATUS
(*issue_undi32_command) (
UINT64 cdb
);
+
typedef
VOID
(*ptr) (
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/callback.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/callback.c index 65a4d580d4..54574cb4ab 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/callback.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/callback.c @@ -182,19 +182,19 @@ Returns: switch (NumBytes) {
case 2:
- Width = 1;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 1;
break;
case 4:
- Width = 2;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 2;
break;
case 8:
- Width = 3;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 3;
break;
default:
- Width = 0;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 0;
}
switch (ReadOrWrite) {
@@ -344,18 +344,18 @@ Returns: snp = (SNP_DRIVER *) (UINTN) UniqueId;
- Width = 0;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 0;
switch (NumBytes) {
case 2:
- Width = 1;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 1;
break;
case 4:
- Width = 2;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 2;
break;
case 8:
- Width = 3;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 3;
break;
}
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/get_status.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/get_status.c index 6d89d4c9c6..c301b92aaf 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/get_status.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/get_status.c @@ -20,6 +20,7 @@ Revision history: #include "Snp.h"
+STATIC
EFI_STATUS
pxe_getstatus (
SNP_DRIVER *snp,
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/initialize.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/initialize.c index cb80171b24..80e6033ff7 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/initialize.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/initialize.c @@ -20,13 +20,6 @@ Revision history: #include "Snp.h"
-VOID
-EFIAPI
-SnpWaitForPacketNotify (
- IN EFI_EVENT Event,
- IN VOID *SnpPtr
- );
-
EFI_STATUS
pxe_init (
SNP_DRIVER *snp,
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/mcast_ip_to_mac.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/mcast_ip_to_mac.c index 11b29f4fd7..e768b85dce 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/mcast_ip_to_mac.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/mcast_ip_to_mac.c @@ -20,6 +20,7 @@ Revision history: #include "Snp.h"
+STATIC
EFI_STATUS
pxe_ip2mac (
IN SNP_DRIVER *snp,
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/nvdata.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/nvdata.c index e9302da607..ada3069239 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/nvdata.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/nvdata.c @@ -20,6 +20,7 @@ Revision history: #include "Snp.h"
+STATIC
EFI_STATUS
pxe_nvdata_read (
IN SNP_DRIVER *snp,
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/receive.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/receive.c index 2d92ddeeed..7c9cf5e084 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/receive.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/receive.c @@ -20,6 +20,7 @@ Revision history: #include "Snp.h"
+STATIC
EFI_STATUS
pxe_receive (
SNP_DRIVER *snp,
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/receive_filters.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/receive_filters.c index 6e234de96c..258c4a9b36 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/receive_filters.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/receive_filters.c @@ -20,6 +20,7 @@ Revision history: #include "Snp.h"
+STATIC
EFI_STATUS
pxe_rcvfilter_enable (
SNP_DRIVER *snp,
@@ -112,6 +113,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
pxe_rcvfilter_disable (
SNP_DRIVER *snp,
@@ -191,6 +193,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
pxe_rcvfilter_read (
SNP_DRIVER *snp
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/reset.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/reset.c index a8dace6e10..757e8e0e94 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/reset.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/reset.c @@ -20,6 +20,7 @@ Revision history: #include "Snp.h"
+STATIC
EFI_STATUS
pxe_reset (
SNP_DRIVER *snp
@@ -96,11 +97,6 @@ Returns: {
SNP_DRIVER *snp;
- //
- // Resolve Warning 4 unreferenced parameter problem
- //
- ExtendedVerification = 0;
-
if (this == NULL) {
return EFI_INVALID_PARAMETER;
}
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c index c83ca377ab..7146e462c7 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c @@ -18,72 +18,6 @@ Abstract: #include "Snp.h"
-EFI_STATUS
-pxe_start (
- SNP_DRIVER *snp
- );
-EFI_STATUS
-pxe_stop (
- SNP_DRIVER *snp
- );
-EFI_STATUS
-pxe_init (
- SNP_DRIVER *snp,
- UINT16 OpFlags
- );
-EFI_STATUS
-pxe_shutdown (
- SNP_DRIVER *snp
- );
-EFI_STATUS
-pxe_get_stn_addr (
- SNP_DRIVER *snp
- );
-
-EFI_STATUS
-EFIAPI
-InitializeSnpNiiDriver (
- IN EFI_HANDLE image_handle,
- IN EFI_SYSTEM_TABLE *system_table
- );
-
-EFI_STATUS
-EFIAPI
-SimpleNetworkDriverSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-EFIAPI
-SimpleNetworkDriverStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-EFIAPI
-SimpleNetworkDriverStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- );
-
-//
-// Simple Network Protocol Driver Global Variables
-//
-EFI_DRIVER_BINDING_PROTOCOL mSimpleNetworkDriverBinding = {
- SimpleNetworkDriverSupported,
- SimpleNetworkDriverStart,
- SimpleNetworkDriverStop,
- 0xa,
- NULL,
- NULL
-};
-
//
// Module global variables needed to support undi 3.0 interface
//
@@ -91,202 +25,6 @@ EFI_PCI_IO_PROTOCOL *mPciIoFncs; struct s_v2p *_v2p = NULL; // undi3.0 map_list head
// End Global variables
//
-EFI_STATUS
-add_v2p (
- IN OUT struct s_v2p **v2p,
- EFI_PCI_IO_PROTOCOL_OPERATION type,
- VOID *vaddr,
- UINTN bsize
- )
-/*++
-
-Routine Description:
- This routine maps the given CPU address to a Device address. It creates a
- an entry in the map list with the virtual and physical addresses and the
- un map cookie.
-
-Arguments:
- v2p - pointer to return a map list node pointer.
- type - the direction in which the data flows from the given virtual address
- device->cpu or cpu->device or both ways.
- vaddr - virtual address (or CPU address) to be mapped
- bsize - size of the buffer to be mapped.
-
-Returns:
-
- EFI_SUCEESS - routine has completed the mapping
- other - error as indicated.
-
---*/
-{
- EFI_STATUS Status;
-
- if ((v2p == NULL) || (vaddr == NULL) || (bsize == 0)) {
- return EFI_INVALID_PARAMETER;
- }
-
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- sizeof (struct s_v2p),
- (VOID **) v2p
- );
-
- if (Status != EFI_SUCCESS) {
- return Status;
- }
-
- Status = mPciIoFncs->Map (
- mPciIoFncs,
- type,
- vaddr,
- &bsize,
- &(*v2p)->paddr,
- &(*v2p)->unmap
- );
- if (Status != EFI_SUCCESS) {
- gBS->FreePool (*v2p);
- return Status;
- }
- (*v2p)->vaddr = vaddr;
- (*v2p)->bsize = bsize;
- (*v2p)->next = _v2p;
- _v2p = *v2p;
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-find_v2p (
- struct s_v2p **v2p,
- VOID *vaddr
- )
-/*++
-
-Routine Description:
- This routine searches the linked list of mapped address nodes (for undi3.0
- interface) to find the node that corresponds to the given virtual address and
- returns a pointer to that node.
-
-Arguments:
- v2p - pointer to return a map list node pointer.
- vaddr - virtual address (or CPU address) to be searched in the map list
-
-Returns:
-
- EFI_SUCEESS - if a match found!
- Other - match not found
-
---*/
-{
- struct s_v2p *v;
-
- if (v2p == NULL || vaddr == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- for (v = _v2p; v != NULL; v = v->next) {
- if (v->vaddr == vaddr) {
- *v2p = v;
- return EFI_SUCCESS;
- }
- }
-
- return EFI_NOT_FOUND;
-}
-
-EFI_STATUS
-del_v2p (
- VOID *vaddr
- )
-/*++
-
-Routine Description:
- This routine unmaps the given virtual address and frees the memory allocated
- for the map list node corresponding to that address.
-
-Arguments:
- vaddr - virtual address (or CPU address) to be unmapped
-
-Returns:
- EFI_SUCEESS - if successfully unmapped
- Other - as indicated by the error
-
-
---*/
-{
- struct s_v2p *v;
- struct s_v2p *t;
- EFI_STATUS Status;
-
- if (vaddr == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- if (_v2p == NULL) {
- return EFI_NOT_FOUND;
- }
- //
- // Is our node at the head of the list??
- //
- if ((v = _v2p)->vaddr == vaddr) {
- _v2p = _v2p->next;
-
- Status = mPciIoFncs->Unmap (mPciIoFncs, v->unmap);
-
- gBS->FreePool (v);
-
-#if SNP_DEBUG
- if (Status) {
- Print (L"Unmap failed with status = %x\n", Status);
- }
-#endif
- return Status;
- }
-
- for (; v->next != NULL; v = t) {
- if ((t = v->next)->vaddr == vaddr) {
- v->next = t->next;
- Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);
- gBS->FreePool (t);
-#if SNP_DEBUG
- if (Status) {
- Print (L"Unmap failed with status = %x\n", Status);
- }
-#endif
- return Status;
- }
- }
-
- return EFI_NOT_FOUND;
-}
-
-#if SNP_DEBUG
-VOID
-snp_wait_for_key (
- VOID
- )
-/*++
-
-Routine Description:
- Wait for a key stroke, used for debugging purposes
-
-Arguments:
- none
-
-Returns:
- none
-
---*/
-{
- EFI_INPUT_KEY key;
-
- Aprint ("\nPress any key to continue\n");
-
- while (gST->ConIn->ReadKeyStroke (gST->ConIn, &key) == EFI_NOT_READY) {
- ;
- }
-}
-#endif
STATIC
EFI_STATUS
@@ -355,6 +93,7 @@ Returns: return cksum;
}
+STATIC
EFI_STATUS
EFIAPI
SimpleNetworkDriverSupported (
@@ -531,6 +270,7 @@ Done: return Status;
}
+STATIC
EFI_STATUS
EFIAPI
SimpleNetworkDriverStart (
@@ -1190,6 +930,7 @@ NiiError: return Status;
}
+STATIC
EFI_STATUS
EFIAPI
SimpleNetworkDriverStop (
@@ -1313,3 +1054,211 @@ Returns: return Status;
}
+//
+// Simple Network Protocol Driver Global Variables
+//
+EFI_DRIVER_BINDING_PROTOCOL mSimpleNetworkDriverBinding = {
+ SimpleNetworkDriverSupported,
+ SimpleNetworkDriverStart,
+ SimpleNetworkDriverStop,
+ 0xa,
+ NULL,
+ NULL
+};
+
+EFI_STATUS
+add_v2p (
+ IN OUT struct s_v2p **v2p,
+ EFI_PCI_IO_PROTOCOL_OPERATION type,
+ VOID *vaddr,
+ UINTN bsize
+ )
+/*++
+
+Routine Description:
+ This routine maps the given CPU address to a Device address. It creates a
+ an entry in the map list with the virtual and physical addresses and the
+ un map cookie.
+
+Arguments:
+ v2p - pointer to return a map list node pointer.
+ type - the direction in which the data flows from the given virtual address
+ device->cpu or cpu->device or both ways.
+ vaddr - virtual address (or CPU address) to be mapped
+ bsize - size of the buffer to be mapped.
+
+Returns:
+
+ EFI_SUCEESS - routine has completed the mapping
+ other - error as indicated.
+
+--*/
+{
+ EFI_STATUS Status;
+
+ if ((v2p == NULL) || (vaddr == NULL) || (bsize == 0)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ Status = gBS->AllocatePool (
+ EfiBootServicesData,
+ sizeof (struct s_v2p),
+ (VOID **) v2p
+ );
+
+ if (Status != EFI_SUCCESS) {
+ return Status;
+ }
+
+ Status = mPciIoFncs->Map (
+ mPciIoFncs,
+ type,
+ vaddr,
+ &bsize,
+ &(*v2p)->paddr,
+ &(*v2p)->unmap
+ );
+ if (Status != EFI_SUCCESS) {
+ gBS->FreePool (*v2p);
+ return Status;
+ }
+ (*v2p)->vaddr = vaddr;
+ (*v2p)->bsize = bsize;
+ (*v2p)->next = _v2p;
+ _v2p = *v2p;
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+find_v2p (
+ struct s_v2p **v2p,
+ VOID *vaddr
+ )
+/*++
+
+Routine Description:
+ This routine searches the linked list of mapped address nodes (for undi3.0
+ interface) to find the node that corresponds to the given virtual address and
+ returns a pointer to that node.
+
+Arguments:
+ v2p - pointer to return a map list node pointer.
+ vaddr - virtual address (or CPU address) to be searched in the map list
+
+Returns:
+
+ EFI_SUCEESS - if a match found!
+ Other - match not found
+
+--*/
+{
+ struct s_v2p *v;
+
+ if (v2p == NULL || vaddr == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ for (v = _v2p; v != NULL; v = v->next) {
+ if (v->vaddr == vaddr) {
+ *v2p = v;
+ return EFI_SUCCESS;
+ }
+ }
+
+ return EFI_NOT_FOUND;
+}
+
+EFI_STATUS
+del_v2p (
+ VOID *vaddr
+ )
+/*++
+
+Routine Description:
+ This routine unmaps the given virtual address and frees the memory allocated
+ for the map list node corresponding to that address.
+
+Arguments:
+ vaddr - virtual address (or CPU address) to be unmapped
+
+Returns:
+ EFI_SUCEESS - if successfully unmapped
+ Other - as indicated by the error
+
+
+--*/
+{
+ struct s_v2p *v;
+ struct s_v2p *t;
+ EFI_STATUS Status;
+
+ if (vaddr == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ if (_v2p == NULL) {
+ return EFI_NOT_FOUND;
+ }
+ //
+ // Is our node at the head of the list??
+ //
+ if ((v = _v2p)->vaddr == vaddr) {
+ _v2p = _v2p->next;
+
+ Status = mPciIoFncs->Unmap (mPciIoFncs, v->unmap);
+
+ gBS->FreePool (v);
+
+#if SNP_DEBUG
+ if (Status) {
+ Print (L"Unmap failed with status = %x\n", Status);
+ }
+#endif
+ return Status;
+ }
+
+ for (; v->next != NULL; v = t) {
+ if ((t = v->next)->vaddr == vaddr) {
+ v->next = t->next;
+ Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);
+ gBS->FreePool (t);
+#if SNP_DEBUG
+ if (Status) {
+ Print (L"Unmap failed with status = %x\n", Status);
+ }
+#endif
+ return Status;
+ }
+ }
+
+ return EFI_NOT_FOUND;
+}
+
+#if SNP_DEBUG
+VOID
+snp_wait_for_key (
+ VOID
+ )
+/*++
+
+Routine Description:
+ Wait for a key stroke, used for debugging purposes
+
+Arguments:
+ none
+
+Returns:
+ none
+
+--*/
+{
+ EFI_INPUT_KEY key;
+
+ Aprint ("\nPress any key to continue\n");
+
+ while (gST->ConIn->ReadKeyStroke (gST->ConIn, &key) == EFI_NOT_READY) {
+ ;
+ }
+}
+#endif
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/station_address.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/station_address.c index b5d2c40220..a55a644f6e 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/station_address.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/station_address.c @@ -95,6 +95,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
pxe_set_stn_addr (
SNP_DRIVER *snp,
diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/transmit.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/transmit.c index 404c75d5ae..3c722c9a50 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/transmit.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/transmit.c @@ -21,6 +21,7 @@ Revision history: #include "Snp.h"
+STATIC
EFI_STATUS
pxe_fillheader (
SNP_DRIVER *snp,
@@ -191,6 +192,7 @@ Returns: }
}
+STATIC
EFI_STATUS
pxe_transmit (
SNP_DRIVER *snp,
diff --git a/EdkModulePkg/Universal/PCD/Dxe/Pcd.c b/EdkModulePkg/Universal/PCD/Dxe/Pcd.c index 641cb706ee..2fd9cab523 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Pcd.c +++ b/EdkModulePkg/Universal/PCD/Dxe/Pcd.c @@ -525,12 +525,17 @@ DxePcdGetNextToken ( )
{
EFI_STATUS Status;
+ BOOLEAN PeiExMapTableEmpty;
+ BOOLEAN DxeExMapTableEmpty;
if (!FeaturePcdGet (PcdDxePcdDatabaseTraverseEnabled)) {
return EFI_UNSUPPORTED;
}
Status = EFI_NOT_FOUND;
+ PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
+ DxeExMapTableEmpty = DXE_EXMAP_TABLE_EMPTY;
+
//
// Scan the local token space
//
@@ -557,12 +562,12 @@ DxePcdGetNextToken ( return EFI_SUCCESS;
}
- if (PEI_EXMAP_TABLE_EMPTY && DXE_EXMAP_TABLE_EMPTY) {
+ if (PeiExMapTableEmpty && DxeExMapTableEmpty) {
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
return EFI_NOT_FOUND;
}
- if (!PEI_EXMAP_TABLE_EMPTY) {
+ if (!PeiExMapTableEmpty) {
Status = ExGetNextTokeNumber (
Guid,
TokenNumber,
@@ -577,7 +582,7 @@ DxePcdGetNextToken ( return Status;
}
- if (!DXE_EXMAP_TABLE_EMPTY) {
+ if (!DxeExMapTableEmpty) {
Status = ExGetNextTokeNumber (
Guid,
TokenNumber,
@@ -591,7 +596,7 @@ DxePcdGetNextToken ( return Status;
}
-
+STATIC
EFI_GUID **
GetDistinctTokenSpace (
IN OUT UINTN *ExMapTableSize,
@@ -649,6 +654,8 @@ DxePcdGetNextTokenSpace ( EFI_GUID **PeiTokenSpaceTable;
EFI_GUID **DxeTokenSpaceTable;
BOOLEAN Match;
+ BOOLEAN PeiExMapTableEmpty;
+ BOOLEAN DxeExMapTableEmpty;
if (!FeaturePcdGet (PcdDxePcdDatabaseTraverseEnabled)) {
return EFI_UNSUPPORTED;
@@ -656,7 +663,10 @@ DxePcdGetNextTokenSpace ( ASSERT (Guid != NULL);
- if (PEI_EXMAP_TABLE_EMPTY && DXE_EXMAP_TABLE_EMPTY) {
+ PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
+ DxeExMapTableEmpty = DXE_EXMAP_TABLE_EMPTY;
+
+ if (PeiExMapTableEmpty && DxeExMapTableEmpty) {
if (*Guid != NULL) {
return EFI_NOT_FOUND;
} else {
@@ -668,7 +678,7 @@ DxePcdGetNextTokenSpace ( if (TmpTokenSpaceBuffer[0] == NULL) {
PeiTokenSpaceTableSize = 0;
- if (!PEI_EXMAP_TABLE_EMPTY) {
+ if (!PeiExMapTableEmpty) {
PeiTokenSpaceTableSize = PEI_EXMAPPING_TABLE_SIZE;
PeiTokenSpaceTable = GetDistinctTokenSpace (&PeiTokenSpaceTableSize,
mPcdDatabase->PeiDb.Init.ExMapTable,
@@ -677,7 +687,7 @@ DxePcdGetNextTokenSpace ( CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);
}
- if (!DXE_EXMAP_TABLE_EMPTY) {
+ if (!DxeExMapTableEmpty) {
DxeTokenSpaceTableSize = DXE_EXMAPPING_TABLE_SIZE;
DxeTokenSpaceTable = GetDistinctTokenSpace (&DxeTokenSpaceTableSize,
mPcdDatabase->DxeDb.Init.ExMapTable,
diff --git a/EdkModulePkg/Universal/PCD/Dxe/Service.c b/EdkModulePkg/Universal/PCD/Dxe/Service.c index 51e16624ef..8ff45d38da 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Service.c +++ b/EdkModulePkg/Universal/PCD/Dxe/Service.c @@ -28,7 +28,6 @@ GetWorker ( )
{
UINT32 *LocalTokenNumberTable;
- UINT16 *SizeTable;
EFI_GUID *GuidTable;
UINT16 *StringTable;
EFI_GUID *Guid;
@@ -76,14 +75,11 @@ GetWorker ( // EBC compiler is very choosy. It may report warning about comparison
// between UINTN and 0 . So we add 1 in each size of the
// comparison.
- IsPeiDb = (TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE;
+ IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE);
LocalTokenNumberTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.LocalTokenNumberTable :
mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;
- SizeTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.SizeTable:
- mPcdDatabase->DxeDb.Init.SizeTable;
-
TokenNumber = IsPeiDb ? TokenNumber :
TokenNumber - PEI_LOCAL_TOKEN_NUMBER;
@@ -496,7 +492,7 @@ GetSkuEnabledTokenNumber ( -
+STATIC
VOID
InvokeCallbackOnSet (
UINT32 ExTokenNumber,
@@ -597,7 +593,7 @@ SetWorker ( // EBC compiler is very choosy. It may report warning about comparison
// between UINTN and 0 . So we add 1 in each size of the
// comparison.
- IsPeiDb = (TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE;
+ IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE);
LocalTokenNumberTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.LocalTokenNumberTable :
mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;
@@ -895,7 +891,7 @@ GetExPcdTokenNumber ( }
-
+STATIC
SKU_ID *
GetSkuIdArray (
IN UINTN LocalTokenNumberTableIdx,
@@ -923,7 +919,7 @@ GetSkuIdArray ( }
-
+STATIC
UINTN
GetSizeTableIndexA (
IN UINTN LocalTokenNumberTableIdx,
@@ -980,7 +976,7 @@ GetSizeTableIndexA ( -
+STATIC
UINTN
GetSizeTableIndex (
IN UINTN LocalTokenNumberTableIdx,
diff --git a/EdkModulePkg/Universal/PCD/Pei/Pcd.c b/EdkModulePkg/Universal/PCD/Pei/Pcd.c index 33bc4e1069..b8ed5b2119 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Pcd.c +++ b/EdkModulePkg/Universal/PCD/Pei/Pcd.c @@ -502,11 +502,14 @@ PeiPcdGetNextToken ( DYNAMICEX_MAPPING *ExMapTable;
UINTN i;
BOOLEAN Found;
-
+ BOOLEAN PeiExMapTableEmpty;
+
if (!FeaturePcdGet (PcdPeiPcdDatabaseTraverseEnabled)) {
return EFI_UNSUPPORTED;
}
-
+
+ PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
+
if (Guid == NULL) {
if (*TokenNumber > PEI_NEX_TOKEN_NUMBER) {
return EFI_NOT_FOUND;
@@ -517,7 +520,7 @@ PeiPcdGetNextToken ( }
return EFI_SUCCESS;
} else {
- if (PEI_EXMAP_TABLE_EMPTY) {
+ if (PeiExMapTableEmpty) {
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
return EFI_SUCCESS;
}
@@ -597,6 +600,7 @@ PeiPcdGetNextTokenSpace ( DYNAMICEX_MAPPING *ExMapTable;
UINTN i;
BOOLEAN Found;
+ BOOLEAN PeiExMapTableEmpty;
if (!FeaturePcdGet (PcdPeiPcdDatabaseTraverseEnabled)) {
return EFI_UNSUPPORTED;
@@ -604,7 +608,9 @@ PeiPcdGetNextTokenSpace ( ASSERT (Guid != NULL);
- if (PEI_EXMAP_TABLE_EMPTY) {
+ PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
+
+ if (PeiExMapTableEmpty) {
if (*Guid != NULL) {
return EFI_NOT_FOUND;
} else {
diff --git a/EdkModulePkg/Universal/PCD/Pei/Service.c b/EdkModulePkg/Universal/PCD/Pei/Service.c index 521c88b7fc..c228d3b383 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Service.c +++ b/EdkModulePkg/Universal/PCD/Pei/Service.c @@ -154,6 +154,7 @@ BuildPcdDatabase ( @retval EFI_SUCCESS Operation successful.
@retval EFI_NOT_FOUND Variablel not found.
--*/
+STATIC
EFI_STATUS
GetHiiVariable (
IN CONST EFI_GUID *VariableGuid,
@@ -205,7 +206,7 @@ GetHiiVariable ( }
-
+STATIC
UINT32
GetSkuEnabledTokenNumber (
UINT32 LocalTokenNumber,
@@ -261,7 +262,7 @@ GetSkuEnabledTokenNumber ( -
+STATIC
VOID
InvokeCallbackOnSet (
UINTN ExTokenNumber,
@@ -651,7 +652,7 @@ GetPcdDatabase ( }
-
+STATIC
SKU_ID *
GetSkuIdArray (
IN UINTN LocalTokenNumberTableIdx,
@@ -672,7 +673,7 @@ GetSkuIdArray ( }
-
+STATIC
UINTN
GetSizeTableIndex (
IN UINTN LocalTokenNumberTableIdx,
diff --git a/EdkModulePkg/Universal/Runtime/RuntimeDxe/Crc32.c b/EdkModulePkg/Universal/Runtime/RuntimeDxe/Crc32.c index 3692d978f4..dc22fa04fc 100644 --- a/EdkModulePkg/Universal/Runtime/RuntimeDxe/Crc32.c +++ b/EdkModulePkg/Universal/Runtime/RuntimeDxe/Crc32.c @@ -74,6 +74,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
UINT32
ReverseBits (
UINT32 Value
diff --git a/EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c b/EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c index 0b6965c8a4..f24d2a5c23 100644 --- a/EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c +++ b/EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c @@ -91,6 +91,7 @@ EFI_RUNTIME_ARCH_PROTOCOL mRuntime = { //
// Worker Functions
//
+STATIC
VOID
RuntimeDriverCalculateEfiHdrCrc (
IN OUT EFI_TABLE_HEADER *Hdr
@@ -224,6 +225,7 @@ Returns: return EFI_NOT_FOUND;
}
+STATIC
EFI_STATUS
RuntimeDriverConvertInternalPointer (
IN OUT VOID **ConvertAddress
diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c b/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c index efd4f5273d..85e552bac0 100644 --- a/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c +++ b/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c @@ -40,6 +40,7 @@ EFI_DATA_HUB_PROTOCOL *mDataHubProtocol; @retval !NULL Point to buffer of record.
**/
+STATIC
DATAHUB_STATUSCODE_RECORD *
AcquireRecordBuffer (
VOID
@@ -92,6 +93,7 @@ AcquireRecordBuffer ( @return NULL the FIFO of record is empty.
**/
+STATIC
DATAHUB_STATUSCODE_RECORD *
RetrieveRecord (
VOID
@@ -229,6 +231,7 @@ DataHubStatusCodeReportWorker ( @param Context Context of the event.
**/
+STATIC
VOID
EFIAPI
LogDataHubEventCallBack (
diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/Ipf/DxeStatusCodeIpf.c b/EdkModulePkg/Universal/StatusCode/Dxe/Ipf/DxeStatusCodeIpf.c index 506a2a1a91..eee0c943f6 100644 --- a/EdkModulePkg/Universal/StatusCode/Dxe/Ipf/DxeStatusCodeIpf.c +++ b/EdkModulePkg/Universal/StatusCode/Dxe/Ipf/DxeStatusCodeIpf.c @@ -182,6 +182,7 @@ ReportDispatcher ( @return Value returned in SAL_RETURN_REGS
--*/
+STATIC
SAL_RETURN_REGS
EFIAPI
ReportEsalServiceEntry (
diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c b/EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c index 0b16dfeadb..a9dff1defd 100644 --- a/EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c +++ b/EdkModulePkg/Universal/StatusCode/Dxe/SerialStatusCodeWorker.c @@ -15,6 +15,8 @@ **/
+#include "DxeStatusCode.h"
+
STATIC
EFI_SERIAL_IO_PROTOCOL *mSerialIoProtocol;
diff --git a/EdkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c b/EdkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c index 9b703878fd..c49750b2dd 100644 --- a/EdkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c +++ b/EdkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c @@ -14,6 +14,8 @@ **/
+#include "PeiStatusCode.h"
+
/**
Create one memory status code GUID'ed HOB, use PacketIndex
to identify the packet.
@@ -23,6 +25,7 @@ @return Always return pointer of memory status code packet.
**/
+STATIC
MEMORY_STATUSCODE_PACKET_HEADER *
CreateMemoryStatusCodePacket (
UINT16 PacketIndex
diff --git a/EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c b/EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c index 3cd072ca2c..0e3f47e125 100644 --- a/EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c +++ b/EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c @@ -15,6 +15,8 @@ **/
+#include "PeiStatusCode.h"
+
/**
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
diff --git a/EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.c b/EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.c index dd316114bf..f78d4226e5 100644 --- a/EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.c +++ b/EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.c @@ -30,6 +30,7 @@ Abstract: EFI_GUID mFormSetGuid = FORMSET_GUID;
EFI_GUID mStringPackGuid = STRING_PACK_GUID;
+STATIC
EFI_STATUS
EFIAPI
DriverCallback (
diff --git a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Fonts.c b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Fonts.c index d7daa64902..ebab3bc3d0 100644 --- a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Fonts.c +++ b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Fonts.c @@ -210,14 +210,17 @@ Returns: if (Narrow) {
for (Value = 0; Value != Count; Value++) {
- *GlyphBuffer[Location + Value] |= GlobalData->NarrowGlyphs[Character].GlyphCol1[Value];
+ *GlyphBuffer[Location + Value] = (UINT8) (*GlyphBuffer[Location + Value] |
+ GlobalData->NarrowGlyphs[Character].GlyphCol1[Value]);
}
Attributes = GlobalData->NarrowGlyphs[Character].Attributes & EFI_GLYPH_NON_SPACING;
} else {
for (Value = 0; Value != Count; Value++) {
- *GlyphBuffer[Location + Value] |= GlobalData->WideGlyphs[Character].GlyphCol1[Value];
- *GlyphBuffer[Location + Value + Count] |= GlobalData->WideGlyphs[Character].GlyphCol2[Value];
+ *GlyphBuffer[Location + Value] = (UINT8) (*GlyphBuffer[Location + Value] |
+ GlobalData->WideGlyphs[Character].GlyphCol1[Value]);
+ *GlyphBuffer[Location + Value + Count] = (UINT8) (*GlyphBuffer[Location + Value + Count] |
+ GlobalData->WideGlyphs[Character].GlyphCol2[Value]);
}
Attributes = GlobalData->WideGlyphs[Character].Attributes & EFI_GLYPH_NON_SPACING;
diff --git a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Forms.c b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Forms.c index 4178284a49..0c8629c06f 100644 --- a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Forms.c +++ b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Forms.c @@ -22,6 +22,7 @@ Abstract: #include "HiiDatabase.h"
+STATIC
CHAR16*
Ascii2Unicode (
OUT CHAR16 *UnicodeStr,
@@ -54,6 +55,7 @@ Ascii2Unicode ( }
}
+STATIC
CHAR8*
Unicode2Ascii (
OUT CHAR8 *AsciiStr,
@@ -86,6 +88,7 @@ Unicode2Ascii ( }
}
+STATIC
VOID
ExtractDevicePathData (
IN EFI_HII_DATA_TABLE *DataTable,
@@ -129,6 +132,7 @@ Returns: *ExportBufferPtr = ExportBuffer;
}
+STATIC
VOID
ExtractVariableData (
IN OUT EFI_HII_DATA_TABLE *DataTable,
@@ -205,6 +209,7 @@ Returns: &gEfiFormCallbackProtocolGuid,
(VOID *) &FormCallback
);
+ ASSERT_EFI_ERROR (Status);
}
//
// Since we have a "Setup" variable that wasn't specified by a variable op-code
@@ -240,6 +245,7 @@ Returns: &TempValue,
ExportBuffer
);
+ ASSERT_EFI_ERROR (Status);
} else {
Status = gRT->GetVariable (
(CHAR16 *) SETUP_MAP_NAME,
@@ -248,6 +254,7 @@ Returns: &TempValue,
ExportBuffer
);
+ ASSERT_EFI_ERROR (Status);
}
ExportBuffer = (UINT8 *) (UINTN) (((UINTN) ExportBuffer) + TempValue);
@@ -306,6 +313,7 @@ Returns: &TempValue,
ExportBuffer
);
+ ASSERT_EFI_ERROR (Status);
} else {
Status = gRT->GetVariable (
String,
@@ -314,6 +322,7 @@ Returns: &TempValue,
ExportBuffer
);
+ ASSERT_EFI_ERROR (Status);
}
ExportBuffer = (UINT8 *) (UINTN) (((UINTN) ExportBuffer) + TempValue);
@@ -367,7 +376,6 @@ Returns: UINT8 *ExportBuffer;
EFI_HII_EXPORT_TABLE *ExportTable;
EFI_HII_DATA_TABLE *DataTable;
- BOOLEAN InsufficientSize;
BOOLEAN VariableExist;
UINT16 NumberOfHiiDataTables;
UINTN SizeNeeded;
@@ -386,7 +394,6 @@ Returns: FormPack = NULL;
RawData = NULL;
PackageInstance = NULL;
- InsufficientSize = FALSE;
NumberOfHiiDataTables = 0;
VariableSize = 0;
TempValue = 0;
diff --git a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/HiiDatabase.c b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/HiiDatabase.c index ce34eff5bd..bcec42b24e 100644 --- a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/HiiDatabase.c +++ b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/HiiDatabase.c @@ -154,7 +154,6 @@ Returns: --*/
{
- EFI_HII_GLOBAL_DATA *GlobalData;
EFI_HII_HANDLE_DATABASE *Database;
EFI_HII_DATA *HiiData;
UINTN HandleCount;
@@ -165,8 +164,6 @@ Returns: HiiData = EFI_HII_DATA_FROM_THIS (This);
- GlobalData = HiiData->GlobalData;
-
Database = HiiData->DatabaseHead;
if (Database == NULL) {
@@ -333,7 +330,6 @@ Returns: EFI_HII_DATA *HiiData;
EFI_HII_HANDLE_DATABASE *HandleDatabase;
EFI_HII_STRING_PACK *StringPack;
- EFI_HII_STRING_PACK *Location;
RELOFST Token;
UINT32 Length;
@@ -376,8 +372,6 @@ Returns: StringPack = (EFI_HII_STRING_PACK *) (&StringPackageInstance->IfrData);
}
- Location = StringPack;
-
//
// Remember that the string packages are formed into contiguous blocks of language data.
//
diff --git a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Package.c b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Package.c index 3e9e5364e9..ec3f49c5dc 100644 --- a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Package.c +++ b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Package.c @@ -264,7 +264,6 @@ Returns: UINT32 TotalTokenNumber;
UINT8 *Local;
EFI_NARROW_GLYPH *NarrowGlyph;
- EFI_WIDE_GLYPH *WideGlyph;
if (Packages->NumberOfPackages == 0 || This == NULL) {
return EFI_INVALID_PARAMETER;
@@ -439,7 +438,7 @@ Returns: // we go down one level deeper, increment the handle value that will be passed back.
//
if (Database->Handle >= *Handle) {
- *Handle = Database->Handle + 1;
+ *Handle = (EFI_HII_HANDLE) (Database->Handle + 1);
}
}
@@ -518,7 +517,6 @@ Returns: Local = (UINT8 *) (&FontPack->NumberOfWideGlyphs + sizeof (UINT8)) +
(sizeof (EFI_NARROW_GLYPH)) *
NumNarrowGlyphs;
- WideGlyph = (EFI_WIDE_GLYPH *) Local;
CopyMem (
&Member,
(UINTN *) (Local + sizeof (EFI_WIDE_GLYPH) * Count),
@@ -530,7 +528,6 @@ Returns: CopyMem (&Unicode, &GlobalData->WideGlyphs[Member].UnicodeWeight, sizeof (UINT16));
if (Unicode == 0) {
Local = (UINT8*)(&FontPack->NumberOfWideGlyphs + sizeof(UINT8)) + (sizeof(EFI_NARROW_GLYPH)) * NumNarrowGlyphs;
- WideGlyph = (EFI_WIDE_GLYPH *) Local;
CopyMem (
&GlobalData->WideGlyphs[Member],
(UINTN *) (Local + sizeof (EFI_WIDE_GLYPH) * Count),
@@ -619,7 +616,6 @@ Returns: EFI_HII_DATA *HiiData;
EFI_HII_HANDLE_DATABASE *HandleDatabase;
EFI_HII_HANDLE_DATABASE *PreviousHandleDatabase;
- UINTN Count;
if (This == NULL || Handle == 0) {
return EFI_INVALID_PARAMETER;
@@ -635,7 +631,7 @@ Returns: //
PreviousHandleDatabase = HandleDatabase;
- for (Count = 0; HandleDatabase != NULL; HandleDatabase = HandleDatabase->NextHandleDatabase) {
+ for (; HandleDatabase != NULL; HandleDatabase = HandleDatabase->NextHandleDatabase) {
//
// Match the numeric value with the database entry - if matched,
// free the package instance and apply fix-up to database linked list
diff --git a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Strings.c b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Strings.c index 742a01dc43..26f797e63b 100644 --- a/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Strings.c +++ b/EdkModulePkg/Universal/UserInterface/HiiDataBase/Dxe/Strings.c @@ -22,6 +22,7 @@ Abstract: #include "HiiDatabase.h"
+STATIC
VOID
AsciiToUnicode (
IN UINT8 *Lang,
@@ -138,6 +139,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
EFI_STATUS
HiiNewString2 (
IN EFI_HII_PROTOCOL *This,
@@ -766,7 +768,7 @@ Returns: &NewString,
TRUE
);
-
+ ASSERT_EFI_ERROR (Status);
}
gBS->FreePool (LangCodes);
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Boolean.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Boolean.c index 122da065a9..d3f77e09f5 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Boolean.c +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Boolean.c @@ -83,6 +83,7 @@ Returns: mBooleanEvaluationStackEnd = NewStack + StackSizeInBoolean;
}
+STATIC
VOID
InitializeBooleanEvaluator (
VOID
@@ -176,6 +177,7 @@ Returns: return ReturnValue;
}
+STATIC
EFI_STATUS
GrowBooleanExpression (
IN EFI_INCONSISTENCY_DATA *InconsistentTags,
@@ -212,6 +214,7 @@ GrowBooleanExpression ( return EFI_SUCCESS;
}
+STATIC
VOID
CreateBooleanExpression (
IN EFI_FILE_FORM_TAGS *FileFormTags,
@@ -311,6 +314,7 @@ NextEntry: GrowBooleanExpression (&FakeInconsistentTags, BooleanExpression, BooleanExpressionLength);
}
+STATIC
EFI_STATUS
BooleanVariableWorker (
IN CHAR16 *VariableName,
@@ -369,6 +373,7 @@ Returns: return Status;
}
+STATIC
UINT8
PredicateIfrType (
IN EFI_INCONSISTENCY_DATA *Iterator
@@ -416,6 +421,7 @@ Returns: return 0x2;
}
+STATIC
VOID
PostOrderEvaluate (
IN EFI_FILE_FORM_TAGS *FileFormTags,
@@ -616,7 +622,7 @@ Returns: break;
case EFI_IFR_NOT_OP:
Operator = PopBool (StackPtr);
- PushBool (StackPtr, !Operator);
+ PushBool (StackPtr, (BOOLEAN) (!Operator));
break;
case EFI_IFR_SUPPRESS_IF_OP:
@@ -1350,11 +1356,12 @@ Returns: return Operator;
}
- return FALSE;
+ goto Done;
}
Iterator++;
}
+Done:
return FALSE;
}
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c index 466039f8dc..ebf038581f 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c @@ -215,7 +215,6 @@ ReadPassword ( )
{
EFI_STATUS Status;
- UINTN PasswordSize;
UINTN ScreenSize;
CHAR16 NullCharacter;
CHAR16 Space[2];
@@ -234,12 +233,12 @@ ReadPassword ( UINTN DimensionsWidth;
UINTN DimensionsHeight;
EFI_IFR_DATA_ENTRY *DataEntry;
+ UINTN WidthOfString;
DimensionsWidth = gScreenDimensions.RightColumn - gScreenDimensions.LeftColumn;
DimensionsHeight = gScreenDimensions.BottomRow - gScreenDimensions.TopRow;
VariableDefinition = NULL;
- PasswordSize = 0;
NullCharacter = CHAR_NULL;
Space[0] = L' ';
Space[1] = CHAR_NULL;
@@ -309,7 +308,8 @@ Error: // Upon error, we will likely receive a string to print out
// Display error popup
//
- ScreenSize = EFI_MAX(GetStringWidth (Packet->String), GetStringWidth (gPressEnter)) / 2;
+ WidthOfString = GetStringWidth (Packet->String);
+ ScreenSize = EFI_MAX(WidthOfString, GetStringWidth (gPressEnter)) / 2;
CreatePopUp (ScreenSize, 4, &NullCharacter, Packet->String, gPressEnter, &NullCharacter);
gBS->FreePool (Packet);
@@ -318,9 +318,8 @@ Error: } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
}
- gBS->FreePool (TempString);
- gBS->FreePool (TempString2);
- return EFI_NOT_READY;
+ Status = EFI_NOT_READY;
+ goto Done;
}
}
@@ -418,10 +417,12 @@ Error: if (Confirmation) {
if (EFI_ERROR (Status)) {
if (Packet->String == NULL) {
- ScreenSize = EFI_MAX (GetStringWidth (gConfirmError), GetStringWidth (gPressEnter)) / 2;
+ WidthOfString = GetStringWidth (gConfirmError);
+ ScreenSize = EFI_MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2;
CreatePopUp (ScreenSize, 4, &NullCharacter, gConfirmError, gPressEnter, &NullCharacter);
} else {
- ScreenSize = EFI_MAX (GetStringWidth (Packet->String), GetStringWidth (gPressEnter)) / 2;
+ WidthOfString = GetStringWidth (Packet->String);
+ ScreenSize = EFI_MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2;
CreatePopUp (ScreenSize, 4, &NullCharacter, Packet->String, gPressEnter, &NullCharacter);
gBS->FreePool (Packet);
}
@@ -431,15 +432,13 @@ Error: Status = WaitForKeyStroke (&Key);
if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) {
- gBS->FreePool (TempString);
- gBS->FreePool (TempString2);
- return EFI_NOT_READY;
+ Status = EFI_NOT_READY;
+ goto Done;
}
} while (1);
} else {
- gBS->FreePool (TempString);
- gBS->FreePool (TempString2);
- return EFI_NOT_READY;
+ Status = EFI_NOT_READY;
+ goto Done;
}
} else {
//
@@ -451,9 +450,8 @@ Error: }
if (PromptForPassword && EFI_ERROR (Status)) {
- gBS->FreePool (TempString);
- gBS->FreePool (TempString2);
- return EFI_DEVICE_ERROR;
+ Status = EFI_DEVICE_ERROR;
+ goto Done;
}
}
}
@@ -464,19 +462,18 @@ Error: // Otherwise, kick and error box, and return an error
//
if (StrCmp (TempString, TempString2) == 0) {
- gBS->FreePool (TempString);
- gBS->FreePool (TempString2);
- return EFI_SUCCESS;
+ Status = EFI_SUCCESS;
+ goto Done;
} else {
- ScreenSize = EFI_MAX (GetStringWidth (gConfirmError), GetStringWidth (gPressEnter)) / 2;
+ WidthOfString = GetStringWidth (gConfirmError);
+ ScreenSize = EFI_MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2;
CreatePopUp (ScreenSize, 4, &NullCharacter, gConfirmError, gPressEnter, &NullCharacter);
StringPtr[0] = CHAR_NULL;
do {
Status = WaitForKeyStroke (&Key);
if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) {
- gBS->FreePool (TempString);
- gBS->FreePool (TempString2);
- return EFI_DEVICE_ERROR;
+ Status = EFI_DEVICE_ERROR;
+ goto Done;
}
} while (1);
}
@@ -486,9 +483,8 @@ Error: //
// I was asked for a password, return it back in StringPtr
//
- gBS->FreePool (TempString);
- gBS->FreePool (TempString2);
- return EFI_SUCCESS;
+ Status = EFI_SUCCESS;
+ goto Done;
} else {
//
// If the two passwords were not the same kick an error popup
@@ -575,6 +571,8 @@ Error: } while (!ConfirmationComplete);
} while (1);
+
+Done:
gBS->FreePool (TempString);
gBS->FreePool (TempString2);
return Status;
@@ -655,7 +653,6 @@ Returns: CHAR16 NullCharacter;
CHAR16 *StringPtr;
EFI_FILE_FORM_TAGS *FileFormTags;
- EFI_STATUS Status;
EFI_VARIABLE_DEFINITION *VariableDefinition;
UINTN Loop;
@@ -689,7 +686,7 @@ Returns: goto TheKey2;
}
- Status = WaitForKeyStroke (&Key);
+ WaitForKeyStroke (&Key);
TheKey2:
switch (Key.UnicodeChar) {
@@ -879,7 +876,7 @@ EnterCarriageReturn: CreatePopUp (GetStringWidth (StringPtr) / 2, 3, &NullCharacter, StringPtr, &NullCharacter);
do {
- Status = WaitForKeyStroke (&Key);
+ WaitForKeyStroke (&Key);
switch (Key.UnicodeChar) {
@@ -985,7 +982,6 @@ GetSelectionInputPopUp ( OUT UINT16 *KeyValue
)
{
- EFI_STATUS Status;
EFI_INPUT_KEY Key;
UINTN Index;
UINTN TempIndex;
@@ -1005,7 +1001,6 @@ GetSelectionInputPopUp ( UINTN MenuLinesInView;
UINTN PopUpWidth;
CHAR16 Character;
- UINTN FirstOption;
BOOLEAN FirstOptionFoundFlag;
INT32 SavedAttribute;
EFI_TAG TagBackup;
@@ -1017,10 +1012,8 @@ GetSelectionInputPopUp ( BOOLEAN ShowDownArrow;
BOOLEAN ShowUpArrow;
UINTN DimensionsWidth;
- UINTN DimensionsHeight;
DimensionsWidth = gScreenDimensions.RightColumn - gScreenDimensions.LeftColumn;
- DimensionsHeight = gScreenDimensions.BottomRow - gScreenDimensions.TopRow;
TempValue = 0;
TempIndex = 0;
@@ -1050,7 +1043,6 @@ GetSelectionInputPopUp ( Count = 0;
PopUpWidth = 0;
- FirstOption = MenuOption->TagIndex;
FirstOptionFoundFlag = FALSE;
StringPtr = AllocateZeroPool ((gOptionBlockWidth + 1) * 2);
@@ -1066,7 +1058,6 @@ GetSelectionInputPopUp ( if (MenuOption->Tags[Index].Operand == EFI_IFR_ONE_OF_OPTION_OP &&
!MenuOption->Tags[Index].Suppress) {
if (!FirstOptionFoundFlag) {
- FirstOption = Index;
FirstOptionFoundFlag = TRUE;
}
@@ -1309,7 +1300,7 @@ GetSelectionInputPopUp ( KeyInitialized = TRUE;
}
- Status = WaitForKeyStroke (&Key);
+ WaitForKeyStroke (&Key);
TheKey:
switch (Key.UnicodeChar) {
@@ -1553,14 +1544,14 @@ TheKey: *Value = TempValue;
}
- gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute);
- return EFI_SUCCESS;
+ goto Done;
default:
break;
}
} while (1);
+Done:
gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute);
return EFI_SUCCESS;
}
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c index 7b219c85bb..8c81fd8c54 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c @@ -348,6 +348,7 @@ DisplayPageFrame ( | ^"=Move Highlight <Spacebar> Toggles Checkbox Esc=Discard Changes |
+------------------------------------------------------------------------------+
*/
+STATIC
UI_MENU_OPTION *
DisplayForm (
OUT UI_MENU_OPTION *Selection,
@@ -796,6 +797,7 @@ Returns: }
+STATIC
VOID
ExtractFormHandle (
IN UI_MENU_OPTION *Selection,
@@ -851,6 +853,7 @@ ExtractFormHandle ( return ;
}
+STATIC
EFI_STATUS
UpdateNewTagData (
IN UINT8 *FormData,
@@ -1092,6 +1095,7 @@ UpdateNewTagData ( return Status;
}
+STATIC
VOID
ExtractDynamicFormHandle (
IN UI_MENU_OPTION *Selection,
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Print.h b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Print.h index 86feb88bdf..d055513b71 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Print.h +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Print.h @@ -22,6 +22,8 @@ Abstract: #ifndef _PRINT_H_
#define _PRINT_H_
+#include "Setup.h"
+
#define LEFT_JUSTIFY 0x01
#define PREFIX_SIGN 0x02
#define PREFIX_BLANK 0x04
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/ProcessOptions.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/ProcessOptions.c index 8a878bcf71..a2aa50fbd5 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/ProcessOptions.c +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/ProcessOptions.c @@ -77,6 +77,7 @@ ExtractNvValue ( return Status;
}
+STATIC
VOID
AdjustNvMap (
IN EFI_FILE_FORM_TAGS *FileFormTags,
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Setup.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Setup.c index f62bc120f0..407f7694ba 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Setup.c +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Setup.c @@ -144,6 +144,7 @@ InstallPrint ( VOID
);
+STATIC
EFI_STATUS
EFIAPI
SendForm (
@@ -189,7 +190,6 @@ Returns: --*/
{
- EFI_FORM_CONFIGURATION_DATA *FormData;
EFI_FORM_CALLBACK_PROTOCOL *FormCallback;
EFI_FILE_FORM_TAGS *FileFormTagsHead;
UI_MENU_OPTION *Selection;
@@ -279,7 +279,6 @@ Returns: ASSERT (gPreviousValue != NULL);
}
- FormData = EFI_FORM_DATA_FROM_THIS (This);
Callback = FALSE;
FormCallback = NULL;
@@ -710,6 +709,7 @@ GetTagCount ( (*NumberOfTags)++;
}
+STATIC
VOID
AddNextInconsistentTag (
IN OUT EFI_INCONSISTENCY_DATA **InconsistentTagsPtr
@@ -1643,6 +1643,7 @@ Returns: return Buffer;
}
+STATIC
EFI_STATUS
PopulateHomePage (
IN UINTN NumberOfIfrImages,
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Ui.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Ui.c index 369d2b4911..854d023f8e 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Ui.c +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Ui.c @@ -211,6 +211,7 @@ Returns: }
}
+STATIC
VOID
UpdateDateAndTime (
VOID
@@ -492,7 +493,6 @@ Returns: UINTN Start;
UINTN Top;
UINTN Index;
- EFI_STATUS Status;
BOOLEAN SelectionComplete;
UINTN InputOffset;
UINTN CurrentAttribute;
@@ -570,12 +570,12 @@ Returns: // Take the first key typed and report it back?
//
if (HotKey) {
- Status = WaitForKeyStroke (&Key);
+ WaitForKeyStroke (&Key);
CopyMem (KeyValue, &Key, sizeof (EFI_INPUT_KEY));
} else {
do {
- Status = WaitForKeyStroke (&Key);
+ WaitForKeyStroke (&Key);
switch (Key.UnicodeChar) {
case CHAR_NULL:
@@ -1046,6 +1046,7 @@ Returns: return ;
}
+STATIC
BOOLEAN
SelectionsAreValid (
IN UI_MENU_OPTION *MenuOption,
@@ -1068,7 +1069,6 @@ Returns: EFI_FILE_FORM_TAGS *FileFormTags;
CHAR16 *StringPtr;
CHAR16 NullCharacter;
- EFI_STATUS Status;
UINTN Index;
UINT16 *NvRamMap;
STRING_REF PopUp;
@@ -1103,7 +1103,7 @@ Returns: CreatePopUp (GetStringWidth (StringPtr) / 2, 3, &NullCharacter, StringPtr, &NullCharacter);
do {
- Status = WaitForKeyStroke (&Key);
+ WaitForKeyStroke (&Key);
switch (Key.UnicodeChar) {
@@ -1284,6 +1284,7 @@ Returns: }
}
+STATIC
VOID
UpdateOptionSkipLines (
IN EFI_IFR_DATA_ARRAY *PageData,
diff --git a/EdkModulePkg/Universal/Variable/Pei/Variable.c b/EdkModulePkg/Universal/Variable/Pei/Variable.c index f10a96ba2d..e2f3c4bddd 100644 --- a/EdkModulePkg/Universal/Variable/Pei/Variable.c +++ b/EdkModulePkg/Universal/Variable/Pei/Variable.c @@ -68,6 +68,7 @@ Returns: }
+STATIC
VARIABLE_HEADER *
GetNextVariablePtr (
IN VARIABLE_HEADER *Variable
@@ -90,6 +91,7 @@ Returns: return (VARIABLE_HEADER *) ((UINTN) GET_VARIABLE_DATA_PTR (Variable) + Variable->DataSize + GET_PAD_SIZE (Variable->DataSize));
}
+STATIC
BOOLEAN
EFIAPI
IsValidVariableHeader (
@@ -120,6 +122,7 @@ Returns: return TRUE;
}
+STATIC
VARIABLE_STORE_STATUS
EFIAPI
GetVariableStoreStatus (
@@ -163,6 +166,7 @@ Returns: }
}
+STATIC
EFI_STATUS
CompareWithValidVariable (
IN VARIABLE_HEADER *Variable,
@@ -215,6 +219,7 @@ Returns: return EFI_NOT_FOUND;
}
+STATIC
EFI_STATUS
EFIAPI
FindVariable (
diff --git a/EdkModulePkg/Universal/Variable/RuntimeDxe/Ipf/InitVariable.c b/EdkModulePkg/Universal/Variable/RuntimeDxe/Ipf/InitVariable.c index ee2a4852a0..da71705dae 100644 --- a/EdkModulePkg/Universal/Variable/RuntimeDxe/Ipf/InitVariable.c +++ b/EdkModulePkg/Universal/Variable/RuntimeDxe/Ipf/InitVariable.c @@ -26,6 +26,7 @@ Revision History //
extern ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
+STATIC
SAL_RETURN_REGS
EsalVariableCommonEntry (
IN UINT64 FunctionId,
diff --git a/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c index f59d2a3969..aa0742364e 100644 --- a/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -27,6 +27,7 @@ Revision History //
ESAL_VARIABLE_GLOBAL *mVariableModuleGlobal;
+STATIC
UINT32
EFIAPI
ArrayLength (
@@ -63,6 +64,7 @@ Returns: return (Count * 2) + 2;
}
+STATIC
BOOLEAN
EFIAPI
IsValidVariableHeader (
@@ -93,6 +95,7 @@ Returns: return TRUE;
}
+STATIC
EFI_STATUS
EFIAPI
UpdateVariableStore (
@@ -242,6 +245,7 @@ Returns: return EFI_SUCCESS;
}
+STATIC
VARIABLE_STORE_STATUS
EFIAPI
GetVariableStoreStatus (
@@ -283,6 +287,7 @@ Returns: }
}
+STATIC
UINT8 *
EFIAPI
GetVariableDataPtr (
@@ -310,6 +315,7 @@ Returns: return (UINT8 *) ((UINTN) GET_VARIABLE_NAME_PTR (Variable) + Variable->NameSize + GET_PAD_SIZE (Variable->NameSize));
}
+STATIC
VARIABLE_HEADER *
EFIAPI
GetNextVariablePtr (
@@ -340,6 +346,7 @@ Returns: return (VARIABLE_HEADER *) ((UINTN) GetVariableDataPtr (Variable) + Variable->DataSize + GET_PAD_SIZE (Variable->DataSize));
}
+STATIC
VARIABLE_HEADER *
EFIAPI
GetEndPointer (
@@ -367,6 +374,7 @@ Returns: return (VARIABLE_HEADER *) ((UINTN) VarStoreHeader + VarStoreHeader->Size);
}
+STATIC
EFI_STATUS
EFIAPI
Reclaim (
@@ -487,6 +495,7 @@ Returns: return Status;
}
+STATIC
EFI_STATUS
EFIAPI
FindVariable (
@@ -707,7 +716,7 @@ Returns: Variable.StartPtr = (VARIABLE_HEADER *) ((UINTN) (Global->VolatileVariableBase + sizeof (VARIABLE_STORE_HEADER)));
Variable.EndPtr = (VARIABLE_HEADER *) GetEndPointer ((VARIABLE_STORE_HEADER *) ((UINTN) Global->VolatileVariableBase));
} else {
- return EFI_NOT_FOUND;
+ goto Error;
}
Variable.CurrPtr = Variable.StartPtr;
@@ -745,6 +754,7 @@ Returns: Variable.CurrPtr = GetNextVariablePtr (Variable.CurrPtr);
}
+Error:
return EFI_NOT_FOUND;
}
diff --git a/EdkModulePkg/Universal/Variable/RuntimeDxe/reclaim.c b/EdkModulePkg/Universal/Variable/RuntimeDxe/reclaim.c index a4bcdd67ce..00ebcf84fd 100644 --- a/EdkModulePkg/Universal/Variable/RuntimeDxe/reclaim.c +++ b/EdkModulePkg/Universal/Variable/RuntimeDxe/reclaim.c @@ -86,6 +86,7 @@ GetFvbHandleByAddress ( return Status;
}
+STATIC
EFI_STATUS
GetLbaAndOffsetByAddress (
IN EFI_PHYSICAL_ADDRESS Address,
diff --git a/EdkModulePkg/Universal/WatchdogTimer/Dxe/WatchDogTimer.c b/EdkModulePkg/Universal/WatchdogTimer/Dxe/WatchDogTimer.c index b54b25ee83..2f8866711d 100644 --- a/EdkModulePkg/Universal/WatchdogTimer/Dxe/WatchDogTimer.c +++ b/EdkModulePkg/Universal/WatchdogTimer/Dxe/WatchDogTimer.c @@ -55,6 +55,7 @@ EFI_EVENT mWatchdogTimerEvent; //
// Worker Functions
//
+STATIC
VOID
EFIAPI
WatchdogTimerDriverExpires (
|