diff --git a/CloverEFI/AcpiReset/Reset.c b/CloverEFI/AcpiReset/Reset.c
index 9761f26dc..8f2870bb4 100644
--- a/CloverEFI/AcpiReset/Reset.c
+++ b/CloverEFI/AcpiReset/Reset.c
@@ -193,7 +193,7 @@ InitializeReset (
// Copy it to Runtime Memory
//
// ASSERT (sizeof (EFI_ACPI_DESCRIPTION) == GET_GUID_HOB_DATA_SIZE (HobAcpiDescription));
- CopyMem (&mAcpiDescription, GET_GUID_HOB_DATA (HobAcpiDescription), sizeof (EFI_ACPI_DESCRIPTION));
+ CopyMem(&mAcpiDescription, GET_GUID_HOB_DATA (HobAcpiDescription), sizeof (EFI_ACPI_DESCRIPTION));
// DEBUG ((DEBUG_INFO, "ACPI Reset Base - %lx\n", mAcpiDescription.RESET_REG.Address));
// DEBUG ((DEBUG_INFO, "ACPI Reset Value - %02x\n", (UINTN)mAcpiDescription.RESET_VALUE));
diff --git a/CloverEFI/BiosKeyboard/BiosKeyboard.c b/CloverEFI/BiosKeyboard/BiosKeyboard.c
index f386fd3cf..2573eceb3 100644
--- a/CloverEFI/BiosKeyboard/BiosKeyboard.c
+++ b/CloverEFI/BiosKeyboard/BiosKeyboard.c
@@ -74,7 +74,7 @@ Enqueue (
return EFI_NOT_READY;
}
- CopyMem (&Queue->Buffer[Queue->Rear], KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&Queue->Buffer[Queue->Rear], KeyData, sizeof (EFI_KEY_DATA));
Queue->Rear = (Queue->Rear + 1) % QUEUE_MAX_COUNT;
return EFI_SUCCESS;
@@ -101,7 +101,7 @@ Dequeue (
return EFI_NOT_READY;
}
- CopyMem (KeyData, &Queue->Buffer[Queue->Front], sizeof (EFI_KEY_DATA));
+ CopyMem(KeyData, &Queue->Buffer[Queue->Front], sizeof (EFI_KEY_DATA));
Queue->Front = (Queue->Front + 1) % QUEUE_MAX_COUNT;
return EFI_SUCCESS;
@@ -1521,7 +1521,7 @@ BiosKeyboardReadKeyStroke (
}
}
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS;
}
@@ -2708,7 +2708,7 @@ BiosKeyboardRegisterKeyNotify (
NewNotify->Signature = BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
- CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&BiosKeyboardPrivate->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
diff --git a/CloverEFI/BiosKeyboard/LegacyBiosThunk.c b/CloverEFI/BiosKeyboard/LegacyBiosThunk.c
index b78019628..b5d3177e4 100644
--- a/CloverEFI/BiosKeyboard/LegacyBiosThunk.c
+++ b/CloverEFI/BiosKeyboard/LegacyBiosThunk.c
@@ -107,7 +107,7 @@ InitializeInterruptRedirection (
//
// Copy code to legacy region
//
- CopyMem ((VOID *)(UINTN)LegacyRegionBase, (VOID *)&InterruptRedirectionCode[0], sizeof (InterruptRedirectionCode));
+ CopyMem((VOID *)(UINTN)LegacyRegionBase, (VOID *)&InterruptRedirectionCode[0], sizeof (InterruptRedirectionCode));
//
// Get VectorBase, it should be 0x68
@@ -226,7 +226,7 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES;
- CopyMem (&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
+ CopyMem(&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
Ret = (BOOLEAN) (Regs->E.EFLAGS.Bits.CF == 1);
diff --git a/CloverEFI/BiosVideo/BiosVideo.c b/CloverEFI/BiosVideo/BiosVideo.c
index 1e0a4890f..7fff73ef7 100644
--- a/CloverEFI/BiosVideo/BiosVideo.c
+++ b/CloverEFI/BiosVideo/BiosVideo.c
@@ -1245,7 +1245,7 @@ BiosVideoCheckForVbe (
if (EFI_ERROR(Status)) {
goto Done;
}
- CopyMem (
+ CopyMem(
BiosVideoPrivate->EdidDiscovered.Edid,
BiosVideoPrivate->VbeEdidDataBlock,
VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE
@@ -1260,7 +1260,7 @@ BiosVideoCheckForVbe (
if (EFI_ERROR(Status)) {
goto Done;
}
- CopyMem (
+ CopyMem(
BiosVideoPrivate->EdidActive.Edid,
BiosVideoPrivate->VbeEdidDataBlock,
VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE
@@ -1421,7 +1421,7 @@ BiosVideoCheckForVbe (
}
if (ModeNumber > 1) {
- CopyMem (
+ CopyMem(
ModeBuffer,
BiosVideoPrivate->ModeData,
(ModeNumber - 1) * sizeof (BIOS_VIDEO_MODE_DATA)
@@ -2121,7 +2121,7 @@ BiosVideoGraphicsOutputVbeBlt (
VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth);
VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth);
- CopyMem (
+ CopyMem(
VbeBuffer,
VbeBuffer1,
TotalBytes
@@ -2157,7 +2157,7 @@ BiosVideoGraphicsOutputVbeBlt (
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
for (Index = 0; Index < Width; Index++) {
- CopyMem (
+ CopyMem(
VbeBuffer,
&Pixel,
VbePixelWidth
@@ -2167,7 +2167,7 @@ BiosVideoGraphicsOutputVbeBlt (
VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth);
for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) {
- CopyMem (
+ CopyMem(
(VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth),
VbeBuffer,
TotalBytes
@@ -2201,7 +2201,7 @@ BiosVideoGraphicsOutputVbeBlt (
Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) |
((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) |
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
- CopyMem (
+ CopyMem(
VbeBuffer,
&Pixel,
VbePixelWidth
@@ -2572,7 +2572,7 @@ BiosVideoGraphicsOutputVgaBlt (
DestinationAddress = (UINT8 *) (MemAddress + (DestinationY << 6) + (DestinationY << 4) + (DestinationX >> 3));
Bytes = Width >> 3;
for (Index = 0, Offset = 0; Index < Height; Index++, Offset += BytesPerScanLine) {
- PciIo->CopyMem (
+ PciIo->CopyMem(
PciIo,
EfiPciIoWidthUint8,
EFI_PCI_IO_PASS_THROUGH_BAR,
diff --git a/CloverEFI/BiosVideo/BiosVideoNew.c b/CloverEFI/BiosVideo/BiosVideoNew.c
index 457048e73..776c60c04 100644
--- a/CloverEFI/BiosVideo/BiosVideoNew.c
+++ b/CloverEFI/BiosVideo/BiosVideoNew.c
@@ -1432,7 +1432,7 @@ BiosVideoCheckForVbe (
if (EFI_ERROR(Status)) {
goto Done;
}
- CopyMem (
+ CopyMem(
BiosVideoPrivate->EdidDiscovered.Edid,
EdidActiveDataBlock,
EdidActiveDataSize
@@ -1447,7 +1447,7 @@ BiosVideoCheckForVbe (
if (EFI_ERROR(Status)) {
goto Done;
}
- CopyMem (
+ CopyMem(
BiosVideoPrivate->EdidActive.Edid,
EdidActiveDataBlock,
EdidActiveDataSize
@@ -1715,7 +1715,7 @@ BiosVideoCheckForVbe (
}
if (ModeNumber > 1) {
- CopyMem (
+ CopyMem(
ModeBuffer,
BiosVideoPrivate->ModeData,
(ModeNumber - 1) * sizeof (BIOS_VIDEO_MODE_DATA)
@@ -2007,7 +2007,7 @@ BiosVideoGraphicsOutputQueryMode (
(*Info)->HorizontalResolution = ModeData->HorizontalResolution;
(*Info)->VerticalResolution = ModeData->VerticalResolution;
(*Info)->PixelFormat = ModeData->PixelFormat;
- CopyMem (&((*Info)->PixelInformation), &(ModeData->PixelBitMask), sizeof(ModeData->PixelBitMask));
+ CopyMem(&((*Info)->PixelInformation), &(ModeData->PixelBitMask), sizeof(ModeData->PixelBitMask));
(*Info)->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
@@ -2152,7 +2152,7 @@ BiosVideoGraphicsOutputSetMode (
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
This->Mode->Info->PixelFormat = ModeData->PixelFormat;
- CopyMem (&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask), sizeof (ModeData->PixelBitMask));
+ CopyMem(&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask), sizeof (ModeData->PixelBitMask));
This->Mode->Info->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
@@ -2356,7 +2356,7 @@ BiosVideoGraphicsOutputSetMode (
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
This->Mode->Info->PixelFormat = ModeData->PixelFormat;
- CopyMem (&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask), sizeof (ModeData->PixelBitMask));
+ CopyMem(&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask), sizeof (ModeData->PixelBitMask));
This->Mode->Info->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
@@ -2644,7 +2644,7 @@ BiosVideoGraphicsOutputVbeBlt (
VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth);
VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth);
- CopyMem (
+ CopyMem(
VbeBuffer,
VbeBuffer1,
TotalBytes
@@ -2680,7 +2680,7 @@ BiosVideoGraphicsOutputVbeBlt (
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
for (Index = 0; Index < Width; Index++) {
- /* CopyMem (
+ /* CopyMem(
VbeBuffer,
&Pixel,
VbePixelWidth
@@ -2691,7 +2691,7 @@ BiosVideoGraphicsOutputVbeBlt (
VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth);
for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) {
- CopyMem (
+ CopyMem(
(VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth),
VbeBuffer,
TotalBytes
@@ -2725,7 +2725,7 @@ BiosVideoGraphicsOutputVbeBlt (
Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) |
((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) |
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
- /* CopyMem (
+ /* CopyMem(
VbeBuffer,
&Pixel,
VbePixelWidth
@@ -3097,7 +3097,7 @@ BiosVideoGraphicsOutputVgaBlt (
DestinationAddress = (UINT8 *) (MemAddress + (DestinationY << 6) + (DestinationY << 4) + (DestinationX >> 3));
Bytes = Width >> 3;
for (Index = 0, Offset = 0; Index < Height; Index++, Offset += BytesPerScanLine) {
- PciIo->CopyMem (
+ PciIo->CopyMem(
PciIo,
EfiPciIoWidthUint8,
EFI_PCI_IO_PASS_THROUGH_BAR,
diff --git a/CloverEFI/BiosVideo/LegacyBiosThunk.c b/CloverEFI/BiosVideo/LegacyBiosThunk.c
index 40dc1e83f..3a866f88d 100644
--- a/CloverEFI/BiosVideo/LegacyBiosThunk.c
+++ b/CloverEFI/BiosVideo/LegacyBiosThunk.c
@@ -107,7 +107,7 @@ InitializeInterruptRedirection (
//
// Copy code to legacy region
//
- CopyMem ((VOID *)(UINTN)LegacyRegionBase, (VOID *)&InterruptRedirectionCode[0], sizeof (InterruptRedirectionCode));
+ CopyMem((VOID *)(UINTN)LegacyRegionBase, (VOID *)&InterruptRedirectionCode[0], sizeof (InterruptRedirectionCode));
//
// Get VectorBase, it should be 0x68
@@ -226,7 +226,7 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES;
- CopyMem (&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
+ CopyMem(&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
Ret = (BOOLEAN) (Regs->E.EFLAGS.Bits.CF == 1);
diff --git a/CloverEFI/CpuDxe/Cpu.c b/CloverEFI/CpuDxe/Cpu.c
index 1723a6a4f..d6f260c57 100644
--- a/CloverEFI/CpuDxe/Cpu.c
+++ b/CloverEFI/CpuDxe/Cpu.c
@@ -1283,7 +1283,7 @@ LegacyBiosInt86 (
ThunkRegSet.E.DS = Regs->E.DS;
ThunkRegSet.E.ES = Regs->E.ES;
- CopyMem (&(ThunkRegSet.E.EFLAGS), &(Regs->E.EFlags), sizeof (UINT32));
+ CopyMem(&(ThunkRegSet.E.EFLAGS), &(Regs->E.EFlags), sizeof (UINT32));
//
// The call to Legacy16 is a critical section to EFI
@@ -1307,7 +1307,7 @@ LegacyBiosInt86 (
Stack16 = (UINT16 *)((UINT8 *) mThunkContext.RealModeBuffer + mThunkContext.RealModeBufferSize - sizeof (UINT16));
Stack16 -= sizeof (ThunkRegSet.E.EFLAGS) / sizeof (UINT16);
- CopyMem (Stack16, &ThunkRegSet.E.EFLAGS, sizeof (ThunkRegSet.E.EFLAGS));
+ CopyMem(Stack16, &ThunkRegSet.E.EFLAGS, sizeof (ThunkRegSet.E.EFLAGS));
ThunkRegSet.E.SS = (UINT16) (((UINTN) Stack16 >> 16) << 12);
ThunkRegSet.E.ESP = (UINT16) (UINTN) Stack16;
@@ -1347,7 +1347,7 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES;
- CopyMem (&(Regs->E.EFlags), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
+ CopyMem(&(Regs->E.EFlags), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
Ret = (BOOLEAN) (Regs->E.EFlags.CF == 1);
diff --git a/CloverEFI/GraphicsConsoleDxe/GraphicsConsole.c b/CloverEFI/GraphicsConsoleDxe/GraphicsConsole.c
index c0d8c6f49..5fe98616c 100644
--- a/CloverEFI/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/CloverEFI/GraphicsConsoleDxe/GraphicsConsole.c
@@ -2087,7 +2087,7 @@ RegisterFontPackage (
SimplifiedFont->NumberOfNarrowGlyphs = (UINT16) (mNarrowFontSize / sizeof (EFI_NARROW_GLYPH));
Location = (UINT8 *) (&SimplifiedFont->NumberOfWideGlyphs + 1);
- CopyMem (Location, gUsStdNarrowGlyphData, mNarrowFontSize);
+ CopyMem(Location, gUsStdNarrowGlyphData, mNarrowFontSize);
//
// Add this simplified font package to a package list then install it.
diff --git a/CloverEFI/OsxAcpiPlatformDxe/AcpiPlatform.c b/CloverEFI/OsxAcpiPlatformDxe/AcpiPlatform.c
index 7ce9ce60a..eacb7c585 100644
--- a/CloverEFI/OsxAcpiPlatformDxe/AcpiPlatform.c
+++ b/CloverEFI/OsxAcpiPlatformDxe/AcpiPlatform.c
@@ -159,7 +159,7 @@ InstallLegacyTables (
BasePtr = (UINTN)(&(Xsdt->Entry));
for (Index = 0; Index < EntryCount; Index ++) {
- CopyMem (&Entry64, (VOID *)(BasePtr + Index * sizeof(UINT64)), sizeof(UINT64));
+ CopyMem(&Entry64, (VOID *)(BasePtr + Index * sizeof(UINT64)), sizeof(UINT64));
Table = (EFI_ACPI_DESCRIPTION_HEADER*)((UINTN)(Entry64));
TableSize = Table->Length;
if (Index == 0) {
diff --git a/CloverEFI/OsxAcpiTableDxe/AcpiSdt.c b/CloverEFI/OsxAcpiTableDxe/AcpiSdt.c
index d177cff68..96776d7e9 100644
--- a/CloverEFI/OsxAcpiTableDxe/AcpiSdt.c
+++ b/CloverEFI/OsxAcpiTableDxe/AcpiSdt.c
@@ -759,7 +759,7 @@ SetOption (
//
// Update
//
- CopyMem (OrgData, Data, DataSize);
+ CopyMem(OrgData, Data, DataSize);
AmlHandle->Modified = TRUE;
return EFI_SUCCESS;
@@ -884,7 +884,7 @@ SdtDuplicateHandle (
DstAmlHandle = AllocatePool (sizeof(*DstAmlHandle));
ASSERT (DstAmlHandle != NULL);
- CopyMem (DstAmlHandle, (VOID *)AmlHandle, sizeof(*DstAmlHandle));
+ CopyMem(DstAmlHandle, (VOID *)AmlHandle, sizeof(*DstAmlHandle));
return DstAmlHandle;
}
@@ -1100,7 +1100,7 @@ SdtAcpiTableAcpiSdtConstructor (
VOID *Registration;
InitializeListHead (&AcpiTableInstance->NotifyList);
- CopyMem (&AcpiTableInstance->AcpiSdtProtocol, &mAcpiSdtProtocolTemplate, sizeof(mAcpiSdtProtocolTemplate));
+ CopyMem(&AcpiTableInstance->AcpiSdtProtocol, &mAcpiSdtProtocolTemplate, sizeof(mAcpiSdtProtocolTemplate));
//
// Register event for ExitPmAuth, so that we can uninstall ACPI SDT protocol after ExitPmAuth.
diff --git a/CloverEFI/OsxAcpiTableDxe/AcpiTableProtocol.c b/CloverEFI/OsxAcpiTableDxe/AcpiTableProtocol.c
index 6f394c216..c1675f94e 100644
--- a/CloverEFI/OsxAcpiTableDxe/AcpiTableProtocol.c
+++ b/CloverEFI/OsxAcpiTableDxe/AcpiTableProtocol.c
@@ -251,7 +251,7 @@ PublishTables (
// the table pointers in XSDT are not aligned on 8 byte boundary.
//
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Fadt3;
- CopyMem (
+ CopyMem(
CurrentXsdtEntry,
&Buffer64,
sizeof (UINT64)
@@ -457,7 +457,7 @@ ReallocateAcpiTableBuffer (
EFI_STATUS Status;
UINT64 CurrentData;
- CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE));
+ CopyMem(&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE));
//
// Enlarge the max table number from mEfiAcpiMaxNumTables to mEfiAcpiMaxNumTables + EFI_ACPI_MAX_NUM_TABLES
//
@@ -513,20 +513,20 @@ ReallocateAcpiTableBuffer (
//
// Initialize RSDP
//
- CopyMem (AcpiTableInstance->Rsdp1, TempPrivateData.Rsdp1, sizeof (EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER));
+ CopyMem(AcpiTableInstance->Rsdp1, TempPrivateData.Rsdp1, sizeof (EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER));
AcpiTableInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt1;
- CopyMem (AcpiTableInstance->Rsdp3, TempPrivateData.Rsdp3, sizeof (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER));
+ CopyMem(AcpiTableInstance->Rsdp3, TempPrivateData.Rsdp3, sizeof (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER));
AcpiTableInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt3;
CurrentData = (UINT64) (UINTN) AcpiTableInstance->Xsdt;
- CopyMem (&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
//
// copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer
//
- CopyMem (AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
- CopyMem (AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
- CopyMem (AcpiTableInstance->Xsdt, TempPrivateData.Xsdt, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT64)));
+ CopyMem(AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
+ CopyMem(AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
+ CopyMem(AcpiTableInstance->Xsdt, TempPrivateData.Xsdt, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT64)));
//
// Calculate orignal ACPI table buffer size
@@ -669,7 +669,7 @@ AddTableToList (
// Initialize the table contents
//
CurrentTableList->Signature = EFI_ACPI_TABLE_LIST_SIGNATURE;
- CopyMem (CurrentTableList->Table, Table, CurrentTableSize);
+ CopyMem(CurrentTableList->Table, Table, CurrentTableSize);
CurrentTableList->Handle = AcpiTableInstance->CurrentHandle++;
*Handle = CurrentTableList->Handle;
CurrentTableList->Version = Version;
@@ -719,7 +719,7 @@ AddTableToList (
//
// RSDP OEM information is updated to match the FADT OEM information
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdp1->OemId,
&AcpiTableInstance->Fadt1->Header.OemId,
6
@@ -728,13 +728,13 @@ AddTableToList (
//
// RSDT OEM information is updated to match the FADT OEM information.
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdt1->OemId,
&AcpiTableInstance->Fadt1->Header.OemId,
6
);
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdt1->OemTableId,
&AcpiTableInstance->Fadt1->Header.OemTableId,
sizeof (UINT64)
@@ -754,14 +754,14 @@ AddTableToList (
//
AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Fadt3->XFirmwareCtrl,
&Buffer64,
sizeof (UINT64)
);
AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Fadt3->XDsdt,
&Buffer64,
sizeof (UINT64)
@@ -770,7 +770,7 @@ AddTableToList (
//
// RSDP OEM information is updated to match the FADT OEM information
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdp3->OemId,
&AcpiTableInstance->Fadt3->Header.OemId,
6
@@ -779,12 +779,12 @@ AddTableToList (
//
// RSDT OEM information is updated to match FADT OEM information.
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdt3->OemId,
&AcpiTableInstance->Fadt3->Header.OemId,
6
);
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdt3->OemTableId,
&AcpiTableInstance->Fadt3->Header.OemTableId,
sizeof (UINT64)
@@ -794,12 +794,12 @@ AddTableToList (
//
// XSDT OEM information is updated to match FADT OEM information.
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Xsdt->OemId,
&AcpiTableInstance->Fadt3->Header.OemId,
6
);
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Xsdt->OemTableId,
&AcpiTableInstance->Fadt3->Header.OemTableId,
sizeof (UINT64)
@@ -876,7 +876,7 @@ AddTableToList (
if (AcpiTableInstance->Fadt3 != NULL) {
AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Fadt3->XFirmwareCtrl,
&Buffer64,
sizeof (UINT64)
@@ -953,7 +953,7 @@ AddTableToList (
if (AcpiTableInstance->Fadt3 != NULL) {
AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Fadt3->XDsdt,
&Buffer64,
sizeof (UINT64)
@@ -1096,7 +1096,7 @@ AddTableToList (
// the table pointers in XSDT are not aligned on 8 byte boundary.
//
Buffer64 = (UINT64) (UINTN) CurrentTableList->Table;
- CopyMem (
+ CopyMem(
CurrentXsdtEntry,
&Buffer64,
sizeof (UINT64)
@@ -1227,7 +1227,7 @@ RemoveTableFromRsdt (
//
// Read the entry value out of the XSDT
//
- CopyMem (&CurrentTablePointer64, CurrentXsdtEntry, sizeof (UINT64));
+ CopyMem(&CurrentTablePointer64, CurrentXsdtEntry, sizeof (UINT64));
} else {
//
// Initialize to NULL
@@ -1246,10 +1246,10 @@ RemoveTableFromRsdt (
// We actually copy all + 1 to copy the initialized value of memory over
// the last entry.
//
- CopyMem (CurrentRsdtEntry, CurrentRsdtEntry + 1, (*NumberOfTableEntries - Index) * sizeof (UINT32));
+ CopyMem(CurrentRsdtEntry, CurrentRsdtEntry + 1, (*NumberOfTableEntries - Index) * sizeof (UINT32));
Rsdt->Length = Rsdt->Length - sizeof (UINT32);
if (Xsdt != NULL) {
- CopyMem (CurrentXsdtEntry, ((UINT64 *) CurrentXsdtEntry) + 1, (*NumberOfTableEntries - Index) * sizeof (UINT64));
+ CopyMem(CurrentXsdtEntry, ((UINT64 *) CurrentXsdtEntry) + 1, (*NumberOfTableEntries - Index) * sizeof (UINT64));
Xsdt->Length = Xsdt->Length - sizeof (UINT64);
}
break;
@@ -1830,20 +1830,20 @@ AcpiTableAcpiTableConstructor (
// Initialize RSDP
//
CurrentData = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE;
- CopyMem (&AcpiTableInstance->Rsdp1->Signature, &CurrentData, sizeof (UINT64));
- CopyMem (AcpiTableInstance->Rsdp1->OemId, EFI_ACPI_OEM_ID, 6);
+ CopyMem(&AcpiTableInstance->Rsdp1->Signature, &CurrentData, sizeof (UINT64));
+ CopyMem(AcpiTableInstance->Rsdp1->OemId, EFI_ACPI_OEM_ID, 6);
AcpiTableInstance->Rsdp1->Reserved = EFI_ACPI_RESERVED_BYTE;
AcpiTableInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt1;
CurrentData = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE;
- CopyMem (&AcpiTableInstance->Rsdp3->Signature, &CurrentData, sizeof (UINT64));
- CopyMem (AcpiTableInstance->Rsdp3->OemId, EFI_ACPI_OEM_ID, 6);
+ CopyMem(&AcpiTableInstance->Rsdp3->Signature, &CurrentData, sizeof (UINT64));
+ CopyMem(AcpiTableInstance->Rsdp3->OemId, EFI_ACPI_OEM_ID, 6);
AcpiTableInstance->Rsdp3->Revision = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION;
AcpiTableInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt3;
AcpiTableInstance->Rsdp3->Length = sizeof (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER);
CurrentData = (UINT64) (UINTN) AcpiTableInstance->Xsdt;
- CopyMem (&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
- SetMem (AcpiTableInstance->Rsdp3->Reserved, 3, EFI_ACPI_RESERVED_BYTE);
+ CopyMem(&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
+ SetMem(AcpiTableInstance->Rsdp3->Reserved, 3, EFI_ACPI_RESERVED_BYTE);
//
// Initialize Rsdt
@@ -1855,9 +1855,9 @@ AcpiTableAcpiTableConstructor (
AcpiTableInstance->Rsdt1->Signature = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt1->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Rsdt1->Revision = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION;
- CopyMem (AcpiTableInstance->Rsdt1->OemId, EFI_ACPI_OEM_ID, 6);
+ CopyMem(AcpiTableInstance->Rsdt1->OemId, EFI_ACPI_OEM_ID, 6);
CurrentData = EFI_ACPI_OEM_TABLE_ID;
- CopyMem (&AcpiTableInstance->Rsdt1->OemTableId, &CurrentData, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Rsdt1->OemTableId, &CurrentData, sizeof (UINT64));
AcpiTableInstance->Rsdt1->OemRevision = EFI_ACPI_OEM_REVISION;
AcpiTableInstance->Rsdt1->CreatorId = EFI_ACPI_CREATOR_ID;
AcpiTableInstance->Rsdt1->CreatorRevision = EFI_ACPI_CREATOR_REVISION;
@@ -1870,9 +1870,9 @@ AcpiTableAcpiTableConstructor (
AcpiTableInstance->Rsdt3->Signature = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt3->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Rsdt3->Revision = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION;
- CopyMem (AcpiTableInstance->Rsdt3->OemId, EFI_ACPI_OEM_ID, 6);
+ CopyMem(AcpiTableInstance->Rsdt3->OemId, EFI_ACPI_OEM_ID, 6);
CurrentData = EFI_ACPI_OEM_TABLE_ID;
- CopyMem (&AcpiTableInstance->Rsdt3->OemTableId, &CurrentData, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Rsdt3->OemTableId, &CurrentData, sizeof (UINT64));
AcpiTableInstance->Rsdt3->OemRevision = EFI_ACPI_OEM_REVISION;
AcpiTableInstance->Rsdt3->CreatorId = EFI_ACPI_CREATOR_ID;
AcpiTableInstance->Rsdt3->CreatorRevision = EFI_ACPI_CREATOR_REVISION;
@@ -1888,9 +1888,9 @@ AcpiTableAcpiTableConstructor (
AcpiTableInstance->Xsdt->Signature = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Xsdt->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Xsdt->Revision = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION;
- CopyMem (AcpiTableInstance->Xsdt->OemId, EFI_ACPI_OEM_ID, 6);
+ CopyMem(AcpiTableInstance->Xsdt->OemId, EFI_ACPI_OEM_ID, 6);
CurrentData = EFI_ACPI_OEM_TABLE_ID;
- CopyMem (&AcpiTableInstance->Xsdt->OemTableId, &CurrentData, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Xsdt->OemTableId, &CurrentData, sizeof (UINT64));
AcpiTableInstance->Xsdt->OemRevision = EFI_ACPI_OEM_REVISION;
AcpiTableInstance->Xsdt->CreatorId = EFI_ACPI_CREATOR_ID;
AcpiTableInstance->Xsdt->CreatorRevision = EFI_ACPI_CREATOR_REVISION;
diff --git a/CloverEFI/OsxAcpiTableDxe/AmlNamespace.c b/CloverEFI/OsxAcpiTableDxe/AmlNamespace.c
index 5fa88d4ca..671e3f676 100644
--- a/CloverEFI/OsxAcpiTableDxe/AmlNamespace.c
+++ b/CloverEFI/OsxAcpiTableDxe/AmlNamespace.c
@@ -53,7 +53,7 @@ AmlCreateNode (
// ASSERT (AmlNodeList != NULL);
AmlNodeList->Signature = EFI_AML_NODE_LIST_SIGNATURE;
- CopyMem (AmlNodeList->Name, NameSeg, AML_NAME_SEG_SIZE);
+ CopyMem(AmlNodeList->Name, NameSeg, AML_NAME_SEG_SIZE);
AmlNodeList->Buffer = NULL;
AmlNodeList->Size = 0;
InitializeListHead (&AmlNodeList->Link);
diff --git a/CloverEFI/OsxAcpiTableDxe/AmlString.c b/CloverEFI/OsxAcpiTableDxe/AmlString.c
index cc35e05c2..83a5710ca 100644
--- a/CloverEFI/OsxAcpiTableDxe/AmlString.c
+++ b/CloverEFI/OsxAcpiTableDxe/AmlString.c
@@ -355,7 +355,7 @@ AmlGetAslNameStringSize (
@param[in] Length Buffer length.
**/
VOID
-AmlUpperCaseCopyMem (
+AmlUpperCaseCopyMem(
IN UINT8 *DstBuffer,
IN UINT8 *SrcBuffer,
IN UINTN Length
@@ -413,7 +413,7 @@ AmlNameFromAslName (
AmlBuffer ++;
Buffer ++;
} else if (Parent > 0) {
- SetMem (AmlBuffer, Parent, AML_PARENT_PREFIX_CHAR);
+ SetMem(AmlBuffer, Parent, AML_PARENT_PREFIX_CHAR);
AmlBuffer += Parent;
Buffer += Parent;
}
@@ -437,8 +437,8 @@ AmlNameFromAslName (
while (*Buffer != 0) {
NameLength = AmlGetAslNameSegLength (Buffer);
ASSERT ((NameLength != 0) && (NameLength <= AML_NAME_SEG_SIZE));
- AmlUpperCaseCopyMem (AmlBuffer, Buffer, NameLength);
- SetMem (AmlBuffer + NameLength, AML_NAME_SEG_SIZE - NameLength, AML_NAME_CHAR__);
+ AmlUpperCaseCopyMem(AmlBuffer, Buffer, NameLength);
+ SetMem(AmlBuffer + NameLength, AML_NAME_SEG_SIZE - NameLength, AML_NAME_CHAR__);
Buffer += NameLength;
AmlBuffer += AML_NAME_SEG_SIZE;
if (*Buffer == 0) {
diff --git a/CloverEFI/OsxBdsDxe/BdsEntry.c b/CloverEFI/OsxBdsDxe/BdsEntry.c
index 72af9fabf..4f21893ab 100644
--- a/CloverEFI/OsxBdsDxe/BdsEntry.c
+++ b/CloverEFI/OsxBdsDxe/BdsEntry.c
@@ -737,8 +737,8 @@ BdsDxeSetVariableAndReportStatusCodeOnError (
SetVariableStatus->DataSize = DataSize;
SetVariableStatus->SetStatus = Status;
SetVariableStatus->Attributes = Attributes;
- CopyMem (SetVariableStatus + 1, VariableName, NameSize);
- CopyMem (((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
+ CopyMem(SetVariableStatus + 1, VariableName, NameSize);
+ CopyMem(((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
REPORT_STATUS_CODE_EX (
EFI_ERROR_CODE,
diff --git a/CloverEFI/OsxBdsDxe/BootMaint/BBSsupport.c b/CloverEFI/OsxBdsDxe/BootMaint/BBSsupport.c
index eaabc18cb..c3f4e7c86 100644
--- a/CloverEFI/OsxBdsDxe/BootMaint/BBSsupport.c
+++ b/CloverEFI/OsxBdsDxe/BootMaint/BBSsupport.c
@@ -141,7 +141,7 @@ OrderLegacyBootOption4SameType (
//
// Overwrite the old BootOption
//
- CopyMem (&BootOrder[StartPosition], NewBootOption, (*DisBootOptionCount + *EnBootOptionCount) * sizeof (UINT16));
+ CopyMem(&BootOrder[StartPosition], NewBootOption, (*DisBootOptionCount + *EnBootOptionCount) * sizeof (UINT16));
Status = gRT->SetVariable (
L"BootOrder",
&gEfiGlobalVariableGuid,
@@ -192,7 +192,7 @@ GroupMultipleLegacyBootOption4SameType (
BDS_COMMON_OPTION *BootOption;
LIST_ENTRY List;
- SetMem (DeviceTypeIndex, sizeof (DeviceTypeIndex), 0xff);
+ SetMem(DeviceTypeIndex, sizeof (DeviceTypeIndex), 0xff);
BootOrder = BdsLibGetVariableAndSize (
L"BootOrder",
@@ -224,7 +224,7 @@ GroupMultipleLegacyBootOption4SameType (
// insert the current boot option before *NextIndex, causing [*Next .. Index] shift right one position
//
OptionNumber = BootOrder[Index];
- CopyMem (&BootOrder[*NextIndex + 1], &BootOrder[*NextIndex], (Index - *NextIndex) * sizeof (UINT16));
+ CopyMem(&BootOrder[*NextIndex + 1], &BootOrder[*NextIndex], (Index - *NextIndex) * sizeof (UINT16));
BootOrder[*NextIndex] = OptionNumber;
//
diff --git a/CloverEFI/OsxBdsDxe/BootMaint/BmLib.c b/CloverEFI/OsxBdsDxe/BootMaint/BmLib.c
index badfad785..575425823 100644
--- a/CloverEFI/OsxBdsDxe/BootMaint/BmLib.c
+++ b/CloverEFI/OsxBdsDxe/BootMaint/BmLib.c
@@ -281,7 +281,7 @@ EfiStrDuplicate (
Dest = AllocatePool (Size); //don't need to zero because of CopyMem. SpeedUp
// ASSERT (Dest != NULL);
if (Dest != NULL) {
- CopyMem (Dest, Src, Size);
+ CopyMem(Dest, Src, Size);
}
return Dest;
@@ -420,7 +420,7 @@ EfiReallocatePool (
if (OldPool != NULL) {
if (NewPool != NULL) {
- CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
+ CopyMem(NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
}
FreePool(OldPool);
diff --git a/CloverEFI/OsxBdsDxe/BootMaint/BootMaint.c b/CloverEFI/OsxBdsDxe/BootMaint/BootMaint.c
index f80d6298d..7dc596911 100644
--- a/CloverEFI/OsxBdsDxe/BootMaint/BootMaint.c
+++ b/CloverEFI/OsxBdsDxe/BootMaint/BootMaint.c
@@ -172,7 +172,7 @@ InitializeBmmConfig (
//
// Backup Initialize BMM configuartion data to BmmOldFakeNVData
//
- CopyMem (&CallbackData->BmmOldFakeNVData, &CallbackData->BmmFakeNvData, sizeof (BMM_FAKE_NV_DATA));
+ CopyMem(&CallbackData->BmmOldFakeNVData, &CallbackData->BmmFakeNvData, sizeof (BMM_FAKE_NV_DATA));
}
/**
@@ -608,7 +608,7 @@ BootMaintRouteConfig (
//
// After user do the save action, need to update OldBmmData.
//
- CopyMem (OldBmmData, NewBmmData, sizeof (BMM_FAKE_NV_DATA));
+ CopyMem(OldBmmData, NewBmmData, sizeof (BMM_FAKE_NV_DATA));
return EFI_SUCCESS;
}
@@ -1030,7 +1030,7 @@ BootMaintCallback (
Index++;
}
- CopyMem (
+ CopyMem(
OldLegacyDev,
NewLegacyDev,
Number
@@ -1090,11 +1090,11 @@ DiscardChangeHandler (
switch (Private->BmmPreviousPageId) {
case FORM_BOOT_CHG_ID:
- CopyMem (CurrentFakeNVMap->BootOptionOrder, Private->BmmOldFakeNVData.BootOptionOrder, sizeof (CurrentFakeNVMap->BootOptionOrder));
+ CopyMem(CurrentFakeNVMap->BootOptionOrder, Private->BmmOldFakeNVData.BootOptionOrder, sizeof (CurrentFakeNVMap->BootOptionOrder));
break;
case FORM_DRV_CHG_ID:
- CopyMem (CurrentFakeNVMap->DriverOptionOrder, Private->BmmOldFakeNVData.DriverOptionOrder, sizeof (CurrentFakeNVMap->DriverOptionOrder));
+ CopyMem(CurrentFakeNVMap->DriverOptionOrder, Private->BmmOldFakeNVData.DriverOptionOrder, sizeof (CurrentFakeNVMap->DriverOptionOrder));
break;
case FORM_BOOT_DEL_ID:
@@ -1196,7 +1196,7 @@ InitializeBM (
//
Data = (UINT8 *)(PackageListHeader + 1);
Length = ReadUnaligned32 ((UINT32 *) BdsDxeStrings) - sizeof (UINT32);
- CopyMem (Data, (UINT8 *) BdsDxeStrings + sizeof (UINT32), Length);
+ CopyMem(Data, (UINT8 *) BdsDxeStrings + sizeof (UINT32), Length);
//
// Add End type HII package.
diff --git a/CloverEFI/OsxBdsDxe/BootMaint/BootOption.c b/CloverEFI/OsxBdsDxe/BootMaint/BootOption.c
index e29627837..672a274db 100644
--- a/CloverEFI/OsxBdsDxe/BootMaint/BootOption.c
+++ b/CloverEFI/OsxBdsDxe/BootMaint/BootOption.c
@@ -941,7 +941,7 @@ BOpt_GetBootOptions (
continue;
}
- CopyMem (LoadOption, LoadOptionFromVar, BootOptionSize);
+ CopyMem(LoadOption, LoadOptionFromVar, BootOptionSize);
FreePool(LoadOptionFromVar);
if (BootNext != NULL) {
@@ -1033,7 +1033,7 @@ BOpt_GetBootOptions (
NewLoadContext->FilePathList = AllocateZeroPool(NewLoadContext->FilePathListLength);
ASSERT (NewLoadContext->FilePathList != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->FilePathList,
(EFI_DEVICE_PATH_PROTOCOL *) LoadOptionPtr,
NewLoadContext->FilePathListLength
@@ -1059,7 +1059,7 @@ BOpt_GetBootOptions (
NewLoadContext->OptionalData = AllocateZeroPool(OptionalDataSize);
ASSERT (NewLoadContext->OptionalData != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->OptionalData,
LoadOptionPtr,
OptionalDataSize
@@ -1536,7 +1536,7 @@ BOpt_GetDriverOptions (
continue;
}
- CopyMem (LoadOption, LoadOptionFromVar, DriverOptionSize);
+ CopyMem(LoadOption, LoadOptionFromVar, DriverOptionSize);
FreePool(LoadOptionFromVar);
NewMenuEntry = BOpt_CreateMenuEntry (BM_LOAD_CONTEXT_SELECT);
@@ -1573,7 +1573,7 @@ BOpt_GetDriverOptions (
StringSize = StrSize ((UINT16 *) LoadOptionPtr);
NewLoadContext->Description = AllocateZeroPool(StringSize);
ASSERT (NewLoadContext->Description != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->Description,
(UINT16 *) LoadOptionPtr,
StringSize
@@ -1584,7 +1584,7 @@ BOpt_GetDriverOptions (
NewLoadContext->FilePathList = AllocateZeroPool(NewLoadContext->FilePathListLength);
ASSERT (NewLoadContext->FilePathList != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->FilePathList,
(EFI_DEVICE_PATH_PROTOCOL *) LoadOptionPtr,
NewLoadContext->FilePathListLength
@@ -1610,7 +1610,7 @@ BOpt_GetDriverOptions (
NewLoadContext->OptionalData = AllocateZeroPool(OptionalDataSize);
ASSERT (NewLoadContext->OptionalData != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->OptionalData,
LoadOptionPtr,
OptionalDataSize
@@ -1793,7 +1793,7 @@ GetLegacyDeviceOrder (
LegacyOrder[OptionIndex] = (UINT8) (VarDevOrder & 0xFF);
}
}
- CopyMem (OldData, LegacyOrder, 100);
+ CopyMem(OldData, LegacyOrder, 100);
}
}
}
diff --git a/CloverEFI/OsxBdsDxe/BootMaint/ConsoleOption.c b/CloverEFI/OsxBdsDxe/BootMaint/ConsoleOption.c
index ca8ebcfdc..5a50f7058 100644
--- a/CloverEFI/OsxBdsDxe/BootMaint/ConsoleOption.c
+++ b/CloverEFI/OsxBdsDxe/BootMaint/ConsoleOption.c
@@ -118,7 +118,7 @@ ChangeTerminalDevicePath (
while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) {
- CopyMem (&Com, &Acpi->UID, sizeof (UINT32));
+ CopyMem(&Com, &Acpi->UID, sizeof (UINT32));
}
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Com);
@@ -126,25 +126,25 @@ ChangeTerminalDevicePath (
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
Uart = (UART_DEVICE_PATH *) Node;
- CopyMem (
+ CopyMem(
&Uart->BaudRate,
&NewTerminalContext->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&Uart->DataBits,
&NewTerminalContext->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart->Parity,
&NewTerminalContext->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart->StopBits,
&NewTerminalContext->StopBits,
sizeof (UINT8)
@@ -175,25 +175,25 @@ ChangeTerminalDevicePath (
while (!IsDevicePathEnd (Node1)) {
if ((DevicePathType (Node1) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node1) == MSG_UART_DP)) {
Uart1 = (UART_DEVICE_PATH *) Node1;
- CopyMem (
+ CopyMem(
&Uart1->BaudRate,
&NewTerminalContext->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&Uart1->DataBits,
&NewTerminalContext->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart1->Parity,
&NewTerminalContext->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart1->StopBits,
&NewTerminalContext->StopBits,
sizeof (UINT8)
@@ -245,7 +245,7 @@ ChangeVariableDevicePath (
while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) {
- CopyMem (&Com, &Acpi->UID, sizeof (UINT32));
+ CopyMem(&Com, &Acpi->UID, sizeof (UINT32));
}
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
@@ -259,25 +259,25 @@ ChangeVariableDevicePath (
// ASSERT (NewMenuEntry != NULL);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
Uart = (UART_DEVICE_PATH *) Node;
- CopyMem (
+ CopyMem(
&Uart->BaudRate,
&NewTerminalContext->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&Uart->DataBits,
&NewTerminalContext->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart->Parity,
&NewTerminalContext->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart->StopBits,
&NewTerminalContext->StopBits,
sizeof (UINT8)
@@ -330,7 +330,7 @@ RetrieveUartUid (
if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) {
if (AcpiUid != NULL) {
- CopyMem (AcpiUid, &Acpi->UID, sizeof (UINT32));
+ CopyMem(AcpiUid, &Acpi->UID, sizeof (UINT32));
}
return TRUE;
} else {
@@ -484,7 +484,7 @@ LocateSerialIo (
}
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
- CopyMem (&NewMenuEntry->OptionNumber, &Acpi->UID, sizeof (UINT32));
+ CopyMem(&NewMenuEntry->OptionNumber, &Acpi->UID, sizeof (UINT32));
NewTerminalContext->DevicePath = DuplicateDevicePath (DevicePath);
//
// BugBug: I have no choice, calling EfiLibStrFromDatahub will hang the system!
@@ -505,25 +505,25 @@ LocateSerialIo (
(VOID **) &SerialIo
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->BaudRate,
&SerialIo->Mode->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->DataBits,
&SerialIo->Mode->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->Parity,
&SerialIo->Mode->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->StopBits,
&SerialIo->Mode->StopBits,
sizeof (UINT8)
@@ -578,7 +578,7 @@ LocateSerialIo (
Vendor.Header.SubType = MSG_VENDOR_DP;
for (Index2 = 0; Index2 < 4; Index2++) {
- CopyMem (&Vendor.Guid, &TerminalTypeGuid[Index2], sizeof (EFI_GUID));
+ CopyMem(&Vendor.Guid, &TerminalTypeGuid[Index2], sizeof (EFI_GUID));
SetDevicePathNodeLength (&Vendor.Header, sizeof (VENDOR_DEVICE_PATH));
NewDevicePath = AppendDevicePathNode (
NewTerminalContext->DevicePath,
@@ -646,7 +646,7 @@ UpdateComAttributeFromVariable (
while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) {
- CopyMem (&TerminalNumber, &Acpi->UID, sizeof (UINT32));
+ CopyMem(&TerminalNumber, &Acpi->UID, sizeof (UINT32));
}
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
@@ -657,25 +657,25 @@ UpdateComAttributeFromVariable (
}
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
- CopyMem (
+ CopyMem(
&NewTerminalContext->BaudRate,
&Uart->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->DataBits,
&Uart->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->Parity,
&Uart->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->StopBits,
&Uart->StopBits,
sizeof (UINT8)
@@ -701,23 +701,23 @@ UpdateComAttributeFromVariable (
// previous acquired uart attributes
//
Uart1 = (UART_DEVICE_PATH *) SerialNode;
- CopyMem (
+ CopyMem(
&Uart1->BaudRate,
&NewTerminalContext->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&Uart1->DataBits,
&NewTerminalContext->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart1->Parity,
&NewTerminalContext->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart1->StopBits,
&NewTerminalContext->StopBits,
sizeof (UINT8)
@@ -1014,7 +1014,7 @@ IsTerminalDevicePath (
}
if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) {
- CopyMem (Com, &Acpi->UID, sizeof (UINT32));
+ CopyMem(Com, &Acpi->UID, sizeof (UINT32));
} else {
return FALSE;
}
diff --git a/CloverEFI/OsxBdsDxe/BootMaint/UpdatePage.c b/CloverEFI/OsxBdsDxe/BootMaint/UpdatePage.c
index 5e045d505..d3ed36047 100644
--- a/CloverEFI/OsxBdsDxe/BootMaint/UpdatePage.c
+++ b/CloverEFI/OsxBdsDxe/BootMaint/UpdatePage.c
@@ -1438,7 +1438,7 @@ UpdateSetLegacyDeviceOrderPage (
}
}
- CopyMem (OldData, LegacyOrder, 100);
+ CopyMem(OldData, LegacyOrder, 100);
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
diff --git a/CloverEFI/OsxBdsDxe/BootMaint/Variable.c b/CloverEFI/OsxBdsDxe/BootMaint/Variable.c
index 06b549210..717593649 100644
--- a/CloverEFI/OsxBdsDxe/BootMaint/Variable.c
+++ b/CloverEFI/OsxBdsDxe/BootMaint/Variable.c
@@ -439,7 +439,7 @@ Var_UpdateConsoleOption (
Vendor.Header.SubType = MSG_VENDOR_DP;
ASSERT (NewTerminalContext->TerminalType < (sizeof (TerminalTypeGuid) / sizeof (TerminalTypeGuid[0])));
- CopyMem (
+ CopyMem(
&Vendor.Guid,
&TerminalTypeGuid[NewTerminalContext->TerminalType],
sizeof (EFI_GUID)
@@ -609,7 +609,7 @@ Var_UpdateDriverOption (
NewLoadContext->FilePathListLength = *((UINT16 *) Ptr);
Ptr += sizeof (UINT16);
- CopyMem (
+ CopyMem(
Ptr,
DescriptionData,
StrSize (DescriptionData)
@@ -618,14 +618,14 @@ Var_UpdateDriverOption (
NewLoadContext->Description = AllocateZeroPool(StrSize (DescriptionData));
ASSERT (NewLoadContext->Description != NULL);
NewMenuEntry->DisplayString = NewLoadContext->Description;
- CopyMem (
+ CopyMem(
NewLoadContext->Description,
(VOID *) Ptr,
StrSize (DescriptionData)
);
Ptr += StrSize (DescriptionData);
- CopyMem (
+ CopyMem(
Ptr,
CallbackData->LoadContext->FilePathList,
GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@@ -634,7 +634,7 @@ Var_UpdateDriverOption (
NewLoadContext->FilePathList = AllocateZeroPool(GetDevicePathSize (CallbackData->LoadContext->FilePathList));
ASSERT (NewLoadContext->FilePathList != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->FilePathList,
(VOID *) Ptr,
GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@@ -657,7 +657,7 @@ Var_UpdateDriverOption (
if (OptionalDataExist) {
Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList);
- CopyMem (
+ CopyMem(
Ptr,
OptionalData,
StrSize (OptionalData)
@@ -680,7 +680,7 @@ Var_UpdateDriverOption (
NewDriverOrderList = AllocateZeroPool(DriverOrderListSize + sizeof (UINT16));
ASSERT (NewDriverOrderList != NULL);
if (DriverOrderList != NULL) {
- CopyMem (NewDriverOrderList, DriverOrderList, DriverOrderListSize);
+ CopyMem(NewDriverOrderList, DriverOrderList, DriverOrderListSize);
EfiLibDeleteVariable (L"DriverOrder", &gEfiGlobalVariableGuid);
}
NewDriverOrderList[DriverOrderListSize / sizeof (UINT16)] = Index;
@@ -793,7 +793,7 @@ Var_UpdateBootOption (
NewLoadContext->FilePathListLength = *((UINT16 *) Ptr);
Ptr += sizeof (UINT16);
- CopyMem (
+ CopyMem(
Ptr,
NvRamMap->BootDescriptionData,
StrSize (NvRamMap->BootDescriptionData)
@@ -803,14 +803,14 @@ Var_UpdateBootOption (
ASSERT (NewLoadContext->Description != NULL);
NewMenuEntry->DisplayString = NewLoadContext->Description;
- CopyMem (
+ CopyMem(
NewLoadContext->Description,
(VOID *) Ptr,
StrSize (NvRamMap->BootDescriptionData)
);
Ptr += StrSize (NvRamMap->BootDescriptionData);
- CopyMem (
+ CopyMem(
Ptr,
CallbackData->LoadContext->FilePathList,
GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@@ -819,7 +819,7 @@ Var_UpdateBootOption (
NewLoadContext->FilePathList = AllocateZeroPool(GetDevicePathSize (CallbackData->LoadContext->FilePathList));
ASSERT (NewLoadContext->FilePathList != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->FilePathList,
(VOID *) Ptr,
GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@@ -842,7 +842,7 @@ Var_UpdateBootOption (
if (OptionalDataExist) {
Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList);
- CopyMem (Ptr, NvRamMap->BootOptionalData, StrSize (NvRamMap->BootOptionalData));
+ CopyMem(Ptr, NvRamMap->BootOptionalData, StrSize (NvRamMap->BootOptionalData));
}
Status = gRT->SetVariable (
@@ -864,7 +864,7 @@ if (BootOrderList != NULL) {
NewBootOrderList = AllocateZeroPool(BootOrderListSize + sizeof (UINT16));
// ASSERT (NewBootOrderList != NULL);
if (NewBootOrderList != NULL) {
- CopyMem (NewBootOrderList, BootOrderList, BootOrderListSize);
+ CopyMem(NewBootOrderList, BootOrderList, BootOrderListSize);
NewBootOrderList[BootOrderListSize / sizeof (UINT16)] = Index;
}
@@ -1005,7 +1005,7 @@ Var_UpdateBootOrder (
for (Index = OrderIndex; Index < BootOrderListSize / sizeof (UINT16); Index++) {
if ((BootOrderList[Index] == (UINT16) (CallbackData->BmmFakeNvData.BootOptionOrder[OrderIndex] - 1)) && (OrderIndex != Index)) {
OptionNumber = BootOrderList[Index];
- CopyMem (&BootOrderList[OrderIndex + 1], &BootOrderList[OrderIndex], (Index - OrderIndex) * sizeof (UINT16));
+ CopyMem(&BootOrderList[OrderIndex + 1], &BootOrderList[OrderIndex], (Index - OrderIndex) * sizeof (UINT16));
BootOrderList[OrderIndex] = OptionNumber;
}
}
@@ -1238,7 +1238,7 @@ Var_UpdateBBSOption (
}
}
- CopyMem (
+ CopyMem(
DevOrder->Data,
NewOrder,
DevOrder->Length - sizeof (DevOrder->Length)
diff --git a/CloverEFI/OsxBdsDxe/DeviceMngr/DeviceManager.c b/CloverEFI/OsxBdsDxe/DeviceMngr/DeviceManager.c
index ca293267b..dffed26b8 100644
--- a/CloverEFI/OsxBdsDxe/DeviceMngr/DeviceManager.c
+++ b/CloverEFI/OsxBdsDxe/DeviceMngr/DeviceManager.c
@@ -291,7 +291,7 @@ ExtractDisplayedHiiFormFromHiiHandle (
while (Offset < PackageListLength) {
Package = ((UINT8 *) HiiPackageList) + Offset;
- CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
if (PackageHeader.Type == EFI_HII_PACKAGE_FORMS) {
//
@@ -316,8 +316,8 @@ ExtractDisplayedHiiFormFromHiiHandle (
ClassGuid = (EFI_GUID *) (VOID *)(OpCodeData + sizeof (EFI_IFR_FORM_SET));
while (ClassGuidNum-- > 0) {
if (CompareGuid (SetupClassGuid, ClassGuid)) {
- CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
- CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
+ CopyMem(FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
+ CopyMem(FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
*FormSetGuid = AllocateCopyPool(sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
ASSERT (*FormSetGuid != NULL);
FreePool(HiiPackageList);
@@ -326,8 +326,8 @@ ExtractDisplayedHiiFormFromHiiHandle (
ClassGuid ++;
}
} else {
- CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
- CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
+ CopyMem(FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
+ CopyMem(FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
*FormSetGuid = AllocateCopyPool(sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
ASSERT (*FormSetGuid != NULL);
FreePool(HiiPackageList);
@@ -773,14 +773,14 @@ AdjustArrayData (
NewHiiHandles = AllocateZeroPool((ArrayCount + 2) * sizeof (EFI_HII_HANDLE));
ASSERT (NewHiiHandles != NULL);
- CopyMem (NewHiiHandles, *HiiHandles, Offset * sizeof (EFI_HII_HANDLE));
+ CopyMem(NewHiiHandles, *HiiHandles, Offset * sizeof (EFI_HII_HANDLE));
NewHiiHandles[Offset] = NewHiiHandles[Offset - 1];
- CopyMem (NewHiiHandles + Offset + 1, *HiiHandles + Offset, (ArrayCount - Offset) * sizeof (EFI_HII_HANDLE));
+ CopyMem(NewHiiHandles + Offset + 1, *HiiHandles + Offset, (ArrayCount - Offset) * sizeof (EFI_HII_HANDLE));
NewGuidLists = AllocateZeroPool((ArrayCount + 2) * sizeof (EFI_GUID *));
ASSERT (NewGuidLists != NULL);
- CopyMem (NewGuidLists, *GuidLists, Offset * sizeof (EFI_GUID *));
+ CopyMem(NewGuidLists, *GuidLists, Offset * sizeof (EFI_GUID *));
NewGuidLists[Offset] = FormSetGuid;
FreePool(*HiiHandles);
diff --git a/CloverEFI/OsxBdsDxe/FrontPage.c b/CloverEFI/OsxBdsDxe/FrontPage.c
index 1c29f49b0..2ff5fce09 100644
--- a/CloverEFI/OsxBdsDxe/FrontPage.c
+++ b/CloverEFI/OsxBdsDxe/FrontPage.c
@@ -918,9 +918,9 @@ ShowProgress (
// DEBUG ((EFI_D_INFO, "\n\nStart showing progress bar... Press any key to stop it! ...Zzz....\n"));
- SetMem (&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
- SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
- SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
+ SetMem(&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
+ SetMem(&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
+ SetMem(&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
TmpStr = GetStringById (STRING_TOKEN (STR_START_BOOT_OPTION));
diff --git a/CloverEFI/OsxBdsDxe/Hotkey.c b/CloverEFI/OsxBdsDxe/Hotkey.c
index 63c8c27fb..813a55fcd 100644
--- a/CloverEFI/OsxBdsDxe/Hotkey.c
+++ b/CloverEFI/OsxBdsDxe/Hotkey.c
@@ -206,7 +206,7 @@ RegisterHotkey (
}
if (KeyOrder != NULL) {
- CopyMem (NewKeyOrder, KeyOrder, KeyOrderSize);
+ CopyMem(NewKeyOrder, KeyOrder, KeyOrderSize);
}
NewKeyOrder[Index] = RegisterOptionNumber;
@@ -765,7 +765,7 @@ HotkeyGetOptionNumbers (
break;
}
}
- CopyMem (&OptionNumbers[Index + 1], &OptionNumbers[Index], (*Count - Index) * sizeof (UINT16));
+ CopyMem(&OptionNumbers[Index + 1], &OptionNumbers[Index], (*Count - Index) * sizeof (UINT16));
OptionNumbers[Index] = OptionNumber;
(*Count)++;
}
diff --git a/CloverEFI/OsxBdsDxe/Language.c b/CloverEFI/OsxBdsDxe/Language.c
index f0d107b19..acacd37b5 100644
--- a/CloverEFI/OsxBdsDxe/Language.c
+++ b/CloverEFI/OsxBdsDxe/Language.c
@@ -302,7 +302,7 @@ GetNextLanguage (
Index++;
}
- CopyMem (Lang, StringPtr, Index);
+ CopyMem(Lang, StringPtr, Index);
Lang[Index] = 0;
if (StringPtr[Index] == ';') {
diff --git a/CloverEFI/OsxBdsDxe/MemoryTest.c b/CloverEFI/OsxBdsDxe/MemoryTest.c
index 7abf31cc6..1dc59c2fd 100644
--- a/CloverEFI/OsxBdsDxe/MemoryTest.c
+++ b/CloverEFI/OsxBdsDxe/MemoryTest.c
@@ -113,7 +113,7 @@ PlatformBdsShowProgress (
//
// Clear progress area
//
- SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
+ SetMem(&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
if (GraphicsOutput != NULL) {
/*Status = */GraphicsOutput->Blt (
@@ -250,9 +250,9 @@ BdsMemoryTest (
ErrorOut = FALSE;
TestAbort = FALSE;
- SetMem (&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
- SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
- SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
+ SetMem(&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
+ SetMem(&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
+ SetMem(&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
RequireSoftECCInit = FALSE;
diff --git a/CloverEFI/OsxDxeCore/Dispatcher/Dependency.c b/CloverEFI/OsxDxeCore/Dispatcher/Dependency.c
index 6aecf7fd7..ef714314a 100644
--- a/CloverEFI/OsxDxeCore/Dispatcher/Dependency.c
+++ b/CloverEFI/OsxDxeCore/Dispatcher/Dependency.c
@@ -59,7 +59,7 @@ GrowDepexStack (
//
// Copy to Old Stack to the New Stack
//
- CopyMem (
+ CopyMem(
NewStack,
mDepexEvaluationStack,
(mDepexEvaluationStackEnd - mDepexEvaluationStack) * sizeof (BOOLEAN)
@@ -187,7 +187,7 @@ CorePreProcessDepex (
}
if (DriverEntry->Before || DriverEntry->After) {
- CopyMem (&DriverEntry->BeforeAfterGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverEntry->BeforeAfterGuid, Iterator + 1, sizeof (EFI_GUID));
}
return EFI_SUCCESS;
@@ -301,7 +301,7 @@ CoreIsSchedulable (
// Push operator is followed by a GUID. Test to see if the GUID protocol
// is installed and push the boolean result on the stack.
//
- CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
Status = CoreLocateProtocol (&DriverGuid, NULL, &Interface);
@@ -407,7 +407,7 @@ CoreIsSchedulable (
return Operator;
case EFI_DEP_REPLACE_TRUE:
- CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
DEBUG ((DEBUG_DISPATCH, " PUSH GUID(%g) = TRUE\n", &DriverGuid));
Status = PushBool (TRUE);
diff --git a/CloverEFI/OsxDxeCore/Dispatcher/Dispatcher.c b/CloverEFI/OsxDxeCore/Dispatcher/Dispatcher.c
index 964257254..bed7917f0 100644
--- a/CloverEFI/OsxDxeCore/Dispatcher/Dispatcher.c
+++ b/CloverEFI/OsxDxeCore/Dispatcher/Dispatcher.c
@@ -1061,7 +1061,7 @@ CoreProcessFvImageFile (
//
// Move FvImage into the aligned buffer and release the original buffer.
//
- CopyMem (AlignedBuffer, Buffer, BufferSize);
+ CopyMem(AlignedBuffer, Buffer, BufferSize);
FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) AlignedBuffer;
CoreFreePool(Buffer);
Buffer = NULL;
diff --git a/CloverEFI/OsxDxeCore/DxeMain/DxeProtocolNotify.c b/CloverEFI/OsxDxeCore/DxeMain/DxeProtocolNotify.c
index 0dcefc002..5cb373c0d 100644
--- a/CloverEFI/OsxDxeCore/DxeMain/DxeProtocolNotify.c
+++ b/CloverEFI/OsxDxeCore/DxeMain/DxeProtocolNotify.c
@@ -174,14 +174,14 @@ GenericProtocolNotify (
// Copy all the registered Image to new gRuntime protocol
//
for (Link = gRuntimeTemplate.ImageHead.ForwardLink; Link != &gRuntimeTemplate.ImageHead; Link = TempLinkNode.ForwardLink) {
- CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));
+ CopyMem(&TempLinkNode, Link, sizeof(LIST_ENTRY));
InsertTailList (&gRuntime->ImageHead, Link);
}
//
// Copy all the registered Event to new gRuntime protocol
//
for (Link = gRuntimeTemplate.EventHead.ForwardLink; Link != &gRuntimeTemplate.EventHead; Link = TempLinkNode.ForwardLink) {
- CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));
+ CopyMem(&TempLinkNode, Link, sizeof(LIST_ENTRY));
InsertTailList (&gRuntime->EventHead, Link);
}
diff --git a/CloverEFI/OsxDxeCore/FwVol/FwVol.c b/CloverEFI/OsxDxeCore/FwVol/FwVol.c
index fa1886828..37ef333e4 100644
--- a/CloverEFI/OsxDxeCore/FwVol/FwVol.c
+++ b/CloverEFI/OsxDxeCore/FwVol/FwVol.c
@@ -209,7 +209,7 @@ GetFwVolHeader (
//
// Copy the standard header into the buffer
//
- CopyMem (*FwVolHeader, &TempFvh, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
+ CopyMem(*FwVolHeader, &TempFvh, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
//
// Read the rest of the header
diff --git a/CloverEFI/OsxDxeCore/FwVol/FwVolRead.c b/CloverEFI/OsxDxeCore/FwVol/FwVolRead.c
index a44ad651a..aaa704910 100644
--- a/CloverEFI/OsxDxeCore/FwVol/FwVolRead.c
+++ b/CloverEFI/OsxDxeCore/FwVol/FwVolRead.c
@@ -365,7 +365,7 @@ FvReadFile (
//
// Copy data into callers buffer
//
- CopyMem (*Buffer, SrcPtr, FileSize);
+ CopyMem(*Buffer, SrcPtr, FileSize);
return Status;
}
diff --git a/CloverEFI/OsxDxeCore/FwVolBlock/FwVolBlock.c b/CloverEFI/OsxDxeCore/FwVolBlock/FwVolBlock.c
index 4a885caa3..c9c77d203 100644
--- a/CloverEFI/OsxDxeCore/FwVolBlock/FwVolBlock.c
+++ b/CloverEFI/OsxDxeCore/FwVolBlock/FwVolBlock.c
@@ -255,7 +255,7 @@ FwVolBlockReadBlock (
//
// Perform read operation
//
- CopyMem (Buffer, LbaOffset, NumOfBytesRead);
+ CopyMem(Buffer, LbaOffset, NumOfBytesRead);
if (NumOfBytesRead == *NumBytes) {
return EFI_SUCCESS;
diff --git a/CloverEFI/OsxDxeCore/Gcd/Gcd.c b/CloverEFI/OsxDxeCore/Gcd/Gcd.c
index d028ee5b8..ca2998e50 100644
--- a/CloverEFI/OsxDxeCore/Gcd/Gcd.c
+++ b/CloverEFI/OsxDxeCore/Gcd/Gcd.c
@@ -431,7 +431,7 @@ CoreInsertGcdMapEntry (
return EFI_INVALID_PARAMETER;
}
- CopyMem (BottomEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
+ CopyMem(BottomEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
Entry->BaseAddress = BaseAddress;
BottomEntry->EndAddress = BaseAddress - 1;
InsertTailList (Link, &BottomEntry->Link);
@@ -443,7 +443,7 @@ CoreInsertGcdMapEntry (
return EFI_INVALID_PARAMETER;
}
- CopyMem (TopEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
+ CopyMem(TopEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
TopEntry->BaseAddress = BaseAddress + Length;
Entry->EndAddress = BaseAddress + Length - 1;
InsertHeadList (Link, &TopEntry->Link);
@@ -2067,7 +2067,7 @@ CoreInitializeMemoryServices (
EfiMemoryTypeInformation = GET_GUID_HOB_DATA (GuidHob);
DataSize = GET_GUID_HOB_DATA_SIZE (GuidHob);
if (EfiMemoryTypeInformation != NULL && DataSize > 0 && DataSize <= (EfiMaxMemoryType + 1) * sizeof (EFI_MEMORY_TYPE_INFORMATION)) {
- CopyMem (&gMemoryTypeInformation, EfiMemoryTypeInformation, DataSize);
+ CopyMem(&gMemoryTypeInformation, EfiMemoryTypeInformation, DataSize);
}
}
diff --git a/CloverEFI/OsxDxeCore/Hand/DriverSupport.c b/CloverEFI/OsxDxeCore/Hand/DriverSupport.c
index eaa521375..f9cbd9869 100644
--- a/CloverEFI/OsxDxeCore/Hand/DriverSupport.c
+++ b/CloverEFI/OsxDxeCore/Hand/DriverSupport.c
@@ -92,8 +92,8 @@ CoreConnectController (
RemainingDevicePathSize = GetDevicePathSize (RemainingDevicePath);
TempFilePath = AllocatePool (HandleFilePathSize + RemainingDevicePathSize);
// ASSERT (TempFilePath != NULL);
- CopyMem (TempFilePath, HandleFilePath, HandleFilePathSize);
- CopyMem ((UINT8 *) TempFilePath + HandleFilePathSize, RemainingDevicePath, RemainingDevicePathSize);
+ CopyMem(TempFilePath, HandleFilePath, HandleFilePathSize);
+ CopyMem((UINT8 *) TempFilePath + HandleFilePathSize, RemainingDevicePath, RemainingDevicePathSize);
FilePath = TempFilePath;
}
Status = gSecurity2->FileAuthentication (
diff --git a/CloverEFI/OsxDxeCore/Image/Image.c b/CloverEFI/OsxDxeCore/Image/Image.c
index c187cf6ff..dd29da457 100644
--- a/CloverEFI/OsxDxeCore/Image/Image.c
+++ b/CloverEFI/OsxDxeCore/Image/Image.c
@@ -254,7 +254,7 @@ CoreReadImageFile (
*ReadSize = 0;
}
- CopyMem (Buffer, (CHAR8 *)FHand->Source + Offset, *ReadSize);
+ CopyMem(Buffer, (CHAR8 *)FHand->Source + Offset, *ReadSize);
return EFI_SUCCESS;
}
/**
@@ -1805,7 +1805,7 @@ CoreExit (
Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
- CopyMem (Image->ExitData, ExitData, Image->ExitDataSize);
+ CopyMem(Image->ExitData, ExitData, Image->ExitDataSize);
}
CoreRestoreTpl (OldTpl);
diff --git a/CloverEFI/OsxDxeCore/Mem/Page.c b/CloverEFI/OsxDxeCore/Mem/Page.c
index 72be3b4e6..f9568607a 100644
--- a/CloverEFI/OsxDxeCore/Mem/Page.c
+++ b/CloverEFI/OsxDxeCore/Mem/Page.c
@@ -191,7 +191,7 @@ CoreAddRange (
// used for other purposes.
//
if (Type == EfiConventionalMemory && Start == 0 && (End >= EFI_PAGE_SIZE - 1)) {
- SetMem ((VOID *)(UINTN)Start, EFI_PAGE_SIZE, 0);
+ SetMem((VOID *)(UINTN)Start, EFI_PAGE_SIZE, 0);
}
//
@@ -363,7 +363,7 @@ CoreFreeMemoryMapStack (
RemoveEntryList (&mMapStack[mMapDepth].Link);
mMapStack[mMapDepth].Link.ForwardLink = NULL;
- CopyMem (Entry , &mMapStack[mMapDepth], sizeof (MEMORY_MAP));
+ CopyMem(Entry , &mMapStack[mMapDepth], sizeof (MEMORY_MAP));
Entry->FromPages = TRUE;
//
diff --git a/CloverEFI/OsxDxeCore/Misc/DebugImageInfo.c b/CloverEFI/OsxDxeCore/Misc/DebugImageInfo.c
index 5e2c1d75b..325bcc0f2 100644
--- a/CloverEFI/OsxDxeCore/Misc/DebugImageInfo.c
+++ b/CloverEFI/OsxDxeCore/Misc/DebugImageInfo.c
@@ -209,7 +209,7 @@ CoreNewDebugImageInfoEntry (
//
// Copy the old table into the new one
//
- CopyMem (NewTable, Table, TableSize);
+ CopyMem(NewTable, Table, TableSize);
//
// Free the old table
//
diff --git a/CloverEFI/OsxDxeCore/Misc/InstallConfigurationTable.c b/CloverEFI/OsxDxeCore/Misc/InstallConfigurationTable.c
index bbc60fdb3..d7bccf3ba 100644
--- a/CloverEFI/OsxDxeCore/Misc/InstallConfigurationTable.c
+++ b/CloverEFI/OsxDxeCore/Misc/InstallConfigurationTable.c
@@ -90,7 +90,7 @@ CoreInstallConfigurationTable (
// Copy over deleted entry
//
// Print(L"Copy over deleted entry\n");
- CopyMem (
+ CopyMem(
&(EfiConfigurationTable[Index]),
&(gDxeCoreST->ConfigurationTable[Index + 1]),
(gDxeCoreST->NumberOfTableEntries - Index) * sizeof (EFI_CONFIGURATION_TABLE)
@@ -132,7 +132,7 @@ CoreInstallConfigurationTable (
// Copy the old table to the new table.
//
// Print(L"Copy the old table to the new table\n");
- CopyMem (
+ CopyMem(
EfiConfigurationTable,
gDxeCoreST->ConfigurationTable,
Index * sizeof (EFI_CONFIGURATION_TABLE)
diff --git a/CloverEFI/OsxDxeCore/SectionExtraction/CoreSectionExtraction.c b/CloverEFI/OsxDxeCore/SectionExtraction/CoreSectionExtraction.c
index fda707943..2b376498b 100644
--- a/CloverEFI/OsxDxeCore/SectionExtraction/CoreSectionExtraction.c
+++ b/CloverEFI/OsxDxeCore/SectionExtraction/CoreSectionExtraction.c
@@ -369,7 +369,7 @@ OpenSectionStreamEx (
//
// Copy in stream data
//
- CopyMem (NewStream->StreamBuffer, SectionStream, SectionStreamLength);
+ CopyMem(NewStream->StreamBuffer, SectionStream, SectionStreamLength);
} else {
//
// It's possible to have a zero length section stream.
@@ -759,7 +759,7 @@ CreateChildNode (
//
// stream is not actually compressed, just encapsulated. So just copy it.
//
- CopyMem (NewStreamBuffer, CompressionSource, NewStreamBufferSize);
+ CopyMem(NewStreamBuffer, CompressionSource, NewStreamBufferSize);
} else if (CompressionType == EFI_STANDARD_COMPRESSION) {
//
// Only support the EFI_SATNDARD_COMPRESSION algorithm.
@@ -1311,7 +1311,7 @@ GetSection (
goto GetSection_Done;
}
}
- CopyMem (*Buffer, CopyBuffer, CopySize);
+ CopyMem(*Buffer, CopyBuffer, CopySize);
*BufferSize = SectionSize;
GetSection_Done:
@@ -1579,7 +1579,7 @@ CustomGuidedSectionExtract (
// OutputBuffer was returned as a different value,
// so copy section contents to the allocated memory buffer.
//
- CopyMem (AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize);
+ CopyMem(AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize);
*OutputBuffer = AllocatedOutputBuffer;
}
diff --git a/CloverEFI/OsxDxeIpl/DxeInit.c b/CloverEFI/OsxDxeIpl/DxeInit.c
index 1e00c889d..97dbbcc9d 100644
--- a/CloverEFI/OsxDxeIpl/DxeInit.c
+++ b/CloverEFI/OsxDxeIpl/DxeInit.c
@@ -140,7 +140,7 @@ Returns:
// CHAR8 PrintBuffer[256];
EFILDRHANDOFF HandoffCopy;
- CopyMem ((VOID*) &HandoffCopy, (VOID*) Handoff, sizeof (EFILDRHANDOFF));
+ CopyMem((VOID*) &HandoffCopy, (VOID*) Handoff, sizeof (EFILDRHANDOFF));
Handoff = &HandoffCopy;
// ClearScreen();
diff --git a/CloverEFI/OsxDxeIpl/HobGeneration.c b/CloverEFI/OsxDxeIpl/HobGeneration.c
index 763dc6a26..1f6ea78e3 100644
--- a/CloverEFI/OsxDxeIpl/HobGeneration.c
+++ b/CloverEFI/OsxDxeIpl/HobGeneration.c
@@ -724,7 +724,7 @@ PrepareHobMemoryDescriptor (
//
gHob->MemoryDescriptor.MemDesc = (EFI_MEMORY_DESCRIPTOR *)((UINTN) gHob->MemoryDescriptor.MemDesc & ~EFI_PAGE_MASK);
- CopyMem (gHob->MemoryDescriptor.MemDesc, MemDesc, MemDescCount * sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(gHob->MemoryDescriptor.MemDesc, MemDesc, MemDescCount * sizeof(EFI_MEMORY_DESCRIPTOR));
return gHob->MemoryDescriptor.MemDesc;
}
@@ -868,7 +868,7 @@ PrepareHobNvStorage (
// Efivar.bin doesn't exist
// 1. Init variable storage header to valid header
//
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) NV_STORAGE_START,
&VarStoreHeader,
sizeof (VARIABLE_STORE_HEADER)
@@ -876,7 +876,7 @@ PrepareHobNvStorage (
//
// 2. set all bits in variable storage body to 1
//
- SetMem (
+ SetMem(
(VOID *) (UINTN) (NV_STORAGE_START + sizeof (VARIABLE_STORE_HEADER)),
NV_STORAGE_SIZE - sizeof (VARIABLE_STORE_HEADER),
0xff
@@ -900,8 +900,8 @@ PrepareHobNvStorage (
}
NvStorageFvbHeader.Checksum = (UINT16) (0x10000 - Checksum);
StorageFvbBase = (EFI_PHYSICAL_ADDRESS)(((UINTN)NvStorageTop - NV_STORAGE_FVB_SIZE - NV_FTW_FVB_SIZE) & ~EFI_PAGE_MASK);
- CopyMem ((VOID *) (UINTN) StorageFvbBase, &NvStorageFvbHeader, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
- CopyMem (
+ CopyMem((VOID *) (UINTN) StorageFvbBase, &NvStorageFvbHeader, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
+ CopyMem(
(VOID *) (UINTN) (StorageFvbBase + sizeof (EFI_FIRMWARE_VOLUME_HEADER)),
&BlockMapEntryEnd,
sizeof (EFI_FV_BLOCK_MAP_ENTRY)
@@ -910,7 +910,7 @@ PrepareHobNvStorage (
//
// 2. Relocate variable data
//
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) (StorageFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH),
(VOID *) (UINTN) NV_STORAGE_START,
NV_STORAGE_SIZE
@@ -919,7 +919,7 @@ PrepareHobNvStorage (
//
// 3. Set the remaining memory to 0xff
//
- SetMem (
+ SetMem(
(VOID *) (UINTN) (StorageFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH + NV_STORAGE_SIZE),
NV_STORAGE_FVB_SIZE - NV_STORAGE_SIZE - EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH,
0xff
@@ -966,7 +966,7 @@ PrepareHobPhit (
gHob->Phit.EfiFreeMemoryTop = (EFI_PHYSICAL_ADDRESS)(UINTN)FreeMemoryTop;
gHob->Phit.EfiFreeMemoryBottom = gHob->Phit.EfiMemoryBottom + sizeof(HOB_TEMPLATE);
- CopyMem ((VOID *)(UINTN)gHob->Phit.EfiMemoryBottom, gHob, sizeof(HOB_TEMPLATE));
+ CopyMem((VOID *)(UINTN)gHob->Phit.EfiMemoryBottom, gHob, sizeof(HOB_TEMPLATE));
gHob = (HOB_TEMPLATE *)(UINTN)gHob->Phit.EfiMemoryBottom;
gHob->Phit.EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS)(UINTN)&gHob->EndOfHobList;
diff --git a/CloverEFI/OsxDxeIpl/LegacyTable.c b/CloverEFI/OsxDxeIpl/LegacyTable.c
index f60098bc3..f91a4768e 100644
--- a/CloverEFI/OsxDxeIpl/LegacyTable.c
+++ b/CloverEFI/OsxDxeIpl/LegacyTable.c
@@ -166,7 +166,7 @@ ScanTableInXSDT (
BasePtr = (UINTN)(&(Xsdt->Entry));
for (Index = 0; Index < EntryCount; Index ++) {
- CopyMem (&EntryPtr, (VOID *)(BasePtr + Index * sizeof(UINT64)), sizeof(UINT64));
+ CopyMem(&EntryPtr, (VOID *)(BasePtr + Index * sizeof(UINT64)), sizeof(UINT64));
Table = (EFI_ACPI_DESCRIPTION_HEADER*)((UINTN)(EntryPtr));
if (Table->Signature == Signature) {
*FoundTable = Table;
@@ -298,14 +298,14 @@ PrepareFadtTable (
// For fields not included in ACPI 1.0 spec, we get the value based on table length
//
if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPmTmrBlk) + sizeof (Fadt->XPmTmrBlk)) {
- CopyMem (
+ CopyMem(
&AcpiDescription->PM_TMR_BLK,
&Fadt->XPmTmrBlk,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
);
}
if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, ResetValue) + sizeof (Fadt->ResetValue)) {
- CopyMem (
+ CopyMem(
&AcpiDescription->RESET_REG,
&Fadt->ResetReg,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
@@ -321,7 +321,7 @@ PrepareFadtTable (
}
if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPm1aEvtBlk) + sizeof (Fadt->XPm1aEvtBlk)) {
- CopyMem (
+ CopyMem(
&AcpiDescription->PM1a_EVT_BLK,
&Fadt->XPm1aEvtBlk,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
@@ -336,7 +336,7 @@ PrepareFadtTable (
AcpiDescription->PM1_EVT_LEN = Fadt->Pm1EvtLen;
if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPm1aCntBlk) + sizeof (Fadt->XPm1aCntBlk)) {
- CopyMem (
+ CopyMem(
&AcpiDescription->PM1a_CNT_BLK,
&Fadt->XPm1aCntBlk,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
@@ -351,7 +351,7 @@ PrepareFadtTable (
AcpiDescription->PM1_CNT_LEN = Fadt->Pm1CntLen;
if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPm2CntBlk) + sizeof (Fadt->XPm2CntBlk)) {
- CopyMem (
+ CopyMem(
&AcpiDescription->PM2_CNT_BLK,
&Fadt->XPm2CntBlk,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
diff --git a/CloverEFI/OsxEfiLdr/EfiLoader.c b/CloverEFI/OsxEfiLdr/EfiLoader.c
index 78a977265..619498073 100644
--- a/CloverEFI/OsxEfiLdr/EfiLoader.c
+++ b/CloverEFI/OsxEfiLdr/EfiLoader.c
@@ -134,7 +134,7 @@ EfiLoader (
SystemHang ("Failed to find free space to hold decompressed BFV\n");
}
ZeroMem ((VOID *)(UINTN)BfvBase, BfvPageNumber * EFI_PAGE_SIZE);
- CopyMem ((VOID *)(UINTN)BfvBase, (VOID *)(UINTN)EFI_DECOMPRESSED_BUFFER_ADDRESS, DestinationSize);
+ CopyMem((VOID *)(UINTN)BfvBase, (VOID *)(UINTN)EFI_DECOMPRESSED_BUFFER_ADDRESS, DestinationSize);
// PrintHeader ('B');
diff --git a/CloverEFI/OsxEfiLdr/PeLoader.c b/CloverEFI/OsxEfiLdr/PeLoader.c
index 2920c1d92..e402927fb 100644
--- a/CloverEFI/OsxEfiLdr/PeLoader.c
+++ b/CloverEFI/OsxEfiLdr/PeLoader.c
@@ -541,7 +541,7 @@ EfiLdrPeCoffImageRead (
OUT VOID *Buffer
)
{
- CopyMem (Buffer, (VOID *)((UINTN)FHand + Offset), ReadSize);
+ CopyMem(Buffer, (VOID *)((UINTN)FHand + Offset), ReadSize);
return EFI_SUCCESS;
}
diff --git a/CloverEFI/OsxPciBusNoEnumerationDxe/PciEnumeratorSupport.c b/CloverEFI/OsxPciBusNoEnumerationDxe/PciEnumeratorSupport.c
index 7c7adfbb1..a0ed104c7 100644
--- a/CloverEFI/OsxPciBusNoEnumerationDxe/PciEnumeratorSupport.c
+++ b/CloverEFI/OsxPciBusNoEnumerationDxe/PciEnumeratorSupport.c
@@ -1191,7 +1191,7 @@ Returns:
PciIoDevice->BusOverride = FALSE;
PciIoDevice->IsPciExp = FALSE;
- CopyMem (&(PciIoDevice->Pci), Pci, sizeof (PCI_TYPE01));
+ CopyMem(&(PciIoDevice->Pci), Pci, sizeof (PCI_TYPE01));
//
// Initialize the PCI I/O instance structure
diff --git a/CloverEFI/OsxPciBusNoEnumerationDxe/PciIo.c b/CloverEFI/OsxPciBusNoEnumerationDxe/PciIo.c
index 05dcfe635..cf441d759 100644
--- a/CloverEFI/OsxPciBusNoEnumerationDxe/PciIo.c
+++ b/CloverEFI/OsxPciBusNoEnumerationDxe/PciIo.c
@@ -181,7 +181,7 @@ PciIoConfigWrite (
EFI_STATUS
EFIAPI
-PciIoCopyMem (
+PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
@@ -326,7 +326,7 @@ Returns:
--*/
{
- CopyMem (&PciIoDevice->PciIo, &PciIoInterface, sizeof (EFI_PCI_IO_PROTOCOL));
+ CopyMem(&PciIoDevice->PciIo, &PciIoInterface, sizeof (EFI_PCI_IO_PROTOCOL));
// return EFI_SUCCESS;
}
@@ -859,7 +859,7 @@ Returns:
EFI_STATUS
EFIAPI
-PciIoCopyMem (
+PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
@@ -912,7 +912,7 @@ Returns:
return EFI_UNSUPPORTED;
}
- Status = PciIoDevice->PciRootBridgeIo->CopyMem (
+ Status = PciIoDevice->PciRootBridgeIo->CopyMem(
PciIoDevice->PciRootBridgeIo,
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
DestOffset,
diff --git a/CloverEFI/OsxPciBusNoEnumerationDxe/PciRomTable.c b/CloverEFI/OsxPciBusNoEnumerationDxe/PciRomTable.c
index 6cbe34faa..af065e331 100644
--- a/CloverEFI/OsxPciBusNoEnumerationDxe/PciRomTable.c
+++ b/CloverEFI/OsxPciBusNoEnumerationDxe/PciRomTable.c
@@ -61,7 +61,7 @@ PciRomAddImageMapping (
return ;
}
- CopyMem (TempMapping, mRomImageTable, mNumberOfPciRomImages * sizeof (EFI_PCI_ROM_IMAGE_MAPPING));
+ CopyMem(TempMapping, mRomImageTable, mNumberOfPciRomImages * sizeof (EFI_PCI_ROM_IMAGE_MAPPING));
if (mRomImageTable != NULL) {
gBS->FreePool(mRomImageTable);
diff --git a/CloverEFI/OsxSmbiosGenDxe/SmbiosGen.c b/CloverEFI/OsxSmbiosGenDxe/SmbiosGen.c
index 7840ae473..4986116b8 100644
--- a/CloverEFI/OsxSmbiosGenDxe/SmbiosGen.c
+++ b/CloverEFI/OsxSmbiosGenDxe/SmbiosGen.c
@@ -139,7 +139,7 @@ InstallMiscSmbios (
AString = GetSmbiosString (SmbiosTable, SmbiosTable.Type0->BiosVersion);
UString = AllocateZeroPool((AsciiStrLen(AString) + 1) * sizeof(CHAR16) + sizeof(FIRMWARE_BIOS_VERSIONE));
ASSERT (UString != NULL);
- CopyMem (UString, FIRMWARE_BIOS_VERSIONE, sizeof(FIRMWARE_BIOS_VERSIONE));
+ CopyMem(UString, FIRMWARE_BIOS_VERSIONE, sizeof(FIRMWARE_BIOS_VERSIONE));
AsciiStrToUnicodeStr (AString, UString + sizeof(FIRMWARE_BIOS_VERSIONE) / sizeof(CHAR16) - 1);
Token = HiiSetString (gStringHandle, 0, UString, NULL);
@@ -169,7 +169,7 @@ InstallMiscSmbios (
AString = GetSmbiosString (SmbiosTable, SmbiosTable.Type1->ProductName);
UString = AllocateZeroPool((AsciiStrLen(AString) + 1) * sizeof(CHAR16) + sizeof(FIRMWARE_PRODUCT_NAME));
ASSERT (UString != NULL);
- CopyMem (UString, FIRMWARE_PRODUCT_NAME, sizeof(FIRMWARE_PRODUCT_NAME));
+ CopyMem(UString, FIRMWARE_PRODUCT_NAME, sizeof(FIRMWARE_PRODUCT_NAME));
AsciiStrToUnicodeStr (AString, UString + sizeof(FIRMWARE_PRODUCT_NAME) / sizeof(CHAR16) - 1);
Token = HiiSetString (gStringHandle, 0, UString, NULL);
diff --git a/CloverEFI/PcatRealTimeClockRuntimeDxe/PcRtc.c b/CloverEFI/PcatRealTimeClockRuntimeDxe/PcRtc.c
index 4e2c71427..e15ec0ac4 100644
--- a/CloverEFI/PcatRealTimeClockRuntimeDxe/PcRtc.c
+++ b/CloverEFI/PcatRealTimeClockRuntimeDxe/PcRtc.c
@@ -456,7 +456,7 @@ PcRtcSetTime (
return Status;
}
- CopyMem (&RtcTime, Time, sizeof (EFI_TIME));
+ CopyMem(&RtcTime, Time, sizeof (EFI_TIME));
//
// Acquire RTC Lock to make access to RTC atomic
@@ -701,7 +701,7 @@ PcRtcSetWakeupTime (
//
// Make a local copy of the time and date
//
- CopyMem (&RtcTime, Time, sizeof (EFI_TIME));
+ CopyMem(&RtcTime, Time, sizeof (EFI_TIME));
}
//
diff --git a/CloverEFI/PciRootBridgeDxe/DeviceIo.c b/CloverEFI/PciRootBridgeDxe/DeviceIo.c
index 8e6e0d8ae..a06a823f4 100644
--- a/CloverEFI/PciRootBridgeDxe/DeviceIo.c
+++ b/CloverEFI/PciRootBridgeDxe/DeviceIo.c
@@ -138,7 +138,7 @@ Returns:
}
if (Width >= MMIO_COPY_UINT8) {
Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8);
- Status = Private->PciRootBridgeIo->CopyMem (
+ Status = Private->PciRootBridgeIo->CopyMem(
Private->PciRootBridgeIo,
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
(UINT64)(UINTN) Buffer,
@@ -202,7 +202,7 @@ Returns:
}
if (Width >= MMIO_COPY_UINT8) {
Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8);
- Status = Private->PciRootBridgeIo->CopyMem (
+ Status = Private->PciRootBridgeIo->CopyMem(
Private->PciRootBridgeIo,
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
Address,
diff --git a/CloverEFI/PciRootBridgeDxe/Ia32/PcatIo.c b/CloverEFI/PciRootBridgeDxe/Ia32/PcatIo.c
index 520d5ae3e..0a9e4f3ed 100644
--- a/CloverEFI/PciRootBridgeDxe/Ia32/PcatIo.c
+++ b/CloverEFI/PciRootBridgeDxe/Ia32/PcatIo.c
@@ -124,7 +124,7 @@ PcatRootBridgeIoPciRW (
UsePciExpressAccess = FALSE;
- CopyMem (&PciAddress, &UserAddress, sizeof(UINT64));
+ CopyMem(&PciAddress, &UserAddress, sizeof(UINT64));
if (PciAddress.ExtendedRegister > 0xFF) {
//
diff --git a/CloverEFI/PciRootBridgeDxe/PcatIo.c b/CloverEFI/PciRootBridgeDxe/PcatIo.c
index 6d0bf48c6..803ee0a83 100644
--- a/CloverEFI/PciRootBridgeDxe/PcatIo.c
+++ b/CloverEFI/PciRootBridgeDxe/PcatIo.c
@@ -124,7 +124,7 @@ PcatRootBridgeIoPciRW (
UsePciExpressAccess = FALSE;
- CopyMem (&PciAddress, &UserAddress, sizeof(UINT64));
+ CopyMem(&PciAddress, &UserAddress, sizeof(UINT64));
if (PciAddress.ExtendedRegister > 0xFF) {
//
diff --git a/CloverEFI/PciRootBridgeDxe/PcatPciRootBridgeIo.c b/CloverEFI/PciRootBridgeDxe/PcatPciRootBridgeIo.c
index 24a0fae43..fc2a36f6e 100644
--- a/CloverEFI/PciRootBridgeDxe/PcatPciRootBridgeIo.c
+++ b/CloverEFI/PciRootBridgeDxe/PcatPciRootBridgeIo.c
@@ -71,7 +71,7 @@ PcatRootBridgeIoMemWrite (
EFI_STATUS
EFIAPI
-PcatRootBridgeIoCopyMem (
+PcatRootBridgeIoCopyMem(
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 DestAddress,
@@ -474,7 +474,7 @@ PcatRootBridgeIoMemWrite (
EFI_STATUS
EFIAPI
-PcatRootBridgeIoCopyMem (
+PcatRootBridgeIoCopyMem(
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 DestAddress,
@@ -679,7 +679,7 @@ PcatRootBridgeIoMap (
// so the Bus Master can read the contents of the real buffer.
//
if (Operation == EfiPciOperationBusMasterRead || Operation == EfiPciOperationBusMasterRead64) {
- CopyMem (
+ CopyMem(
(VOID *)(UINTN)MapInfo->MappedHostAddress,
(VOID *)(UINTN)MapInfo->HostAddress,
MapInfo->NumberOfBytes
@@ -769,7 +769,7 @@ PcatRootBridgeIoUnmap (
// so the processor can read the contents of the real buffer.
//
if (MapInfo->Operation == EfiPciOperationBusMasterWrite || MapInfo->Operation == EfiPciOperationBusMasterWrite64) {
- CopyMem (
+ CopyMem(
(VOID *)(UINTN)MapInfo->HostAddress,
(VOID *)(UINTN)MapInfo->MappedHostAddress,
MapInfo->NumberOfBytes
diff --git a/CloverEFI/PciRootBridgeDxe/X64/PcatIo.c b/CloverEFI/PciRootBridgeDxe/X64/PcatIo.c
index 78b2bc918..b810b5d78 100644
--- a/CloverEFI/PciRootBridgeDxe/X64/PcatIo.c
+++ b/CloverEFI/PciRootBridgeDxe/X64/PcatIo.c
@@ -124,7 +124,7 @@ PcatRootBridgeIoPciRW (
UsePciExpressAccess = FALSE;
- CopyMem (&PciAddress, &UserAddress, sizeof(UINT64));
+ CopyMem(&PciAddress, &UserAddress, sizeof(UINT64));
if (PciAddress.ExtendedRegister > 0xFF) {
//
diff --git a/CloverEFI/UefiCpuPkg/CpuDxe/CpuDxe.c b/CloverEFI/UefiCpuPkg/CpuDxe/CpuDxe.c
index adc27f5a7..3c872fac3 100644
--- a/CloverEFI/UefiCpuPkg/CpuDxe/CpuDxe.c
+++ b/CloverEFI/UefiCpuPkg/CpuDxe/CpuDxe.c
@@ -1149,7 +1149,7 @@ InitInterruptDescriptorTable (
UINT16 CurrentCs;
VOID *IntHandler;
- SetMem (ExternalVectorTable, sizeof(ExternalVectorTable), 0);
+ SetMem(ExternalVectorTable, sizeof(ExternalVectorTable), 0);
//
// Get original IDT address and size.
diff --git a/CloverEFI/UefiCpuPkg/CpuDxe/CpuGdt.c b/CloverEFI/UefiCpuPkg/CpuDxe/CpuGdt.c
index 25d40735c..f08c33cee 100644
--- a/CloverEFI/UefiCpuPkg/CpuDxe/CpuGdt.c
+++ b/CloverEFI/UefiCpuPkg/CpuDxe/CpuGdt.c
@@ -182,7 +182,7 @@ InitGlobalDescriptorTable (
//
// Initialize all GDT entries
//
- CopyMem (gdt, &GdtTemplate, sizeof (GdtTemplate));
+ CopyMem(gdt, &GdtTemplate, sizeof (GdtTemplate));
//
// Write GDT register
diff --git a/CloverEFI/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c b/CloverEFI/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
index 37f5c32bb..dea5c4a4d 100644
--- a/CloverEFI/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
+++ b/CloverEFI/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
@@ -396,7 +396,7 @@ SmmCpuIo2Initialize (
//
// Copy the SMM CPU I/O Protocol instance into the System Management System Table
//
- CopyMem (&gSmst->SmmIo, &mSmmCpuIo2, sizeof (mSmmCpuIo2));
+ CopyMem(&gSmst->SmmIo, &mSmmCpuIo2, sizeof (mSmmCpuIo2));
//
// Install the SMM CPU I/O Protocol into the SMM protocol database
diff --git a/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c b/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
index baf443ac3..e6889c749 100644
--- a/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
+++ b/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
@@ -80,7 +80,7 @@ InitializeCpuInterruptHandlers (
mReservedVectors = AllocatePool (sizeof (RESERVED_VECTORS_DATA) * CPU_INTERRUPT_NUM);
ASSERT (mReservedVectors != NULL);
- SetMem ((VOID *) mReservedVectors, sizeof (RESERVED_VECTORS_DATA) * CPU_INTERRUPT_NUM, 0xff);
+ SetMem((VOID *) mReservedVectors, sizeof (RESERVED_VECTORS_DATA) * CPU_INTERRUPT_NUM, 0xff);
if (VectorInfo != NULL) {
Status = ReadAndVerifyVectorInfo (VectorInfo, mReservedVectors, CPU_INTERRUPT_NUM);
if (EFI_ERROR(Status)) {
@@ -105,7 +105,7 @@ InitializeCpuInterruptHandlers (
//
IdtTable = AllocateZeroPool(sizeof (IA32_IDT_GATE_DESCRIPTOR) * CPU_INTERRUPT_NUM);
ASSERT (IdtTable != NULL);
- CopyMem (IdtTable, (VOID *)IdtDescriptor.Base, sizeof (IA32_IDT_GATE_DESCRIPTOR) * IdtEntryCount);
+ CopyMem(IdtTable, (VOID *)IdtDescriptor.Base, sizeof (IA32_IDT_GATE_DESCRIPTOR) * IdtEntryCount);
AsmGetTemplateAddressMap (&TemplateMap);
ASSERT (TemplateMap.ExceptionStubHeaderSize <= HOOKAFTER_STUB_SIZE);
@@ -114,7 +114,7 @@ InitializeCpuInterruptHandlers (
InterruptEntry = (UINTN) InterruptEntryCode;
for (Index = 0; Index < CPU_INTERRUPT_NUM; Index ++) {
- CopyMem (
+ CopyMem(
(VOID *) InterruptEntry,
(VOID *) TemplateMap.ExceptionStart,
TemplateMap.ExceptionStubHeaderSize
diff --git a/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c b/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c
index 74b551924..a552656d5 100644
--- a/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c
+++ b/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c
@@ -161,7 +161,7 @@ UpdateIdtTable (
continue;
case EFI_VECTOR_HANDOFF_HOOK_AFTER:
InitializeSpinLock (&mReservedVectors[Index].SpinLock);
- CopyMem (
+ CopyMem(
(VOID *) mReservedVectors[Index].HookAfterStubHeaderCode,
(VOID *) TemplateMap->HookAfterStubHeaderStart,
TemplateMap->ExceptionStubHeaderSize
@@ -217,7 +217,7 @@ InitializeCpuExceptionHandlersWorker (
IA32_IDT_GATE_DESCRIPTOR *IdtTable;
mReservedVectors = mReservedVectorsData;
- SetMem ((VOID *) mReservedVectors, sizeof (RESERVED_VECTORS_DATA) * CPU_EXCEPTION_NUM, 0xff);
+ SetMem((VOID *) mReservedVectors, sizeof (RESERVED_VECTORS_DATA) * CPU_EXCEPTION_NUM, 0xff);
if (VectorInfo != NULL) {
Status = ReadAndVerifyVectorInfo (VectorInfo, mReservedVectors, CPU_EXCEPTION_NUM);
if (EFI_ERROR(Status)) {
diff --git a/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c b/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
index 711187c20..1660a3388 100644
--- a/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
+++ b/CloverEFI/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
@@ -80,7 +80,7 @@ InitializeCpuExceptionHandlers (
UINTN InterruptHandler;
if (VectorInfo != NULL) {
- SetMem ((VOID *) ReservedVectorData, sizeof (RESERVED_VECTORS_DATA) * CPU_EXCEPTION_NUM, 0xff);
+ SetMem((VOID *) ReservedVectorData, sizeof (RESERVED_VECTORS_DATA) * CPU_EXCEPTION_NUM, 0xff);
Status = ReadAndVerifyVectorInfo (VectorInfo, ReservedVectorData, CPU_EXCEPTION_NUM);
if (EFI_ERROR(Status)) {
return EFI_INVALID_PARAMETER;
diff --git a/CloverEFI/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/CloverEFI/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
index 6bf73c87e..c405e3912 100644
--- a/CloverEFI/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/CloverEFI/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -711,7 +711,7 @@ S3ResumeExecuteBootScript (
//
IdtBuffer = AllocatePages (EFI_SIZE_TO_PAGES((IdtDescriptor->Limit + 1) + 16));
ASSERT (IdtBuffer != NULL);
- CopyMem ((VOID*)((UINT8*)IdtBuffer + 16),(VOID*)(IdtDescriptor->Base), (IdtDescriptor->Limit + 1));
+ CopyMem((VOID*)((UINT8*)IdtBuffer + 16),(VOID*)(IdtDescriptor->Base), (IdtDescriptor->Limit + 1));
IdtDescriptor->Base = (UINTN)((UINT8*)IdtBuffer + 16);
*(UINTN*)(IdtDescriptor->Base - sizeof(UINTN)) = (UINTN)GetPeiServicesTablePointer ();
}
diff --git a/Drivers/AtaAtapi/AhciMode.c b/Drivers/AtaAtapi/AhciMode.c
index 674e84c1e..ddbb2956d 100644
--- a/Drivers/AtaAtapi/AhciMode.c
+++ b/Drivers/AtaAtapi/AhciMode.c
@@ -560,13 +560,13 @@ AhciBuildCommand (
CommandFis->AhciCFisPmNum = PortMultiplier;
- CopyMem (&AhciRegisters->AhciCommandTable->CommandFis, CommandFis, sizeof (EFI_AHCI_COMMAND_FIS));
+ CopyMem(&AhciRegisters->AhciCommandTable->CommandFis, CommandFis, sizeof (EFI_AHCI_COMMAND_FIS));
ZeroMem (&AhciRegisters->AhciCommandTable->AtapiCmd, 0x40U + (PrdtNumber << 4));
Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD;
if (AtapiCommand != NULL) {
- CopyMem (
+ CopyMem(
&AhciRegisters->AhciCommandTable->AtapiCmd,
AtapiCommand,
AtapiCommandLength
@@ -612,7 +612,7 @@ AhciBuildCommand (
}
#endif
- CopyMem (
+ CopyMem(
&AhciRegisters->AhciCmdList[CommandSlotNumber],
CommandList,
sizeof (EFI_AHCI_COMMAND_LIST)
diff --git a/Drivers/AtaAtapi/AtaAtapiPassThru.c b/Drivers/AtaAtapi/AtaAtapiPassThru.c
index de23069eb..4da0e33d4 100644
--- a/Drivers/AtaAtapi/AtaAtapiPassThru.c
+++ b/Drivers/AtaAtapi/AtaAtapiPassThru.c
@@ -2062,7 +2062,7 @@ ExtScsiPassThruPassThru (
// But to response EFI_DISK_INFO.Identify() request from ScsiDisk, we should handle this command.
//
if (*((UINT8*)Packet->Cdb) == ATA_CMD_IDENTIFY_DEVICE) {
- CopyMem (Packet->InDataBuffer, DeviceInfo->IdentifyData, sizeof (EFI_IDENTIFY_DATA));
+ CopyMem(Packet->InDataBuffer, DeviceInfo->IdentifyData, sizeof (EFI_IDENTIFY_DATA));
if (Instance->Mode == EfiAtaAhciMode) {
((EFI_IDENTIFY_DATA*) Packet->InDataBuffer)->AtapiData.reserved_224_254[0] = 0U; // hide stashed value
}
@@ -2123,7 +2123,7 @@ ExtScsiPassThruPassThru (
break;
}
- CopyMem ((UINT8*)Packet->SenseData + SenseDataLen, PtrSenseData, sizeof (EFI_SCSI_SENSE_DATA));
+ CopyMem((UINT8*)Packet->SenseData + SenseDataLen, PtrSenseData, sizeof (EFI_SCSI_SENSE_DATA));
SenseDataLen += sizeof (EFI_SCSI_SENSE_DATA);
//
@@ -2417,7 +2417,7 @@ ExtScsiPassThruGetTargetLun (
return EFI_UNSUPPORTED;
}
- SetMem (*Target, TARGET_MAX_BYTES, 0xFF);
+ SetMem(*Target, TARGET_MAX_BYTES, 0xFF);
DevicePathNode = (EFI_DEV_PATH *) DevicePath;
diff --git a/Drivers/AtaAtapi/IdeMode.c b/Drivers/AtaAtapi/IdeMode.c
index 8f007a5fa..153473b34 100644
--- a/Drivers/AtaAtapi/IdeMode.c
+++ b/Drivers/AtaAtapi/IdeMode.c
@@ -200,7 +200,7 @@ IdeWritePortWMultiple (
//
// Copy data from user buffer to working buffer
//
- CopyMem (AlignedBuffer, Buffer, Size);
+ CopyMem(AlignedBuffer, Buffer, Size);
} else {
AlignedBuffer = (UINT16 *) Buffer;
}
@@ -282,7 +282,7 @@ IdeReadPortWMultiple (
//
// Copy data to user buffer
//
- CopyMem (Buffer, AlignedBuffer, Size);
+ CopyMem(Buffer, AlignedBuffer, Size);
gBS->FreePool(WorkingBuffer);
}
}
@@ -328,7 +328,7 @@ DumpAllIdeRegisters (
//
// Dump the content of all ATA registers.
//
- CopyMem (AtaStatusBlock, &StatusBlock, sizeof (EFI_ATA_STATUS_BLOCK));
+ CopyMem(AtaStatusBlock, &StatusBlock, sizeof (EFI_ATA_STATUS_BLOCK));
}
// DEBUG_CODE_BEGIN ();
@@ -2312,7 +2312,7 @@ AtaPacketCommandExecute (
}
ZeroMem (PacketCommand, 12);
- CopyMem (PacketCommand, Packet->Cdb, Packet->CdbLength);
+ CopyMem(PacketCommand, Packet->Cdb, Packet->CdbLength);
//
// No OVL; No DMA
@@ -2900,7 +2900,7 @@ DetectAndConfigIdeDevice (
gBS->Stall (100);
for (IdeDevice = 0; IdeDevice < EfiIdeMaxDevice; IdeDevice++) {
- SetMem (&Buffer, sizeof(EFI_IDENTIFY_DATA), 0x00);
+ SetMem(&Buffer, sizeof(EFI_IDENTIFY_DATA), 0x00);
// Select Master or Slave device to get the return signature for ATA DEVICE DIAGNOSTIC cmd.
//
diff --git a/Drivers/AtaBus/AtaBus.c b/Drivers/AtaBus/AtaBus.c
index 73e009565..0fb24a6a3 100644
--- a/Drivers/AtaBus/AtaBus.c
+++ b/Drivers/AtaBus/AtaBus.c
@@ -1474,7 +1474,7 @@ AtaDiskInfoIdentify (
Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (ATA_IDENTIFY_DATA)) {
Status = EFI_SUCCESS;
- CopyMem (IdentifyData, AtaDevice->IdentifyData, sizeof (ATA_IDENTIFY_DATA));
+ CopyMem(IdentifyData, AtaDevice->IdentifyData, sizeof (ATA_IDENTIFY_DATA));
}
*IdentifyDataSize = sizeof (ATA_IDENTIFY_DATA);
diff --git a/Drivers/AtaBus/AtaPassThruExecute.c b/Drivers/AtaBus/AtaPassThruExecute.c
index 60c2320df..6afde7ac4 100644
--- a/Drivers/AtaBus/AtaPassThruExecute.c
+++ b/Drivers/AtaBus/AtaPassThruExecute.c
@@ -151,7 +151,7 @@ AtaDevicePassThru (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (Packet->Asb, AtaDevice->Asb, sizeof (EFI_ATA_STATUS_BLOCK));
+ CopyMem(Packet->Asb, AtaDevice->Asb, sizeof (EFI_ATA_STATUS_BLOCK));
Packet->Acb = AllocateCopyPool(sizeof (EFI_ATA_COMMAND_BLOCK), &AtaDevice->Acb);
} else {
Packet = &AtaDevice->Packet;
@@ -1006,7 +1006,7 @@ TrustTransferAtaDevice (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (NewBuffer, Buffer, TransferLength);
+ CopyMem(NewBuffer, Buffer, TransferLength);
FreePool(Buffer);
Buffer = NewBuffer;
}
diff --git a/Drivers/DVDBus/ScsiBus.c b/Drivers/DVDBus/ScsiBus.c
index b1afdfdab..86fd74726 100644
--- a/Drivers/DVDBus/ScsiBus.c
+++ b/Drivers/DVDBus/ScsiBus.c
@@ -197,7 +197,7 @@ SCSIBusDriverBindingSupported (
SCSI_TARGET_ID ScsiTargetId;
TargetId = &ScsiTargetId.ScsiId.ExtScsi[0];
- SetMem (TargetId, TARGET_MAX_BYTES, 0xFF);
+ SetMem(TargetId, TARGET_MAX_BYTES, 0xFF);
//
// To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as
@@ -339,7 +339,7 @@ SCSIBusDriverBindingStart (
PassThruStatus = EFI_SUCCESS;
TargetId = &ScsiTargetId.ScsiId.ExtScsi[0];
- SetMem (TargetId, TARGET_MAX_BYTES, 0xFF);
+ SetMem(TargetId, TARGET_MAX_BYTES, 0xFF);
DevicePathStatus = gBS->OpenProtocol (
Controller,
@@ -820,7 +820,7 @@ ScsiGetDeviceLocation (
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
- CopyMem (*Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
+ CopyMem(*Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
*Lun = ScsiIoDevice->Lun;
@@ -878,7 +878,7 @@ ScsiResetDevice (
UINT8 Target[TARGET_MAX_BYTES];
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
- CopyMem (Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
+ CopyMem(Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
if (ScsiIoDevice->ExtScsiSupport) {
@@ -967,7 +967,7 @@ ScsiExecuteSCSICommand (
}
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
- CopyMem (Target, &ScsiIoDevice->Pun, TARGET_MAX_BYTES);
+ CopyMem(Target, &ScsiIoDevice->Pun, TARGET_MAX_BYTES);
mWorkingBuffer = AllocateAlignedBuffer(ScsiIoDevice, sizeof(EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET));
if (mWorkingBuffer == NULL) {
diff --git a/Drivers/DVDDisk/ScsiDisk.c b/Drivers/DVDDisk/ScsiDisk.c
index fa29fd600..a2363b947 100644
--- a/Drivers/DVDDisk/ScsiDisk.c
+++ b/Drivers/DVDDisk/ScsiDisk.c
@@ -763,7 +763,7 @@ ScsiDiskDetectMedia (
*MediaChange = FALSE;
TimeoutEvt = NULL;
- CopyMem (&OldMedia, ScsiDiskDevice->BlkIo.Media, sizeof (OldMedia));
+ CopyMem(&OldMedia, ScsiDiskDevice->BlkIo.Media, sizeof (OldMedia));
Status = gBS->CreateEvent (
EVT_TIMER,
@@ -1666,7 +1666,7 @@ ScsiDiskRequestSenseKeys (
}
}
- CopyMem (ScsiDiskDevice->SenseData + *NumberOfSenseKeys, PtrSenseData, SenseDataLength);
+ CopyMem(ScsiDiskDevice->SenseData + *NumberOfSenseKeys, PtrSenseData, SenseDataLength);
(*NumberOfSenseKeys) += 1;
//
@@ -3062,7 +3062,7 @@ ScsiDiskInfoInquiry (
Status = EFI_BUFFER_TOO_SMALL;
if (*InquiryDataSize >= sizeof (ScsiDiskDevice->InquiryData)) {
Status = EFI_SUCCESS;
- CopyMem (InquiryData, &ScsiDiskDevice->InquiryData, sizeof (ScsiDiskDevice->InquiryData));
+ CopyMem(InquiryData, &ScsiDiskDevice->InquiryData, sizeof (ScsiDiskDevice->InquiryData));
}
*InquiryDataSize = sizeof (ScsiDiskDevice->InquiryData);
return Status;
@@ -3110,7 +3110,7 @@ ScsiDiskInfoIdentify (
Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (ScsiDiskDevice->IdentifyData)) {
Status = EFI_SUCCESS;
- CopyMem (IdentifyData, &ScsiDiskDevice->IdentifyData, sizeof (ScsiDiskDevice->IdentifyData));
+ CopyMem(IdentifyData, &ScsiDiskDevice->IdentifyData, sizeof (ScsiDiskDevice->IdentifyData));
}
*IdentifyDataSize = sizeof (ScsiDiskDevice->IdentifyData);
return Status;
@@ -3253,7 +3253,7 @@ InitializeInstallDiskInfo (
//
// Copy the DiskInfo protocol template.
//
- CopyMem (&ScsiDiskDevice->DiskInfo, &gScsiDiskInfoProtocolTemplate, sizeof (gScsiDiskInfoProtocolTemplate));
+ CopyMem(&ScsiDiskDevice->DiskInfo, &gScsiDiskInfoProtocolTemplate, sizeof (gScsiDiskInfoProtocolTemplate));
while (!IsDevicePathEnd (DevicePathNode)) {
ChildDevicePathNode = NextDevicePathNode (DevicePathNode);
diff --git a/Drivers/Isa/IsaBusDxe/InternalIsaIo.h b/Drivers/Isa/IsaBusDxe/InternalIsaIo.h
index 054a6b9ba..8b0cb6374 100644
--- a/Drivers/Isa/IsaBusDxe/InternalIsaIo.h
+++ b/Drivers/Isa/IsaBusDxe/InternalIsaIo.h
@@ -274,7 +274,7 @@ IsaIoMemWrite (
**/
EFI_STATUS
EFIAPI
-IsaIoCopyMem (
+IsaIoCopyMem(
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset,
diff --git a/Drivers/Isa/IsaBusDxe/IsaIo.c b/Drivers/Isa/IsaBusDxe/IsaIo.c
index 9587f4dc5..f76f032d0 100644
--- a/Drivers/Isa/IsaBusDxe/IsaIo.c
+++ b/Drivers/Isa/IsaBusDxe/IsaIo.c
@@ -96,7 +96,7 @@ InitializeIsaIoInstance (
//
// Use the ISA IO Protocol structure template to initialize the ISA IO instance
//
- CopyMem (
+ CopyMem(
&IsaIoDevice->IsaIo,
&mIsaIoInterface,
sizeof (EFI_ISA_IO_PROTOCOL)
@@ -367,7 +367,7 @@ IsaIoUnmap (
// so the processor can read the contents of the real buffer.
//
if (IsaMapInfo->Operation == EfiIsaIoOperationBusMasterWrite) {
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) IsaMapInfo->HostAddress,
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
IsaMapInfo->NumberOfBytes
@@ -631,7 +631,7 @@ IsaIoMemWrite (
**/
EFI_STATUS
EFIAPI
-IsaIoCopyMem (
+IsaIoCopyMem(
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset,
@@ -676,7 +676,7 @@ IsaIoCopyMem (
return Status;
}
- Status = IsaIoDevice->PciIo->CopyMem (
+ Status = IsaIoDevice->PciIo->CopyMem(
IsaIoDevice->PciIo,
(EFI_PCI_IO_PROTOCOL_WIDTH) Width,
EFI_PCI_IO_PASS_THROUGH_BAR,
@@ -831,7 +831,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
// so the DMA agent can read the contents of the real buffer.
//
if (Operation == EfiIsaIoOperationSlaveRead) {
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
(VOID *) (UINTN) IsaMapInfo->HostAddress,
IsaMapInfo->NumberOfBytes
@@ -1134,7 +1134,7 @@ IsaIoMapFullSupport (
// so the DMA agent can read the contents of the real buffer.
//
if (Operation == EfiIsaIoOperationBusMasterRead) {
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
(VOID *) (UINTN) IsaMapInfo->HostAddress,
IsaMapInfo->NumberOfBytes
diff --git a/Drivers/Isa/IsaIoDxe/IsaIo.c b/Drivers/Isa/IsaIoDxe/IsaIo.c
index 1201d237d..dde7db88c 100644
--- a/Drivers/Isa/IsaIoDxe/IsaIo.c
+++ b/Drivers/Isa/IsaIoDxe/IsaIo.c
@@ -440,7 +440,7 @@ InitializeIsaIoInstance (
//
// Use the ISA IO Protocol structure template to initialize the ISA IO instance
//
- CopyMem (
+ CopyMem(
&IsaIoDevice->IsaIo,
&mIsaIoInterface,
sizeof (EFI_ISA_IO_PROTOCOL)
@@ -770,7 +770,7 @@ IsaIoUnmap (
// so the processor can read the contents of the real buffer.
//
if (IsaMapInfo->Operation == EfiIsaIoOperationBusMasterWrite) {
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) IsaMapInfo->HostAddress,
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
IsaMapInfo->NumberOfBytes
@@ -971,7 +971,7 @@ IsaIoMemWrite (
**/
EFI_STATUS
EFIAPI
-IsaIoCopyMem (
+IsaIoCopyMem(
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset,
@@ -1016,7 +1016,7 @@ IsaIoCopyMem (
return Status;
}
- Status = IsaIoDevice->PciIo->CopyMem (
+ Status = IsaIoDevice->PciIo->CopyMem(
IsaIoDevice->PciIo,
(EFI_PCI_IO_PROTOCOL_WIDTH) Width,
EFI_PCI_IO_PASS_THROUGH_BAR,
@@ -1171,7 +1171,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
// so the DMA agent can read the contents of the real buffer.
//
if (Operation == EfiIsaIoOperationSlaveRead) {
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
(VOID *) (UINTN) IsaMapInfo->HostAddress,
IsaMapInfo->NumberOfBytes
@@ -1474,7 +1474,7 @@ IsaIoMapFullSupport (
// so the DMA agent can read the contents of the real buffer.
//
if (Operation == EfiIsaIoOperationBusMasterRead) {
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
(VOID *) (UINTN) IsaMapInfo->HostAddress,
IsaMapInfo->NumberOfBytes
diff --git a/Drivers/Isa/IsaIoDxe/IsaIo.h b/Drivers/Isa/IsaIoDxe/IsaIo.h
index cc4a1f8b8..38ba97059 100644
--- a/Drivers/Isa/IsaIoDxe/IsaIo.h
+++ b/Drivers/Isa/IsaIoDxe/IsaIo.h
@@ -274,7 +274,7 @@ IsaIoMemWrite (
**/
EFI_STATUS
EFIAPI
-IsaIoCopyMem (
+IsaIoCopyMem(
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset,
diff --git a/Drivers/Isa/IsaSerialDxe/Serial.c b/Drivers/Isa/IsaSerialDxe/Serial.c
index 794312521..c99422154 100644
--- a/Drivers/Isa/IsaSerialDxe/Serial.c
+++ b/Drivers/Isa/IsaSerialDxe/Serial.c
@@ -561,7 +561,7 @@ SerialControllerDriverStart (
// already checked to make sure the RemainingDevicePath contains settings
// that we can support.
//
- CopyMem (&SerialDevice->UartDevicePath, RemainingDevicePath, sizeof (UART_DEVICE_PATH));
+ CopyMem(&SerialDevice->UartDevicePath, RemainingDevicePath, sizeof (UART_DEVICE_PATH));
FlowControl = (UART_FLOW_CONTROL_DEVICE_PATH *) NextDevicePathNode (RemainingDevicePath);
if (IsUartFlowControlNode (FlowControl)) {
FlowControlMap = ReadUnaligned32 (&FlowControl->FlowControlMap);
@@ -1520,7 +1520,7 @@ IsaSerialSetAttributes (
+ GetDevicePathSize (SerialDevice->ParentDevicePath)
- END_DEVICE_PATH_LENGTH
);
- CopyMem (Uart, &SerialDevice->UartDevicePath, sizeof (UART_DEVICE_PATH));
+ CopyMem(Uart, &SerialDevice->UartDevicePath, sizeof (UART_DEVICE_PATH));
Status = gBS->ReinstallProtocolInterface (
SerialDevice->Handle,
&gEfiDevicePathProtocolGuid,
diff --git a/Drivers/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/Drivers/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
index 19558bb25..3528ee2b2 100644
--- a/Drivers/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
+++ b/Drivers/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
@@ -54,7 +54,7 @@ PopEfikeyBufHead (
// Retrieve and remove the values
//
if (KeyData != NULL) {
- CopyMem (KeyData, &Queue->Buffer[Queue->Head], sizeof (EFI_KEY_DATA));
+ CopyMem(KeyData, &Queue->Buffer[Queue->Head], sizeof (EFI_KEY_DATA));
}
Queue->Head = (Queue->Head + 1) % KEYBOARD_EFI_KEY_MAX_COUNT;
return EFI_SUCCESS;
@@ -78,7 +78,7 @@ PushEfikeyBufTail (
//
PopEfikeyBufHead (Queue, NULL);
}
- CopyMem (&Queue->Buffer[Queue->Tail], KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&Queue->Buffer[Queue->Tail], KeyData, sizeof (EFI_KEY_DATA));
Queue->Tail = (Queue->Tail + 1) % KEYBOARD_EFI_KEY_MAX_COUNT;
}
@@ -304,7 +304,7 @@ KeyboardReadKeyStroke (
}
}
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS;
}
}
@@ -345,7 +345,7 @@ KeyboardWaitForKey (
// next key from the queue
//
while (!IsEfikeyBufEmpty (&ConsoleIn->EfiKeyQueue)) {
- CopyMem (
+ CopyMem(
&KeyData,
&(ConsoleIn->EfiKeyQueue.Buffer[ConsoleIn->EfiKeyQueue.Head]),
sizeof (EFI_KEY_DATA)
@@ -608,7 +608,7 @@ KeyboardRegisterKeyNotify (
NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
- CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify;
diff --git a/Drivers/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c b/Drivers/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c
index eaf9760da..0b7cde8e0 100644
--- a/Drivers/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c
+++ b/Drivers/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c
@@ -669,7 +669,7 @@ MouseAbsolutePointerGetState (
}
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
- CopyMem (State, &(MouseAbsolutePointerDev->State), sizeof (EFI_ABSOLUTE_POINTER_STATE));
+ CopyMem(State, &(MouseAbsolutePointerDev->State), sizeof (EFI_ABSOLUTE_POINTER_STATE));
//
// clear mouse state
diff --git a/Drivers/Isa/Ps2MouseDxe/Ps2Mouse.c b/Drivers/Isa/Ps2MouseDxe/Ps2Mouse.c
index 568ab664d..1a002e147 100644
--- a/Drivers/Isa/Ps2MouseDxe/Ps2Mouse.c
+++ b/Drivers/Isa/Ps2MouseDxe/Ps2Mouse.c
@@ -682,7 +682,7 @@ MouseGetState (
}
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
- CopyMem (State, &(MouseDev->State), sizeof (EFI_SIMPLE_POINTER_STATE));
+ CopyMem(State, &(MouseDev->State), sizeof (EFI_SIMPLE_POINTER_STATE));
//
// clear mouse state
diff --git a/Drivers/PartitionDxe/Gpt.c b/Drivers/PartitionDxe/Gpt.c
index 75ad581f2..c33f06526 100644
--- a/Drivers/PartitionDxe/Gpt.c
+++ b/Drivers/PartitionDxe/Gpt.c
@@ -389,7 +389,7 @@ PartitionInstallGptChildHandles (
HdDev.SignatureType = SIGNATURE_TYPE_GUID;
HdDev.PartitionStart = Entry->StartingLBA;
HdDev.PartitionSize = Entry->EndingLBA - Entry->StartingLBA + 1;
- CopyMem (HdDev.Signature, &Entry->UniquePartitionGUID, sizeof (EFI_GUID));
+ CopyMem(HdDev.Signature, &Entry->UniquePartitionGUID, sizeof (EFI_GUID));
/* DEBUG ((EFI_D_INFO, " Index : %d\n", (UINT32) Index));
DEBUG ((EFI_D_INFO, " Start LBA : %lx\n", (UINT64) HdDev.PartitionStart));
@@ -506,7 +506,7 @@ PartitionValidGptTable (
return FALSE;
}
- CopyMem (PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER));
+ CopyMem(PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER));
if (!PartitionCheckGptEntryArrayCRC (BlockIo, DiskIo, PartHeader)) {
FreePool(PartHdr);
return FALSE;
@@ -620,7 +620,7 @@ PartitionRestoreGptTable (
(PartHeader->LastUsableLBA + 1) : \
(PRIMARY_PART_HEADER_LBA + 1);
- CopyMem (PartHdr, PartHeader, sizeof (EFI_PARTITION_TABLE_HEADER));
+ CopyMem(PartHdr, PartHeader, sizeof (EFI_PARTITION_TABLE_HEADER));
PartHdr->MyLBA = PartHeader->AlternateLBA;
PartHdr->AlternateLBA = PartHeader->MyLBA;
diff --git a/Drivers/PartitionDxe/Mbr.c b/Drivers/PartitionDxe/Mbr.c
index 34e772143..b5a031e74 100644
--- a/Drivers/PartitionDxe/Mbr.c
+++ b/Drivers/PartitionDxe/Mbr.c
@@ -182,7 +182,7 @@ PartitionInstallMbrChildHandles (
if (DevicePathType (LastDevicePathNode) == MEDIA_DEVICE_PATH &&
DevicePathSubType (LastDevicePathNode) == MEDIA_HARDDRIVE_DP
) {
- CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
+ CopyMem(&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
} else {
LastDevicePathNode = NULL;
}
@@ -225,7 +225,7 @@ PartitionInstallMbrChildHandles (
HdDev.PartitionNumber = PartitionNumber ++;
HdDev.PartitionStart = UNPACK_UINT32 (Mbr->Partition[Index].StartingLBA);
HdDev.PartitionSize = UNPACK_UINT32 (Mbr->Partition[Index].SizeInLBA);
- CopyMem (HdDev.Signature, &(Mbr->UniqueMbrSignature[0]), sizeof (Mbr->UniqueMbrSignature));
+ CopyMem(HdDev.Signature, &(Mbr->UniqueMbrSignature[0]), sizeof (Mbr->UniqueMbrSignature));
Status = PartitionInstallChildHandle (
This,
diff --git a/Drivers/PartitionDxe/Partition.c b/Drivers/PartitionDxe/Partition.c
index 8648a064c..4e96e8286 100644
--- a/Drivers/PartitionDxe/Partition.c
+++ b/Drivers/PartitionDxe/Partition.c
@@ -1143,7 +1143,7 @@ PartitionInstallChildHandle (
Private->BlockIo.Revision = ParentBlockIo->Revision;
Private->BlockIo.Media = &Private->Media;
- CopyMem (Private->BlockIo.Media, ParentBlockIo->Media, sizeof (EFI_BLOCK_IO_MEDIA));
+ CopyMem(Private->BlockIo.Media, ParentBlockIo->Media, sizeof (EFI_BLOCK_IO_MEDIA));
Private->BlockIo.Reset = PartitionReset;
Private->BlockIo.ReadBlocks = PartitionReadBlocks;
@@ -1156,7 +1156,7 @@ PartitionInstallChildHandle (
if (Private->DiskIo2 != NULL) {
ASSERT (Private->ParentBlockIo2 != NULL);
Private->BlockIo2.Media = &Private->Media2;
- CopyMem (Private->BlockIo2.Media, ParentBlockIo2->Media, sizeof (EFI_BLOCK_IO_MEDIA));
+ CopyMem(Private->BlockIo2.Media, ParentBlockIo2->Media, sizeof (EFI_BLOCK_IO_MEDIA));
Private->BlockIo2.Reset = PartitionResetEx;
Private->BlockIo2.ReadBlocksEx = PartitionReadBlocksEx;
diff --git a/Drivers/SataControllerDxe/SataController.c b/Drivers/SataControllerDxe/SataController.c
index 869951e24..8f8ebb232 100644
--- a/Drivers/SataControllerDxe/SataController.c
+++ b/Drivers/SataControllerDxe/SataController.c
@@ -927,7 +927,7 @@ IdeInitSubmitData (
// Make a local copy of device's IdentifyData and mark the valid flag
//
if (IdentifyData != NULL) {
- CopyMem (
+ CopyMem(
&(SataPrivateData->IdentifyData[Index]),
IdentifyData,
sizeof (EFI_IDENTIFY_DATA)
@@ -1005,7 +1005,7 @@ IdeInitDisqualifyMode (
// Record the disqualified modes per channel per device. From ATA/ATAPI spec,
// if a mode is not supported, the modes higher than it is also not supported.
//
- CopyMem (
+ CopyMem(
&(SataPrivateData->DisqulifiedModes[(UINTN) Channel * (UINTN) SataPrivateData->DeviceCount + (UINTN) Device]),
BadModes,
sizeof (EFI_ATA_COLLECTIVE_MODE)
diff --git a/Drivers/UsbBusDxe/UsbBus.c b/Drivers/UsbBusDxe/UsbBus.c
index d68920c81..5a0d26e1d 100644
--- a/Drivers/UsbBusDxe/UsbBus.c
+++ b/Drivers/UsbBusDxe/UsbBus.c
@@ -553,7 +553,7 @@ UsbIoGetDeviceDescriptor (
UsbIf = USB_INTERFACE_FROM_USBIO (This);
Dev = UsbIf->Device;
- CopyMem (Descriptor, &Dev->DevDesc->Desc, sizeof (EFI_USB_DEVICE_DESCRIPTOR));
+ CopyMem(Descriptor, &Dev->DevDesc->Desc, sizeof (EFI_USB_DEVICE_DESCRIPTOR));
gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS;
@@ -598,7 +598,7 @@ UsbIoGetActiveConfigDescriptor (
goto ON_EXIT;
}
- CopyMem (Descriptor, &(Dev->ActiveConfig->Desc), sizeof (EFI_USB_CONFIG_DESCRIPTOR));
+ CopyMem(Descriptor, &(Dev->ActiveConfig->Desc), sizeof (EFI_USB_CONFIG_DESCRIPTOR));
ON_EXIT:
gBS->RestoreTPL (OldTpl);
@@ -633,7 +633,7 @@ UsbIoGetInterfaceDescriptor (
OldTpl = gBS->RaiseTPL (USB_BUS_TPL);
UsbIf = USB_INTERFACE_FROM_USBIO (This);
- CopyMem (Descriptor, &(UsbIf->IfSetting->Desc), sizeof (EFI_USB_INTERFACE_DESCRIPTOR));
+ CopyMem(Descriptor, &(UsbIf->IfSetting->Desc), sizeof (EFI_USB_INTERFACE_DESCRIPTOR));
gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS;
@@ -677,7 +677,7 @@ UsbIoGetEndpointDescriptor (
return EFI_NOT_FOUND;
}
- CopyMem (
+ CopyMem(
Descriptor,
&(UsbIf->IfSetting->Endpoints[Index]->Desc),
sizeof (EFI_USB_ENDPOINT_DESCRIPTOR)
@@ -798,7 +798,7 @@ UsbIoGetStringDescriptor (
goto FREE_STR;
}
- CopyMem (Buf, StrDesc->String, StrDesc->Length - 2);
+ CopyMem(Buf, StrDesc->String, StrDesc->Length - 2);
*String = (CHAR16 *) Buf;
Status = EFI_SUCCESS;
diff --git a/Drivers/UsbBusDxe/UsbDesc.c b/Drivers/UsbBusDxe/UsbDesc.c
index 42ed3ae58..326fcb144 100644
--- a/Drivers/UsbBusDxe/UsbDesc.c
+++ b/Drivers/UsbBusDxe/UsbDesc.c
@@ -210,7 +210,7 @@ UsbCreateDesc (
return NULL;
}
- CopyMem (Desc, Head, (UINTN) DescLen);
+ CopyMem(Desc, Head, (UINTN) DescLen);
*Consumed = Offset + Head->Len;
diff --git a/Drivers/UsbBusDxe/UsbEnumer.c b/Drivers/UsbBusDxe/UsbEnumer.c
index c3d330553..3888931c6 100644
--- a/Drivers/UsbBusDxe/UsbEnumer.c
+++ b/Drivers/UsbBusDxe/UsbEnumer.c
@@ -133,7 +133,7 @@ UsbCreateInterface (
}
UsbIf->IfSetting = IfDesc->Settings[IfDesc->ActiveIndex];
- CopyMem (
+ CopyMem(
&(UsbIf->UsbIo),
&mUsbIoProtocol,
sizeof (EFI_USB_IO_PROTOCOL)
diff --git a/Drivers/UsbBusDxe/UsbHub.c b/Drivers/UsbBusDxe/UsbHub.c
index 8d052edcc..27f0ed016 100644
--- a/Drivers/UsbBusDxe/UsbHub.c
+++ b/Drivers/UsbBusDxe/UsbHub.c
@@ -684,7 +684,7 @@ UsbOnHubInterrupt (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (HubIf->ChangeMap, Data, DataLength);
+ CopyMem(HubIf->ChangeMap, Data, DataLength);
gBS->SignalEvent (HubIf->HubNotify);
return EFI_SUCCESS;
diff --git a/Drivers/UsbBusDxe/UsbUtility.c b/Drivers/UsbBusDxe/UsbUtility.c
index af6628f7a..07fba6cf8 100644
--- a/Drivers/UsbBusDxe/UsbUtility.c
+++ b/Drivers/UsbBusDxe/UsbUtility.c
@@ -815,7 +815,7 @@ GetUsbDPFromFullDP (
if (!UsbDevicePathPtr) {
return NULL;
}
- CopyMem (UsbDevicePathPtr, UsbDevicePathBeginPtr, Size);
+ CopyMem(UsbDevicePathPtr, UsbDevicePathBeginPtr, Size);
//
// Append end device path node
//
diff --git a/Drivers/UsbKbDxe/EfiKey.c b/Drivers/UsbKbDxe/EfiKey.c
index 2b0344eb6..4a3030d45 100644
--- a/Drivers/UsbKbDxe/EfiKey.c
+++ b/Drivers/UsbKbDxe/EfiKey.c
@@ -834,7 +834,7 @@ USBKeyboardReadKeyStroke (
}
}
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS;
}
}
@@ -876,7 +876,7 @@ USBKeyboardWaitForKey (
//
// If there is pending key, signal the event.
//
- CopyMem (
+ CopyMem(
&KeyData,
UsbKeyboardDevice->EfiKeyQueue.Buffer[UsbKeyboardDevice->EfiKeyQueue.Head],
sizeof (EFI_KEY_DATA)
@@ -1294,7 +1294,7 @@ USBKeyboardRegisterKeyNotify (
NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
- CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&UsbKeyboardDevice->NotifyList, &NewNotify->NotifyEntry);
diff --git a/Drivers/UsbKbDxe/KeyBoard.c b/Drivers/UsbKbDxe/KeyBoard.c
index 493abc4a9..b58b82da1 100644
--- a/Drivers/UsbKbDxe/KeyBoard.c
+++ b/Drivers/UsbKbDxe/KeyBoard.c
@@ -630,7 +630,7 @@ SetKeyboardLayoutEvent (
//
// Copy from HII keyboard layout package binary for alignment
//
- CopyMem (&TempKey, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
+ CopyMem(&TempKey, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
//
// Fill the key into KeyConvertionTable, whose index is calculated from USB keycode.
@@ -642,7 +642,7 @@ SetKeyboardLayoutEvent (
FreePool(KeyboardLayout);
return;
}
- CopyMem (TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
+ CopyMem(TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
//
// For non-spacing key, create the list with a non-spacing key followed by physical keys.
@@ -657,7 +657,7 @@ SetKeyboardLayoutEvent (
KeyCount = 0;
NsKey = KeyDescriptor + 1;
for (Index2 = (UINT8) Index + 1; Index2 < KeyboardLayout->DescriptorCount; Index2++) {
- CopyMem (&TempKey, NsKey, sizeof (EFI_KEY_DESCRIPTOR));
+ CopyMem(&TempKey, NsKey, sizeof (EFI_KEY_DESCRIPTOR));
if (TempKey.Modifier == EFI_NS_KEY_DEPENDENCY_MODIFIER) {
KeyCount++;
} else {
@@ -689,7 +689,7 @@ SetKeyboardLayoutEvent (
//
TableEntry = GetKeyDescriptor (UsbKeyboardDevice, 0x58);
KeyDescriptor = GetKeyDescriptor (UsbKeyboardDevice, 0x28);
- CopyMem (TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
+ CopyMem(TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
FreePool(KeyboardLayout);
}
@@ -1819,7 +1819,7 @@ Enqueue (
Queue->Head = (Queue->Head + 1) % (MAX_KEY_ALLOWED + 1);
}
- CopyMem (Queue->Buffer[Queue->Tail], Item, ItemSize);
+ CopyMem(Queue->Buffer[Queue->Tail], Item, ItemSize);
//
// Adjust the tail pointer of the FIFO keyboard buffer.
@@ -1852,7 +1852,7 @@ Dequeue (
return EFI_DEVICE_ERROR;
}
- CopyMem (Item, Queue->Buffer[Queue->Head], ItemSize);
+ CopyMem(Item, Queue->Buffer[Queue->Head], ItemSize);
//
// Adjust the head pointer of the FIFO keyboard buffer.
diff --git a/Drivers/UsbMouseDxe/MouseHid.c b/Drivers/UsbMouseDxe/MouseHid.c
index ec6a420c1..e66de4e67 100644
--- a/Drivers/UsbMouseDxe/MouseHid.c
+++ b/Drivers/UsbMouseDxe/MouseHid.c
@@ -101,7 +101,7 @@ GetNextHidItem (
// 2-byte data
//
if ((EndPos - StartPos) >= 2) {
- CopyMem (&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
+ CopyMem(&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
StartPos += 2;
return StartPos;
}
@@ -112,7 +112,7 @@ GetNextHidItem (
//
HidItem->Size = 4;
if ((EndPos - StartPos) >= 4) {
- CopyMem (&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
+ CopyMem(&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
StartPos += 4;
return StartPos;
}
diff --git a/Drivers/UsbMouseDxe/UsbMouse.c b/Drivers/UsbMouseDxe/UsbMouse.c
index ef2271b90..8322d3931 100644
--- a/Drivers/UsbMouseDxe/UsbMouse.c
+++ b/Drivers/UsbMouseDxe/UsbMouse.c
@@ -926,7 +926,7 @@ GetMouseState (
//
// Retrieve mouse state from USB_MOUSE_DEV, which was filled by OnMouseInterruptComplete()
//
- CopyMem (
+ CopyMem(
MouseState,
&MouseDev->State,
sizeof (EFI_SIMPLE_POINTER_STATE)
diff --git a/Drivers/XhciDxe/Xhci.c b/Drivers/XhciDxe/Xhci.c
index 4d2bc13c0..e3f344921 100644
--- a/Drivers/XhciDxe/Xhci.c
+++ b/Drivers/XhciDxe/Xhci.c
@@ -1051,7 +1051,7 @@ XhcControlTransfer (
//
// Store a copy of device scriptor as hub device need this info to configure endpoint.
//
- CopyMem (&Xhc->UsbDevContext[SlotId].DevDesc, Data, *DataLength);
+ CopyMem(&Xhc->UsbDevContext[SlotId].DevDesc, Data, *DataLength);
if (Xhc->UsbDevContext[SlotId].DevDesc.BcdUSB >= 0x0300) {
//
// If it's a usb3.0 device, then its max packet size is a 2^n.
@@ -1083,7 +1083,7 @@ XhcControlTransfer (
Index = Xhc->UsbDevContext[SlotId].DevDesc.NumConfigurations - 1;
}
Xhc->UsbDevContext[SlotId].ConfDesc[Index] = AllocateZeroPool(*DataLength);
- CopyMem (Xhc->UsbDevContext[SlotId].ConfDesc[Index], Data, *DataLength);
+ CopyMem(Xhc->UsbDevContext[SlotId].ConfDesc[Index], Data, *DataLength);
//
// Default to use AlternateSetting 0 for all interfaces.
//
@@ -1868,7 +1868,7 @@ XhcCreateUsbHc (
Xhc->PciIo = PciIo;
Xhc->DevicePath = DevicePath;
Xhc->OriginalPciAttributes = OriginalPciAttributes;
- CopyMem (&Xhc->Usb2Hc, &gXhciUsb2HcTemplate, sizeof (EFI_USB2_HC_PROTOCOL));
+ CopyMem(&Xhc->Usb2Hc, &gXhciUsb2HcTemplate, sizeof (EFI_USB2_HC_PROTOCOL));
InitializeListHead (&Xhc->AsyncIntTransfers);
diff --git a/Drivers/XhciDxe/XhciSched.c b/Drivers/XhciDxe/XhciSched.c
index 744ef942d..bd8f2fb86 100644
--- a/Drivers/XhciDxe/XhciSched.c
+++ b/Drivers/XhciDxe/XhciSched.c
@@ -43,7 +43,7 @@ XhcCreateCmdTrb (
XhcSyncTrsRing (Xhc, Urb->Ring);
Urb->TrbNum = 1;
Urb->TrbStart = Urb->Ring->RingEnqueue;
- CopyMem (Urb->TrbStart, CmdTrb, sizeof (TRB_TEMPLATE));
+ CopyMem(Urb->TrbStart, CmdTrb, sizeof (TRB_TEMPLATE));
Urb->TrbStart->CycleBit = Urb->Ring->RingPCS & BIT0;
Urb->TrbEnd = Urb->TrbStart;
@@ -1629,7 +1629,7 @@ XhcMonitorAsyncRequests (
continue;
}
- CopyMem (ProcBuf, Urb->Data, Urb->Completed);
+ CopyMem(ProcBuf, Urb->Data, Urb->Completed);
}
//
@@ -3146,7 +3146,7 @@ XhcSetConfigCmd (
InputContext = Xhc->UsbDevContext[SlotId].InputContext;
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
ZeroMem (InputContext, sizeof (INPUT_CONTEXT));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
// ASSERT (ConfigDesc != NULL);
if (!ConfigDesc) {
@@ -3239,7 +3239,7 @@ XhcSetConfigCmd64 (
InputContext = Xhc->UsbDevContext[SlotId].InputContext;
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
ZeroMem (InputContext, sizeof (INPUT_CONTEXT_64));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
// ASSERT (ConfigDesc != NULL);
if (!ConfigDesc) {
@@ -3523,7 +3523,7 @@ XhcSetInterface (
// So the default Drop Context and Add Context flags can be '0' to cover 1).
//
ZeroMem (InputContext, sizeof (INPUT_CONTEXT));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
//ASSERT (ConfigDesc != NULL);
@@ -3725,7 +3725,7 @@ XhcSetInterface64 (
// So the default Drop Context and Add Context flags can be '0' to cover 1).
//
ZeroMem (InputContext, sizeof (INPUT_CONTEXT_64));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
//ASSERT (ConfigDesc != NULL);
diff --git a/FSInject/FSInject.c b/FSInject/FSInject.c
index 5eb37d5e5..2c3b54091 100644
--- a/FSInject/FSInject.c
+++ b/FSInject/FSInject.c
@@ -696,13 +696,13 @@ FSI_FP_Read(
//Print(L"\nGot: %s\n", FSIThis->FName);
String = AsciiStrStr((CHAR8*)Buffer, "Safe Boot");
if (String != NULL) {
- CopyMem (String, "Root ", 26);
+ CopyMem(String, "Root ", 26);
Print(L"\nForced load: %s\n", FSIThis->FName);
//gBS->Stall(5000000);
} else {
String = AsciiStrStr((CHAR8*)Buffer, "Network-Root");
if (String != NULL) {
- CopyMem (String, "Root ", 29);
+ CopyMem(String, "Root ", 29);
Print(L"\nForced load: %s\n", FSIThis->FName);
//gBS->Stall(5000000);
}
diff --git a/FileSystems/ApfsDriverLoader/ApfsDriverLoader.c b/FileSystems/ApfsDriverLoader/ApfsDriverLoader.c
index 2f3582740..8a3132f24 100644
--- a/FileSystems/ApfsDriverLoader/ApfsDriverLoader.c
+++ b/FileSystems/ApfsDriverLoader/ApfsDriverLoader.c
@@ -169,7 +169,7 @@ StartApfsDriver (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem ((VOID *) NewSystemTable, gST, gST->Hdr.HeaderSize);
+ CopyMem((VOID *) NewSystemTable, gST, gST->Hdr.HeaderSize);
NewSystemTable->ConOut = &mNullTextOutputProtocol;
NewSystemTable->Hdr.CRC32 = 0;
@@ -837,7 +837,7 @@ ApfsDriverLoaderStart (
// Extract Container UUID
//
ContainerSuperBlock = (APFS_CSB *)ApfsBlock;
- CopyMem (&ContainerUuid, &ContainerSuperBlock->Uuid, sizeof (EFI_GUID));
+ CopyMem(&ContainerUuid, &ContainerSuperBlock->Uuid, sizeof (EFI_GUID));
EfiBootRecordBlockPtr = ContainerSuperBlock->EfiBootRecordBlock;
//
@@ -999,7 +999,7 @@ ApfsDriverLoaderStart (
Private->ControllerHandle = ControllerHandle;
EfiBootRecordLocationInfo = &Private->EfiBootRecordLocationInfo;
EfiBootRecordLocationInfo->ControllerHandle = ControllerHandle;
- CopyMem (&EfiBootRecordLocationInfo->ContainerUuid, &ContainerUuid, 16);
+ CopyMem(&EfiBootRecordLocationInfo->ContainerUuid, &ContainerUuid, 16);
Status = gBS->InstallMultipleProtocolInterfaces (
&Private->ControllerHandle,
diff --git a/FileSystems/FatPkg/EnhancedFatDxe/DirectoryManage.c b/FileSystems/FatPkg/EnhancedFatDxe/DirectoryManage.c
index 1a94b9f48..0a7500e9f 100644
--- a/FileSystems/FatPkg/EnhancedFatDxe/DirectoryManage.c
+++ b/FileSystems/FatPkg/EnhancedFatDxe/DirectoryManage.c
@@ -111,7 +111,7 @@ Returns:
//
// Write LFN directory entry
//
- SetMem (LfnBuffer, sizeof (CHAR16) * LFN_CHAR_TOTAL * EntryCount, 0xff);
+ SetMem(LfnBuffer, sizeof (CHAR16) * LFN_CHAR_TOTAL * EntryCount, 0xff);
Status = StrCpyS (
LfnBuffer,
sizeof (LfnBuffer) / sizeof (LfnBuffer[0]),
@@ -132,11 +132,11 @@ Returns:
LfnEntry.Ordinal |= FAT_LFN_LAST;
}
- CopyMem (LfnEntry.Name1, LfnBufferPointer, sizeof (CHAR16) * LFN_CHAR1_LEN);
+ CopyMem(LfnEntry.Name1, LfnBufferPointer, sizeof (CHAR16) * LFN_CHAR1_LEN);
LfnBufferPointer += LFN_CHAR1_LEN;
- CopyMem (LfnEntry.Name2, LfnBufferPointer, sizeof (CHAR16) * LFN_CHAR2_LEN);
+ CopyMem(LfnEntry.Name2, LfnBufferPointer, sizeof (CHAR16) * LFN_CHAR2_LEN);
LfnBufferPointer += LFN_CHAR2_LEN;
- CopyMem (LfnEntry.Name3, LfnBufferPointer, sizeof (CHAR16) * LFN_CHAR3_LEN);
+ CopyMem(LfnEntry.Name3, LfnBufferPointer, sizeof (CHAR16) * LFN_CHAR3_LEN);
LfnBufferPointer += LFN_CHAR3_LEN;
EntryPos--;
if (DirEnt->Invalid) {
@@ -264,7 +264,7 @@ Returns:
UINT8 *Entry2;
Entry1 = (UINT8 *) &DirEnt1->Entry;
Entry2 = (UINT8 *) &DirEnt2->Entry;
- CopyMem (
+ CopyMem(
Entry1 + FAT_ENTRY_INFO_OFFSET,
Entry2 + FAT_ENTRY_INFO_OFFSET,
sizeof (FAT_DIRECTORY_ENTRY) - FAT_ENTRY_INFO_OFFSET
@@ -335,11 +335,11 @@ Returns:
break;
}
- CopyMem (LfnBufferPointer, LfnEntry.Name1, sizeof (CHAR16) * LFN_CHAR1_LEN);
+ CopyMem(LfnBufferPointer, LfnEntry.Name1, sizeof (CHAR16) * LFN_CHAR1_LEN);
LfnBufferPointer += LFN_CHAR1_LEN;
- CopyMem (LfnBufferPointer, LfnEntry.Name2, sizeof (CHAR16) * LFN_CHAR2_LEN);
+ CopyMem(LfnBufferPointer, LfnEntry.Name2, sizeof (CHAR16) * LFN_CHAR2_LEN);
LfnBufferPointer += LFN_CHAR2_LEN;
- CopyMem (LfnBufferPointer, LfnEntry.Name3, sizeof (CHAR16) * LFN_CHAR3_LEN);
+ CopyMem(LfnBufferPointer, LfnEntry.Name3, sizeof (CHAR16) * LFN_CHAR3_LEN);
LfnBufferPointer += LFN_CHAR3_LEN;
LfnOrdinal++;
} while ((LfnEntry.Ordinal & FAT_LFN_LAST) == 0);
@@ -475,7 +475,7 @@ Returns:
// Remember the directory's entry position on disk
//
DirEnt->EntryPos = (UINT16) ODir->CurrentEndPos;
- CopyMem (&DirEnt->Entry, &Entry, sizeof (FAT_DIRECTORY_ENTRY));
+ CopyMem(&DirEnt->Entry, &Entry, sizeof (FAT_DIRECTORY_ENTRY));
FatLoadLongNameEntry (OFile, DirEnt);
if (DirEnt->FileString == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -559,12 +559,12 @@ Returns:
}
ZeroMem (&FatLastAccess.Time, sizeof (FatLastAccess.Time));
- CopyMem (&FatLastAccess.Date, &Entry->FileLastAccess, sizeof (FatLastAccess.Date));
+ CopyMem(&FatLastAccess.Date, &Entry->FileLastAccess, sizeof (FatLastAccess.Date));
FatFatTimeToEfiTime (&FatLastAccess, &Info->LastAccessTime);
FatFatTimeToEfiTime (&Entry->FileCreateTime, &Info->CreateTime);
FatFatTimeToEfiTime (&Entry->FileModificationTime, &Info->ModificationTime);
Info->Attribute = Entry->Attributes & EFI_FILE_VALID_ATTR;
- CopyMem ((CHAR8 *) Buffer + Size, DirEnt->FileString, NameSize);
+ CopyMem((CHAR8 *) Buffer + Size, DirEnt->FileString, NameSize);
}
*BufferSize = ResultSize;
@@ -763,7 +763,7 @@ Returns:
DirEnt->EntryCount = 1;
FileString = DirEnt->FileString;
File8Dot3Name = DirEnt->Entry.FileName;
- SetMem (File8Dot3Name, FAT_NAME_LEN, ' ');
+ SetMem(File8Dot3Name, FAT_NAME_LEN, ' ');
if (StrCmp (FileString, L".") == 0) {
//
// "." entry
@@ -997,8 +997,8 @@ Returns:
// We will append this entry to the end of directory
//
FatGetCurrentFatTime (&DirEnt->Entry.FileCreateTime);
- CopyMem (&DirEnt->Entry.FileModificationTime, &DirEnt->Entry.FileCreateTime, sizeof (FAT_DATE_TIME));
- CopyMem (&DirEnt->Entry.FileLastAccess, &DirEnt->Entry.FileCreateTime.Date, sizeof (FAT_DATE));
+ CopyMem(&DirEnt->Entry.FileModificationTime, &DirEnt->Entry.FileCreateTime, sizeof (FAT_DATE_TIME));
+ CopyMem(&DirEnt->Entry.FileLastAccess, &DirEnt->Entry.FileCreateTime.Date, sizeof (FAT_DATE));
NewEndPos = ODir->CurrentEndPos + DirEnt->EntryCount;
if (NewEndPos * sizeof (FAT_DIRECTORY_ENTRY) > OFile->FileSize) {
if (NewEndPos >= (OFile->IsFixedRootDir ? OFile->Volume->RootEntries : FAT_MAX_DIRENTRY_COUNT)) {
@@ -1108,7 +1108,7 @@ Returns:
LabelDirEnt.Entry.Attributes = FAT_ATTRIBUTE_VOLUME_ID;
}
- SetMem (LabelDirEnt.Entry.FileName, FAT_NAME_LEN, ' ');
+ SetMem(LabelDirEnt.Entry.FileName, FAT_NAME_LEN, ' ');
if (FatStrToFat (Name, FAT_NAME_LEN, LabelDirEnt.Entry.FileName)) {
return EFI_UNSUPPORTED;
}
diff --git a/FileSystems/FatPkg/EnhancedFatDxe/DiskCache.c b/FileSystems/FatPkg/EnhancedFatDxe/DiskCache.c
index 5a6a54a5b..d17984f63 100644
--- a/FileSystems/FatPkg/EnhancedFatDxe/DiskCache.c
+++ b/FileSystems/FatPkg/EnhancedFatDxe/DiskCache.c
@@ -83,7 +83,7 @@ Returns:
//
if (IoMode == READ_DISK) {
if (CacheTag->Dirty) {
- CopyMem (
+ CopyMem(
Buffer + ((PageNo - StartPageNo) << PageAlignment),
BaseAddress + (GroupNo << PageAlignment),
PageSize
@@ -289,7 +289,7 @@ Returns:
Source = Buffer;
}
- CopyMem (Destination, Source, Length);
+ CopyMem(Destination, Source, Length);
}
return Status;
diff --git a/FileSystems/FatPkg/EnhancedFatDxe/FileName.c b/FileSystems/FatPkg/EnhancedFatDxe/FileName.c
index 1f8aad26c..c0f3cff7e 100644
--- a/FileSystems/FatPkg/EnhancedFatDxe/FileName.c
+++ b/FileSystems/FatPkg/EnhancedFatDxe/FileName.c
@@ -54,7 +54,7 @@ Returns:
PossibleShortName = TRUE;
SeparateDot = NULL;
- SetMem (File8Dot3Name, FAT_NAME_LEN, ' ');
+ SetMem(File8Dot3Name, FAT_NAME_LEN, ' ');
for (TempName = FileName; *TempName; TempName++) {
if (*TempName == L'.') {
SeparateDot = TempName;
diff --git a/FileSystems/FatPkg/EnhancedFatDxe/Flush.c b/FileSystems/FatPkg/EnhancedFatDxe/Flush.c
index 047a65ede..6565b2480 100644
--- a/FileSystems/FatPkg/EnhancedFatDxe/Flush.c
+++ b/FileSystems/FatPkg/EnhancedFatDxe/Flush.c
@@ -281,7 +281,7 @@ Returns:
// Update the last modification time
//
FatGetCurrentFatTime (&FatNow);
- CopyMem (&DirEnt->Entry.FileLastAccess, &FatNow.Date, sizeof (FAT_DATE));
+ CopyMem(&DirEnt->Entry.FileLastAccess, &FatNow.Date, sizeof (FAT_DATE));
if (!OFile->PreserveLastModification) {
FatGetCurrentFatTime (&DirEnt->Entry.FileModificationTime);
}
diff --git a/FileSystems/FatPkg/EnhancedFatDxe/Info.c b/FileSystems/FatPkg/EnhancedFatDxe/Info.c
index b225a14d7..9972df6a0 100644
--- a/FileSystems/FatPkg/EnhancedFatDxe/Info.c
+++ b/FileSystems/FatPkg/EnhancedFatDxe/Info.c
@@ -133,7 +133,7 @@ Returns:
Volume->FatInfoSector.FreeInfo.ClusterCount,
ClusterAlignment
);
- CopyMem ((CHAR8 *) Buffer + Size, Name, NameSize);
+ CopyMem((CHAR8 *) Buffer + Size, Name, NameSize);
}
*BufferSize = ResultSize;
@@ -183,7 +183,7 @@ Returns:
Status = EFI_BUFFER_TOO_SMALL;
if (*BufferSize >= ResultSize) {
Status = EFI_SUCCESS;
- CopyMem ((CHAR8 *) Buffer + Size, Name, NameSize);
+ CopyMem((CHAR8 *) Buffer + Size, Name, NameSize);
}
*BufferSize = ResultSize;
diff --git a/FileSystems/FatPkg/EnhancedFatDxe/Open.c b/FileSystems/FatPkg/EnhancedFatDxe/Open.c
index 40218de10..abc7e9b5d 100644
--- a/FileSystems/FatPkg/EnhancedFatDxe/Open.c
+++ b/FileSystems/FatPkg/EnhancedFatDxe/Open.c
@@ -58,7 +58,7 @@ Returns:
IFile->Signature = FAT_IFILE_SIGNATURE;
- CopyMem (&(IFile->Handle), &FatFileInterface, sizeof (EFI_FILE_PROTOCOL));
+ CopyMem(&(IFile->Handle), &FatFileInterface, sizeof (EFI_FILE_PROTOCOL));
//
// Report the correct revision number based on the DiskIo2 availability
diff --git a/Include/Protocol/PciIoImp.h b/Include/Protocol/PciIoImp.h
index 1b6f1fb4b..019351071 100644
--- a/Include/Protocol/PciIoImp.h
+++ b/Include/Protocol/PciIoImp.h
@@ -355,7 +355,7 @@ PciIoConfigWrite (
**/
EFI_STATUS
EFIAPI
-PciIoCopyMem (
+PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
diff --git a/LegacyBios/BlockIoDxe/BiosBlkIo.c b/LegacyBios/BlockIoDxe/BiosBlkIo.c
index cdc6f3ee9..ab1c0c2c0 100644
--- a/LegacyBios/BlockIoDxe/BiosBlkIo.c
+++ b/LegacyBios/BlockIoDxe/BiosBlkIo.c
@@ -714,7 +714,7 @@ SetBiosInitBlockIoDevicePath (
VendorNode.DevicePath.Header.Type = HARDWARE_DEVICE_PATH;
VendorNode.DevicePath.Header.SubType = HW_VENDOR_DP;
SetDevicePathNodeLength (&VendorNode.DevicePath.Header, sizeof (VendorNode));
- CopyMem (&VendorNode.DevicePath.Guid, &gBlockIoVendorGuid, sizeof (EFI_GUID));
+ CopyMem(&VendorNode.DevicePath.Guid, &gBlockIoVendorGuid, sizeof (EFI_GUID));
VendorNode.LegacyDriveLetter = Drive->Number;
*DevicePath = AppendDevicePathNode (BaseDevicePath, &VendorNode.DevicePath.Header);
}
@@ -789,7 +789,7 @@ BuildEdd30DevicePath (
// Lun is miss aligned in both EDD and Device Path data structures.
// thus we do a byte copy, to prevent alignment traps on IA-64.
//
- CopyMem (&Node.Scsi.Lun, &Drive->Parameters.DevicePath.Scsi.Lun, sizeof (UINT16));
+ CopyMem(&Node.Scsi.Lun, &Drive->Parameters.DevicePath.Scsi.Lun, sizeof (UINT16));
Node.Scsi.Pun = Drive->Parameters.DevicePath.Scsi.Pun;
} else if (AsciiStrnCmp ("USB", Drive->Parameters.InterfaceType, 3) == 0) {
diff --git a/LegacyBios/BlockIoDxe/BiosInt13.c b/LegacyBios/BlockIoDxe/BiosInt13.c
index 20ca98cf3..66be72d7e 100644
--- a/LegacyBios/BlockIoDxe/BiosInt13.c
+++ b/LegacyBios/BlockIoDxe/BiosInt13.c
@@ -288,13 +288,13 @@ GetDriveParameters (
DBG( "GetDriveParameters: INT 13 48 DL=%02x : CF=%d AH=%02x\n", Drive->Number, CarryFlag, Regs.H.AH);
if (CarryFlag != 0 || Regs.H.AH != 0x00) {
Drive->ErrorCode = Regs.H.AH;
- SetMem (&Drive->Parameters, sizeof (Drive->Parameters), 0xaf);
+ SetMem(&Drive->Parameters, sizeof (Drive->Parameters), 0xaf);
return FALSE;
}
//
// We only have one buffer < 1MB, so copy into our instance data
//
- CopyMem (
+ CopyMem(
&Drive->Parameters,
&mLegacyDriverUnder1Mb->Parameters,
sizeof (Drive->Parameters)
@@ -1288,7 +1288,7 @@ Edd11BiosReadBlocks (
}
TransferByteSize = NumberOfBlocks * BlockSize;
- CopyMem (Buffer, (VOID *) (UINTN) TransferBuffer, TransferByteSize);
+ CopyMem(Buffer, (VOID *) (UINTN) TransferBuffer, TransferByteSize);
BufferSize = BufferSize - TransferByteSize;
Buffer = (VOID *) ((UINT8 *) Buffer + TransferByteSize);
Lba += NumberOfBlocks;
@@ -1428,7 +1428,7 @@ Edd11BiosReadBlocksEx (
}
TransferByteSize = NumberOfBlocks * BlockSize;
- CopyMem (Buffer, (VOID *) (UINTN) TransferBuffer, TransferByteSize);
+ CopyMem(Buffer, (VOID *) (UINTN) TransferBuffer, TransferByteSize);
BufferSize = BufferSize - TransferByteSize;
Buffer = (VOID *) ((UINT8 *) Buffer + TransferByteSize);
Lba += NumberOfBlocks;
@@ -1555,7 +1555,7 @@ Edd11BiosWriteBlocks (
Regs.E.DS = EFI_SEGMENT (AddressPacket);
TransferByteSize = NumberOfBlocks * BlockSize;
- CopyMem ((VOID *) (UINTN) TransferBuffer, Buffer, TransferByteSize);
+ CopyMem((VOID *) (UINTN) TransferBuffer, Buffer, TransferByteSize);
// CarryFlag = BiosBlockIoDev->LegacyBios->Int86 (BiosBlockIoDev->LegacyBios, 0x13, &Regs);
CarryFlag = LegacyBiosInt86 (BiosBlockIoDev, 0x13, &Regs);
@@ -1704,7 +1704,7 @@ Edd11BiosWriteBlocksEx (
Regs.E.DS = EFI_SEGMENT (AddressPacket);
TransferByteSize = NumberOfBlocks * BlockSize;
- CopyMem ((VOID *) (UINTN) TransferBuffer, Buffer, TransferByteSize);
+ CopyMem((VOID *) (UINTN) TransferBuffer, Buffer, TransferByteSize);
// CarryFlag = BiosBlockIoDev->LegacyBios->Int86 (BiosBlockIoDev->LegacyBios, 0x13, &Regs);
CarryFlag = LegacyBiosInt86 (BiosBlockIoDev, 0x13, &Regs);
@@ -1950,7 +1950,7 @@ BiosReadLegacyDrive (
}
TransferByteSize = NumberOfBlocks * BlockSize;
- CopyMem (Buffer, mEdd11Buffer, TransferByteSize);
+ CopyMem(Buffer, mEdd11Buffer, TransferByteSize);
ShortLba = ShortLba + NumberOfBlocks;
BufferSize = BufferSize - TransferByteSize;
@@ -2138,7 +2138,7 @@ BiosReadLegacyDriveEx (
}
TransferByteSize = NumberOfBlocks * BlockSize;
- CopyMem (Buffer, mEdd11Buffer, TransferByteSize);
+ CopyMem(Buffer, mEdd11Buffer, TransferByteSize);
ShortLba = ShortLba + NumberOfBlocks;
BufferSize = BufferSize - TransferByteSize;
@@ -2291,7 +2291,7 @@ BiosWriteLegacyDrive (
Regs.E.ES = EFI_SEGMENT (mEdd11Buffer);
TransferByteSize = NumberOfBlocks * BlockSize;
- CopyMem (mEdd11Buffer, Buffer, TransferByteSize);
+ CopyMem(mEdd11Buffer, Buffer, TransferByteSize);
/* DBG("INT 13h: AX:(03%02x) DX:(%02x%02x) CX:(%02x%02x) BX:(%04x) ES:(%04x)\n",
Regs.H.AL,
@@ -2483,7 +2483,7 @@ BiosWriteLegacyDriveEx (
Regs.E.ES = EFI_SEGMENT (mEdd11Buffer);
TransferByteSize = NumberOfBlocks * BlockSize;
- CopyMem (mEdd11Buffer, Buffer, TransferByteSize);
+ CopyMem(mEdd11Buffer, Buffer, TransferByteSize);
/* DBG("INT 13h: AX:(03%02x) DX:(%02x%02x) CX:(%02x%02x) BX:(%04x) ES:(%04x)\n",
Regs.H.AL,
diff --git a/LegacyBios/BlockIoDxe/LegacyBiosThunk.c b/LegacyBios/BlockIoDxe/LegacyBiosThunk.c
index b82e3ed8d..1d3f55d45 100644
--- a/LegacyBios/BlockIoDxe/LegacyBiosThunk.c
+++ b/LegacyBios/BlockIoDxe/LegacyBiosThunk.c
@@ -106,7 +106,7 @@ InitializeInterruptRedirection (
//
// Copy code to legacy region
//
- CopyMem ((VOID *)(UINTN)LegacyRegionBase, (VOID *)&InterruptRedirectionCode[0], sizeof (InterruptRedirectionCode));
+ CopyMem((VOID *)(UINTN)LegacyRegionBase, (VOID *)&InterruptRedirectionCode[0], sizeof (InterruptRedirectionCode));
//
// Get VectorBase, it should be 0x68
@@ -156,7 +156,7 @@ LegacyBiosInt86 (
BOOLEAN Ret;
UINT16 *Stack16;
- SetMem (&ThunkRegSet, sizeof (ThunkRegSet), 0);
+ SetMem(&ThunkRegSet, sizeof (ThunkRegSet), 0);
ThunkRegSet.E.EFLAGS.Bits.Reserved_0 = 1;
ThunkRegSet.E.EFLAGS.Bits.Reserved_1 = 0;
ThunkRegSet.E.EFLAGS.Bits.Reserved_2 = 0;
@@ -226,7 +226,7 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES;
- CopyMem (&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
+ CopyMem(&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
Ret = (BOOLEAN) (Regs->E.EFLAGS.Bits.CF == 1);
diff --git a/LegacyBios/KeyboardDxe/BiosKeyboard.c b/LegacyBios/KeyboardDxe/BiosKeyboard.c
index 0fb48967b..3ed910f32 100644
--- a/LegacyBios/KeyboardDxe/BiosKeyboard.c
+++ b/LegacyBios/KeyboardDxe/BiosKeyboard.c
@@ -51,7 +51,7 @@ Enqueue (
return EFI_NOT_READY;
}
- CopyMem (&Queue->Buffer[Queue->Rear], KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&Queue->Buffer[Queue->Rear], KeyData, sizeof (EFI_KEY_DATA));
Queue->Rear = (Queue->Rear + 1) % QUEUE_MAX_COUNT;
return EFI_SUCCESS;
@@ -78,7 +78,7 @@ Dequeue (
return EFI_NOT_READY;
}
- CopyMem (KeyData, &Queue->Buffer[Queue->Front], sizeof (EFI_KEY_DATA));
+ CopyMem(KeyData, &Queue->Buffer[Queue->Front], sizeof (EFI_KEY_DATA));
Queue->Front = (Queue->Front + 1) % QUEUE_MAX_COUNT;
return EFI_SUCCESS;
@@ -1403,7 +1403,7 @@ BiosKeyboardReadKeyStroke (
}
}
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS;
}
@@ -2350,7 +2350,7 @@ BiosKeyboardRegisterKeyNotify (
NewNotify->Signature = BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
- CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&BiosKeyboardPrivate->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
diff --git a/LegacyBios/LegacyBios.c b/LegacyBios/LegacyBios.c
index e004356db..22e9725fa 100644
--- a/LegacyBios/LegacyBios.c
+++ b/LegacyBios/LegacyBios.c
@@ -664,7 +664,7 @@ LegacyBiosInstall (
// Initialize interrupt redirection code and entries;
// IDT Vectors 0x68-0x6f must be redirected to IDT Vectors 0x08-0x0f.
//
- CopyMem (
+ CopyMem(
Private->IntThunk->InterruptRedirectionCode,
(VOID *) (UINTN) InterruptRedirectionTemplate,
sizeof (Private->IntThunk->InterruptRedirectionCode)
diff --git a/LegacyBios/Thunk/Thunk.c b/LegacyBios/Thunk/Thunk.c
index 1683afae0..1458c9b08 100644
--- a/LegacyBios/Thunk/Thunk.c
+++ b/LegacyBios/Thunk/Thunk.c
@@ -201,7 +201,7 @@ InternalLegacyBiosFarCall (
ThunkRegSet.E.DS = Regs->X.DS;
ThunkRegSet.E.ES = Regs->X.ES;
- CopyMem (&(ThunkRegSet.E.EFLAGS.UintN), &(Regs->X.Flags), sizeof (Regs->X.Flags));
+ CopyMem(&(ThunkRegSet.E.EFLAGS.UintN), &(Regs->X.Flags), sizeof (Regs->X.Flags));
//
// Clear the error flag; thunk code may set it. Stack16 should be the high address
@@ -268,7 +268,7 @@ InternalLegacyBiosFarCall (
// Copy Stack to low memory stack
//
Stack16 -= StackSize / sizeof (UINT16);
- CopyMem (Stack16, Stack, StackSize);
+ CopyMem(Stack16, Stack, StackSize);
}
ThunkRegSet.E.SS = (UINT16) (((UINTN) Stack16 >> 16) << 12);
@@ -307,7 +307,7 @@ InternalLegacyBiosFarCall (
//
// Copy low memory stack to Stack
//
- CopyMem (Stack, Stack16, StackSize);
+ CopyMem(Stack, Stack16, StackSize);
}
//
@@ -345,7 +345,7 @@ InternalLegacyBiosFarCall (
Regs->X.DS = ThunkRegSet.E.DS;
Regs->X.ES = ThunkRegSet.E.ES;
- CopyMem (&(Regs->X.Flags), &(ThunkRegSet.E.EFLAGS.UintN), sizeof (Regs->X.Flags));
+ CopyMem(&(Regs->X.Flags), &(ThunkRegSet.E.EFLAGS.UintN), sizeof (Regs->X.Flags));
return (BOOLEAN) (Regs->X.Flags.CF == 1);
}
diff --git a/LegacyBios/VideoDxe/BiosVideo.c b/LegacyBios/VideoDxe/BiosVideo.c
index dd72fb0e0..695c62d48 100644
--- a/LegacyBios/VideoDxe/BiosVideo.c
+++ b/LegacyBios/VideoDxe/BiosVideo.c
@@ -1877,7 +1877,7 @@ BiosVideoCheckForVbe (
}
if (ModeNumber > 1) {
- CopyMem (
+ CopyMem(
ModeBuffer,
BiosVideoPrivate->ModeData,
(ModeNumber - 1) * sizeof (BIOS_VIDEO_MODE_DATA)
@@ -2149,7 +2149,7 @@ BiosVideoGraphicsOutputQueryMode (
(*Info)->HorizontalResolution = ModeData->HorizontalResolution;
(*Info)->VerticalResolution = ModeData->VerticalResolution;
(*Info)->PixelFormat = ModeData->PixelFormat;
- CopyMem (&((*Info)->PixelInformation), &(ModeData->PixelBitMask), sizeof(ModeData->PixelBitMask));
+ CopyMem(&((*Info)->PixelInformation), &(ModeData->PixelBitMask), sizeof(ModeData->PixelBitMask));
(*Info)->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
@@ -2347,7 +2347,7 @@ BiosVideoGraphicsOutputSetMode (
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
This->Mode->Info->PixelFormat = ModeData->PixelFormat;
- CopyMem (&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask), sizeof (ModeData->PixelBitMask));
+ CopyMem(&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask), sizeof (ModeData->PixelBitMask));
This->Mode->Info->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
@@ -2629,7 +2629,7 @@ BiosVideoVbeBltWorker (
VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth);
VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth);
- CopyMem (
+ CopyMem(
VbeBuffer,
VbeBuffer1,
TotalBytes
@@ -2665,7 +2665,7 @@ BiosVideoVbeBltWorker (
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
for (Index = 0; Index < Width; Index++) {
- /* gBS->CopyMem (
+ /* gBS->CopyMem(
VbeBuffer,
&Pixel,
VbePixelWidth
@@ -2676,7 +2676,7 @@ BiosVideoVbeBltWorker (
VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth);
for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) {
- CopyMem (
+ CopyMem(
(VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth),
VbeBuffer,
TotalBytes
@@ -2711,7 +2711,7 @@ BiosVideoVbeBltWorker (
Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) |
((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) |
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
- /* gBS->CopyMem (
+ /* gBS->CopyMem(
VbeBuffer,
&Pixel,
VbePixelWidth
@@ -3167,7 +3167,7 @@ BiosVideoGraphicsOutputVgaBlt (
DestinationAddress = (UINT8 *) (MemAddress + (DestinationY << 6) + (DestinationY << 4) + (DestinationX >> 3));
Bytes = Width >> 3;
for (Index = 0, Offset = 0; Index < Height; Index++, Offset += BytesPerScanLine) {
- PciIo->CopyMem (
+ PciIo->CopyMem(
PciIo,
EfiPciIoWidthUint8,
EFI_PCI_IO_PASS_THROUGH_BAR,
diff --git a/LegacyBios/VideoDxe/BiosVideo2.c b/LegacyBios/VideoDxe/BiosVideo2.c
index b845019d8..14ad54c20 100644
--- a/LegacyBios/VideoDxe/BiosVideo2.c
+++ b/LegacyBios/VideoDxe/BiosVideo2.c
@@ -1882,7 +1882,7 @@ BiosVideoCheckForVbe (
}
if (ModeNumber > 1) {
- CopyMem (
+ CopyMem(
ModeBuffer,
BiosVideoPrivate->ModeData,
(ModeNumber - 1) * sizeof (BIOS_VIDEO_MODE_DATA)
@@ -2154,7 +2154,7 @@ BiosVideoGraphicsOutputQueryMode (
(*Info)->HorizontalResolution = ModeData->HorizontalResolution;
(*Info)->VerticalResolution = ModeData->VerticalResolution;
(*Info)->PixelFormat = ModeData->PixelFormat;
- CopyMem (&((*Info)->PixelInformation), &(ModeData->PixelBitMask), sizeof(ModeData->PixelBitMask));
+ CopyMem(&((*Info)->PixelInformation), &(ModeData->PixelBitMask), sizeof(ModeData->PixelBitMask));
(*Info)->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
@@ -2352,7 +2352,7 @@ BiosVideoGraphicsOutputSetMode (
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
This->Mode->Info->PixelFormat = ModeData->PixelFormat;
- CopyMem (&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask), sizeof (ModeData->PixelBitMask));
+ CopyMem(&(This->Mode->Info->PixelInformation), &(ModeData->PixelBitMask), sizeof (ModeData->PixelBitMask));
This->Mode->Info->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
@@ -2634,7 +2634,7 @@ BiosVideoVbeBltWorker (
VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth);
VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth);
- CopyMem (
+ CopyMem(
VbeBuffer,
VbeBuffer1,
TotalBytes
@@ -2670,7 +2670,7 @@ BiosVideoVbeBltWorker (
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
for (Index = 0; Index < Width; Index++) {
- /* gBS->CopyMem (
+ /* gBS->CopyMem(
VbeBuffer,
&Pixel,
VbePixelWidth
@@ -2681,7 +2681,7 @@ BiosVideoVbeBltWorker (
VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth);
for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) {
- CopyMem (
+ CopyMem(
(VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth),
VbeBuffer,
TotalBytes
@@ -2716,7 +2716,7 @@ BiosVideoVbeBltWorker (
Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) |
((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) |
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
- /* gBS->CopyMem (
+ /* gBS->CopyMem(
VbeBuffer,
&Pixel,
VbePixelWidth
@@ -3172,7 +3172,7 @@ BiosVideoGraphicsOutputVgaBlt (
DestinationAddress = (UINT8 *) (MemAddress + (DestinationY << 6) + (DestinationY << 4) + (DestinationX >> 3));
Bytes = Width >> 3;
for (Index = 0, Offset = 0; Index < Height; Index++, Offset += BytesPerScanLine) {
- PciIo->CopyMem (
+ PciIo->CopyMem(
PciIo,
EfiPciIoWidthUint8,
EFI_PCI_IO_PASS_THROUGH_BAR,
diff --git a/Library/DeviceTreeLib/DeviceTreeLib.c b/Library/DeviceTreeLib/DeviceTreeLib.c
index 9ab961773..8d7350359 100755
--- a/Library/DeviceTreeLib/DeviceTreeLib.c
+++ b/Library/DeviceTreeLib/DeviceTreeLib.c
@@ -610,7 +610,7 @@ DTDeleteProperty (
//
// Delete Property.
//
- CopyMem (DeletePosition, DeletePosition + DeleteLength, DeviceTreeEnd - DeletePosition);
+ CopyMem(DeletePosition, DeletePosition + DeleteLength, DeviceTreeEnd - DeletePosition);
ZeroMem (DeviceTreeEnd - DeleteLength, DeleteLength);
//
@@ -681,13 +681,13 @@ DTInsertProperty (
//
// Make space.
//
- CopyMem (InsertPosition + sizeof (DTProperty) + EntryLength, InsertPosition, DeviceTreeEnd - InsertPosition);
+ CopyMem(InsertPosition + sizeof (DTProperty) + EntryLength, InsertPosition, DeviceTreeEnd - InsertPosition);
ZeroMem (InsertPosition, sizeof (DTProperty) + EntryLength);
//
// Insert Property Name.
//
- CopyMem (Property->Name, AddPropertyName, AsciiStrLen(AddPropertyName));
+ CopyMem(Property->Name, AddPropertyName, AsciiStrLen(AddPropertyName));
//
// Insert Property Value Length.
@@ -697,7 +697,7 @@ DTInsertProperty (
//
// Insert Property Value.
//
- CopyMem (InsertPosition + sizeof (DTProperty), AddPropertyValue, ValueLength);
+ CopyMem(InsertPosition + sizeof (DTProperty), AddPropertyValue, ValueLength);
//
// Increment Nodes Properties Count.
diff --git a/Library/GenericBdsLib/BdsBoot.c b/Library/GenericBdsLib/BdsBoot.c
index 69de094dc..0ae75d923 100644
--- a/Library/GenericBdsLib/BdsBoot.c
+++ b/Library/GenericBdsLib/BdsBoot.c
@@ -111,7 +111,7 @@ BdsDeleteBootOption (
//
for (Index = 0; Index < *BootOrderSize / sizeof (UINT16); Index++) {
if (BootOrder[Index] == OptionNumber) {
- CopyMem (&BootOrder[Index], &BootOrder[Index+1], *BootOrderSize - (Index+1) * sizeof (UINT16));
+ CopyMem(&BootOrder[Index], &BootOrder[Index+1], *BootOrderSize - (Index+1) * sizeof (UINT16));
*BootOrderSize -= sizeof (UINT16);
break;
}
@@ -356,8 +356,8 @@ BdsCreateLegacyBootOption (
if (NewBbsDevPathNode == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (NewBbsDevPathNode, CurrentBbsDevPath, sizeof (BBS_BBS_DEVICE_PATH));
- CopyMem (NewBbsDevPathNode->String, HelpString, StringLen + 1);
+ CopyMem(NewBbsDevPathNode, CurrentBbsDevPath, sizeof (BBS_BBS_DEVICE_PATH));
+ CopyMem(NewBbsDevPathNode->String, HelpString, StringLen + 1);
SetDevicePathNodeLength (&(NewBbsDevPathNode->Header), sizeof (BBS_BBS_DEVICE_PATH) + StringLen);
//
@@ -396,21 +396,21 @@ BdsCreateLegacyBootOption (
*((UINT16 *) Ptr) = CurrentBbsDevPathSize;
Ptr += sizeof (UINT16);
- CopyMem (
+ CopyMem(
Ptr,
BootDesc,
StrSize (BootDesc)
);
Ptr += StrSize (BootDesc);
- CopyMem (
+ CopyMem(
Ptr,
CurrentBbsDevPath,
CurrentBbsDevPathSize
);
Ptr += CurrentBbsDevPathSize;
- CopyMem (
+ CopyMem(
Ptr,
CurrentBbsEntry,
sizeof (BBS_TABLE)
@@ -439,7 +439,7 @@ BdsCreateLegacyBootOption (
}
if (*BootOrderList != NULL) {
- CopyMem (NewBootOrderList, *BootOrderList, *BootOrderListSize);
+ CopyMem(NewBootOrderList, *BootOrderList, *BootOrderListSize);
FreePool(*BootOrderList);
}
@@ -770,7 +770,7 @@ BdsCreateOneLegacyBootOption (
BbsDevPathNode.Header.SubType = BBS_BBS_DP;
SetDevicePathNodeLength (&BbsDevPathNode.Header, sizeof (BBS_BBS_DEVICE_PATH));
BbsDevPathNode.DeviceType = BbsItem->DeviceType;
- CopyMem (&BbsDevPathNode.StatusFlag, &BbsItem->StatusFlags, sizeof (UINT16));
+ CopyMem(&BbsDevPathNode.StatusFlag, &BbsItem->StatusFlags, sizeof (UINT16));
DevPath = AppendDevicePathNode (
NULL,
@@ -1368,7 +1368,7 @@ BdsUpdateLegacyDevOrder (
break;
}
}
- CopyMem (&NewDevPtr[Index2 + 1], &NewDevPtr[Index2], (*Idx - Index2) * sizeof (UINT16));
+ CopyMem(&NewDevPtr[Index2 + 1], &NewDevPtr[Index2], (*Idx - Index2) * sizeof (UINT16));
NewDevPtr[Index2] = (UINT16) (Index & 0xFF);
(*Idx)++;
}
@@ -2361,7 +2361,7 @@ BdsLibBootViaBootOption (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (Option->DevicePath, DevicePath, GetDevicePathSize (DevicePath));
+ CopyMem(Option->DevicePath, DevicePath, GetDevicePathSize (DevicePath));
//
// Update the shell boot option
//
diff --git a/Library/GenericBdsLib/BdsMisc.c b/Library/GenericBdsLib/BdsMisc.c
index 730d575ae..d5c995331 100644
--- a/Library/GenericBdsLib/BdsMisc.c
+++ b/Library/GenericBdsLib/BdsMisc.c
@@ -316,9 +316,9 @@ BdsLibRegisterNewOption (
TempPtr += sizeof (UINT32);
*(UINT16 *) TempPtr = (UINT16) GetDevicePathSize (DevicePath);
TempPtr += sizeof (UINT16);
- CopyMem (TempPtr, String, StrSize (String));
+ CopyMem(TempPtr, String, StrSize (String));
TempPtr += StrSize (String);
- CopyMem (TempPtr, DevicePath, GetDevicePathSize (DevicePath));
+ CopyMem(TempPtr, DevicePath, GetDevicePathSize (DevicePath));
if (UpdateDescription) {
//
@@ -401,7 +401,7 @@ BdsLibRegisterNewOption (
if (!OptionOrderPtr) {
return EFI_NOT_FOUND;
}
- CopyMem (OptionOrderPtr, TempOptionPtr, (OrderItemNum - 1) * sizeof (UINT16));
+ CopyMem(OptionOrderPtr, TempOptionPtr, (OrderItemNum - 1) * sizeof (UINT16));
OptionOrderPtr[Index] = RegisterOptionNumber;
@@ -706,7 +706,7 @@ BdsLibVariableToOption (
FreePool(Option);
return NULL;
}
-// CopyMem (Option->DevicePath, DevicePath, GetDevicePathSize (DevicePath));
+// CopyMem(Option->DevicePath, DevicePath, GetDevicePathSize (DevicePath));
Option->Attribute = Attribute;
Option->Description = AllocateCopyPool(StrSize (Description), Description);
@@ -715,7 +715,7 @@ BdsLibVariableToOption (
FreePool(Option);
return NULL;
}
-// CopyMem (Option->Description, Description, StrSize (Description));
+// CopyMem(Option->Description, Description, StrSize (Description));
Option->LoadOptions = AllocateCopyPool(LoadOptionsSize, LoadOptions);
// ASSERT(Option->LoadOptions != NULL);
@@ -723,7 +723,7 @@ BdsLibVariableToOption (
FreePool(Option);
return NULL;
}
-// CopyMem (Option->LoadOptions, LoadOptions, LoadOptionsSize);
+// CopyMem(Option->LoadOptions, LoadOptions, LoadOptionsSize);
Option->LoadOptionsSize = LoadOptionsSize;
//
@@ -1596,9 +1596,9 @@ SetVariableAndReportStatusCodeOnError (
SetVariableStatus->DataSize = DataSize;
SetVariableStatus->SetStatus = Status;
SetVariableStatus->Attributes = Attributes;
- CopyMem (SetVariableStatus + 1, VariableName, NameSize);
+ CopyMem(SetVariableStatus + 1, VariableName, NameSize);
if ((Data != NULL) && (DataSize != 0)) {
- CopyMem (((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
+ CopyMem(((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
}
REPORT_STATUS_CODE_EX (
diff --git a/Library/GenericBdsLib/Performance.c b/Library/GenericBdsLib/Performance.c
index e8da7816c..3c8b2b027 100644
--- a/Library/GenericBdsLib/Performance.c
+++ b/Library/GenericBdsLib/Performance.c
@@ -330,7 +330,7 @@ WriteBootToOsPerformanceData (
AsciiStrCpyS (mPerfData.Token, PERF_TOKEN_LENGTH+1, GaugeString);
mPerfData.Duration = Duration;
- CopyMem (Ptr, &mPerfData, sizeof (PERF_DATA));
+ CopyMem(Ptr, &mPerfData, sizeof (PERF_DATA));
Ptr += sizeof (PERF_DATA);
mPerfHeader.Count++;
@@ -367,7 +367,7 @@ WriteBootToOsPerformanceData (
mPerfData.Duration = (UINT32) DivU64x32 (Ticker, (UINT32) Freq);
- CopyMem (Ptr, &mPerfData, sizeof (PERF_DATA));
+ CopyMem(Ptr, &mPerfData, sizeof (PERF_DATA));
Ptr += sizeof (PERF_DATA);
mPerfHeader.Count++;
@@ -388,7 +388,7 @@ Done:
//
// Put performance data to Reserved memory
//
- CopyMem (
+ CopyMem(
(UINTN *) (UINTN) mAcpiLowMemoryBase,
&mPerfHeader,
sizeof (PERF_HEADER)
diff --git a/Library/IntrinsicLib/CopyMem.c b/Library/IntrinsicLib/CopyMem.c
index 6cc52b22e..ef6c8eb55 100644
--- a/Library/IntrinsicLib/CopyMem.c
+++ b/Library/IntrinsicLib/CopyMem.c
@@ -19,5 +19,5 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/* Copies bytes between buffers */
void * memcpy (void *dest, const void *src, unsigned int count)
{
- return CopyMem (dest, src, (UINTN)count);
+ return CopyMem(dest, src, (UINTN)count);
}
diff --git a/Library/MachoLib/CxxSymbols.c b/Library/MachoLib/CxxSymbols.c
index f9cc5963a..f180376ac 100644
--- a/Library/MachoLib/CxxSymbols.c
+++ b/Library/MachoLib/CxxSymbols.c
@@ -179,7 +179,7 @@ MachoGetClassNameFromSuperMetaClassPointer (
return FALSE;
}
- CopyMem (ClassName, &SmcpName[PrefixSize], OutputSize);
+ CopyMem(ClassName, &SmcpName[PrefixSize], OutputSize);
ClassName[OutputSize] = '\0';
return TRUE;
@@ -237,14 +237,14 @@ MachoGetFunctionPrefixFromClassName (
}
Index = 0;
- CopyMem (
+ CopyMem(
&FunctionPrefix[Index],
OSOBJ_PREFIX,
L_STR_LEN (OSOBJ_PREFIX)
);
Index += L_STR_LEN (OSOBJ_PREFIX);
- CopyMem (
+ CopyMem(
&FunctionPrefix[Index],
ClassName,
BodySize
@@ -293,7 +293,7 @@ MachoGetClassNameFromMetaClassPointer (
return FALSE;
}
- CopyMem (ClassName, &MetaClassName[PrefixSize], ClassNameLength);
+ CopyMem(ClassName, &MetaClassName[PrefixSize], ClassNameLength);
ClassName[ClassNameLength] = '\0';
return TRUE;
@@ -337,14 +337,14 @@ MachoGetVtableNameFromClassName (
}
Index = 0;
- CopyMem (
+ CopyMem(
&VtableName[Index],
VTABLE_PREFIX,
L_STR_LEN (VTABLE_PREFIX)
);
Index += L_STR_LEN (VTABLE_PREFIX);
- CopyMem (&VtableName[Index], ClassName, BodySize);
+ CopyMem(&VtableName[Index], ClassName, BodySize);
return TRUE;
}
@@ -388,17 +388,17 @@ MachoGetMetaVtableNameFromClassName (
}
Index = 0;
- CopyMem (
+ CopyMem(
&VtableName[Index],
METACLASS_VTABLE_PREFIX,
L_STR_LEN (METACLASS_VTABLE_PREFIX)
);
Index += L_STR_LEN (METACLASS_VTABLE_PREFIX);
- CopyMem (&VtableName[Index], ClassName, BodyLength);
+ CopyMem(&VtableName[Index], ClassName, BodyLength);
Index += BodyLength;
- CopyMem (
+ CopyMem(
&VtableName[Index],
METACLASS_VTABLE_SUFFIX,
L_STR_SIZE (METACLASS_VTABLE_SUFFIX)
@@ -446,21 +446,21 @@ MachoGetFinalSymbolNameFromClassName (
}
Index = 0;
- CopyMem (
+ CopyMem(
&FinalSymbolName[Index],
OSOBJ_PREFIX,
L_STR_LEN (OSOBJ_PREFIX)
);
Index += L_STR_LEN (OSOBJ_PREFIX);
- CopyMem (
+ CopyMem(
&FinalSymbolName[Index],
ClassName,
BodyLength
);
Index += BodyLength;
- CopyMem (
+ CopyMem(
&FinalSymbolName[Index],
FINAL_CLASS_TOKEN,
L_STR_SIZE (FINAL_CLASS_TOKEN)
diff --git a/Library/MachoLib/Header.c b/Library/MachoLib/Header.c
index a320de952..232e1cbdc 100644
--- a/Library/MachoLib/Header.c
+++ b/Library/MachoLib/Header.c
@@ -1189,7 +1189,7 @@ InternalStripLoadCommands64 (
// If the current Load Command is not the last one, relocate the
// subsequent ones.
//
- CopyMem (
+ CopyMem(
LoadCommand,
NEXT_MACH_LOAD_COMMAND (LoadCommand),
SizeOfLeftCommands
@@ -1245,7 +1245,7 @@ MachoExpandImage64 (
if (HeaderSize > DestinationSize) {
return 0;
}
- CopyMem (Destination, Header, HeaderSize);
+ CopyMem(Destination, Header, HeaderSize);
CurrentDelta = 0;
FirstSegment = NULL;
@@ -1298,7 +1298,7 @@ MachoExpandImage64 (
// Copy and zero fill file data. We can do this because only last sections can have 0 file size.
//
ZeroMem (&Destination[CopyFileOffset + OriginalDelta], CurrentDelta - OriginalDelta);
- CopyMem (&Destination[CopyFileOffset + CurrentDelta], &Source[CopyFileOffset], CopyFileSize);
+ CopyMem(&Destination[CopyFileOffset + CurrentDelta], &Source[CopyFileOffset], CopyFileSize);
ZeroMem (&Destination[CopyFileOffset + CurrentDelta + CopyFileSize], CopyVmSize - CopyFileSize);
//
// Refresh destination segment size and offsets.
diff --git a/Library/OsxBdsPlatformLib/BdsPlatform.c b/Library/OsxBdsPlatformLib/BdsPlatform.c
index 4f4a412df..121e3ccdb 100644
--- a/Library/OsxBdsPlatformLib/BdsPlatform.c
+++ b/Library/OsxBdsPlatformLib/BdsPlatform.c
@@ -1582,7 +1582,7 @@ Returns:
return EFI_OUT_OF_RESOURCES;
}
AcpiTableNew = (VOID *)(UINTN)BufferPtr;
- CopyMem (AcpiTableNew, AcpiTableOri, TableLen);
+ CopyMem(AcpiTableNew, AcpiTableOri, TableLen);
} else {
AcpiTableNew = AcpiTableOri;
}
@@ -1661,7 +1661,7 @@ Returns:
}
SmbiosTableNew = (SMBIOS_TABLE_ENTRY_POINT *)(UINTN)BufferPtr;
- CopyMem (
+ CopyMem(
SmbiosTableNew,
SmbiosTableOri,
SmbiosEntryLen
@@ -1670,7 +1670,7 @@ Returns:
// Get Smbios Structure table address, and make sure the start address is 32-bit align
//
BufferPtr += SmbiosEntryLen + SYS_TABLE_PAD(SmbiosEntryLen);
- CopyMem (
+ CopyMem(
(VOID *)(UINTN)BufferPtr,
(VOID *)(UINTN)(SmbiosTableOri->TableAddress),
SmbiosTableOri->TableLength
@@ -1760,7 +1760,7 @@ Returns:
return EFI_OUT_OF_RESOURCES;
}
MpsFloatingPointerNew = (EFI_LEGACY_MP_TABLE_FLOATING_POINTER *)(UINTN)BufferPtr;
- CopyMem (MpsFloatingPointerNew, MpsFloatingPointerOri, FPLength);
+ CopyMem(MpsFloatingPointerNew, MpsFloatingPointerOri, FPLength);
//
// If Mp Table exists
//
@@ -1770,14 +1770,14 @@ Returns:
//
BufferPtr = BufferPtr + FPLength + SYS_TABLE_PAD (FPLength);
MpsTableNew = (EFI_LEGACY_MP_TABLE_HEADER *)(UINTN)BufferPtr;
- CopyMem (MpsTableNew, MpsTableOri, MpsTableOri->BaseTableLength + MpsTableOri->ExtendedTableLength);
+ CopyMem(MpsTableNew, MpsTableOri, MpsTableOri->BaseTableLength + MpsTableOri->ExtendedTableLength);
if ((MpsTableOri->OemTableSize != 0x0000) && (MpsTableOri->OemTablePointer != 0x0000)){
BufferPtr += MpsTableOri->BaseTableLength + MpsTableOri->ExtendedTableLength;
BufferPtr += SYS_TABLE_PAD (BufferPtr);
OemTableNew = (VOID *)(UINTN)BufferPtr;
OemTableOri = (VOID *)(UINTN)MpsTableOri->OemTablePointer;
- CopyMem (OemTableNew, OemTableOri, MpsTableOri->OemTableSize);
+ CopyMem(OemTableNew, OemTableOri, MpsTableOri->OemTableSize);
MpsTableNew->OemTablePointer = (UINT32)(UINTN)OemTableNew;
}
MpsTableNew->Checksum = 0;
diff --git a/Library/VBoxPeCoffLib/BasePeCoff.c b/Library/VBoxPeCoffLib/BasePeCoff.c
index aff9909cc..e51dd91fb 100644
--- a/Library/VBoxPeCoffLib/BasePeCoff.c
+++ b/Library/VBoxPeCoffLib/BasePeCoff.c
@@ -911,7 +911,7 @@ PeCoffLoaderLoadImage (
// can from the original image, and then use that to make sure everything
// is legit.
//
- CopyMem (&CheckContext, ImageContext, sizeof (PE_COFF_LOADER_IMAGE_CONTEXT));
+ CopyMem(&CheckContext, ImageContext, sizeof (PE_COFF_LOADER_IMAGE_CONTEXT));
Status = PeCoffLoaderGetImageInfo (&CheckContext);
if (RETURN_ERROR (Status)) {
@@ -1599,7 +1599,7 @@ PeCoffLoaderImageReadFromMemory (
return RETURN_INVALID_PARAMETER;
}
- CopyMem (Buffer, ((UINT8 *)FileHandle) + FileOffset, *ReadSize);
+ CopyMem(Buffer, ((UINT8 *)FileHandle) + FileOffset, *ReadSize);
return RETURN_SUCCESS;
}
diff --git a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
index 15f4a2a59..c9d67406a 100644
--- a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
+++ b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c
@@ -1181,7 +1181,7 @@ GetSmramProfileData (
RecordingState = MEMORY_PROFILE_RECORDING_DISABLE;
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *) &CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof (gEdkiiMemoryProfileGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof (gEdkiiMemoryProfileGuid));
CommHeader->MessageLength = sizeof (SMRAM_PROFILE_PARAMETER_RECORDING_STATE);
CommRecordingState = (SMRAM_PROFILE_PARAMETER_RECORDING_STATE *) &CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
@@ -1204,7 +1204,7 @@ GetSmramProfileData (
RecordingState = CommRecordingState->RecordingState;
if (RecordingState == MEMORY_PROFILE_RECORDING_ENABLE) {
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *) &CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof (gEdkiiMemoryProfileGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof (gEdkiiMemoryProfileGuid));
CommHeader->MessageLength = sizeof (SMRAM_PROFILE_PARAMETER_RECORDING_STATE);
CommRecordingState = (SMRAM_PROFILE_PARAMETER_RECORDING_STATE *) &CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
@@ -1221,7 +1221,7 @@ GetSmramProfileData (
// Get Size
//
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *) &CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof (gEdkiiMemoryProfileGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof (gEdkiiMemoryProfileGuid));
CommHeader->MessageLength = sizeof (SMRAM_PROFILE_PARAMETER_GET_PROFILE_INFO);
CommGetProfileInfo = (SMRAM_PROFILE_PARAMETER_GET_PROFILE_INFO *) &CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
@@ -1253,7 +1253,7 @@ GetSmramProfileData (
}
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *) &CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof(gEdkiiMemoryProfileGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof(gEdkiiMemoryProfileGuid));
CommHeader->MessageLength = sizeof (SMRAM_PROFILE_PARAMETER_GET_PROFILE_DATA_BY_OFFSET);
CommGetProfileData = (SMRAM_PROFILE_PARAMETER_GET_PROFILE_DATA_BY_OFFSET *) &CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
@@ -1282,7 +1282,7 @@ GetSmramProfileData (
Print (L"GetProfileData - 0x%x\n", CommGetProfileData->Header.ReturnStatus);
goto Done;
}
- CopyMem ((UINT8 *) ProfileBuffer + Offset, (VOID *) (UINTN) CommGetProfileData->ProfileBuffer, (UINTN) CommGetProfileData->ProfileSize);
+ CopyMem((UINT8 *) ProfileBuffer + Offset, (VOID *) (UINTN) CommGetProfileData->ProfileBuffer, (UINTN) CommGetProfileData->ProfileSize);
}
@@ -1311,7 +1311,7 @@ Done:
//
if (RecordingState == MEMORY_PROFILE_RECORDING_ENABLE) {
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *) &CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof (gEdkiiMemoryProfileGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEdkiiMemoryProfileGuid, sizeof (gEdkiiMemoryProfileGuid));
CommHeader->MessageLength = sizeof (SMRAM_PROFILE_PARAMETER_RECORDING_STATE);
CommRecordingState = (SMRAM_PROFILE_PARAMETER_RECORDING_STATE *) &CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
diff --git a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
index a2a03f8b8..6914eb3d0 100644
--- a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
+++ b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
@@ -85,7 +85,7 @@ GetNextLanguage (
Index++;
}
- CopyMem (Lang, StringPtr, Index);
+ CopyMem(Lang, StringPtr, Index);
Lang[Index] = 0;
if (StringPtr[Index] == ';') {
@@ -538,7 +538,7 @@ RequiredDriver (
*PromptId = ((EFI_IFR_FORM_SET *)Ptr)->FormSetTitle;
*HelpId = ((EFI_IFR_FORM_SET *)Ptr)->Help;
- CopyMem (FormsetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid, sizeof (EFI_GUID));
+ CopyMem(FormsetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid, sizeof (EFI_GUID));
RetVal = TRUE;
}
}
diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c
index 62cecfa44..045a8a1cc 100644
--- a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c
+++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c
@@ -477,7 +477,7 @@ AhciBuildCommand (
CommandFis->AhciCFisPmNum = PortMultiplier;
- CopyMem (&AhciRegisters->AhciCmdTable->CommandFis, CommandFis, sizeof (EFI_AHCI_COMMAND_FIS));
+ CopyMem(&AhciRegisters->AhciCmdTable->CommandFis, CommandFis, sizeof (EFI_AHCI_COMMAND_FIS));
Offset = AHCI_PORT_START + Port * AHCI_PORT_REG_WIDTH + AHCI_PORT_CMD;
AhciAndReg (AhciBar, Offset, (UINT32)~(AHCI_PORT_CMD_DLAE | AHCI_PORT_CMD_ATAPI));
@@ -507,7 +507,7 @@ AhciBuildCommand (
AhciRegisters->AhciCmdTable->PrdtTable[PrdtNumber - 1].AhciPrdtIoc = 1;
}
- CopyMem (
+ CopyMem(
(VOID *) ((UINTN) AhciRegisters->AhciCmdList + (UINTN) CommandSlotNumber * sizeof (EFI_AHCI_COMMAND_LIST)),
CommandList,
sizeof (EFI_AHCI_COMMAND_LIST)
@@ -2108,7 +2108,7 @@ TrustTransferAtaDevice (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (NewBuffer, Buffer, TransferLength);
+ CopyMem(NewBuffer, Buffer, TransferLength);
Buffer = NewBuffer;
}
Packet.OutDataBuffer = Buffer;
diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c
index 009df4985..1ce46e68e 100644
--- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c
+++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c
@@ -269,7 +269,7 @@ AtaAhciPeimEntry (
Private->AtaPassThruPpi.GetNextPort = AhciAtaPassThruGetNextPort;
Private->AtaPassThruPpi.GetNextDevice = AhciAtaPassThruGetNextDevice;
Private->AtaPassThruPpi.GetDevicePath = AhciAtaPassThruGetDevicePath;
- CopyMem (
+ CopyMem(
&Private->AtaPassThruPpiList,
&mAhciAtaPassThruPpiListTemplate,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -280,7 +280,7 @@ AtaAhciPeimEntry (
Private->BlkIoPpi.GetNumberOfBlockDevices = AhciBlockIoGetDeviceNo;
Private->BlkIoPpi.GetBlockDeviceMediaInfo = AhciBlockIoGetMediaInfo;
Private->BlkIoPpi.ReadBlocks = AhciBlockIoReadBlocks;
- CopyMem (
+ CopyMem(
&Private->BlkIoPpiList,
&mAhciBlkIoPpiListTemplate,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -292,7 +292,7 @@ AtaAhciPeimEntry (
Private->BlkIo2Ppi.GetNumberOfBlockDevices = AhciBlockIoGetDeviceNo2;
Private->BlkIo2Ppi.GetBlockDeviceMediaInfo = AhciBlockIoGetMediaInfo2;
Private->BlkIo2Ppi.ReadBlocks = AhciBlockIoReadBlocks2;
- CopyMem (
+ CopyMem(
&Private->BlkIo2PpiList,
&mAhciBlkIo2PpiListTemplate,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -311,7 +311,7 @@ AtaAhciPeimEntry (
Private->StorageSecurityPpi.GetDevicePath = AhciStorageSecurityGetDevicePath;
Private->StorageSecurityPpi.ReceiveData = AhciStorageSecurityReceiveData;
Private->StorageSecurityPpi.SendData = AhciStorageSecuritySendData;
- CopyMem (
+ CopyMem(
&Private->StorageSecurityPpiList,
&mAhciStorageSecurityPpiListTemplate,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -320,7 +320,7 @@ AtaAhciPeimEntry (
PeiServicesInstallPpi (&Private->StorageSecurityPpiList);
}
- CopyMem (
+ CopyMem(
&Private->EndOfPeiNotifyList,
&mAhciEndOfPeiNotifyListTemplate,
sizeof (EFI_PEI_NOTIFY_DESCRIPTOR)
diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c
index eea829b18..60efd8a40 100644
--- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c
+++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c
@@ -444,7 +444,7 @@ AhciBlockIoGetMediaInfo2 (
return EFI_NOT_FOUND;
}
- CopyMem (
+ CopyMem(
MediaInfo,
&DeviceData->Media,
sizeof (EFI_PEI_BLOCK_IO2_MEDIA)
diff --git a/MdeModulePkg/Bus/Ata/AhciPei/DevicePath.c b/MdeModulePkg/Bus/Ata/AhciPei/DevicePath.c
index 65d6fcb32..bf6f850bc 100644
--- a/MdeModulePkg/Bus/Ata/AhciPei/DevicePath.c
+++ b/MdeModulePkg/Bus/Ata/AhciPei/DevicePath.c
@@ -242,7 +242,7 @@ AhciBuildDevicePath (
// Construct the host controller part device nodes
//
DevicePathWalker = *DevicePath;
- CopyMem (
+ CopyMem(
DevicePathWalker,
Private->DevicePath,
Private->DevicePathLength - sizeof (EFI_DEVICE_PATH_PROTOCOL)
@@ -253,7 +253,7 @@ AhciBuildDevicePath (
//
DevicePathWalker = (EFI_DEVICE_PATH_PROTOCOL *) ((UINT8 *)DevicePathWalker +
(Private->DevicePathLength - sizeof (EFI_DEVICE_PATH_PROTOCOL)));
- CopyMem (
+ CopyMem(
DevicePathWalker,
&mAhciSataDevicePathNodeTemplate,
sizeof (mAhciSataDevicePathNodeTemplate)
@@ -267,7 +267,7 @@ AhciBuildDevicePath (
//
DevicePathWalker = (EFI_DEVICE_PATH_PROTOCOL *) ((UINT8 *)DevicePathWalker +
sizeof (SATA_DEVICE_PATH));
- CopyMem (
+ CopyMem(
DevicePathWalker,
&mAhciEndDevicePathNodeTemplate,
sizeof (mAhciEndDevicePathNodeTemplate)
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
index da1c10f9c..37306c9fa 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
@@ -362,7 +362,7 @@ AhciDumpPortStatus (
//
// If D2H FIS is received, update StatusBlock with its content.
//
- CopyMem (AtaStatusBlock, (UINT8 *)Offset, sizeof (EFI_ATA_STATUS_BLOCK));
+ CopyMem(AtaStatusBlock, (UINT8 *)Offset, sizeof (EFI_ATA_STATUS_BLOCK));
} else {
//
// If D2H FIS is not received, only update Status & Error field through PxTFD
@@ -524,11 +524,11 @@ AhciBuildCommand (
CommandFis->AhciCFisPmNum = PortMultiplier;
- CopyMem (&AhciRegisters->AhciCommandTable->CommandFis, CommandFis, sizeof (EFI_AHCI_COMMAND_FIS));
+ CopyMem(&AhciRegisters->AhciCommandTable->CommandFis, CommandFis, sizeof (EFI_AHCI_COMMAND_FIS));
Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD;
if (AtapiCommand != NULL) {
- CopyMem (
+ CopyMem(
&AhciRegisters->AhciCommandTable->AtapiCmd,
AtapiCommand,
AtapiCommandLength
@@ -567,7 +567,7 @@ AhciBuildCommand (
AhciRegisters->AhciCommandTable->PrdtTable[PrdtNumber - 1].AhciPrdtIoc = 1;
}
- CopyMem (
+ CopyMem(
(VOID *) ((UINTN) AhciRegisters->AhciCmdList + (UINTN) CommandSlotNumber * sizeof (EFI_AHCI_COMMAND_LIST)),
CommandList,
sizeof (EFI_AHCI_COMMAND_LIST)
@@ -2273,7 +2273,7 @@ AhciEnableDevSlp (
//
ZeroMem (&DevSlpTiming, sizeof (DevSlpTiming));
} else {
- CopyMem (&DevSlpTiming, &LogData[48], sizeof (DevSlpTiming));
+ CopyMem(&DevSlpTiming, &LogData[48], sizeof (DevSlpTiming));
DEBUG ((DEBUG_INFO, "DevSlpTiming: Supported(%d), Deto(%d), Madt(%d)\n",
DevSlpTiming.Supported, DevSlpTiming.Deto, DevSlpTiming.Madt));
}
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
index 0d3e01fc8..0c7f0d5f5 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
@@ -2058,7 +2058,7 @@ ExtScsiPassThruPassThru (
// But to response EFI_DISK_INFO.Identify() request from ScsiDisk, we should handle this command.
//
if (*((UINT8*)Packet->Cdb) == ATA_CMD_IDENTIFY_DEVICE) {
- CopyMem (Packet->InDataBuffer, DeviceInfo->IdentifyData, sizeof (EFI_IDENTIFY_DATA));
+ CopyMem(Packet->InDataBuffer, DeviceInfo->IdentifyData, sizeof (EFI_IDENTIFY_DATA));
//
// For IDENTIFY DEVICE cmd, we don't need to get sense data.
//
@@ -2117,7 +2117,7 @@ ExtScsiPassThruPassThru (
break;
}
- CopyMem ((UINT8*)Packet->SenseData + SenseDataLen, PtrSenseData, sizeof (EFI_SCSI_SENSE_DATA));
+ CopyMem((UINT8*)Packet->SenseData + SenseDataLen, PtrSenseData, sizeof (EFI_SCSI_SENSE_DATA));
SenseDataLen += sizeof (EFI_SCSI_SENSE_DATA);
//
@@ -2417,7 +2417,7 @@ ExtScsiPassThruGetTargetLun (
return EFI_UNSUPPORTED;
}
- SetMem (*Target, TARGET_MAX_BYTES, 0xFF);
+ SetMem(*Target, TARGET_MAX_BYTES, 0xFF);
DevicePathNode = (EFI_DEV_PATH *) DevicePath;
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c
index c0cecdac0..6cf2596d8 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c
@@ -247,7 +247,7 @@ DumpAllIdeRegisters (
//
// Dump the content of all ATA registers.
//
- CopyMem (AtaStatusBlock, &StatusBlock, sizeof (EFI_ATA_STATUS_BLOCK));
+ CopyMem(AtaStatusBlock, &StatusBlock, sizeof (EFI_ATA_STATUS_BLOCK));
}
DEBUG_CODE_BEGIN ();
@@ -1826,7 +1826,7 @@ AtaPacketCommandExecute (
}
ZeroMem (PacketCommand, 12);
- CopyMem (PacketCommand, Packet->Cdb, Packet->CdbLength);
+ CopyMem(PacketCommand, Packet->Cdb, Packet->CdbLength);
//
// No OVL; No DMA
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c
index 3d580f020..e2fc0bf39 100644
--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c
+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c
@@ -1382,7 +1382,7 @@ AtaDiskInfoIdentify (
Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (ATA_IDENTIFY_DATA)) {
Status = EFI_SUCCESS;
- CopyMem (IdentifyData, AtaDevice->IdentifyData, sizeof (ATA_IDENTIFY_DATA));
+ CopyMem(IdentifyData, AtaDevice->IdentifyData, sizeof (ATA_IDENTIFY_DATA));
}
*IdentifyDataSize = sizeof (ATA_IDENTIFY_DATA);
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
index 392e9373f..c3e03e4a1 100644
--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
@@ -132,7 +132,7 @@ AtaDevicePassThru (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (Packet->Asb, AtaDevice->Asb, sizeof (EFI_ATA_STATUS_BLOCK));
+ CopyMem(Packet->Asb, AtaDevice->Asb, sizeof (EFI_ATA_STATUS_BLOCK));
Packet->Acb = AllocateCopyPool(sizeof (EFI_ATA_COMMAND_BLOCK), &AtaDevice->Acb);
} else {
Packet = &AtaDevice->Packet;
@@ -1042,7 +1042,7 @@ TrustTransferAtaDevice (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (NewBuffer, Buffer, TransferLength);
+ CopyMem(NewBuffer, Buffer, TransferLength);
FreePool(Buffer);
Buffer = NewBuffer;
}
diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c b/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c
index bdfd83387..46354ce74 100644
--- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c
+++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c
@@ -1310,7 +1310,7 @@ I2cBusDevicePathAppend (
//
// Build vendor device path
//
- CopyMem (&gVendorDevicePathTemplate.Guid, I2cDeviceContext->I2cDevice->DeviceGuid, sizeof (EFI_GUID));
+ CopyMem(&gVendorDevicePathTemplate.Guid, I2cDeviceContext->I2cDevice->DeviceGuid, sizeof (EFI_GUID));
I2cDeviceContext->DevicePath = AppendDevicePathNode (
I2cDeviceContext->I2cBusContext->ParentDevicePath,
(EFI_DEVICE_PATH_PROTOCOL *) &gVendorDevicePathTemplate
diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c b/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c
index f9413fca8..949b83216 100644
--- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c
+++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c
@@ -1010,7 +1010,7 @@ I2cHostQueueRequest (
RequestPacketSize = sizeof (UINTN) + RequestPacket->OperationCount * sizeof (EFI_I2C_OPERATION);
I2cRequest->RequestPacket = AllocateZeroPool(RequestPacketSize);
ASSERT (I2cRequest->RequestPacket != NULL);
- CopyMem (I2cRequest->RequestPacket, RequestPacket, RequestPacketSize);
+ CopyMem(I2cRequest->RequestPacket, RequestPacket, RequestPacketSize);
//
// Synchronize with the other threads
diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
index c95791708..fef58c504 100644
--- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
+++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
@@ -48,7 +48,7 @@ PopEfikeyBufHead (
// Retrieve and remove the values
//
if (KeyData != NULL) {
- CopyMem (KeyData, &Queue->Buffer[Queue->Head], sizeof (EFI_KEY_DATA));
+ CopyMem(KeyData, &Queue->Buffer[Queue->Head], sizeof (EFI_KEY_DATA));
}
Queue->Head = (Queue->Head + 1) % KEYBOARD_EFI_KEY_MAX_COUNT;
return EFI_SUCCESS;
@@ -72,7 +72,7 @@ PushEfikeyBufTail (
//
PopEfikeyBufHead (Queue, NULL);
}
- CopyMem (&Queue->Buffer[Queue->Tail], KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&Queue->Buffer[Queue->Tail], KeyData, sizeof (EFI_KEY_DATA));
Queue->Tail = (Queue->Tail + 1) % KEYBOARD_EFI_KEY_MAX_COUNT;
}
@@ -298,7 +298,7 @@ KeyboardReadKeyStroke (
}
}
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS;
}
}
@@ -339,7 +339,7 @@ KeyboardWaitForKey (
// next key from the queue
//
while (!IsEfikeyBufEmpty (&ConsoleIn->EfiKeyQueue)) {
- CopyMem (
+ CopyMem(
&KeyData,
&(ConsoleIn->EfiKeyQueue.Buffer[ConsoleIn->EfiKeyQueue.Head]),
sizeof (EFI_KEY_DATA)
@@ -601,7 +601,7 @@ KeyboardRegisterKeyNotify (
NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
- CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify;
diff --git a/MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c b/MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c
index 180d813f5..2619694e4 100644
--- a/MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c
+++ b/MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c
@@ -691,7 +691,7 @@ MouseGetState (
}
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
- CopyMem (State, &(MouseDev->State), sizeof (EFI_SIMPLE_POINTER_STATE));
+ CopyMem(State, &(MouseDev->State), sizeof (EFI_SIMPLE_POINTER_STATE));
//
// clear mouse state
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c
index 8d625036f..51412fc83 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c
@@ -1091,7 +1091,7 @@ EhcMonitorAsyncRequests (
continue;
}
- CopyMem (ProcBuf, Urb->Data, Urb->Completed);
+ CopyMem(ProcBuf, Urb->Data, Urb->Completed);
}
EhcUpdateAsyncRequest (Ehc, Urb);
diff --git a/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c b/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c
index 7f3099616..049e7ec4f 100644
--- a/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c
+++ b/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c
@@ -214,7 +214,7 @@ AtapiGetBlockDeviceMediaInfo (
//
// Get media info from AtapiBlkIoDev
//
- CopyMem (MediaInfo, &AtapiBlkIoDev->DeviceInfo[Index].MediaInfo, sizeof(EFI_PEI_BLOCK_IO_MEDIA));
+ CopyMem(MediaInfo, &AtapiBlkIoDev->DeviceInfo[Index].MediaInfo, sizeof(EFI_PEI_BLOCK_IO_MEDIA));
return EFI_SUCCESS;
}
@@ -430,7 +430,7 @@ AtapiGetBlockDeviceMediaInfo2 (
//
// Get media info from AtapiBlkIoDev
//
- CopyMem (MediaInfo, &AtapiBlkIoDev->DeviceInfo[DeviceIndex - 1].MediaInfo2, sizeof(EFI_PEI_BLOCK_IO2_MEDIA));
+ CopyMem(MediaInfo, &AtapiBlkIoDev->DeviceInfo[DeviceIndex - 1].MediaInfo2, sizeof(EFI_PEI_BLOCK_IO2_MEDIA));
return EFI_SUCCESS;
}
@@ -597,8 +597,8 @@ AtapiEnumerateDevices (
// Retrieve Media Info
//
Status = DetectMedia (AtapiBlkIoDev, DevicePosition, &MediaInfo, &MediaInfo2);
- CopyMem (&(AtapiBlkIoDev->DeviceInfo[DeviceCount].MediaInfo), &MediaInfo, sizeof (MediaInfo));
- CopyMem (&(AtapiBlkIoDev->DeviceInfo[DeviceCount].MediaInfo2), &MediaInfo2, sizeof (MediaInfo2));
+ CopyMem(&(AtapiBlkIoDev->DeviceInfo[DeviceCount].MediaInfo), &MediaInfo, sizeof (MediaInfo));
+ CopyMem(&(AtapiBlkIoDev->DeviceInfo[DeviceCount].MediaInfo2), &MediaInfo2, sizeof (MediaInfo2));
DEBUG ((EFI_D_INFO, "Atatpi Device Position is %d\n", DevicePosition));
DEBUG ((EFI_D_INFO, "Atatpi DeviceType is %d\n", MediaInfo.DeviceType));
diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
index 73acd0a82..579b4acd4 100644
--- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
+++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
@@ -546,7 +546,7 @@ PciIoPciWrite (
STATIC
EFI_STATUS
EFIAPI
-PciIoCopyMem (
+PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
@@ -646,7 +646,7 @@ CoherentPciIoMap (
return EFI_DEVICE_ERROR;
}
if (Operation == EfiPciIoOperationBusMasterRead) {
- gBS->CopyMem ((VOID *)(UINTN)MapInfo->AllocAddress, HostAddress,
+ gBS->CopyMem((VOID *)(UINTN)MapInfo->AllocAddress, HostAddress,
*NumberOfBytes);
}
*DeviceAddress = MapInfo->AllocAddress;
@@ -680,7 +680,7 @@ CoherentPciIoUnmap (
MapInfo = Mapping;
if (MapInfo != NULL) {
if (MapInfo->Operation == EfiPciIoOperationBusMasterWrite) {
- gBS->CopyMem (MapInfo->HostAddress, (VOID *)(UINTN)MapInfo->AllocAddress,
+ gBS->CopyMem(MapInfo->HostAddress, (VOID *)(UINTN)MapInfo->AllocAddress,
MapInfo->NumberOfBytes);
}
gBS->FreePages (MapInfo->AllocAddress,
@@ -1092,7 +1092,7 @@ NonCoherentPciIoMap (
}
MapInfo->AllocAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocAddress;
if (Operation == EfiPciIoOperationBusMasterRead) {
- gBS->CopyMem (AllocAddress, HostAddress, *NumberOfBytes);
+ gBS->CopyMem(AllocAddress, HostAddress, *NumberOfBytes);
}
*DeviceAddress = MapInfo->AllocAddress;
} else {
@@ -1152,7 +1152,7 @@ NonCoherentPciIoUnmap (
// and free the buffer.
//
if (MapInfo->Operation == EfiPciIoOperationBusMasterWrite) {
- gBS->CopyMem (MapInfo->HostAddress, (VOID *)(UINTN)MapInfo->AllocAddress,
+ gBS->CopyMem(MapInfo->HostAddress, (VOID *)(UINTN)MapInfo->AllocAddress,
MapInfo->NumberOfBytes);
}
NonCoherentPciIoFreeBuffer (This,
@@ -1379,7 +1379,7 @@ PciIoGetBarAttributes (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (Descriptor, BarDesc, sizeof *Descriptor);
+ CopyMem(Descriptor, BarDesc, sizeof *Descriptor);
End = (EFI_ACPI_END_TAG_DESCRIPTOR *) (Descriptor + 1);
End->Desc = ACPI_END_TAG_DESCRIPTOR;
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
index 6ed7644ba..86afe26bf 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
@@ -174,7 +174,7 @@ EnumerateNvmeDevNamespace (
//
// Create DiskInfo Protocol instance
//
- CopyMem (&Device->NamespaceData, NamespaceData, sizeof (NVME_ADMIN_NAMESPACE_DATA));
+ CopyMem(&Device->NamespaceData, NamespaceData, sizeof (NVME_ADMIN_NAMESPACE_DATA));
InitializeDiskInfo (Device);
//
@@ -280,9 +280,9 @@ EnumerateNvmeDevNamespace (
//
// Build controller name for Component Name (2) protocol.
//
- CopyMem (Sn, Private->ControllerData->Sn, sizeof (Private->ControllerData->Sn));
+ CopyMem(Sn, Private->ControllerData->Sn, sizeof (Private->ControllerData->Sn));
Sn[20] = 0;
- CopyMem (Mn, Private->ControllerData->Mn, sizeof (Private->ControllerData->Mn));
+ CopyMem(Mn, Private->ControllerData->Mn, sizeof (Private->ControllerData->Mn));
Mn[40] = 0;
UnicodeSPrintAsciiFormat (Device->ModelName, sizeof (Device->ModelName), "%a-%a-%x", Sn, Mn, NamespaceData->Eui64);
@@ -633,7 +633,7 @@ ProcessAsyncTaskList (
// Copy the Respose Queue entry for this command to the callers
// response buffer.
//
- CopyMem (
+ CopyMem(
AsyncRequest->Packet->NvmeCompletion,
Cq,
sizeof(EFI_NVM_EXPRESS_COMPLETION)
@@ -999,7 +999,7 @@ NvmExpressDriverBindingStart (
Private->Passthru.GetNextNamespace = NvmExpressGetNextNamespace;
Private->Passthru.BuildDevicePath = NvmExpressBuildDevicePath;
Private->Passthru.GetNamespace = NvmExpressGetNamespace;
- CopyMem (&Private->PassThruMode, &gEfiNvmExpressPassThruMode, sizeof (EFI_NVM_EXPRESS_PASS_THRU_MODE));
+ CopyMem(&Private->PassThruMode, &gEfiNvmExpressPassThruMode, sizeof (EFI_NVM_EXPRESS_PASS_THRU_MODE));
InitializeListHead (&Private->AsyncPassThruQueue);
InitializeListHead (&Private->UnsubmittedSubtasks);
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDiskInfo.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDiskInfo.c
index 10b79d4ad..ae3fc8cef 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDiskInfo.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDiskInfo.c
@@ -30,7 +30,7 @@ InitializeDiskInfo (
IN NVME_DEVICE_PRIVATE_DATA *Device
)
{
- CopyMem (&Device->DiskInfo, &gNvmExpressDiskInfoProtocolTemplate, sizeof (EFI_DISK_INFO_PROTOCOL));
+ CopyMem(&Device->DiskInfo, &gNvmExpressDiskInfoProtocolTemplate, sizeof (EFI_DISK_INFO_PROTOCOL));
}
@@ -96,7 +96,7 @@ NvmExpressDiskInfoIdentify (
Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (Device->NamespaceData)) {
Status = EFI_SUCCESS;
- CopyMem (IdentifyData, &Device->NamespaceData, sizeof (Device->NamespaceData));
+ CopyMem(IdentifyData, &Device->NamespaceData, sizeof (Device->NamespaceData));
}
*IdentifyDataSize = sizeof (Device->NamespaceData);
return Status;
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
index cd1ea5755..76deca3c9 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
@@ -616,7 +616,7 @@ NvmeCreateIoCompletionQueue (
CrIoCq.Qid = Index;
CrIoCq.Qsize = QueueSize;
CrIoCq.Pc = 1;
- CopyMem (&CommandPacket.NvmeCmd->Cdw10, &CrIoCq, sizeof (NVME_ADMIN_CRIOCQ));
+ CopyMem(&CommandPacket.NvmeCmd->Cdw10, &CrIoCq, sizeof (NVME_ADMIN_CRIOCQ));
CommandPacket.NvmeCmd->Flags = CDW10_VALID | CDW11_VALID;
Status = Private->Passthru.PassThru (
@@ -690,7 +690,7 @@ NvmeCreateIoSubmissionQueue (
CrIoSq.Pc = 1;
CrIoSq.Cqid = Index;
CrIoSq.Qprio = 0;
- CopyMem (&CommandPacket.NvmeCmd->Cdw10, &CrIoSq, sizeof (NVME_ADMIN_CRIOSQ));
+ CopyMem(&CommandPacket.NvmeCmd->Cdw10, &CrIoSq, sizeof (NVME_ADMIN_CRIOSQ));
CommandPacket.NvmeCmd->Flags = CDW10_VALID | CDW11_VALID;
Status = Private->Passthru.PassThru (
@@ -921,9 +921,9 @@ NvmeControllerInit (
//
// Dump NvmExpress Identify Controller Data
//
- CopyMem (Sn, Private->ControllerData->Sn, sizeof (Private->ControllerData->Sn));
+ CopyMem(Sn, Private->ControllerData->Sn, sizeof (Private->ControllerData->Sn));
Sn[20] = 0;
- CopyMem (Mn, Private->ControllerData->Mn, sizeof (Private->ControllerData->Mn));
+ CopyMem(Mn, Private->ControllerData->Mn, sizeof (Private->ControllerData->Mn));
Mn[40] = 0;
DEBUG ((EFI_D_INFO, " == NVME IDENTIFY CONTROLLER DATA ==\n"));
DEBUG ((EFI_D_INFO, " PCI VID : 0x%x\n", Private->ControllerData->Vid));
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/DevicePath.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/DevicePath.c
index 6f9ff4b7d..c83820beb 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressPei/DevicePath.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/DevicePath.c
@@ -242,7 +242,7 @@ NvmeBuildDevicePath (
// Construct the host controller part device nodes
//
DevicePathWalker = *DevicePath;
- CopyMem (
+ CopyMem(
DevicePathWalker,
Private->DevicePath,
Private->DevicePathLength - sizeof (EFI_DEVICE_PATH_PROTOCOL)
@@ -253,7 +253,7 @@ NvmeBuildDevicePath (
//
DevicePathWalker = (EFI_DEVICE_PATH_PROTOCOL *) ((UINT8 *)DevicePathWalker +
(Private->DevicePathLength - sizeof (EFI_DEVICE_PATH_PROTOCOL)));
- CopyMem (
+ CopyMem(
DevicePathWalker,
&mNvmeDevicePathNodeTemplate,
sizeof (mNvmeDevicePathNodeTemplate)
@@ -267,7 +267,7 @@ NvmeBuildDevicePath (
//
DevicePathWalker = (EFI_DEVICE_PATH_PROTOCOL *) ((UINT8 *)DevicePathWalker +
sizeof (NVME_NAMESPACE_DEVICE_PATH));
- CopyMem (
+ CopyMem(
DevicePathWalker,
&mNvmeEndDevicePathNodeTemplate,
sizeof (mNvmeEndDevicePathNodeTemplate)
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
index 59e01454d..1f1abb400 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
@@ -379,7 +379,7 @@ NvmExpressPeimEntry (
Private->BlkIoPpi.GetNumberOfBlockDevices = NvmeBlockIoPeimGetDeviceNo;
Private->BlkIoPpi.GetBlockDeviceMediaInfo = NvmeBlockIoPeimGetMediaInfo;
Private->BlkIoPpi.ReadBlocks = NvmeBlockIoPeimReadBlocks;
- CopyMem (
+ CopyMem(
&Private->BlkIoPpiList,
&mNvmeBlkIoPpiListTemplate,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -390,7 +390,7 @@ NvmExpressPeimEntry (
Private->BlkIo2Ppi.GetNumberOfBlockDevices = NvmeBlockIoPeimGetDeviceNo2;
Private->BlkIo2Ppi.GetBlockDeviceMediaInfo = NvmeBlockIoPeimGetMediaInfo2;
Private->BlkIo2Ppi.ReadBlocks = NvmeBlockIoPeimReadBlocks2;
- CopyMem (
+ CopyMem(
&Private->BlkIo2PpiList,
&mNvmeBlkIo2PpiListTemplate,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -410,7 +410,7 @@ NvmExpressPeimEntry (
Private->NvmePassThruPpi.GetDevicePath = NvmePassThruGetDevicePath;
Private->NvmePassThruPpi.GetNextNameSpace = NvmePassThruGetNextNameSpace;
Private->NvmePassThruPpi.PassThru = NvmePassThru;
- CopyMem (
+ CopyMem(
&Private->NvmePassThruPpiList,
&mNvmePassThruPpiListTemplate,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -432,7 +432,7 @@ NvmExpressPeimEntry (
Private->StorageSecurityPpi.GetDevicePath = NvmeStorageSecurityGetDevicePath;
Private->StorageSecurityPpi.ReceiveData = NvmeStorageSecurityReceiveData;
Private->StorageSecurityPpi.SendData = NvmeStorageSecuritySendData;
- CopyMem (
+ CopyMem(
&Private->StorageSecurityPpiList,
&mNvmeStorageSecurityPpiListTemplate,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -441,7 +441,7 @@ NvmExpressPeimEntry (
PeiServicesInstallPpi (&Private->StorageSecurityPpiList);
}
- CopyMem (
+ CopyMem(
&Private->EndOfPeiNotifyList,
&mNvmeEndOfPeiNotifyListTemplate,
sizeof (EFI_PEI_NOTIFY_DESCRIPTOR)
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c
index e58198143..669ca236c 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c
@@ -451,7 +451,7 @@ NvmeBlockIoPeimGetMediaInfo2 (
return Status;
}
- CopyMem (
+ CopyMem(
MediaInfo,
&(Private->NamespaceInfo[DeviceIndex - 1].Media),
sizeof (EFI_PEI_BLOCK_IO2_MEDIA)
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c
index 175483ead..1c9016cdc 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c
@@ -420,9 +420,9 @@ NvmeDumpControllerData (
UINT8 Sn[21];
UINT8 Mn[41];
- CopyMem (Sn, ControllerData->Sn, sizeof (ControllerData->Sn));
+ CopyMem(Sn, ControllerData->Sn, sizeof (ControllerData->Sn));
Sn[20] = 0;
- CopyMem (Mn, ControllerData->Mn, sizeof (ControllerData->Mn));
+ CopyMem(Mn, ControllerData->Mn, sizeof (ControllerData->Mn));
Mn[40] = 0;
DEBUG ((DEBUG_INFO, " == NVME IDENTIFY CONTROLLER DATA ==\n"));
@@ -477,7 +477,7 @@ NvmeCreateIoCompletionQueue (
CrIoCq.Qid = NVME_IO_QUEUE;
CrIoCq.Qsize = NVME_CCQ_SIZE;
CrIoCq.Pc = 1;
- CopyMem (&CommandPacket.NvmeCmd->Cdw10, &CrIoCq, sizeof (NVME_ADMIN_CRIOCQ));
+ CopyMem(&CommandPacket.NvmeCmd->Cdw10, &CrIoCq, sizeof (NVME_ADMIN_CRIOCQ));
CommandPacket.NvmeCmd->Flags = CDW10_VALID | CDW11_VALID;
Status = NvmePassThruExecute (
@@ -527,7 +527,7 @@ NvmeCreateIoSubmissionQueue (
CrIoSq.Pc = 1;
CrIoSq.Cqid = NVME_IO_QUEUE;
CrIoSq.Qprio = 0;
- CopyMem (&CommandPacket.NvmeCmd->Cdw10, &CrIoSq, sizeof (NVME_ADMIN_CRIOSQ));
+ CopyMem(&CommandPacket.NvmeCmd->Cdw10, &CrIoSq, sizeof (NVME_ADMIN_CRIOSQ));
CommandPacket.NvmeCmd->Flags = CDW10_VALID | CDW11_VALID;
Status = NvmePassThruExecute (
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c
index 42c885a32..610a43c97 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c
@@ -80,14 +80,14 @@ NvmeCreatePrpList (
//
// Fill all PRP entries except of last one.
//
- CopyMem (PrpEntry, (VOID *)(UINTN) (&PhysicalAddr), sizeof (UINT64));
+ CopyMem(PrpEntry, (VOID *)(UINTN) (&PhysicalAddr), sizeof (UINT64));
PhysicalAddr += EFI_PAGE_SIZE;
} else {
//
// Fill last PRP entries with next PRP List pointer.
//
NewPhyAddr = (PrpListPhyAddr + (PrpListIndex + 1) * EFI_PAGE_SIZE);
- CopyMem (PrpEntry, (VOID *)(UINTN) (&NewPhyAddr), sizeof (UINT64));
+ CopyMem(PrpEntry, (VOID *)(UINTN) (&NewPhyAddr), sizeof (UINT64));
}
}
}
@@ -98,7 +98,7 @@ NvmeCreatePrpList (
PrpListBase = (UINTN)PrpListHost + PrpListIndex * EFI_PAGE_SIZE;
for (PrpEntryIndex = 0; PrpEntryIndex < ((Remainder != 0) ? Remainder : PrpEntryNo); ++PrpEntryIndex) {
PrpEntry = (UINT8 *)(UINTN) (PrpListBase + PrpEntryIndex * sizeof(UINT64));
- CopyMem (PrpEntry, (VOID *)(UINTN) (&PhysicalAddr), sizeof (UINT64));
+ CopyMem(PrpEntry, (VOID *)(UINTN) (&PhysicalAddr), sizeof (UINT64));
PhysicalAddr += EFI_PAGE_SIZE;
}
@@ -603,7 +603,7 @@ NvmePassThruExecute (
//
// Copy the Respose Queue entry for this command to the callers response buffer
//
- CopyMem (Packet->NvmeCompletion, Cq, sizeof (EFI_NVM_EXPRESS_COMPLETION));
+ CopyMem(Packet->NvmeCompletion, Cq, sizeof (EFI_NVM_EXPRESS_COMPLETION));
//
// Check the NVMe cmd execution result
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
index 93eb4960b..eb6ff6874 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
@@ -2124,7 +2124,7 @@ CreatePciIoDevice (
PciIoDevice->IsPciExp = FALSE;
- CopyMem (&(PciIoDevice->Pci), Pci, sizeof (PCI_TYPE01));
+ CopyMem(&(PciIoDevice->Pci), Pci, sizeof (PCI_TYPE01));
//
// Initialize the PCI I/O instance structure
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
index 9d03bd6f6..4a1cb268e 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
@@ -53,7 +53,7 @@ InitializePciIoInstance (
IN PCI_IO_DEVICE *PciIoDevice
)
{
- CopyMem (&PciIoDevice->PciIo, &mPciIoInterface, sizeof (EFI_PCI_IO_PROTOCOL));
+ CopyMem(&PciIoDevice->PciIo, &mPciIoInterface, sizeof (EFI_PCI_IO_PROTOCOL));
}
/**
@@ -862,7 +862,7 @@ PciIoConfigWrite (
**/
EFI_STATUS
EFIAPI
-PciIoCopyMem (
+PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
@@ -912,7 +912,7 @@ PciIoCopyMem (
}
}
- Status = PciIoDevice->PciRootBridgeIo->CopyMem (
+ Status = PciIoDevice->PciRootBridgeIo->CopyMem(
PciIoDevice->PciRootBridgeIo,
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
DestOffset,
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.h b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.h
index 8c50c48ac..96a561a81 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.h
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.h
@@ -346,7 +346,7 @@ PciIoConfigWrite (
**/
EFI_STATUS
EFIAPI
-PciIoCopyMem (
+PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
index 4d3d49a0e..acb01cef9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
@@ -99,7 +99,7 @@ LocalLoadFile2 (
}
*BufferSize = ImageLength;
- CopyMem (Buffer, ImageBuffer, ImageLength);
+ CopyMem(Buffer, ImageBuffer, ImageLength);
return EFI_SUCCESS;
} else {
diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h
index caa3faf00..ab6c30b47 100644
--- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h
+++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h
@@ -285,7 +285,7 @@ RootBridgeIoIoWrite (
**/
EFI_STATUS
EFIAPI
-RootBridgeIoCopyMem (
+RootBridgeIoCopyMem(
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 DestAddress,
diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c
index 3714184f6..fe6c0c573 100644
--- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c
+++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c
@@ -188,12 +188,12 @@ CreateRootBridge (
ASSERT (RootBridge->ConfigBuffer != NULL);
InitializeListHead (&RootBridge->Maps);
- CopyMem (&RootBridge->Bus, &Bridge->Bus, sizeof (PCI_ROOT_BRIDGE_APERTURE));
- CopyMem (&RootBridge->Io, &Bridge->Io, sizeof (PCI_ROOT_BRIDGE_APERTURE));
- CopyMem (&RootBridge->Mem, &Bridge->Mem, sizeof (PCI_ROOT_BRIDGE_APERTURE));
- CopyMem (&RootBridge->MemAbove4G, &Bridge->MemAbove4G, sizeof (PCI_ROOT_BRIDGE_APERTURE));
- CopyMem (&RootBridge->PMem, &Bridge->PMem, sizeof (PCI_ROOT_BRIDGE_APERTURE));
- CopyMem (&RootBridge->PMemAbove4G, &Bridge->PMemAbove4G, sizeof (PCI_ROOT_BRIDGE_APERTURE));
+ CopyMem(&RootBridge->Bus, &Bridge->Bus, sizeof (PCI_ROOT_BRIDGE_APERTURE));
+ CopyMem(&RootBridge->Io, &Bridge->Io, sizeof (PCI_ROOT_BRIDGE_APERTURE));
+ CopyMem(&RootBridge->Mem, &Bridge->Mem, sizeof (PCI_ROOT_BRIDGE_APERTURE));
+ CopyMem(&RootBridge->MemAbove4G, &Bridge->MemAbove4G, sizeof (PCI_ROOT_BRIDGE_APERTURE));
+ CopyMem(&RootBridge->PMem, &Bridge->PMem, sizeof (PCI_ROOT_BRIDGE_APERTURE));
+ CopyMem(&RootBridge->PMemAbove4G, &Bridge->PMemAbove4G, sizeof (PCI_ROOT_BRIDGE_APERTURE));
for (Index = TypeIo; Index < TypeMax; Index++) {
switch (Index) {
@@ -1018,7 +1018,7 @@ RootBridgeIoIoWrite (
**/
EFI_STATUS
EFIAPI
-RootBridgeIoCopyMem (
+RootBridgeIoCopyMem(
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 DestAddress,
@@ -1126,7 +1126,7 @@ RootBridgeIoPciAccess (
// Read Pci configuration space
//
RootBridge = ROOT_BRIDGE_FROM_THIS (This);
- CopyMem (&PciAddress, &Address, sizeof (PciAddress));
+ CopyMem(&PciAddress, &Address, sizeof (PciAddress));
if (PciAddress.ExtendedRegister == 0) {
PciAddress.ExtendedRegister = PciAddress.Register;
@@ -1346,7 +1346,7 @@ RootBridgeIoMap (
//
if (Operation == EfiPciOperationBusMasterRead ||
Operation == EfiPciOperationBusMasterRead64) {
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) MapInfo->MappedHostAddress,
(VOID *) (UINTN) MapInfo->HostAddress,
MapInfo->NumberOfBytes
@@ -1449,7 +1449,7 @@ RootBridgeIoUnmap (
//
if (MapInfo->Operation == EfiPciOperationBusMasterWrite ||
MapInfo->Operation == EfiPciOperationBusMasterWrite64) {
- CopyMem (
+ CopyMem(
(VOID *) (UINTN) MapInfo->HostAddress,
(VOID *) (UINTN) MapInfo->MappedHostAddress,
MapInfo->NumberOfBytes
diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c
index d51d9e90b..51695f78f 100644
--- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c
+++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c
@@ -454,7 +454,7 @@ CreateSerialDevice (
SerialDevice->Instance = Instance;
if (Uart != NULL) {
- CopyMem (&SerialDevice->UartDevicePath, Uart, sizeof (UART_DEVICE_PATH));
+ CopyMem(&SerialDevice->UartDevicePath, Uart, sizeof (UART_DEVICE_PATH));
FlowControl = (UART_FLOW_CONTROL_DEVICE_PATH *) NextDevicePathNode (Uart);
if (IsUartFlowControlDevicePathNode (FlowControl)) {
FlowControlMap = ReadUnaligned32 (&FlowControl->FlowControlMap);
diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c
index 97c8f4242..7b19a7c54 100644
--- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c
+++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c
@@ -768,7 +768,7 @@ SerialSetAttributes (
NULL,
NULL
);
- CopyMem (Uart, &SerialDevice->UartDevicePath, sizeof (UART_DEVICE_PATH));
+ CopyMem(Uart, &SerialDevice->UartDevicePath, sizeof (UART_DEVICE_PATH));
Status = gBS->ReinstallProtocolInterface (
SerialDevice->Handle,
&gEfiDevicePathProtocolGuid,
diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c
index e42193f83..5cf6c77f3 100644
--- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c
+++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c
@@ -850,7 +850,7 @@ IdeInitSubmitData (
// Make a local copy of device's IdentifyData and mark the valid flag
//
if (IdentifyData != NULL) {
- CopyMem (
+ CopyMem(
&(Private->IdentifyData[DeviceIndex]),
IdentifyData,
sizeof (EFI_IDENTIFY_DATA)
@@ -929,7 +929,7 @@ IdeInitDisqualifyMode (
// Record the disqualified modes per channel per device. From ATA/ATAPI spec,
// if a mode is not supported, the modes higher than it is also not supported.
//
- CopyMem (
+ CopyMem(
&(Private->DisqualifiedModes[DeviceIndex]),
BadModes,
sizeof (EFI_ATA_COLLECTIVE_MODE)
diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
index 48041d8fe..998ba2d2e 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
@@ -237,7 +237,7 @@ EmmcGetCsd (
//
// For details, refer to SD Host Controller Simplified Spec 3.0 Table 2-12.
//
- CopyMem (((UINT8*)Csd) + 1, &SdMmcStatusBlk.Resp0, sizeof (EMMC_CSD) - 1);
+ CopyMem(((UINT8*)Csd) + 1, &SdMmcStatusBlk.Resp0, sizeof (EMMC_CSD) - 1);
}
return Status;
diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
index b4a7fb713..e3e8d2c6b 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
@@ -615,7 +615,7 @@ SdMmcHcGetCapability (
return Status;
}
- CopyMem (Capability, &Cap, sizeof (Cap));
+ CopyMem(Capability, &Cap, sizeof (Cap));
return EFI_SUCCESS;
}
@@ -2354,7 +2354,7 @@ Done:
return Status;
}
}
- CopyMem (Packet->SdMmcStatusBlk, Response, sizeof (Response));
+ CopyMem(Packet->SdMmcStatusBlk, Response, sizeof (Response));
}
}
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
index da4b33209..3ad2818ec 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
@@ -1007,7 +1007,7 @@ UhciMonitorAsyncReqList (
return ;
}
- CopyMem (Data, AsyncReq->FirstTd->Data, QhResult.Complete);
+ CopyMem(Data, AsyncReq->FirstTd->Data, QhResult.Complete);
}
UhciUpdateAsyncReq (Uhc, AsyncReq, QhResult.Result, QhResult.NextToggle);
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
index 56b896faf..a23c770e6 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
@@ -999,7 +999,7 @@ XhcControlTransfer (
//
// Store a copy of device scriptor as hub device need this info to configure endpoint.
//
- CopyMem (&Xhc->UsbDevContext[SlotId].DevDesc, Data, *DataLength);
+ CopyMem(&Xhc->UsbDevContext[SlotId].DevDesc, Data, *DataLength);
if (Xhc->UsbDevContext[SlotId].DevDesc.BcdUSB >= 0x0300) {
//
// If it's a usb3.0 device, then its max packet size is a 2^n.
@@ -1023,7 +1023,7 @@ XhcControlTransfer (
Index = (UINT8)Request->Value;
ASSERT (Index < Xhc->UsbDevContext[SlotId].DevDesc.NumConfigurations);
Xhc->UsbDevContext[SlotId].ConfDesc[Index] = AllocateZeroPool(*DataLength);
- CopyMem (Xhc->UsbDevContext[SlotId].ConfDesc[Index], Data, *DataLength);
+ CopyMem(Xhc->UsbDevContext[SlotId].ConfDesc[Index], Data, *DataLength);
//
// Default to use AlternateSetting 0 for all interfaces.
//
@@ -1765,7 +1765,7 @@ XhcCreateUsbHc (
Xhc->PciIo = PciIo;
Xhc->DevicePath = DevicePath;
Xhc->OriginalPciAttributes = OriginalPciAttributes;
- CopyMem (&Xhc->Usb2Hc, &gXhciUsb2HcTemplate, sizeof (EFI_USB2_HC_PROTOCOL));
+ CopyMem(&Xhc->Usb2Hc, &gXhciUsb2HcTemplate, sizeof (EFI_USB2_HC_PROTOCOL));
Status = PciIo->Pci.Read (
PciIo,
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
index 1bc5ef1cb..e4f3d4c2d 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
@@ -37,7 +37,7 @@ XhcCreateCmdTrb (
XhcSyncTrsRing (Xhc, Urb->Ring);
Urb->TrbNum = 1;
Urb->TrbStart = Urb->Ring->RingEnqueue;
- CopyMem (Urb->TrbStart, CmdTrb, sizeof (TRB_TEMPLATE));
+ CopyMem(Urb->TrbStart, CmdTrb, sizeof (TRB_TEMPLATE));
Urb->TrbStart->CycleBit = Urb->Ring->RingPCS & BIT0;
Urb->TrbEnd = Urb->TrbStart;
@@ -1627,7 +1627,7 @@ XhcMonitorAsyncRequests (
continue;
}
- CopyMem (ProcBuf, Urb->Data, Urb->Completed);
+ CopyMem(ProcBuf, Urb->Data, Urb->Completed);
}
//
@@ -3095,7 +3095,7 @@ XhcSetConfigCmd (
InputContext = Xhc->UsbDevContext[SlotId].InputContext;
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
ZeroMem (InputContext, sizeof (INPUT_CONTEXT));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
ASSERT (ConfigDesc != NULL);
@@ -3185,7 +3185,7 @@ XhcSetConfigCmd64 (
InputContext = Xhc->UsbDevContext[SlotId].InputContext;
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
ZeroMem (InputContext, sizeof (INPUT_CONTEXT_64));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
ASSERT (ConfigDesc != NULL);
@@ -3466,7 +3466,7 @@ XhcSetInterface (
// So the default Drop Context and Add Context flags can be '0' to cover 1).
//
ZeroMem (InputContext, sizeof (INPUT_CONTEXT));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
ASSERT (ConfigDesc != NULL);
@@ -3668,7 +3668,7 @@ XhcSetInterface64 (
// So the default Drop Context and Add Context flags can be '0' to cover 1).
//
ZeroMem (InputContext, sizeof (INPUT_CONTEXT_64));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
ASSERT (ConfigDesc != NULL);
diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c
index 40d5b738f..4f50740fb 100644
--- a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c
+++ b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c
@@ -670,7 +670,7 @@ XhcPeiControlTransfer (
//
// Store a copy of device scriptor as hub device need this info to configure endpoint.
//
- CopyMem (&Xhc->UsbDevContext[SlotId].DevDesc, Data, *DataLength);
+ CopyMem(&Xhc->UsbDevContext[SlotId].DevDesc, Data, *DataLength);
if (Xhc->UsbDevContext[SlotId].DevDesc.BcdUSB >= 0x0300) {
//
// If it's a usb3.0 device, then its max packet size is a 2^n.
@@ -702,7 +702,7 @@ XhcPeiControlTransfer (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
- CopyMem (Xhc->UsbDevContext[SlotId].ConfDesc[Index], Data, *DataLength);
+ CopyMem(Xhc->UsbDevContext[SlotId].ConfDesc[Index], Data, *DataLength);
}
} else if (((DescriptorType == USB_DESC_TYPE_HUB) ||
(DescriptorType == USB_DESC_TYPE_HUB_SUPER_SPEED)) && (*DataLength > 2)) {
diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
index d0210533c..0e21422dd 100644
--- a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
+++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
@@ -38,7 +38,7 @@ XhcPeiCreateCmdTrb (
XhcPeiSyncTrsRing (Xhc, Urb->Ring);
Urb->TrbNum = 1;
Urb->TrbStart = Urb->Ring->RingEnqueue;
- CopyMem (Urb->TrbStart, CmdTrb, sizeof (TRB_TEMPLATE));
+ CopyMem(Urb->TrbStart, CmdTrb, sizeof (TRB_TEMPLATE));
Urb->TrbStart->CycleBit = Urb->Ring->RingPCS & BIT0;
Urb->TrbEnd = Urb->TrbStart;
@@ -1702,7 +1702,7 @@ XhcPeiSetConfigCmd (
InputContext = Xhc->UsbDevContext[SlotId].InputContext;
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
ZeroMem (InputContext, sizeof (INPUT_CONTEXT));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
ASSERT (ConfigDesc != NULL);
@@ -1918,7 +1918,7 @@ XhcPeiSetConfigCmd64 (
InputContext = Xhc->UsbDevContext[SlotId].InputContext;
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
ZeroMem (InputContext, sizeof (INPUT_CONTEXT_64));
- CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
+ CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT_64));
ASSERT (ConfigDesc != NULL);
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
index a25d50083..8039d994d 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
@@ -179,7 +179,7 @@ SCSIBusDriverBindingSupported (
SCSI_TARGET_ID ScsiTargetId;
TargetId = &ScsiTargetId.ScsiId.ExtScsi[0];
- SetMem (TargetId, TARGET_MAX_BYTES, 0xFF);
+ SetMem(TargetId, TARGET_MAX_BYTES, 0xFF);
//
// To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as
@@ -321,7 +321,7 @@ SCSIBusDriverBindingStart (
PassThruStatus = EFI_SUCCESS;
TargetId = &ScsiTargetId.ScsiId.ExtScsi[0];
- SetMem (TargetId, TARGET_MAX_BYTES, 0xFF);
+ SetMem(TargetId, TARGET_MAX_BYTES, 0xFF);
DevicePathStatus = gBS->OpenProtocol (
Controller,
@@ -811,7 +811,7 @@ ScsiGetDeviceLocation (
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
- CopyMem (*Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
+ CopyMem(*Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
*Lun = ScsiIoDevice->Lun;
@@ -888,7 +888,7 @@ ScsiResetDevice (
ScsiIoDevice->ScsiBusDeviceData->DevicePath
);
- CopyMem (Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
+ CopyMem(Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
if (ScsiIoDevice->ExtScsiSupport) {
@@ -976,7 +976,7 @@ ScsiExecuteSCSICommand (
}
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
- CopyMem (Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
+ CopyMem(Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
if (ScsiIoDevice->ExtScsiSupport) {
ExtRequestPacket = (EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *) Packet;
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
index d6197dd66..1b16c835c 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
@@ -1748,7 +1748,7 @@ ScsiDiskDetectMedia (
*MediaChange = FALSE;
TimeoutEvt = NULL;
- CopyMem (&OldMedia, ScsiDiskDevice->BlkIo.Media, sizeof (OldMedia));
+ CopyMem(&OldMedia, ScsiDiskDevice->BlkIo.Media, sizeof (OldMedia));
Status = gBS->CreateEvent (
EVT_TIMER,
@@ -2730,7 +2730,7 @@ ScsiDiskRequestSenseKeys (
}
}
- CopyMem (ScsiDiskDevice->SenseData + *NumberOfSenseKeys, PtrSenseData, SenseDataLength);
+ CopyMem(ScsiDiskDevice->SenseData + *NumberOfSenseKeys, PtrSenseData, SenseDataLength);
(*NumberOfSenseKeys) += 1;
//
@@ -5492,7 +5492,7 @@ ScsiDiskInfoInquiry (
Status = EFI_BUFFER_TOO_SMALL;
if (*InquiryDataSize >= sizeof (ScsiDiskDevice->InquiryData)) {
Status = EFI_SUCCESS;
- CopyMem (InquiryData, &ScsiDiskDevice->InquiryData, sizeof (ScsiDiskDevice->InquiryData));
+ CopyMem(InquiryData, &ScsiDiskDevice->InquiryData, sizeof (ScsiDiskDevice->InquiryData));
}
*InquiryDataSize = sizeof (ScsiDiskDevice->InquiryData);
return Status;
@@ -5540,7 +5540,7 @@ ScsiDiskInfoIdentify (
Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (ScsiDiskDevice->IdentifyData)) {
Status = EFI_SUCCESS;
- CopyMem (IdentifyData, &ScsiDiskDevice->IdentifyData, sizeof (ScsiDiskDevice->IdentifyData));
+ CopyMem(IdentifyData, &ScsiDiskDevice->IdentifyData, sizeof (ScsiDiskDevice->IdentifyData));
}
*IdentifyDataSize = sizeof (ScsiDiskDevice->IdentifyData);
return Status;
@@ -5683,7 +5683,7 @@ InitializeInstallDiskInfo (
//
// Copy the DiskInfo protocol template.
//
- CopyMem (&ScsiDiskDevice->DiskInfo, &gScsiDiskInfoProtocolTemplate, sizeof (gScsiDiskInfoProtocolTemplate));
+ CopyMem(&ScsiDiskDevice->DiskInfo, &gScsiDiskInfoProtocolTemplate, sizeof (gScsiDiskInfoProtocolTemplate));
while (!IsDevicePathEnd (DevicePathNode)) {
ChildDevicePathNode = NextDevicePathNode (DevicePathNode);
diff --git a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcBlockIoPei.c b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcBlockIoPei.c
index 8034b4853..27fc6f075 100644
--- a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcBlockIoPei.c
+++ b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcBlockIoPei.c
@@ -551,7 +551,7 @@ EmmcBlockIoPeimGetMediaInfo2 (
}
}
- CopyMem (MediaInfo, &(Private->Slot[SlotNum].Media[MediaNum]), sizeof (EFI_PEI_BLOCK_IO2_MEDIA));
+ CopyMem(MediaInfo, &(Private->Slot[SlotNum].Media[MediaNum]), sizeof (EFI_PEI_BLOCK_IO2_MEDIA));
return EFI_SUCCESS;
}
@@ -761,10 +761,10 @@ InitializeEmmcBlockIoPeim (
SlotNum = Private->SlotNum;
Slot = &Private->Slot[SlotNum];
- CopyMem (Slot, &gEmmcHcSlotTemplate, sizeof (EMMC_PEIM_HC_SLOT));
+ CopyMem(Slot, &gEmmcHcSlotTemplate, sizeof (EMMC_PEIM_HC_SLOT));
Slot->Private = Private;
Slot->EmmcHcBase = MmioBase[Index];
- CopyMem (&Slot->Capability, &Capability, sizeof (Capability));
+ CopyMem(&Slot->Capability, &Capability, sizeof (Capability));
Status = EmmcPeimIdentification (Slot);
if (EFI_ERROR(Status)) {
diff --git a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c
index 57d44b8fa..d184cc760 100644
--- a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c
+++ b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c
@@ -386,7 +386,7 @@ EmmcPeimHcGetCapability (
return Status;
}
- CopyMem (Capability, &Cap, sizeof (Cap));
+ CopyMem(Capability, &Cap, sizeof (Cap));
return EFI_SUCCESS;
}
@@ -1560,7 +1560,7 @@ Done:
return Status;
}
}
- CopyMem (Packet->EmmcStatusBlk, Response, sizeof (Response));
+ CopyMem(Packet->EmmcStatusBlk, Response, sizeof (Response));
}
}
@@ -1920,7 +1920,7 @@ EmmcPeimGetCsd (
//
// For details, refer to SD Host Controller Simplified Spec 3.0 Table 2-12.
//
- CopyMem (((UINT8*)Csd) + 1, &EmmcStatusBlk.Resp0, sizeof (EMMC_CSD) - 1);
+ CopyMem(((UINT8*)Csd) + 1, &EmmcStatusBlk.Resp0, sizeof (EMMC_CSD) - 1);
}
return Status;
diff --git a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.c b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.c
index e2b09d6a6..769e8835e 100644
--- a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.c
+++ b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.c
@@ -135,7 +135,7 @@ EmmcSendStatus (
Status = PassThru->PassThru (PassThru, Device->Slot, &Packet, NULL);
if (!EFI_ERROR(Status)) {
- CopyMem (DevStatus, &SdMmcStatusBlk.Resp0, sizeof (UINT32));
+ CopyMem(DevStatus, &SdMmcStatusBlk.Resp0, sizeof (UINT32));
}
return Status;
@@ -187,7 +187,7 @@ EmmcGetCsd (
//
// For details, refer to SD Host Controller Simplified Spec 3.0 Table 2-12.
//
- CopyMem (((UINT8*)Csd) + 1, &SdMmcStatusBlk.Resp0, sizeof (EMMC_CSD) - 1);
+ CopyMem(((UINT8*)Csd) + 1, &SdMmcStatusBlk.Resp0, sizeof (EMMC_CSD) - 1);
}
return Status;
@@ -239,7 +239,7 @@ EmmcGetCid (
//
// For details, refer to SD Host Controller Simplified Spec 3.0 Table 2-12.
//
- CopyMem (((UINT8*)Cid) + 1, &SdMmcStatusBlk.Resp0, sizeof (EMMC_CID) - 1);
+ CopyMem(((UINT8*)Cid) + 1, &SdMmcStatusBlk.Resp0, sizeof (EMMC_CID) - 1);
}
return Status;
diff --git a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDiskInfo.c b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDiskInfo.c
index e9e31aa2c..fae2732b3 100644
--- a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDiskInfo.c
+++ b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDiskInfo.c
@@ -41,7 +41,7 @@ EmmcDiskInfoInquiry (
if (*InquiryDataSize >= sizeof (Device->Cid)) {
Status = EFI_SUCCESS;
- CopyMem (InquiryData, &Device->Cid, sizeof (Device->Cid));
+ CopyMem(InquiryData, &Device->Cid, sizeof (Device->Cid));
} else {
Status = EFI_BUFFER_TOO_SMALL;
}
diff --git a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c
index b3eeb642d..b62e26a4e 100644
--- a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c
+++ b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c
@@ -226,11 +226,11 @@ GetEmmcModelName (
CHAR8 String[EMMC_MODEL_NAME_MAX_LEN];
ZeroMem (String, sizeof (String));
- CopyMem (String, &Cid->OemId, sizeof (Cid->OemId));
+ CopyMem(String, &Cid->OemId, sizeof (Cid->OemId));
String[sizeof (Cid->OemId)] = ' ';
- CopyMem (String + sizeof (Cid->OemId) + 1, Cid->ProductName, sizeof (Cid->ProductName));
+ CopyMem(String + sizeof (Cid->OemId) + 1, Cid->ProductName, sizeof (Cid->ProductName));
String[sizeof (Cid->OemId) + sizeof (Cid->ProductName)] = ' ';
- CopyMem (String + sizeof (Cid->OemId) + sizeof (Cid->ProductName) + 1, Cid->ProductSerialNumber, sizeof (Cid->ProductSerialNumber));
+ CopyMem(String + sizeof (Cid->OemId) + sizeof (Cid->ProductName) + 1, Cid->ProductSerialNumber, sizeof (Cid->ProductSerialNumber));
AsciiStrToUnicodeStrS (String, Device->ModelName, sizeof (Device->ModelName) / sizeof (Device->ModelName[0]));
@@ -325,7 +325,7 @@ DiscoverAllPartitions (
for (Index = 0; Index < EMMC_MAX_PARTITIONS; Index++) {
Partition = &Device->Partition[Index];
- CopyMem (Partition, &mEmmcPartitionTemplate, sizeof (EMMC_PARTITION));
+ CopyMem(Partition, &mEmmcPartitionTemplate, sizeof (EMMC_PARTITION));
Partition->Device = Device;
InitializeListHead (&Partition->Queue);
Partition->BlockIo.Media = &Partition->BlockMedia;
diff --git a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdBlockIoPei.c b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdBlockIoPei.c
index cd416bd52..fb99d679f 100644
--- a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdBlockIoPei.c
+++ b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdBlockIoPei.c
@@ -398,7 +398,7 @@ SdBlockIoPeimGetMediaInfo2 (
return Status;
}
- CopyMem (MediaInfo, &(Private->Slot[DeviceIndex - 1].Media), sizeof (EFI_PEI_BLOCK_IO2_MEDIA));
+ CopyMem(MediaInfo, &(Private->Slot[DeviceIndex - 1].Media), sizeof (EFI_PEI_BLOCK_IO2_MEDIA));
return EFI_SUCCESS;
}
@@ -608,10 +608,10 @@ InitializeSdBlockIoPeim (
SlotNum = Private->SlotNum;
Slot = &Private->Slot[SlotNum];
- CopyMem (Slot, &gSdHcSlotTemplate, sizeof (SD_PEIM_HC_SLOT));
+ CopyMem(Slot, &gSdHcSlotTemplate, sizeof (SD_PEIM_HC_SLOT));
Slot->Private = Private;
Slot->SdHcBase = MmioBase[Index];
- CopyMem (&Slot->Capability, &Capability, sizeof (Capability));
+ CopyMem(&Slot->Capability, &Capability, sizeof (Capability));
Status = SdPeimIdentification (Slot);
if (EFI_ERROR(Status)) {
diff --git a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c
index fdb9acea5..d43d3a987 100644
--- a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c
+++ b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c
@@ -386,7 +386,7 @@ SdPeimHcGetCapability (
return Status;
}
- CopyMem (Capability, &Cap, sizeof (Cap));
+ CopyMem(Capability, &Cap, sizeof (Cap));
return EFI_SUCCESS;
}
@@ -1565,7 +1565,7 @@ Done:
return Status;
}
}
- CopyMem (Packet->SdStatusBlk, Response, sizeof (Response));
+ CopyMem(Packet->SdStatusBlk, Response, sizeof (Response));
}
}
@@ -2049,7 +2049,7 @@ SdPeimGetCsd (
//
// For details, refer to SD Host Controller Simplified Spec 3.0 Table 2-12.
//
- CopyMem (((UINT8*)Csd) + 1, &SdStatusBlk.Resp0, sizeof (SD_CSD) - 1);
+ CopyMem(((UINT8*)Csd) + 1, &SdStatusBlk.Resp0, sizeof (SD_CSD) - 1);
}
return Status;
diff --git a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
index a84b1f546..6836966a7 100644
--- a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
+++ b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c
@@ -178,7 +178,7 @@ SdSendStatus (
Status = PassThru->PassThru (PassThru, Device->Slot, &Packet, NULL);
if (!EFI_ERROR(Status)) {
- CopyMem (DevStatus, &SdMmcStatusBlk.Resp0, sizeof (UINT32));
+ CopyMem(DevStatus, &SdMmcStatusBlk.Resp0, sizeof (UINT32));
}
return Status;
}
@@ -230,7 +230,7 @@ SdGetCsd (
//
// For details, refer to SD Host Controller Simplified Spec 3.0 Table 2-12.
//
- CopyMem (((UINT8*)Csd) + 1, &SdMmcStatusBlk.Resp0, sizeof (SD_CSD) - 1);
+ CopyMem(((UINT8*)Csd) + 1, &SdMmcStatusBlk.Resp0, sizeof (SD_CSD) - 1);
}
return Status;
@@ -283,7 +283,7 @@ SdGetCid (
//
// For details, refer to SD Host Controller Simplified Spec 3.0 Table 2-12.
//
- CopyMem (((UINT8*)Cid) + 1, &SdMmcStatusBlk.Resp0, sizeof (SD_CID) - 1);
+ CopyMem(((UINT8*)Cid) + 1, &SdMmcStatusBlk.Resp0, sizeof (SD_CID) - 1);
}
return Status;
diff --git a/MdeModulePkg/Bus/Sd/SdDxe/SdDiskInfo.c b/MdeModulePkg/Bus/Sd/SdDxe/SdDiskInfo.c
index 6563f7232..58feeaf19 100644
--- a/MdeModulePkg/Bus/Sd/SdDxe/SdDiskInfo.c
+++ b/MdeModulePkg/Bus/Sd/SdDxe/SdDiskInfo.c
@@ -39,7 +39,7 @@ SdDiskInfoInquiry (
if (*InquiryDataSize >= sizeof (Device->Cid)) {
Status = EFI_SUCCESS;
- CopyMem (InquiryData, &Device->Cid, sizeof (Device->Cid));
+ CopyMem(InquiryData, &Device->Cid, sizeof (Device->Cid));
} else {
Status = EFI_BUFFER_TOO_SMALL;
}
diff --git a/MdeModulePkg/Bus/Sd/SdDxe/SdDxe.c b/MdeModulePkg/Bus/Sd/SdDxe/SdDxe.c
index 50a3df4ca..c2fb5250a 100644
--- a/MdeModulePkg/Bus/Sd/SdDxe/SdDxe.c
+++ b/MdeModulePkg/Bus/Sd/SdDxe/SdDxe.c
@@ -156,11 +156,11 @@ GetSdModelName (
CHAR8 String[SD_MODEL_NAME_MAX_LEN];
ZeroMem (String, sizeof (String));
- CopyMem (String, Cid->OemId, sizeof (Cid->OemId));
+ CopyMem(String, Cid->OemId, sizeof (Cid->OemId));
String[sizeof (Cid->OemId)] = ' ';
- CopyMem (String + sizeof (Cid->OemId) + 1, Cid->ProductName, sizeof (Cid->ProductName));
+ CopyMem(String + sizeof (Cid->OemId) + 1, Cid->ProductName, sizeof (Cid->ProductName));
String[sizeof (Cid->OemId) + sizeof (Cid->ProductName)] = ' ';
- CopyMem (String + sizeof (Cid->OemId) + sizeof (Cid->ProductName) + 1, Cid->ProductSerialNumber, sizeof (Cid->ProductSerialNumber));
+ CopyMem(String + sizeof (Cid->OemId) + sizeof (Cid->ProductName) + 1, Cid->ProductSerialNumber, sizeof (Cid->ProductSerialNumber));
AsciiStrToUnicodeStrS (String, Device->ModelName, sizeof (Device->ModelName) / sizeof (Device->ModelName[0]));
diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c
index cd6199930..ec63fdffb 100644
--- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c
+++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c
@@ -901,7 +901,7 @@ UfsBlockIoPeimGetMediaInfo2 (
}
Lun = DeviceIndex - 1;
- CopyMem (MediaInfo, &(Private->Media[Lun]), sizeof (EFI_PEI_BLOCK_IO2_MEDIA));
+ CopyMem(MediaInfo, &(Private->Media[Lun]), sizeof (EFI_PEI_BLOCK_IO2_MEDIA));
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
index d246f3875..e91f49270 100644
--- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
@@ -296,7 +296,7 @@ UfsInitCommandUpiu (
SwapLittleEndianToBigEndian ((UINT8*)&ExpDataTranLen, sizeof (ExpDataTranLen));
Command->ExpDataTranLen = ExpDataTranLen;
- CopyMem (Command->Cdb, Cdb, CdbLength);
+ CopyMem(Command->Cdb, Cdb, CdbLength);
return EFI_SUCCESS;
}
@@ -400,7 +400,7 @@ UfsInitQueryRequestUpiu (
}
if (Opcode == UtpQueryFuncOpcodeWrDesc) {
- CopyMem (QueryReq + 1, Data, DataSize);
+ CopyMem(QueryReq + 1, Data, DataSize);
SwapLittleEndianToBigEndian ((UINT8*)&DataSize, sizeof (UINT16));
QueryReq->DataSegLen = (UINT16)DataSize;
@@ -859,7 +859,7 @@ UfsRwDeviceDesc (
goto Exit;
}
- CopyMem (Packet.InDataBuffer, (QueryResp + 1), ReturnDataSize);
+ CopyMem(Packet.InDataBuffer, (QueryResp + 1), ReturnDataSize);
Packet.InTransferLength = ReturnDataSize;
} else {
Packet.OutTransferLength = ReturnDataSize;
@@ -1176,7 +1176,7 @@ UfsExecScsiCmds (
// Make sure the hardware device does not return more data than expected.
//
if (SenseDataLen <= Packet->SenseDataLength) {
- CopyMem (Packet->SenseData, Response->SenseData, SenseDataLen);
+ CopyMem(Packet->SenseData, Response->SenseData, SenseDataLen);
Packet->SenseDataLength = (UINT8)SenseDataLen;
} else {
Packet->SenseDataLength = 0;
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsDevConfigProtocol.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsDevConfigProtocol.c
index 2df89cbdc..eb6490135 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsDevConfigProtocol.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsDevConfigProtocol.c
@@ -165,7 +165,7 @@ UfsRwUfsAttribute (
}
if (!Read) {
- CopyMem (&Attribute32, Attribute, *AttrSize);
+ CopyMem(&Attribute32, Attribute, *AttrSize);
}
Status = UfsRwAttributes (
@@ -178,7 +178,7 @@ UfsRwUfsAttribute (
);
if (!EFI_ERROR(Status)) {
if (Read) {
- CopyMem (Attribute, &Attribute32, *AttrSize);
+ CopyMem(Attribute, &Attribute32, *AttrSize);
}
} else {
*AttrSize = 0;
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
index bc8ad96ce..f1b00643f 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
@@ -184,7 +184,7 @@ UfsPassThruPassThru (
//
// For UFS 2.0 compatible device, 0 is always used to represent the location of the UFS device.
//
- SetMem (mUfsTargetId, TARGET_MAX_BYTES, 0x00);
+ SetMem(mUfsTargetId, TARGET_MAX_BYTES, 0x00);
if ((Target == NULL) || (CompareMem(Target, mUfsTargetId, TARGET_MAX_BYTES) != 0)) {
return EFI_INVALID_PARAMETER;
}
@@ -271,12 +271,12 @@ UfsPassThruGetNextTargetLun (
}
UfsLun = 0;
- SetMem (mUfsTargetId, TARGET_MAX_BYTES, 0xFF);
+ SetMem(mUfsTargetId, TARGET_MAX_BYTES, 0xFF);
if (CompareMem (*Target, mUfsTargetId, TARGET_MAX_BYTES) == 0) {
//
// If the array is all 0xFF's, return the first exposed Lun to caller.
//
- SetMem (*Target, TARGET_MAX_BYTES, 0x00);
+ SetMem(*Target, TARGET_MAX_BYTES, 0x00);
for (Index = 0; Index < UFS_MAX_LUNS; Index++) {
if ((Private->Luns.BitMask & (BIT0 << Index)) != 0) {
UfsLun = Private->Luns.Lun[Index];
@@ -297,7 +297,7 @@ UfsPassThruGetNextTargetLun (
}
}
- SetMem (mUfsTargetId, TARGET_MAX_BYTES, 0x00);
+ SetMem(mUfsTargetId, TARGET_MAX_BYTES, 0x00);
if (CompareMem (*Target, mUfsTargetId, TARGET_MAX_BYTES) == 0) {
if (((UINT8*)Lun)[0] == UFS_WLUN_PREFIX) {
UfsLun = BIT7 | (((UINT8*)Lun)[1] & 0xFF);
@@ -393,7 +393,7 @@ UfsPassThruBuildDevicePath (
//
// Validate parameters passed in.
//
- SetMem (mUfsTargetId, TARGET_MAX_BYTES, 0x00);
+ SetMem(mUfsTargetId, TARGET_MAX_BYTES, 0x00);
if (CompareMem (Target, mUfsTargetId, TARGET_MAX_BYTES) != 0) {
return EFI_INVALID_PARAMETER;
}
@@ -511,7 +511,7 @@ UfsPassThruGetTargetLun (
return EFI_NOT_FOUND;
}
- SetMem (*Target, TARGET_MAX_BYTES, 0x00);
+ SetMem(*Target, TARGET_MAX_BYTES, 0x00);
*Lun = 0;
if ((UfsLun & BIT7) == BIT7) {
((UINT8*)Lun)[0] = UFS_WLUN_PREFIX;
@@ -611,9 +611,9 @@ UfsPassThruGetNextTarget (
return EFI_INVALID_PARAMETER;
}
- SetMem (mUfsTargetId, TARGET_MAX_BYTES, 0xFF);
+ SetMem(mUfsTargetId, TARGET_MAX_BYTES, 0xFF);
if (CompareMem(*Target, mUfsTargetId, TARGET_MAX_BYTES) == 0) {
- SetMem (*Target, TARGET_MAX_BYTES, 0x00);
+ SetMem(*Target, TARGET_MAX_BYTES, 0x00);
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
index e37f11c61..0aef28291 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
@@ -367,7 +367,7 @@ UfsInitCommandUpiu (
SwapLittleEndianToBigEndian ((UINT8*)&ExpDataTranLen, sizeof (ExpDataTranLen));
Command->ExpDataTranLen = ExpDataTranLen;
- CopyMem (Command->Cdb, Cdb, CdbLength);
+ CopyMem(Command->Cdb, Cdb, CdbLength);
return EFI_SUCCESS;
}
@@ -467,7 +467,7 @@ UfsInitQueryRequestUpiu (
}
if (Opcode == UtpQueryFuncOpcodeWrDesc) {
- CopyMem (QueryReq + 1, Data, DataSize);
+ CopyMem(QueryReq + 1, Data, DataSize);
SwapLittleEndianToBigEndian ((UINT8*)&DataSize, sizeof (UINT16));
QueryReq->DataSegLen = (UINT16)DataSize;
@@ -851,7 +851,7 @@ UfsGetReturnDataFromQueryResponse (
return EFI_DEVICE_ERROR;
}
- CopyMem (Packet->DataBuffer, (QueryResp + 1), ReturnDataSize);
+ CopyMem(Packet->DataBuffer, (QueryResp + 1), ReturnDataSize);
Packet->TransferLength = ReturnDataSize;
break;
case UtpQueryFuncOpcodeWrDesc:
@@ -863,13 +863,13 @@ UfsGetReturnDataFromQueryResponse (
case UtpQueryFuncOpcodeSetFlag:
case UtpQueryFuncOpcodeClrFlag:
case UtpQueryFuncOpcodeTogFlag:
- CopyMem (Packet->DataBuffer, &QueryResp->Tsf.Value, sizeof (UINT8));
+ CopyMem(Packet->DataBuffer, &QueryResp->Tsf.Value, sizeof (UINT8));
break;
case UtpQueryFuncOpcodeRdAttr:
case UtpQueryFuncOpcodeWrAttr:
ReturnData = QueryResp->Tsf.Value;
SwapLittleEndianToBigEndian ((UINT8*) &ReturnData, sizeof (UINT32));
- CopyMem (Packet->DataBuffer, &ReturnData, sizeof (UINT32));
+ CopyMem(Packet->DataBuffer, &ReturnData, sizeof (UINT32));
break;
default:
return EFI_INVALID_PARAMETER;
@@ -1340,7 +1340,7 @@ UfsReconcileDataTransferBuffer (
//
if (TransReq->AlignedDataBuf != NULL) {
if (TransReq->Packet->DataDirection == EFI_EXT_SCSI_DATA_DIRECTION_READ) {
- CopyMem (TransReq->Packet->InDataBuffer, TransReq->AlignedDataBuf, TransReq->Packet->InTransferLength);
+ CopyMem(TransReq->Packet->InDataBuffer, TransReq->AlignedDataBuf, TransReq->Packet->InTransferLength);
}
//
// Wipe out the transfer buffer in case it contains sensitive data.
@@ -1404,7 +1404,7 @@ UfsPrepareDataTransferBuffer (
if (DataBuf == NULL) {
return EFI_DEVICE_ERROR;
}
- CopyMem (DataBuf, TransReq->Packet->OutDataBuffer, TransReq->Packet->OutTransferLength);
+ CopyMem(DataBuf, TransReq->Packet->OutDataBuffer, TransReq->Packet->OutTransferLength);
TransReq->AlignedDataBuf = DataBuf;
TransReq->AlignedDataBufSize = DataLen;
} else {
@@ -1573,7 +1573,7 @@ UfsExecScsiCmds (
// Make sure the hardware device does not return more data than expected.
//
if (SenseDataLen <= Packet->SenseDataLength) {
- CopyMem (Packet->SenseData, Response->SenseData, SenseDataLen);
+ CopyMem(Packet->SenseData, Response->SenseData, SenseDataLen);
Packet->SenseDataLength = (UINT8)SenseDataLen;
} else {
Packet->SenseDataLength = 0;
@@ -2335,7 +2335,7 @@ ProcessAsyncTaskList (
// Make sure the hardware device does not return more data than expected.
//
if (SenseDataLen <= Packet->SenseDataLength) {
- CopyMem (Packet->SenseData, Response->SenseData, SenseDataLen);
+ CopyMem(Packet->SenseData, Response->SenseData, SenseDataLen);
Packet->SenseDataLength = (UINT8)SenseDataLen;
} else {
Packet->SenseDataLength = 0;
diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c b/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c
index 9073b2670..6c829c4fe 100644
--- a/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c
+++ b/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c
@@ -124,7 +124,7 @@ BotCommandPhase (
Cbw.Lun = 0;
Cbw.CmdLen = CommandSize;
- CopyMem (Cbw.CmdBlock, Command, CommandSize);
+ CopyMem(Cbw.CmdBlock, Command, CommandSize);
DataSize = sizeof (CBW);
diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c
index 1da570ac3..f597ea1f0 100644
--- a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c
+++ b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c
@@ -234,22 +234,22 @@ InitUsbBot (
}
}
- CopyMem (
+ CopyMem(
&(PeiBotDevice->BlkIoPpi),
&mRecoveryBlkIoPpi,
sizeof (EFI_PEI_RECOVERY_BLOCK_IO_PPI)
);
- CopyMem (
+ CopyMem(
&(PeiBotDevice->BlkIo2Ppi),
&mRecoveryBlkIo2Ppi,
sizeof (EFI_PEI_RECOVERY_BLOCK_IO2_PPI)
);
- CopyMem (
+ CopyMem(
&(PeiBotDevice->BlkIoPpiList),
&mPpiList[0],
sizeof (EFI_PEI_PPI_DESCRIPTOR)
);
- CopyMem (
+ CopyMem(
&(PeiBotDevice->BlkIo2PpiList),
&mPpiList[1],
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -374,7 +374,7 @@ BotGetMediaInfo (
return EFI_DEVICE_ERROR;
}
- CopyMem (
+ CopyMem(
MediaInfo,
&(PeiBotDev->Media),
sizeof (EFI_PEI_BLOCK_IO_MEDIA)
@@ -649,7 +649,7 @@ BotGetMediaInfo2 (
return Status;
}
- CopyMem (
+ CopyMem(
MediaInfo,
&(PeiBotDev->Media2),
sizeof (EFI_PEI_BLOCK_IO2_MEDIA)
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
index bed26a7bc..a8a19cc80 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
@@ -542,7 +542,7 @@ UsbIoGetDeviceDescriptor (
UsbIf = USB_INTERFACE_FROM_USBIO (This);
Dev = UsbIf->Device;
- CopyMem (Descriptor, &Dev->DevDesc->Desc, sizeof (EFI_USB_DEVICE_DESCRIPTOR));
+ CopyMem(Descriptor, &Dev->DevDesc->Desc, sizeof (EFI_USB_DEVICE_DESCRIPTOR));
gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS;
@@ -587,7 +587,7 @@ UsbIoGetActiveConfigDescriptor (
goto ON_EXIT;
}
- CopyMem (Descriptor, &(Dev->ActiveConfig->Desc), sizeof (EFI_USB_CONFIG_DESCRIPTOR));
+ CopyMem(Descriptor, &(Dev->ActiveConfig->Desc), sizeof (EFI_USB_CONFIG_DESCRIPTOR));
ON_EXIT:
gBS->RestoreTPL (OldTpl);
@@ -622,7 +622,7 @@ UsbIoGetInterfaceDescriptor (
OldTpl = gBS->RaiseTPL (USB_BUS_TPL);
UsbIf = USB_INTERFACE_FROM_USBIO (This);
- CopyMem (Descriptor, &(UsbIf->IfSetting->Desc), sizeof (EFI_USB_INTERFACE_DESCRIPTOR));
+ CopyMem(Descriptor, &(UsbIf->IfSetting->Desc), sizeof (EFI_USB_INTERFACE_DESCRIPTOR));
gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS;
@@ -666,7 +666,7 @@ UsbIoGetEndpointDescriptor (
return EFI_NOT_FOUND;
}
- CopyMem (
+ CopyMem(
Descriptor,
&(UsbIf->IfSetting->Endpoints[Index]->Desc),
sizeof (EFI_USB_ENDPOINT_DESCRIPTOR)
@@ -787,7 +787,7 @@ UsbIoGetStringDescriptor (
goto FREE_STR;
}
- CopyMem (Buf, StrDesc->String, StrDesc->Length - 2);
+ CopyMem(Buf, StrDesc->String, StrDesc->Length - 2);
*String = (CHAR16 *) Buf;
Status = EFI_SUCCESS;
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
index bc8aed603..0ce9285a4 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
@@ -236,7 +236,7 @@ UsbCreateDesc (
return NULL;
}
- CopyMem (Desc, Head, (UINTN) DescLen);
+ CopyMem(Desc, Head, (UINTN) DescLen);
*Consumed = Offset;
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 6c344159f..1146b6324 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -110,7 +110,7 @@ UsbCreateInterface (
ASSERT (IfDesc->ActiveIndex < USB_MAX_INTERFACE_SETTING);
UsbIf->IfSetting = IfDesc->Settings[IfDesc->ActiveIndex];
- CopyMem (
+ CopyMem(
&(UsbIf->UsbIo),
&mUsbIoProtocol,
sizeof (EFI_USB_IO_PROTOCOL)
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
index 315bac7f3..8d7be4e0f 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
@@ -553,7 +553,7 @@ UsbOnHubInterrupt (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (HubIf->ChangeMap, Data, DataLength);
+ CopyMem(HubIf->ChangeMap, Data, DataLength);
gBS->SignalEvent (HubIf->HubNotify);
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
index 94b3cd62d..95b242130 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
@@ -643,7 +643,7 @@ GetUsbDPFromFullDP (
//
UsbDevicePathPtr = AllocateZeroPool(Size + sizeof (EFI_DEVICE_PATH_PROTOCOL));
ASSERT (UsbDevicePathPtr != NULL);
- CopyMem (UsbDevicePathPtr, UsbDevicePathBeginPtr, Size);
+ CopyMem(UsbDevicePathPtr, UsbDevicePathBeginPtr, Size);
//
// Append end device path node
//
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c
index e3c16eecc..8be49066b 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c
@@ -264,12 +264,12 @@ PeiHubEnumeration (
NewPeiUsbDevice->DeviceAddress = 0;
NewPeiUsbDevice->MaxPacketSize0 = 8;
NewPeiUsbDevice->DataToggle = 0;
- CopyMem (
+ CopyMem(
&(NewPeiUsbDevice->UsbIoPpi),
&mUsbIoPpi,
sizeof (PEI_USB_IO_PPI)
);
- CopyMem (
+ CopyMem(
&(NewPeiUsbDevice->UsbIoPpiList),
&mUsbIoPpiList,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -367,7 +367,7 @@ PeiHubEnumeration (
if (EFI_ERROR(Status)) {
return EFI_OUT_OF_RESOURCES;
}
- CopyMem ((VOID *)(UINTN)AllocateAddress, NewPeiUsbDevice, sizeof (PEI_USB_DEVICE));
+ CopyMem((VOID *)(UINTN)AllocateAddress, NewPeiUsbDevice, sizeof (PEI_USB_DEVICE));
NewPeiUsbDevice = (PEI_USB_DEVICE *) ((UINTN) AllocateAddress);
NewPeiUsbDevice->AllocateAddress = (UINTN) AllocateAddress;
NewPeiUsbDevice->UsbIoPpiList.Ppi = &NewPeiUsbDevice->UsbIoPpi;
@@ -491,12 +491,12 @@ PeiUsbEnumeration (
PeiUsbDevice->DeviceAddress = 0;
PeiUsbDevice->MaxPacketSize0 = 8;
PeiUsbDevice->DataToggle = 0;
- CopyMem (
+ CopyMem(
&(PeiUsbDevice->UsbIoPpi),
&mUsbIoPpi,
sizeof (PEI_USB_IO_PPI)
);
- CopyMem (
+ CopyMem(
&(PeiUsbDevice->UsbIoPpiList),
&mUsbIoPpiList,
sizeof (EFI_PEI_PPI_DESCRIPTOR)
@@ -608,7 +608,7 @@ PeiUsbEnumeration (
if (EFI_ERROR(Status)) {
return EFI_OUT_OF_RESOURCES;
}
- CopyMem ((VOID *)(UINTN)AllocateAddress, PeiUsbDevice, sizeof (PEI_USB_DEVICE));
+ CopyMem((VOID *)(UINTN)AllocateAddress, PeiUsbDevice, sizeof (PEI_USB_DEVICE));
PeiUsbDevice = (PEI_USB_DEVICE *) ((UINTN) AllocateAddress);
PeiUsbDevice->AllocateAddress = (UINTN) AllocateAddress;
PeiUsbDevice->UsbIoPpiList.Ppi = &PeiUsbDevice->UsbIoPpi;
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
index de30b7769..fa988b5b7 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
@@ -730,7 +730,7 @@ USBKeyboardReadKeyStroke (
}
}
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS;
}
}
@@ -772,7 +772,7 @@ USBKeyboardWaitForKey (
//
// If there is pending key, signal the event.
//
- CopyMem (
+ CopyMem(
&KeyData,
UsbKeyboardDevice->EfiKeyQueue.Buffer[UsbKeyboardDevice->EfiKeyQueue.Head],
sizeof (EFI_KEY_DATA)
@@ -1119,7 +1119,7 @@ USBKeyboardRegisterKeyNotify (
NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
- CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&UsbKeyboardDevice->NotifyList, &NewNotify->NotifyEntry);
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
index f8d075436..a46403818 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
@@ -622,7 +622,7 @@ SetKeyboardLayoutEvent (
//
// Copy from HII keyboard layout package binary for alignment
//
- CopyMem (&TempKey, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
+ CopyMem(&TempKey, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
//
// Fill the key into KeyConvertionTable, whose index is calculated from USB keycode.
@@ -634,7 +634,7 @@ SetKeyboardLayoutEvent (
FreePool(KeyboardLayout);
return;
}
- CopyMem (TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
+ CopyMem(TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
//
// For non-spacing key, create the list with a non-spacing key followed by physical keys.
@@ -649,7 +649,7 @@ SetKeyboardLayoutEvent (
KeyCount = 0;
NsKey = KeyDescriptor + 1;
for (Index2 = (UINT8) Index + 1; Index2 < KeyboardLayout->DescriptorCount; Index2++) {
- CopyMem (&TempKey, NsKey, sizeof (EFI_KEY_DESCRIPTOR));
+ CopyMem(&TempKey, NsKey, sizeof (EFI_KEY_DESCRIPTOR));
if (TempKey.Modifier == EFI_NS_KEY_DEPENDENCY_MODIFIER) {
KeyCount++;
} else {
@@ -681,7 +681,7 @@ SetKeyboardLayoutEvent (
//
TableEntry = GetKeyDescriptor (UsbKeyboardDevice, 0x58);
KeyDescriptor = GetKeyDescriptor (UsbKeyboardDevice, 0x28);
- CopyMem (TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
+ CopyMem(TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
FreePool(KeyboardLayout);
}
@@ -1807,7 +1807,7 @@ Enqueue (
Queue->Head = (Queue->Head + 1) % (MAX_KEY_ALLOWED + 1);
}
- CopyMem (Queue->Buffer[Queue->Tail], Item, ItemSize);
+ CopyMem(Queue->Buffer[Queue->Tail], Item, ItemSize);
//
// Adjust the tail pointer of the FIFO keyboard buffer.
@@ -1840,7 +1840,7 @@ Dequeue (
return EFI_DEVICE_ERROR;
}
- CopyMem (Item, Queue->Buffer[Queue->Head], ItemSize);
+ CopyMem(Item, Queue->Buffer[Queue->Head], ItemSize);
//
// Adjust the head pointer of the FIFO keyboard buffer.
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
index cf8284ad2..a4e3cde52 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
@@ -689,7 +689,7 @@ UsbBootDetectMedia (
Media = &UsbMass->BlockIoMedia;
- CopyMem (&OldMedia, &(UsbMass->BlockIoMedia), sizeof (EFI_BLOCK_IO_MEDIA));
+ CopyMem(&OldMedia, &(UsbMass->BlockIoMedia), sizeof (EFI_BLOCK_IO_MEDIA));
CmdSet = ((EFI_USB_INTERFACE_DESCRIPTOR *) (UsbMass->Context))->InterfaceSubClass;
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
index e1bb499e2..cc3c0f97f 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
@@ -94,7 +94,7 @@ UsbBotInit (
(UsbBot->BulkOutEndpoint == NULL)) {
UsbBot->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1;
- CopyMem (UsbBot->BulkOutEndpoint, &EndPoint, sizeof(EndPoint));
+ CopyMem(UsbBot->BulkOutEndpoint, &EndPoint, sizeof(EndPoint));
}
}
@@ -172,7 +172,7 @@ UsbBotSendCommand (
Cbw.CmdLen = CmdLen;
ZeroMem (Cbw.CmdBlock, USB_BOT_MAX_CMDLEN);
- CopyMem (Cbw.CmdBlock, Cmd, CmdLen);
+ CopyMem(Cbw.CmdBlock, Cmd, CmdLen);
Result = 0;
DataLen = sizeof (USB_BOT_CBW);
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c
index 8c2150ac3..f927a0f08 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c
@@ -557,7 +557,7 @@ UsbCbiResetDevice (
//
// Fill in the reset command.
//
- SetMem (ResetCmd, USB_CBI_RESET_CMD_LEN, 0xFF);
+ SetMem(ResetCmd, USB_CBI_RESET_CMD_LEN, 0xFF);
ResetCmd[0] = 0x1D;
ResetCmd[1] = 0x04;
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.c
index 44e1d0c01..69924110f 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.c
@@ -30,7 +30,7 @@ InitializeDiskInfo (
IN USB_MASS_DEVICE *UsbMass
)
{
- CopyMem (&UsbMass->DiskInfo, &gUsbDiskInfoProtocolTemplate, sizeof (gUsbDiskInfoProtocolTemplate));
+ CopyMem(&UsbMass->DiskInfo, &gUsbDiskInfoProtocolTemplate, sizeof (gUsbDiskInfoProtocolTemplate));
}
@@ -66,7 +66,7 @@ UsbDiskInfoInquiry (
Status = EFI_BUFFER_TOO_SMALL;
if (*InquiryDataSize >= sizeof (UsbMass->InquiryData)) {
Status = EFI_SUCCESS;
- CopyMem (InquiryData, &UsbMass->InquiryData, sizeof (UsbMass->InquiryData));
+ CopyMem(InquiryData, &UsbMass->InquiryData, sizeof (UsbMass->InquiryData));
}
*InquiryDataSize = sizeof (UsbMass->InquiryData);
return Status;
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/MouseHid.c b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/MouseHid.c
index d7805ad3d..dfbe6c56e 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/MouseHid.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/MouseHid.c
@@ -95,7 +95,7 @@ GetNextHidItem (
// 2-byte data
//
if ((EndPos - StartPos) >= 2) {
- CopyMem (&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
+ CopyMem(&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
StartPos += 2;
return StartPos;
}
@@ -106,7 +106,7 @@ GetNextHidItem (
//
HidItem->Size = 4;
if ((EndPos - StartPos) >= 4) {
- CopyMem (&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
+ CopyMem(&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
StartPos += 4;
return StartPos;
}
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
index cfdf0c6cc..b15cf650e 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
@@ -217,7 +217,7 @@ USBMouseAbsolutePointerDriverBindingStart (
//
// We only care interrupt endpoint here
//
- CopyMem (&UsbMouseAbsolutePointerDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor));
+ CopyMem(&UsbMouseAbsolutePointerDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor));
Found = TRUE;
break;
}
@@ -888,7 +888,7 @@ GetMouseAbsolutePointerState (
// Retrieve mouse state from USB_MOUSE_ABSOLUTE_POINTER_DEV,
// which was filled by OnMouseInterruptComplete()
//
- CopyMem (
+ CopyMem(
State,
&MouseAbsolutePointerDev->State,
sizeof (EFI_ABSOLUTE_POINTER_STATE)
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c
index de44aec51..7e512f72c 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c
@@ -95,7 +95,7 @@ GetNextHidItem (
// 2-byte data
//
if ((EndPos - StartPos) >= 2) {
- CopyMem (&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
+ CopyMem(&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
StartPos += 2;
return StartPos;
}
@@ -106,7 +106,7 @@ GetNextHidItem (
//
HidItem->Size = 4;
if ((EndPos - StartPos) >= 4) {
- CopyMem (&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
+ CopyMem(&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
StartPos += 4;
return StartPos;
}
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
index 402528812..1d7f0f997 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
@@ -871,7 +871,7 @@ GetMouseState (
//
// Retrieve mouse state from USB_MOUSE_DEV, which was filled by OnMouseInterruptComplete()
//
- CopyMem (
+ CopyMem(
MouseState,
&MouseDev->State,
sizeof (EFI_SIMPLE_POINTER_STATE)
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c
index 7c98d0e8e..2de07f37d 100644
--- a/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c
+++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c
@@ -53,7 +53,7 @@ GrowDepexStack (
//
// Copy to Old Stack to the New Stack
//
- CopyMem (
+ CopyMem(
NewStack,
mDepexEvaluationStack,
(mDepexEvaluationStackEnd - mDepexEvaluationStack) * sizeof (BOOLEAN)
@@ -181,7 +181,7 @@ CorePreProcessDepex (
}
if (DriverEntry->Before || DriverEntry->After) {
- CopyMem (&DriverEntry->BeforeAfterGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverEntry->BeforeAfterGuid, Iterator + 1, sizeof (EFI_GUID));
}
return EFI_SUCCESS;
@@ -295,7 +295,7 @@ CoreIsSchedulable (
// Push operator is followed by a GUID. Test to see if the GUID protocol
// is installed and push the boolean result on the stack.
//
- CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
Status = CoreLocateProtocol (&DriverGuid, NULL, &Interface);
@@ -401,7 +401,7 @@ CoreIsSchedulable (
return Operator;
case EFI_DEP_REPLACE_TRUE:
- CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
DEBUG ((DEBUG_DISPATCH, " PUSH GUID(%g) = TRUE\n", &DriverGuid));
Status = PushBool (TRUE);
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
index 57e72324a..f11a0b60b 100644
--- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
@@ -1124,14 +1124,14 @@ CoreProcessFvImageFile (
//
// Copy the used bytes and fill the rest with the erase value.
//
- CopyMem (AlignedBuffer, FvHeader, (UINTN) FvUsedSize);
- SetMem (
+ CopyMem(AlignedBuffer, FvHeader, (UINTN) FvUsedSize);
+ SetMem(
(UINT8 *) AlignedBuffer + FvUsedSize,
(UINTN) (BufferSize - FvUsedSize),
EraseByte
);
} else {
- CopyMem (AlignedBuffer, Buffer, BufferSize);
+ CopyMem(AlignedBuffer, Buffer, BufferSize);
}
FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) AlignedBuffer;
FreePool(Buffer);
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
index f80c54ab2..a1e34cdf2 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
@@ -170,14 +170,14 @@ GenericProtocolNotify (
// Copy all the registered Image to new gRuntime protocol
//
for (Link = gRuntimeTemplate.ImageHead.ForwardLink; Link != &gRuntimeTemplate.ImageHead; Link = TempLinkNode.ForwardLink) {
- CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));
+ CopyMem(&TempLinkNode, Link, sizeof(LIST_ENTRY));
InsertTailList (&gRuntime->ImageHead, Link);
}
//
// Copy all the registered Event to new gRuntime protocol
//
for (Link = gRuntimeTemplate.EventHead.ForwardLink; Link != &gRuntimeTemplate.EventHead; Link = TempLinkNode.ForwardLink) {
- CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));
+ CopyMem(&TempLinkNode, Link, sizeof(LIST_ENTRY));
InsertTailList (&gRuntime->EventHead, Link);
}
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
index dfdc37aa0..de297a4b7 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
@@ -222,7 +222,7 @@ GetFwVolHeader (
//
// Copy the standard header into the buffer
//
- CopyMem (*FwVolHeader, &TempFvh, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
+ CopyMem(*FwVolHeader, &TempFvh, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
//
// Read the rest of the header
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
index d2df8f8d7..677d6c0b0 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
@@ -396,7 +396,7 @@ FvReadFile (
//
// Copy data into callers buffer
//
- CopyMem (*Buffer, SrcPtr, FileSize);
+ CopyMem(*Buffer, SrcPtr, FileSize);
return Status;
}
diff --git a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
index 652f2ba7b..455280e5f 100644
--- a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
+++ b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
@@ -249,7 +249,7 @@ FwVolBlockReadBlock (
//
// Perform read operation
//
- CopyMem (Buffer, LbaOffset, NumOfBytesRead);
+ CopyMem(Buffer, LbaOffset, NumOfBytesRead);
if (NumOfBytesRead == *NumBytes) {
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
index 0bfe0da83..bf4dbaf6b 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -437,7 +437,7 @@ CoreInsertGcdMapEntry (
if (BaseAddress > Entry->BaseAddress) {
ASSERT (BottomEntry->Signature == 0);
- CopyMem (BottomEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
+ CopyMem(BottomEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
Entry->BaseAddress = BaseAddress;
BottomEntry->EndAddress = BaseAddress - 1;
InsertTailList (Link, &BottomEntry->Link);
@@ -446,7 +446,7 @@ CoreInsertGcdMapEntry (
if ((BaseAddress + Length - 1) < Entry->EndAddress) {
ASSERT (TopEntry->Signature == 0);
- CopyMem (TopEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
+ CopyMem(TopEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
TopEntry->BaseAddress = BaseAddress + Length;
Entry->EndAddress = BaseAddress + Length - 1;
InsertHeadList (Link, &TopEntry->Link);
@@ -2188,7 +2188,7 @@ CoreInitializeMemoryServices (
EfiMemoryTypeInformation = GET_GUID_HOB_DATA (GuidHob);
DataSize = GET_GUID_HOB_DATA_SIZE (GuidHob);
if (EfiMemoryTypeInformation != NULL && DataSize > 0 && DataSize <= (EfiMaxMemoryType + 1) * sizeof (EFI_MEMORY_TYPE_INFORMATION)) {
- CopyMem (&gMemoryTypeInformation, EfiMemoryTypeInformation, DataSize);
+ CopyMem(&gMemoryTypeInformation, EfiMemoryTypeInformation, DataSize);
}
}
diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
index 063522727..0d25a8ee8 100644
--- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
+++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
@@ -87,8 +87,8 @@ CoreConnectController (
RemainingDevicePathSize = GetDevicePathSize (RemainingDevicePath);
TempFilePath = AllocateZeroPool(HandleFilePathSize + RemainingDevicePathSize);
ASSERT (TempFilePath != NULL);
- CopyMem (TempFilePath, HandleFilePath, HandleFilePathSize);
- CopyMem ((UINT8 *) TempFilePath + HandleFilePathSize, RemainingDevicePath, RemainingDevicePathSize);
+ CopyMem(TempFilePath, HandleFilePath, HandleFilePathSize);
+ CopyMem((UINT8 *) TempFilePath + HandleFilePathSize, RemainingDevicePath, RemainingDevicePathSize);
FilePath = TempFilePath;
}
Status = gSecurity2->FileAuthentication (
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 0739f0f07..24fb4113b 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -320,7 +320,7 @@ CoreReadImageFile (
*ReadSize = 0;
}
- CopyMem (Buffer, (CHAR8 *)FHand->Source + Offset, *ReadSize);
+ CopyMem(Buffer, (CHAR8 *)FHand->Source + Offset, *ReadSize);
return EFI_SUCCESS;
}
/**
@@ -1826,7 +1826,7 @@ CoreExit (
Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
- CopyMem (Image->ExitData, ExitData, Image->ExitDataSize);
+ CopyMem(Image->ExitData, ExitData, Image->ExitDataSize);
}
CoreRestoreTpl (OldTpl);
diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
index 15f2710fb..b578dd8a5 100644
--- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
+++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
@@ -248,7 +248,7 @@ FindGuardedMemoryMap (
ASSERT_EFI_ERROR(Status);
ASSERT (MapMemory != 0);
- SetMem ((VOID *)(UINTN)MapMemory, Size, 0);
+ SetMem((VOID *)(UINTN)MapMemory, Size, 0);
*(UINT64 *)(UINTN)MapMemory = mGuardedMemoryMap;
mGuardedMemoryMap = MapMemory;
@@ -280,7 +280,7 @@ FindGuardedMemoryMap (
ASSERT_EFI_ERROR(Status);
ASSERT (MapMemory != 0);
- SetMem ((VOID *)(UINTN)MapMemory, Size, 0);
+ SetMem((VOID *)(UINTN)MapMemory, Size, 0);
*GuardMap = MapMemory;
}
@@ -1119,12 +1119,12 @@ SetAllGuardPages (
return;
}
- CopyMem (Entries, mLevelMask, sizeof (Entries));
- CopyMem (Shifts, mLevelShift, sizeof (Shifts));
+ CopyMem(Entries, mLevelMask, sizeof (Entries));
+ CopyMem(Shifts, mLevelShift, sizeof (Shifts));
- SetMem (Tables, sizeof(Tables), 0);
- SetMem (Addresses, sizeof(Addresses), 0);
- SetMem (Indices, sizeof(Indices), 0);
+ SetMem(Tables, sizeof(Tables), 0);
+ SetMem(Addresses, sizeof(Addresses), 0);
+ SetMem(Indices, sizeof(Indices), 0);
Level = GUARDED_HEAP_MAP_TABLE_DEPTH - mMapLevel;
Tables[Level] = mGuardedMemoryMap;
@@ -1371,12 +1371,12 @@ GuardAllFreedPages (
return;
}
- CopyMem (Entries, mLevelMask, sizeof (Entries));
- CopyMem (Shifts, mLevelShift, sizeof (Shifts));
+ CopyMem(Entries, mLevelMask, sizeof (Entries));
+ CopyMem(Shifts, mLevelShift, sizeof (Shifts));
- SetMem (Tables, sizeof(Tables), 0);
- SetMem (Addresses, sizeof(Addresses), 0);
- SetMem (Indices, sizeof(Indices), 0);
+ SetMem(Tables, sizeof(Tables), 0);
+ SetMem(Addresses, sizeof(Addresses), 0);
+ SetMem(Indices, sizeof(Indices), 0);
Level = GUARDED_HEAP_MAP_TABLE_DEPTH - mMapLevel;
Tables[Level] = mGuardedMemoryMap;
@@ -1670,12 +1670,12 @@ DumpGuardedMemoryBitmap (
DEBUG ((HEAP_GUARD_DEBUG_LEVEL, " %a\r\n", Ruler1));
DEBUG ((HEAP_GUARD_DEBUG_LEVEL, " %a\r\n", Ruler2));
- CopyMem (Entries, mLevelMask, sizeof (Entries));
- CopyMem (Shifts, mLevelShift, sizeof (Shifts));
+ CopyMem(Entries, mLevelMask, sizeof (Entries));
+ CopyMem(Shifts, mLevelShift, sizeof (Shifts));
- SetMem (Indices, sizeof(Indices), 0);
- SetMem (Tables, sizeof(Tables), 0);
- SetMem (Addresses, sizeof(Addresses), 0);
+ SetMem(Indices, sizeof(Indices), 0);
+ SetMem(Tables, sizeof(Tables), 0);
+ SetMem(Addresses, sizeof(Addresses), 0);
Level = GUARDED_HEAP_MAP_TABLE_DEPTH - mMapLevel;
Tables[Level] = mGuardedMemoryMap;
diff --git a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c
index 96d3bee8f..42d584717 100644
--- a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c
+++ b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c
@@ -417,7 +417,7 @@ BuildDriverInfo (
DriverInfo->Header.Length = (UINT16) (sizeof (MEMORY_PROFILE_DRIVER_INFO) + PdbOccupiedSize);
DriverInfo->Header.Revision = MEMORY_PROFILE_DRIVER_INFO_REVISION;
if (FileName != NULL) {
- CopyMem (&DriverInfo->FileName, FileName, sizeof (EFI_GUID));
+ CopyMem(&DriverInfo->FileName, FileName, sizeof (EFI_GUID));
}
DriverInfo->ImageBase = ImageBase;
DriverInfo->ImageSize = ImageSize;
@@ -441,7 +441,7 @@ BuildDriverInfo (
if (PdbSize != 0) {
DriverInfo->PdbStringOffset = (UINT16) sizeof (MEMORY_PROFILE_DRIVER_INFO);
DriverInfoData->PdbString = (CHAR8 *) (DriverInfoData->AllocInfoList + 1);
- CopyMem (DriverInfoData->PdbString, PdbString, PdbSize);
+ CopyMem(DriverInfoData->PdbString, PdbString, PdbSize);
} else {
DriverInfo->PdbStringOffset = 0;
DriverInfoData->PdbString = NULL;
@@ -1034,7 +1034,7 @@ CoreUpdateProfileAllocate (
if (ActionString != NULL) {
AllocInfo->ActionStringOffset = (UINT16) sizeof (MEMORY_PROFILE_ALLOC_INFO);
AllocInfoData->ActionString = (CHAR8 *) (AllocInfoData + 1);
- CopyMem (AllocInfoData->ActionString, ActionString, ActionStringSize);
+ CopyMem(AllocInfoData->ActionString, ActionString, ActionStringSize);
} else {
AllocInfo->ActionStringOffset = 0;
AllocInfoData->ActionString = NULL;
@@ -1488,7 +1488,7 @@ MemoryProfileCopyData (
}
Context = ProfileBuffer;
- CopyMem (Context, &ContextData->Context, sizeof (MEMORY_PROFILE_CONTEXT));
+ CopyMem(Context, &ContextData->Context, sizeof (MEMORY_PROFILE_CONTEXT));
DriverInfo = (MEMORY_PROFILE_DRIVER_INFO *) (Context + 1);
DriverInfoList = ContextData->DriverInfoList;
@@ -1501,10 +1501,10 @@ MemoryProfileCopyData (
Link,
MEMORY_PROFILE_DRIVER_INFO_SIGNATURE
);
- CopyMem (DriverInfo, &DriverInfoData->DriverInfo, sizeof (MEMORY_PROFILE_DRIVER_INFO));
+ CopyMem(DriverInfo, &DriverInfoData->DriverInfo, sizeof (MEMORY_PROFILE_DRIVER_INFO));
if (DriverInfo->PdbStringOffset != 0) {
PdbSize = AsciiStrSize (DriverInfoData->PdbString);
- CopyMem ((VOID *) ((UINTN) DriverInfo + DriverInfo->PdbStringOffset), DriverInfoData->PdbString, PdbSize);
+ CopyMem((VOID *) ((UINTN) DriverInfo + DriverInfo->PdbStringOffset), DriverInfoData->PdbString, PdbSize);
}
AllocInfo = (MEMORY_PROFILE_ALLOC_INFO *) ((UINTN) DriverInfo + DriverInfo->Header.Length);
@@ -1518,10 +1518,10 @@ MemoryProfileCopyData (
Link,
MEMORY_PROFILE_ALLOC_INFO_SIGNATURE
);
- CopyMem (AllocInfo, &AllocInfoData->AllocInfo, sizeof (MEMORY_PROFILE_ALLOC_INFO));
+ CopyMem(AllocInfo, &AllocInfoData->AllocInfo, sizeof (MEMORY_PROFILE_ALLOC_INFO));
if (AllocInfo->ActionStringOffset != 0) {
ActionStringSize = AsciiStrSize (AllocInfoData->ActionString);
- CopyMem ((VOID *) ((UINTN) AllocInfo + AllocInfo->ActionStringOffset), AllocInfoData->ActionString, ActionStringSize);
+ CopyMem((VOID *) ((UINTN) AllocInfo + AllocInfo->ActionStringOffset), AllocInfoData->ActionString, ActionStringSize);
}
AllocInfo = (MEMORY_PROFILE_ALLOC_INFO *) ((UINTN) AllocInfo + AllocInfo->Header.Length);
}
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c
index aa4609c05..9ea5eafd0 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Page.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
@@ -184,7 +184,7 @@ CoreAddRange (
//
if (Type == EfiConventionalMemory && Start == 0 && (End >= EFI_PAGE_SIZE - 1)) {
if ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & BIT0) == 0) {
- SetMem ((VOID *)(UINTN)Start, EFI_PAGE_SIZE, 0);
+ SetMem((VOID *)(UINTN)Start, EFI_PAGE_SIZE, 0);
}
}
@@ -359,7 +359,7 @@ CoreFreeMemoryMapStack (
RemoveEntryList (&mMapStack[mMapDepth].Link);
mMapStack[mMapDepth].Link.ForwardLink = NULL;
- CopyMem (Entry , &mMapStack[mMapDepth], sizeof (MEMORY_MAP));
+ CopyMem(Entry , &mMapStack[mMapDepth], sizeof (MEMORY_MAP));
Entry->FromPages = TRUE;
//
@@ -1912,7 +1912,7 @@ CoreGetMemoryMap (
//
// Copy new GCD map entry for the following GCD range merge
//
- CopyMem (&MergeGcdMapEntry, GcdMapEntry, sizeof (MergeGcdMapEntry));
+ CopyMem(&MergeGcdMapEntry, GcdMapEntry, sizeof (MergeGcdMapEntry));
}
}
diff --git a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
index a88705e46..87874e466 100644
--- a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
+++ b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
@@ -202,7 +202,7 @@ CoreNewDebugImageInfoEntry (
//
// Copy the old table into the new one
//
- CopyMem (NewTable, Table, TableSize);
+ CopyMem(NewTable, Table, TableSize);
//
// Free the old table
//
diff --git a/MdeModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c b/MdeModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c
index 2f466d742..09964955b 100644
--- a/MdeModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c
+++ b/MdeModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c
@@ -83,7 +83,7 @@ CoreInstallConfigurationTable (
//
// Copy over deleted entry
//
- CopyMem (
+ CopyMem(
&(EfiConfigurationTable[Index]),
&(gDxeCoreST->ConfigurationTable[Index + 1]),
(gDxeCoreST->NumberOfTableEntries - Index) * sizeof (EFI_CONFIGURATION_TABLE)
@@ -122,7 +122,7 @@ CoreInstallConfigurationTable (
//
// Copy the old table to the new table.
//
- CopyMem (
+ CopyMem(
EfiConfigurationTable,
gDxeCoreST->ConfigurationTable,
Index * sizeof (EFI_CONFIGURATION_TABLE)
diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c b/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c
index 38263cd47..695935aa8 100644
--- a/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c
+++ b/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c
@@ -170,7 +170,7 @@ InstallMemoryAttributesTable (
switch (MemoryMap->Type) {
case EfiRuntimeServicesCode:
case EfiRuntimeServicesData:
- CopyMem (MemoryAttributesEntry, MemoryMap, DescriptorSize);
+ CopyMem(MemoryAttributesEntry, MemoryMap, DescriptorSize);
MemoryAttributesEntry->Attribute &= (EFI_MEMORY_RO|EFI_MEMORY_XP|EFI_MEMORY_RUNTIME);
DEBUG ((EFI_D_VERBOSE, "Entry (0x%x)\n", MemoryAttributesEntry));
DEBUG ((EFI_D_VERBOSE, " Type - 0x%x\n", MemoryAttributesEntry->Type));
diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
index 856052ccb..347b1f342 100644
--- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
+++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
@@ -680,9 +680,9 @@ SortMemoryMap (
while (MemoryMapEntry < MemoryMapEnd) {
while (NextMemoryMapEntry < MemoryMapEnd) {
if (MemoryMapEntry->PhysicalStart > NextMemoryMapEntry->PhysicalStart) {
- CopyMem (&TempMemoryMap, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
- CopyMem (MemoryMapEntry, NextMemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
- CopyMem (NextMemoryMapEntry, &TempMemoryMap, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(&TempMemoryMap, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(MemoryMapEntry, NextMemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(NextMemoryMapEntry, &TempMemoryMap, sizeof(EFI_MEMORY_DESCRIPTOR));
}
NextMemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (NextMemoryMapEntry, DescriptorSize);
@@ -725,7 +725,7 @@ MergeMemoryMapForProtectionPolicy (
NewMemoryMapEntry = MemoryMap;
MemoryMapEnd = (EFI_MEMORY_DESCRIPTOR *) ((UINT8 *) MemoryMap + *MemoryMapSize);
while ((UINTN)MemoryMapEntry < (UINTN)MemoryMapEnd) {
- CopyMem (NewMemoryMapEntry, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(NewMemoryMapEntry, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
NextMemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize);
do {
diff --git a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
index 655422d29..bf7f493dd 100644
--- a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
+++ b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
@@ -153,9 +153,9 @@ SortMemoryMap (
while (MemoryMapEntry < MemoryMapEnd) {
while (NextMemoryMapEntry < MemoryMapEnd) {
if (MemoryMapEntry->PhysicalStart > NextMemoryMapEntry->PhysicalStart) {
- CopyMem (&TempMemoryMap, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
- CopyMem (MemoryMapEntry, NextMemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
- CopyMem (NextMemoryMapEntry, &TempMemoryMap, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(&TempMemoryMap, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(MemoryMapEntry, NextMemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(NextMemoryMapEntry, &TempMemoryMap, sizeof(EFI_MEMORY_DESCRIPTOR));
}
NextMemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (NextMemoryMapEntry, DescriptorSize);
@@ -196,7 +196,7 @@ MergeMemoryMap (
NewMemoryMapEntry = MemoryMap;
MemoryMapEnd = (EFI_MEMORY_DESCRIPTOR *) ((UINT8 *) MemoryMap + *MemoryMapSize);
while ((UINTN)MemoryMapEntry < (UINTN)MemoryMapEnd) {
- CopyMem (NewMemoryMapEntry, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(NewMemoryMapEntry, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
NextMemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize);
do {
@@ -338,7 +338,7 @@ SetNewRecord (
UINT64 PhysicalEnd;
UINT64 ImageEnd;
- CopyMem (&TempRecord, OldRecord, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(&TempRecord, OldRecord, sizeof(EFI_MEMORY_DESCRIPTOR));
PhysicalEnd = TempRecord.PhysicalStart + EfiPagesToSize(TempRecord.NumberOfPages);
NewRecordCount = 0;
@@ -493,7 +493,7 @@ SplitRecord (
BOOLEAN IsLastRecordData;
if (MaxSplitRecordCount == 0) {
- CopyMem (NewRecord, OldRecord, DescriptorSize);
+ CopyMem(NewRecord, OldRecord, DescriptorSize);
return 0;
}
@@ -502,7 +502,7 @@ SplitRecord (
//
// Override previous record
//
- CopyMem (&TempRecord, OldRecord, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(&TempRecord, OldRecord, sizeof(EFI_MEMORY_DESCRIPTOR));
PhysicalStart = TempRecord.PhysicalStart;
PhysicalEnd = TempRecord.PhysicalStart + EfiPagesToSize(TempRecord.NumberOfPages);
@@ -664,7 +664,7 @@ SplitTable (
//
// Adjust IndexNew according to real split.
//
- CopyMem (
+ CopyMem(
((UINT8 *)MemoryMap + (IndexNew + MaxSplitRecordCount - RealSplitRecordCount) * DescriptorSize),
((UINT8 *)MemoryMap + IndexNew * DescriptorSize),
RealSplitRecordCount * DescriptorSize
@@ -676,7 +676,7 @@ SplitTable (
//
// Move all records to the beginning.
//
- CopyMem (
+ CopyMem(
MemoryMap,
(UINT8 *)MemoryMap + (AdditionalRecordCount - TotalSplitRecordCount) * DescriptorSize,
(*MemoryMapSize) + TotalSplitRecordCount * DescriptorSize
diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
index f6a8c321b..b85fead51 100644
--- a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
+++ b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
@@ -363,7 +363,7 @@ OpenSectionStreamEx (
//
// Copy in stream data
//
- CopyMem (NewStream->StreamBuffer, SectionStream, SectionStreamLength);
+ CopyMem(NewStream->StreamBuffer, SectionStream, SectionStreamLength);
} else {
//
// It's possible to have a zero length section stream.
@@ -755,7 +755,7 @@ CreateChildNode (
//
// stream is not actually compressed, just encapsulated. So just copy it.
//
- CopyMem (NewStreamBuffer, CompressionSource, NewStreamBufferSize);
+ CopyMem(NewStreamBuffer, CompressionSource, NewStreamBufferSize);
} else if (CompressionType == EFI_STANDARD_COMPRESSION) {
//
// Only support the EFI_SATNDARD_COMPRESSION algorithm.
@@ -1306,7 +1306,7 @@ GetSection (
goto GetSection_Done;
}
}
- CopyMem (*Buffer, CopyBuffer, CopySize);
+ CopyMem(*Buffer, CopyBuffer, CopySize);
*BufferSize = SectionSize;
GetSection_Done:
@@ -1581,7 +1581,7 @@ CustomGuidedSectionExtract (
// OutputBuffer was returned as a different value,
// so copy section contents to the allocated memory buffer.
//
- CopyMem (AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize);
+ CopyMem(AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize);
*OutputBuffer = AllocatedOutputBuffer;
}
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index 09ebdc948..3655e874a 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -773,7 +773,7 @@ Decompress (
//
// stream is not actually compressed, just encapsulated. So just copy it.
//
- CopyMem (DstBuffer, CompressionSource, DstBufferSize);
+ CopyMem(DstBuffer, CompressionSource, DstBufferSize);
break;
default:
diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
index 402cb60f7..810c34669 100644
--- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
+++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
@@ -328,7 +328,7 @@ HandOffToDxeCore (
IdtTable[Index].Offset32To63 = (UINT32) (RShiftU64 (VectorAddress, 32));
IdtTable[Index].Reserved = 0;
- CopyMem ((VOID *) (UINTN) VectorAddress, TemplateBase, SizeOfTemplate);
+ CopyMem((VOID *) (UINTN) VectorAddress, TemplateBase, SizeOfTemplate);
AsmVectorFixup ((VOID *) (UINTN) VectorAddress, (UINT8) Index);
VectorAddress += SizeOfTemplate;
diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
index 516cf908b..37689a0a8 100644
--- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
+++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
@@ -80,7 +80,7 @@ ClearFirst4KPage (
if (DoClear) {
DEBUG ((DEBUG_INFO, "Clearing first 4K-page!\r\n"));
- SetMem (NULL, EFI_PAGE_SIZE, 0);
+ SetMem(NULL, EFI_PAGE_SIZE, 0);
}
return;
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index 2e8b26555..92b67194a 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -74,7 +74,7 @@ DiscoverPeimsAndOrderWithApriori (
TempFileHandles = AllocatePool (
sizeof (EFI_PEI_FILE_HANDLE) * (Private->TempPeimCount + TEMP_FILE_GROWTH_STEP));
ASSERT (TempFileHandles != NULL);
- CopyMem (
+ CopyMem(
TempFileHandles,
Private->TempFileHandles,
sizeof (EFI_PEI_FILE_HANDLE) * Private->TempPeimCount
@@ -83,7 +83,7 @@ DiscoverPeimsAndOrderWithApriori (
TempFileGuid = AllocatePool (
sizeof (EFI_GUID) * (Private->TempPeimCount + TEMP_FILE_GROWTH_STEP));
ASSERT (TempFileGuid != NULL);
- CopyMem (
+ CopyMem(
TempFileGuid,
Private->TempFileGuid,
sizeof (EFI_GUID) * Private->TempPeimCount
@@ -152,7 +152,7 @@ DiscoverPeimsAndOrderWithApriori (
//
Status = FvPpi->GetFileInfo (FvPpi, TempFileHandles[Index], &FileInfo);
ASSERT_EFI_ERROR(Status);
- CopyMem (&TempFileGuid[Index], &FileInfo.FileName, sizeof(EFI_GUID));
+ CopyMem(&TempFileGuid[Index], &FileInfo.FileName, sizeof(EFI_GUID));
}
//
@@ -190,7 +190,7 @@ DiscoverPeimsAndOrderWithApriori (
ASSERT (Index == PeimCount);
}
} else {
- CopyMem (CoreFileHandle->FvFileHandles, TempFileHandles, sizeof (EFI_PEI_FILE_HANDLE) * PeimCount);
+ CopyMem(CoreFileHandle->FvFileHandles, TempFileHandles, sizeof (EFI_PEI_FILE_HANDLE) * PeimCount);
}
//
@@ -878,12 +878,12 @@ PeiCheckAndSwitchStack (
//
HeapTemporaryRamSize = (UINTN) (Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - Private->HobList.HandoffInformationTable->EfiMemoryBottom);
ASSERT (BaseOfNewHeap + HeapTemporaryRamSize <= Private->FreePhysicalMemoryTop);
- CopyMem ((UINT8 *) (UINTN) BaseOfNewHeap, PeiTemporaryRamBase, HeapTemporaryRamSize);
+ CopyMem((UINT8 *) (UINTN) BaseOfNewHeap, PeiTemporaryRamBase, HeapTemporaryRamSize);
//
// Migrate Stack
//
- CopyMem ((UINT8 *) (UINTN) (TopOfNewStack - TemporaryStackSize), TemporaryStackBase, TemporaryStackSize);
+ CopyMem((UINT8 *) (UINTN) (TopOfNewStack - TemporaryStackSize), TemporaryStackBase, TemporaryStackSize);
//
// Copy Hole Range Data
@@ -928,7 +928,7 @@ PeiCheckAndSwitchStack (
Private->HoleData[Index].OffsetPositive = FALSE;
Private->HoleData[Index].Offset = (UINTN) (Private->HoleData[Index].Base - HoleMemBase);
}
- CopyMem ((VOID *) (UINTN) HoleMemBase, (VOID *) (UINTN) Private->HoleData[Index].Base, Private->HoleData[Index].Size);
+ CopyMem((VOID *) (UINTN) HoleMemBase, (VOID *) (UINTN) Private->HoleData[Index].Base, Private->HoleData[Index].Size);
HoleMemBase = HoleMemBase + Private->HoleData[Index].Size;
}
}
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
index 3ddd3a280..dfcee2024 100644
--- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
@@ -176,7 +176,7 @@ CalculateHeaderChecksum (
EFI_FFS_FILE_HEADER2 TestFileHeader;
if (IS_FFS_FILE2 (FileHeader)) {
- CopyMem (&TestFileHeader, FileHeader, sizeof (EFI_FFS_FILE_HEADER2));
+ CopyMem(&TestFileHeader, FileHeader, sizeof (EFI_FFS_FILE_HEADER2));
//
// Ingore State and File field in FFS header.
//
@@ -185,7 +185,7 @@ CalculateHeaderChecksum (
return CalculateSum8 ((CONST UINT8 *) &TestFileHeader, sizeof (EFI_FFS_FILE_HEADER2));
} else {
- CopyMem (&TestFileHeader, FileHeader, sizeof (EFI_FFS_FILE_HEADER));
+ CopyMem(&TestFileHeader, FileHeader, sizeof (EFI_FFS_FILE_HEADER));
//
// Ingore State and File field in FFS header.
//
@@ -567,13 +567,13 @@ FirmwareVolmeInfoPpiNotifyCallback (
//
// It is FvInfo2PPI.
//
- CopyMem (&FvInfo2Ppi, Ppi, sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI));
+ CopyMem(&FvInfo2Ppi, Ppi, sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI));
IsFvInfo2 = TRUE;
} else {
//
// It is FvInfoPPI.
//
- CopyMem (&FvInfo2Ppi, Ppi, sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI));
+ CopyMem(&FvInfo2Ppi, Ppi, sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI));
FvInfo2Ppi.AuthenticationStatus = 0;
IsFvInfo2 = FALSE;
}
@@ -633,7 +633,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
sizeof (PEI_CORE_FV_HANDLE) * (PrivateData->MaxFvCount + FV_GROWTH_STEP)
);
ASSERT (TempPtr != NULL);
- CopyMem (
+ CopyMem(
TempPtr,
PrivateData->Fv,
sizeof (PEI_CORE_FV_HANDLE) * PrivateData->MaxFvCount
@@ -1491,14 +1491,14 @@ ProcessFvFile (
//
// Copy the used bytes and fill the rest with the erase value.
//
- CopyMem (NewFvBuffer, FvHeader, (UINTN) FvUsedSize);
- SetMem (
+ CopyMem(NewFvBuffer, FvHeader, (UINTN) FvUsedSize);
+ SetMem(
(UINT8 *) NewFvBuffer + FvUsedSize,
(UINTN) (FvLength - FvUsedSize),
EraseByte
);
} else {
- CopyMem (NewFvBuffer, FvHeader, (UINTN) FvLength);
+ CopyMem(NewFvBuffer, FvHeader, (UINTN) FvLength);
}
FvHeader = (EFI_FIRMWARE_VOLUME_HEADER*) NewFvBuffer;
}
@@ -1819,7 +1819,7 @@ PeiFfsFvPpiGetFileInfo (
FileInfo->BufferSize = FFS_FILE_SIZE (FileHeader) - sizeof (EFI_FFS_FILE_HEADER);
FileInfo->Buffer = (UINT8 *) FileHeader + sizeof (EFI_FFS_FILE_HEADER);
}
- CopyMem (&FileInfo->FileName, &FileHeader->Name, sizeof(EFI_GUID));
+ CopyMem(&FileInfo->FileName, &FileHeader->Name, sizeof(EFI_GUID));
FileInfo->FileType = FileHeader->Type;
FileInfo->FileAttributes = FfsAttributes2FvFileAttributes (FileHeader->Attributes);
if ((CoreFvHandle->FvHeader->Attributes & EFI_FVB2_MEMORY_MAPPED) == EFI_FVB2_MEMORY_MAPPED) {
@@ -1912,7 +1912,7 @@ PeiFfsFvPpiGetVolumeInfo (
// but FvLength is UINT64 type, which requires FvHeader align at least 8 byte.
// So, Copy FvHeader into the local FvHeader structure.
//
- CopyMem (&FwVolHeader, FvHandle, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
+ CopyMem(&FwVolHeader, FvHandle, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
//
// Check Fv Image Signature
@@ -1925,11 +1925,11 @@ PeiFfsFvPpiGetVolumeInfo (
VolumeInfo->FvAttributes = FwVolHeader.Attributes;
VolumeInfo->FvStart = (VOID *) FvHandle;
VolumeInfo->FvSize = FwVolHeader.FvLength;
- CopyMem (&VolumeInfo->FvFormat, &FwVolHeader.FileSystemGuid, sizeof(EFI_GUID));
+ CopyMem(&VolumeInfo->FvFormat, &FwVolHeader.FileSystemGuid, sizeof(EFI_GUID));
if (FwVolHeader.ExtHeaderOffset != 0) {
FwVolExHeaderInfo = (EFI_FIRMWARE_VOLUME_EXT_HEADER*)(((UINT8 *)FvHandle) + FwVolHeader.ExtHeaderOffset);
- CopyMem (&VolumeInfo->FvName, &FwVolExHeaderInfo->FvName, sizeof(EFI_GUID));
+ CopyMem(&VolumeInfo->FvName, &FwVolExHeaderInfo->FvName, sizeof(EFI_GUID));
}
return EFI_SUCCESS;
@@ -2217,7 +2217,7 @@ AddUnknownFormatFvInfo (
sizeof (PEI_CORE_UNKNOW_FORMAT_FV_INFO) * (PrivateData->MaxUnknownFvInfoCount + FV_GROWTH_STEP)
);
ASSERT (TempPtr != NULL);
- CopyMem (
+ CopyMem(
TempPtr,
PrivateData->UnknownFvInfo,
sizeof (PEI_CORE_UNKNOW_FORMAT_FV_INFO) * PrivateData->MaxUnknownFvInfoCount
@@ -2288,7 +2288,7 @@ FindUnknownFormatFvInfo (
//
Index2 = Index + 1;
for (;Index2 < PrivateData->UnknownFvInfoCount; Index2 ++, Index ++) {
- CopyMem (&PrivateData->UnknownFvInfo[Index], &PrivateData->UnknownFvInfo[Index2], sizeof (PEI_CORE_UNKNOW_FORMAT_FV_INFO));
+ CopyMem(&PrivateData->UnknownFvInfo[Index], &PrivateData->UnknownFvInfo[Index2], sizeof (PEI_CORE_UNKNOW_FORMAT_FV_INFO));
}
PrivateData->UnknownFvInfoCount --;
return EFI_SUCCESS;
@@ -2370,7 +2370,7 @@ ThirdPartyFvPpiNotifyCallback (
sizeof (PEI_CORE_FV_HANDLE) * (PrivateData->MaxFvCount + FV_GROWTH_STEP)
);
ASSERT (TempPtr != NULL);
- CopyMem (
+ CopyMem(
TempPtr,
PrivateData->Fv,
sizeof (PEI_CORE_FV_HANDLE) * PrivateData->MaxFvCount
diff --git a/MdeModulePkg/Core/Pei/Hob/Hob.c b/MdeModulePkg/Core/Pei/Hob/Hob.c
index 5900f6042..cbf958275 100644
--- a/MdeModulePkg/Core/Pei/Hob/Hob.c
+++ b/MdeModulePkg/Core/Pei/Hob/Hob.c
@@ -176,7 +176,7 @@ PeiInstallSecHobData (
}
Hob.Raw = (UINT8 *) (UINTN) HandOffHob->EfiEndOfHobList;
- CopyMem (Hob.Raw, HobStart.Raw, SecHobListLength);
+ CopyMem(Hob.Raw, HobStart.Raw, SecHobListLength);
HobEnd = (EFI_HOB_GENERIC_HEADER *) ((UINTN) Hob.Raw + SecHobListLength);
HandOffHob->EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS) (UINTN) HobEnd;
diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c
index 416f58529..80c4fbf88 100644
--- a/MdeModulePkg/Core/Pei/Image/Image.c
+++ b/MdeModulePkg/Core/Pei/Image/Image.c
@@ -48,7 +48,7 @@ PeiImageRead (
Destination8 = Buffer;
Source8 = (CHAR8 *) ((UINTN) FileHandle + FileOffset);
if (Destination8 != Source8) {
- CopyMem (Destination8, Source8, *ReadSize);
+ CopyMem(Destination8, Source8, *ReadSize);
}
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
index 63ffa90bd..10dbb7e0e 100644
--- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
+++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
@@ -148,9 +148,9 @@ MigrateMemoryPages (
} else {
MemPagesBase -= Private->HeapOffset;
}
- CopyMem ((VOID *)(UINTN)NewMemPagesBase, (VOID *)(UINTN)MemPagesBase, Private->MemoryPages.Size);
+ CopyMem((VOID *)(UINTN)NewMemPagesBase, (VOID *)(UINTN)MemPagesBase, Private->MemoryPages.Size);
} else {
- CopyMem ((VOID *)(UINTN)NewMemPagesBase, (VOID *)(UINTN)Private->MemoryPages.Base, Private->MemoryPages.Size);
+ CopyMem((VOID *)(UINTN)NewMemPagesBase, (VOID *)(UINTN)Private->MemoryPages.Base, Private->MemoryPages.Size);
}
if (NewMemPagesBase >= Private->MemoryPages.Base) {
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
index 545edfece..b8b8115ae 100644
--- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
+++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
@@ -192,7 +192,7 @@ PeiCore (
//
ZeroMem (&PrivateData, sizeof (PEI_CORE_INSTANCE));
PrivateData.Signature = PEI_CORE_HANDLE_SIGNATURE;
- CopyMem (&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs));
+ CopyMem(&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs));
} else {
//
// Memory is available to the PEI Core. See if the PEI Core has been shadowed to memory yet.
@@ -341,15 +341,15 @@ PeiCore (
//
// Memory is available to the PEI Core and the PEI Core has been shadowed to memory.
//
- CopyMem (&NewSecCoreData, SecCoreDataPtr, sizeof (NewSecCoreData));
+ CopyMem(&NewSecCoreData, SecCoreDataPtr, sizeof (NewSecCoreData));
SecCoreData = &NewSecCoreData;
- CopyMem (&PrivateData, OldCoreData, sizeof (PrivateData));
+ CopyMem(&PrivateData, OldCoreData, sizeof (PrivateData));
CpuIo = (VOID*)PrivateData.ServiceTableShadow.CpuIo;
PciCfg = (VOID*)PrivateData.ServiceTableShadow.PciCfg;
- CopyMem (&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs));
+ CopyMem(&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs));
PrivateData.ServiceTableShadow.CpuIo = CpuIo;
PrivateData.ServiceTableShadow.PciCfg = PciCfg;
diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
index d0b774793..6dae8c2bd 100644
--- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c
+++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
@@ -265,7 +265,7 @@ InternalPeiInstallPpi (
sizeof (PEI_PPI_LIST_POINTERS) * (PpiListPointer->MaxCount + PPI_GROWTH_STEP)
);
ASSERT (TempPtr != NULL);
- CopyMem (
+ CopyMem(
TempPtr,
PpiListPointer->PpiPtrs,
sizeof (PEI_PPI_LIST_POINTERS) * PpiListPointer->MaxCount
@@ -553,7 +553,7 @@ InternalPeiNotifyPpi (
sizeof (PEI_PPI_LIST_POINTERS) * (CallbackNotifyListPointer->MaxCount + CALLBACK_NOTIFY_GROWTH_STEP)
);
ASSERT (TempPtr != NULL);
- CopyMem (
+ CopyMem(
TempPtr,
CallbackNotifyListPointer->NotifyPtrs,
sizeof (PEI_PPI_LIST_POINTERS) * CallbackNotifyListPointer->MaxCount
@@ -573,7 +573,7 @@ InternalPeiNotifyPpi (
sizeof (PEI_PPI_LIST_POINTERS) * (DispatchNotifyListPointer->MaxCount + DISPATCH_NOTIFY_GROWTH_STEP)
);
ASSERT (TempPtr != NULL);
- CopyMem (
+ CopyMem(
TempPtr,
DispatchNotifyListPointer->NotifyPtrs,
sizeof (PEI_PPI_LIST_POINTERS) * DispatchNotifyListPointer->MaxCount
diff --git a/MdeModulePkg/Core/PiSmmCore/Dependency.c b/MdeModulePkg/Core/PiSmmCore/Dependency.c
index 700817a92..06a1a3dbf 100644
--- a/MdeModulePkg/Core/PiSmmCore/Dependency.c
+++ b/MdeModulePkg/Core/PiSmmCore/Dependency.c
@@ -63,7 +63,7 @@ GrowDepexStack (
//
// Copy to Old Stack to the New Stack
//
- CopyMem (
+ CopyMem(
NewStack,
mDepexEvaluationStack,
(mDepexEvaluationStackEnd - mDepexEvaluationStack) * sizeof (BOOLEAN)
@@ -238,7 +238,7 @@ SmmIsSchedulable (
// Push operator is followed by a GUID. Test to see if the GUID protocol
// is installed and push the boolean result on the stack.
//
- CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
Status = SmmLocateProtocol (&DriverGuid, NULL, &Interface);
if (EFI_ERROR(Status)) {
@@ -350,7 +350,7 @@ SmmIsSchedulable (
return Operator;
case EFI_DEP_REPLACE_TRUE:
- CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverGuid, Iterator + 1, sizeof (EFI_GUID));
DEBUG ((DEBUG_DISPATCH, " PUSH GUID(%g) = TRUE\n", &DriverGuid));
Status = PushBool (TRUE);
if (EFI_ERROR(Status)) {
diff --git a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
index 82710ecea..86a9f14a3 100644
--- a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
+++ b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
@@ -584,7 +584,7 @@ SmmLoadImage (
SmmFreePages (DstBuffer, PageCount);
return Status;
}
- CopyMem (DriverEntry->LoadedImage->FilePath, FilePath, GetDevicePathSize (FilePath));
+ CopyMem(DriverEntry->LoadedImage->FilePath, FilePath, GetDevicePathSize (FilePath));
DriverEntry->LoadedImage->ImageBase = (VOID *)(UINTN) ImageContext.ImageAddress;
DriverEntry->LoadedImage->ImageSize = ImageContext.ImageSize;
@@ -603,7 +603,7 @@ SmmLoadImage (
SmmFreePages (DstBuffer, PageCount);
return Status;
}
- CopyMem (DriverEntry->SmmLoadedImage.FilePath, FilePath, GetDevicePathSize(FilePath));
+ CopyMem(DriverEntry->SmmLoadedImage.FilePath, FilePath, GetDevicePathSize(FilePath));
DriverEntry->SmmLoadedImage.ImageBase = (VOID *)(UINTN) ImageContext.ImageAddress;
DriverEntry->SmmLoadedImage.ImageSize = ImageContext.ImageSize;
@@ -729,7 +729,7 @@ SmmPreProcessDepex (
}
if (DriverEntry->Before || DriverEntry->After) {
- CopyMem (&DriverEntry->BeforeAfterGuid, Iterator + 1, sizeof (EFI_GUID));
+ CopyMem(&DriverEntry->BeforeAfterGuid, Iterator + 1, sizeof (EFI_GUID));
}
return EFI_SUCCESS;
@@ -1355,7 +1355,7 @@ SmmDriverDispatchHandler (
(VOID **)&mSmmCoreLoadedImage->FilePath
);
ASSERT_EFI_ERROR(Status);
- CopyMem (mSmmCoreLoadedImage->FilePath, &mFvDevicePath, GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath));
+ CopyMem(mSmmCoreLoadedImage->FilePath, &mFvDevicePath, GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath));
mSmmCoreLoadedImage->DeviceHandle = FvHandle;
}
@@ -1376,7 +1376,7 @@ SmmDriverDispatchHandler (
(VOID **)&mSmmCoreDriverEntry->SmmLoadedImage.FilePath
);
ASSERT_EFI_ERROR(Status);
- CopyMem (mSmmCoreDriverEntry->SmmLoadedImage.FilePath, &mFvDevicePath, GetDevicePathSize((EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath));
+ CopyMem(mSmmCoreDriverEntry->SmmLoadedImage.FilePath, &mFvDevicePath, GetDevicePathSize((EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath));
mSmmCoreDriverEntry->SmmLoadedImage.DeviceHandle = FvHandle;
}
diff --git a/MdeModulePkg/Core/PiSmmCore/HeapGuard.c b/MdeModulePkg/Core/PiSmmCore/HeapGuard.c
index 7a74a4a79..f02150a83 100644
--- a/MdeModulePkg/Core/PiSmmCore/HeapGuard.c
+++ b/MdeModulePkg/Core/PiSmmCore/HeapGuard.c
@@ -262,7 +262,7 @@ FindGuardedMemoryMap (
MapMemory = (UINT64)(UINTN)PageAlloc (EFI_SIZE_TO_PAGES (Size));
ASSERT (MapMemory != 0);
- SetMem ((VOID *)(UINTN)MapMemory, Size, 0);
+ SetMem((VOID *)(UINTN)MapMemory, Size, 0);
*(UINT64 *)(UINTN)MapMemory = mGuardedMemoryMap;
mGuardedMemoryMap = MapMemory;
@@ -287,7 +287,7 @@ FindGuardedMemoryMap (
MapMemory = (UINT64)(UINTN)PageAlloc (EFI_SIZE_TO_PAGES (Size));
ASSERT (MapMemory != 0);
- SetMem ((VOID *)(UINTN)MapMemory, Size, 0);
+ SetMem((VOID *)(UINTN)MapMemory, Size, 0);
*GuardMap = MapMemory;
}
@@ -1104,12 +1104,12 @@ SetAllGuardPages (
return;
}
- CopyMem (Entries, mLevelMask, sizeof (Entries));
- CopyMem (Shifts, mLevelShift, sizeof (Shifts));
+ CopyMem(Entries, mLevelMask, sizeof (Entries));
+ CopyMem(Shifts, mLevelShift, sizeof (Shifts));
- SetMem (Tables, sizeof(Tables), 0);
- SetMem (Addresses, sizeof(Addresses), 0);
- SetMem (Indices, sizeof(Indices), 0);
+ SetMem(Tables, sizeof(Tables), 0);
+ SetMem(Addresses, sizeof(Addresses), 0);
+ SetMem(Indices, sizeof(Indices), 0);
Level = GUARDED_HEAP_MAP_TABLE_DEPTH - mMapLevel;
Tables[Level] = mGuardedMemoryMap;
@@ -1274,12 +1274,12 @@ DumpGuardedMemoryBitmap (
DEBUG ((HEAP_GUARD_DEBUG_LEVEL, " %a\r\n", Ruler1));
DEBUG ((HEAP_GUARD_DEBUG_LEVEL, " %a\r\n", Ruler2));
- CopyMem (Entries, mLevelMask, sizeof (Entries));
- CopyMem (Shifts, mLevelShift, sizeof (Shifts));
+ CopyMem(Entries, mLevelMask, sizeof (Entries));
+ CopyMem(Shifts, mLevelShift, sizeof (Shifts));
- SetMem (Indices, sizeof(Indices), 0);
- SetMem (Tables, sizeof(Tables), 0);
- SetMem (Addresses, sizeof(Addresses), 0);
+ SetMem(Indices, sizeof(Indices), 0);
+ SetMem(Tables, sizeof(Tables), 0);
+ SetMem(Addresses, sizeof(Addresses), 0);
Level = GUARDED_HEAP_MAP_TABLE_DEPTH - mMapLevel;
Tables[Level] = mGuardedMemoryMap;
diff --git a/MdeModulePkg/Core/PiSmmCore/InstallConfigurationTable.c b/MdeModulePkg/Core/PiSmmCore/InstallConfigurationTable.c
index ef89c9cce..a5832b2ea 100644
--- a/MdeModulePkg/Core/PiSmmCore/InstallConfigurationTable.c
+++ b/MdeModulePkg/Core/PiSmmCore/InstallConfigurationTable.c
@@ -81,7 +81,7 @@ SmmInstallConfigurationTable (
//
// Copy over deleted entry
//
- CopyMem (
+ CopyMem(
&(ConfigurationTable[Index]),
&(ConfigurationTable[Index + 1]),
(gSmmCoreSmst.NumberOfTableEntries - Index) * sizeof (EFI_CONFIGURATION_TABLE)
@@ -118,7 +118,7 @@ SmmInstallConfigurationTable (
//
// Copy the old table to the new table.
//
- CopyMem (
+ CopyMem(
ConfigurationTable,
gSmmCoreSmst.SmmConfigurationTable,
Index * sizeof (EFI_CONFIGURATION_TABLE)
diff --git a/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c b/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c
index 5e89ad52d..d49812777 100644
--- a/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c
+++ b/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c
@@ -136,9 +136,9 @@ SortMemoryMap (
while (MemoryMapEntry < MemoryMapEnd) {
while (NextMemoryMapEntry < MemoryMapEnd) {
if (MemoryMapEntry->PhysicalStart > NextMemoryMapEntry->PhysicalStart) {
- CopyMem (&TempMemoryMap, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
- CopyMem (MemoryMapEntry, NextMemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
- CopyMem (NextMemoryMapEntry, &TempMemoryMap, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(&TempMemoryMap, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(MemoryMapEntry, NextMemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(NextMemoryMapEntry, &TempMemoryMap, sizeof(EFI_MEMORY_DESCRIPTOR));
}
NextMemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (NextMemoryMapEntry, DescriptorSize);
@@ -180,7 +180,7 @@ MergeMemoryMap (
NewMemoryMapEntry = MemoryMap;
MemoryMapEnd = (EFI_MEMORY_DESCRIPTOR *) ((UINT8 *) MemoryMap + *MemoryMapSize);
while ((UINTN)MemoryMapEntry < (UINTN)MemoryMapEnd) {
- CopyMem (NewMemoryMapEntry, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(NewMemoryMapEntry, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR));
NextMemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize);
do {
@@ -324,7 +324,7 @@ SetNewRecord (
UINT64 PhysicalEnd;
UINT64 ImageEnd;
- CopyMem (&TempRecord, OldRecord, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(&TempRecord, OldRecord, sizeof(EFI_MEMORY_DESCRIPTOR));
PhysicalEnd = TempRecord.PhysicalStart + EfiPagesToSize(TempRecord.NumberOfPages);
NewRecordCount = 0;
@@ -477,7 +477,7 @@ SplitRecord (
UINTN TotalNewRecordCount;
if (MaxSplitRecordCount == 0) {
- CopyMem (NewRecord, OldRecord, DescriptorSize);
+ CopyMem(NewRecord, OldRecord, DescriptorSize);
return 0;
}
@@ -486,7 +486,7 @@ SplitRecord (
//
// Override previous record
//
- CopyMem (&TempRecord, OldRecord, sizeof(EFI_MEMORY_DESCRIPTOR));
+ CopyMem(&TempRecord, OldRecord, sizeof(EFI_MEMORY_DESCRIPTOR));
PhysicalStart = TempRecord.PhysicalStart;
PhysicalEnd = TempRecord.PhysicalStart + EfiPagesToSize(TempRecord.NumberOfPages);
@@ -624,7 +624,7 @@ SplitTable (
// Adjust IndexNew according to real split.
//
if (MaxSplitRecordCount != RealSplitRecordCount) {
- CopyMem (
+ CopyMem(
((UINT8 *)MemoryMap + (IndexNew + MaxSplitRecordCount - RealSplitRecordCount) * DescriptorSize),
((UINT8 *)MemoryMap + IndexNew * DescriptorSize),
(RealSplitRecordCount + 1) * DescriptorSize
@@ -637,7 +637,7 @@ SplitTable (
//
// Move all records to the beginning.
//
- CopyMem (
+ CopyMem(
MemoryMap,
(UINT8 *)MemoryMap + (AdditionalRecordCount - TotalSplitRecordCount) * DescriptorSize,
(*MemoryMapSize) + TotalSplitRecordCount * DescriptorSize
@@ -1242,7 +1242,7 @@ PublishMemoryAttributesTable (
DEBUG ((DEBUG_INFO, " DescriptorSize - 0x%08x\n", MemoryAttributesTable->DescriptorSize));
MemoryAttributesEntry = (EFI_MEMORY_DESCRIPTOR *)(MemoryAttributesTable + 1);
for (Index = 0; Index < MemoryMapSize/DescriptorSize; Index++) {
- CopyMem (MemoryAttributesEntry, MemoryMap, DescriptorSize);
+ CopyMem(MemoryAttributesEntry, MemoryMap, DescriptorSize);
DEBUG ((DEBUG_INFO, "Entry (0x%x)\n", MemoryAttributesEntry));
DEBUG ((DEBUG_INFO, " Type - 0x%x\n", MemoryAttributesEntry->Type));
DEBUG ((DEBUG_INFO, " PhysicalStart - 0x%016lx\n", MemoryAttributesEntry->PhysicalStart));
diff --git a/MdeModulePkg/Core/PiSmmCore/Page.c b/MdeModulePkg/Core/PiSmmCore/Page.c
index 1a639fa99..0ddb83b21 100644
--- a/MdeModulePkg/Core/PiSmmCore/Page.c
+++ b/MdeModulePkg/Core/PiSmmCore/Page.c
@@ -176,7 +176,7 @@ CoreFreeMemoryMapStack (
if (mMapStack[mMapDepth].Link.ForwardLink != NULL) {
- CopyMem (Entry , &mMapStack[mMapDepth], sizeof (MEMORY_MAP));
+ CopyMem(Entry , &mMapStack[mMapDepth], sizeof (MEMORY_MAP));
Entry->FromStack = FALSE;
//
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
index e9c9bb89e..2d8571a5a 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
@@ -878,7 +878,7 @@ SmmMain (
mFullSmramRangeCount = gSmmCorePrivate->SmramRangeCount;
mFullSmramRanges = AllocatePool (mFullSmramRangeCount * sizeof (EFI_SMRAM_DESCRIPTOR));
ASSERT (mFullSmramRanges != NULL);
- CopyMem (mFullSmramRanges, gSmmCorePrivate->SmramRanges, mFullSmramRangeCount * sizeof (EFI_SMRAM_DESCRIPTOR));
+ CopyMem(mFullSmramRanges, gSmmCorePrivate->SmramRanges, mFullSmramRangeCount * sizeof (EFI_SMRAM_DESCRIPTOR));
//
// Register all SMI Handlers required by the SMM Core
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
index 8f0fbedc2..d5e4840a1 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
@@ -1421,7 +1421,7 @@ GetFullSmramRanges (
SmramReservedRanges = (EFI_SMM_RESERVED_SMRAM_REGION *) AllocatePool (Size);
ASSERT (SmramReservedRanges != NULL);
for (Index = 0; Index < SmramReservedCount; Index++) {
- CopyMem (&SmramReservedRanges[Index], &SmmConfiguration->SmramReservedRegions[Index], sizeof (EFI_SMM_RESERVED_SMRAM_REGION));
+ CopyMem(&SmramReservedRanges[Index], &SmmConfiguration->SmramReservedRegions[Index], sizeof (EFI_SMM_RESERVED_SMRAM_REGION));
}
Size = MaxCount * sizeof (EFI_SMRAM_DESCRIPTOR);
@@ -1472,7 +1472,7 @@ GetFullSmramRanges (
// No any overlap, copy the entry to the temp SMRAM ranges.
// Zero SmramRanges[Index].PhysicalSize = 0;
//
- CopyMem (&TempSmramRanges[TempSmramRangeCount++], &SmramRanges[Index], sizeof (EFI_SMRAM_DESCRIPTOR));
+ CopyMem(&TempSmramRanges[TempSmramRangeCount++], &SmramRanges[Index], sizeof (EFI_SMRAM_DESCRIPTOR));
SmramRanges[Index].PhysicalSize = 0;
}
}
@@ -1498,7 +1498,7 @@ GetFullSmramRanges (
Index = Index2;
}
}
- CopyMem (&FullSmramRanges[*FullSmramRangeCount], &TempSmramRanges[Index], sizeof (EFI_SMRAM_DESCRIPTOR));
+ CopyMem(&FullSmramRanges[*FullSmramRangeCount], &TempSmramRanges[Index], sizeof (EFI_SMRAM_DESCRIPTOR));
*FullSmramRangeCount += 1;
TempSmramRanges[Index].PhysicalSize = 0;
} while (*FullSmramRangeCount < TempSmramRangeCount);
diff --git a/MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c b/MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c
index ea589e073..140ff0ef2 100644
--- a/MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c
+++ b/MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c
@@ -649,7 +649,7 @@ GetSmmImageDatabaseData (
ImageStruct->ImageSize = mImageStruct[Index].ImageSize;
if (mImageStruct[Index].PdbStringSize != 0) {
ImageStruct->PdbStringOffset = sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE);
- CopyMem ((VOID *)((UINTN)ImageStruct + ImageStruct->PdbStringOffset), mImageStruct[Index].PdbString, mImageStruct[Index].PdbStringSize);
+ CopyMem((VOID *)((UINTN)ImageStruct + ImageStruct->PdbStringOffset), mImageStruct[Index].PdbString, mImageStruct[Index].PdbStringSize);
} else {
ImageStruct->PdbStringOffset = 0;
}
@@ -709,7 +709,7 @@ GetSmmSmiHandlerDataOnSmiEntry(
SmiHandlerStruct->ContextBufferSize = (UINT32)SmiHandler->ContextSize;
if (SmiHandler->ContextSize != 0) {
SmiHandlerStruct->ContextBufferOffset = sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE);
- CopyMem ((UINT8 *)SmiHandlerStruct + SmiHandlerStruct->ContextBufferOffset, SmiHandler->Context, SmiHandler->ContextSize);
+ CopyMem((UINT8 *)SmiHandlerStruct + SmiHandlerStruct->ContextBufferOffset, SmiHandler->Context, SmiHandler->ContextSize);
} else {
SmiHandlerStruct->ContextBufferOffset = 0;
}
@@ -1123,7 +1123,7 @@ ConvertSmiHandlerUsbContext (
}
SmiHandlerUsbContext->Type = UsbContext->Type;
SmiHandlerUsbContext->DevicePathSize = (UINT32)DevicePathSize;
- CopyMem (SmiHandlerUsbContext + 1, UsbContext->Device, DevicePathSize);
+ CopyMem(SmiHandlerUsbContext + 1, UsbContext->Device, DevicePathSize);
*SmiHandlerUsbContextSize = sizeof (SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT) + DevicePathSize;
return SmiHandlerUsbContext;
}
diff --git a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
index 422a2f068..e67a3404b 100644
--- a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
+++ b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
@@ -418,7 +418,7 @@ BuildDriverInfo (
DriverInfo->Header.Length = (UINT16) (sizeof (MEMORY_PROFILE_DRIVER_INFO) + PdbOccupiedSize);
DriverInfo->Header.Revision = MEMORY_PROFILE_DRIVER_INFO_REVISION;
if (FileName != NULL) {
- CopyMem (&DriverInfo->FileName, FileName, sizeof (EFI_GUID));
+ CopyMem(&DriverInfo->FileName, FileName, sizeof (EFI_GUID));
}
DriverInfo->ImageBase = ImageBase;
DriverInfo->ImageSize = ImageSize;
@@ -442,7 +442,7 @@ BuildDriverInfo (
if (PdbSize != 0) {
DriverInfo->PdbStringOffset = (UINT16) sizeof (MEMORY_PROFILE_DRIVER_INFO);
DriverInfoData->PdbString = (CHAR8 *) (DriverInfoData->AllocInfoList + 1);
- CopyMem (DriverInfoData->PdbString, PdbString, PdbSize);
+ CopyMem(DriverInfoData->PdbString, PdbString, PdbSize);
} else {
DriverInfo->PdbStringOffset = 0;
DriverInfoData->PdbString = NULL;
@@ -1153,7 +1153,7 @@ SmmCoreUpdateProfileAllocate (
if (ActionString != NULL) {
AllocInfo->ActionStringOffset = (UINT16) sizeof (MEMORY_PROFILE_ALLOC_INFO);
AllocInfoData->ActionString = (CHAR8 *) (AllocInfoData + 1);
- CopyMem (AllocInfoData->ActionString, ActionString, ActionStringSize);
+ CopyMem(AllocInfoData->ActionString, ActionString, ActionStringSize);
} else {
AllocInfo->ActionStringOffset = 0;
AllocInfoData->ActionString = NULL;
@@ -1678,7 +1678,7 @@ SmramProfileCopyData (
if (*ProfileOffset < sizeof (MEMORY_PROFILE_CONTEXT)) {
if (RemainingSize >= sizeof (MEMORY_PROFILE_CONTEXT)) {
Context = ProfileBuffer;
- CopyMem (Context, &ContextData->Context, sizeof (MEMORY_PROFILE_CONTEXT));
+ CopyMem(Context, &ContextData->Context, sizeof (MEMORY_PROFILE_CONTEXT));
RemainingSize -= sizeof (MEMORY_PROFILE_CONTEXT);
ProfileBuffer = (UINT8 *) ProfileBuffer + sizeof (MEMORY_PROFILE_CONTEXT);
} else {
@@ -1700,10 +1700,10 @@ SmramProfileCopyData (
if (*ProfileOffset < (Offset + DriverInfoData->DriverInfo.Header.Length)) {
if (RemainingSize >= DriverInfoData->DriverInfo.Header.Length) {
DriverInfo = ProfileBuffer;
- CopyMem (DriverInfo, &DriverInfoData->DriverInfo, sizeof (MEMORY_PROFILE_DRIVER_INFO));
+ CopyMem(DriverInfo, &DriverInfoData->DriverInfo, sizeof (MEMORY_PROFILE_DRIVER_INFO));
if (DriverInfo->PdbStringOffset != 0) {
PdbSize = AsciiStrSize (DriverInfoData->PdbString);
- CopyMem ((VOID *) ((UINTN) DriverInfo + DriverInfo->PdbStringOffset), DriverInfoData->PdbString, PdbSize);
+ CopyMem((VOID *) ((UINTN) DriverInfo + DriverInfo->PdbStringOffset), DriverInfoData->PdbString, PdbSize);
}
RemainingSize -= DriverInfo->Header.Length;
ProfileBuffer = (UINT8 *) ProfileBuffer + DriverInfo->Header.Length;
@@ -1726,10 +1726,10 @@ SmramProfileCopyData (
if (*ProfileOffset < (Offset + AllocInfoData->AllocInfo.Header.Length)) {
if (RemainingSize >= AllocInfoData->AllocInfo.Header.Length) {
AllocInfo = ProfileBuffer;
- CopyMem (AllocInfo, &AllocInfoData->AllocInfo, sizeof (MEMORY_PROFILE_ALLOC_INFO));
+ CopyMem(AllocInfo, &AllocInfoData->AllocInfo, sizeof (MEMORY_PROFILE_ALLOC_INFO));
if (AllocInfo->ActionStringOffset) {
ActionStringSize = AsciiStrSize (AllocInfoData->ActionString);
- CopyMem ((VOID *) ((UINTN) AllocInfo + AllocInfo->ActionStringOffset), AllocInfoData->ActionString, ActionStringSize);
+ CopyMem((VOID *) ((UINTN) AllocInfo + AllocInfo->ActionStringOffset), AllocInfoData->ActionString, ActionStringSize);
}
RemainingSize -= AllocInfo->Header.Length;
ProfileBuffer = (UINT8 *) ProfileBuffer + AllocInfo->Header.Length;
@@ -1745,7 +1745,7 @@ SmramProfileCopyData (
if (*ProfileOffset < (Offset + sizeof (MEMORY_PROFILE_FREE_MEMORY))) {
if (RemainingSize >= sizeof (MEMORY_PROFILE_FREE_MEMORY)) {
FreeMemory = ProfileBuffer;
- CopyMem (FreeMemory, &mSmramFreeMemory, sizeof (MEMORY_PROFILE_FREE_MEMORY));
+ CopyMem(FreeMemory, &mSmramFreeMemory, sizeof (MEMORY_PROFILE_FREE_MEMORY));
Index = 0;
FreePageList = &mSmmMemoryMap;
for (Node = FreePageList->BackLink;
@@ -1955,7 +1955,7 @@ SmramProfileProtocolRegisterImage (
ZeroMem (&DriverEntry, sizeof (DriverEntry));
Name = GetFileNameFromFilePath (FilePath);
if (Name != NULL) {
- CopyMem (&DriverEntry.FileName, Name, sizeof (EFI_GUID));
+ CopyMem(&DriverEntry.FileName, Name, sizeof (EFI_GUID));
}
DriverEntry.ImageBuffer = ImageBase;
DriverEntry.NumberOfPage = EFI_SIZE_TO_PAGES ((UINTN) ImageSize);
@@ -1997,7 +1997,7 @@ SmramProfileProtocolUnregisterImage (
ZeroMem (&DriverEntry, sizeof (DriverEntry));
Name = GetFileNameFromFilePath (FilePath);
if (Name != NULL) {
- CopyMem (&DriverEntry.FileName, Name, sizeof (EFI_GUID));
+ CopyMem(&DriverEntry.FileName, Name, sizeof (EFI_GUID));
}
DriverEntry.ImageBuffer = ImageBase;
DriverEntry.NumberOfPage = EFI_SIZE_TO_PAGES ((UINTN) ImageSize);
@@ -2160,7 +2160,7 @@ SmramProfileHandlerGetData (
mSmramProfileGettingStatus = TRUE;
- CopyMem (&SmramProfileGetData, SmramProfileParameterGetData, sizeof (SmramProfileGetData));
+ CopyMem(&SmramProfileGetData, SmramProfileParameterGetData, sizeof (SmramProfileGetData));
ProfileSize = SmramProfileGetDataSize();
@@ -2213,7 +2213,7 @@ SmramProfileHandlerGetDataByOffset (
mSmramProfileGettingStatus = TRUE;
- CopyMem (&SmramProfileGetDataByOffset, SmramProfileParameterGetDataByOffset, sizeof (SmramProfileGetDataByOffset));
+ CopyMem(&SmramProfileGetDataByOffset, SmramProfileParameterGetDataByOffset, sizeof (SmramProfileGetDataByOffset));
//
// Sanity check
@@ -2225,7 +2225,7 @@ SmramProfileHandlerGetDataByOffset (
}
SmramProfileCopyData ((VOID *) (UINTN) SmramProfileGetDataByOffset.ProfileBuffer, &SmramProfileGetDataByOffset.ProfileSize, &SmramProfileGetDataByOffset.ProfileOffset);
- CopyMem (SmramProfileParameterGetDataByOffset, &SmramProfileGetDataByOffset, sizeof (SmramProfileGetDataByOffset));
+ CopyMem(SmramProfileParameterGetDataByOffset, &SmramProfileGetDataByOffset, sizeof (SmramProfileGetDataByOffset));
SmramProfileParameterGetDataByOffset->Header.ReturnStatus = 0;
Done:
@@ -2248,7 +2248,7 @@ SmramProfileHandlerRegisterImage (
VOID *EntryPointInImage;
ZeroMem (&DriverEntry, sizeof (DriverEntry));
- CopyMem (&DriverEntry.FileName, &SmramProfileParameterRegisterImage->FileName, sizeof(EFI_GUID));
+ CopyMem(&DriverEntry.FileName, &SmramProfileParameterRegisterImage->FileName, sizeof(EFI_GUID));
DriverEntry.ImageBuffer = SmramProfileParameterRegisterImage->ImageBuffer;
DriverEntry.NumberOfPage = (UINTN) SmramProfileParameterRegisterImage->NumberOfPage;
Status = InternalPeCoffGetEntryPoint ((VOID *) (UINTN) DriverEntry.ImageBuffer, &EntryPointInImage);
@@ -2277,7 +2277,7 @@ SmramProfileHandlerUnregisterImage (
VOID *EntryPointInImage;
ZeroMem (&DriverEntry, sizeof (DriverEntry));
- CopyMem (&DriverEntry.FileName, &SmramProfileParameterUnregisterImage->FileName, sizeof (EFI_GUID));
+ CopyMem(&DriverEntry.FileName, &SmramProfileParameterUnregisterImage->FileName, sizeof (EFI_GUID));
DriverEntry.ImageBuffer = SmramProfileParameterUnregisterImage->ImageBuffer;
DriverEntry.NumberOfPage = (UINTN) SmramProfileParameterUnregisterImage->NumberOfPage;
Status = InternalPeCoffGetEntryPoint ((VOID *) (UINTN) DriverEntry.ImageBuffer, &EntryPointInImage);
diff --git a/MdeModulePkg/Include/Library/NetLib.h b/MdeModulePkg/Include/Library/NetLib.h
index b0bbaf22a..2de525b4f 100644
--- a/MdeModulePkg/Include/Library/NetLib.h
+++ b/MdeModulePkg/Include/Library/NetLib.h
@@ -253,9 +253,9 @@ typedef struct {
#define EFI_IP6_EQUAL(Ip1, Ip2) (CompareMem ((Ip1), (Ip2), sizeof (EFI_IPv6_ADDRESS)) == 0)
-#define IP4_COPY_ADDRESS(Dest, Src) (CopyMem ((Dest), (Src), sizeof (EFI_IPv4_ADDRESS)))
-#define IP6_COPY_ADDRESS(Dest, Src) (CopyMem ((Dest), (Src), sizeof (EFI_IPv6_ADDRESS)))
-#define IP6_COPY_LINK_ADDRESS(Mac1, Mac2) (CopyMem ((Mac1), (Mac2), sizeof (EFI_MAC_ADDRESS)))
+#define IP4_COPY_ADDRESS(Dest, Src) (CopyMem((Dest), (Src), sizeof (EFI_IPv4_ADDRESS)))
+#define IP6_COPY_ADDRESS(Dest, Src) (CopyMem((Dest), (Src), sizeof (EFI_IPv6_ADDRESS)))
+#define IP6_COPY_LINK_ADDRESS(Mac1, Mac2) (CopyMem((Mac1), (Mac2), sizeof (EFI_MAC_ADDRESS)))
//
// The debug level definition. This value is also used as the
diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
index 59fae41f4..9d89fdee8 100644
--- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
+++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
@@ -545,7 +545,7 @@ TranslateGopBltToBmp (
}
BmpImageHeader = (BMP_IMAGE_HEADER *)*BmpImage;
- CopyMem (BmpImageHeader, &mBmpImageHeaderTemplate, sizeof (BMP_IMAGE_HEADER));
+ CopyMem(BmpImageHeader, &mBmpImageHeaderTemplate, sizeof (BMP_IMAGE_HEADER));
BmpImageHeader->Size = *BmpImageSize;
BmpImageHeader->ImageSize = *BmpImageSize - sizeof (BMP_IMAGE_HEADER);
BmpImageHeader->PixelWidth = PixelWidth;
diff --git a/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c b/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c
index a12c7bc0e..d3407af74 100644
--- a/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c
+++ b/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c
@@ -81,9 +81,9 @@ QuickSortWorker (
//
// swap
//
- CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
- CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
- CopyMem ((UINT8*)BufferToSort+((LoopCount)*ElementSize), Buffer, ElementSize);
+ CopyMem(Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
+ CopyMem((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
+ CopyMem((UINT8*)BufferToSort+((LoopCount)*ElementSize), Buffer, ElementSize);
//
// increment NextSwapLocation
@@ -94,9 +94,9 @@ QuickSortWorker (
//
// swap pivot to it's final position (NextSwapLocaiton)
//
- CopyMem (Buffer, Pivot, ElementSize);
- CopyMem (Pivot, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
- CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
+ CopyMem(Buffer, Pivot, ElementSize);
+ CopyMem(Pivot, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
+ CopyMem((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
//
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
index 96fda88c1..7dc324596 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
@@ -471,7 +471,7 @@ BootLogoUpdateProgress (
//
// Clear progress area
//
- SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
+ SetMem(&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
if (GraphicsOutput != NULL) {
Status = GraphicsOutput->Blt (
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
index c871e3e25..fd14436f0 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
@@ -1031,7 +1031,7 @@ BootMaintRouteConfig (
//
// After user do the save action, need to update OldBmmData.
//
- CopyMem (OldBmmData, NewBmmData, sizeof (BMM_FAKE_NV_DATA));
+ CopyMem(OldBmmData, NewBmmData, sizeof (BMM_FAKE_NV_DATA));
return EFI_SUCCESS;
@@ -1327,11 +1327,11 @@ DiscardChangeHandler (
switch (Private->BmmPreviousPageId) {
case FORM_BOOT_CHG_ID:
- CopyMem (CurrentFakeNVMap->BootOptionOrder, Private->BmmOldFakeNVData.BootOptionOrder, sizeof (CurrentFakeNVMap->BootOptionOrder));
+ CopyMem(CurrentFakeNVMap->BootOptionOrder, Private->BmmOldFakeNVData.BootOptionOrder, sizeof (CurrentFakeNVMap->BootOptionOrder));
break;
case FORM_DRV_CHG_ID:
- CopyMem (CurrentFakeNVMap->DriverOptionOrder, Private->BmmOldFakeNVData.DriverOptionOrder, sizeof (CurrentFakeNVMap->DriverOptionOrder));
+ CopyMem(CurrentFakeNVMap->DriverOptionOrder, Private->BmmOldFakeNVData.DriverOptionOrder, sizeof (CurrentFakeNVMap->DriverOptionOrder));
break;
case FORM_BOOT_DEL_ID:
@@ -1512,7 +1512,7 @@ InitializeBmmConfig (
//
// Backup Initialize BMM configuartion data to BmmOldFakeNVData
//
- CopyMem (&CallbackData->BmmOldFakeNVData, &CallbackData->BmmFakeNvData, sizeof (BMM_FAKE_NV_DATA));
+ CopyMem(&CallbackData->BmmOldFakeNVData, &CallbackData->BmmFakeNvData, sizeof (BMM_FAKE_NV_DATA));
}
/**
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
index 5d6aa3859..892675359 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
@@ -334,7 +334,7 @@ IsRequiredDriver (
*PromptId = ((EFI_IFR_FORM_SET *)Ptr)->FormSetTitle;
*HelpId = ((EFI_IFR_FORM_SET *)Ptr)->Help;
- CopyMem (FormsetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid, sizeof (EFI_GUID));
+ CopyMem(FormsetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid, sizeof (EFI_GUID));
RetVal = TRUE;
}
}
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c
index b16e7d68d..c8996e898 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c
@@ -424,7 +424,7 @@ BOpt_GetBootOptions (
NewLoadContext->FilePathList = AllocateZeroPool(NewLoadContext->FilePathListLength);
ASSERT (NewLoadContext->FilePathList != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->FilePathList,
(EFI_DEVICE_PATH_PROTOCOL *) LoadOptionPtr,
NewLoadContext->FilePathListLength
@@ -444,7 +444,7 @@ BOpt_GetBootOptions (
NewLoadContext->OptionalData = AllocateZeroPool(OptionalDataSize);
ASSERT (NewLoadContext->OptionalData != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->OptionalData,
LoadOptionPtr,
OptionalDataSize
@@ -742,7 +742,7 @@ BOpt_GetDriverOptions (
StringSize = StrSize ((UINT16 *) LoadOptionPtr);
NewLoadContext->Description = AllocateZeroPool(StringSize);
ASSERT (NewLoadContext->Description != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->Description,
(UINT16 *) LoadOptionPtr,
StringSize
@@ -754,7 +754,7 @@ BOpt_GetDriverOptions (
NewLoadContext->FilePathList = AllocateZeroPool(NewLoadContext->FilePathListLength);
ASSERT (NewLoadContext->FilePathList != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->FilePathList,
(EFI_DEVICE_PATH_PROTOCOL *) LoadOptionPtr,
NewLoadContext->FilePathListLength
@@ -774,7 +774,7 @@ BOpt_GetDriverOptions (
NewLoadContext->OptionalData = AllocateZeroPool(OptionalDataSize);
ASSERT (NewLoadContext->OptionalData != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->OptionalData,
LoadOptionPtr,
OptionalDataSize
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
index 7c9f42a92..19079c653 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
@@ -125,7 +125,7 @@ ChangeTerminalDevicePath (
while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) {
- CopyMem (&Com, &Acpi->UID, sizeof (UINT32));
+ CopyMem(&Com, &Acpi->UID, sizeof (UINT32));
}
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Com);
@@ -133,25 +133,25 @@ ChangeTerminalDevicePath (
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
Uart = (UART_DEVICE_PATH *) Node;
- CopyMem (
+ CopyMem(
&Uart->BaudRate,
&NewTerminalContext->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&Uart->DataBits,
&NewTerminalContext->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart->Parity,
&NewTerminalContext->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart->StopBits,
&NewTerminalContext->StopBits,
sizeof (UINT8)
@@ -165,25 +165,25 @@ ChangeTerminalDevicePath (
while (!IsDevicePathEnd (Node1)) {
if ((DevicePathType (Node1) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node1) == MSG_UART_DP)) {
Uart1 = (UART_DEVICE_PATH *) Node1;
- CopyMem (
+ CopyMem(
&Uart1->BaudRate,
&NewTerminalContext->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&Uart1->DataBits,
&NewTerminalContext->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart1->Parity,
&NewTerminalContext->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart1->StopBits,
&NewTerminalContext->StopBits,
sizeof (UINT8)
@@ -235,7 +235,7 @@ ChangeVariableDevicePath (
while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) {
- CopyMem (&Com, &Acpi->UID, sizeof (UINT32));
+ CopyMem(&Com, &Acpi->UID, sizeof (UINT32));
}
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
@@ -246,25 +246,25 @@ ChangeVariableDevicePath (
ASSERT (NewMenuEntry != NULL);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
Uart = (UART_DEVICE_PATH *) Node;
- CopyMem (
+ CopyMem(
&Uart->BaudRate,
&NewTerminalContext->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&Uart->DataBits,
&NewTerminalContext->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart->Parity,
&NewTerminalContext->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart->StopBits,
&NewTerminalContext->StopBits,
sizeof (UINT8)
@@ -317,7 +317,7 @@ RetrieveUartUid (
if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) {
if (AcpiUid != NULL) {
- CopyMem (AcpiUid, &Acpi->UID, sizeof (UINT32));
+ CopyMem(AcpiUid, &Acpi->UID, sizeof (UINT32));
}
return TRUE;
} else {
@@ -471,7 +471,7 @@ LocateSerialIo (
}
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
- CopyMem (&NewMenuEntry->OptionNumber, &Acpi->UID, sizeof (UINT32));
+ CopyMem(&NewMenuEntry->OptionNumber, &Acpi->UID, sizeof (UINT32));
NewTerminalContext->DevicePath = DuplicateDevicePath (DevicePath);
//
// BugBug: I have no choice, calling EfiLibStrFromDatahub will hang the system!
@@ -496,25 +496,25 @@ LocateSerialIo (
(VOID **) &SerialIo
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->BaudRate,
&SerialIo->Mode->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->DataBits,
&SerialIo->Mode->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->Parity,
&SerialIo->Mode->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->StopBits,
&SerialIo->Mode->StopBits,
sizeof (UINT8)
@@ -562,7 +562,7 @@ LocateSerialIo (
Vendor.Header.SubType = MSG_VENDOR_DP;
for (Index2 = 0; Index2 < (ARRAY_SIZE (TerminalTypeGuid)); Index2++) {
- CopyMem (&Vendor.Guid, &TerminalTypeGuid[Index2], sizeof (EFI_GUID));
+ CopyMem(&Vendor.Guid, &TerminalTypeGuid[Index2], sizeof (EFI_GUID));
SetDevicePathNodeLength (&Vendor.Header, sizeof (VENDOR_DEVICE_PATH));
NewDevicePath = AppendDevicePathNode (
NewTerminalContext->DevicePath,
@@ -631,7 +631,7 @@ UpdateComAttributeFromVariable (
while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) {
- CopyMem (&TerminalNumber, &Acpi->UID, sizeof (UINT32));
+ CopyMem(&TerminalNumber, &Acpi->UID, sizeof (UINT32));
}
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
@@ -642,25 +642,25 @@ UpdateComAttributeFromVariable (
}
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
- CopyMem (
+ CopyMem(
&NewTerminalContext->BaudRate,
&Uart->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->DataBits,
&Uart->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->Parity,
&Uart->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&NewTerminalContext->StopBits,
&Uart->StopBits,
sizeof (UINT8)
@@ -675,23 +675,23 @@ UpdateComAttributeFromVariable (
// previous acquired uart attributes
//
Uart1 = (UART_DEVICE_PATH *) SerialNode;
- CopyMem (
+ CopyMem(
&Uart1->BaudRate,
&NewTerminalContext->BaudRate,
sizeof (UINT64)
);
- CopyMem (
+ CopyMem(
&Uart1->DataBits,
&NewTerminalContext->DataBits,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart1->Parity,
&NewTerminalContext->Parity,
sizeof (UINT8)
);
- CopyMem (
+ CopyMem(
&Uart1->StopBits,
&NewTerminalContext->StopBits,
sizeof (UINT8)
@@ -965,7 +965,7 @@ IsTerminalDevicePath (
}
if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) {
- CopyMem (Com, &Acpi->UID, sizeof (UINT32));
+ CopyMem(Com, &Acpi->UID, sizeof (UINT32));
} else {
return FALSE;
}
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c
index 86b448a24..a38c68622 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c
@@ -184,7 +184,7 @@ Var_UpdateConsoleOption (
Vendor.Header.SubType = MSG_VENDOR_DP;
ASSERT (NewTerminalContext->TerminalType < (ARRAY_SIZE (TerminalTypeGuid)));
- CopyMem (
+ CopyMem(
&Vendor.Guid,
&TerminalTypeGuid[NewTerminalContext->TerminalType],
sizeof (EFI_GUID)
@@ -357,7 +357,7 @@ Var_UpdateDriverOption (
NewLoadContext->Description = AllocateZeroPool(StrSize (DescriptionData));
ASSERT (NewLoadContext->Description != NULL);
NewMenuEntry->DisplayString = NewLoadContext->Description;
- CopyMem (
+ CopyMem(
NewLoadContext->Description,
LoadOption.Description,
StrSize (DescriptionData)
@@ -365,7 +365,7 @@ Var_UpdateDriverOption (
NewLoadContext->FilePathList = AllocateZeroPool(GetDevicePathSize (CallbackData->LoadContext->FilePathList));
ASSERT (NewLoadContext->FilePathList != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->FilePathList,
LoadOption.FilePath,
GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@@ -379,7 +379,7 @@ Var_UpdateDriverOption (
if (OptionalDataExist) {
NewLoadContext->OptionalData = AllocateZeroPool(LoadOption.OptionalDataSize);
ASSERT (NewLoadContext->OptionalData != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->OptionalData,
LoadOption.OptionalData,
LoadOption.OptionalDataSize
@@ -477,7 +477,7 @@ Var_UpdateBootOption (
NewMenuEntry->DisplayString = NewLoadContext->Description;
- CopyMem (
+ CopyMem(
NewLoadContext->Description,
LoadOption.Description,
StrSize (NvRamMap->BootDescriptionData)
@@ -485,7 +485,7 @@ Var_UpdateBootOption (
NewLoadContext->FilePathList = AllocateZeroPool(GetDevicePathSize (CallbackData->LoadContext->FilePathList));
ASSERT (NewLoadContext->FilePathList != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->FilePathList,
LoadOption.FilePath,
GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@@ -499,7 +499,7 @@ Var_UpdateBootOption (
if (OptionalDataExist) {
NewLoadContext->OptionalData = AllocateZeroPool(LoadOption.OptionalDataSize);
ASSERT (NewLoadContext->OptionalData != NULL);
- CopyMem (
+ CopyMem(
NewLoadContext->OptionalData,
LoadOption.OptionalData,
LoadOption.OptionalDataSize
@@ -613,7 +613,7 @@ Var_UpdateBootOrder (
for (Index = OrderIndex; Index < BootOrderSize / sizeof (UINT16); Index++) {
if ((BootOrder[Index] == (UINT16) (CallbackData->BmmFakeNvData.BootOptionOrder[OrderIndex] - 1)) && (OrderIndex != Index)) {
OptionNumber = BootOrder[Index];
- CopyMem (&BootOrder[OrderIndex + 1], &BootOrder[OrderIndex], (Index - OrderIndex) * sizeof (UINT16));
+ CopyMem(&BootOrder[OrderIndex + 1], &BootOrder[OrderIndex], (Index - OrderIndex) * sizeof (UINT16));
BootOrder[OrderIndex] = OptionNumber;
}
}
diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
index 80f2df270..782810f64 100644
--- a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
+++ b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
@@ -363,7 +363,7 @@ GroupMultipleLegacyBootOption4SameType (
CHAR16 OptionName[sizeof ("Boot####")];
EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
- SetMem (DeviceTypeIndex, sizeof (DeviceTypeIndex), 0xff);
+ SetMem(DeviceTypeIndex, sizeof (DeviceTypeIndex), 0xff);
GetEfiGlobalVariable2 (L"BootOrder", (VOID **) &BootOrder, &BootOrderSize);
if (BootOrder == NULL) {
@@ -394,7 +394,7 @@ GroupMultipleLegacyBootOption4SameType (
// insert the current boot option before *NextIndex, causing [*Next .. Index] shift right one position
//
OptionNumber = BootOrder[Index];
- CopyMem (&BootOrder[*NextIndex + 1], &BootOrder[*NextIndex], (Index - *NextIndex) * sizeof (UINT16));
+ CopyMem(&BootOrder[*NextIndex + 1], &BootOrder[*NextIndex], (Index - *NextIndex) * sizeof (UINT16));
BootOrder[*NextIndex] = OptionNumber;
//
diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c
index 44d7b5d81..710c4289e 100644
--- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c
+++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c
@@ -301,7 +301,7 @@ ProcessUserOpcode(
ASSERT (gBannerData != NULL);
}
- CopyMem (
+ CopyMem(
&gBannerData->Banner[((EFI_IFR_GUID_BANNER *) OpCodeData)->LineNumber][
((EFI_IFR_GUID_BANNER *) OpCodeData)->Alignment],
&((EFI_IFR_GUID_BANNER *) OpCodeData)->Title,
@@ -431,7 +431,7 @@ ScreenDiemensionInfoValidate (
((FormData->ScreenDimensions->RightColumn - FormData->ScreenDimensions->LeftColumn) > 2) &&
((FormData->ScreenDimensions->BottomRow - FormData->ScreenDimensions->TopRow) > STATUS_BAR_HEIGHT +
FRONT_PAGE_HEADER_HEIGHT + gFooterHeight + 3)) {
- CopyMem (&gScreenDimensions, (VOID *) FormData->ScreenDimensions, sizeof (EFI_SCREEN_DESCRIPTOR));
+ CopyMem(&gScreenDimensions, (VOID *) FormData->ScreenDimensions, sizeof (EFI_SCREEN_DESCRIPTOR));
} else {
return EFI_INVALID_PARAMETER;
}
@@ -572,7 +572,7 @@ PrintHotKeyHelpString (
CHAR16 BakChar;
CHAR16 *ColumnStr;
- CopyMem (&LocalScreen, &gScreenDimensions, sizeof (EFI_SCREEN_DESCRIPTOR));
+ CopyMem(&LocalScreen, &gScreenDimensions, sizeof (EFI_SCREEN_DESCRIPTOR));
ColumnWidth = (LocalScreen.RightColumn - LocalScreen.LeftColumn) / 3;
BottomRowOfHotKeyHelp = LocalScreen.BottomRow - STATUS_BAR_HEIGHT - 3;
ColumnStr = gLibEmptyString;
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
index 4f92f76cf..f087da237 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
@@ -351,7 +351,7 @@ GetBootOptionByNumber(
if (!EFI_ERROR(Status)) {
*OptionBuf = AllocatePool (sizeof (EFI_BOOT_MANAGER_LOAD_OPTION));
if (*OptionBuf != NULL) {
- CopyMem (*OptionBuf, &BootOption, sizeof (EFI_BOOT_MANAGER_LOAD_OPTION));
+ CopyMem(*OptionBuf, &BootOption, sizeof (EFI_BOOT_MANAGER_LOAD_OPTION));
Status = EFI_SUCCESS;
} else {
Status = EFI_OUT_OF_RESOURCES;
@@ -1794,7 +1794,7 @@ RelocateCapsuleToRam (
StringBuf = (UINT8 *)FileNameCapsule + FileNameCapsule->HeaderSize;
for (Index = 0; Index < CapsuleOnDiskNum; Index ++) {
StringSize = StrSize (CapsuleOnDiskBuf[Index].FileInfo->FileName);
- CopyMem (StringBuf, CapsuleOnDiskBuf[Index].FileInfo->FileName, StringSize);
+ CopyMem(StringBuf, CapsuleOnDiskBuf[Index].FileInfo->FileName, StringSize);
StringBuf += StringSize;
}
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c
index 605e09840..f01fc15a9 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c
@@ -254,7 +254,7 @@ RecordFmpCapsuleStatusVariable (
}
if (DevicePathStr != NULL) {
- CopyMem ((UINT8 *)CapsuleResultVariableFmp + sizeof(EFI_CAPSULE_RESULT_VARIABLE_FMP) + CapFileNameSize, DevicePathStr, DevicePathStrSize);
+ CopyMem((UINT8 *)CapsuleResultVariableFmp + sizeof(EFI_CAPSULE_RESULT_VARIABLE_FMP) + CapFileNameSize, DevicePathStr, DevicePathStrSize);
FreePool(DevicePathStr);
DevicePathStr = NULL;
}
diff --git a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c
index a8404ff34..3a081abfa 100644
--- a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c
@@ -730,7 +730,7 @@ InternalAllocateCopyPool(
Memory = InternalAllocatePool (PoolType, AllocationSize);
if (Memory != NULL) {
- Memory = CopyMem (Memory, Buffer, AllocationSize);
+ Memory = CopyMem(Memory, Buffer, AllocationSize);
}
return Memory;
}
@@ -889,7 +889,7 @@ InternalReallocatePool (
NewBuffer = InternalAllocateZeroPool(PoolType, NewSize);
if (NewBuffer != NULL && OldBuffer != NULL) {
- CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
+ CopyMem(NewBuffer, OldBuffer, MIN (OldSize, NewSize));
FreePool(OldBuffer);
}
return NewBuffer;
diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
index 170955caa..6381cb884 100644
--- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
+++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
@@ -299,9 +299,9 @@ AllocateBootPerformanceTable (
ASSERT_EFI_ERROR(Status);
ASSERT_EFI_ERROR(SmmCommData->ReturnStatus);
if (SmmCommData->BootRecordOffset + SmmCommData->BootRecordSize > SmmBootRecordDataSize) {
- CopyMem ((UINT8 *) SmmBootRecordData + SmmCommData->BootRecordOffset, SmmCommData->BootRecordData, SmmBootRecordDataSize - SmmCommData->BootRecordOffset);
+ CopyMem((UINT8 *) SmmBootRecordData + SmmCommData->BootRecordOffset, SmmCommData->BootRecordData, SmmBootRecordDataSize - SmmCommData->BootRecordOffset);
} else {
- CopyMem ((UINT8 *) SmmBootRecordData + SmmCommData->BootRecordOffset, SmmCommData->BootRecordData, SmmCommData->BootRecordSize);
+ CopyMem((UINT8 *) SmmBootRecordData + SmmCommData->BootRecordOffset, SmmCommData->BootRecordData, SmmCommData->BootRecordSize);
}
SmmCommData->BootRecordOffset = SmmCommData->BootRecordOffset + SmmCommData->BootRecordSize;
}
@@ -371,13 +371,13 @@ AllocateBootPerformanceTable (
//
// Fill Basic Boot record to Boot Performance Table.
//
- CopyMem (mAcpiBootPerformanceTable, &mBootPerformanceTableTemplate, sizeof (mBootPerformanceTableTemplate));
+ CopyMem(mAcpiBootPerformanceTable, &mBootPerformanceTableTemplate, sizeof (mBootPerformanceTableTemplate));
BootPerformanceData = BootPerformanceData + mAcpiBootPerformanceTable->Header.Length;
//
// Fill Boot records from boot drivers.
//
if (mPerformancePointer != NULL) {
- CopyMem (BootPerformanceData, mPerformancePointer, mPerformanceLength);
+ CopyMem(BootPerformanceData, mPerformancePointer, mPerformanceLength);
mAcpiBootPerformanceTable->Header.Length += mPerformanceLength;
BootPerformanceData = BootPerformanceData + mPerformanceLength;
FreePool(mPerformancePointer);
@@ -389,7 +389,7 @@ AllocateBootPerformanceTable (
//
// Fill Boot records from SMM drivers.
//
- CopyMem (BootPerformanceData, SmmBootRecordData, SmmBootRecordDataSize);
+ CopyMem(BootPerformanceData, SmmBootRecordData, SmmBootRecordDataSize);
FreePool(SmmBootRecordData);
mAcpiBootPerformanceTable->Header.Length = (UINT32) (mAcpiBootPerformanceTable->Header.Length + SmmBootRecordDataSize);
BootPerformanceData = BootPerformanceData + SmmBootRecordDataSize;
@@ -1016,14 +1016,14 @@ InsertFpdtRecord (
FpdtRecordPtr.GuidEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.GuidEvent->ProgressID = PerfId;
FpdtRecordPtr.GuidEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.GuidEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidEvent->Guid));
+ CopyMem(&FpdtRecordPtr.GuidEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidEvent->Guid));
if (CallerIdentifier == NULL && PerfId == MODULE_END_ID && mCachedLength != 0) {
if (mFpdtBufferIsReported) {
CachedFpdtRecordPtr.RecordHeader = (EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *)(mBootRecordBuffer + mCachedLength);
} else {
CachedFpdtRecordPtr.RecordHeader = (EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *)(mPerformancePointer + mCachedLength);
}
- CopyMem (&FpdtRecordPtr.GuidEvent->Guid, &CachedFpdtRecordPtr.GuidEvent->Guid, sizeof (FpdtRecordPtr.GuidEvent->Guid));
+ CopyMem(&FpdtRecordPtr.GuidEvent->Guid, &CachedFpdtRecordPtr.GuidEvent->Guid, sizeof (FpdtRecordPtr.GuidEvent->Guid));
mCachedLength = 0;
}
}
@@ -1053,14 +1053,14 @@ InsertFpdtRecord (
FpdtRecordPtr.GuidQwordEvent->ProgressID = PerfId;
FpdtRecordPtr.GuidQwordEvent->Timestamp = TimeStamp;
FpdtRecordPtr.GuidQwordEvent->Qword = mLoadImageCount;
- CopyMem (&FpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidQwordEvent->Guid));
+ CopyMem(&FpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidQwordEvent->Guid));
if (PerfId == MODULE_LOADIMAGE_END_ID && mCachedLength != 0) {
if (mFpdtBufferIsReported) {
CachedFpdtRecordPtr.RecordHeader = (EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *)(mBootRecordBuffer + mCachedLength);
} else {
CachedFpdtRecordPtr.RecordHeader = (EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *)(mPerformancePointer + mCachedLength);
}
- CopyMem (&CachedFpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (CachedFpdtRecordPtr.GuidQwordEvent->Guid));
+ CopyMem(&CachedFpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (CachedFpdtRecordPtr.GuidQwordEvent->Guid));
mCachedLength = 0;
}
}
@@ -1080,7 +1080,7 @@ InsertFpdtRecord (
FpdtRecordPtr.GuidQwordEvent->ProgressID = PerfId;
FpdtRecordPtr.GuidQwordEvent->Timestamp = TimeStamp;
FpdtRecordPtr.GuidQwordEvent->Qword = Address;
- CopyMem (&FpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidQwordEvent->Guid));
+ CopyMem(&FpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidQwordEvent->Guid));
}
break;
@@ -1094,7 +1094,7 @@ InsertFpdtRecord (
FpdtRecordPtr.GuidQwordStringEvent->ProgressID = PerfId;
FpdtRecordPtr.GuidQwordStringEvent->Timestamp = TimeStamp;
FpdtRecordPtr.GuidQwordStringEvent->Qword = Address;
- CopyMem (&FpdtRecordPtr.GuidQwordStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidQwordStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.GuidQwordStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidQwordStringEvent->Guid));
if (Address != 0) {
GetDeviceInfoFromHandleAndUpdateLength(CallerIdentifier, (EFI_HANDLE)(UINTN)Address, FpdtRecordPtr.GuidQwordStringEvent->String, &FpdtRecordPtr.GuidQwordStringEvent->Header.Length);
}
@@ -1118,8 +1118,8 @@ InsertFpdtRecord (
FpdtRecordPtr.DualGuidStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DualGuidStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DualGuidStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DualGuidStringEvent->Guid1, CallerIdentifier, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid1));
- CopyMem (&FpdtRecordPtr.DualGuidStringEvent->Guid2, Guid, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid2));
+ CopyMem(&FpdtRecordPtr.DualGuidStringEvent->Guid1, CallerIdentifier, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid1));
+ CopyMem(&FpdtRecordPtr.DualGuidStringEvent->Guid2, Guid, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid2));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DualGuidStringEvent->String, StringPtr, &FpdtRecordPtr.DualGuidStringEvent->Header.Length);
}
break;
@@ -1146,7 +1146,7 @@ InsertFpdtRecord (
FpdtRecordPtr.DynamicStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DynamicStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DynamicStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DynamicStringEvent->String, StringPtr, &FpdtRecordPtr.DynamicStringEvent->Header.Length);
}
break;
@@ -1168,7 +1168,7 @@ InsertFpdtRecord (
FpdtRecordPtr.DynamicStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DynamicStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DynamicStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DynamicStringEvent->String, StringPtr, &FpdtRecordPtr.DynamicStringEvent->Header.Length);
}
} else {
@@ -1193,9 +1193,9 @@ InsertFpdtRecord (
//
// Cache the event guid in string event record.
//
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, Guid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, Guid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
} else {
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
}
if (AsciiStrLen(StringPtr) == 0) {
StringPtr = "unknown name";
@@ -1217,7 +1217,7 @@ InsertFpdtRecord (
if (StringLen >= DestMax) {
StringLen = DestMax -1;
}
- CopyMem (&CachedFpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (CachedFpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&CachedFpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (CachedFpdtRecordPtr.DynamicStringEvent->Guid));
AsciiStrnCpyS (CachedFpdtRecordPtr.DynamicStringEvent->String, DestMax, StringPtr, StringLen);
} else if (PerfId == MODULE_END_ID) {
DestMax = FpdtRecordPtr.DynamicStringEvent->Header.Length - sizeof (FPDT_DYNAMIC_STRING_EVENT_RECORD);
@@ -1225,7 +1225,7 @@ InsertFpdtRecord (
if (StringLen >= DestMax) {
StringLen = DestMax -1;
}
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, &CachedFpdtRecordPtr.DynamicStringEvent->Guid, sizeof (CachedFpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, &CachedFpdtRecordPtr.DynamicStringEvent->Guid, sizeof (CachedFpdtRecordPtr.DynamicStringEvent->Guid));
AsciiStrnCpyS (FpdtRecordPtr.DynamicStringEvent->String, DestMax, CachedFpdtRecordPtr.DynamicStringEvent->String, StringLen);
}
mCachedLength = 0;
@@ -1284,7 +1284,7 @@ InternalGetPeiPerformance (
}
EventRec = mPerformancePointer + mPerformanceLength;
- CopyMem (EventRec, FirmwarePerformanceHob + sizeof (FPDT_PEI_EXT_PERF_HEADER), (UINTN)(PeiPerformanceLogHeader->SizeOfAllEntries));
+ CopyMem(EventRec, FirmwarePerformanceHob + sizeof (FPDT_PEI_EXT_PERF_HEADER), (UINTN)(PeiPerformanceLogHeader->SizeOfAllEntries));
//
// Update the used buffer size.
//
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
index 61e746e42..7d4826da7 100644
--- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
+++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
@@ -1536,7 +1536,7 @@ HttpSetFieldNameAndValue (
if (HttpHeader->FieldName == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (HttpHeader->FieldName, FieldName, FieldNameSize);
+ CopyMem(HttpHeader->FieldName, FieldName, FieldNameSize);
HttpHeader->FieldName[FieldNameSize - 1] = 0;
FieldValueSize = AsciiStrSize (FieldValue);
@@ -1545,7 +1545,7 @@ HttpSetFieldNameAndValue (
FreePool(HttpHeader->FieldName);
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (HttpHeader->FieldValue, FieldValue, FieldValueSize);
+ CopyMem(HttpHeader->FieldValue, FieldValue, FieldValueSize);
HttpHeader->FieldValue[FieldValueSize - 1] = 0;
return EFI_SUCCESS;
@@ -1850,32 +1850,32 @@ HttpGenRequestMessage (
switch (Message->Data.Request->Method) {
case HttpMethodGet:
StrLength = sizeof (HTTP_METHOD_GET) - 1;
- CopyMem (RequestPtr, HTTP_METHOD_GET, StrLength);
+ CopyMem(RequestPtr, HTTP_METHOD_GET, StrLength);
RequestPtr += StrLength;
break;
case HttpMethodPut:
StrLength = sizeof (HTTP_METHOD_PUT) - 1;
- CopyMem (RequestPtr, HTTP_METHOD_PUT, StrLength);
+ CopyMem(RequestPtr, HTTP_METHOD_PUT, StrLength);
RequestPtr += StrLength;
break;
case HttpMethodPatch:
StrLength = sizeof (HTTP_METHOD_PATCH) - 1;
- CopyMem (RequestPtr, HTTP_METHOD_PATCH, StrLength);
+ CopyMem(RequestPtr, HTTP_METHOD_PATCH, StrLength);
RequestPtr += StrLength;
break;
case HttpMethodPost:
StrLength = sizeof (HTTP_METHOD_POST) - 1;
- CopyMem (RequestPtr, HTTP_METHOD_POST, StrLength);
+ CopyMem(RequestPtr, HTTP_METHOD_POST, StrLength);
RequestPtr += StrLength;
break;
case HttpMethodHead:
StrLength = sizeof (HTTP_METHOD_HEAD) - 1;
- CopyMem (RequestPtr, HTTP_METHOD_HEAD, StrLength);
+ CopyMem(RequestPtr, HTTP_METHOD_HEAD, StrLength);
RequestPtr += StrLength;
break;
case HttpMethodDelete:
StrLength = sizeof (HTTP_METHOD_DELETE) - 1;
- CopyMem (RequestPtr, HTTP_METHOD_DELETE, StrLength);
+ CopyMem(RequestPtr, HTTP_METHOD_DELETE, StrLength);
RequestPtr += StrLength;
break;
default:
@@ -1885,22 +1885,22 @@ HttpGenRequestMessage (
}
StrLength = AsciiStrLen(EMPTY_SPACE);
- CopyMem (RequestPtr, EMPTY_SPACE, StrLength);
+ CopyMem(RequestPtr, EMPTY_SPACE, StrLength);
RequestPtr += StrLength;
StrLength = AsciiStrLen(Url);
- CopyMem (RequestPtr, Url, StrLength);
+ CopyMem(RequestPtr, Url, StrLength);
RequestPtr += StrLength;
StrLength = sizeof (HTTP_VERSION_CRLF_STR) - 1;
- CopyMem (RequestPtr, HTTP_VERSION_CRLF_STR, StrLength);
+ CopyMem(RequestPtr, HTTP_VERSION_CRLF_STR, StrLength);
RequestPtr += StrLength;
if (HttpHdr != NULL) {
//
// Construct header
//
- CopyMem (RequestPtr, HttpHdr, HttpHdrSize);
+ CopyMem(RequestPtr, HttpHdr, HttpHdrSize);
RequestPtr += HttpHdrSize;
}
}
@@ -1909,7 +1909,7 @@ HttpGenRequestMessage (
// Construct body
//
if (Message->Body != NULL) {
- CopyMem (RequestPtr, Message->Body, Message->BodyLength);
+ CopyMem(RequestPtr, Message->Body, Message->BodyLength);
RequestPtr += Message->BodyLength;
}
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index 1043d5918..ac78217ba 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -229,7 +229,7 @@ SyslogSendPacket (
}
Ether = (ETHER_HEAD *) Packet;
- CopyMem (Ether->SrcMac, Snp->Mode->CurrentAddress.Addr, NET_ETHER_ADDR_LEN);
+ CopyMem(Ether->SrcMac, Snp->Mode->CurrentAddress.Addr, NET_ETHER_ADDR_LEN);
//
// Start the timeout event.
@@ -340,7 +340,7 @@ SyslogBuildPacket (
// SyslogSendPacket will fill in the address for us.
//
Ether = (ETHER_HEAD *) Buf;
- CopyMem (Ether->DstMac, mSyslogDstMac, NET_ETHER_ADDR_LEN);
+ CopyMem(Ether->DstMac, mSyslogDstMac, NET_ETHER_ADDR_LEN);
ZeroMem (Ether->SrcMac, NET_ETHER_ADDR_LEN);
Ether->EtherType = HTONS (0x0800); // IPv4 protocol
@@ -880,14 +880,14 @@ Ip6Swap128 (
ASSERT (Ip6 != NULL);
- CopyMem (&High, Ip6, sizeof (UINT64));
- CopyMem (&Low, &Ip6->Addr[8], sizeof (UINT64));
+ CopyMem(&High, Ip6, sizeof (UINT64));
+ CopyMem(&Low, &Ip6->Addr[8], sizeof (UINT64));
High = SwapBytes64 (High);
Low = SwapBytes64 (Low);
- CopyMem (Ip6, &Low, sizeof (UINT64));
- CopyMem (&Ip6->Addr[8], &High, sizeof (UINT64));
+ CopyMem(Ip6, &Low, sizeof (UINT64));
+ CopyMem(&Ip6->Addr[8], &High, sizeof (UINT64));
return Ip6;
}
@@ -947,7 +947,7 @@ NetGetUint32 (
ASSERT (Buf != NULL);
- CopyMem (&Value, Buf, sizeof (UINT32));
+ CopyMem(&Value, Buf, sizeof (UINT32));
return NTOHL (Value);
}
@@ -974,7 +974,7 @@ NetPutUint32 (
ASSERT (Buf != NULL);
Data = HTONL (Data);
- CopyMem (Buf, &Data, sizeof (UINT32));
+ CopyMem(Buf, &Data, sizeof (UINT32));
}
@@ -2121,7 +2121,7 @@ NetLibGetVlanHandle (
//
// Construct VLAN device path
//
- CopyMem (&VlanNode, &mNetVlanDevicePathTemplate, sizeof (VLAN_DEVICE_PATH));
+ CopyMem(&VlanNode, &mNetVlanDevicePathTemplate, sizeof (VLAN_DEVICE_PATH));
VlanNode.VlanId = VlanId;
VlanDevicePath = AppendDevicePathNode (
ParentDevicePath,
@@ -2253,7 +2253,7 @@ NetLibGetMacAddress (
}
*AddressSize = SnpMode->HwAddressSize;
- CopyMem (MacAddress->Addr, SnpMode->CurrentAddress.Addr, SnpMode->HwAddressSize);
+ CopyMem(MacAddress->Addr, SnpMode->CurrentAddress.Addr, SnpMode->HwAddressSize);
return EFI_SUCCESS;
}
@@ -2843,8 +2843,8 @@ NetLibCreateIPv4DPathNode (
Node->Header.SubType = MSG_IPv4_DP;
SetDevicePathNodeLength (&Node->Header, sizeof (IPv4_DEVICE_PATH));
- CopyMem (&Node->LocalIpAddress, &LocalIp, sizeof (EFI_IPv4_ADDRESS));
- CopyMem (&Node->RemoteIpAddress, &RemoteIp, sizeof (EFI_IPv4_ADDRESS));
+ CopyMem(&Node->LocalIpAddress, &LocalIp, sizeof (EFI_IPv4_ADDRESS));
+ CopyMem(&Node->RemoteIpAddress, &RemoteIp, sizeof (EFI_IPv4_ADDRESS));
Node->LocalPort = LocalPort;
Node->RemotePort = RemotePort;
@@ -2862,7 +2862,7 @@ NetLibCreateIPv4DPathNode (
// Set the Subnet mask to default value 255:255:255:0.
//
ZeroMem (&Node->GatewayIpAddress, sizeof (EFI_IPv4_ADDRESS));
- SetMem (&Node->SubnetMask, sizeof (EFI_IPv4_ADDRESS), 0xff);
+ SetMem(&Node->SubnetMask, sizeof (EFI_IPv4_ADDRESS), 0xff);
Node->SubnetMask.Addr[3] = 0;
}
@@ -2904,8 +2904,8 @@ NetLibCreateIPv6DPathNode (
Node->Header.SubType = MSG_IPv6_DP;
SetDevicePathNodeLength (&Node->Header, sizeof (IPv6_DEVICE_PATH));
- CopyMem (&Node->LocalIpAddress, LocalIp, sizeof (EFI_IPv6_ADDRESS));
- CopyMem (&Node->RemoteIpAddress, RemoteIp, sizeof (EFI_IPv6_ADDRESS));
+ CopyMem(&Node->LocalIpAddress, LocalIp, sizeof (EFI_IPv6_ADDRESS));
+ CopyMem(&Node->RemoteIpAddress, RemoteIp, sizeof (EFI_IPv6_ADDRESS));
Node->LocalPort = LocalPort;
Node->RemotePort = RemotePort;
@@ -3286,7 +3286,7 @@ NetLibGetSystemGuid (
// SMBIOS tables are byte packed so we need to do a byte copy to
// prevend alignment faults on Itanium-based platform.
//
- CopyMem (SystemGuid, &Smbios.Type1->Uuid, sizeof (EFI_GUID));
+ CopyMem(SystemGuid, &Smbios.Type1->Uuid, sizeof (EFI_GUID));
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Library/DxeNetLib/NetBuffer.c b/MdeModulePkg/Library/DxeNetLib/NetBuffer.c
index efd5888c1..5a22b098d 100644
--- a/MdeModulePkg/Library/DxeNetLib/NetBuffer.c
+++ b/MdeModulePkg/Library/DxeNetLib/NetBuffer.c
@@ -258,14 +258,14 @@ NetbufClone (
Clone->Ip = Nbuf->Ip;
Clone->Tcp = Nbuf->Tcp;
- CopyMem (Clone->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
+ CopyMem(Clone->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
NET_GET_REF (Nbuf->Vector);
Clone->Vector = Nbuf->Vector;
Clone->BlockOpNum = Nbuf->BlockOpNum;
Clone->TotalSize = Nbuf->TotalSize;
- CopyMem (Clone->BlockOp, Nbuf->BlockOp, sizeof (NET_BLOCK_OP) * Nbuf->BlockOpNum);
+ CopyMem(Clone->BlockOp, Nbuf->BlockOp, sizeof (NET_BLOCK_OP) * Nbuf->BlockOpNum);
return Clone;
}
@@ -311,7 +311,7 @@ NetbufDuplicate (
// Don't set the IP and TCP head point, since it is most
// like that they are pointing to the memory of Nbuf.
//
- CopyMem (Duplicate->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
+ CopyMem(Duplicate->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
NetbufReserve (Duplicate, HeadSpace);
Dst = NetbufAllocSpace (Duplicate, Nbuf->TotalSize, NET_BUF_TAIL);
@@ -680,7 +680,7 @@ NetbufGetFragment (
);
}
- CopyMem (Child->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
+ CopyMem(Child->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
return Child;
FreeChild:
@@ -787,7 +787,7 @@ NetbufFromExt (
for (Index = 0; Index < ExtNum; Index++) {
if (Len >= ExtFragment[Index].Len) {
- CopyMem (Header, ExtFragment[Index].Bulk, ExtFragment[Index].Len);
+ CopyMem(Header, ExtFragment[Index].Bulk, ExtFragment[Index].Len);
Copied += ExtFragment[Index].Len;
Len -= ExtFragment[Index].Len;
@@ -805,7 +805,7 @@ NetbufFromExt (
}
} else {
- CopyMem (Header, ExtFragment[Index].Bulk, Len);
+ CopyMem(Header, ExtFragment[Index].Bulk, Len);
Copied += Len;
TotalLen += Len;
@@ -1293,11 +1293,11 @@ NetbufCopy (
Left = BlockOp[Index].Size - Skip;
if (Len <= Left) {
- CopyMem (Dest, BlockOp[Index].Head + Skip, Len);
+ CopyMem(Dest, BlockOp[Index].Head + Skip, Len);
return Len;
}
- CopyMem (Dest, BlockOp[Index].Head + Skip, Left);
+ CopyMem(Dest, BlockOp[Index].Head + Skip, Left);
Dest += Left;
Len -= Left;
@@ -1310,11 +1310,11 @@ NetbufCopy (
Len -= BlockOp[Index].Size;
Copied += BlockOp[Index].Size;
- CopyMem (Dest, BlockOp[Index].Head, BlockOp[Index].Size);
+ CopyMem(Dest, BlockOp[Index].Head, BlockOp[Index].Size);
Dest += BlockOp[Index].Size;
} else {
Copied += Len;
- CopyMem (Dest, BlockOp[Index].Head, Len);
+ CopyMem(Dest, BlockOp[Index].Head, Len);
break;
}
}
diff --git a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c
index d3db562e7..804cbdecf 100644
--- a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c
@@ -534,7 +534,7 @@ ReportStatusCodeEx (
// Fill in the extended data buffer
//
if (ExtendedData != NULL) {
- CopyMem (StatusCodeData + 1, ExtendedData, ExtendedDataSize);
+ CopyMem(StatusCodeData + 1, ExtendedData, ExtendedDataSize);
}
//
diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
index e3d35b885..33a59f785 100644
--- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
+++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
@@ -519,7 +519,7 @@ LibStrDuplicate (
Dest = AllocateZeroPool(Size);
ASSERT (Dest != NULL);
if (Dest != NULL) {
- CopyMem (Dest, Src, Size);
+ CopyMem(Dest, Src, Size);
}
return Dest;
diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
index 47c5326e9..0cc94a3a0 100644
--- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
+++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
@@ -155,9 +155,9 @@ FrameBufferBltConfigure (
return RETURN_INVALID_PARAMETER;
}
- CopyMem (&Configure->PixelMasks, BitMask, sizeof (*BitMask));
- CopyMem (Configure->PixelShl, PixelShl, sizeof (PixelShl));
- CopyMem (Configure->PixelShr, PixelShr, sizeof (PixelShr));
+ CopyMem(&Configure->PixelMasks, BitMask, sizeof (*BitMask));
+ CopyMem(Configure->PixelShl, PixelShl, sizeof (PixelShl));
+ CopyMem(Configure->PixelShr, PixelShr, sizeof (PixelShr));
Configure->BytesPerPixel = BytesPerPixel;
Configure->PixelFormat = FrameBufferInfo->PixelFormat;
Configure->FrameBuffer = (UINT8*) FrameBuffer;
@@ -262,7 +262,7 @@ FrameBufferBltLibVideoFill (
}
}
if (UseWideFill) {
- SetMem (&WideFill, sizeof (WideFill), Uint8);
+ SetMem(&WideFill, sizeof (WideFill), Uint8);
}
}
@@ -278,7 +278,7 @@ FrameBufferBltLibVideoFill (
SizeInBytes &= 3;
}
if (SizeInBytes > 0) {
- SetMem (Destination, SizeInBytes, (UINT8) (UINTN) WideFill);
+ SetMem(Destination, SizeInBytes, (UINT8) (UINTN) WideFill);
}
} else {
LineBufferReady = FALSE;
@@ -296,14 +296,14 @@ FrameBufferBltLibVideoFill (
SizeInBytes &= 7;
}
if (SizeInBytes > 0) {
- CopyMem (Destination, &WideFill, SizeInBytes);
+ CopyMem(Destination, &WideFill, SizeInBytes);
}
} else {
DEBUG ((EFI_D_VERBOSE, "VideoFill (not wide)\n"));
if (!LineBufferReady) {
- CopyMem (Configure->LineBuffer, &WideFill, Configure->BytesPerPixel);
+ CopyMem(Configure->LineBuffer, &WideFill, Configure->BytesPerPixel);
for (IndexX = 1; IndexX < Width; ) {
- CopyMem (
+ CopyMem(
(Configure->LineBuffer + (IndexX * Configure->BytesPerPixel)),
Configure->LineBuffer,
MIN (IndexX, Width - IndexX) * Configure->BytesPerPixel
@@ -312,7 +312,7 @@ FrameBufferBltLibVideoFill (
}
LineBufferReady = TRUE;
}
- CopyMem (Destination, Configure->LineBuffer, WidthInBytes);
+ CopyMem(Destination, Configure->LineBuffer, WidthInBytes);
}
}
}
@@ -404,7 +404,7 @@ FrameBufferBltLibVideoToBltBuffer (
Destination = Configure->LineBuffer;
}
- CopyMem (Destination, Source, WidthInBytes);
+ CopyMem(Destination, Source, WidthInBytes);
if (Configure->PixelFormat != PixelBlueGreenRedReserved8BitPerColor) {
for (IndexX = 0; IndexX < Width; IndexX++) {
@@ -527,7 +527,7 @@ FrameBufferBltLibBufferToVideo (
Source = Configure->LineBuffer;
}
- CopyMem (Destination, Source, WidthInBytes);
+ CopyMem(Destination, Source, WidthInBytes);
}
return RETURN_SUCCESS;
@@ -609,7 +609,7 @@ FrameBufferBltLibVideoToVideo (
}
while (Height-- > 0) {
- CopyMem (Destination, Source, WidthInBytes);
+ CopyMem(Destination, Source, WidthInBytes);
Source += LineStride;
Destination += LineStride;
diff --git a/MdeModulePkg/Library/PeiDebugLibDebugPpi/DebugLib.c b/MdeModulePkg/Library/PeiDebugLibDebugPpi/DebugLib.c
index 31f43885e..7f9f8e2a9 100644
--- a/MdeModulePkg/Library/PeiDebugLibDebugPpi/DebugLib.c
+++ b/MdeModulePkg/Library/PeiDebugLibDebugPpi/DebugLib.c
@@ -350,7 +350,7 @@ DebugClearMemory (
{
ASSERT (Buffer != NULL);
- return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
+ return SetMem(Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
}
diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
index fb4740146..80de4d1ff 100644
--- a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
+++ b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
@@ -443,14 +443,14 @@ DebugAssert (
//
// Copy Ascii FileName including NULL terminator.
//
- Temp = CopyMem (Temp + ModuleNameSize, FileName, FileNameSize);
+ Temp = CopyMem(Temp + ModuleNameSize, FileName, FileNameSize);
Temp[FileNameSize - 1] = 0;
TotalSize += (ModuleNameSize + FileNameSize);
//
// Copy Ascii Description include NULL terminator.
//
- Temp = CopyMem (Temp + FileNameSize, Description, DescriptionSize);
+ Temp = CopyMem(Temp + FileNameSize, Description, DescriptionSize);
Temp[DescriptionSize - 1] = 0;
TotalSize += DescriptionSize;
@@ -499,7 +499,7 @@ DebugClearMemory (
{
ASSERT (Buffer != NULL);
- return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
+ return SetMem(Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
}
diff --git a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
index 6f92e8ff1..30291fb0c 100644
--- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
+++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
@@ -392,7 +392,7 @@ InsertFpdtRecord (
FpdtRecordPtr.GuidEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.GuidEvent->ProgressID = PerfId;
FpdtRecordPtr.GuidEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.GuidEvent->Guid, ModuleGuid, sizeof (EFI_GUID));
+ CopyMem(&FpdtRecordPtr.GuidEvent->Guid, ModuleGuid, sizeof (EFI_GUID));
}
break;
@@ -409,7 +409,7 @@ InsertFpdtRecord (
PeiPerformanceLogHeader->LoadImageCount++;
}
FpdtRecordPtr.GuidQwordEvent->Qword = PeiPerformanceLogHeader->LoadImageCount;
- CopyMem (&FpdtRecordPtr.GuidQwordEvent->Guid, ModuleGuid, sizeof (EFI_GUID));
+ CopyMem(&FpdtRecordPtr.GuidQwordEvent->Guid, ModuleGuid, sizeof (EFI_GUID));
}
break;
@@ -430,8 +430,8 @@ InsertFpdtRecord (
FpdtRecordPtr.DualGuidStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DualGuidStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DualGuidStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DualGuidStringEvent->Guid1, ModuleGuid, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid1));
- CopyMem (&FpdtRecordPtr.DualGuidStringEvent->Guid2, Guid, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid2));
+ CopyMem(&FpdtRecordPtr.DualGuidStringEvent->Guid1, ModuleGuid, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid1));
+ CopyMem(&FpdtRecordPtr.DualGuidStringEvent->Guid2, Guid, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid2));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DualGuidStringEvent->String, StringPtr, &FpdtRecordPtr.DualGuidStringEvent->Header.Length);
}
break;
@@ -454,7 +454,7 @@ InsertFpdtRecord (
FpdtRecordPtr.DynamicStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DynamicStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DynamicStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, ModuleGuid, sizeof (EFI_GUID));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, ModuleGuid, sizeof (EFI_GUID));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DynamicStringEvent->String, StringPtr, &FpdtRecordPtr.DynamicStringEvent->Header.Length);
}
break;
@@ -472,7 +472,7 @@ InsertFpdtRecord (
FpdtRecordPtr.DynamicStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DynamicStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DynamicStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DynamicStringEvent->String, StringPtr, &FpdtRecordPtr.DynamicStringEvent->Header.Length);
}
} else {
@@ -494,9 +494,9 @@ InsertFpdtRecord (
//
// Cache the event guid in string event record.
//
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, Guid, sizeof (EFI_GUID));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, Guid, sizeof (EFI_GUID));
} else {
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, ModuleGuid, sizeof (EFI_GUID));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, ModuleGuid, sizeof (EFI_GUID));
}
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DynamicStringEvent->String, StringPtr, &FpdtRecordPtr.DynamicStringEvent->Header.Length);
}
diff --git a/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
index 1ed321a8f..162d7ae0d 100644
--- a/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
@@ -479,7 +479,7 @@ ReportStatusCodeEx (
}
CopyGuid (&StatusCodeData->Type, ExtendedDataGuid);
if (ExtendedData != NULL) {
- CopyMem (StatusCodeData + 1, ExtendedData, ExtendedDataSize);
+ CopyMem(StatusCodeData + 1, ExtendedData, ExtendedDataSize);
}
if (CallerId == NULL) {
CallerId = &gEfiCallerIdGuid;
diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c
index 5e3d8e1ea..61d37a894 100644
--- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c
+++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c
@@ -391,7 +391,7 @@ BootScriptExecuteIoWrite (
VOID *Buffer;
EFI_BOOT_SCRIPT_IO_WRITE IoWrite;
- CopyMem ((VOID*)&IoWrite, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_IO_WRITE));
+ CopyMem((VOID*)&IoWrite, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_IO_WRITE));
Width = (S3_BOOT_SCRIPT_LIB_WIDTH) IoWrite.Width;
Address = IoWrite.Address;
Count = IoWrite.Count;
@@ -876,7 +876,7 @@ BootScriptExecutePciCfgWrite (
UINTN Count;
EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE PciCfgWrite;
- CopyMem ((VOID*)&PciCfgWrite, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE));
+ CopyMem((VOID*)&PciCfgWrite, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE));
Width = (S3_BOOT_SCRIPT_LIB_WIDTH)PciCfgWrite.Width;
Address = PciCfgWrite.Address;
@@ -1040,7 +1040,7 @@ BootScriptExecuteSmbusExecute (
UINTN DataSize;
EFI_BOOT_SCRIPT_SMBUS_EXECUTE SmbusExecuteEntry;
- CopyMem ((VOID*)&SmbusExecuteEntry, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_SMBUS_EXECUTE ));
+ CopyMem((VOID*)&SmbusExecuteEntry, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_SMBUS_EXECUTE ));
DEBUG ((EFI_D_INFO, "BootScriptExecuteSmbusExecute - 0x%08x, 0x%08x\n", (UINTN)SmbusExecuteEntry.SmBusAddress, (UINTN)SmbusExecuteEntry.Operation));
@@ -1067,7 +1067,7 @@ BootScriptExecuteStall (
{
EFI_BOOT_SCRIPT_STALL Stall;
- CopyMem ((VOID*)&Stall, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_STALL));
+ CopyMem((VOID*)&Stall, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_STALL));
DEBUG ((EFI_D_INFO, "BootScriptExecuteStall - 0x%08x\n", (UINTN)Stall.Duration));
@@ -1089,7 +1089,7 @@ BootScriptExecuteDispatch (
DISPATCH_ENTRYPOINT_FUNC EntryFunc;
EFI_BOOT_SCRIPT_DISPATCH ScriptDispatch;
- CopyMem ((VOID*)&ScriptDispatch, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_DISPATCH));
+ CopyMem((VOID*)&ScriptDispatch, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_DISPATCH));
EntryFunc = (DISPATCH_ENTRYPOINT_FUNC) (UINTN) (ScriptDispatch.EntryPoint);
DEBUG ((EFI_D_INFO, "BootScriptExecuteDispatch - 0x%08x\n", (UINTN)ScriptDispatch.EntryPoint));
@@ -1113,7 +1113,7 @@ BootScriptExecuteDispatch2 (
DISPATCH_ENTRYPOINT_FUNC EntryFunc;
EFI_BOOT_SCRIPT_DISPATCH_2 ScriptDispatch2;
- CopyMem ((VOID*)&ScriptDispatch2, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_DISPATCH_2));
+ CopyMem((VOID*)&ScriptDispatch2, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_DISPATCH_2));
DEBUG ((EFI_D_INFO, "BootScriptExecuteDispatch2 - 0x%08x(0x%08x)\n", (UINTN)ScriptDispatch2.EntryPoint, (UINTN)ScriptDispatch2.Context));
@@ -1147,7 +1147,7 @@ BootScriptExecuteMemPoll (
EFI_STATUS Status;
EFI_BOOT_SCRIPT_MEM_POLL MemPoll;
- CopyMem ((VOID*)&MemPoll, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_MEM_POLL));
+ CopyMem((VOID*)&MemPoll, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_MEM_POLL));
DEBUG ((EFI_D_INFO, "BootScriptExecuteMemPoll - 0x%08x, 0x%016lx, 0x%016lx\n", (UINTN)MemPoll.Address, AndMask, OrMask));
@@ -1200,7 +1200,7 @@ BootScriptExecuteInformation (
EFI_BOOT_SCRIPT_INFORMATION Information;
UINT8 *InformationData;
- CopyMem ((VOID*)&Information, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_INFORMATION));
+ CopyMem((VOID*)&Information, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_INFORMATION));
InformationData = Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION);
DEBUG ((EFI_D_INFO, "BootScriptExecuteInformation - 0x%08x\n", (UINTN) InformationData));
@@ -1228,7 +1228,7 @@ BootScriptExecuteLabel (
EFI_BOOT_SCRIPT_INFORMATION Information;
UINT8 *InformationData;
- CopyMem ((VOID*)&Information, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_INFORMATION));
+ CopyMem((VOID*)&Information, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_INFORMATION));
InformationData = Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION);
DEBUG ((EFI_D_INFO, "BootScriptExecuteLabel - 0x%08x\n", (UINTN) InformationData));
@@ -1347,7 +1347,7 @@ BootScriptExecuteIoPoll (
UINT64 LoopTimes;
EFI_BOOT_SCRIPT_IO_POLL IoPoll;
- CopyMem ((VOID*)&IoPoll, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_IO_POLL));
+ CopyMem((VOID*)&IoPoll, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_IO_POLL));
DEBUG ((EFI_D_INFO, "BootScriptExecuteIoPoll - 0x%08x, 0x%016lx, 0x%016lx\n", (UINTN)IoPoll.Address, AndMask, OrMask));
@@ -1401,7 +1401,7 @@ BootScriptExecutePciCfg2Write (
UINTN Count;
EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE PciCfg2Write;
- CopyMem ((VOID*)&PciCfg2Write, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE));
+ CopyMem((VOID*)&PciCfg2Write, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE));
Width = (S3_BOOT_SCRIPT_LIB_WIDTH)PciCfg2Write.Width;
Segment = PciCfg2Write.Segment;
@@ -1437,7 +1437,7 @@ BootScriptExecutePciCfg2ReadWrite (
Data = 0;
- CopyMem ((VOID*)&PciCfg2ReadWrite, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE));
+ CopyMem((VOID*)&PciCfg2ReadWrite, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE));
DEBUG ((EFI_D_INFO, "BootScriptExecutePciCfg2ReadWrite - 0x%016lx, 0x%016lx, 0x%016lx\n", PCI_ADDRESS_ENCODE (PciCfg2ReadWrite.Segment, PciCfg2ReadWrite.Address), AndMask, OrMask));
@@ -1484,7 +1484,7 @@ BootScriptPciCfgPoll (
UINT64 LoopTimes;
EFI_STATUS Status;
EFI_BOOT_SCRIPT_PCI_CONFIG_POLL PciCfgPoll;
- CopyMem ((VOID*)&PciCfgPoll, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG_POLL));
+ CopyMem((VOID*)&PciCfgPoll, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG_POLL));
DEBUG ((EFI_D_INFO, "BootScriptPciCfgPoll - 0x%016lx, 0x%016lx, 0x%016lx\n", PCI_ADDRESS_ENCODE (0, PciCfgPoll.Address), AndMask, OrMask));
@@ -1546,7 +1546,7 @@ BootScriptPciCfg2Poll (
EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL PciCfg2Poll;
Data = 0;
- CopyMem ((VOID*)&PciCfg2Poll, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL));
+ CopyMem((VOID*)&PciCfg2Poll, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL));
DEBUG ((EFI_D_INFO, "BootScriptPciCfg2Poll - 0x%016lx, 0x%016lx, 0x%016lx\n", PCI_ADDRESS_ENCODE (PciCfg2Poll.Segment, PciCfg2Poll.Address), AndMask, OrMask));
@@ -1608,7 +1608,7 @@ S3BootScriptExecute (
EFI_BOOT_SCRIPT_TABLE_HEADER TableHeader;
Script = mS3BootScriptTablePtr->TableBase;
if (Script != 0) {
- CopyMem ((VOID*)&TableHeader, Script, sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER));
+ CopyMem((VOID*)&TableHeader, Script, sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER));
} else {
return EFI_INVALID_PARAMETER;
}
@@ -1633,7 +1633,7 @@ S3BootScriptExecute (
while ((UINTN) Script < (UINTN) (StartAddress + TableLength)) {
DEBUG ((EFI_D_INFO, "ExecuteBootScript - %08x\n", (UINTN)Script));
- CopyMem ((VOID*)&ScriptHeader, Script, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
+ CopyMem((VOID*)&ScriptHeader, Script, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
switch (ScriptHeader.OpCode) {
case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE:
diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
index 304fbf8b3..dbd9c0f0d 100644
--- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
+++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
@@ -152,7 +152,7 @@ S3BootScriptInternalCloseTable (
//
ScriptTerminate.OpCode = S3_BOOT_SCRIPT_LIB_TERMINATE_OPCODE;
ScriptTerminate.Length = (UINT8) sizeof (EFI_BOOT_SCRIPT_TERMINATE);
- CopyMem (mS3BootScriptTablePtr->TableBase + mS3BootScriptTablePtr->TableLength, &ScriptTerminate, sizeof (EFI_BOOT_SCRIPT_TERMINATE));
+ CopyMem(mS3BootScriptTablePtr->TableBase + mS3BootScriptTablePtr->TableLength, &ScriptTerminate, sizeof (EFI_BOOT_SCRIPT_TERMINATE));
//
// fill the table length
//
@@ -294,7 +294,7 @@ S3BootScriptSmmEventCallBack (
// Save a SMM copy. If TableBase is NOT null, it means SMM copy has been ready, skip copy mem.
//
if (mS3BootScriptTableSmmPtr->TableBase == NULL) {
- CopyMem (mS3BootScriptTableSmmPtr, mS3BootScriptTablePtr, sizeof(*mS3BootScriptTablePtr));
+ CopyMem(mS3BootScriptTableSmmPtr, mS3BootScriptTablePtr, sizeof(*mS3BootScriptTablePtr));
//
// Set InSmm, we allow boot script update when InSmm, but not allow boot script outside SMM.
@@ -701,7 +701,7 @@ S3BootScriptGetBootTimeEntryAddAddress (
return 0;
}
- CopyMem ((VOID*)(UINTN)NewS3TableBase, (VOID*)(UINTN)S3TableBase, TableLength);
+ CopyMem((VOID*)(UINTN)NewS3TableBase, (VOID*)(UINTN)S3TableBase, TableLength);
gBS->FreePages (S3TableBase, mS3BootScriptTablePtr->TableMemoryPageNumber);
mS3BootScriptTablePtr->TableBase = (UINT8*)(UINTN)NewS3TableBase;
@@ -949,7 +949,7 @@ S3BootScriptCloseTable (
if (EFI_ERROR(Status)) {
return 0;
}
- CopyMem (Buffer, S3TableBase, TableLength);
+ CopyMem(Buffer, S3TableBase, TableLength);
//
// Destroy the table maintained by the library so that the next write operation
@@ -1005,8 +1005,8 @@ S3BootScriptSaveIoWrite (
ScriptIoWrite.Width = Width;
ScriptIoWrite.Address = Address;
ScriptIoWrite.Count = (UINT32) Count;
- CopyMem ((VOID*)Script, (VOID*)&ScriptIoWrite, sizeof(EFI_BOOT_SCRIPT_IO_WRITE));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_IO_WRITE)), Buffer, WidthInByte * Count);
+ CopyMem((VOID*)Script, (VOID*)&ScriptIoWrite, sizeof(EFI_BOOT_SCRIPT_IO_WRITE));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_IO_WRITE)), Buffer, WidthInByte * Count);
SyncBootScript (Script);
@@ -1053,9 +1053,9 @@ S3BootScriptSaveIoReadWrite (
ScriptIoReadWrite.Width = Width;
ScriptIoReadWrite.Address = Address;
- CopyMem ((VOID*)Script, (VOID*)&ScriptIoReadWrite, sizeof(EFI_BOOT_SCRIPT_IO_READ_WRITE));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_IO_READ_WRITE)), Data, WidthInByte);
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_IO_READ_WRITE) + WidthInByte), DataMask, WidthInByte);
+ CopyMem((VOID*)Script, (VOID*)&ScriptIoReadWrite, sizeof(EFI_BOOT_SCRIPT_IO_READ_WRITE));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_IO_READ_WRITE)), Data, WidthInByte);
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_IO_READ_WRITE) + WidthInByte), DataMask, WidthInByte);
SyncBootScript (Script);
@@ -1102,8 +1102,8 @@ S3BootScriptSaveMemWrite (
ScriptMemWrite.Address = Address;
ScriptMemWrite.Count = (UINT32) Count;
- CopyMem ((VOID*)Script, (VOID*)&ScriptMemWrite, sizeof(EFI_BOOT_SCRIPT_MEM_WRITE));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_MEM_WRITE)), Buffer, WidthInByte * Count);
+ CopyMem((VOID*)Script, (VOID*)&ScriptMemWrite, sizeof(EFI_BOOT_SCRIPT_MEM_WRITE));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_MEM_WRITE)), Buffer, WidthInByte * Count);
SyncBootScript (Script);
@@ -1149,9 +1149,9 @@ S3BootScriptSaveMemReadWrite (
ScriptMemReadWrite.Width = Width;
ScriptMemReadWrite.Address = Address;
- CopyMem ((VOID*)Script, (VOID*)&ScriptMemReadWrite , sizeof (EFI_BOOT_SCRIPT_MEM_READ_WRITE));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_MEM_READ_WRITE)), Data, WidthInByte);
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_MEM_READ_WRITE) + WidthInByte), DataMask, WidthInByte);
+ CopyMem((VOID*)Script, (VOID*)&ScriptMemReadWrite , sizeof (EFI_BOOT_SCRIPT_MEM_READ_WRITE));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_MEM_READ_WRITE)), Data, WidthInByte);
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_MEM_READ_WRITE) + WidthInByte), DataMask, WidthInByte);
SyncBootScript (Script);
@@ -1206,8 +1206,8 @@ S3BootScriptSavePciCfgWrite (
ScriptPciWrite.Address = Address;
ScriptPciWrite.Count = (UINT32) Count;
- CopyMem ((VOID*)Script, (VOID*)&ScriptPciWrite, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE)), Buffer, WidthInByte * Count);
+ CopyMem((VOID*)Script, (VOID*)&ScriptPciWrite, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE)), Buffer, WidthInByte * Count);
SyncBootScript (Script);
@@ -1261,9 +1261,9 @@ S3BootScriptSavePciCfgReadWrite (
ScriptPciReadWrite.Width = Width;
ScriptPciReadWrite.Address = Address;
- CopyMem ((VOID*)Script, (VOID*)&ScriptPciReadWrite, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE)), Data, WidthInByte);
- CopyMem (
+ CopyMem((VOID*)Script, (VOID*)&ScriptPciReadWrite, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE)), Data, WidthInByte);
+ CopyMem(
(VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE) + WidthInByte),
DataMask,
WidthInByte
@@ -1325,8 +1325,8 @@ S3BootScriptSavePciCfg2Write (
ScriptPciWrite2.Segment = Segment;
ScriptPciWrite2.Count = (UINT32)Count;
- CopyMem ((VOID*)Script, (VOID*)&ScriptPciWrite2, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE)), Buffer, WidthInByte * Count);
+ CopyMem((VOID*)Script, (VOID*)&ScriptPciWrite2, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE)), Buffer, WidthInByte * Count);
SyncBootScript (Script);
@@ -1383,9 +1383,9 @@ S3BootScriptSavePciCfg2ReadWrite (
ScriptPciReadWrite2.Segment = Segment;
ScriptPciReadWrite2.Address = Address;
- CopyMem ((VOID*)Script, (VOID*)&ScriptPciReadWrite2, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE)), Data, WidthInByte);
- CopyMem (
+ CopyMem((VOID*)Script, (VOID*)&ScriptPciReadWrite2, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE)), Data, WidthInByte);
+ CopyMem(
(VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE) + WidthInByte),
DataMask,
WidthInByte
@@ -1549,8 +1549,8 @@ S3BootScriptSaveSmbusExecute (
ScriptSmbusExecute.Operation = Operation;
ScriptSmbusExecute.DataSize = (UINT32) BufferLength;
- CopyMem ((VOID*)Script, (VOID*)&ScriptSmbusExecute, sizeof (EFI_BOOT_SCRIPT_SMBUS_EXECUTE));
- CopyMem (
+ CopyMem((VOID*)Script, (VOID*)&ScriptSmbusExecute, sizeof (EFI_BOOT_SCRIPT_SMBUS_EXECUTE));
+ CopyMem(
(VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_SMBUS_EXECUTE)),
Buffer,
BufferLength
@@ -1591,7 +1591,7 @@ S3BootScriptSaveStall (
ScriptStall.Length = Length;
ScriptStall.Duration = Duration;
- CopyMem ((VOID*)Script, (VOID*)&ScriptStall, sizeof (EFI_BOOT_SCRIPT_STALL));
+ CopyMem((VOID*)Script, (VOID*)&ScriptStall, sizeof (EFI_BOOT_SCRIPT_STALL));
SyncBootScript (Script);
@@ -1630,7 +1630,7 @@ S3BootScriptSaveDispatch2 (
ScriptDispatch2.EntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)EntryPoint;
ScriptDispatch2.Context = (EFI_PHYSICAL_ADDRESS)(UINTN)Context;
- CopyMem ((VOID*)Script, (VOID*)&ScriptDispatch2, sizeof (EFI_BOOT_SCRIPT_DISPATCH_2));
+ CopyMem((VOID*)Script, (VOID*)&ScriptDispatch2, sizeof (EFI_BOOT_SCRIPT_DISPATCH_2));
SyncBootScript (Script);
@@ -1691,9 +1691,9 @@ S3BootScriptSaveMemPoll (
ScriptMemPoll.Duration = Duration;
ScriptMemPoll.LoopTimes = LoopTimes;
- CopyMem ((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_MEM_POLL)), BitValue, WidthInByte);
- CopyMem ((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_MEM_POLL) + WidthInByte), BitMask, WidthInByte);
- CopyMem ((VOID*)Script, (VOID*)&ScriptMemPoll, sizeof (EFI_BOOT_SCRIPT_MEM_POLL));
+ CopyMem((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_MEM_POLL)), BitValue, WidthInByte);
+ CopyMem((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_MEM_POLL) + WidthInByte), BitMask, WidthInByte);
+ CopyMem((VOID*)Script, (VOID*)&ScriptMemPoll, sizeof (EFI_BOOT_SCRIPT_MEM_POLL));
SyncBootScript (Script);
@@ -1736,8 +1736,8 @@ S3BootScriptSaveInformation (
ScriptInformation.InformationLength = InformationLength;
- CopyMem ((VOID*)Script, (VOID*)&ScriptInformation, sizeof (EFI_BOOT_SCRIPT_INFORMATION));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION)), (VOID *) Information, (UINTN) InformationLength);
+ CopyMem((VOID*)Script, (VOID*)&ScriptInformation, sizeof (EFI_BOOT_SCRIPT_INFORMATION));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION)), (VOID *) Information, (UINTN) InformationLength);
SyncBootScript (Script);
@@ -1796,7 +1796,7 @@ S3BootScriptSaveDispatch (
ScriptDispatch.Length = Length;
ScriptDispatch.EntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)EntryPoint;
- CopyMem ((VOID*)Script, (VOID*)&ScriptDispatch, sizeof (EFI_BOOT_SCRIPT_DISPATCH));
+ CopyMem((VOID*)Script, (VOID*)&ScriptDispatch, sizeof (EFI_BOOT_SCRIPT_DISPATCH));
SyncBootScript (Script);
@@ -1851,9 +1851,9 @@ S3BootScriptSaveIoPoll (
ScriptIoPoll.Address = Address;
ScriptIoPoll.Delay = Delay;
- CopyMem ((VOID*)Script, (VOID*)&ScriptIoPoll, sizeof (EFI_BOOT_SCRIPT_IO_POLL));
- CopyMem ((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_IO_POLL)), Data, WidthInByte);
- CopyMem ((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_IO_POLL) + WidthInByte), DataMask, WidthInByte);
+ CopyMem((VOID*)Script, (VOID*)&ScriptIoPoll, sizeof (EFI_BOOT_SCRIPT_IO_POLL));
+ CopyMem((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_IO_POLL)), Data, WidthInByte);
+ CopyMem((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_IO_POLL) + WidthInByte), DataMask, WidthInByte);
SyncBootScript (Script);
@@ -1914,9 +1914,9 @@ S3BootScriptSavePciPoll (
ScriptPciPoll.Address = Address;
ScriptPciPoll.Delay = Delay;
- CopyMem ((VOID*)Script, (VOID*)&ScriptPciPoll, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_POLL));
- CopyMem ((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_POLL)), Data, WidthInByte);
- CopyMem ((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_POLL) + WidthInByte), DataMask, WidthInByte);
+ CopyMem((VOID*)Script, (VOID*)&ScriptPciPoll, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_POLL));
+ CopyMem((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_POLL)), Data, WidthInByte);
+ CopyMem((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_POLL) + WidthInByte), DataMask, WidthInByte);
SyncBootScript (Script);
@@ -1979,9 +1979,9 @@ S3BootScriptSavePci2Poll (
ScriptPci2Poll.Address = Address;
ScriptPci2Poll.Delay = Delay;
- CopyMem ((VOID*)Script, (VOID*)&ScriptPci2Poll, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL));
- CopyMem ((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL)), Data, WidthInByte);
- CopyMem ((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL) + WidthInByte), DataMask, WidthInByte);
+ CopyMem((VOID*)Script, (VOID*)&ScriptPci2Poll, sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL));
+ CopyMem((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL)), Data, WidthInByte);
+ CopyMem((UINT8 *) (Script + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL) + WidthInByte), DataMask, WidthInByte);
SyncBootScript (Script);
@@ -2024,13 +2024,13 @@ S3BootScriptCalculateInsertAddress (
// If the BeforeOrAfter is FALSE, that means to insert the node right after the node.
//
if (!BeforeOrAfter) {
- CopyMem ((VOID*)&ScriptHeader, Position, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
+ CopyMem((VOID*)&ScriptHeader, Position, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
PositionOffset += (ScriptHeader.Length);
}
//
// Insert the node before the adjusted Position
//
- CopyMem (S3TableBase+PositionOffset+EntryLength, S3TableBase+PositionOffset, TableLength - PositionOffset);
+ CopyMem(S3TableBase+PositionOffset+EntryLength, S3TableBase+PositionOffset, TableLength - PositionOffset);
//
// calculate the the start address for the new entry.
//
@@ -2047,7 +2047,7 @@ S3BootScriptCalculateInsertAddress (
// Insert the node to the beginning of the table
//
PositionOffset = (UINTN) sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER);
- CopyMem (S3TableBase+PositionOffset+EntryLength, S3TableBase+PositionOffset, TableLength - PositionOffset);
+ CopyMem(S3TableBase+PositionOffset+EntryLength, S3TableBase+PositionOffset, TableLength - PositionOffset);
*Script = S3TableBase + PositionOffset;
}
}
@@ -2103,7 +2103,7 @@ S3BootScriptMoveLastOpcode (
// Find the last boot Script Entry which is not the terminate node
//
while ((UINTN) Script < (UINTN) (StartAddress + TableLength)) {
- CopyMem ((VOID*)&ScriptHeader, Script, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
+ CopyMem((VOID*)&ScriptHeader, Script, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
if (TempPosition != NULL && TempPosition == Script) {
//
// If the position is specified, the position must be pointed to a boot script entry start address.
@@ -2122,7 +2122,7 @@ S3BootScriptMoveLastOpcode (
return RETURN_INVALID_PARAMETER;
}
- CopyMem ((VOID*)&ScriptHeader, LastOpcode, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
+ CopyMem((VOID*)&ScriptHeader, LastOpcode, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
CopyMem((VOID*)TempBootScriptEntry, LastOpcode, ScriptHeader.Length);
//
@@ -2195,8 +2195,8 @@ S3BootScriptLabelInternal (
ScriptInformation.InformationLength = InformationLength;
- CopyMem ((VOID*)Script, (VOID*)&ScriptInformation, sizeof (EFI_BOOT_SCRIPT_INFORMATION));
- CopyMem ((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION)), (VOID *) Information, (UINTN) InformationLength);
+ CopyMem((VOID*)Script, (VOID*)&ScriptInformation, sizeof (EFI_BOOT_SCRIPT_INFORMATION));
+ CopyMem((VOID*)(Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION)), (VOID *) Information, (UINTN) InformationLength);
SyncBootScript (Script);
@@ -2267,7 +2267,7 @@ S3BootScriptLabel (
// Check the header and search for existing label.
//
Script = mS3BootScriptTablePtr->TableBase;
- CopyMem ((VOID*)&TableHeader, Script, sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER));
+ CopyMem((VOID*)&TableHeader, Script, sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER));
if (TableHeader.OpCode != S3_BOOT_SCRIPT_LIB_TABLE_OPCODE) {
return EFI_INVALID_PARAMETER;
}
@@ -2276,7 +2276,7 @@ S3BootScriptLabel (
Script = Script + TableHeader.Length;
while ((UINTN) Script < (UINTN) (StartAddress + TableLength)) {
- CopyMem ((VOID*)&ScriptHeader, Script, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
+ CopyMem((VOID*)&ScriptHeader, Script, sizeof(EFI_BOOT_SCRIPT_COMMON_HEADER));
if (ScriptHeader.OpCode == S3_BOOT_SCRIPT_LIB_LABEL_OPCODE) {
if (AsciiStrCmp((CHAR8 *)(UINTN)(Script+sizeof(EFI_BOOT_SCRIPT_INFORMATION)), Label) == 0) {
(*Position) = Script;
diff --git a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c
index 27491219c..9c041c76e 100644
--- a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c
@@ -734,7 +734,7 @@ InternalAllocateCopyPool(
Memory = InternalAllocatePool (PoolType, AllocationSize);
if (Memory != NULL) {
- Memory = CopyMem (Memory, Buffer, AllocationSize);
+ Memory = CopyMem(Memory, Buffer, AllocationSize);
}
return Memory;
}
@@ -880,7 +880,7 @@ InternalReallocatePool (
NewBuffer = InternalAllocateZeroPool(PoolType, NewSize);
if (NewBuffer != NULL && OldBuffer != NULL) {
- CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
+ CopyMem(NewBuffer, OldBuffer, MIN (OldSize, NewSize));
FreePool(OldBuffer);
}
return NewBuffer;
@@ -1081,7 +1081,7 @@ PiSmmCoreMemoryAllocationLibConstructor (
Status = gBS->AllocatePool (EfiBootServicesData, Size, (VOID **) &mSmmCoreMemoryAllocLibSmramRanges);
ASSERT_EFI_ERROR(Status);
ASSERT (mSmmCoreMemoryAllocLibSmramRanges != NULL);
- CopyMem (mSmmCoreMemoryAllocLibSmramRanges, SmmCorePrivate->SmramRanges, Size);
+ CopyMem(mSmmCoreMemoryAllocLibSmramRanges, SmmCorePrivate->SmramRanges, Size);
//
// Initialize memory service using free SMRAM
diff --git a/MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c b/MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c
index 9ea2de375..1707dc954 100644
--- a/MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c
+++ b/MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c
@@ -371,7 +371,7 @@ CreateTimeBasedPayload (
}
if ((Payload != NULL) && (PayloadSize != 0)) {
- CopyMem (NewData + DescriptorSize, Payload, PayloadSize);
+ CopyMem(NewData + DescriptorSize, Payload, PayloadSize);
}
DescriptorData = (EFI_VARIABLE_AUTHENTICATION_2 *) (NewData);
@@ -387,7 +387,7 @@ CreateTimeBasedPayload (
Time.TimeZone = 0;
Time.Daylight = 0;
Time.Pad2 = 0;
- CopyMem (&DescriptorData->TimeStamp, &Time, sizeof (EFI_TIME));
+ CopyMem(&DescriptorData->TimeStamp, &Time, sizeof (EFI_TIME));
DescriptorData->AuthInfo.Hdr.dwLength = OFFSET_OF (WIN_CERTIFICATE_UEFI_GUID, CertData);
DescriptorData->AuthInfo.Hdr.wRevision = 0x0200;
@@ -457,7 +457,7 @@ CreateCounterBasedPayload (
}
if ((Payload != NULL) && (PayloadSize != 0)) {
- CopyMem (NewData + DescriptorSize, Payload, PayloadSize);
+ CopyMem(NewData + DescriptorSize, Payload, PayloadSize);
}
DescriptorData = (EFI_VARIABLE_AUTHENTICATION *) (NewData);
@@ -964,13 +964,13 @@ VariableCleanupHiiCallback (
//
// Means the SelectAll checkbox is marked to delete all user variables but not press F10 or "Commit Changes and Exit" menu.
//
- SetMem (VariableCleanupData->UserVariable, sizeof (VariableCleanupData->UserVariable), TRUE);
+ SetMem(VariableCleanupData->UserVariable, sizeof (VariableCleanupData->UserVariable), TRUE);
mMarkedUserVariableCount = mUserVariableCount;
} else {
//
// Means the SelectAll checkbox is unmarked.
//
- SetMem (VariableCleanupData->UserVariable, sizeof (VariableCleanupData->UserVariable), FALSE);
+ SetMem(VariableCleanupData->UserVariable, sizeof (VariableCleanupData->UserVariable), FALSE);
mMarkedUserVariableCount = 0;
}
break;
diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
index 2b5af4b95..865bcaad2 100644
--- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
+++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
@@ -235,14 +235,14 @@ BuildResetData (
// Fill in ResetData with ResetString, the ResetSubtype GUID, and extra data
//
Data = (UINT8 *)ResetData;
- CopyMem (Data, ResetString, ResetStringSize);
+ CopyMem(Data, ResetString, ResetStringSize);
Data += ResetStringSize;
if (ResetSubtype != NULL) {
- CopyMem (Data, ResetSubtype, sizeof (GUID));
+ CopyMem(Data, ResetSubtype, sizeof (GUID));
Data += sizeof (GUID);
}
if (ExtraDataSize > 0) {
- CopyMem (Data, ExtraData, ExtraDataSize);
+ CopyMem(Data, ExtraData, ExtraDataSize);
}
return RETURN_SUCCESS;
diff --git a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
index dc0349761..ae6bc0a1a 100644
--- a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
@@ -664,7 +664,7 @@ ReportStatusCodeEx (
// Fill in the extended data buffer
//
if (ExtendedData != NULL) {
- CopyMem (StatusCodeData + 1, ExtendedData, ExtendedDataSize);
+ CopyMem(StatusCodeData + 1, ExtendedData, ExtendedDataSize);
}
//
diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
index 9c87056eb..776e40e2d 100644
--- a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
+++ b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
@@ -601,10 +601,10 @@ InsertFpdtRecord (
FpdtRecordPtr.GuidEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.GuidEvent->ProgressID = PerfId;
FpdtRecordPtr.GuidEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.GuidEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidEvent->Guid));
+ CopyMem(&FpdtRecordPtr.GuidEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidEvent->Guid));
if (CallerIdentifier == NULL && PerfId == MODULE_END_ID && mCachedLength != 0) {
CachedFpdtRecordPtr.RecordHeader = (EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *)((UINT8*)mSmmBootPerformanceTable + mCachedLength);
- CopyMem (&FpdtRecordPtr.GuidEvent->Guid, &CachedFpdtRecordPtr.GuidEvent->Guid, sizeof (FpdtRecordPtr.GuidEvent->Guid));
+ CopyMem(&FpdtRecordPtr.GuidEvent->Guid, &CachedFpdtRecordPtr.GuidEvent->Guid, sizeof (FpdtRecordPtr.GuidEvent->Guid));
mCachedLength = 0;
}
}
@@ -630,10 +630,10 @@ InsertFpdtRecord (
FpdtRecordPtr.GuidQwordEvent->ProgressID = PerfId;
FpdtRecordPtr.GuidQwordEvent->Timestamp = TimeStamp;
FpdtRecordPtr.GuidQwordEvent->Qword = mLoadImageCount;
- CopyMem (&FpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidQwordEvent->Guid));
+ CopyMem(&FpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.GuidQwordEvent->Guid));
if (PerfId == MODULE_LOADIMAGE_END_ID && mCachedLength != 0) {
CachedFpdtRecordPtr.RecordHeader = (EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *)((UINT8*)mSmmBootPerformanceTable + mCachedLength);
- CopyMem (&CachedFpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (CachedFpdtRecordPtr.GuidQwordEvent->Guid));
+ CopyMem(&CachedFpdtRecordPtr.GuidQwordEvent->Guid, &ModuleGuid, sizeof (CachedFpdtRecordPtr.GuidQwordEvent->Guid));
mCachedLength = 0;
}
}
@@ -656,8 +656,8 @@ InsertFpdtRecord (
FpdtRecordPtr.DualGuidStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DualGuidStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DualGuidStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DualGuidStringEvent->Guid1, CallerIdentifier, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid1));
- CopyMem (&FpdtRecordPtr.DualGuidStringEvent->Guid2, Guid, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid2));
+ CopyMem(&FpdtRecordPtr.DualGuidStringEvent->Guid1, CallerIdentifier, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid1));
+ CopyMem(&FpdtRecordPtr.DualGuidStringEvent->Guid2, Guid, sizeof (FpdtRecordPtr.DualGuidStringEvent->Guid2));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DualGuidStringEvent->String, StringPtr, &FpdtRecordPtr.DualGuidStringEvent->Header.Length);
}
break;
@@ -684,7 +684,7 @@ InsertFpdtRecord (
FpdtRecordPtr.DynamicStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DynamicStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DynamicStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DynamicStringEvent->String, StringPtr, &FpdtRecordPtr.DynamicStringEvent->Header.Length);
}
break;
@@ -706,7 +706,7 @@ InsertFpdtRecord (
FpdtRecordPtr.DynamicStringEvent->Header.Revision = FPDT_RECORD_REVISION_1;
FpdtRecordPtr.DynamicStringEvent->ProgressID = PerfId;
FpdtRecordPtr.DynamicStringEvent->Timestamp = TimeStamp;
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
CopyStringIntoPerfRecordAndUpdateLength (FpdtRecordPtr.DynamicStringEvent->String, StringPtr, &FpdtRecordPtr.DynamicStringEvent->Header.Length);
}
} else {
@@ -731,9 +731,9 @@ InsertFpdtRecord (
//
// Cache the event guid in string event record.
//
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, Guid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, Guid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
} else {
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (FpdtRecordPtr.DynamicStringEvent->Guid));
}
if (AsciiStrLen(StringPtr) == 0) {
StringPtr = "unknown name";
@@ -751,7 +751,7 @@ InsertFpdtRecord (
if (StringLen >= DestMax) {
StringLen = DestMax -1;
}
- CopyMem (&CachedFpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (CachedFpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&CachedFpdtRecordPtr.DynamicStringEvent->Guid, &ModuleGuid, sizeof (CachedFpdtRecordPtr.DynamicStringEvent->Guid));
AsciiStrnCpyS (CachedFpdtRecordPtr.DynamicStringEvent->String, DestMax, StringPtr, StringLen);
} else if (PerfId == MODULE_END_ID) {
DestMax = FpdtRecordPtr.DynamicStringEvent->Header.Length - sizeof (FPDT_DYNAMIC_STRING_EVENT_RECORD);
@@ -759,7 +759,7 @@ InsertFpdtRecord (
if (StringLen >= DestMax) {
StringLen = DestMax -1;
}
- CopyMem (&FpdtRecordPtr.DynamicStringEvent->Guid, &CachedFpdtRecordPtr.DynamicStringEvent->Guid, sizeof (CachedFpdtRecordPtr.DynamicStringEvent->Guid));
+ CopyMem(&FpdtRecordPtr.DynamicStringEvent->Guid, &CachedFpdtRecordPtr.DynamicStringEvent->Guid, sizeof (CachedFpdtRecordPtr.DynamicStringEvent->Guid));
AsciiStrnCpyS (FpdtRecordPtr.DynamicStringEvent->String, DestMax, CachedFpdtRecordPtr.DynamicStringEvent->String, StringLen);
}
mCachedLength = 0;
diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.c b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.c
index b6de95b62..097f2f3c9 100644
--- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.c
+++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.c
@@ -168,14 +168,14 @@ SaveLockBox (
CommBuffer = &TempCommBuffer[0];
}
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *)&CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
CommHeader->MessageLength = sizeof(*LockBoxParameterSave);
LockBoxParameterSave = (EFI_SMM_LOCK_BOX_PARAMETER_SAVE *)&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
LockBoxParameterSave->Header.Command = EFI_SMM_LOCK_BOX_COMMAND_SAVE;
LockBoxParameterSave->Header.DataLength = sizeof(*LockBoxParameterSave);
LockBoxParameterSave->Header.ReturnStatus = (UINT64)-1;
- CopyMem (&LockBoxParameterSave->Guid, Guid, sizeof(*Guid));
+ CopyMem(&LockBoxParameterSave->Guid, Guid, sizeof(*Guid));
LockBoxParameterSave->Buffer = (EFI_PHYSICAL_ADDRESS)(UINTN)Buffer;
LockBoxParameterSave->Length = (UINT64)Length;
@@ -251,14 +251,14 @@ SetLockBoxAttributes (
CommBuffer = &TempCommBuffer[0];
}
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *)&CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
CommHeader->MessageLength = sizeof(*LockBoxParameterSetAttributes);
LockBoxParameterSetAttributes = (EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES *)&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
LockBoxParameterSetAttributes->Header.Command = EFI_SMM_LOCK_BOX_COMMAND_SET_ATTRIBUTES;
LockBoxParameterSetAttributes->Header.DataLength = sizeof(*LockBoxParameterSetAttributes);
LockBoxParameterSetAttributes->Header.ReturnStatus = (UINT64)-1;
- CopyMem (&LockBoxParameterSetAttributes->Guid, Guid, sizeof(*Guid));
+ CopyMem(&LockBoxParameterSetAttributes->Guid, Guid, sizeof(*Guid));
LockBoxParameterSetAttributes->Attributes = (UINT64)Attributes;
//
@@ -340,14 +340,14 @@ UpdateLockBox (
CommBuffer = &TempCommBuffer[0];
}
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *)&CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
CommHeader->MessageLength = sizeof(*LockBoxParameterUpdate);
LockBoxParameterUpdate = (EFI_SMM_LOCK_BOX_PARAMETER_UPDATE *)(UINTN)&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
LockBoxParameterUpdate->Header.Command = EFI_SMM_LOCK_BOX_COMMAND_UPDATE;
LockBoxParameterUpdate->Header.DataLength = sizeof(*LockBoxParameterUpdate);
LockBoxParameterUpdate->Header.ReturnStatus = (UINT64)-1;
- CopyMem (&LockBoxParameterUpdate->Guid, Guid, sizeof(*Guid));
+ CopyMem(&LockBoxParameterUpdate->Guid, Guid, sizeof(*Guid));
LockBoxParameterUpdate->Offset = (UINT64)Offset;
LockBoxParameterUpdate->Buffer = (EFI_PHYSICAL_ADDRESS)(UINTN)Buffer;
LockBoxParameterUpdate->Length = (UINT64)Length;
@@ -431,14 +431,14 @@ RestoreLockBox (
CommBuffer = &TempCommBuffer[0];
}
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *)&CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
CommHeader->MessageLength = sizeof(*LockBoxParameterRestore);
LockBoxParameterRestore = (EFI_SMM_LOCK_BOX_PARAMETER_RESTORE *)&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
LockBoxParameterRestore->Header.Command = EFI_SMM_LOCK_BOX_COMMAND_RESTORE;
LockBoxParameterRestore->Header.DataLength = sizeof(*LockBoxParameterRestore);
LockBoxParameterRestore->Header.ReturnStatus = (UINT64)-1;
- CopyMem (&LockBoxParameterRestore->Guid, Guid, sizeof(*Guid));
+ CopyMem(&LockBoxParameterRestore->Guid, Guid, sizeof(*Guid));
LockBoxParameterRestore->Buffer = (EFI_PHYSICAL_ADDRESS)(UINTN)Buffer;
if (Length != NULL) {
LockBoxParameterRestore->Length = (EFI_PHYSICAL_ADDRESS)*Length;
@@ -507,7 +507,7 @@ RestoreAllLockBoxInPlace (
CommBuffer = &TempCommBuffer[0];
}
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *)&CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
CommHeader->MessageLength = sizeof(*LockBoxParameterRestoreAllInPlace);
LockBoxParameterRestoreAllInPlace = (EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE *)&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data)];
diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c
index 651d0268d..ee1651c4a 100644
--- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c
+++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c
@@ -325,7 +325,7 @@ InternalRestoreLockBoxFromSmram (
//
// Restore data
//
- CopyMem (RestoreBuffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
+ CopyMem(RestoreBuffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
//
// Done
@@ -391,7 +391,7 @@ InternalRestoreAllLockBoxInPlaceFromSmram (
//
// Restore data
//
- CopyMem ((VOID *)(UINTN)LockBox->Buffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
+ CopyMem((VOID *)(UINTN)LockBox->Buffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
}
}
//
@@ -569,10 +569,10 @@ RestoreLockBox (
// Prepare parameter
//
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *)&CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
if ((sizeof(UINTN) == sizeof(UINT32)) && (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) ) {
MessageLength = sizeof(*LockBoxParameterRestore);
- CopyMem (&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, MessageLength)], &MessageLength, sizeof(MessageLength));
+ CopyMem(&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, MessageLength)], &MessageLength, sizeof(MessageLength));
} else {
CommHeader->MessageLength = sizeof(*LockBoxParameterRestore);
}
@@ -588,7 +588,7 @@ RestoreLockBox (
LockBoxParameterRestore->Header.DataLength = sizeof(*LockBoxParameterRestore);
LockBoxParameterRestore->Header.ReturnStatus = (UINT64)-1;
if (Guid != 0) {
- CopyMem (&LockBoxParameterRestore->Guid, Guid, sizeof(*Guid));
+ CopyMem(&LockBoxParameterRestore->Guid, Guid, sizeof(*Guid));
} else {
ZeroMem (&LockBoxParameterRestore->Guid, sizeof(*Guid));
}
@@ -690,10 +690,10 @@ RestoreAllLockBoxInPlace (
// Prepare parameter
//
CommHeader = (EFI_SMM_COMMUNICATE_HEADER *)&CommBuffer[0];
- CopyMem (&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
+ CopyMem(&CommHeader->HeaderGuid, &gEfiSmmLockBoxCommunicationGuid, sizeof(gEfiSmmLockBoxCommunicationGuid));
if ((sizeof(UINTN) == sizeof(UINT32)) && (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) ) {
MessageLength = sizeof(*LockBoxParameterRestoreAllInPlace);
- CopyMem (&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, MessageLength)], &MessageLength, sizeof(MessageLength));
+ CopyMem(&CommBuffer[OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, MessageLength)], &MessageLength, sizeof(MessageLength));
} else {
CommHeader->MessageLength = sizeof(*LockBoxParameterRestoreAllInPlace);
}
diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c
index 75dfacd4d..8327c5803 100644
--- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c
+++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c
@@ -483,13 +483,13 @@ SaveLockBox (
//
// Save data
//
- CopyMem ((VOID *)(UINTN)SmramBuffer, (VOID *)(UINTN)Buffer, Length);
+ CopyMem((VOID *)(UINTN)SmramBuffer, (VOID *)(UINTN)Buffer, Length);
//
// Insert LockBox to queue
//
LockBox->Signature = SMM_LOCK_BOX_DATA_SIGNATURE;
- CopyMem (&LockBox->Guid, Guid, sizeof(EFI_GUID));
+ CopyMem(&LockBox->Guid, Guid, sizeof(EFI_GUID));
LockBox->Buffer = (EFI_PHYSICAL_ADDRESS)(UINTN)Buffer;
LockBox->Length = (UINT64)Length;
LockBox->Attributes = 0;
@@ -677,7 +677,7 @@ UpdateLockBox (
// Copy origin data to the new SMRAM buffer and wipe the content in the
// origin SMRAM buffer.
//
- CopyMem ((VOID *)(UINTN)SmramBuffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
+ CopyMem((VOID *)(UINTN)SmramBuffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
ZeroMem ((VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
gSmst->SmmFreePages (LockBox->SmramBuffer, EFI_SIZE_TO_PAGES ((UINTN)LockBox->Length));
@@ -704,7 +704,7 @@ UpdateLockBox (
}
}
ASSERT ((UINTN)LockBox->SmramBuffer <= (MAX_ADDRESS - Offset));
- CopyMem ((VOID *)((UINTN)LockBox->SmramBuffer + Offset), Buffer, Length);
+ CopyMem((VOID *)((UINTN)LockBox->SmramBuffer + Offset), Buffer, Length);
//
// Done
@@ -813,7 +813,7 @@ RestoreLockBox (
//
// Restore data
//
- CopyMem (RestoreBuffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
+ CopyMem(RestoreBuffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
//
// Done
@@ -859,7 +859,7 @@ RestoreAllLockBoxInPlace (
//
// Restore data
//
- CopyMem ((VOID *)(UINTN)LockBox->Buffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
+ CopyMem((VOID *)(UINTN)LockBox->Buffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);
}
}
//
diff --git a/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/MemoryAllocationLib.c b/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/MemoryAllocationLib.c
index 72b9c3207..58b2b8c1a 100644
--- a/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/MemoryAllocationLib.c
+++ b/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/MemoryAllocationLib.c
@@ -817,7 +817,7 @@ InternalAllocateCopyPool(
Memory = InternalAllocatePool (PoolType, AllocationSize);
if (Memory != NULL) {
- Memory = CopyMem (Memory, Buffer, AllocationSize);
+ Memory = CopyMem(Memory, Buffer, AllocationSize);
}
return Memory;
}
@@ -966,7 +966,7 @@ InternalReallocatePool (
NewBuffer = InternalAllocateZeroPool(PoolType, NewSize);
if (NewBuffer != NULL && OldBuffer != NULL) {
- CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
+ CopyMem(NewBuffer, OldBuffer, MIN (OldSize, NewSize));
FreePool(OldBuffer);
}
return NewBuffer;
diff --git a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
index 9d2cb053c..f7524797f 100644
--- a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
@@ -453,7 +453,7 @@ ReportStatusCodeEx (
// Fill in the extended data buffer
//
if (ExtendedData != NULL) {
- CopyMem (StatusCodeData + 1, ExtendedData, ExtendedDataSize);
+ CopyMem(StatusCodeData + 1, ExtendedData, ExtendedDataSize);
}
//
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index b8384995a..3f6cc8854 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -536,7 +536,7 @@ BmFindUsbDevice (
if (!Matched) {
(*UsbIoHandleCount) --;
- CopyMem (&UsbIoHandles[Index], &UsbIoHandles[Index + 1], (*UsbIoHandleCount - Index) * sizeof (EFI_HANDLE));
+ CopyMem(&UsbIoHandles[Index], &UsbIoHandles[Index + 1], (*UsbIoHandleCount - Index) * sizeof (EFI_HANDLE));
} else {
Index++;
}
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
index a44cadaee..780103d82 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
@@ -176,8 +176,8 @@ BmCollectKeyOptions (
break;
}
}
- CopyMem (&Param->KeyOptions[Index + 1], &Param->KeyOptions[Index], (Param->KeyOptionCount - Index) * sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
- CopyMem (&Param->KeyOptions[Index], KeyOption, KeyOptionSize);
+ CopyMem(&Param->KeyOptions[Index + 1], &Param->KeyOptions[Index], (Param->KeyOptionCount - Index) * sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
+ CopyMem(&Param->KeyOptions[Index], KeyOption, KeyOptionSize);
Param->KeyOptions[Index].OptionNumber = OptionNumber;
Param->KeyOptionCount++;
}
@@ -261,7 +261,7 @@ BmInitializeKeyFields (
if (Key == NULL) {
break;
}
- CopyMem (
+ CopyMem(
&KeyOption->Keys[KeyOption->KeyData.Options.InputKeyCount],
Key,
sizeof (EFI_INPUT_KEY)
@@ -675,7 +675,7 @@ BmProcessKeyOption (
Hotkey->CodeCount = (UINT8) KeyOption->KeyData.Options.InputKeyCount;
for (KeyIndex = 0; KeyIndex < Hotkey->CodeCount; KeyIndex++) {
- CopyMem (&Hotkey->KeyData[KeyIndex].Key, &KeyOption->Keys[KeyIndex], sizeof (EFI_INPUT_KEY));
+ CopyMem(&Hotkey->KeyData[KeyIndex].Key, &KeyOption->Keys[KeyIndex], sizeof (EFI_INPUT_KEY));
Hotkey->KeyData[KeyIndex].KeyState.KeyShiftState = KeyShiftStates[Index];
}
InsertTailList (&mBmHotkeyList, &Hotkey->Link);
@@ -1025,7 +1025,7 @@ EfiBootManagerAddKeyOptionVariable (
// Return the Key Option in case needed by caller
//
if (AddedOption != NULL) {
- CopyMem (AddedOption, &KeyOption, sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
+ CopyMem(AddedOption, &KeyOption, sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
}
//
@@ -1139,7 +1139,7 @@ EfiBootManagerDeleteKeyOptionVariable (
// Return the deleted key option in case needed by caller
//
if (DeletedOption != NULL) {
- CopyMem (DeletedOption, &KeyOptions[Index], sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
+ CopyMem(DeletedOption, &KeyOptions[Index], sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
}
break;
}
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
index 68d2aac02..06584d7d0 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
@@ -221,13 +221,13 @@ structure.
WriteUnaligned16 ((UINT16 *) Ptr, (UINT16) GetDevicePathSize (Option->FilePath));
Ptr += sizeof (UINT16);
- CopyMem (Ptr, Description, StrSize (Description));
+ CopyMem(Ptr, Description, StrSize (Description));
Ptr += StrSize (Description);
- CopyMem (Ptr, Option->FilePath, GetDevicePathSize (Option->FilePath));
+ CopyMem(Ptr, Option->FilePath, GetDevicePathSize (Option->FilePath));
Ptr += GetDevicePathSize (Option->FilePath);
- CopyMem (Ptr, Option->OptionalData, Option->OptionalDataSize);
+ CopyMem(Ptr, Option->OptionalData, Option->OptionalDataSize);
UnicodeSPrint (OptionName, sizeof (OptionName), L"%s%04x", mBmLoadOptionName[Option->OptionType], Option->OptionNumber);
@@ -300,8 +300,8 @@ BmAddOptionNumberToOrderVariable (
NewOptionOrder = AllocatePool (OptionOrderSize + sizeof (UINT16));
ASSERT (NewOptionOrder != NULL);
if (OptionOrderSize != 0) {
- CopyMem (NewOptionOrder, OptionOrder, Position * sizeof (UINT16));
- CopyMem (&NewOptionOrder[Position + 1], &OptionOrder[Position], OptionOrderSize - Position * sizeof (UINT16));
+ CopyMem(NewOptionOrder, OptionOrder, Position * sizeof (UINT16));
+ CopyMem(&NewOptionOrder[Position + 1], &OptionOrder[Position], OptionOrderSize - Position * sizeof (UINT16));
}
NewOptionOrder[Position] = OptionNumber;
@@ -583,7 +583,7 @@ EfiBootManagerDeleteLoadOptionVariable (
for (Index = 0; Index < OptionOrderSize / sizeof (UINT16); Index++) {
if (OptionOrder[Index] == OptionNumber) {
OptionOrderSize -= sizeof (UINT16);
- CopyMem (&OptionOrder[Index], &OptionOrder[Index + 1], OptionOrderSize - Index * sizeof (UINT16));
+ CopyMem(&OptionOrder[Index], &OptionOrder[Index + 1], OptionOrderSize - Index * sizeof (UINT16));
gRT->SetVariable (
mBmLoadOptionOrderName[OptionType],
&gEfiGlobalVariableGuid,
@@ -1021,8 +1021,8 @@ BmCollectLoadOptions (
Param->Options
);
ASSERT (Param->Options != NULL);
- CopyMem (&Param->Options[Index + 1], &Param->Options[Index], (Param->OptionCount - Index) * sizeof (EFI_BOOT_MANAGER_LOAD_OPTION));
- CopyMem (&Param->Options[Index], &Option, sizeof (EFI_BOOT_MANAGER_LOAD_OPTION));
+ CopyMem(&Param->Options[Index + 1], &Param->Options[Index], (Param->OptionCount - Index) * sizeof (EFI_BOOT_MANAGER_LOAD_OPTION));
+ CopyMem(&Param->Options[Index], &Option, sizeof (EFI_BOOT_MANAGER_LOAD_OPTION));
Param->OptionCount++;
}
}
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
index 068ff325a..9bf62ed6b 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
@@ -351,8 +351,8 @@ BmSetVariableAndReportStatusCodeOnError (
SetVariableStatus->DataSize = DataSize;
SetVariableStatus->SetStatus = Status;
SetVariableStatus->Attributes = Attributes;
- CopyMem (SetVariableStatus + 1, VariableName, NameSize);
- CopyMem (((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
+ CopyMem(SetVariableStatus + 1, VariableName, NameSize);
+ CopyMem(((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
REPORT_STATUS_CODE_EX (
EFI_ERROR_CODE,
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
index 7908c0a70..9e50d45b8 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
@@ -205,7 +205,7 @@ HiiAddPackages (
//
for (VA_START (Args, DeviceHandle); (Package = VA_ARG (Args, UINT32 *)) != NULL; ) {
Length = ReadUnaligned32 (Package) - sizeof (UINT32);
- CopyMem (Data, Package + 1, Length);
+ CopyMem(Data, Package + 1, Length);
Data += Length;
}
VA_END (Args);
@@ -213,7 +213,7 @@ HiiAddPackages (
//
// Append a package of type EFI_HII_PACKAGE_END to mark the end of the package list
//
- CopyMem (Data, &mEndOfPakageList, sizeof (mEndOfPakageList));
+ CopyMem(Data, &mEndOfPakageList, sizeof (mEndOfPakageList));
//
// Register the package list with the HII Database
@@ -444,7 +444,7 @@ HiiGetFormSetFromHiiHandle(
while (Offset < PackageListLength) {
Package = ((UINT8 *) HiiPackageList) + Offset;
- CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
Offset += PackageHeader.Length;
if (PackageHeader.Type != EFI_HII_PACKAGE_FORMS) {
@@ -473,7 +473,7 @@ HiiGetFormSetFromHiiHandle(
Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
- CopyMem (TempBuffer + TempSize, OpCodeData, ((EFI_IFR_OP_HEADER *) OpCodeData)->Length);
+ CopyMem(TempBuffer + TempSize, OpCodeData, ((EFI_IFR_OP_HEADER *) OpCodeData)->Length);
FormSetBuffer = NULL;
} else {
TempBuffer = AllocatePool (TempSize + ((EFI_IFR_OP_HEADER *) OpCodeData)->Length);
@@ -481,7 +481,7 @@ HiiGetFormSetFromHiiHandle(
Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
- CopyMem (TempBuffer, OpCodeData, ((EFI_IFR_OP_HEADER *) OpCodeData)->Length);
+ CopyMem(TempBuffer, OpCodeData, ((EFI_IFR_OP_HEADER *) OpCodeData)->Length);
}
TempSize += ((EFI_IFR_OP_HEADER *) OpCodeData)->Length;
FormSetBuffer = TempBuffer;
@@ -1109,7 +1109,7 @@ GetValueFromRequest (
}
*VarValue = 0;
- CopyMem (VarValue, TmpBuffer, (((Length + 1) / 2) < sizeof (UINT64)) ? ((Length + 1) / 2) : sizeof (UINT64));
+ CopyMem(VarValue, TmpBuffer, (((Length + 1) / 2) < sizeof (UINT64)) ? ((Length + 1) / 2) : sizeof (UINT64));
FreePool(TmpBuffer);
@@ -1202,7 +1202,7 @@ ValidateQuestionFromVfr (
//
PackageOffset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
while (PackageOffset < PackageListLength) {
- CopyMem (&PackageHeader, (UINT8 *) HiiPackageList + PackageOffset, sizeof (PackageHeader));
+ CopyMem(&PackageHeader, (UINT8 *) HiiPackageList + PackageOffset, sizeof (PackageHeader));
//
// Parse IFR opcode from the form package.
@@ -1401,10 +1401,10 @@ ValidateQuestionFromVfr (
//
StartBit = BitOffset % 8;
EndBit = StartBit + BitWidth - 1;
- CopyMem ((UINT8 *) &BufferValue, VarBuffer + Offset, Width);
+ CopyMem((UINT8 *) &BufferValue, VarBuffer + Offset, Width);
VarValue = BitFieldRead32 (BufferValue, StartBit, EndBit);
} else {
- CopyMem (&VarValue, VarBuffer + Offset, Width);
+ CopyMem(&VarValue, VarBuffer + Offset, Width);
}
}
//
@@ -1493,10 +1493,10 @@ ValidateQuestionFromVfr (
//
StartBit = BitOffset % 8;
EndBit = StartBit + BitWidth - 1;
- CopyMem ((UINT8 *) &BufferValue, VarBuffer + Offset, Width);
+ CopyMem((UINT8 *) &BufferValue, VarBuffer + Offset, Width);
VarValue = BitFieldRead32 (BufferValue, StartBit, EndBit);
} else {
- CopyMem (&VarValue, VarBuffer + Offset, Width);
+ CopyMem(&VarValue, VarBuffer + Offset, Width);
}
}
if ( QuestionReferBitField) {
@@ -1672,10 +1672,10 @@ ValidateQuestionFromVfr (
//
StartBit = BitOffset % 8;
EndBit = StartBit + BitWidth - 1;
- CopyMem ((UINT8 *) &BufferValue, VarBuffer + Offset, Width);
+ CopyMem((UINT8 *) &BufferValue, VarBuffer + Offset, Width);
VarValue = BitFieldRead32 (BufferValue, StartBit, EndBit);
} else {
- CopyMem (&VarValue, VarBuffer + Offset, Width);
+ CopyMem(&VarValue, VarBuffer + Offset, Width);
}
}
//
@@ -1790,7 +1790,7 @@ ValidateQuestionFromVfr (
//
ASSERT (IfrOneOfOption->Type <= EFI_IFR_TYPE_NUM_SIZE_64);
ZeroMem (&TmpValue, sizeof (EFI_IFR_TYPE_VALUE));
- CopyMem (&TmpValue, &IfrOneOfOption->Value, IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
+ CopyMem(&TmpValue, &IfrOneOfOption->Value, IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
if (VarValue == TmpValue.u64) {
//
// The value is one of option value.
@@ -1927,7 +1927,7 @@ GetBlockDataInfo (
goto Done;
}
Offset = 0;
- CopyMem (
+ CopyMem(
&Offset,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINT16)) ? ((Length + 1) / 2) : sizeof (UINT16)
@@ -1950,7 +1950,7 @@ GetBlockDataInfo (
goto Done;
}
Width = 0;
- CopyMem (
+ CopyMem(
&Width,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINT16)) ? ((Length + 1) / 2) : sizeof (UINT16)
@@ -2003,7 +2003,7 @@ GetBlockDataInfo (
//
// Update the Block with configuration info
//
- CopyMem (DataBuffer + Offset, TmpBuffer, Width);
+ CopyMem(DataBuffer + Offset, TmpBuffer, Width);
FreePool(TmpBuffer);
TmpBuffer = NULL;
@@ -3127,7 +3127,7 @@ InternalHiiCreateOpCodeExtended (
Header->Scope = Scope;
Header->Length = (UINT8)(OpCodeSize + ExtensionSize);
Buffer = InternalHiiGrowOpCodeHandle (OpCodeHandle, Header->Length);
- return (UINT8 *)CopyMem (Buffer, Header, OpCodeSize);
+ return (UINT8 *)CopyMem(Buffer, Header, OpCodeSize);
}
/**
@@ -3179,7 +3179,7 @@ HiiCreateRawOpCodes (
ASSERT (RawBuffer != NULL);
Buffer = InternalHiiGrowOpCodeHandle (OpCodeHandle, RawBufferSize);
- return (UINT8 *)CopyMem (Buffer, RawBuffer, RawBufferSize);
+ return (UINT8 *)CopyMem(Buffer, RawBuffer, RawBufferSize);
}
/**
@@ -3267,7 +3267,7 @@ HiiCreateOneOfOptionOpCode (
OpCode.Option = StringId;
OpCode.Flags = (UINT8) (Flags & (EFI_IFR_OPTION_DEFAULT | EFI_IFR_OPTION_DEFAULT_MFG));
OpCode.Type = Type;
- CopyMem (&OpCode.Value, &Value, mHiiDefaultTypeToWidth[Type]);
+ CopyMem(&OpCode.Value, &Value, mHiiDefaultTypeToWidth[Type]);
return InternalHiiCreateOpCode (OpCodeHandle, &OpCode, EFI_IFR_ONE_OF_OPTION_OP, OFFSET_OF(EFI_IFR_ONE_OF_OPTION, Value) + mHiiDefaultTypeToWidth[Type]);
}
@@ -3303,7 +3303,7 @@ HiiCreateDefaultOpCode (
ZeroMem (&OpCode, sizeof (OpCode));
OpCode.Type = Type;
OpCode.DefaultId = DefaultId;
- CopyMem (&OpCode.Value, &Value, mHiiDefaultTypeToWidth[Type]);
+ CopyMem(&OpCode.Value, &Value, mHiiDefaultTypeToWidth[Type]);
return InternalHiiCreateOpCode (OpCodeHandle, &OpCode, EFI_IFR_DEFAULT_OP, OFFSET_OF(EFI_IFR_DEFAULT, Value) + mHiiDefaultTypeToWidth[Type]);
}
@@ -3358,7 +3358,7 @@ HiiCreateGuidOpCode (
0
);
if (OpCodePointer != NULL && GuidOpCode != NULL) {
- CopyMem (OpCodePointer + 1, (EFI_IFR_GUID *)GuidOpCode + 1, OpCodeSize - sizeof (OpCode));
+ CopyMem(OpCodePointer + 1, (EFI_IFR_GUID *)GuidOpCode + 1, OpCodeSize - sizeof (OpCode));
}
return (UINT8 *)OpCodePointer;
}
@@ -3552,7 +3552,7 @@ HiiCreateGotoExOpCode (
OpCode.QuestionId = RefQuestionId;
OpCode.DevicePath = RefDevicePath;
if (RefFormSetId != NULL) {
- CopyMem (&OpCode.FormSetId, RefFormSetId, sizeof (OpCode.FormSetId));
+ CopyMem(&OpCode.FormSetId, RefFormSetId, sizeof (OpCode.FormSetId));
}
//
@@ -4142,11 +4142,11 @@ InternalHiiUpdateFormPackageData (
BOOLEAN Updated;
UINTN UpdatePackageLength;
- CopyMem (TempPackage, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(TempPackage, Package, sizeof (EFI_HII_PACKAGE_HEADER));
UpdatePackageLength = sizeof (EFI_HII_PACKAGE_HEADER);
BufferPos = (UINT8 *) (TempPackage + 1);
- CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
IfrOpHdr = (EFI_IFR_OP_HEADER *)((UINT8 *) Package + sizeof (EFI_HII_PACKAGE_HEADER));
Offset = sizeof (EFI_HII_PACKAGE_HEADER);
GetFormSet = (BOOLEAN) ((FormSetGuid == NULL) ? TRUE : FALSE);
@@ -4154,7 +4154,7 @@ InternalHiiUpdateFormPackageData (
Updated = FALSE;
while (Offset < PackageHeader.Length) {
- CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
+ CopyMem(BufferPos, IfrOpHdr, IfrOpHdr->Length);
BufferPos += IfrOpHdr->Length;
UpdatePackageLength += IfrOpHdr->Length;
@@ -4216,7 +4216,7 @@ InternalHiiUpdateFormPackageData (
// Insert the updated data
//
AddSize = ((EFI_IFR_OP_HEADER *) OpCodeBufferStart->Buffer)->Length;
- CopyMem (BufferPos, OpCodeBufferStart->Buffer + AddSize, OpCodeBufferStart->Position - AddSize);
+ CopyMem(BufferPos, OpCodeBufferStart->Buffer + AddSize, OpCodeBufferStart->Position - AddSize);
BufferPos += OpCodeBufferStart->Position - AddSize;
UpdatePackageLength += OpCodeBufferStart->Position - AddSize;
@@ -4224,7 +4224,7 @@ InternalHiiUpdateFormPackageData (
//
// Add the end opcode
//
- CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
+ CopyMem(BufferPos, IfrOpHdr, IfrOpHdr->Length);
BufferPos += IfrOpHdr->Length;
UpdatePackageLength += IfrOpHdr->Length;
}
@@ -4233,7 +4233,7 @@ InternalHiiUpdateFormPackageData (
// Copy the left package data.
//
Offset += IfrOpHdr->Length;
- CopyMem (BufferPos, (UINT8 *) Package + Offset, PackageHeader.Length - Offset);
+ CopyMem(BufferPos, (UINT8 *) Package + Offset, PackageHeader.Length - Offset);
UpdatePackageLength += PackageHeader.Length - Offset;
//
@@ -4261,7 +4261,7 @@ InternalHiiUpdateFormPackageData (
// Update the package length.
//
PackageHeader.Length = (UINT32) UpdatePackageLength;
- CopyMem (TempPackage, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(TempPackage, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));
return EFI_SUCCESS;
}
@@ -4410,7 +4410,7 @@ HiiUpdateForm (
//
// Copy the package list header
//
- CopyMem (UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER));
+ CopyMem(UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER));
UpdateBufferPos += sizeof (EFI_HII_PACKAGE_LIST_HEADER);
//
@@ -4421,7 +4421,7 @@ HiiUpdateForm (
PackageListLength = ReadUnaligned32 (&HiiPackageList->PackageLength);
while (Offset < PackageListLength) {
Package = (EFI_HII_PACKAGE_HEADER *) (((UINT8 *) HiiPackageList) + Offset);
- CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
Offset += Package->Length;
if (Package->Type == EFI_HII_PACKAGE_FORMS) {
@@ -4447,8 +4447,8 @@ HiiUpdateForm (
//
// Add pacakge buffer
//
- CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
- CopyMem (UpdateBufferPos, Package, PackageHeader.Length);
+ CopyMem(&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(UpdateBufferPos, Package, PackageHeader.Length);
UpdateBufferPos += PackageHeader.Length;
}
diff --git a/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/MemoryAllocationLib.c b/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/MemoryAllocationLib.c
index 662154403..2af59ebea 100644
--- a/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/MemoryAllocationLib.c
+++ b/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/MemoryAllocationLib.c
@@ -723,7 +723,7 @@ InternalAllocateCopyPool(
Memory = InternalAllocatePool (PoolType, AllocationSize);
if (Memory != NULL) {
- Memory = CopyMem (Memory, Buffer, AllocationSize);
+ Memory = CopyMem(Memory, Buffer, AllocationSize);
}
return Memory;
}
@@ -882,7 +882,7 @@ InternalReallocatePool (
NewBuffer = InternalAllocateZeroPool(PoolType, NewSize);
if (NewBuffer != NULL && OldBuffer != NULL) {
- CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
+ CopyMem(NewBuffer, OldBuffer, MIN (OldSize, NewSize));
FreePool(OldBuffer);
}
return NewBuffer;
diff --git a/MdeModulePkg/Library/UefiSortLib/UefiSortLib.c b/MdeModulePkg/Library/UefiSortLib/UefiSortLib.c
index 9f8132bcf..d6665752a 100644
--- a/MdeModulePkg/Library/UefiSortLib/UefiSortLib.c
+++ b/MdeModulePkg/Library/UefiSortLib/UefiSortLib.c
@@ -97,9 +97,9 @@ QuickSortWorker (
//
// swap
//
- CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
- CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
- CopyMem ((UINT8*)BufferToSort+((LoopCount)*ElementSize), Buffer, ElementSize);
+ CopyMem(Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
+ CopyMem((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
+ CopyMem((UINT8*)BufferToSort+((LoopCount)*ElementSize), Buffer, ElementSize);
//
// increment NextSwapLocation
@@ -110,9 +110,9 @@ QuickSortWorker (
//
// swap pivot to it's final position (NextSwapLocaiton)
//
- CopyMem (Buffer, Pivot, ElementSize);
- CopyMem (Pivot, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
- CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
+ CopyMem(Buffer, Pivot, ElementSize);
+ CopyMem(Pivot, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
+ CopyMem((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
//
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
index c4abc7a21..a0173a91f 100644
--- a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
+++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
@@ -475,7 +475,7 @@ InternalVarCheckReallocatePool (
NewBuffer = InternalVarCheckAllocateZeroPool(NewSize);
if (NewBuffer != NULL && OldBuffer != NULL) {
- CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
+ CopyMem(NewBuffer, OldBuffer, MIN (OldSize, NewSize));
InternalVarCheckFreePool(OldBuffer);
}
return NewBuffer;
@@ -545,12 +545,12 @@ MergeHiiQuestion (
Ptr2 = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ONEOF *) HiiQuestion2 + 1);
while ((UINTN) Ptr2 < (UINTN) HiiQuestion2 + HiiQuestion2->Length) {
OneValue2 = 0;
- CopyMem (&OneValue2, Ptr2, HiiQuestion2->StorageWidth);
+ CopyMem(&OneValue2, Ptr2, HiiQuestion2->StorageWidth);
Ptr1 = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ONEOF *) HiiQuestion1 + 1);
while ((UINTN) Ptr1 < (UINTN) HiiQuestion1 + HiiQuestion1->Length) {
OneValue1 = 0;
- CopyMem (&OneValue1, Ptr1, HiiQuestion1->StorageWidth);
+ CopyMem(&OneValue1, Ptr1, HiiQuestion1->StorageWidth);
if (OneValue2 == OneValue1) {
//
// Match
@@ -574,7 +574,7 @@ MergeHiiQuestion (
//
NewHiiQuestion = InternalVarCheckAllocateZeroPool(NewLength);
ASSERT (NewHiiQuestion != NULL);
- CopyMem (NewHiiQuestion, HiiQuestion1, HiiQuestion1->Length);
+ CopyMem(NewHiiQuestion, HiiQuestion1, HiiQuestion1->Length);
//
// Use the new length.
//
@@ -584,12 +584,12 @@ MergeHiiQuestion (
Ptr2 = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ONEOF *) HiiQuestion2 + 1);
while ((UINTN) Ptr2 < (UINTN) HiiQuestion2 + HiiQuestion2->Length) {
OneValue2 = 0;
- CopyMem (&OneValue2, Ptr2, HiiQuestion2->StorageWidth);
+ CopyMem(&OneValue2, Ptr2, HiiQuestion2->StorageWidth);
Ptr1 = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ONEOF *) HiiQuestion1 + 1);
while ((UINTN) Ptr1 < (UINTN) HiiQuestion1 + HiiQuestion1->Length) {
OneValue1 = 0;
- CopyMem (&OneValue1, Ptr1, HiiQuestion1->StorageWidth);
+ CopyMem(&OneValue1, Ptr1, HiiQuestion1->StorageWidth);
if (OneValue2 == OneValue1) {
//
// Match
@@ -602,7 +602,7 @@ MergeHiiQuestion (
//
// No match
//
- CopyMem (Ptr, &OneValue2, HiiQuestion1->StorageWidth);
+ CopyMem(Ptr, &OneValue2, HiiQuestion1->StorageWidth);
Ptr += HiiQuestion1->StorageWidth;
}
Ptr2 += HiiQuestion2->StorageWidth;
@@ -625,9 +625,9 @@ MergeHiiQuestion (
Minimum1 = 0;
Maximum1 = 0;
Ptr = (UINT8 *) ((VAR_CHECK_HII_QUESTION_NUMERIC *) HiiQuestion1 + 1);
- CopyMem (&Minimum1, Ptr, HiiQuestion1->StorageWidth);
+ CopyMem(&Minimum1, Ptr, HiiQuestion1->StorageWidth);
Ptr += HiiQuestion1->StorageWidth;
- CopyMem (&Maximum1, Ptr, HiiQuestion1->StorageWidth);
+ CopyMem(&Maximum1, Ptr, HiiQuestion1->StorageWidth);
//
// Get minimum and maximum of Hii Question 2.
@@ -635,9 +635,9 @@ MergeHiiQuestion (
Minimum2 = 0;
Maximum2 = 0;
Ptr = (UINT8 *) ((VAR_CHECK_HII_QUESTION_NUMERIC *) HiiQuestion2 + 1);
- CopyMem (&Minimum2, Ptr, HiiQuestion2->StorageWidth);
+ CopyMem(&Minimum2, Ptr, HiiQuestion2->StorageWidth);
Ptr += HiiQuestion2->StorageWidth;
- CopyMem (&Maximum2, Ptr, HiiQuestion2->StorageWidth);
+ CopyMem(&Maximum2, Ptr, HiiQuestion2->StorageWidth);
//
// Update minimum.
@@ -645,7 +645,7 @@ MergeHiiQuestion (
Ptr = (UINT8 *) ((VAR_CHECK_HII_QUESTION_NUMERIC *) HiiQuestion1 + 1);
if (Minimum2 < Minimum1) {
Minimum1 = Minimum2;
- CopyMem (Ptr, &Minimum1, HiiQuestion1->StorageWidth);
+ CopyMem(Ptr, &Minimum1, HiiQuestion1->StorageWidth);
}
//
// Update maximum.
@@ -653,7 +653,7 @@ MergeHiiQuestion (
Ptr += HiiQuestion1->StorageWidth;
if (Maximum2 > Maximum1) {
Maximum1 = Maximum2;
- CopyMem (Ptr, &Maximum1, HiiQuestion1->StorageWidth);
+ CopyMem(Ptr, &Maximum1, HiiQuestion1->StorageWidth);
}
break;
@@ -670,12 +670,12 @@ MergeHiiQuestion (
Ptr2 = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ORDEREDLIST *) HiiQuestion2 + 1);
while ((UINTN) Ptr2 < (UINTN) HiiQuestion2 + HiiQuestion2->Length) {
OneValue2 = 0;
- CopyMem (&OneValue2, Ptr2, HiiQuestion2->StorageWidth);
+ CopyMem(&OneValue2, Ptr2, HiiQuestion2->StorageWidth);
Ptr1 = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ORDEREDLIST *) HiiQuestion1 + 1);
while ((UINTN) Ptr1 < (UINTN) HiiQuestion1 + HiiQuestion1->Length) {
OneValue1 = 0;
- CopyMem (&OneValue1, Ptr1, HiiQuestion1->StorageWidth);
+ CopyMem(&OneValue1, Ptr1, HiiQuestion1->StorageWidth);
if (OneValue2 == OneValue1) {
//
// Match
@@ -699,7 +699,7 @@ MergeHiiQuestion (
//
NewHiiQuestion = InternalVarCheckAllocateZeroPool(NewLength);
ASSERT (NewHiiQuestion != NULL);
- CopyMem (NewHiiQuestion, HiiQuestion1, HiiQuestion1->Length);
+ CopyMem(NewHiiQuestion, HiiQuestion1, HiiQuestion1->Length);
//
// Use the new length.
//
@@ -709,12 +709,12 @@ MergeHiiQuestion (
Ptr2 = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ORDEREDLIST *) HiiQuestion2 + 1);
while ((UINTN) Ptr2 < (UINTN) HiiQuestion2 + HiiQuestion2->Length) {
OneValue2 = 0;
- CopyMem (&OneValue2, Ptr2, HiiQuestion2->StorageWidth);
+ CopyMem(&OneValue2, Ptr2, HiiQuestion2->StorageWidth);
Ptr1 = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ORDEREDLIST *) HiiQuestion1 + 1);
while ((UINTN) Ptr1 < (UINTN) HiiQuestion1 + HiiQuestion1->Length) {
OneValue1 = 0;
- CopyMem (&OneValue1, Ptr1, HiiQuestion1->StorageWidth);
+ CopyMem(&OneValue1, Ptr1, HiiQuestion1->StorageWidth);
if (OneValue2 == OneValue1) {
//
// Match
@@ -727,7 +727,7 @@ MergeHiiQuestion (
//
// No match
//
- CopyMem (Ptr, &OneValue2, HiiQuestion1->StorageWidth);
+ CopyMem(Ptr, &OneValue2, HiiQuestion1->StorageWidth);
Ptr += HiiQuestion1->StorageWidth;
}
Ptr2 += HiiQuestion2->StorageWidth;
@@ -791,7 +791,7 @@ GetOneOfOption (
*Count = *Count + 1;
*Width = sizeof (UINT8);
if (OptionBuffer != NULL) {
- CopyMem (OptionBuffer, &IfrOneOfOption->Value.u8, sizeof (UINT8));
+ CopyMem(OptionBuffer, &IfrOneOfOption->Value.u8, sizeof (UINT8));
OptionBuffer = (UINT8 *) OptionBuffer + 1;
}
break;
@@ -799,7 +799,7 @@ GetOneOfOption (
*Count = *Count + 1;
*Width = sizeof (UINT16);
if (OptionBuffer != NULL) {
- CopyMem (OptionBuffer, &IfrOneOfOption->Value.u16, sizeof (UINT16));
+ CopyMem(OptionBuffer, &IfrOneOfOption->Value.u16, sizeof (UINT16));
OptionBuffer = (UINT16 *) OptionBuffer + 1;
}
break;
@@ -807,7 +807,7 @@ GetOneOfOption (
*Count = *Count + 1;
*Width = sizeof (UINT32);
if (OptionBuffer != NULL) {
- CopyMem (OptionBuffer, &IfrOneOfOption->Value.u32, sizeof (UINT32));
+ CopyMem(OptionBuffer, &IfrOneOfOption->Value.u32, sizeof (UINT32));
OptionBuffer = (UINT32 *) OptionBuffer + 1;
}
break;
@@ -815,7 +815,7 @@ GetOneOfOption (
*Count = *Count + 1;
*Width = sizeof (UINT64);
if (OptionBuffer != NULL) {
- CopyMem (OptionBuffer, &IfrOneOfOption->Value.u64, sizeof (UINT64));
+ CopyMem(OptionBuffer, &IfrOneOfOption->Value.u64, sizeof (UINT64));
OptionBuffer = (UINT64 *) OptionBuffer + 1;
}
break;
@@ -823,7 +823,7 @@ GetOneOfOption (
*Count = *Count + 1;
*Width = sizeof (BOOLEAN);
if (OptionBuffer != NULL) {
- CopyMem (OptionBuffer, &IfrOneOfOption->Value.b, sizeof (BOOLEAN));
+ CopyMem(OptionBuffer, &IfrOneOfOption->Value.b, sizeof (BOOLEAN));
OptionBuffer = (BOOLEAN *) OptionBuffer + 1;
}
break;
@@ -996,7 +996,7 @@ ParseHiiQuestionNumeric (
Numeric->StorageWidth = Width;
}
- CopyMem (Numeric + 1, &IfrNumeric->data, Width * 2);
+ CopyMem(Numeric + 1, &IfrNumeric->data, Width * 2);
return (VAR_CHECK_HII_QUESTION_HEADER *) Numeric;
}
@@ -1531,7 +1531,7 @@ BuildVarCheckHiiBin (
Ptr = (UINT8 *) HEADER_ALIGN (Ptr);
HiiVariableNode = VAR_CHECK_HII_VARIABLE_FROM_LINK (HiiVariableLink);
- CopyMem (Ptr, HiiVariableNode->HiiVariable, HiiVariableNode->HiiVariable->HeaderLength);
+ CopyMem(Ptr, HiiVariableNode->HiiVariable, HiiVariableNode->HiiVariable->HeaderLength);
Ptr += HiiVariableNode->HiiVariable->HeaderLength;
for (Index = 0; Index < HiiVariableNode->HiiVariable->Size * (UINTN) 8; Index++) {
@@ -1540,7 +1540,7 @@ BuildVarCheckHiiBin (
// For Hii Question header align.
//
Ptr = (UINT8 *) HEADER_ALIGN (Ptr);
- CopyMem (Ptr, HiiVariableNode->HiiQuestionArray[Index], HiiVariableNode->HiiQuestionArray[Index]->Length);
+ CopyMem(Ptr, HiiVariableNode->HiiQuestionArray[Index], HiiVariableNode->HiiQuestionArray[Index]->Length);
Ptr += HiiVariableNode->HiiQuestionArray[Index]->Length;
}
}
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c
index 0f3c0f531..c9fe2cde2 100644
--- a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c
+++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLibNullClass.c
@@ -108,7 +108,7 @@ VarCheckHiiQuestion (
}
OneData = 0;
- CopyMem (&OneData, (UINT8 *) Data + VarOffsetByteLevel, StorageWidthByteLevel);
+ CopyMem(&OneData, (UINT8 *) Data + VarOffsetByteLevel, StorageWidthByteLevel);
if (HiiQuestion->BitFieldStore) {
//
// Get the value from the bit field.
@@ -127,9 +127,9 @@ VarCheckHiiQuestion (
//
// For OneOf stored in bit field, the value of options are saved as UINT32 type.
//
- CopyMem (&OneValue, Ptr, sizeof (UINT32));
+ CopyMem(&OneValue, Ptr, sizeof (UINT32));
} else {
- CopyMem (&OneValue, Ptr, HiiQuestion->StorageWidth);
+ CopyMem(&OneValue, Ptr, HiiQuestion->StorageWidth);
}
if (OneData == OneValue) {
//
@@ -169,14 +169,14 @@ VarCheckHiiQuestion (
//
// For Numeric stored in bit field, the value of Maximum/Minimum are saved as UINT32 type.
//
- CopyMem (&Minimum, Ptr, sizeof (UINT32));
+ CopyMem(&Minimum, Ptr, sizeof (UINT32));
Ptr += sizeof (UINT32);
- CopyMem (&Maximum, Ptr, sizeof (UINT32));
+ CopyMem(&Maximum, Ptr, sizeof (UINT32));
Ptr += sizeof (UINT32);
} else {
- CopyMem (&Minimum, Ptr, HiiQuestion->StorageWidth);
+ CopyMem(&Minimum, Ptr, HiiQuestion->StorageWidth);
Ptr += HiiQuestion->StorageWidth;
- CopyMem (&Maximum, Ptr, HiiQuestion->StorageWidth);
+ CopyMem(&Maximum, Ptr, HiiQuestion->StorageWidth);
Ptr += HiiQuestion->StorageWidth;
}
@@ -198,7 +198,7 @@ VarCheckHiiQuestion (
}
for (Index = 0; Index < MaxContainers; Index++) {
OneData = 0;
- CopyMem (&OneData, (UINT8 *) Data + HiiQuestion->VarOffset + HiiQuestion->StorageWidth * Index, HiiQuestion->StorageWidth);
+ CopyMem(&OneData, (UINT8 *) Data + HiiQuestion->VarOffset + HiiQuestion->StorageWidth * Index, HiiQuestion->StorageWidth);
if (OneData == 0) {
//
// The value of 0 is used to determine if a particular "slot" in the array is empty.
@@ -209,7 +209,7 @@ VarCheckHiiQuestion (
Ptr = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ORDEREDLIST *) HiiQuestion + 1);
while ((UINTN) Ptr < ((UINTN) HiiQuestion + HiiQuestion->Length)) {
OneValue = 0;
- CopyMem (&OneValue, Ptr, HiiQuestion->StorageWidth);
+ CopyMem(&OneValue, Ptr, HiiQuestion->StorageWidth);
if (OneData == OneValue) {
//
// Match
@@ -395,10 +395,10 @@ DumpHiiQuestion (
//
// For OneOf stored in bit field, the value of options are saved as UINT32 type.
//
- CopyMem (&OneValue, Ptr, sizeof (UINT32));
+ CopyMem(&OneValue, Ptr, sizeof (UINT32));
DEBUG ((DEBUG_INFO, " OneOfOption - 0x%08x\n", OneValue));
} else {
- CopyMem (&OneValue, Ptr, HiiQuestion->StorageWidth);
+ CopyMem(&OneValue, Ptr, HiiQuestion->StorageWidth);
switch (HiiQuestion->StorageWidth) {
case sizeof (UINT8):
DEBUG ((DEBUG_INFO, " OneOfOption - 0x%02x\n", OneValue));
@@ -436,17 +436,17 @@ DumpHiiQuestion (
//
// For Numeric stored in bit field, the value of Maximum/Minimum are saved as UINT32 type.
//
- CopyMem (&Minimum, Ptr, sizeof (UINT32));
+ CopyMem(&Minimum, Ptr, sizeof (UINT32));
Ptr += sizeof (UINT32);
- CopyMem (&Maximum, Ptr, sizeof (UINT32));
+ CopyMem(&Maximum, Ptr, sizeof (UINT32));
Ptr += sizeof (UINT32);
DEBUG ((DEBUG_INFO, " Minimum - 0x%08x\n", Minimum));
DEBUG ((DEBUG_INFO, " Maximum - 0x%08x\n", Maximum));
} else {
- CopyMem (&Minimum, Ptr, HiiQuestion->StorageWidth);
+ CopyMem(&Minimum, Ptr, HiiQuestion->StorageWidth);
Ptr += HiiQuestion->StorageWidth;
- CopyMem (&Maximum, Ptr, HiiQuestion->StorageWidth);
+ CopyMem(&Maximum, Ptr, HiiQuestion->StorageWidth);
Ptr += HiiQuestion->StorageWidth;
switch (HiiQuestion->StorageWidth) {
@@ -478,7 +478,7 @@ DumpHiiQuestion (
Ptr = (UINT8 *) ((VAR_CHECK_HII_QUESTION_ORDEREDLIST *) HiiQuestion + 1);
while ((UINTN) Ptr < ((UINTN) HiiQuestion + HiiQuestion->Length)) {
OneValue = 0;
- CopyMem (&OneValue, Ptr, HiiQuestion->StorageWidth);
+ CopyMem(&OneValue, Ptr, HiiQuestion->StorageWidth);
switch (HiiQuestion->StorageWidth) {
case sizeof (UINT8):
DEBUG ((DEBUG_INFO, " OneOfOption - 0x%02x\n", OneValue));
diff --git a/MdeModulePkg/Library/VarCheckLib/VarCheckLib.c b/MdeModulePkg/Library/VarCheckLib/VarCheckLib.c
index 66b9a369a..d346f3245 100644
--- a/MdeModulePkg/Library/VarCheckLib/VarCheckLib.c
+++ b/MdeModulePkg/Library/VarCheckLib/VarCheckLib.c
@@ -510,7 +510,7 @@ VarCheckLibVariablePropertySet (
//
Property = VariablePropertyGetFunction (Name, Guid, FALSE);
if (Property != NULL) {
- CopyMem (Property, VariableProperty, sizeof (*VariableProperty));
+ CopyMem(Property, VariableProperty, sizeof (*VariableProperty));
} else {
Entry = AllocateRuntimeZeroPool (sizeof (*Entry) + StrSize (Name));
if (Entry == NULL) {
@@ -519,7 +519,7 @@ VarCheckLibVariablePropertySet (
VariableName = (CHAR16 *) ((UINTN) Entry + sizeof (*Entry));
StrCpyS (VariableName, StrSize (Name)/sizeof (CHAR16), Name);
CopyGuid (&Entry->Guid, Guid);
- CopyMem (&Entry->VariableProperty, VariableProperty, sizeof (*VariableProperty));
+ CopyMem(&Entry->VariableProperty, VariableProperty, sizeof (*VariableProperty));
Status = VarCheckAddTableEntry(
(UINTN **) &mVarCheckVariableTable,
@@ -573,7 +573,7 @@ VarCheckLibVariablePropertyGet (
// if the revision is not VAR_CHECK_VARIABLE_PROPERTY_REVISION.
//
if ((Property != NULL) && (Property->Revision == VAR_CHECK_VARIABLE_PROPERTY_REVISION)) {
- CopyMem (VariableProperty, Property, sizeof (*VariableProperty));
+ CopyMem(VariableProperty, Property, sizeof (*VariableProperty));
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLibNullClass.c b/MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLibNullClass.c
index 6899ac6bb..c94ca1435 100644
--- a/MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLibNullClass.c
+++ b/MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLibNullClass.c
@@ -96,14 +96,14 @@ VarCheckPcdValidData (
UINT8 *Ptr;
OneData = 0;
- CopyMem (&OneData, (UINT8 *) Data + PcdValidData->VarOffset, PcdValidData->StorageWidth);
+ CopyMem(&OneData, (UINT8 *) Data + PcdValidData->VarOffset, PcdValidData->StorageWidth);
switch (PcdValidData->Type) {
case VarCheckPcdValidList:
Ptr = (UINT8 *) ((VAR_CHECK_PCD_VALID_LIST *) PcdValidData + 1);
while ((UINTN) Ptr < (UINTN) PcdValidData + PcdValidData->Length) {
OneValue = 0;
- CopyMem (&OneValue, Ptr, PcdValidData->StorageWidth);
+ CopyMem(&OneValue, Ptr, PcdValidData->StorageWidth);
if (OneData == OneValue) {
//
// Match
@@ -127,9 +127,9 @@ VarCheckPcdValidData (
Maximum = 0;
Ptr = (UINT8 *) ((VAR_CHECK_PCD_VALID_RANGE *) PcdValidData + 1);
while ((UINTN) Ptr < (UINTN) PcdValidData + PcdValidData->Length) {
- CopyMem (&Minimum, Ptr, PcdValidData->StorageWidth);
+ CopyMem(&Minimum, Ptr, PcdValidData->StorageWidth);
Ptr += PcdValidData->StorageWidth;
- CopyMem (&Maximum, Ptr, PcdValidData->StorageWidth);
+ CopyMem(&Maximum, Ptr, PcdValidData->StorageWidth);
Ptr += PcdValidData->StorageWidth;
if ((OneData >= Minimum) && (OneData <= Maximum)) {
@@ -268,7 +268,7 @@ DumpPcdValidData (
Ptr = (UINT8 *) ((VAR_CHECK_PCD_VALID_LIST *) PcdValidData + 1);
while ((UINTN) Ptr < ((UINTN) PcdValidData + PcdValidData->Length)) {
OneValue = 0;
- CopyMem (&OneValue, Ptr, PcdValidData->StorageWidth);
+ CopyMem(&OneValue, Ptr, PcdValidData->StorageWidth);
switch (PcdValidData->StorageWidth) {
case sizeof (UINT8):
DEBUG ((EFI_D_INFO, " ValidList - 0x%02x\n", OneValue));
@@ -295,9 +295,9 @@ DumpPcdValidData (
Maximum = 0;
Ptr = (UINT8 *) ((VAR_CHECK_PCD_VALID_RANGE *) PcdValidData + 1);
while ((UINTN) Ptr < (UINTN) PcdValidData + PcdValidData->Length) {
- CopyMem (&Minimum, Ptr, PcdValidData->StorageWidth);
+ CopyMem(&Minimum, Ptr, PcdValidData->StorageWidth);
Ptr += PcdValidData->StorageWidth;
- CopyMem (&Maximum, Ptr, PcdValidData->StorageWidth);
+ CopyMem(&Maximum, Ptr, PcdValidData->StorageWidth);
Ptr += PcdValidData->StorageWidth;
switch (PcdValidData->StorageWidth) {
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c
index 70f5ff926..0fb97494d 100644
--- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c
+++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c
@@ -755,7 +755,7 @@ SetOption (
//
// Update
//
- CopyMem (OrgData, Data, DataSize);
+ CopyMem(OrgData, Data, DataSize);
AmlHandle->Modified = TRUE;
return EFI_SUCCESS;
@@ -881,7 +881,7 @@ SdtDuplicateHandle (
DstAmlHandle = AllocatePool (sizeof(*DstAmlHandle));
ASSERT (DstAmlHandle != NULL);
- CopyMem (DstAmlHandle, (VOID *)AmlHandle, sizeof(*DstAmlHandle));
+ CopyMem(DstAmlHandle, (VOID *)AmlHandle, sizeof(*DstAmlHandle));
return DstAmlHandle;
}
@@ -1046,7 +1046,7 @@ SdtAcpiTableAcpiSdtConstructor (
{
InitializeListHead (&AcpiTableInstance->NotifyList);
- CopyMem (&AcpiTableInstance->AcpiSdtProtocol, &mAcpiSdtProtocolTemplate, sizeof(mAcpiSdtProtocolTemplate));
+ CopyMem(&AcpiTableInstance->AcpiSdtProtocol, &mAcpiSdtProtocolTemplate, sizeof(mAcpiSdtProtocolTemplate));
AcpiTableInstance->AcpiSdtProtocol.AcpiVersion = (EFI_ACPI_TABLE_VERSION)PcdGet32 (PcdAcpiExposedTableVersions);
return ;
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
index e1c673794..8fcb4fb66 100644
--- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
+++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
@@ -145,7 +145,7 @@ PublishTables (
// the table pointers in XSDT are not aligned on 8 byte boundary.
//
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Fadt3;
- CopyMem (
+ CopyMem(
CurrentXsdtEntry,
&Buffer64,
sizeof (UINT64)
@@ -337,7 +337,7 @@ ReallocateAcpiTableBuffer (
EFI_STATUS Status;
UINT64 CurrentData;
- CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE));
+ CopyMem(&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE));
//
// Enlarge the max table number from mEfiAcpiMaxNumTables to mEfiAcpiMaxNumTables + EFI_ACPI_MAX_NUM_TABLES
//
@@ -395,16 +395,16 @@ ReallocateAcpiTableBuffer (
AcpiTableInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt3;
}
CurrentData = (UINT64) (UINTN) AcpiTableInstance->Xsdt;
- CopyMem (&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
//
// copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer
//
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
- CopyMem (AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
- CopyMem (AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
+ CopyMem(AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
+ CopyMem(AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32)));
}
- CopyMem (AcpiTableInstance->Xsdt, TempPrivateData.Xsdt, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT64)));
+ CopyMem(AcpiTableInstance->Xsdt, TempPrivateData.Xsdt, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT64)));
//
// Calculate orignal ACPI table buffer size
@@ -548,7 +548,7 @@ AddTableToList (
// Initialize the table contents
//
CurrentTableList->Signature = EFI_ACPI_TABLE_LIST_SIGNATURE;
- CopyMem (CurrentTableList->Table, Table, CurrentTableSize);
+ CopyMem(CurrentTableList->Table, Table, CurrentTableSize);
CurrentTableList->Handle = AcpiTableInstance->CurrentHandle++;
*Handle = CurrentTableList->Handle;
CurrentTableList->Version = Version;
@@ -597,7 +597,7 @@ AddTableToList (
//
// RSDP OEM information is updated to match the FADT OEM information
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdp1->OemId,
&AcpiTableInstance->Fadt1->Header.OemId,
6
@@ -606,13 +606,13 @@ AddTableToList (
//
// RSDT OEM information is updated to match the FADT OEM information.
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdt1->OemId,
&AcpiTableInstance->Fadt1->Header.OemId,
6
);
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdt1->OemTableId,
&AcpiTableInstance->Fadt1->Header.OemTableId,
sizeof (UINT64)
@@ -636,7 +636,7 @@ AddTableToList (
ZeroMem (&AcpiTableInstance->Fadt3->XFirmwareCtrl, sizeof (UINT64));
} else {
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Fadt3->XFirmwareCtrl,
&Buffer64,
sizeof (UINT64)
@@ -666,12 +666,12 @@ AddTableToList (
AcpiTableInstance->Fadt3->Dsdt = 0;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
}
- CopyMem (&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64));
//
// RSDP OEM information is updated to match the FADT OEM information
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdp3->OemId,
&AcpiTableInstance->Fadt3->Header.OemId,
6
@@ -681,12 +681,12 @@ AddTableToList (
//
// RSDT OEM information is updated to match FADT OEM information.
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdt3->OemId,
&AcpiTableInstance->Fadt3->Header.OemId,
6
);
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Rsdt3->OemTableId,
&AcpiTableInstance->Fadt3->Header.OemTableId,
sizeof (UINT64)
@@ -697,12 +697,12 @@ AddTableToList (
//
// XSDT OEM information is updated to match FADT OEM information.
//
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Xsdt->OemId,
&AcpiTableInstance->Fadt3->Header.OemId,
6
);
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Xsdt->OemTableId,
&AcpiTableInstance->Fadt3->Header.OemTableId,
sizeof (UINT64)
@@ -784,7 +784,7 @@ AddTableToList (
ZeroMem (&AcpiTableInstance->Fadt3->XFirmwareCtrl, sizeof (UINT64));
} else {
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;
- CopyMem (
+ CopyMem(
&AcpiTableInstance->Fadt3->XFirmwareCtrl,
&Buffer64,
sizeof (UINT64)
@@ -882,7 +882,7 @@ AddTableToList (
AcpiTableInstance->Fadt3->Dsdt = 0;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
}
- CopyMem (&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64));
//
// Checksum FADT table
@@ -1017,7 +1017,7 @@ AddTableToList (
// the table pointers in XSDT are not aligned on 8 byte boundary.
//
Buffer64 = (UINT64) (UINTN) CurrentTableList->Table;
- CopyMem (
+ CopyMem(
CurrentXsdtEntry,
&Buffer64,
sizeof (UINT64)
@@ -1146,7 +1146,7 @@ RemoveTableFromRsdt (
//
// Read the entry value out of the XSDT
//
- CopyMem (&CurrentTablePointer64, CurrentXsdtEntry, sizeof (UINT64));
+ CopyMem(&CurrentTablePointer64, CurrentXsdtEntry, sizeof (UINT64));
} else {
//
// Initialize to NULL
@@ -1166,11 +1166,11 @@ RemoveTableFromRsdt (
// the last entry.
//
if (Rsdt != NULL) {
- CopyMem (CurrentRsdtEntry, CurrentRsdtEntry + 1, (*NumberOfTableEntries - Index) * sizeof (UINT32));
+ CopyMem(CurrentRsdtEntry, CurrentRsdtEntry + 1, (*NumberOfTableEntries - Index) * sizeof (UINT32));
Rsdt->Length = Rsdt->Length - sizeof (UINT32);
}
if (Xsdt != NULL) {
- CopyMem (CurrentXsdtEntry, ((UINT64 *) CurrentXsdtEntry) + 1, (*NumberOfTableEntries - Index) * sizeof (UINT64));
+ CopyMem(CurrentXsdtEntry, ((UINT64 *) CurrentXsdtEntry) + 1, (*NumberOfTableEntries - Index) * sizeof (UINT64));
Xsdt->Length = Xsdt->Length - sizeof (UINT64);
}
break;
@@ -1766,23 +1766,23 @@ AcpiTableAcpiTableConstructor (
//
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
CurrentData = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE;
- CopyMem (&AcpiTableInstance->Rsdp1->Signature, &CurrentData, sizeof (UINT64));
- CopyMem (AcpiTableInstance->Rsdp1->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Rsdp1->OemId));
+ CopyMem(&AcpiTableInstance->Rsdp1->Signature, &CurrentData, sizeof (UINT64));
+ CopyMem(AcpiTableInstance->Rsdp1->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Rsdp1->OemId));
AcpiTableInstance->Rsdp1->Reserved = EFI_ACPI_RESERVED_BYTE;
AcpiTableInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt1;
}
CurrentData = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE;
- CopyMem (&AcpiTableInstance->Rsdp3->Signature, &CurrentData, sizeof (UINT64));
- CopyMem (AcpiTableInstance->Rsdp3->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Rsdp3->OemId));
+ CopyMem(&AcpiTableInstance->Rsdp3->Signature, &CurrentData, sizeof (UINT64));
+ CopyMem(AcpiTableInstance->Rsdp3->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Rsdp3->OemId));
AcpiTableInstance->Rsdp3->Revision = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION;
AcpiTableInstance->Rsdp3->Length = sizeof (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER);
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
AcpiTableInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt3;
}
CurrentData = (UINT64) (UINTN) AcpiTableInstance->Xsdt;
- CopyMem (&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
- SetMem (AcpiTableInstance->Rsdp3->Reserved, 3, EFI_ACPI_RESERVED_BYTE);
+ CopyMem(&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
+ SetMem(AcpiTableInstance->Rsdp3->Reserved, 3, EFI_ACPI_RESERVED_BYTE);
if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) {
//
@@ -1795,9 +1795,9 @@ AcpiTableAcpiTableConstructor (
AcpiTableInstance->Rsdt1->Signature = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt1->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Rsdt1->Revision = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION;
- CopyMem (AcpiTableInstance->Rsdt1->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Rsdt1->OemId));
+ CopyMem(AcpiTableInstance->Rsdt1->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Rsdt1->OemId));
CurrentData = PcdGet64 (PcdAcpiDefaultOemTableId);
- CopyMem (&AcpiTableInstance->Rsdt1->OemTableId, &CurrentData, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Rsdt1->OemTableId, &CurrentData, sizeof (UINT64));
AcpiTableInstance->Rsdt1->OemRevision = PcdGet32 (PcdAcpiDefaultOemRevision);
AcpiTableInstance->Rsdt1->CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);
AcpiTableInstance->Rsdt1->CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
@@ -1810,9 +1810,9 @@ AcpiTableAcpiTableConstructor (
AcpiTableInstance->Rsdt3->Signature = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt3->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Rsdt3->Revision = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION;
- CopyMem (AcpiTableInstance->Rsdt3->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Rsdt3->OemId));
+ CopyMem(AcpiTableInstance->Rsdt3->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Rsdt3->OemId));
CurrentData = PcdGet64 (PcdAcpiDefaultOemTableId);
- CopyMem (&AcpiTableInstance->Rsdt3->OemTableId, &CurrentData, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Rsdt3->OemTableId, &CurrentData, sizeof (UINT64));
AcpiTableInstance->Rsdt3->OemRevision = PcdGet32 (PcdAcpiDefaultOemRevision);
AcpiTableInstance->Rsdt3->CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);
AcpiTableInstance->Rsdt3->CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
@@ -1829,9 +1829,9 @@ AcpiTableAcpiTableConstructor (
AcpiTableInstance->Xsdt->Signature = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Xsdt->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Xsdt->Revision = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION;
- CopyMem (AcpiTableInstance->Xsdt->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Xsdt->OemId));
+ CopyMem(AcpiTableInstance->Xsdt->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiTableInstance->Xsdt->OemId));
CurrentData = PcdGet64 (PcdAcpiDefaultOemTableId);
- CopyMem (&AcpiTableInstance->Xsdt->OemTableId, &CurrentData, sizeof (UINT64));
+ CopyMem(&AcpiTableInstance->Xsdt->OemTableId, &CurrentData, sizeof (UINT64));
AcpiTableInstance->Xsdt->OemRevision = PcdGet32 (PcdAcpiDefaultOemRevision);
AcpiTableInstance->Xsdt->CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);
AcpiTableInstance->Xsdt->CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c
index bde6dba84..2ee18738f 100644
--- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c
+++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c
@@ -47,7 +47,7 @@ AmlCreateNode (
ASSERT (AmlNodeList != NULL);
AmlNodeList->Signature = EFI_AML_NODE_LIST_SIGNATURE;
- CopyMem (AmlNodeList->Name, NameSeg, AML_NAME_SEG_SIZE);
+ CopyMem(AmlNodeList->Name, NameSeg, AML_NAME_SEG_SIZE);
AmlNodeList->Buffer = NULL;
AmlNodeList->Size = 0;
InitializeListHead (&AmlNodeList->Link);
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlString.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlString.c
index d0b8b0d0f..4498741d7 100644
--- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlString.c
+++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlString.c
@@ -347,7 +347,7 @@ AmlGetAslNameStringSize (
@param[in] Length Buffer length.
**/
VOID
-AmlUpperCaseCopyMem (
+AmlUpperCaseCopyMem(
IN UINT8 *DstBuffer,
IN UINT8 *SrcBuffer,
IN UINTN Length
@@ -405,7 +405,7 @@ AmlNameFromAslName (
AmlBuffer ++;
Buffer ++;
} else if (Parent > 0) {
- SetMem (AmlBuffer, Parent, AML_PARENT_PREFIX_CHAR);
+ SetMem(AmlBuffer, Parent, AML_PARENT_PREFIX_CHAR);
AmlBuffer += Parent;
Buffer += Parent;
}
@@ -429,8 +429,8 @@ AmlNameFromAslName (
while (*Buffer != 0) {
NameLength = AmlGetAslNameSegLength (Buffer);
ASSERT ((NameLength != 0) && (NameLength <= AML_NAME_SEG_SIZE));
- AmlUpperCaseCopyMem (AmlBuffer, Buffer, NameLength);
- SetMem (AmlBuffer + NameLength, AML_NAME_SEG_SIZE - NameLength, AML_NAME_CHAR__);
+ AmlUpperCaseCopyMem(AmlBuffer, Buffer, NameLength);
+ SetMem(AmlBuffer + NameLength, AML_NAME_SEG_SIZE - NameLength, AML_NAME_CHAR__);
Buffer += NameLength;
AmlBuffer += AML_NAME_SEG_SIZE;
if (*Buffer == 0) {
diff --git a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c
index c1e2e2e4a..69c494db1 100644
--- a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c
+++ b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c
@@ -562,7 +562,7 @@ BootGraphicsDxeEntryPoint (
//
Header = &mBootGraphicsResourceTableTemplate.Header;
ZeroMem (Header->OemId, sizeof (Header->OemId));
- CopyMem (
+ CopyMem(
Header->OemId,
PcdGetPtr (PcdAcpiDefaultOemId),
MIN (PcdGetSize (PcdAcpiDefaultOemId), sizeof (Header->OemId))
diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
index db5c9eb0e..2a61f1bec 100644
--- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
+++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
@@ -247,7 +247,7 @@ FpdtAllocateS3PerformanceTableMemory (
}
DEBUG ((EFI_D_INFO, "FPDT: ACPI S3 Performance Table address = 0x%x\n", mAcpiS3PerformanceTable));
if (mAcpiS3PerformanceTable != NULL) {
- CopyMem (mAcpiS3PerformanceTable, &mS3PerformanceTableTemplate, sizeof (mS3PerformanceTableTemplate));
+ CopyMem(mAcpiS3PerformanceTable, &mS3PerformanceTableTemplate, sizeof (mS3PerformanceTableTemplate));
}
}
}
@@ -336,7 +336,7 @@ InstallFirmwarePerformanceDataTable (
//
// Fill Basic Boot record to Boot Performance Table.
//
- CopyMem (mAcpiBootPerformanceTable, &mBootPerformanceTableTemplate, sizeof (mBootPerformanceTableTemplate));
+ CopyMem(mAcpiBootPerformanceTable, &mBootPerformanceTableTemplate, sizeof (mBootPerformanceTableTemplate));
}
BootPerformanceDataSize = mAcpiBootPerformanceTable->Header.Length;
@@ -512,7 +512,7 @@ FpdtStatusCodeListenerDxe (
//
// Get the Boot performance table and then install it to ACPI table.
//
- CopyMem (&mReceivedAcpiBootPerformanceTable, Data + 1, Data->Size);
+ CopyMem(&mReceivedAcpiBootPerformanceTable, Data + 1, Data->Size);
} else if (Data != NULL && CompareGuid (&Data->Type, &gEfiFirmwarePerformanceGuid)) {
DEBUG ((DEBUG_ERROR, "FpdtStatusCodeListenerDxe: Performance data reported through gEfiFirmwarePerformanceGuid will not be collected by FirmwarePerformanceDataTableDxe\n"));
Status = EFI_UNSUPPORTED;
@@ -597,13 +597,13 @@ FirmwarePerformanceDxeEntryPoint (
VOID *Registration;
UINT64 OemTableId;
- CopyMem (
+ CopyMem(
mFirmwarePerformanceTableTemplate.Header.OemId,
PcdGetPtr (PcdAcpiDefaultOemId),
sizeof (mFirmwarePerformanceTableTemplate.Header.OemId)
);
OemTableId = PcdGet64 (PcdAcpiDefaultOemTableId);
- CopyMem (&mFirmwarePerformanceTableTemplate.Header.OemTableId, &OemTableId, sizeof (UINT64));
+ CopyMem(&mFirmwarePerformanceTableTemplate.Header.OemTableId, &OemTableId, sizeof (UINT64));
mFirmwarePerformanceTableTemplate.Header.OemRevision = PcdGet32 (PcdAcpiDefaultOemRevision);
mFirmwarePerformanceTableTemplate.Header.CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);
mFirmwarePerformanceTableTemplate.Header.CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
index 482497bf8..c1ad09466 100644
--- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
+++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.c
@@ -169,7 +169,7 @@ FpdtStatusCodeListenerPei (
FirmwarePerformanceData = GET_GUID_HOB_DATA (GuidHob);
PeiPerformanceLogHeader = (FPDT_PEI_EXT_PERF_HEADER *) FirmwarePerformanceData;
- CopyMem (FirmwarePerformanceTablePtr, FirmwarePerformanceData + sizeof (FPDT_PEI_EXT_PERF_HEADER), (UINTN)(PeiPerformanceLogHeader->SizeOfAllEntries));
+ CopyMem(FirmwarePerformanceTablePtr, FirmwarePerformanceData + sizeof (FPDT_PEI_EXT_PERF_HEADER), (UINTN)(PeiPerformanceLogHeader->SizeOfAllEntries));
GuidHob = GetNextGuidHob (&gEdkiiFpdtExtendedFirmwarePerformanceGuid, GET_NEXT_HOB (GuidHob));
diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c
index 776f5f133..ceaac5726 100644
--- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c
+++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c
@@ -93,7 +93,7 @@ FpdtStatusCodeListenerSmm (
//
// Get the boot performance data.
//
- CopyMem (&mSmmBootPerformanceTable, Data + 1, Data->Size);
+ CopyMem(&mSmmBootPerformanceTable, Data + 1, Data->Size);
mBootRecordBuffer = ((UINT8 *) (mSmmBootPerformanceTable)) + sizeof (SMM_BOOT_PERFORMANCE_TABLE);
ReleaseSpinLock (&mSmmFpdtLock);
@@ -250,7 +250,7 @@ FpdtSmiHandler (
break;
}
- CopyMem (
+ CopyMem(
(UINT8*)BootRecordData,
mBootRecordBuffer + BootRecordOffset,
BootRecordSize
diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
index 9a8cede67..f008e7c63 100644
--- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
+++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
@@ -289,7 +289,7 @@ AcpiS3ContextSaveOnEndOfDxe (
// Allocate a code buffer < 4G for S3 debug to load external code, set invalid code instructions in it.
//
AcpiS3Context->S3DebugBufferAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateMemoryBelow4G (EfiReservedMemoryType, EFI_PAGE_SIZE);
- SetMem ((VOID *)(UINTN)AcpiS3Context->S3DebugBufferAddress, EFI_PAGE_SIZE, 0xff);
+ SetMem((VOID *)(UINTN)AcpiS3Context->S3DebugBufferAddress, EFI_PAGE_SIZE, 0xff);
DEBUG((EFI_D_INFO, "AcpiS3Context: AcpiFacsTable is 0x%8x\n", AcpiS3Context->AcpiFacsTable));
DEBUG((EFI_D_INFO, "AcpiS3Context: IdtrProfile is 0x%8x\n", AcpiS3Context->IdtrProfile));
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
index 7f6485988..b7dd0563b 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -1138,8 +1138,8 @@ BdsDxeSetVariableAndReportStatusCodeOnError (
SetVariableStatus->DataSize = DataSize;
SetVariableStatus->SetStatus = Status;
SetVariableStatus->Attributes = Attributes;
- CopyMem (SetVariableStatus + 1, VariableName, NameSize);
- CopyMem (((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
+ CopyMem(SetVariableStatus + 1, VariableName, NameSize);
+ CopyMem(((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
REPORT_STATUS_CODE_EX (
EFI_ERROR_CODE,
diff --git a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c
index 6b6663d01..f093789d9 100644
--- a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c
+++ b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c
@@ -508,7 +508,7 @@ RelocateBlockDescriptors (
return NULL;
}
- CopyMem ((VOID *) RelocBuffer, (VOID *) (UINTN) TempBlockDesc->Union.DataBlock, (UINTN) TempBlockDesc->Length);
+ CopyMem((VOID *) RelocBuffer, (VOID *) (UINTN) TempBlockDesc->Union.DataBlock, (UINTN) TempBlockDesc->Length);
DEBUG ((DEBUG_INFO, "Capsule relocate descriptors from/to/size 0x%lX 0x%lX 0x%lX\n", TempBlockDesc->Union.DataBlock, (UINT64)(UINTN)RelocBuffer, TempBlockDesc->Length));
TempBlockDesc->Union.DataBlock = (EFI_PHYSICAL_ADDRESS) (UINTN) RelocBuffer;
}
@@ -545,7 +545,7 @@ RelocateBlockDescriptors (
if (RelocBuffer == NULL) {
return NULL;
}
- CopyMem ((VOID *) RelocBuffer, (VOID *) CurrBlockDescHead, BlockListSize);
+ CopyMem((VOID *) RelocBuffer, (VOID *) CurrBlockDescHead, BlockListSize);
DEBUG ((DEBUG_INFO, "Capsule reloc descriptor block #2\n"));
//
// Point the previous block's next point to this copied version. If
@@ -1198,7 +1198,7 @@ CapsuleDataCoalesce (
return EFI_BUFFER_TOO_SMALL;
}
- CopyMem ((VOID *) RelocPtr, (VOID *) (UINTN) TempBlockDesc->Union.DataBlock, (UINTN) TempBlockDesc->Length);
+ CopyMem((VOID *) RelocPtr, (VOID *) (UINTN) TempBlockDesc->Union.DataBlock, (UINTN) TempBlockDesc->Length);
DEBUG ((DEBUG_INFO, "Capsule reloc data block from 0x%8X to 0x%8X with size 0x%8X\n",
(UINTN) TempBlockDesc->Union.DataBlock, (UINTN) RelocPtr, (UINTN) TempBlockDesc->Length));
@@ -1249,7 +1249,7 @@ CapsuleDataCoalesce (
//
ASSERT (CurrentBlockDesc->Length <= SizeLeft);
- CopyMem ((VOID *) DestPtr, (VOID *) (UINTN) (CurrentBlockDesc->Union.DataBlock), (UINTN)CurrentBlockDesc->Length);
+ CopyMem((VOID *) DestPtr, (VOID *) (UINTN) (CurrentBlockDesc->Union.DataBlock), (UINTN)CurrentBlockDesc->Length);
DEBUG ((DEBUG_INFO, "Capsule coalesce block no.0x%lX from 0x%lX to 0x%lX with size 0x%lX\n",(UINT64)CapsuleTimes,
CurrentBlockDesc->Union.DataBlock, (UINT64)(UINTN)DestPtr, CurrentBlockDesc->Length));
DestPtr += CurrentBlockDesc->Length;
@@ -1268,7 +1268,7 @@ CapsuleDataCoalesce (
//
ASSERT (CurrentBlockDesc->Length == sizeof (EFI_CAPSULE_PEIM_PRIVATE_DATA));
ASSERT ((UINTN)DestPtr == (UINTN)NewCapsuleBase);
- CopyMem ((VOID *) DestPtr, (VOID *) (UINTN) CurrentBlockDesc->Union.DataBlock, (UINTN) CurrentBlockDesc->Length);
+ CopyMem((VOID *) DestPtr, (VOID *) (UINTN) CurrentBlockDesc->Union.DataBlock, (UINTN) CurrentBlockDesc->Length);
DestPtr += sizeof (EFI_CAPSULE_PEIM_PRIVATE_DATA) + (CapsuleNumber - 1) * sizeof(UINT64);
}
//
diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
index 29ab8d723..1eeabf4f4 100644
--- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
+++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
@@ -639,9 +639,9 @@ SortMemoryResourceDescriptor (
while (MemoryResourceEntry->ResourceLength != 0) {
while (NextMemoryResourceEntry->ResourceLength != 0) {
if (MemoryResourceEntry->PhysicalStart > NextMemoryResourceEntry->PhysicalStart) {
- CopyMem (&TempMemoryResource, MemoryResourceEntry, sizeof (MEMORY_RESOURCE_DESCRIPTOR));
- CopyMem (MemoryResourceEntry, NextMemoryResourceEntry, sizeof (MEMORY_RESOURCE_DESCRIPTOR));
- CopyMem (NextMemoryResourceEntry, &TempMemoryResource, sizeof (MEMORY_RESOURCE_DESCRIPTOR));
+ CopyMem(&TempMemoryResource, MemoryResourceEntry, sizeof (MEMORY_RESOURCE_DESCRIPTOR));
+ CopyMem(MemoryResourceEntry, NextMemoryResourceEntry, sizeof (MEMORY_RESOURCE_DESCRIPTOR));
+ CopyMem(NextMemoryResourceEntry, &TempMemoryResource, sizeof (MEMORY_RESOURCE_DESCRIPTOR));
}
NextMemoryResourceEntry = NextMemoryResourceEntry + 1;
@@ -671,7 +671,7 @@ MergeMemoryResourceDescriptor (
MemoryResourceEntry = MemoryResource;
NewMemoryResourceEntry = MemoryResource;
while (MemoryResourceEntry->ResourceLength != 0) {
- CopyMem (NewMemoryResourceEntry, MemoryResourceEntry, sizeof (MEMORY_RESOURCE_DESCRIPTOR));
+ CopyMem(NewMemoryResourceEntry, MemoryResourceEntry, sizeof (MEMORY_RESOURCE_DESCRIPTOR));
NextMemoryResourceEntry = MemoryResourceEntry + 1;
while ((NextMemoryResourceEntry->ResourceLength != 0) &&
@@ -969,7 +969,7 @@ GetScatterGatherHeadEntries (
DEBUG ((DEBUG_ERROR, "Fail to allocate memory!\n"));
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (EnlargedTempList, TempList, TempListLength);
+ CopyMem(EnlargedTempList, TempList, TempListLength);
FreePool(TempList);
TempList = EnlargedTempList;
TempListLength *= 2;
@@ -993,7 +993,7 @@ GetScatterGatherHeadEntries (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (*HeadList, TempList, (ValidIndex) * sizeof (EFI_PHYSICAL_ADDRESS));
+ CopyMem(*HeadList, TempList, (ValidIndex) * sizeof (EFI_PHYSICAL_ADDRESS));
*ListLength = ValidIndex;
return EFI_SUCCESS;
@@ -1272,7 +1272,7 @@ CreateState (
// Copy to our new buffer for DXE
//
DEBUG ((DEBUG_INFO, "Capsule copy from 0x%8X to 0x%8X with size 0x%8X\n", (UINTN)((UINT8 *)PrivateData + sizeof(EFI_CAPSULE_PEIM_PRIVATE_DATA) + (CapsuleNumber - 1) * sizeof(UINT64)), (UINTN) NewBuffer, Size));
- CopyMem ((VOID *) (UINTN) NewBuffer, (VOID *) (UINTN) ((UINT8 *)PrivateData + sizeof(EFI_CAPSULE_PEIM_PRIVATE_DATA) + (CapsuleNumber - 1) * sizeof(UINT64)), Size);
+ CopyMem((VOID *) (UINTN) NewBuffer, (VOID *) (UINTN) ((UINT8 *)PrivateData + sizeof(EFI_CAPSULE_PEIM_PRIVATE_DATA) + (CapsuleNumber - 1) * sizeof(UINT64)), Size);
//
// Check for test data pattern. If it is the test pattern, then we'll
// test it and still create the HOB so that it can be used to verify
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
index 4a6086e72..ea5fece87 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
@@ -754,10 +754,10 @@ ConSplitterTextOutConstructor (
// Copy protocols template
//
if (FeaturePcdGet (PcdConOutUgaSupport)) {
- CopyMem (&ConOutPrivate->UgaDraw, &mUgaDrawProtocolTemplate, sizeof (EFI_UGA_DRAW_PROTOCOL));
+ CopyMem(&ConOutPrivate->UgaDraw, &mUgaDrawProtocolTemplate, sizeof (EFI_UGA_DRAW_PROTOCOL));
}
if (FeaturePcdGet (PcdConOutGopSupport)) {
- CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));
+ CopyMem(&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));
}
//
@@ -830,7 +830,7 @@ ConSplitterTextOutConstructor (
Info->VerticalResolution = 600;
Info->PixelFormat = PixelBltOnly;
Info->PixelsPerScanLine = 800;
- CopyMem (ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+ CopyMem(ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
//
@@ -2270,7 +2270,7 @@ ConSplitterGrowMapTable (
return EFI_OUT_OF_RESOURCES;
}
- SetMem (TextOutModeMap, TotalSize, 0xFF);
+ SetMem(TextOutModeMap, TotalSize, 0xFF);
Private->TextOutModeMap = TextOutModeMap;
//
@@ -2305,7 +2305,7 @@ ConSplitterGrowMapTable (
// Copy the old data to the new one
//
while (Index < Private->TextOutMode.MaxMode) {
- CopyMem (TextOutModeMap, SrcAddress, Size);
+ CopyMem(TextOutModeMap, SrcAddress, Size);
//
// Go to next row of new TextOutModeMap.
//
@@ -2460,7 +2460,7 @@ ConSplitterGetIntersection (
(*MaxMode)--;
} else {
if (CurrentMapEntry != NextMapEntry) {
- CopyMem (NextMapEntry, CurrentMapEntry, MapStepSize * sizeof (INT32));
+ CopyMem(NextMapEntry, CurrentMapEntry, MapStepSize * sizeof (INT32));
}
NextMapEntry += MapStepSize;
@@ -2649,7 +2649,7 @@ ConSplitterGetIntersectionBetweenConOutAndStrErr (
return EFI_OUT_OF_RESOURCES;
}
- SetMem (ConOutMapTable, ConOutMapTableSize, 0xFF);
+ SetMem(ConOutMapTable, ConOutMapTableSize, 0xFF);
StdErrMapTableSize = StdErrMaxMode * sizeof (INT32);
StdErrMapTable = AllocateZeroPool(StdErrMapTableSize);
@@ -2657,7 +2657,7 @@ ConSplitterGetIntersectionBetweenConOutAndStrErr (
return EFI_OUT_OF_RESOURCES;
}
- SetMem (StdErrMapTable, StdErrMapTableSize, 0xFF);
+ SetMem(StdErrMapTable, StdErrMapTableSize, 0xFF);
//
// Find the intersection of the two set of modes. If they actually intersect, the
@@ -2783,7 +2783,7 @@ ConSplitterAddGraphicsOutputMode (
//
CurrentGraphicsOutputMode->MaxMode = GraphicsOutput->Mode->MaxMode;
CurrentGraphicsOutputMode->Mode = GraphicsOutput->Mode->Mode;
- CopyMem (CurrentGraphicsOutputMode->Info, GraphicsOutput->Mode->Info, GraphicsOutput->Mode->SizeOfInfo);
+ CopyMem(CurrentGraphicsOutputMode->Info, GraphicsOutput->Mode->Info, GraphicsOutput->Mode->SizeOfInfo);
CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;
CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;
CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;
@@ -2811,7 +2811,7 @@ ConSplitterAddGraphicsOutputMode (
return Status;
}
ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
- CopyMem (Mode, Info, SizeOfInfo);
+ CopyMem(Mode, Info, SizeOfInfo);
Mode++;
FreePool(Info);
}
@@ -2865,7 +2865,7 @@ ConSplitterAddGraphicsOutputMode (
}
if (!AlreadyExist) {
- CopyMem (MatchedMode, Mode, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+ CopyMem(MatchedMode, Mode, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
//
// Physical frame buffer is no longer available, change PixelFormat to PixelBltOnly
@@ -2948,7 +2948,7 @@ ConSplitterAddGraphicsOutputMode (
//
// Update the private mode buffer
//
- CopyMem (&Private->GraphicsOutputModeBuffer[0], Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+ CopyMem(&Private->GraphicsOutputModeBuffer[0], Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
//
// Only mode 0 is available to be set
@@ -3335,7 +3335,7 @@ ConSplitterTextOutDeleteDevice (
if (TextOutList->GraphicsOutput != NULL) {
Private->CurrentNumberOfGraphicsOutput--;
}
- CopyMem (TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index);
+ CopyMem(TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index);
CurrentNumOfConsoles--;
break;
}
@@ -3502,9 +3502,9 @@ ConSplitterTextInExDequeueKey (
//
// Return the first saved key.
//
- CopyMem (KeyData, &Private->KeyQueue[0], sizeof (EFI_KEY_DATA));
+ CopyMem(KeyData, &Private->KeyQueue[0], sizeof (EFI_KEY_DATA));
Private->CurrentNumberOfKeys--;
- CopyMem (
+ CopyMem(
&Private->KeyQueue[0],
&Private->KeyQueue[1],
Private->CurrentNumberOfKeys * sizeof (EFI_KEY_DATA)
@@ -3545,7 +3545,7 @@ ConSplitterTextInPrivateReadKeyStroke (
break;
}
if ((KeyData.Key.ScanCode != CHAR_NULL) || (KeyData.Key.UnicodeChar != SCAN_NULL)) {
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return Status;
}
}
@@ -3569,7 +3569,7 @@ ConSplitterTextInPrivateReadKeyStroke (
// to read key from THIS physical console input device.
//
if ((KeyData.Key.ScanCode != CHAR_NULL) || (KeyData.Key.UnicodeChar != SCAN_NULL)) {
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return Status;
}
} else {
@@ -3860,7 +3860,7 @@ ConSplitterTextInReadKeyStrokeEx (
if ((Private->VirtualKeyStateExported) ||
(CurrentKeyData.Key.ScanCode != CHAR_NULL) ||
(CurrentKeyData.Key.UnicodeChar != SCAN_NULL)) {
- CopyMem (
+ CopyMem(
&Private->KeyQueue[Private->CurrentNumberOfKeys],
&CurrentKeyData,
sizeof (EFI_KEY_DATA)
@@ -3874,7 +3874,7 @@ ConSplitterTextInReadKeyStrokeEx (
// Consolidate the key state for all keys in Private->KeyQueue[]
//
for (Index = 0; Index < Private->CurrentNumberOfKeys; Index++) {
- CopyMem (&Private->KeyQueue[Index].KeyState, &KeyState, sizeof (EFI_KEY_STATE));
+ CopyMem(&Private->KeyQueue[Index].KeyState, &KeyState, sizeof (EFI_KEY_STATE));
}
//
@@ -3889,7 +3889,7 @@ ConSplitterTextInReadKeyStrokeEx (
// Always return the key state even there is no key pressed.
//
ZeroMem (&KeyData->Key, sizeof (KeyData->Key));
- CopyMem (&KeyData->KeyState, &KeyState, sizeof (KeyData->KeyState));
+ CopyMem(&KeyData->KeyState, &KeyState, sizeof (KeyData->KeyState));
return EFI_NOT_READY;
}
@@ -4033,7 +4033,7 @@ ConSplitterTextInRegisterKeyNotify (
}
NewNotify->Signature = TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
- CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
//
// Return the wrong status of registering key notify of
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
index f5a61c81f..080823b26 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
@@ -81,7 +81,7 @@ ConSplitterGraphicsOutputQueryMode (
return EFI_OUT_OF_RESOURCES;
}
*SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
- CopyMem (*Info, &Private->GraphicsOutputModeBuffer[ModeNumber], *SizeOfInfo);
+ CopyMem(*Info, &Private->GraphicsOutputModeBuffer[ModeNumber], *SizeOfInfo);
}
return EFI_SUCCESS;
@@ -179,7 +179,7 @@ ConSplitterGraphicsOutputSetMode (
//
// If only one physical GOP device exist, copy physical information to consplitter.
//
- CopyMem (This->Mode->Info, PhysicalGraphicsOutput->Mode->Info, PhysicalGraphicsOutput->Mode->SizeOfInfo);
+ CopyMem(This->Mode->Info, PhysicalGraphicsOutput->Mode->Info, PhysicalGraphicsOutput->Mode->SizeOfInfo);
This->Mode->SizeOfInfo = PhysicalGraphicsOutput->Mode->SizeOfInfo;
This->Mode->FrameBufferBase = PhysicalGraphicsOutput->Mode->FrameBufferBase;
This->Mode->FrameBufferSize = PhysicalGraphicsOutput->Mode->FrameBufferSize;
@@ -188,7 +188,7 @@ ConSplitterGraphicsOutputSetMode (
// If 2 more phyiscal GOP device exist or GOP protocol does not exist,
// return GOP information (PixelFormat is PixelBltOnly) created in ConSplitterAddGraphicsOutputMode ().
//
- CopyMem (This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo);
+ CopyMem(This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo);
}
return ReturnStatus;
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 0f431946d..008eb4e33 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -2072,7 +2072,7 @@ RegisterFontPackage (
SimplifiedFont->NumberOfNarrowGlyphs = (UINT16) (mNarrowFontSize / sizeof (EFI_NARROW_GLYPH));
Location = (UINT8 *) (&SimplifiedFont->NumberOfWideGlyphs + 1);
- CopyMem (Location, gUsStdNarrowGlyphData, mNarrowFontSize);
+ CopyMem(Location, gUsStdNarrowGlyphData, mNarrowFontSize);
//
// Add this simplified font package to a package list then install it.
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
index 9e9c163d4..c5b47fdbc 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
@@ -1111,8 +1111,8 @@ TerminalUpdateConsoleDevVariable (
SetVariableStatus->DataSize = VariableSize;
SetVariableStatus->SetStatus = Status;
SetVariableStatus->Attributes = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS;
- CopyMem (SetVariableStatus + 1, VariableName, NameSize);
- CopyMem (((UINT8 *) (SetVariableStatus + 1)) + NameSize, Variable, VariableSize);
+ CopyMem(SetVariableStatus + 1, VariableName, NameSize);
+ CopyMem(((UINT8 *) (SetVariableStatus + 1)) + NameSize, Variable, VariableSize);
REPORT_STATUS_CODE_EX (
EFI_ERROR_CODE,
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
index 05429f3b1..71dc331f2 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
@@ -134,7 +134,7 @@ TerminalConInReadKeyStroke (
return Status;
}
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS;
@@ -371,7 +371,7 @@ TerminalConInRegisterKeyNotify (
NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
- CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
+ CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&TerminalDevice->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify;
@@ -629,7 +629,7 @@ KeyNotifyProcessHandler (
//
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
HasKey = EfiKeyFiFoForNotifyRemoveOneKey (TerminalDevice->EfiKeyFiFoForNotify, &Key);
- CopyMem (&KeyData.Key, &Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(&KeyData.Key, &Key, sizeof (EFI_INPUT_KEY));
KeyData.KeyState.KeyShiftState = 0;
KeyData.KeyState.KeyToggleState = 0;
//
@@ -841,7 +841,7 @@ EfiKeyFiFoForNotifyInsertOneKey (
return FALSE;
}
- CopyMem (&EfiKeyFiFo->Data[Tail], Input, sizeof (EFI_INPUT_KEY));
+ CopyMem(&EfiKeyFiFo->Data[Tail], Input, sizeof (EFI_INPUT_KEY));
EfiKeyFiFo->Tail = (UINT8) ((Tail + 1) % (FIFO_MAX_NUMBER + 1));
@@ -878,7 +878,7 @@ EfiKeyFiFoForNotifyRemoveOneKey (
return FALSE;
}
- CopyMem (Output, &EfiKeyFiFo->Data[Head], sizeof (EFI_INPUT_KEY));
+ CopyMem(Output, &EfiKeyFiFo->Data[Head], sizeof (EFI_INPUT_KEY));
EfiKeyFiFo->Head = (UINT8) ((Head + 1) % (FIFO_MAX_NUMBER + 1));
@@ -958,7 +958,7 @@ EfiKeyFiFoInsertOneKey (
Tail = TerminalDevice->EfiKeyFiFo->Tail;
- CopyMem (&KeyData.Key, Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(&KeyData.Key, Key, sizeof (EFI_INPUT_KEY));
KeyData.KeyState.KeyShiftState = 0;
KeyData.KeyState.KeyToggleState = 0;
@@ -991,7 +991,7 @@ EfiKeyFiFoInsertOneKey (
return FALSE;
}
- CopyMem (&TerminalDevice->EfiKeyFiFo->Data[Tail], Key, sizeof (EFI_INPUT_KEY));
+ CopyMem(&TerminalDevice->EfiKeyFiFo->Data[Tail], Key, sizeof (EFI_INPUT_KEY));
TerminalDevice->EfiKeyFiFo->Tail = (UINT8) ((Tail + 1) % (FIFO_MAX_NUMBER + 1));
@@ -1028,7 +1028,7 @@ EfiKeyFiFoRemoveOneKey (
return FALSE;
}
- CopyMem (Output, &TerminalDevice->EfiKeyFiFo->Data[Head], sizeof (EFI_INPUT_KEY));
+ CopyMem(Output, &TerminalDevice->EfiKeyFiFo->Data[Head], sizeof (EFI_INPUT_KEY));
TerminalDevice->EfiKeyFiFo->Head = (UINT8) ((Head + 1) % (FIFO_MAX_NUMBER + 1));
diff --git a/MdeModulePkg/Universal/DebugPortDxe/DebugPort.c b/MdeModulePkg/Universal/DebugPortDxe/DebugPort.c
index da18f72ed..0b9e2ab6a 100644
--- a/MdeModulePkg/Universal/DebugPortDxe/DebugPort.c
+++ b/MdeModulePkg/Universal/DebugPortDxe/DebugPort.c
@@ -73,24 +73,24 @@ GetDebugPortVariable (
FreePool(DebugPortVariable);
return NULL;
} else {
- CopyMem (
+ CopyMem(
&mDebugPortDevice.BaudRate,
&((UART_DEVICE_PATH *) DevicePath)->BaudRate,
sizeof (((UART_DEVICE_PATH *) DevicePath)->BaudRate)
);
mDebugPortDevice.ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;
mDebugPortDevice.Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;
- CopyMem (
+ CopyMem(
&mDebugPortDevice.Parity,
&((UART_DEVICE_PATH *) DevicePath)->Parity,
sizeof (((UART_DEVICE_PATH *) DevicePath)->Parity)
);
- CopyMem (
+ CopyMem(
&mDebugPortDevice.DataBits,
&((UART_DEVICE_PATH *) DevicePath)->DataBits,
sizeof (((UART_DEVICE_PATH *) DevicePath)->DataBits)
);
- CopyMem (
+ CopyMem(
&mDebugPortDevice.StopBits,
&((UART_DEVICE_PATH *) DevicePath)->StopBits,
sizeof (((UART_DEVICE_PATH *) DevicePath)->StopBits)
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c
index 2b38800a0..8090b620c 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c
@@ -32,7 +32,7 @@ ReadIdtGateDescriptor (
AsmReadIdtr (&IdtrValue);
IdtTable = (IA32_IDT_GATE_DESCRIPTOR *) IdtrValue.Base;
- CopyMem ((VOID *) IdtGateDescriptor, (VOID *) &(IdtTable)[Vector], sizeof (IA32_IDT_GATE_DESCRIPTOR));
+ CopyMem((VOID *) IdtGateDescriptor, (VOID *) &(IdtTable)[Vector], sizeof (IA32_IDT_GATE_DESCRIPTOR));
}
/**
@@ -54,7 +54,7 @@ WriteIdtGateDescriptor (
AsmReadIdtr (&IdtrValue);
IdtTable = (IA32_IDT_GATE_DESCRIPTOR *) IdtrValue.Base;
- CopyMem ((VOID *) &(IdtTable)[Vector], (VOID *) IdtGateDescriptor, sizeof (IA32_IDT_GATE_DESCRIPTOR));
+ CopyMem((VOID *) &(IdtTable)[Vector], (VOID *) IdtGateDescriptor, sizeof (IA32_IDT_GATE_DESCRIPTOR));
}
/**
@@ -350,7 +350,7 @@ PlInitializeDebugSupportDriver (
//
// Copy Interrupt stub code.
//
- CopyMem ((VOID *)(UINTN)IdtEntryTable[ExceptionType].StubEntry, InterruptEntryStub, StubSize);
+ CopyMem((VOID *)(UINTN)IdtEntryTable[ExceptionType].StubEntry, InterruptEntryStub, StubSize);
}
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c
index 713964f13..98e35059e 100644
--- a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c
+++ b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c
@@ -323,7 +323,7 @@ FindRecoveryCapsules (
OriginalLBA = 16;
while (TRUE) {
- SetMem (Buffer, BufferSize, 0);
+ SetMem(Buffer, BufferSize, 0);
if (BlockIo2Ppi != NULL) {
Status = BlockIo2Ppi->ReadBlocks (
(EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),
@@ -426,7 +426,7 @@ RetrieveCapsuleFileFromRoot (
Buffer = PrivateData->BlockBuffer;
BufferSize = PEI_CD_BLOCK_SIZE;
- SetMem (Buffer, BufferSize, 0);
+ SetMem(Buffer, BufferSize, 0);
if (BlockIo2Ppi != NULL) {
Status = BlockIo2Ppi->ReadBlocks (
@@ -594,7 +594,7 @@ GetRecoveryCapsuleInfo (
PrivateData = PEI_CD_EXPRESS_PRIVATE_DATA_FROM_THIS (This);
*Size = PrivateData->CapsuleData[CapsuleInstance - 1].CapsuleSize;
- CopyMem (
+ CopyMem(
CapsuleType,
&gRecoveryOnDataCdGuid,
sizeof (EFI_GUID)
diff --git a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c
index 73392f9cb..37dba4469 100644
--- a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c
+++ b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c
@@ -417,7 +417,7 @@ DiskIo2OnReadWriteComplete (
if ((Subtask->WorkingBuffer != NULL) && !EFI_ERROR(TransactionStatus) &&
(Task->Token != NULL) && !Subtask->Write
) {
- CopyMem (Subtask->Buffer, Subtask->WorkingBuffer + Subtask->Offset, Subtask->Length);
+ CopyMem(Subtask->Buffer, Subtask->WorkingBuffer + Subtask->Offset, Subtask->Length);
}
DiskIoDestroySubtask (Instance, Subtask);
@@ -881,7 +881,7 @@ DiskIo2ReadWriteDisk (
//
// A sub task before this one should be a block read operation, causing the WorkingBuffer filled with the entire one block data.
//
- CopyMem (Subtask->WorkingBuffer + Subtask->Offset, Subtask->Buffer, Subtask->Length);
+ CopyMem(Subtask->WorkingBuffer + Subtask->Offset, Subtask->Buffer, Subtask->Length);
}
if (SubtaskBlocking) {
@@ -916,7 +916,7 @@ DiskIo2ReadWriteDisk (
(Subtask->WorkingBuffer != NULL) ? Subtask->WorkingBuffer : Subtask->Buffer
);
if (!EFI_ERROR(Status) && (Subtask->WorkingBuffer != NULL)) {
- CopyMem (Subtask->Buffer, Subtask->WorkingBuffer + Subtask->Offset, Subtask->Length);
+ CopyMem(Subtask->Buffer, Subtask->WorkingBuffer + Subtask->Offset, Subtask->Length);
}
} else {
Status = BlockIo2->ReadBlocksEx (
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c
index 22e7daec7..a7456ef89 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c
@@ -392,7 +392,7 @@ PartitionInstallGptChildHandles (
HdDev.SignatureType = SIGNATURE_TYPE_GUID;
HdDev.PartitionStart = Entry->StartingLBA;
HdDev.PartitionSize = Entry->EndingLBA - Entry->StartingLBA + 1;
- CopyMem (HdDev.Signature, &Entry->UniquePartitionGUID, sizeof (EFI_GUID));
+ CopyMem(HdDev.Signature, &Entry->UniquePartitionGUID, sizeof (EFI_GUID));
ZeroMem (&PartitionInfo, sizeof (EFI_PARTITION_INFO_PROTOCOL));
PartitionInfo.Revision = EFI_PARTITION_INFO_PROTOCOL_REVISION;
@@ -400,7 +400,7 @@ PartitionInstallGptChildHandles (
if (CompareGuid (&Entry->PartitionTypeGUID, &gEfiPartTypeSystemPartGuid)) {
PartitionInfo.System = 1;
}
- CopyMem (&PartitionInfo.Info.Gpt, Entry, sizeof (EFI_PARTITION_ENTRY));
+ CopyMem(&PartitionInfo.Info.Gpt, Entry, sizeof (EFI_PARTITION_ENTRY));
DEBUG ((EFI_D_INFO, " Index : %d\n", (UINT32) Index));
DEBUG ((EFI_D_INFO, " Start LBA : %lx\n", (UINT64) HdDev.PartitionStart));
@@ -518,7 +518,7 @@ PartitionValidGptTable (
return FALSE;
}
- CopyMem (PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER));
+ CopyMem(PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER));
if (!PartitionCheckGptEntryArrayCRC (BlockIo, DiskIo, PartHeader)) {
FreePool(PartHdr);
return FALSE;
@@ -632,7 +632,7 @@ PartitionRestoreGptTable (
(PartHeader->LastUsableLBA + 1) : \
(PRIMARY_PART_HEADER_LBA + 1);
- CopyMem (PartHdr, PartHeader, sizeof (EFI_PARTITION_TABLE_HEADER));
+ CopyMem(PartHdr, PartHeader, sizeof (EFI_PARTITION_TABLE_HEADER));
PartHdr->MyLBA = PartHeader->AlternateLBA;
PartHdr->AlternateLBA = PartHeader->MyLBA;
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
index 73a8286ff..f4db9ab18 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
@@ -188,7 +188,7 @@ PartitionInstallMbrChildHandles (
if (DevicePathType (LastDevicePathNode) == MEDIA_DEVICE_PATH &&
DevicePathSubType (LastDevicePathNode) == MEDIA_HARDDRIVE_DP
) {
- CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
+ CopyMem(&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
} else {
LastDevicePathNode = NULL;
}
@@ -226,7 +226,7 @@ PartitionInstallMbrChildHandles (
HdDev.PartitionNumber = Index + 1;
HdDev.PartitionStart = UNPACK_UINT32 (Mbr->Partition[Index].StartingLBA);
HdDev.PartitionSize = UNPACK_UINT32 (Mbr->Partition[Index].SizeInLBA);
- CopyMem (HdDev.Signature, &(Mbr->UniqueMbrSignature[0]), sizeof (Mbr->UniqueMbrSignature));
+ CopyMem(HdDev.Signature, &(Mbr->UniqueMbrSignature[0]), sizeof (Mbr->UniqueMbrSignature));
ZeroMem (&PartitionInfo, sizeof (EFI_PARTITION_INFO_PROTOCOL));
PartitionInfo.Revision = EFI_PARTITION_INFO_PROTOCOL_REVISION;
@@ -234,7 +234,7 @@ PartitionInstallMbrChildHandles (
if (Mbr->Partition[Index].OSIndicator == EFI_PARTITION) {
PartitionInfo.System = 1;
}
- CopyMem (&PartitionInfo.Info.Mbr, &Mbr->Partition[Index], sizeof (MBR_PARTITION_RECORD));
+ CopyMem(&PartitionInfo.Info.Mbr, &Mbr->Partition[Index], sizeof (MBR_PARTITION_RECORD));
Status = PartitionInstallChildHandle (
This,
@@ -306,7 +306,7 @@ PartitionInstallMbrChildHandles (
if (Mbr->Partition[0].OSIndicator == EFI_PARTITION) {
PartitionInfo.System = 1;
}
- CopyMem (&PartitionInfo.Info.Mbr, &Mbr->Partition[0], sizeof (MBR_PARTITION_RECORD));
+ CopyMem(&PartitionInfo.Info.Mbr, &Mbr->Partition[0], sizeof (MBR_PARTITION_RECORD));
Status = PartitionInstallChildHandle (
This,
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
index 53cc5ca89..4607533bd 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
@@ -1156,7 +1156,7 @@ PartitionInstallChildHandle (
Private->BlockIo.Revision = ParentBlockIo->Revision;
Private->BlockIo.Media = &Private->Media;
- CopyMem (Private->BlockIo.Media, ParentBlockIo->Media, sizeof (EFI_BLOCK_IO_MEDIA));
+ CopyMem(Private->BlockIo.Media, ParentBlockIo->Media, sizeof (EFI_BLOCK_IO_MEDIA));
Private->BlockIo.Reset = PartitionReset;
Private->BlockIo.ReadBlocks = PartitionReadBlocks;
@@ -1169,7 +1169,7 @@ PartitionInstallChildHandle (
if (Private->DiskIo2 != NULL) {
ASSERT (Private->ParentBlockIo2 != NULL);
Private->BlockIo2.Media = &Private->Media2;
- CopyMem (Private->BlockIo2.Media, ParentBlockIo2->Media, sizeof (EFI_BLOCK_IO_MEDIA));
+ CopyMem(Private->BlockIo2.Media, ParentBlockIo2->Media, sizeof (EFI_BLOCK_IO_MEDIA));
Private->BlockIo2.Reset = PartitionResetEx;
Private->BlockIo2.ReadBlocksEx = PartitionReadBlocksEx;
@@ -1219,7 +1219,7 @@ PartitionInstallChildHandle (
//
// Set the PartitionInfo into Private Data.
//
- CopyMem (&Private->PartitionInfo, PartitionInfo, sizeof (EFI_PARTITION_INFO_PROTOCOL));
+ CopyMem(&Private->PartitionInfo, PartitionInfo, sizeof (EFI_PARTITION_INFO_PROTOCOL));
if (TypeGuid != NULL) {
CopyGuid(&(Private->TypeGuid), TypeGuid);
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
index ae62f5bbf..43c91d3df 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
@@ -248,7 +248,7 @@ FindAnchorVolumeDescriptorPointer (
//
// Save read AVDP from last block
//
- CopyMem (AnchorPoint, AnchorPointPtr, sizeof (*AnchorPointPtr));
+ CopyMem(AnchorPoint, AnchorPointPtr, sizeof (*AnchorPointPtr));
//
// Set last recorded block number
//
diff --git a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskBlockIo.c b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskBlockIo.c
index 79c0ac858..bde821c20 100644
--- a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskBlockIo.c
+++ b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskBlockIo.c
@@ -54,8 +54,8 @@ RamDiskInitBlockIo (
BlockIo2 = &PrivateData->BlockIo2;
Media = &PrivateData->Media;
- CopyMem (BlockIo, &mRamDiskBlockIoTemplate, sizeof (EFI_BLOCK_IO_PROTOCOL));
- CopyMem (BlockIo2, &mRamDiskBlockIo2Template, sizeof (EFI_BLOCK_IO2_PROTOCOL));
+ CopyMem(BlockIo, &mRamDiskBlockIoTemplate, sizeof (EFI_BLOCK_IO_PROTOCOL));
+ CopyMem(BlockIo2, &mRamDiskBlockIo2Template, sizeof (EFI_BLOCK_IO2_PROTOCOL));
BlockIo->Media = Media;
BlockIo2->Media = Media;
@@ -166,7 +166,7 @@ RamDiskBlkIoReadBlocks (
return EFI_INVALID_PARAMETER;
}
- CopyMem (
+ CopyMem(
Buffer,
(VOID *)(UINTN)(PrivateData->StartingAddr + MultU64x32 (Lba, PrivateData->Media.BlockSize)),
BufferSize
@@ -245,7 +245,7 @@ RamDiskBlkIoWriteBlocks (
return EFI_INVALID_PARAMETER;
}
- CopyMem (
+ CopyMem(
(VOID *)(UINTN)(PrivateData->StartingAddr + MultU64x32 (Lba, PrivateData->Media.BlockSize)),
Buffer,
BufferSize
diff --git a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c
index 7a0fb6e41..eb9aa5631 100644
--- a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c
+++ b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c
@@ -246,7 +246,7 @@ RamDiskPublishNfit (
if (Nfit == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (Nfit, TableHeader, NfitHeader->Length);
+ CopyMem(Nfit, TableHeader, NfitHeader->Length);
//
// Update the NFIT head pointer.
@@ -322,8 +322,8 @@ RamDiskPublishNfit (
NfitHeader->CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);
NfitHeader->CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
CurrentData = PcdGet64 (PcdAcpiDefaultOemTableId);
- CopyMem (NfitHeader->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (NfitHeader->OemId));
- CopyMem (&NfitHeader->OemTableId, &CurrentData, sizeof (UINT64));
+ CopyMem(NfitHeader->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (NfitHeader->OemId));
+ CopyMem(&NfitHeader->OemTableId, &CurrentData, sizeof (UINT64));
}
//
@@ -473,7 +473,7 @@ RamDiskUnpublishNfit (
//
// Get a copy of the old NFIT header content.
//
- CopyMem (NewNfit, TableHeader, sizeof (EFI_ACPI_6_1_NVDIMM_FIRMWARE_INTERFACE_TABLE));
+ CopyMem(NewNfit, TableHeader, sizeof (EFI_ACPI_6_1_NVDIMM_FIRMWARE_INTERFACE_TABLE));
NewNfitHeader = (EFI_ACPI_DESCRIPTION_HEADER *)NewNfit;
NewNfitHeader->Length = NewNfitLen;
NewNfitHeader->Checksum = 0;
@@ -506,7 +506,7 @@ RamDiskUnpublishNfit (
//
// Copy the content of origin NFIT.
//
- CopyMem (NewNfitPtr, NfitStructHeader, NfitStructHeader->Length);
+ CopyMem(NewNfitPtr, NfitStructHeader, NfitStructHeader->Length);
NewNfitPtr = (UINT8 *)NewNfitPtr + NfitStructHeader->Length;
//
diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/File.c b/MdeModulePkg/Universal/Disk/UdfDxe/File.c
index 6408a1792..eb599ddc6 100644
--- a/MdeModulePkg/Universal/Disk/UdfDxe/File.c
+++ b/MdeModulePkg/Universal/Disk/UdfDxe/File.c
@@ -111,7 +111,7 @@ UdfOpenVolume (
PrivFileData->Root = &PrivFsData->Root;
PrivFileData->IsRootDirectory = TRUE;
- CopyMem ((VOID *)&PrivFileData->FileIo, (VOID *)&gUdfFileIoOps,
+ CopyMem((VOID *)&PrivFileData->FileIo, (VOID *)&gUdfFileIoOps,
sizeof (EFI_FILE_PROTOCOL));
*Root = &PrivFileData->FileIo;
@@ -230,9 +230,9 @@ UdfOpen (
goto Error_Alloc_New_Priv_File_Data;
}
- CopyMem ((VOID *)NewPrivFileData, (VOID *)PrivFileData,
+ CopyMem((VOID *)NewPrivFileData, (VOID *)PrivFileData,
sizeof (PRIVATE_UDF_FILE_DATA));
- CopyMem ((VOID *)&NewPrivFileData->File, &File, sizeof (UDF_FILE_INFO));
+ CopyMem((VOID *)&NewPrivFileData->File, &File, sizeof (UDF_FILE_INFO));
NewPrivFileData->IsRootDirectory = FALSE;
diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
index 2b86a575e..f69c3cba4 100644
--- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
+++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
@@ -153,14 +153,14 @@ StartMainVolumeDescriptorSequence (
//
// Save Partition Descriptor
//
- CopyMem (&Volume->PartitionDesc, Buffer, sizeof (Volume->PartitionDesc));
+ CopyMem(&Volume->PartitionDesc, Buffer, sizeof (Volume->PartitionDesc));
break;
case UdfLogicalVolumeDescriptor:
//
// Save Logical Volume Descriptor
//
- CopyMem (&Volume->LogicalVolDesc, Buffer, sizeof (Volume->LogicalVolDesc));
+ CopyMem(&Volume->LogicalVolDesc, Buffer, sizeof (Volume->LogicalVolDesc));
break;
case UdfTerminatingDescriptor:
@@ -1157,14 +1157,14 @@ ReadFile (
//
// Read all inline data into ReadFileInfo->FileData
//
- CopyMem (ReadFileInfo->FileData, Data, (UINTN) Length);
+ CopyMem(ReadFileInfo->FileData, Data, (UINTN) Length);
ReadFileInfo->ReadLength = Length;
} else if (ReadFileInfo->Flags == ReadFileSeekAndRead) {
//
// If FilePosition is non-zero, seek file to FilePosition, read
// FileDataSize bytes and then updates FilePosition.
//
- CopyMem (
+ CopyMem(
ReadFileInfo->FileData,
(VOID *)((UINT8 *)Data + ReadFileInfo->FilePosition),
(UINTN) ReadFileInfo->FileDataSize
@@ -1808,7 +1808,7 @@ FindFile (
Status = EFI_NOT_FOUND;
- CopyMem ((VOID *)&PreviousFile, (VOID *)Parent, sizeof (UDF_FILE_INFO));
+ CopyMem((VOID *)&PreviousFile, (VOID *)Parent, sizeof (UDF_FILE_INFO));
while (*FilePath != L'\0') {
FileNamePointer = FileName;
while (*FilePath != L'\0' && *FilePath != L'\\') {
@@ -1904,7 +1904,7 @@ FindFile (
CleanupFileInformation (&PreviousFile);
}
- CopyMem ((VOID *)&PreviousFile, (VOID *)File, sizeof (UDF_FILE_INFO));
+ CopyMem((VOID *)&PreviousFile, (VOID *)File, sizeof (UDF_FILE_INFO));
if (*FilePath != L'\0' && *FilePath == L'\\') {
FilePath++;
}
@@ -2168,7 +2168,7 @@ ResolveSymlink (
Data = (UINT8 *)ReadFileInfo.FileData;
EndData = Data + Length;
- CopyMem ((VOID *)&PreviousFile, (VOID *)Parent, sizeof (UDF_FILE_INFO));
+ CopyMem((VOID *)&PreviousFile, (VOID *)Parent, sizeof (UDF_FILE_INFO));
for (;;) {
PathComp = (UDF_PATH_COMPONENT *)Data;
@@ -2192,7 +2192,7 @@ ResolveSymlink (
//
// ".." (parent directory). Go to it.
//
- CopyMem ((VOID *)FileName, L"..", 6);
+ CopyMem((VOID *)FileName, L"..", 6);
break;
case 4:
//
@@ -2304,7 +2304,7 @@ ResolveSymlink (
}
if (NotFile) {
- CopyMem ((VOID *)&PreviousFile, (VOID *)File, sizeof (UDF_FILE_INFO));
+ CopyMem((VOID *)&PreviousFile, (VOID *)File, sizeof (UDF_FILE_INFO));
}
}
@@ -2549,7 +2549,7 @@ SetFileInfo (
FileInfo->LastAccessTime.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
FileInfo->LastAccessTime.Daylight = EFI_TIME_ADJUST_DAYLIGHT;
- CopyMem ((VOID *)&FileInfo->ModificationTime,
+ CopyMem((VOID *)&FileInfo->ModificationTime,
(VOID *)&FileInfo->LastAccessTime,
sizeof (EFI_TIME));
diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/Udf.c b/MdeModulePkg/Universal/Disk/UdfDxe/Udf.c
index c054087f9..ffc2b29f8 100644
--- a/MdeModulePkg/Universal/Disk/UdfDxe/Udf.c
+++ b/MdeModulePkg/Universal/Disk/UdfDxe/Udf.c
@@ -179,7 +179,7 @@ UdfDriverBindingStart (
//
// Set up SimpleFs protocol
//
- CopyMem ((VOID *)&PrivFsData->SimpleFs, (VOID *)&gUdfSimpleFsTemplate,
+ CopyMem((VOID *)&PrivFsData->SimpleFs, (VOID *)&gUdfSimpleFsTemplate,
sizeof (EFI_SIMPLE_FILE_SYSTEM_PROTOCOL));
//
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
index 3c3e3499c..e814fb702 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
@@ -579,7 +579,7 @@ GetLineByWidth (
*(*OutputString) = WIDE_CHAR;
}
- CopyMem ((*OutputString) + 1, &InputString[*Index], StrOffset * sizeof(CHAR16));
+ CopyMem((*OutputString) + 1, &InputString[*Index], StrOffset * sizeof(CHAR16));
if (InputString[*Index + StrOffset] == CHAR_SPACE) {
//
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
index f06a9bb64..ea851b1ff 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
@@ -920,7 +920,7 @@ EnterCarriageReturn:
}
UpdateStatusBar (INPUT_ERROR, FALSE);
- CopyMem (&gUserInput->InputValue, &Question->CurrentValue, sizeof (EFI_HII_VALUE));
+ CopyMem(&gUserInput->InputValue, &Question->CurrentValue, sizeof (EFI_HII_VALUE));
QuestionValue = &gUserInput->InputValue;
//
// Store Edit value back to Question
@@ -1437,7 +1437,7 @@ GetSelectionInputPopUp (
if (StrLen (StringPtr) > (PopUpWidth - 1)) {
TempStringPtr = AllocateZeroPool(sizeof (CHAR16) * (PopUpWidth - 1));
ASSERT ( TempStringPtr != NULL );
- CopyMem (TempStringPtr, StringPtr, (sizeof (CHAR16) * (PopUpWidth - 5)));
+ CopyMem(TempStringPtr, StringPtr, (sizeof (CHAR16) * (PopUpWidth - 5)));
FreePool(StringPtr);
StringPtr = TempStringPtr;
StrCatS (StringPtr, PopUpWidth - 1, L"...");
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/Popup.c b/MdeModulePkg/Universal/DisplayEngineDxe/Popup.c
index 2259a5ea4..4812bdccc 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/Popup.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/Popup.c
@@ -391,7 +391,7 @@ ParseMessageString (
if (*OutputString == NULL) {
return 0;
}
- CopyMem ((*OutputString), &InputString[*Index], StrOffset * sizeof(CHAR16));
+ CopyMem((*OutputString), &InputString[*Index], StrOffset * sizeof(CHAR16));
*OutputStrWidth = (GetStringWidth (*OutputString) -2) / 2;
//
@@ -688,7 +688,7 @@ CreatePopup (
gMaxRowWidth = 0;
gMesStrLineNum = 0;
- CopyMem (&SavedConsoleMode, ConOut->Mode, sizeof (SavedConsoleMode));
+ CopyMem(&SavedConsoleMode, ConOut->Mode, sizeof (SavedConsoleMode));
ConOut->EnableCursor (ConOut, FALSE);
ConOut->SetAttribute (ConOut, GetPopupColor ());
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
index 0ac75bb26..266863291 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
@@ -326,7 +326,7 @@ ValueToOption (
ZeroMem (&Value, sizeof (EFI_HII_VALUE));
Value.Type = Option->OptionOpCode->Type;
- CopyMem (&Value.Value, &Option->OptionOpCode->Value, Option->OptionOpCode->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
+ CopyMem(&Value.Value, &Option->OptionOpCode->Value, Option->OptionOpCode->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
if ((CompareHiiValue (&Value, OptionValue, &Result, NULL) == EFI_SUCCESS) && (Result == 0)) {
return Option;
@@ -1177,13 +1177,13 @@ ProcessOptions (
gUserInput->InputValue.Value.u8 = Option->OptionOpCode->Value.u8;
break;
case EFI_IFR_TYPE_NUM_SIZE_16:
- CopyMem (&gUserInput->InputValue.Value.u16, &Option->OptionOpCode->Value.u16, sizeof (UINT16));
+ CopyMem(&gUserInput->InputValue.Value.u16, &Option->OptionOpCode->Value.u16, sizeof (UINT16));
break;
case EFI_IFR_TYPE_NUM_SIZE_32:
- CopyMem (&gUserInput->InputValue.Value.u32, &Option->OptionOpCode->Value.u32, sizeof (UINT32));
+ CopyMem(&gUserInput->InputValue.Value.u32, &Option->OptionOpCode->Value.u32, sizeof (UINT32));
break;
case EFI_IFR_TYPE_NUM_SIZE_64:
- CopyMem (&gUserInput->InputValue.Value.u64, &Option->OptionOpCode->Value.u64, sizeof (UINT64));
+ CopyMem(&gUserInput->InputValue.Value.u64, &Option->OptionOpCode->Value.u64, sizeof (UINT64));
break;
default:
ASSERT (FALSE);
@@ -1253,7 +1253,7 @@ ProcessOptions (
//
PrintFormattedNumber (Question, FormattedNumber, 21 * sizeof (CHAR16));
Number = (UINT16) GetStringWidth (FormattedNumber);
- CopyMem (OptionString[0] + 1, FormattedNumber, Number);
+ CopyMem(OptionString[0] + 1, FormattedNumber, Number);
*(OptionString[0] + Number / 2) = RIGHT_NUMERIC_DELIMITER;
}
@@ -1375,7 +1375,7 @@ ProcessOptions (
if (Question->CurrentValue.BufferLen < BufferSize) {
BufferSize = Question->CurrentValue.BufferLen;
}
- CopyMem (OptionString[0], (CHAR16 *) Question->CurrentValue.Buffer, BufferSize);
+ CopyMem(OptionString[0], (CHAR16 *) Question->CurrentValue.Buffer, BufferSize);
}
}
break;
@@ -1455,7 +1455,7 @@ ProcessHelpString (
GlyphWidth = 1;
Index = 0;
while((StringLen = GetLineByWidth (StringPtr, LineWidth, &GlyphWidth, &Index, &OutputString)) != 0) {
- CopyMem (*FormattedString + CheckedNum * MaxStringLen, OutputString, StringLen * sizeof (CHAR16));
+ CopyMem(*FormattedString + CheckedNum * MaxStringLen, OutputString, StringLen * sizeof (CHAR16));
CheckedNum ++;
FreePool(OutputString);
}
diff --git a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
index 692f93fc3..bf636aa71 100644
--- a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
+++ b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
@@ -576,7 +576,7 @@ DriverHealthManagerGetFormsetId (
//
for (Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER); Offset < ReadUnaligned32 (&HiiPackageList->PackageLength); Offset += PackageHeader.Length) {
Package = ((UINT8 *) HiiPackageList) + Offset;
- CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
if (PackageHeader.Type == EFI_HII_PACKAGE_FORMS) {
//
@@ -595,7 +595,7 @@ DriverHealthManagerGetFormsetId (
ClassGuid = (EFI_GUID *) (OpCodeData + sizeof (EFI_IFR_FORM_SET));
for (Index = 0; Index < NumberOfClassGuid; Index++) {
if (CompareGuid (&gEfiHiiDriverHealthFormsetGuid, &ClassGuid[Index])) {
- CopyMem (FormsetGuid, &((EFI_IFR_FORM_SET *) OpCodeData)->Guid, sizeof (EFI_GUID));
+ CopyMem(FormsetGuid, &((EFI_IFR_FORM_SET *) OpCodeData)->Guid, sizeof (EFI_GUID));
FreePool(HiiPackageList);
return EFI_SUCCESS;
}
@@ -887,10 +887,10 @@ DriverHealthManagerCleanDynamicString (
ASSERT (HiiPackageList != NULL);
HiiPackageList->PackageLength = (UINT32) BufferSize;
- CopyMem (&HiiPackageList->PackageListGuid, &gEfiCallerIdGuid, sizeof (EFI_GUID));
+ CopyMem(&HiiPackageList->PackageListGuid, &gEfiCallerIdGuid, sizeof (EFI_GUID));
PackageHeader = (EFI_HII_PACKAGE_HEADER *) (HiiPackageList + 1);
- CopyMem (PackageHeader, STRING_ARRAY_NAME + sizeof (UINT32), FixedStringSize);
+ CopyMem(PackageHeader, STRING_ARRAY_NAME + sizeof (UINT32), FixedStringSize);
PackageHeader = (EFI_HII_PACKAGE_HEADER *) ((UINT8 *) PackageHeader + PackageHeader->Length);
PackageHeader->Type = EFI_HII_PACKAGE_END;
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
index 41f19072a..cbacb4304 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
+++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
@@ -329,7 +329,7 @@ GetValueOfNumber (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
- CopyMem (Str, TmpPtr, *Len * sizeof (CHAR16));
+ CopyMem(Str, TmpPtr, *Len * sizeof (CHAR16));
*(Str + *Len) = L'\0';
Length = (Length + 1) / 2;
@@ -488,7 +488,7 @@ AppendAltCfgString (
return;
}
Offset = 0;
- CopyMem (
+ CopyMem(
&Offset,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINTN)) ? ((Length + 1) / 2) : sizeof (UINTN)
@@ -509,7 +509,7 @@ AppendAltCfgString (
return;
}
Width = 0;
- CopyMem (
+ CopyMem(
&Width,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINTN)) ? ((Length + 1) / 2) : sizeof (UINTN)
@@ -725,7 +725,7 @@ ExtractConfig (
if ((Value = StrStr (*Results, PrivateData->NameValueName[0])) != NULL) {
Value += StrLen (PrivateData->NameValueName[0]);
ValueStrLen = ((sizeof (PrivateData->Configuration.NameValueVar0) * 2) + 1);
- CopyMem (Value + ValueStrLen, Value, StrSize (Value));
+ CopyMem(Value + ValueStrLen, Value, StrSize (Value));
BackupChar = Value[ValueStrLen];
*Value++ = L'=';
@@ -746,7 +746,7 @@ ExtractConfig (
if ((Value = StrStr (*Results, PrivateData->NameValueName[1])) != NULL) {
Value += StrLen (PrivateData->NameValueName[1]);
ValueStrLen = ((sizeof (PrivateData->Configuration.NameValueVar1) * 2) + 1);
- CopyMem (Value + ValueStrLen, Value, StrSize (Value));
+ CopyMem(Value + ValueStrLen, Value, StrSize (Value));
BackupChar = Value[ValueStrLen];
*Value++ = L'=';
@@ -767,7 +767,7 @@ ExtractConfig (
if ((Value = StrStr (*Results, PrivateData->NameValueName[2])) != NULL) {
Value += StrLen (PrivateData->NameValueName[2]);
ValueStrLen = StrLen (PrivateData->Configuration.NameValueVar2) * 4 + 1;
- CopyMem (Value + ValueStrLen, Value, StrSize (Value));
+ CopyMem(Value + ValueStrLen, Value, StrSize (Value));
*Value++ = L'=';
//
diff --git a/MdeModulePkg/Universal/EbcDxe/AArch64/EbcSupport.c b/MdeModulePkg/Universal/EbcDxe/AArch64/EbcSupport.c
index a9512bd85..f044892de 100644
--- a/MdeModulePkg/Universal/EbcDxe/AArch64/EbcSupport.c
+++ b/MdeModulePkg/Universal/EbcDxe/AArch64/EbcSupport.c
@@ -390,7 +390,7 @@ EbcCreateThunks (
//
// Copy whole thunk instruction buffer template
//
- CopyMem (InstructionBuffer, &mEbcInstructionBufferTemplate,
+ CopyMem(InstructionBuffer, &mEbcInstructionBufferTemplate,
sizeof (EBC_INSTRUCTION_BUFFER));
//
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c
index c392b8646..619ecf4f7 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c
@@ -75,7 +75,7 @@ EdbClearAllBreakpoint (
//
for (Index = 0; (Index < DebuggerPrivate->DebuggerBreakpointCount) && (Index < EFI_DEBUGGER_BREAKPOINT_MAX); Index++) {
if (DebuggerPrivate->DebuggerBreakpointContext[Index].State) {
- CopyMem (
+ CopyMem(
(VOID *)(UINTN)DebuggerPrivate->DebuggerBreakpointContext[Index].BreakpointAddress,
&DebuggerPrivate->DebuggerBreakpointContext[Index].OldInstruction,
sizeof(UINT16)
@@ -118,7 +118,7 @@ EdbSetAllBreakpoint (
Data16 = 0x0300;
for (Index = 0; (Index < DebuggerPrivate->DebuggerBreakpointCount) && (Index < EFI_DEBUGGER_BREAKPOINT_MAX); Index++) {
if (DebuggerPrivate->DebuggerBreakpointContext[Index].State) {
- CopyMem (
+ CopyMem(
(VOID *)(UINTN)DebuggerPrivate->DebuggerBreakpointContext[Index].BreakpointAddress,
&Data16,
sizeof(UINT16)
@@ -131,7 +131,7 @@ EdbSetAllBreakpoint (
// If so, we need to patch memory back to let user see the real memory.
//
if (DebuggerPrivate->DebuggerBreakpointContext[EFI_DEBUGGER_BREAKPOINT_MAX].BreakpointAddress != 0) {
- CopyMem (
+ CopyMem(
(VOID *)(UINTN)DebuggerPrivate->DebuggerBreakpointContext[EFI_DEBUGGER_BREAKPOINT_MAX].BreakpointAddress,
&DebuggerPrivate->DebuggerBreakpointContext[EFI_DEBUGGER_BREAKPOINT_MAX].OldInstruction,
sizeof(UINT16)
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdBreakpoint.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdBreakpoint.c
index b82c43c09..6cde8ec88 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdBreakpoint.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdBreakpoint.c
@@ -116,7 +116,7 @@ DebuggerBreakpointAdd (
DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].BreakpointAddress = Address;
DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].State = TRUE;
DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].OldInstruction = 0;
- CopyMem (
+ CopyMem(
&DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].OldInstruction,
(VOID *)Address,
sizeof(UINT16)
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdMemory.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdMemory.c
index 30b013d2b..31c9582c6 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdMemory.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdMemory.c
@@ -35,19 +35,19 @@ EdbDisplayMemoryUnit (
//
switch (Width) {
case EdbWidthUint8:
- CopyMem (&Data8, (VOID *)Address, sizeof(UINT8));
+ CopyMem(&Data8, (VOID *)Address, sizeof(UINT8));
EDBPrint (L"%02x ", Data8);
return sizeof(UINT8);
case EdbWidthUint16:
- CopyMem (&Data16, (VOID *)Address, sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)Address, sizeof(UINT16));
EDBPrint (L"%04x ", Data16);
return sizeof(UINT16);
case EdbWidthUint32:
- CopyMem (&Data32, (VOID *)Address, sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)Address, sizeof(UINT32));
EDBPrint (L"%08x ", Data32);
return sizeof(UINT32);
case EdbWidthUint64:
- CopyMem (&Data64, (VOID *)Address, sizeof(UINT64));
+ CopyMem(&Data64, (VOID *)Address, sizeof(UINT64));
EDBPrint (L"%016lx ", Data64);
return sizeof(UINT64);
default:
@@ -175,16 +175,16 @@ EdbEnterMemory (
{
switch (Width) {
case EdbWidthUint8:
- CopyMem ((VOID *)Address, Value, sizeof(UINT8));
+ CopyMem((VOID *)Address, Value, sizeof(UINT8));
break;
case EdbWidthUint16:
- CopyMem ((VOID *)Address, Value, sizeof(UINT16));
+ CopyMem((VOID *)Address, Value, sizeof(UINT16));
break;
case EdbWidthUint32:
- CopyMem ((VOID *)Address, Value, sizeof(UINT32));
+ CopyMem((VOID *)Address, Value, sizeof(UINT32));
break;
case EdbWidthUint64:
- CopyMem ((VOID *)Address, Value, sizeof(UINT64));
+ CopyMem((VOID *)Address, Value, sizeof(UINT64));
break;
default:
break;
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c
index 7d933cae7..cafd224da 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c
@@ -198,14 +198,14 @@ EdbDisasmJMP (
InstructionAddress += 2;
if ((Modifiers & OPCODE_M_IMMDATA64) != 0) {
- CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
+ CopyMem(&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
EdbPrintData64 (Data64);
} else {
return 0;
}
} else {
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
EdbPrintRegister1 (Operands);
if ((Operands & OPERAND_M_INDIRECT1) == 0) {
@@ -325,7 +325,7 @@ EdbDisasmCALL (
InstructionAddress += 2;
if ((Modifiers & OPCODE_M_IMMDATA64) != 0) {
- CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
+ CopyMem(&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
Ip = Data64;
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
Result = EdbFindAndPrintSymbol ((UINTN)Ip);
@@ -337,7 +337,7 @@ EdbDisasmCALL (
}
} else {
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
} else {
Data32 = 0;
}
@@ -490,7 +490,7 @@ EdbDisasmCMP (
EdbPrintRegister2 (Operands);
if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
@@ -608,7 +608,7 @@ EdbDisasmUnsignedDataManip (
InstructionAddress += 2;
if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
@@ -706,7 +706,7 @@ EdbDisasmSignedDataManip (
InstructionAddress += 2;
if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
@@ -837,15 +837,15 @@ EdbDisasmMOVxx (
InstructionAddress += 2;
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
} else if ((Opcode <= OPCODE_MOVQD) || (Opcode == OPCODE_MOVND)) {
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
InstructionAddress += 4;
EdbPrintRawIndexData32 (Data32);
} else if (Opcode == OPCODE_MOVQQ) {
- CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
+ CopyMem(&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
InstructionAddress += 8;
EdbPrintRawIndexData64 (Data64);
}
@@ -856,13 +856,13 @@ EdbDisasmMOVxx (
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
EdbPrintRawIndexData16 (Data16);
} else if ((Opcode <= OPCODE_MOVQD) || (Opcode == OPCODE_MOVND)) {
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
EdbPrintRawIndexData32 (Data32);
} else if (Opcode == OPCODE_MOVQQ) {
- CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
+ CopyMem(&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
EdbPrintRawIndexData64 (Data64);
}
}
@@ -920,7 +920,7 @@ EdbDisasmMOVsnw (
InstructionAddress += 2;
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
}
@@ -929,7 +929,7 @@ EdbDisasmMOVsnw (
EdbPrintRegister2 (Operands);
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
@@ -990,7 +990,7 @@ EdbDisasmMOVsnd (
InstructionAddress += 2;
if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
InstructionAddress += 4;
EdbPrintRawIndexData32 (Data32);
}
@@ -999,7 +999,7 @@ EdbDisasmMOVsnd (
EdbPrintRegister2 (Operands);
if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData32 (Data32);
} else {
@@ -1148,7 +1148,7 @@ EdbDisasmPUSH (
InstructionAddress += 2;
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
@@ -1212,7 +1212,7 @@ EdbDisasmPOP (
InstructionAddress += 2;
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
@@ -1316,7 +1316,7 @@ EdbDisasmCMPI (
InstructionAddress += 2;
if ((Operands & OPERAND_M_CMPI_INDEX) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
}
@@ -1324,10 +1324,10 @@ EdbDisasmCMPI (
EdbPrintComma ();
if ((Modifiers & OPCODE_M_CMPI32_DATA) != 0) {
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
EdbPrintDatan (Data32);
} else {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
EdbPrintDatan (Data16);
}
@@ -1382,7 +1382,7 @@ EdbDisasmPUSHn (
InstructionAddress += 2;
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
@@ -1441,7 +1441,7 @@ EdbDisasmPOPn (
InstructionAddress += 2;
if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
@@ -1535,7 +1535,7 @@ EdbDisasmMOVI (
InstructionAddress += 2;
if ((Operands & MOVI_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
}
@@ -1544,15 +1544,15 @@ EdbDisasmMOVI (
switch (Modifiers & MOVI_M_DATAWIDTH) {
case MOVI_DATAWIDTH16:
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
EdbPrintDatan (Data16);
break;
case MOVI_DATAWIDTH32:
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
EdbPrintDatan (Data32);
break;
case MOVI_DATAWIDTH64:
- CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
+ CopyMem(&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
EdbPrintData64n (Data64);
break;
}
@@ -1629,7 +1629,7 @@ EdbDisasmMOVIn (
InstructionAddress += 2;
if ((Operands & MOVI_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
}
@@ -1638,15 +1638,15 @@ EdbDisasmMOVIn (
switch (Modifiers & MOVI_M_DATAWIDTH) {
case MOVI_DATAWIDTH16:
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
EdbPrintRawIndexData16 (Data16);
break;
case MOVI_DATAWIDTH32:
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
EdbPrintRawIndexData32 (Data32);
break;
case MOVI_DATAWIDTH64:
- CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
+ CopyMem(&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
EdbPrintRawIndexData64 (Data64);
break;
}
@@ -1728,7 +1728,7 @@ EdbDisasmMOVREL (
InstructionAddress += 2;
if ((Operands & MOVI_M_IMMDATA) != 0) {
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
}
@@ -1737,21 +1737,21 @@ EdbDisasmMOVREL (
switch (Modifiers & MOVI_M_DATAWIDTH) {
case MOVI_DATAWIDTH16:
- CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
+ CopyMem(&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
Result = EdbFindAndPrintSymbol ((UINTN)(SavedInstructionAddress + Size + (INT16)Data16));
if (Result == 0) {
EdbPrintData16 (Data16);
}
break;
case MOVI_DATAWIDTH32:
- CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
+ CopyMem(&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
Result = EdbFindAndPrintSymbol ((UINTN)(SavedInstructionAddress + Size + (INT32)Data32));
if (Result == 0) {
EdbPrintData32 (Data32);
}
break;
case MOVI_DATAWIDTH64:
- CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
+ CopyMem(&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
if (sizeof(UINTN) == sizeof(UINT64)) {
Result = EdbFindAndPrintSymbol ((UINTN)(SavedInstructionAddress + Size + (INT64)Data64));
} else {
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbHook.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbHook.c
index 2ca628bbe..f2cd8bd5a 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbHook.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbHook.c
@@ -86,7 +86,7 @@ EbcDebuggerPushCallstackParameter (
// Record the new callstack parameter
//
mDebuggerPrivate.CallStackEntry[mDebuggerPrivate.CallStackEntryCount].ParameterAddr = (UINTN)ParameterAddress;
- CopyMem (
+ CopyMem(
mDebuggerPrivate.CallStackEntry[mDebuggerPrivate.CallStackEntryCount].Parameter,
(VOID *)(UINTN)ParameterAddress,
sizeof(mDebuggerPrivate.CallStackEntry[mDebuggerPrivate.CallStackEntryCount].Parameter)
@@ -128,7 +128,7 @@ EbcDebuggerPushCallstackDest (
//
ASSERT (mDebuggerPrivate.CallStackEntry[EFI_DEBUGGER_TRACE_MAX].Type == Type);
for (Index = 0; Index < EFI_DEBUGGER_CALLSTACK_MAX; Index++) {
- CopyMem (&mDebuggerPrivate.CallStackEntry[Index],
+ CopyMem(&mDebuggerPrivate.CallStackEntry[Index],
&mDebuggerPrivate.CallStackEntry[Index + 1],
sizeof (mDebuggerPrivate.CallStackEntry[Index])
);
@@ -620,7 +620,7 @@ EbcDebuggerHookExecuteEnd (
//
// Use FramePtr as checkpoint for StepOut
//
- CopyMem (&Address, (VOID *)((UINTN)VmPtr->FramePtr), sizeof(Address));
+ CopyMem(&Address, (VOID *)((UINTN)VmPtr->FramePtr), sizeof(Address));
EbcDebuggerPushStepEntry (Address, (UINT64)(UINTN)VmPtr->FramePtr, EFI_DEBUG_FLAG_EBC_STEPOUT);
return ;
@@ -670,19 +670,19 @@ EbcDebuggerHookCALLEnd (
//
// Get Old FramePtr
//
- CopyMem (&FramePtr, (VOID *)((UINTN)VmPtr->FramePtr), sizeof(FramePtr));
+ CopyMem(&FramePtr, (VOID *)((UINTN)VmPtr->FramePtr), sizeof(FramePtr));
//
// Use ReturnAddress as checkpoint for StepOver
//
- CopyMem (&Address, (VOID *)(UINTN)VmPtr->Gpr[0], sizeof(Address));
+ CopyMem(&Address, (VOID *)(UINTN)VmPtr->Gpr[0], sizeof(Address));
EbcDebuggerPushStepEntry (Address, FramePtr, EFI_DEBUG_FLAG_EBC_STEPOVER);
//
// Use FramePtr as checkpoint for StepOut
//
Address = 0;
- CopyMem (&Address, (VOID *)(FramePtr), sizeof(UINTN));
+ CopyMem(&Address, (VOID *)(FramePtr), sizeof(UINTN));
EbcDebuggerPushStepEntry (Address, FramePtr, EFI_DEBUG_FLAG_EBC_STEPOUT);
return ;
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
index bae3e29fc..399e071f7 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
@@ -440,7 +440,7 @@ StrDuplicate (
Size = (StrLen(Src) + 1) * sizeof(CHAR16);
Dest = AllocateZeroPool(Size);
if (Dest != NULL) {
- CopyMem (Dest, Src, Size);
+ CopyMem(Dest, Src, Size);
}
return Dest;
}
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c
index 2a40748c6..43c013949 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c
@@ -251,7 +251,7 @@ Input (
return ;
}
- SetMem (InStr, StrLength * sizeof (CHAR16), 0);
+ SetMem(InStr, StrLength * sizeof (CHAR16), 0);
Done = FALSE;
do {
//
@@ -279,7 +279,7 @@ Input (
StrPos -= 1;
Update = StrPos;
Delete = 1;
- CopyMem (InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
+ CopyMem(InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
//
// Adjust the current column and row
@@ -326,7 +326,7 @@ Input (
if (Len != 0) {
Update = StrPos;
Delete = 1;
- CopyMem (InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
+ CopyMem(InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
NeedAdjust = TRUE;
}
@@ -398,7 +398,7 @@ Input (
//
// show history
//
- CopyMem (InStr, mInputBufferHistory, StrLength * sizeof(CHAR16));
+ CopyMem(InStr, mInputBufferHistory, StrLength * sizeof(CHAR16));
StrPos = StrLen (mInputBufferHistory);
Update = 0;
Delete = 0;
@@ -415,7 +415,7 @@ Input (
mBackupSpace[SubIndex] = L' ';
}
EDBPrint (mBackupSpace);
- SetMem (mBackupSpace, (EFI_DEBUG_INPUS_BUFFER_SIZE - (StartColumn - EFI_DEBUG_PROMPT_COLUMN)) * sizeof(CHAR16), 0);
+ SetMem(mBackupSpace, (EFI_DEBUG_INPUS_BUFFER_SIZE - (StartColumn - EFI_DEBUG_PROMPT_COLUMN)) * sizeof(CHAR16), 0);
ConOut->SetCursorPosition (ConOut, StartColumn, Row);
Len = StrPos;
@@ -456,7 +456,7 @@ Input (
mBackupSpace[SubIndex] = L' ';
}
EDBPrint (mBackupSpace);
- SetMem (mBackupSpace, (EFI_DEBUG_INPUS_BUFFER_SIZE - (Column - EFI_DEBUG_PROMPT_COLUMN)) * sizeof(CHAR16), 0);
+ SetMem(mBackupSpace, (EFI_DEBUG_INPUS_BUFFER_SIZE - (Column - EFI_DEBUG_PROMPT_COLUMN)) * sizeof(CHAR16), 0);
ConOut->SetCursorPosition (ConOut, Column, Row);
NeedAdjust = FALSE;
}
@@ -464,7 +464,7 @@ Input (
Len = StrLen (InStr);
if (Delete != 0) {
- SetMem (InStr + Len, Delete * sizeof (CHAR16), 0x00);
+ SetMem(InStr + Len, Delete * sizeof (CHAR16), 0x00);
}
if (StrPos > Len) {
@@ -522,7 +522,7 @@ Input (
SetCursorPosition (ConOut, Column, Row, LineLength, TotalRow, InStr, StrPos, Len);
} while (!Done);
- CopyMem (mInputBufferHistory, InStr, StrLength * sizeof(CHAR16));
+ CopyMem(mInputBufferHistory, InStr, StrLength * sizeof(CHAR16));
//
// Return the data to the caller
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c
index 49d7b131b..662f13823 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c
@@ -631,7 +631,7 @@ EdbUnloadSymbol (
// Remove the matched Object
//
for (Index = ObjectIndex; Index < DebuggerPrivate->DebuggerSymbolContext.ObjectCount - 1; Index++) {
- CopyMem (&Object[Index], &Object[Index + 1], sizeof(EFI_DEBUGGER_SYMBOL_OBJECT));
+ CopyMem(&Object[Index], &Object[Index + 1], sizeof(EFI_DEBUGGER_SYMBOL_OBJECT));
}
ZeroMem (&Object[Index], sizeof(Object[Index]));
@@ -2097,7 +2097,7 @@ EdbPrintSource (
BufferSize = EFI_DEBUG_MAX_PRINT_BUFFER - 3;
}
if (BufferSize != 0) {
- CopyMem (Buffer, FuncStart, BufferSize);
+ CopyMem(Buffer, FuncStart, BufferSize);
}
Buffer[BufferSize] = 0;
EDBPrint (L"%a\n", Buffer);
diff --git a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c
index a25139536..db6253ccb 100644
--- a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c
+++ b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c
@@ -122,7 +122,7 @@ EbcLLCALLEX (
//
// Processor specific code to check whether the callee is a thunk to EBC.
//
- CopyMem (InstructionBuffer, (VOID *)FuncAddr, sizeof(InstructionBuffer));
+ CopyMem(InstructionBuffer, (VOID *)FuncAddr, sizeof(InstructionBuffer));
//
// Fill the signature according to mInstructionBufferTemplate
//
@@ -154,7 +154,7 @@ EbcLLCALLEX (
VmPtr->Gpr[0] -= 8;
VmWriteMem64 (VmPtr, (UINTN) VmPtr->Gpr[0], (UINT64) (UINTN) (VmPtr->Ip + Size));
- CopyMem (&TargetEbcAddr, (UINT8 *)FuncAddr + IndexOfEbcEntrypoint, sizeof(UINTN));
+ CopyMem(&TargetEbcAddr, (UINT8 *)FuncAddr + IndexOfEbcEntrypoint, sizeof(UINTN));
VmPtr->Ip = (VMIP) (UINTN) TargetEbcAddr;
} else {
//
@@ -498,7 +498,7 @@ EbcCreateThunks (
//
// Copy whole thunk instruction buffer template
//
- CopyMem (Ptr, mInstructionBufferTemplate, sizeof(mInstructionBufferTemplate));
+ CopyMem(Ptr, mInstructionBufferTemplate, sizeof(mInstructionBufferTemplate));
//
// Patch EbcEntryPoint and EbcLLEbcInterpret
diff --git a/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c b/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c
index 25ca8dbc4..8ff4a3b67 100644
--- a/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c
+++ b/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c
@@ -455,7 +455,7 @@ EbcCreateThunks (
//
// Copy whole thunk instruction buffer template
//
- CopyMem (Ptr, mInstructionBufferTemplate, sizeof(mInstructionBufferTemplate));
+ CopyMem(Ptr, mInstructionBufferTemplate, sizeof(mInstructionBufferTemplate));
//
// Patch EbcEntryPoint and EbcLLEbcInterpret
@@ -520,7 +520,7 @@ EbcLLCALLEX (
//
// Processor specific code to check whether the callee is a thunk to EBC.
//
- CopyMem (InstructionBuffer, (VOID *)FuncAddr, sizeof(InstructionBuffer));
+ CopyMem(InstructionBuffer, (VOID *)FuncAddr, sizeof(InstructionBuffer));
//
// Fill the signature according to mInstructionBufferTemplate
//
@@ -552,7 +552,7 @@ EbcLLCALLEX (
VmPtr->Gpr[0] -= 8;
VmWriteMem64 (VmPtr, (UINTN) VmPtr->Gpr[0], (UINT64) (UINTN) (VmPtr->Ip + Size));
- CopyMem (&TargetEbcAddr, (UINT8 *)FuncAddr + IndexOfEbcEntrypoint, sizeof(UINTN));
+ CopyMem(&TargetEbcAddr, (UINT8 *)FuncAddr + IndexOfEbcEntrypoint, sizeof(UINTN));
VmPtr->Ip = (VMIP) (UINTN) TargetEbcAddr;
} else {
//
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
index b979263e0..2b29de138 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
@@ -122,7 +122,7 @@ FtwAllocate (
//
FtwHeader->WritesAllocated = FTW_INVALID_STATE;
FtwHeader->Complete = FTW_INVALID_STATE;
- CopyMem (&FtwHeader->CallerId, CallerId, sizeof (EFI_GUID));
+ CopyMem(&FtwHeader->CallerId, CallerId, sizeof (EFI_GUID));
FtwHeader->NumberOfWrites = NumberOfWrites;
FtwHeader->PrivateDataSize = PrivateDataSize;
FtwHeader->HeaderAllocated = FTW_VALID_STATE;
@@ -438,7 +438,7 @@ FtwWrite (
Record->Length = Length;
Record->RelativeOffset = (INT64) (FvbPhysicalAddress + (UINTN) Lba * BlockSize) - (INT64) FtwDevice->SpareAreaAddress;
if (PrivateData != NULL) {
- CopyMem ((Record + 1), PrivateData, (UINTN) Header->PrivateDataSize);
+ CopyMem((Record + 1), PrivateData, (UINTN) Header->PrivateDataSize);
}
MyOffset = (UINT8 *) Record - FtwDevice->FtwWorkSpace;
@@ -484,7 +484,7 @@ FtwWrite (
// Overwrite the updating range data with
// the input buffer content
//
- CopyMem (MyBuffer + Offset, Buffer, Length);
+ CopyMem(MyBuffer + Offset, Buffer, Length);
//
// Try to keep the content of spare block
@@ -864,7 +864,7 @@ FtwGetLastWrite (
//
// Fill all the requested values
//
- CopyMem (CallerId, &Header->CallerId, sizeof (EFI_GUID));
+ CopyMem(CallerId, &Header->CallerId, sizeof (EFI_GUID));
*Lba = Record->Lba;
*Offset = (UINTN) Record->Offset;
*Length = (UINTN) Record->Length;
@@ -876,7 +876,7 @@ FtwGetLastWrite (
Status = EFI_BUFFER_TOO_SMALL;
} else {
*PrivateDataSize = (UINTN) Header->PrivateDataSize;
- CopyMem (PrivateData, Record + 1, *PrivateDataSize);
+ CopyMem(PrivateData, Record + 1, *PrivateDataSize);
Status = EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c
index 7bc21d7b9..47adec786 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c
@@ -298,12 +298,12 @@ FtwWrite (
SmmFtwWriteHeader->Lba = Lba;
SmmFtwWriteHeader->Offset = Offset;
SmmFtwWriteHeader->Length = Length;
- CopyMem (SmmFtwWriteHeader->Data, Buffer, Length);
+ CopyMem(SmmFtwWriteHeader->Data, Buffer, Length);
if (PrivateData == NULL) {
SmmFtwWriteHeader->PrivateDataSize = 0;
} else {
SmmFtwWriteHeader->PrivateDataSize = mPrivateDataSize;
- CopyMem (&SmmFtwWriteHeader->Data[Length], PrivateData, mPrivateDataSize);
+ CopyMem(&SmmFtwWriteHeader->Data[Length], PrivateData, mPrivateDataSize);
}
//
@@ -464,7 +464,7 @@ FtwGetLastWrite (
*Complete = SmmFtwGetLastWriteHeader->Complete;
CopyGuid (CallerId, &SmmFtwGetLastWriteHeader->CallerId);
if (Status == EFI_SUCCESS) {
- CopyMem (PrivateData, SmmFtwGetLastWriteHeader->Data, *PrivateDataSize);
+ CopyMem(PrivateData, SmmFtwGetLastWriteHeader->Data, *PrivateDataSize);
}
} else if (Status == EFI_NOT_FOUND) {
*Complete = SmmFtwGetLastWriteHeader->Complete;
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
index d4f14c013..246d2dbfb 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
@@ -1288,7 +1288,7 @@ InitFtwProtocol (
//
// If both are invalid, then initialize work space.
//
- SetMem (
+ SetMem(
FtwDevice->FtwWorkSpace,
FtwDevice->FtwWorkSpaceSize,
FTW_ERASED_BYTE
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c
index 8b2620a79..9c5b67ea2 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c
@@ -33,7 +33,7 @@ InitializeLocalWorkSpaceHeader (
return;
}
- SetMem (
+ SetMem(
&mWorkingBlockHeader,
sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER),
FTW_ERASED_BYTE
@@ -42,7 +42,7 @@ InitializeLocalWorkSpaceHeader (
//
// Here using gEdkiiWorkingBlockSignatureGuid as the signature.
//
- CopyMem (
+ CopyMem(
&mWorkingBlockHeader.Signature,
&gEdkiiWorkingBlockSignatureGuid,
sizeof (EFI_GUID)
@@ -108,7 +108,7 @@ InitWorkSpaceHeader (
return EFI_INVALID_PARAMETER;
}
- CopyMem (WorkingHeader, &mWorkingBlockHeader, sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER));
+ CopyMem(WorkingHeader, &mWorkingBlockHeader, sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER));
return EFI_SUCCESS;
}
@@ -258,7 +258,7 @@ WorkSpaceRefresh (
//
// Initialize WorkSpace as FTW_ERASED_BYTE
//
- SetMem (
+ SetMem(
FtwDevice->FtwWorkSpace,
FtwDevice->FtwWorkSpaceSize,
FTW_ERASED_BYTE
@@ -410,12 +410,12 @@ FtwReclaimWorkSpace (
//
// Clear the content of buffer that will save the new work space data
//
- SetMem (Ptr, FtwDevice->FtwWorkSpaceSize, FTW_ERASED_BYTE);
+ SetMem(Ptr, FtwDevice->FtwWorkSpaceSize, FTW_ERASED_BYTE);
//
// Copy EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER to buffer
//
- CopyMem (
+ CopyMem(
Ptr,
FtwDevice->FtwWorkSpaceHeader,
sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER)
@@ -431,7 +431,7 @@ FtwReclaimWorkSpace (
);
Header = FtwDevice->FtwLastWriteHeader;
if (!EFI_ERROR(Status) && (Header != NULL) && (Header->Complete != FTW_VALID_STATE) && (Header->HeaderAllocated == FTW_VALID_STATE)) {
- CopyMem (
+ CopyMem(
Ptr + sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER),
FtwDevice->FtwLastWriteHeader,
FTW_WRITE_TOTAL_SIZE (Header->NumberOfWrites, Header->PrivateDataSize)
@@ -439,7 +439,7 @@ FtwReclaimWorkSpace (
}
}
- CopyMem (
+ CopyMem(
FtwDevice->FtwWorkSpace,
Ptr,
FtwDevice->FtwWorkSpaceSize
diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c
index 0b6d732d1..c746decdd 100644
--- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c
+++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c
@@ -306,7 +306,7 @@ FvFsGetFileInfo (
//
// Initialize FileInfo
//
- CopyMem (FileInfo, &FvFileInfo->FileInfo, InfoSize);
+ CopyMem(FileInfo, &FvFileInfo->FileInfo, InfoSize);
*BufferSize = InfoSize;
return EFI_SUCCESS;
@@ -396,7 +396,7 @@ TrimFilePathToAbsolutePath (
TempString += 4;
RemoveLastItemFromPath (Path);
TempSize = StrSize (TempString);
- CopyMem (Path + StrLen (Path), TempString, TempSize);
+ CopyMem(Path + StrLen (Path), TempString, TempSize);
}
if (((TempString = StrStr (Path, L"\\..")) != NULL) && (*(TempString + 3) == CHAR_NULL)) {
@@ -516,7 +516,7 @@ FvSimpleFileSystemOpen (
NewFile->Signature = FVFS_FILE_SIGNATURE;
NewFile->Instance = Instance;
NewFile->FvFileInfo = File->FvFileInfo;
- CopyMem (&NewFile->FileProtocol, &mFileSystemTemplate, sizeof (mFileSystemTemplate));
+ CopyMem(&NewFile->FileProtocol, &mFileSystemTemplate, sizeof (mFileSystemTemplate));
InitializeListHead (&NewFile->Link);
InsertHeadList (&Instance->FileHead, &NewFile->Link);
@@ -581,7 +581,7 @@ FvSimpleFileSystemOpen (
NewFile->Signature = FVFS_FILE_SIGNATURE;
NewFile->Instance = Instance;
NewFile->FvFileInfo = FvFileInfo;
- CopyMem (&NewFile->FileProtocol, &mFileSystemTemplate, sizeof (mFileSystemTemplate));
+ CopyMem(&NewFile->FileProtocol, &mFileSystemTemplate, sizeof (mFileSystemTemplate));
InitializeListHead (&NewFile->Link);
InsertHeadList (&Instance->FileHead, &NewFile->Link);
@@ -706,7 +706,7 @@ FvSimpleFileSystemRead (
*BufferSize = (UINTN)(FileSize - File->Position);
}
- CopyMem (Buffer, (UINT8*)FileBuffer + File->Position, *BufferSize);
+ CopyMem(Buffer, (UINT8*)FileBuffer + File->Position, *BufferSize);
File->Position += *BufferSize;
FreePool(FileBuffer);
@@ -938,7 +938,7 @@ FvSimpleFileSystemGetInfo (
//
FsInfoOut = (EFI_FILE_SYSTEM_INFO *) Buffer;
- CopyMem (FsInfoOut, &mFsInfoTemplate, sizeof (EFI_FILE_SYSTEM_INFO));
+ CopyMem(FsInfoOut, &mFsInfoTemplate, sizeof (EFI_FILE_SYSTEM_INFO));
Status = StrnCpyS ( FsInfoOut->VolumeLabel,
(*BufferSize - OFFSET_OF (EFI_FILE_SYSTEM_INFO, VolumeLabel)) / sizeof (CHAR16),
Instance->VolumeLabel,
diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c
index 5a299dfdc..5e469d088 100644
--- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c
+++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c
@@ -110,7 +110,7 @@ FvSimpleFileSystemOpenVolume (
Instance->Root = Root;
Root->Instance = Instance;
Root->Signature = FVFS_FILE_SIGNATURE;
- CopyMem (&Root->FileProtocol, &mFileSystemTemplate, sizeof (mFileSystemTemplate));
+ CopyMem(&Root->FileProtocol, &mFileSystemTemplate, sizeof (mFileSystemTemplate));
Root->FvFileInfo = AllocateZeroPool(sizeof (FV_FILESYSTEM_FILE_INFO));
if (Root->FvFileInfo == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -185,7 +185,7 @@ FvSimpleFileSystemOpenVolume (
FvFileInfo->Signature = FVFS_FILE_INFO_SIGNATURE;
InitializeListHead (&FvFileInfo->Link);
- CopyMem (&FvFileInfo->NameGuid, &NameGuid, sizeof (EFI_GUID));
+ CopyMem(&FvFileInfo->NameGuid, &NameGuid, sizeof (EFI_GUID));
FvFileInfo->Type = FileType;
//
@@ -457,7 +457,7 @@ FvSimpleFileSystemDriverStart (
Instance->Signature = FVFS_INSTANCE_SIGNATURE;
InitializeListHead (&Instance->FileInfoHead);
InitializeListHead (&Instance->FileHead);
- CopyMem (&Instance->SimpleFs, &mSimpleFsTemplate, sizeof (mSimpleFsTemplate));
+ CopyMem(&Instance->SimpleFs, &mSimpleFsTemplate, sizeof (mSimpleFsTemplate));
Status = gBS->InstallProtocolInterface(
&ControllerHandle,
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
index 7f3f47e11..3d0d89923 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
@@ -733,7 +733,7 @@ GetUnicodeStringTextAndSize (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (*StringDest, StringSrc, StringSize);
+ CopyMem(*StringDest, StringSrc, StringSize);
*BufferSize = StringSize;
return EFI_SUCCESS;
@@ -823,7 +823,7 @@ GetStringIdFromString (
break;
case EFI_HII_SIBT_STRINGS_SCSU:
- CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
StringTextPtr = (UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_SIBT_STRINGS_SCSU_BLOCK) - sizeof (UINT8));
BlockSize += StringTextPtr - BlockHdr;
@@ -839,7 +839,7 @@ GetStringIdFromString (
break;
case EFI_HII_SIBT_STRINGS_SCSU_FONT:
- CopyMem (
+ CopyMem(
&StringCount,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT16)
@@ -902,7 +902,7 @@ GetStringIdFromString (
Offset = sizeof (EFI_HII_SIBT_STRINGS_UCS2_BLOCK) - sizeof (CHAR16);
StringTextPtr = BlockHdr + Offset;
BlockSize += Offset;
- CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
for (Index = 0; Index < StringCount; Index++) {
Status = GetUnicodeStringTextAndSize (StringTextPtr, &StringSize, &String);
if (EFI_ERROR(Status)) {
@@ -923,7 +923,7 @@ GetStringIdFromString (
Offset = sizeof (EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK) - sizeof (CHAR16);
StringTextPtr = BlockHdr + Offset;
BlockSize += Offset;
- CopyMem (
+ CopyMem(
&StringCount,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT16)
@@ -956,13 +956,13 @@ GetStringIdFromString (
break;
case EFI_HII_SIBT_SKIP2:
- CopyMem (&SkipCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&SkipCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
CurrentStringId = (UINT16) (CurrentStringId + SkipCount);
BlockSize += sizeof (EFI_HII_SIBT_SKIP2_BLOCK);
break;
case EFI_HII_SIBT_EXT1:
- CopyMem (
+ CopyMem(
&Length8,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT8)
@@ -971,12 +971,12 @@ GetStringIdFromString (
break;
case EFI_HII_SIBT_EXT2:
- CopyMem (&Ext2, BlockHdr, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
+ CopyMem(&Ext2, BlockHdr, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
BlockSize += Ext2.Length;
break;
case EFI_HII_SIBT_EXT4:
- CopyMem (
+ CopyMem(
&Length32,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT32)
@@ -1099,7 +1099,7 @@ GetNextStringId (
break;
case EFI_HII_SIBT_STRINGS_SCSU:
- CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
StringTextPtr = (UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_SIBT_STRINGS_SCSU_BLOCK) - sizeof (UINT8));
BlockSize += StringTextPtr - BlockHdr;
@@ -1123,7 +1123,7 @@ GetNextStringId (
break;
case EFI_HII_SIBT_STRINGS_SCSU_FONT:
- CopyMem (
+ CopyMem(
&StringCount,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT16)
@@ -1197,7 +1197,7 @@ GetNextStringId (
Offset = sizeof (EFI_HII_SIBT_STRINGS_UCS2_BLOCK) - sizeof (CHAR16);
StringTextPtr = BlockHdr + Offset;
BlockSize += Offset;
- CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
for (Index = 0; Index < StringCount; Index++) {
GetUnicodeStringTextAndSize (StringTextPtr, &StringSize, &String);
@@ -1218,7 +1218,7 @@ GetNextStringId (
Offset = sizeof (EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK) - sizeof (CHAR16);
StringTextPtr = BlockHdr + Offset;
BlockSize += Offset;
- CopyMem (
+ CopyMem(
&StringCount,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT16)
@@ -1250,13 +1250,13 @@ GetNextStringId (
break;
case EFI_HII_SIBT_SKIP2:
- CopyMem (&SkipCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&SkipCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
CurrentStringId = (UINT16) (CurrentStringId + SkipCount);
BlockSize += sizeof (EFI_HII_SIBT_SKIP2_BLOCK);
break;
case EFI_HII_SIBT_EXT1:
- CopyMem (
+ CopyMem(
&Length8,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT8)
@@ -1265,12 +1265,12 @@ GetNextStringId (
break;
case EFI_HII_SIBT_EXT2:
- CopyMem (&Ext2, BlockHdr, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
+ CopyMem(&Ext2, BlockHdr, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
BlockSize += Ext2.Length;
break;
case EFI_HII_SIBT_EXT4:
- CopyMem (
+ CopyMem(
&Length32,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT32)
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 8dd3e8c99..cac9e8aa7 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -491,7 +491,7 @@ GetValueOfNumber (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
- CopyMem (Str, TmpPtr, *Len * sizeof (CHAR16));
+ CopyMem(Str, TmpPtr, *Len * sizeof (CHAR16));
*(Str + *Len) = L'\0';
Length = (Length + 1) / 2;
@@ -1172,7 +1172,7 @@ InsertDefaultValue (
//
// Update the default value array in BlockData.
//
- CopyMem (&DefaultValueArray->Value, &DefaultValueData->Value, sizeof (EFI_IFR_TYPE_VALUE));
+ CopyMem(&DefaultValueArray->Value, &DefaultValueData->Value, sizeof (EFI_IFR_TYPE_VALUE));
DefaultValueArray->Type = DefaultValueData->Type;
DefaultValueArray->Cleaned = DefaultValueData->Cleaned;
}
@@ -1185,7 +1185,7 @@ InsertDefaultValue (
//
DefaultValueArray = AllocateZeroPool(sizeof (IFR_DEFAULT_DATA));
ASSERT (DefaultValueArray != NULL);
- CopyMem (DefaultValueArray, DefaultValueData, sizeof (IFR_DEFAULT_DATA));
+ CopyMem(DefaultValueArray, DefaultValueData, sizeof (IFR_DEFAULT_DATA));
InsertTailList (Link, &DefaultValueArray->Entry);
}
@@ -1708,7 +1708,7 @@ GetVarStoreType (
goto Done;
}
*IsEfiVarstore = TRUE;
- CopyMem (*EfiVarStore, IfrEfiVarStore, IfrOpHdr->Length);
+ CopyMem(*EfiVarStore, IfrEfiVarStore, IfrOpHdr->Length);
}
//
@@ -2409,7 +2409,7 @@ ParseIfrData (
//
// Since default value in bit field was stored as UINT32 type.
//
- CopyMem (&DefaultData.Value.u32, &IfrOneOf->data.u32.MinValue, sizeof (UINT32));
+ CopyMem(&DefaultData.Value.u32, &IfrOneOf->data.u32.MinValue, sizeof (UINT32));
} else {
switch (IfrOneOf->Flags & EFI_IFR_NUMERIC_SIZE) {
case EFI_IFR_NUMERIC_SIZE_1:
@@ -2417,15 +2417,15 @@ ParseIfrData (
break;
case EFI_IFR_NUMERIC_SIZE_2:
- CopyMem (&DefaultData.Value.u16, &IfrOneOf->data.u16.MinValue, sizeof (UINT16));
+ CopyMem(&DefaultData.Value.u16, &IfrOneOf->data.u16.MinValue, sizeof (UINT16));
break;
case EFI_IFR_NUMERIC_SIZE_4:
- CopyMem (&DefaultData.Value.u32, &IfrOneOf->data.u32.MinValue, sizeof (UINT32));
+ CopyMem(&DefaultData.Value.u32, &IfrOneOf->data.u32.MinValue, sizeof (UINT32));
break;
case EFI_IFR_NUMERIC_SIZE_8:
- CopyMem (&DefaultData.Value.u64, &IfrOneOf->data.u64.MinValue, sizeof (UINT64));
+ CopyMem(&DefaultData.Value.u64, &IfrOneOf->data.u64.MinValue, sizeof (UINT64));
break;
default:
@@ -2903,7 +2903,7 @@ ParseIfrData (
// Prepare new DefaultValue
//
DefaultData.Type = DefaultValueFromFlag;
- CopyMem (&DefaultData.Value, &IfrOneOfOption->Value, IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
+ CopyMem(&DefaultData.Value, &IfrOneOfOption->Value, IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
if ((IfrOneOfOption->Flags & EFI_IFR_OPTION_DEFAULT) == EFI_IFR_OPTION_DEFAULT) {
DefaultData.DefaultId = EFI_HII_DEFAULT_CLASS_STANDARD;
InsertDefaultValue (BlockData, &DefaultData);
@@ -2955,7 +2955,7 @@ ParseIfrData (
// Prepare new DefaultValue
//
DefaultData.Type = DefaultValueFromDefault;
- CopyMem (&DefaultData.Value, &IfrOneOfOption->Value, IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
+ CopyMem(&DefaultData.Value, &IfrOneOfOption->Value, IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
for (LinkData = DefaultIdArray->Entry.ForwardLink; LinkData != &DefaultIdArray->Entry; LinkData = LinkData->ForwardLink) {
DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry);
DefaultData.DefaultId = DefaultDataPtr->DefaultId;
@@ -2986,9 +2986,9 @@ ParseIfrData (
DefaultData.Type = DefaultValueFromOpcode;
DefaultData.DefaultId = VarDefaultId;
if (QuestionReferBitField) {
- CopyMem (&DefaultData.Value.u32, &IfrDefault->Value.u32, sizeof (UINT32));
+ CopyMem(&DefaultData.Value.u32, &IfrDefault->Value.u32, sizeof (UINT32));
} else {
- CopyMem (&DefaultData.Value, &IfrDefault->Value, IfrDefault->Header.Length - OFFSET_OF (EFI_IFR_DEFAULT, Value));
+ CopyMem(&DefaultData.Value, &IfrDefault->Value, IfrDefault->Header.Length - OFFSET_OF (EFI_IFR_DEFAULT, Value));
}
// If the value field is expression, set the cleaned flag.
@@ -3156,7 +3156,7 @@ GetBlockElement (
goto Done;
}
Offset = 0;
- CopyMem (
+ CopyMem(
&Offset,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINT16)) ? ((Length + 1) / 2) : sizeof (UINT16)
@@ -3177,7 +3177,7 @@ GetBlockElement (
goto Done;
}
Width = 0;
- CopyMem (
+ CopyMem(
&Width,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINT16)) ? ((Length + 1) / 2) : sizeof (UINT16)
@@ -3952,7 +3952,7 @@ GenerateAltConfigResp (
if (StrSize > Width) {
StrSize = Width;
}
- CopyMem (TmpBuffer, (UINT8 *) DefaultString, StrSize);
+ CopyMem(TmpBuffer, (UINT8 *) DefaultString, StrSize);
}
} else {
TmpBuffer = (UINT8 *) &(DefaultValueData->Value);
@@ -5589,7 +5589,7 @@ HiiBlockToConfig (
goto Exit;
}
Offset = 0;
- CopyMem (
+ CopyMem(
&Offset,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINTN)) ? ((Length + 1) / 2) : sizeof (UINTN)
@@ -5613,7 +5613,7 @@ HiiBlockToConfig (
goto Exit;
}
Width = 0;
- CopyMem (
+ CopyMem(
&Width,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINTN)) ? ((Length + 1) / 2) : sizeof (UINTN)
@@ -5643,7 +5643,7 @@ HiiBlockToConfig (
goto Exit;
}
- CopyMem (Value, (UINT8 *) Block + Offset, Width);
+ CopyMem(Value, (UINT8 *) Block + Offset, Width);
Length = Width * 2 + 1;
ValueStr = (EFI_STRING) AllocateZeroPool(Length * sizeof (CHAR16));
@@ -5678,7 +5678,7 @@ HiiBlockToConfig (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
- CopyMem (ConfigElement, TmpPtr, (StringPtr - TmpPtr + 1) * sizeof (CHAR16));
+ CopyMem(ConfigElement, TmpPtr, (StringPtr - TmpPtr + 1) * sizeof (CHAR16));
if (*StringPtr == 0) {
*(ConfigElement + (StringPtr - TmpPtr)) = L'&';
}
@@ -5865,7 +5865,7 @@ HiiConfigToBlock (
goto Exit;
}
Offset = 0;
- CopyMem (
+ CopyMem(
&Offset,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINTN)) ? ((Length + 1) / 2) : sizeof (UINTN)
@@ -5889,7 +5889,7 @@ HiiConfigToBlock (
goto Exit;
}
Width = 0;
- CopyMem (
+ CopyMem(
&Width,
TmpBuffer,
(((Length + 1) / 2) < sizeof (UINTN)) ? ((Length + 1) / 2) : sizeof (UINTN)
@@ -5924,7 +5924,7 @@ HiiConfigToBlock (
// Update the Block with configuration info
//
if ((Block != NULL) && (Offset + Width <= BufferSize)) {
- CopyMem (Block + Offset, Value, Width);
+ CopyMem(Block + Offset, Value, Width);
}
if (Offset + Width > MaxBlockSize) {
MaxBlockSize = Offset + Width;
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
index d5f8c5a67..501f005e5 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
@@ -202,12 +202,12 @@ InvokeRegisteredFunction (
BufferSize = ((HII_IFR_PACKAGE_INSTANCE *) PackageInstance)->FormPkgHdr.Length;
Buffer = (UINT8 *) AllocateZeroPool(BufferSize);
ASSERT (Buffer != NULL);
- CopyMem (
+ CopyMem(
Buffer,
&((HII_IFR_PACKAGE_INSTANCE *) PackageInstance)->FormPkgHdr,
sizeof (EFI_HII_PACKAGE_HEADER)
);
- CopyMem (
+ CopyMem(
Buffer + sizeof (EFI_HII_PACKAGE_HEADER),
((HII_IFR_PACKAGE_INSTANCE *) PackageInstance)->IfrData,
BufferSize - sizeof (EFI_HII_PACKAGE_HEADER)
@@ -224,12 +224,12 @@ InvokeRegisteredFunction (
HeaderSize = ((HII_STRING_PACKAGE_INSTANCE *) PackageInstance)->StringPkgHdr->HdrSize;
Buffer = (UINT8 *) AllocateZeroPool(BufferSize);
ASSERT (Buffer != NULL);
- CopyMem (
+ CopyMem(
Buffer,
((HII_STRING_PACKAGE_INSTANCE *) PackageInstance)->StringPkgHdr,
HeaderSize
);
- CopyMem (
+ CopyMem(
Buffer + HeaderSize,
((HII_STRING_PACKAGE_INSTANCE *) PackageInstance)->StringBlock,
BufferSize - HeaderSize
@@ -242,12 +242,12 @@ InvokeRegisteredFunction (
HeaderSize = ((HII_FONT_PACKAGE_INSTANCE *) PackageInstance)->FontPkgHdr->HdrSize;
Buffer = (UINT8 *) AllocateZeroPool(BufferSize);
ASSERT (Buffer != NULL);
- CopyMem (
+ CopyMem(
Buffer,
((HII_FONT_PACKAGE_INSTANCE *) PackageInstance)->FontPkgHdr,
HeaderSize
);
- CopyMem (
+ CopyMem(
Buffer + HeaderSize,
((HII_FONT_PACKAGE_INSTANCE *) PackageInstance)->GlyphBlock,
BufferSize - HeaderSize
@@ -261,12 +261,12 @@ InvokeRegisteredFunction (
Buffer = (UINT8 *) AllocateZeroPool(BufferSize);
ASSERT (Buffer != NULL);
- CopyMem (
+ CopyMem(
Buffer,
&((HII_IMAGE_PACKAGE_INSTANCE *) PackageInstance)->ImagePkgHdr,
HeaderSize
);
- CopyMem (
+ CopyMem(
Buffer + sizeof (EFI_HII_PACKAGE_HEADER),
&HeaderSize,
sizeof (UINT32)
@@ -274,7 +274,7 @@ InvokeRegisteredFunction (
ImageBlockSize = ((HII_IMAGE_PACKAGE_INSTANCE *) PackageInstance)->ImageBlockSize;
if (ImageBlockSize != 0) {
- CopyMem (
+ CopyMem(
Buffer + HeaderSize,
((HII_IMAGE_PACKAGE_INSTANCE *) PackageInstance)->ImageBlock,
ImageBlockSize
@@ -283,13 +283,13 @@ InvokeRegisteredFunction (
PaletteInfoSize = ((HII_IMAGE_PACKAGE_INSTANCE *) PackageInstance)->PaletteInfoSize;
if (PaletteInfoSize != 0) {
- CopyMem (
+ CopyMem(
Buffer + HeaderSize + ImageBlockSize,
((HII_IMAGE_PACKAGE_INSTANCE *) PackageInstance)->PaletteBlock,
PaletteInfoSize
);
HeaderSize += ImageBlockSize;
- CopyMem (
+ CopyMem(
Buffer + sizeof (EFI_HII_PACKAGE_HEADER) + sizeof (UINT32),
&HeaderSize,
sizeof (UINT32)
@@ -302,7 +302,7 @@ InvokeRegisteredFunction (
BufferSize = ((HII_SIMPLE_FONT_PACKAGE_INSTANCE *) PackageInstance)->SimpleFontPkgHdr->Header.Length;
Buffer = (UINT8 *) AllocateZeroPool(BufferSize);
ASSERT (Buffer != NULL);
- CopyMem (
+ CopyMem(
Buffer,
((HII_SIMPLE_FONT_PACKAGE_INSTANCE *) PackageInstance)->SimpleFontPkgHdr,
BufferSize
@@ -383,7 +383,7 @@ InsertGuidPackage (
return EFI_INVALID_PARAMETER;
}
- CopyMem (&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
//
// Create a GUID package node
@@ -399,7 +399,7 @@ InsertGuidPackage (
}
GuidPackage->Signature = HII_GUID_PACKAGE_SIGNATURE;
- CopyMem (GuidPackage->GuidPkg, PackageHdr, PackageHeader.Length);
+ CopyMem(GuidPackage->GuidPkg, PackageHdr, PackageHeader.Length);
InsertTailList (&PackageList->GuidPkgHdr, &GuidPackage->GuidEntry);
*Package = GuidPackage;
@@ -458,7 +458,7 @@ ExportGuidPackages (
for (Link = PackageList->GuidPkgHdr.ForwardLink; Link != &PackageList->GuidPkgHdr; Link = Link->ForwardLink) {
GuidPackage = CR (Link, HII_GUID_PACKAGE_INSTANCE, GuidEntry, HII_GUID_PACKAGE_SIGNATURE);
- CopyMem (&PackageHeader, GuidPackage->GuidPkg, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, GuidPackage->GuidPkg, sizeof (EFI_HII_PACKAGE_HEADER));
PackageLength += PackageHeader.Length;
if (PackageLength + *ResultSize + UsedSize <= BufferSize) {
Status = InvokeRegisteredFunction (
@@ -469,7 +469,7 @@ ExportGuidPackages (
Handle
);
ASSERT_EFI_ERROR(Status);
- CopyMem (Buffer, GuidPackage->GuidPkg, PackageHeader.Length);
+ CopyMem(Buffer, GuidPackage->GuidPkg, PackageHeader.Length);
Buffer = (UINT8 *) Buffer + PackageHeader.Length;
}
}
@@ -526,7 +526,7 @@ RemoveGuidPackages (
}
RemoveEntryList (&Package->GuidEntry);
- CopyMem (&PackageHeader, Package->GuidPkg, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package->GuidPkg, sizeof (EFI_HII_PACKAGE_HEADER));
PackageList->PackageListHdr.PackageLength -= PackageHeader.Length;
FreePool(Package->GuidPkg);
FreePool(Package);
@@ -670,7 +670,7 @@ FindQuestionDefaultSetting (
NvStoreBuffer = (VARIABLE_STORE_HEADER *) ((UINT8 *) DataHeader + sizeof (DataHeader->DataSize) + DataHeader->HeaderSize);
VariableStorage = AllocatePool (NvStoreBuffer->Size);
ASSERT (VariableStorage != NULL);
- CopyMem (VariableStorage, NvStoreBuffer, NvStoreBuffer->Size);
+ CopyMem(VariableStorage, NvStoreBuffer, NvStoreBuffer->Size);
//
// Find the matched SkuId and DefaultId in the first section
@@ -763,11 +763,11 @@ FindQuestionDefaultSetting (
//
if (ValueBuffer != NULL) {
if (BitFieldQuestion) {
- CopyMem (&BufferValue, (UINT8 *) VariableHeader + sizeof (VARIABLE_HEADER) + VariableHeader->NameSize + ByteOffset, Width);
+ CopyMem(&BufferValue, (UINT8 *) VariableHeader + sizeof (VARIABLE_HEADER) + VariableHeader->NameSize + ByteOffset, Width);
BitFieldVal = BitFieldRead32 (BufferValue, StartBit, EndBit);
- CopyMem (ValueBuffer, &BitFieldVal, Width);
+ CopyMem(ValueBuffer, &BitFieldVal, Width);
} else {
- CopyMem (ValueBuffer, (UINT8 *) VariableHeader + sizeof (VARIABLE_HEADER) + VariableHeader->NameSize + IfrQuestionHdr->VarStoreInfo.VarOffset, Width);
+ CopyMem(ValueBuffer, (UINT8 *) VariableHeader + sizeof (VARIABLE_HEADER) + VariableHeader->NameSize + IfrQuestionHdr->VarStoreInfo.VarOffset, Width);
}
}
@@ -861,7 +861,7 @@ UpdateDefaultSettingInFormPackage (
if (EfiVarStoreList [EfiVarStoreNumber] == NULL) {
break;
}
- CopyMem (EfiVarStoreList [EfiVarStoreNumber], IfrEfiVarStore, IfrEfiVarStore->Header.Length);
+ CopyMem(EfiVarStoreList [EfiVarStoreNumber], IfrEfiVarStore, IfrEfiVarStore->Header.Length);
AsciiStrToUnicodeStrS ((CHAR8 *)IfrEfiVarStore->Name, (CHAR16 *) &(EfiVarStoreList [EfiVarStoreNumber]->Name[0]), AsciiStrSize ((CHAR8 *)IfrEfiVarStore->Name) * sizeof (CHAR16));
Status = FindQuestionDefaultSetting (EFI_HII_DEFAULT_CLASS_STANDARD, EfiVarStoreList[EfiVarStoreNumber], &VarStoreQuestionHeader, NULL, IfrEfiVarStore->Size, FALSE);
if (!EFI_ERROR(Status)) {
@@ -1093,7 +1093,7 @@ InsertFormPackage (
//
// Get the length of the package, including package header itself
//
- CopyMem (&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
//
// Create a Form package node
@@ -1113,12 +1113,12 @@ InsertFormPackage (
//
// Copy Package Header
//
- CopyMem (&FormPackage->FormPkgHdr, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&FormPackage->FormPkgHdr, &PackageHeader, sizeof (EFI_HII_PACKAGE_HEADER));
//
// Copy Ifr contents
//
- CopyMem (
+ CopyMem(
FormPackage->IfrData,
(UINT8 *) PackageHdr + sizeof (EFI_HII_PACKAGE_HEADER),
PackageHeader.Length - sizeof (EFI_HII_PACKAGE_HEADER)
@@ -1204,9 +1204,9 @@ ExportFormPackages (
//
// Copy the Form package content.
//
- CopyMem (Buffer, (VOID *) (&FormPackage->FormPkgHdr), sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(Buffer, (VOID *) (&FormPackage->FormPkgHdr), sizeof (EFI_HII_PACKAGE_HEADER));
Buffer = (UINT8 *) Buffer + sizeof (EFI_HII_PACKAGE_HEADER);
- CopyMem (
+ CopyMem(
Buffer,
(VOID *) FormPackage->IfrData,
FormPackage->FormPkgHdr.Length - sizeof (EFI_HII_PACKAGE_HEADER)
@@ -1332,8 +1332,8 @@ InsertStringPackage (
return EFI_INVALID_PARAMETER;
}
- CopyMem (&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
- CopyMem (&HeaderSize, (UINT8 *) PackageHdr + sizeof (EFI_HII_PACKAGE_HEADER), sizeof (UINT32));
+ CopyMem(&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&HeaderSize, (UINT8 *) PackageHdr + sizeof (EFI_HII_PACKAGE_HEADER), sizeof (UINT32));
//
// It is illegal to have two string packages with same language within one packagelist
@@ -1382,12 +1382,12 @@ InsertStringPackage (
//
// Copy the String package header.
//
- CopyMem (StringPackage->StringPkgHdr, PackageHdr, HeaderSize);
+ CopyMem(StringPackage->StringPkgHdr, PackageHdr, HeaderSize);
//
// Copy the String blocks
//
- CopyMem (
+ CopyMem(
StringPackage->StringBlock,
(UINT8 *) PackageHdr + HeaderSize,
PackageHeader.Length - HeaderSize
@@ -1482,13 +1482,13 @@ AdjustStringPackage (
//
// Copy original string blocks, except the EFI_HII_SIBT_END.
//
- CopyMem (StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
+ CopyMem(StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
//
// Create SKIP2 EFI_HII_SIBT_SKIP2_BLOCK blocks
//
BlockPtr = StringBlock + OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK);
*BlockPtr = EFI_HII_SIBT_SKIP2;
- CopyMem (BlockPtr + 1, &SkipCount, sizeof (UINT16));
+ CopyMem(BlockPtr + 1, &SkipCount, sizeof (UINT16));
BlockPtr += sizeof (EFI_HII_SIBT_SKIP2_BLOCK);
//
@@ -1568,13 +1568,13 @@ ExportStringPackages (
//
// Copy String package header
//
- CopyMem (Buffer, StringPackage->StringPkgHdr, StringPackage->StringPkgHdr->HdrSize);
+ CopyMem(Buffer, StringPackage->StringPkgHdr, StringPackage->StringPkgHdr->HdrSize);
Buffer = (UINT8 *) Buffer + StringPackage->StringPkgHdr->HdrSize;
//
// Copy String blocks information
//
- CopyMem (
+ CopyMem(
Buffer,
StringPackage->StringBlock,
StringPackage->StringPkgHdr->Header.Length - StringPackage->StringPkgHdr->HdrSize
@@ -1701,8 +1701,8 @@ InsertFontPackage (
return EFI_INVALID_PARAMETER;
}
- CopyMem (&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
- CopyMem (&HeaderSize, (UINT8 *) PackageHdr + sizeof (EFI_HII_PACKAGE_HEADER), sizeof (UINT32));
+ CopyMem(&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&HeaderSize, (UINT8 *) PackageHdr + sizeof (EFI_HII_PACKAGE_HEADER), sizeof (UINT32));
FontInfo = NULL;
FontPackage = NULL;
@@ -1718,7 +1718,7 @@ InsertFontPackage (
Status = EFI_OUT_OF_RESOURCES;
goto Error;
}
- CopyMem (FontPkgHdr, PackageHdr, HeaderSize);
+ CopyMem(FontPkgHdr, PackageHdr, HeaderSize);
FontInfoSize = sizeof (EFI_FONT_INFO) + HeaderSize - sizeof (EFI_HII_FONT_PACKAGE_HDR);
FontInfo = (EFI_FONT_INFO *) AllocateZeroPool(FontInfoSize);
@@ -1752,7 +1752,7 @@ InsertFontPackage (
Status = EFI_OUT_OF_RESOURCES;
goto Error;
}
- CopyMem (FontPackage->GlyphBlock, (UINT8 *) PackageHdr + HeaderSize, PackageHeader.Length - HeaderSize);
+ CopyMem(FontPackage->GlyphBlock, (UINT8 *) PackageHdr + HeaderSize, PackageHeader.Length - HeaderSize);
//
// Collect all default character cell information and backup in GlyphInfoList.
@@ -1875,13 +1875,13 @@ ExportFontPackages (
//
// Copy Font package header
//
- CopyMem (Buffer, Package->FontPkgHdr, Package->FontPkgHdr->HdrSize);
+ CopyMem(Buffer, Package->FontPkgHdr, Package->FontPkgHdr->HdrSize);
Buffer = (UINT8 *) Buffer + Package->FontPkgHdr->HdrSize;
//
// Copy Glyph blocks information
//
- CopyMem (
+ CopyMem(
Buffer,
Package->GlyphBlock,
Package->FontPkgHdr->Header.Length - Package->FontPkgHdr->HdrSize
@@ -2041,7 +2041,7 @@ InsertImagePackage (
//
// Copy the Image package header.
//
- CopyMem (&ImagePackage->ImagePkgHdr, PackageHdr, sizeof (EFI_HII_IMAGE_PACKAGE_HDR));
+ CopyMem(&ImagePackage->ImagePkgHdr, PackageHdr, sizeof (EFI_HII_IMAGE_PACKAGE_HDR));
PaletteInfoOffset = ImagePackage->ImagePkgHdr.PaletteInfoOffset;
ImageInfoOffset = ImagePackage->ImagePkgHdr.ImageInfoOffset;
@@ -2057,7 +2057,7 @@ InsertImagePackage (
PaletteInfo = (EFI_HII_IMAGE_PALETTE_INFO *) ((UINT8 *) PaletteHdr + PaletteSize);
for (Index = 0; Index < PaletteHdr->PaletteCount; Index++) {
- CopyMem (&CurrentSize, PaletteInfo, sizeof (UINT16));
+ CopyMem(&CurrentSize, PaletteInfo, sizeof (UINT16));
CurrentSize += sizeof (UINT16);
PaletteSize += (UINT32) CurrentSize;
PaletteInfo = (EFI_HII_IMAGE_PALETTE_INFO *) ((UINT8 *) PaletteInfo + CurrentSize);
@@ -2068,7 +2068,7 @@ InsertImagePackage (
FreePool(ImagePackage);
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (
+ CopyMem(
ImagePackage->PaletteBlock,
(UINT8 *) PackageHdr + PaletteInfoOffset,
PaletteSize
@@ -2089,7 +2089,7 @@ InsertImagePackage (
FreePool(ImagePackage);
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (
+ CopyMem(
ImagePackage->ImageBlock,
(UINT8 *) PackageHdr + ImageInfoOffset,
ImageSize
@@ -2176,21 +2176,21 @@ ExportImagePackages (
// Copy Image package header,
// then justify the offset for image info and palette info in the header.
//
- CopyMem (Buffer, &Package->ImagePkgHdr, sizeof (EFI_HII_IMAGE_PACKAGE_HDR));
+ CopyMem(Buffer, &Package->ImagePkgHdr, sizeof (EFI_HII_IMAGE_PACKAGE_HDR));
Buffer = (UINT8 *) Buffer + sizeof (EFI_HII_IMAGE_PACKAGE_HDR);
//
// Copy Image blocks information
//
if (Package->ImageBlockSize != 0) {
- CopyMem (Buffer, Package->ImageBlock, Package->ImageBlockSize);
+ CopyMem(Buffer, Package->ImageBlock, Package->ImageBlockSize);
Buffer = (UINT8 *) Buffer + Package->ImageBlockSize;
}
//
// Copy Palette information
//
if (Package->PaletteInfoSize != 0) {
- CopyMem (Buffer, Package->PaletteBlock, Package->PaletteInfoSize);
+ CopyMem(Buffer, Package->PaletteBlock, Package->PaletteInfoSize);
Buffer = (UINT8 *) Buffer + Package->PaletteInfoSize;
}
}
@@ -2304,7 +2304,7 @@ InsertSimpleFontPackage (
//
// Copy the Simple Font package.
//
- CopyMem (&Header, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&Header, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
SimpleFontPackage->SimpleFontPkgHdr = AllocateZeroPool(Header.Length);
if (SimpleFontPackage->SimpleFontPkgHdr == NULL) {
@@ -2312,7 +2312,7 @@ InsertSimpleFontPackage (
goto Error;
}
- CopyMem (SimpleFontPackage->SimpleFontPkgHdr, PackageHdr, Header.Length);
+ CopyMem(SimpleFontPackage->SimpleFontPkgHdr, PackageHdr, Header.Length);
//
// Insert to Simple Font package array
@@ -2401,7 +2401,7 @@ ExportSimpleFontPackages (
//
// Copy SimpleFont package
//
- CopyMem (Buffer, Package->SimpleFontPkgHdr, Package->SimpleFontPkgHdr->Header.Length);
+ CopyMem(Buffer, Package->SimpleFontPkgHdr, Package->SimpleFontPkgHdr->Header.Length);
Buffer = (UINT8 *) Buffer + Package->SimpleFontPkgHdr->Header.Length;
}
}
@@ -2510,8 +2510,8 @@ InsertDevicePathPackage (
Header.Length = PackageLength;
Header.Type = EFI_HII_PACKAGE_DEVICE_PATH;
- CopyMem (PackageList->DevicePathPkg, &Header, sizeof (EFI_HII_PACKAGE_HEADER));
- CopyMem (
+ CopyMem(PackageList->DevicePathPkg, &Header, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(
PackageList->DevicePathPkg + sizeof (EFI_HII_PACKAGE_HEADER),
DevicePath,
PackageLength - sizeof (EFI_HII_PACKAGE_HEADER)
@@ -2571,7 +2571,7 @@ ExportDevicePathPackage (
return EFI_SUCCESS;
}
- CopyMem (&Header, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&Header, Package, sizeof (EFI_HII_PACKAGE_HEADER));
if (Header.Length + *ResultSize + UsedSize <= BufferSize) {
//
@@ -2589,7 +2589,7 @@ ExportDevicePathPackage (
//
// Copy Device path package
//
- CopyMem (Buffer, Package, Header.Length);
+ CopyMem(Buffer, Package, Header.Length);
}
*ResultSize += Header.Length;
@@ -2641,7 +2641,7 @@ RemoveDevicePathPackage (
return Status;
}
- CopyMem (&Header, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&Header, Package, sizeof (EFI_HII_PACKAGE_HEADER));
PackageList->PackageListHdr.PackageLength -= Header.Length;
FreePool(Package);
@@ -2742,7 +2742,7 @@ InsertKeyboardLayoutPackage (
return EFI_INVALID_PARAMETER;
}
- CopyMem (&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, PackageHdr, sizeof (EFI_HII_PACKAGE_HEADER));
//
// Create a Keyboard Layout package node
@@ -2760,7 +2760,7 @@ InsertKeyboardLayoutPackage (
goto Error;
}
- CopyMem (KeyboardLayoutPackage->KeyboardPkg, PackageHdr, PackageHeader.Length);
+ CopyMem(KeyboardLayoutPackage->KeyboardPkg, PackageHdr, PackageHeader.Length);
InsertTailList (&PackageList->KeyboardLayoutHdr, &KeyboardLayoutPackage->KeyboardEntry);
*Package = KeyboardLayoutPackage;
@@ -2833,7 +2833,7 @@ ExportKeyboardLayoutPackages (
for (Link = PackageList->KeyboardLayoutHdr.ForwardLink; Link != &PackageList->KeyboardLayoutHdr; Link = Link->ForwardLink) {
Package = CR (Link, HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE, KeyboardEntry, HII_KB_LAYOUT_PACKAGE_SIGNATURE);
- CopyMem (&PackageHeader, Package->KeyboardPkg, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package->KeyboardPkg, sizeof (EFI_HII_PACKAGE_HEADER));
PackageLength += PackageHeader.Length;
if (PackageLength + *ResultSize + UsedSize <= BufferSize) {
//
@@ -2851,7 +2851,7 @@ ExportKeyboardLayoutPackages (
//
// Copy Keyboard Layout package
//
- CopyMem (Buffer, Package->KeyboardPkg, PackageHeader.Length);
+ CopyMem(Buffer, Package->KeyboardPkg, PackageHeader.Length);
Buffer = (UINT8 *) Buffer + PackageHeader.Length;
}
}
@@ -2909,7 +2909,7 @@ RemoveKeyboardLayoutPackages (
}
RemoveEntryList (&Package->KeyboardEntry);
- CopyMem (&PackageHeader, Package->KeyboardPkg, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package->KeyboardPkg, sizeof (EFI_HII_PACKAGE_HEADER));
PackageList->PackageListHdr.PackageLength -= PackageHeader.Length;
FreePool(Package->KeyboardPkg);
FreePool(Package);
@@ -2976,7 +2976,7 @@ AddPackages (
// Process the package list header
//
OldPackageListLen = DatabaseRecord->PackageList->PackageListHdr.PackageLength;
- CopyMem (
+ CopyMem(
&DatabaseRecord->PackageList->PackageListHdr,
(VOID *) PackageList,
sizeof (EFI_HII_PACKAGE_LIST_HEADER)
@@ -2986,7 +2986,7 @@ AddPackages (
}
PackageHdrPtr = (EFI_HII_PACKAGE_HEADER *) ((UINT8 *) PackageList + sizeof (EFI_HII_PACKAGE_LIST_HEADER));
- CopyMem (&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
Status = EFI_SUCCESS;
@@ -3151,7 +3151,7 @@ AddPackages (
// goto header of next package
//
PackageHdrPtr = (EFI_HII_PACKAGE_HEADER *) ((UINT8 *) PackageHdrPtr + PackageHeader.Length);
- CopyMem (&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
}
//
@@ -3212,7 +3212,7 @@ ExportPackageList (
//
ResultSize = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
if (ResultSize + *UsedSize <= BufferSize) {
- CopyMem ((VOID *) Buffer, PackageList, ResultSize);
+ CopyMem((VOID *) Buffer, PackageList, ResultSize);
}
//
// Copy the packages and invoke EXPORT_PACK notify functions if exists.
@@ -3319,7 +3319,7 @@ ExportPackageList (
EndofPackageList.Length = sizeof (EFI_HII_PACKAGE_HEADER);
EndofPackageList.Type = EFI_HII_PACKAGE_END;
if (ResultSize + *UsedSize + sizeof (EFI_HII_PACKAGE_HEADER) <= BufferSize) {
- CopyMem (
+ CopyMem(
(VOID *) ((UINT8 *) Buffer + ResultSize),
(VOID *) &EndofPackageList,
sizeof (EFI_HII_PACKAGE_HEADER)
@@ -3487,7 +3487,7 @@ HiiNewPackageList (
}
Private = HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS (This);
- CopyMem (&PackageListGuid, (VOID *) PackageList, sizeof (EFI_GUID));
+ CopyMem(&PackageListGuid, (VOID *) PackageList, sizeof (EFI_GUID));
//
// Check the Package list GUID to guarantee this GUID is unique in database.
@@ -3774,7 +3774,7 @@ HiiUpdatePackageList (
// Remove the package if its type matches one of the package types which is
// contained in the new package list.
//
- CopyMem (&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
while (PackageHeader.Type != EFI_HII_PACKAGE_END) {
switch (PackageHeader.Type) {
case EFI_HII_PACKAGE_TYPE_GUID:
@@ -3809,7 +3809,7 @@ HiiUpdatePackageList (
}
PackageHdrPtr = (EFI_HII_PACKAGE_HEADER *) ((UINT8 *) PackageHdrPtr + PackageHeader.Length);
- CopyMem (&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
}
//
@@ -4356,7 +4356,7 @@ HiiFindKeyboardLayouts (
HII_KB_LAYOUT_PACKAGE_SIGNATURE
);
Layout = (UINT8 *) Package->KeyboardPkg + sizeof (EFI_HII_PACKAGE_HEADER) + sizeof (UINT16);
- CopyMem (
+ CopyMem(
&LayoutCount,
(UINT8 *) Package->KeyboardPkg + sizeof (EFI_HII_PACKAGE_HEADER),
sizeof (UINT16)
@@ -4364,8 +4364,8 @@ HiiFindKeyboardLayouts (
for (Index = 0; Index < LayoutCount; Index++) {
ResultSize += sizeof (EFI_GUID);
if (ResultSize <= *KeyGuidBufferLength) {
- CopyMem (KeyGuidBuffer + (ResultSize / sizeof (EFI_GUID) - 1), Layout + sizeof (UINT16), sizeof (EFI_GUID));
- CopyMem (&LayoutLength, Layout, sizeof (UINT16));
+ CopyMem(KeyGuidBuffer + (ResultSize / sizeof (EFI_GUID) - 1), Layout + sizeof (UINT16), sizeof (EFI_GUID));
+ CopyMem(&LayoutLength, Layout, sizeof (UINT16));
Layout = Layout + LayoutLength;
}
}
@@ -4447,12 +4447,12 @@ HiiGetKeyboardLayout (
if (Private->CurrentLayout == NULL) {
return EFI_NOT_FOUND;
}
- CopyMem (&LayoutLength, Private->CurrentLayout, sizeof (UINT16));
+ CopyMem(&LayoutLength, Private->CurrentLayout, sizeof (UINT16));
if (*KeyboardLayoutLength < LayoutLength) {
*KeyboardLayoutLength = LayoutLength;
return EFI_BUFFER_TOO_SMALL;
}
- CopyMem (KeyboardLayout, Private->CurrentLayout, LayoutLength);
+ CopyMem(KeyboardLayout, Private->CurrentLayout, LayoutLength);
return EFI_SUCCESS;
}
@@ -4472,12 +4472,12 @@ HiiGetKeyboardLayout (
Layout = (UINT8 *) Package->KeyboardPkg +
sizeof (EFI_HII_PACKAGE_HEADER) + sizeof (UINT16);
- CopyMem (&LayoutCount, Layout - sizeof (UINT16), sizeof (UINT16));
+ CopyMem(&LayoutCount, Layout - sizeof (UINT16), sizeof (UINT16));
for (Index = 0; Index < LayoutCount; Index++) {
- CopyMem (&LayoutLength, Layout, sizeof (UINT16));
+ CopyMem(&LayoutLength, Layout, sizeof (UINT16));
if (CompareMem (Layout + sizeof (UINT16), KeyGuid, sizeof (EFI_GUID)) == 0) {
if (LayoutLength <= *KeyboardLayoutLength) {
- CopyMem (KeyboardLayout, Layout, LayoutLength);
+ CopyMem(KeyboardLayout, Layout, LayoutLength);
return EFI_SUCCESS;
} else {
*KeyboardLayoutLength = LayoutLength;
@@ -4554,7 +4554,7 @@ HiiSetKeyboardLayout (
//
// Backup current keyboard layout.
//
- CopyMem (&Private->CurrentLayoutGuid, KeyGuid, sizeof (EFI_GUID));
+ CopyMem(&Private->CurrentLayoutGuid, KeyGuid, sizeof (EFI_GUID));
if (Private->CurrentLayout != NULL) {
FreePool(Private->CurrentLayout);
}
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
index 87bc1bfdf..f9bd9b4c1 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
@@ -73,7 +73,7 @@ NewCell (
if (Cell->AdvanceX == 0) {
Cell->AdvanceX = Cell->Width;
}
- CopyMem (&GlyphInfo->Cell, Cell, sizeof (EFI_HII_GLYPH_INFO));
+ CopyMem(&GlyphInfo->Cell, Cell, sizeof (EFI_HII_GLYPH_INFO));
InsertTailList (GlyphInfoList, &GlyphInfo->Entry);
return EFI_SUCCESS;
@@ -121,7 +121,7 @@ GetCell (
for (Link = GlyphInfoList->BackLink; Link != GlyphInfoList; Link = Link->BackLink) {
GlyphInfo = CR (Link, HII_GLYPH_INFO, Entry, HII_GLYPH_INFO_SIGNATURE);
if (GlyphInfo->CharId <= CharValue) {
- CopyMem (Cell, &GlyphInfo->Cell, sizeof (EFI_HII_GLYPH_INFO));
+ CopyMem(Cell, &GlyphInfo->Cell, sizeof (EFI_HII_GLYPH_INFO));
return EFI_SUCCESS;
}
}
@@ -210,7 +210,7 @@ GetGlyphBuffer (
//
NarrowPtr = (EFI_NARROW_GLYPH *) ((UINT8 *) (SimpleFont->SimpleFontPkgHdr) + HeaderSize);
for (Index = 0; Index < SimpleFont->SimpleFontPkgHdr->NumberOfNarrowGlyphs; Index++) {
- CopyMem (&Narrow, NarrowPtr + Index,sizeof (EFI_NARROW_GLYPH));
+ CopyMem(&Narrow, NarrowPtr + Index,sizeof (EFI_NARROW_GLYPH));
if (Narrow.UnicodeWeight == Char) {
*GlyphBuffer = (UINT8 *) AllocateZeroPool(EFI_GLYPH_HEIGHT);
if (*GlyphBuffer == NULL) {
@@ -219,7 +219,7 @@ GetGlyphBuffer (
Cell->Width = EFI_GLYPH_WIDTH;
Cell->Height = EFI_GLYPH_HEIGHT;
Cell->AdvanceX = Cell->Width;
- CopyMem (*GlyphBuffer, Narrow.GlyphCol1, Cell->Height);
+ CopyMem(*GlyphBuffer, Narrow.GlyphCol1, Cell->Height);
if (Attributes != NULL) {
*Attributes = (UINT8) (Narrow.Attributes | NARROW_GLYPH);
}
@@ -231,7 +231,7 @@ GetGlyphBuffer (
//
WidePtr = (EFI_WIDE_GLYPH *) (NarrowPtr + SimpleFont->SimpleFontPkgHdr->NumberOfNarrowGlyphs);
for (Index = 0; Index < SimpleFont->SimpleFontPkgHdr->NumberOfWideGlyphs; Index++) {
- CopyMem (&Wide, WidePtr + Index, sizeof (EFI_WIDE_GLYPH));
+ CopyMem(&Wide, WidePtr + Index, sizeof (EFI_WIDE_GLYPH));
if (Wide.UnicodeWeight == Char) {
*GlyphBuffer = (UINT8 *) AllocateZeroPool(EFI_GLYPH_HEIGHT * 2);
if (*GlyphBuffer == NULL) {
@@ -240,8 +240,8 @@ GetGlyphBuffer (
Cell->Width = EFI_GLYPH_WIDTH * 2;
Cell->Height = EFI_GLYPH_HEIGHT;
Cell->AdvanceX = Cell->Width;
- CopyMem (*GlyphBuffer, Wide.GlyphCol1, EFI_GLYPH_HEIGHT);
- CopyMem (*GlyphBuffer + EFI_GLYPH_HEIGHT, Wide.GlyphCol2, EFI_GLYPH_HEIGHT);
+ CopyMem(*GlyphBuffer, Wide.GlyphCol1, EFI_GLYPH_HEIGHT);
+ CopyMem(*GlyphBuffer + EFI_GLYPH_HEIGHT, Wide.GlyphCol2, EFI_GLYPH_HEIGHT);
if (Attributes != NULL) {
*Attributes = (UINT8) (Wide.Attributes | EFI_GLYPH_WIDE);
}
@@ -613,7 +613,7 @@ WriteOutputParam (
}
if (Cell != NULL) {
- CopyMem (Cell, InputCell, sizeof (EFI_HII_GLYPH_INFO));
+ CopyMem(Cell, InputCell, sizeof (EFI_HII_GLYPH_INFO));
}
if (GlyphBuffer != NULL && BufferLen > 0) {
@@ -621,7 +621,7 @@ WriteOutputParam (
if (*GlyphBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (*GlyphBuffer, BufferIn, BufferLen);
+ CopyMem(*GlyphBuffer, BufferIn, BufferLen);
}
if (GlyphBufferLen != NULL) {
@@ -693,7 +693,7 @@ FindGlyphBlock (
if (EFI_ERROR(Status)) {
return Status;
}
- CopyMem (
+ CopyMem(
&LocalCell,
(UINT8 *) FontPackage->FontPkgHdr + 3 * sizeof (UINT32),
sizeof (EFI_HII_GLYPH_INFO)
@@ -720,7 +720,7 @@ FindGlyphBlock (
if (EFI_ERROR(Status)) {
return Status;
}
- CopyMem (
+ CopyMem(
&LocalCell,
BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK),
sizeof (EFI_HII_GLYPH_INFO)
@@ -737,7 +737,7 @@ FindGlyphBlock (
case EFI_HII_GIBT_DUPLICATE:
if (CharCurrent == CharValue) {
- CopyMem (&CharValue, BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK), sizeof (CHAR16));
+ CopyMem(&CharValue, BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK), sizeof (CHAR16));
CharCurrent = 1;
BlockPtr = FontPackage->GlyphBlock;
continue;
@@ -750,7 +750,7 @@ FindGlyphBlock (
BlockPtr += *(UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8));
break;
case EFI_HII_GIBT_EXT2:
- CopyMem (
+ CopyMem(
&Length16,
(UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8)),
sizeof (UINT16)
@@ -758,7 +758,7 @@ FindGlyphBlock (
BlockPtr += Length16;
break;
case EFI_HII_GIBT_EXT4:
- CopyMem (
+ CopyMem(
&Length32,
(UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8)),
sizeof (UINT32)
@@ -767,7 +767,7 @@ FindGlyphBlock (
break;
case EFI_HII_GIBT_GLYPH:
- CopyMem (
+ CopyMem(
&LocalCell,
BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK),
sizeof (EFI_HII_GLYPH_INFO)
@@ -797,9 +797,9 @@ FindGlyphBlock (
case EFI_HII_GIBT_GLYPHS:
BlockPtr += sizeof (EFI_HII_GLYPH_BLOCK);
- CopyMem (&Glyphs.Cell, BlockPtr, sizeof (EFI_HII_GLYPH_INFO));
+ CopyMem(&Glyphs.Cell, BlockPtr, sizeof (EFI_HII_GLYPH_INFO));
BlockPtr += sizeof (EFI_HII_GLYPH_INFO);
- CopyMem (&Glyphs.Count, BlockPtr, sizeof (UINT16));
+ CopyMem(&Glyphs.Count, BlockPtr, sizeof (UINT16));
BlockPtr += sizeof (UINT16);
if (CharValue == (CHAR16) (-1)) {
@@ -858,7 +858,7 @@ FindGlyphBlock (
break;
case EFI_HII_GIBT_GLYPHS_DEFAULT:
- CopyMem (&Length16, BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK), sizeof (UINT16));
+ CopyMem(&Length16, BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK), sizeof (UINT16));
Status = GetCell (CharCurrent, &FontPackage->GlyphInfoList, &DefaultCell);
if (EFI_ERROR(Status)) {
return Status;
@@ -894,7 +894,7 @@ FindGlyphBlock (
BlockPtr += sizeof (EFI_HII_GIBT_SKIP1_BLOCK);
break;
case EFI_HII_GIBT_SKIP2:
- CopyMem (&Length16, BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK), sizeof (UINT16));
+ CopyMem(&Length16, BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK), sizeof (UINT16));
CharCurrent = (UINT16) (CharCurrent + Length16);
BlockPtr += sizeof (EFI_HII_GIBT_SKIP2_BLOCK);
break;
@@ -2194,7 +2194,7 @@ NextLine:
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
- CopyMem (*RowInfoArray, RowInfo, RowInfoSize);
+ CopyMem(*RowInfoArray, RowInfo, RowInfoSize);
} else {
*RowInfoArray = NULL;
}
@@ -2819,7 +2819,7 @@ HiiGetFontInfo (
// Parse the font information mask to find a matching font.
//
- CopyMem (&InfoOut, (EFI_FONT_DISPLAY_INFO *) StringInfoIn, sizeof (EFI_FONT_DISPLAY_INFO));
+ CopyMem(&InfoOut, (EFI_FONT_DISPLAY_INFO *) StringInfoIn, sizeof (EFI_FONT_DISPLAY_INFO));
if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_FONT) == EFI_FONT_INFO_SYS_FONT) {
Status = SaveFontName (SystemDefault->FontInfo.FontName, &FontInfo);
@@ -2874,8 +2874,8 @@ HiiGetFontInfo (
goto Exit;
}
- CopyMem (*StringInfoOut, &InfoOut, sizeof (EFI_FONT_DISPLAY_INFO));
- CopyMem (&(*StringInfoOut)->FontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
+ CopyMem(*StringInfoOut, &InfoOut, sizeof (EFI_FONT_DISPLAY_INFO));
+ CopyMem(&(*StringInfoOut)->FontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
}
LocalFontHandle = GlobalFont->Entry.ForwardLink;
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
index 62c9c5485..668bf2d9a 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
@@ -191,7 +191,7 @@ CopyGopToRgbPixel (
ASSERT (BitMapOut != NULL && BitMapIn != NULL);
for (Index = 0; Index < PixelNum; Index++) {
- CopyMem (BitMapOut + Index, BitMapIn + Index, sizeof (EFI_HII_RGB_PIXEL));
+ CopyMem(BitMapOut + Index, BitMapIn + Index, sizeof (EFI_HII_RGB_PIXEL));
}
}
@@ -220,7 +220,7 @@ CopyRgbToGopPixel (
ASSERT (BitMapOut != NULL && BitMapIn != NULL);
for (Index = 0; Index < PixelNum; Index++) {
- CopyMem (BitMapOut + Index, BitMapIn + Index, sizeof (EFI_HII_RGB_PIXEL));
+ CopyMem(BitMapOut + Index, BitMapIn + Index, sizeof (EFI_HII_RGB_PIXEL));
}
}
@@ -264,14 +264,14 @@ Output1bitPixel (
// First entry corresponds to color 0 and second entry corresponds to color 1.
//
PaletteSize = 0;
- CopyMem (&PaletteSize, PaletteInfo, sizeof (UINT16));
+ CopyMem(&PaletteSize, PaletteInfo, sizeof (UINT16));
PaletteSize += sizeof (UINT16);
Palette = AllocateZeroPool(PaletteSize);
ASSERT (Palette != NULL);
if (Palette == NULL) {
return;
}
- CopyMem (Palette, PaletteInfo, PaletteSize);
+ CopyMem(Palette, PaletteInfo, PaletteSize);
ZeroMem (PaletteValue, sizeof (PaletteValue));
CopyRgbToGopPixel (&PaletteValue[0], &Palette->PaletteValue[0], 1);
@@ -353,14 +353,14 @@ Output4bitPixel (
// The bitmap should allocate each color index starting from 0.
//
PaletteSize = 0;
- CopyMem (&PaletteSize, PaletteInfo, sizeof (UINT16));
+ CopyMem(&PaletteSize, PaletteInfo, sizeof (UINT16));
PaletteSize += sizeof (UINT16);
Palette = AllocateZeroPool(PaletteSize);
ASSERT (Palette != NULL);
if (Palette == NULL) {
return;
}
- CopyMem (Palette, PaletteInfo, PaletteSize);
+ CopyMem(Palette, PaletteInfo, PaletteSize);
PaletteNum = (UINT16)(Palette->PaletteSize / sizeof (EFI_HII_RGB_PIXEL));
ZeroMem (PaletteValue, sizeof (PaletteValue));
@@ -431,14 +431,14 @@ Output8bitPixel (
// The bitmap should allocate each color index starting from 0.
//
PaletteSize = 0;
- CopyMem (&PaletteSize, PaletteInfo, sizeof (UINT16));
+ CopyMem(&PaletteSize, PaletteInfo, sizeof (UINT16));
PaletteSize += sizeof (UINT16);
Palette = AllocateZeroPool(PaletteSize);
ASSERT (Palette != NULL);
if (Palette == NULL) {
return;
}
- CopyMem (Palette, PaletteInfo, PaletteSize);
+ CopyMem(Palette, PaletteInfo, PaletteSize);
PaletteNum = (UINT16)(Palette->PaletteSize / sizeof (EFI_HII_RGB_PIXEL));
ZeroMem (PaletteValue, sizeof (PaletteValue));
CopyRgbToGopPixel (PaletteValue, Palette->PaletteValue, MIN (PaletteNum, ARRAY_SIZE (PaletteValue)));
@@ -696,7 +696,7 @@ HiiNewImage (
//
// Copy the original content.
//
- CopyMem (
+ CopyMem(
ImageBlocks,
ImagePackage->ImageBlock,
ImagePackage->ImageBlockSize - sizeof (EFI_HII_IIBT_END_BLOCK)
@@ -926,7 +926,7 @@ IGetImage (
//
// Use the common block code since the definition of these structures is the same.
//
- CopyMem (&Iibt1bit, CurrentImageBlock, sizeof (EFI_HII_IIBT_IMAGE_1BIT_BLOCK));
+ CopyMem(&Iibt1bit, CurrentImageBlock, sizeof (EFI_HII_IIBT_IMAGE_1BIT_BLOCK));
ImageLength = (UINTN) Iibt1bit.Bitmap.Width * Iibt1bit.Bitmap.Height;
if (ImageLength > MAX_UINTN / sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)) {
return EFI_OUT_OF_RESOURCES;
@@ -942,7 +942,7 @@ IGetImage (
PaletteInfo = ImagePackage->PaletteBlock + sizeof (EFI_HII_IMAGE_PALETTE_INFO_HEADER);
for (PaletteIndex = 1; PaletteIndex < Iibt1bit.PaletteIndex; PaletteIndex++) {
- CopyMem (&PaletteSize, PaletteInfo, sizeof (UINT16));
+ CopyMem(&PaletteSize, PaletteInfo, sizeof (UINT16));
PaletteInfo += PaletteSize + sizeof (UINT16);
}
ASSERT (PaletteIndex == Iibt1bit.PaletteIndex);
@@ -1186,7 +1186,7 @@ HiiSetImage (
Part1Size = (UINT32) ((UINTN) CurrentImageBlock - (UINTN) ImagePackage->ImageBlock);
Part2Size = ImagePackage->ImageBlockSize - Part1Size - OldBlockSize;
- CopyMem (ImageBlocks, ImagePackage->ImageBlock, Part1Size);
+ CopyMem(ImageBlocks, ImagePackage->ImageBlock, Part1Size);
//
// Set the new image block
@@ -1202,7 +1202,7 @@ HiiSetImage (
CopyGopToRgbPixel (((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Bitmap,
Image->Bitmap, (UINT32) Image->Width * Image->Height);
- CopyMem ((UINT8 *) NewImageBlock + NewBlockSize, (UINT8 *) CurrentImageBlock + OldBlockSize, Part2Size);
+ CopyMem((UINT8 *) NewImageBlock + NewBlockSize, (UINT8 *) CurrentImageBlock + OldBlockSize, Part2Size);
FreePool(ImagePackage->ImageBlock);
ImagePackage->ImageBlock = ImageBlocks;
@@ -1365,7 +1365,7 @@ HiiDrawImage (
}
if (Width == Image->Width && Height == Image->Height) {
- CopyMem (BltBuffer, Image->Bitmap, BufferLen);
+ CopyMem(BltBuffer, Image->Bitmap, BufferLen);
} else {
for (Ypos = 0; Ypos < Height; Ypos++) {
OffsetY1 = Image->Width * Ypos;
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
index 8cc2a6c18..35d005938 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
@@ -174,7 +174,7 @@ GetUnicodeStringTextOrSize (
return EFI_BUFFER_TOO_SMALL;
}
if (StringDest != NULL) {
- CopyMem (StringDest, StringSrc, StringSize);
+ CopyMem(StringDest, StringSrc, StringSize);
}
*BufferSize = StringSize;
@@ -218,7 +218,7 @@ GetStringFontInfo (
if (*StringFontInfo == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (*StringFontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
+ CopyMem(*StringFontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
return EFI_SUCCESS;
}
}
@@ -330,7 +330,7 @@ FindStringBlock (
break;
case EFI_HII_SIBT_STRINGS_SCSU:
- CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
StringTextPtr = (UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_SIBT_STRINGS_SCSU_BLOCK) - sizeof (UINT8));
BlockSize += StringTextPtr - BlockHdr;
@@ -349,7 +349,7 @@ FindStringBlock (
break;
case EFI_HII_SIBT_STRINGS_SCSU_FONT:
- CopyMem (
+ CopyMem(
&StringCount,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT16)
@@ -399,7 +399,7 @@ FindStringBlock (
Offset = sizeof (EFI_HII_SIBT_STRINGS_UCS2_BLOCK) - sizeof (CHAR16);
StringTextPtr = BlockHdr + Offset;
BlockSize += Offset;
- CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
for (Index = 0; Index < StringCount; Index++) {
GetUnicodeStringTextOrSize (NULL, StringTextPtr, &StringSize);
BlockSize += StringSize;
@@ -419,7 +419,7 @@ FindStringBlock (
Offset = sizeof (EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK) - sizeof (CHAR16);
StringTextPtr = BlockHdr + Offset;
BlockSize += Offset;
- CopyMem (
+ CopyMem(
&StringCount,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT16)
@@ -446,7 +446,7 @@ FindStringBlock (
// Update the StringId to be the previous string block.
// Go back to the header of string block to search.
//
- CopyMem (
+ CopyMem(
&StringId,
BlockHdr + sizeof (EFI_HII_STRING_BLOCK),
sizeof (EFI_STRING_ID)
@@ -467,13 +467,13 @@ FindStringBlock (
break;
case EFI_HII_SIBT_SKIP2:
- CopyMem (&SkipCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
+ CopyMem(&SkipCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
CurrentStringId = (UINT16) (CurrentStringId + SkipCount);
BlockSize += sizeof (EFI_HII_SIBT_SKIP2_BLOCK);
break;
case EFI_HII_SIBT_EXT1:
- CopyMem (
+ CopyMem(
&Length8,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT8)
@@ -482,18 +482,18 @@ FindStringBlock (
break;
case EFI_HII_SIBT_EXT2:
- CopyMem (&Ext2, BlockHdr, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
+ CopyMem(&Ext2, BlockHdr, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
if (Ext2.BlockType2 == EFI_HII_SIBT_FONT && StringId == (EFI_STRING_ID) (-1)) {
//
// Find the relationship between global font info and the font info of
// this EFI_HII_SIBT_FONT block then backup its information in local package.
//
BlockHdr += sizeof (EFI_HII_SIBT_EXT2_BLOCK);
- CopyMem (&FontId, BlockHdr, sizeof (UINT8));
+ CopyMem(&FontId, BlockHdr, sizeof (UINT8));
BlockHdr ++;
- CopyMem (&FontSize, BlockHdr, sizeof (UINT16));
+ CopyMem(&FontSize, BlockHdr, sizeof (UINT16));
BlockHdr += sizeof (UINT16);
- CopyMem (&FontStyle, BlockHdr, sizeof (EFI_HII_FONT_STYLE));
+ CopyMem(&FontStyle, BlockHdr, sizeof (EFI_HII_FONT_STYLE));
BlockHdr += sizeof (EFI_HII_FONT_STYLE);
GetUnicodeStringTextOrSize (NULL, BlockHdr, &StringSize);
@@ -504,7 +504,7 @@ FindStringBlock (
}
FontInfo->FontStyle = FontStyle;
FontInfo->FontSize = FontSize;
- CopyMem (FontInfo->FontName, BlockHdr, StringSize);
+ CopyMem(FontInfo->FontName, BlockHdr, StringSize);
//
// If find the corresponding global font info, save the relationship.
@@ -529,7 +529,7 @@ FindStringBlock (
break;
case EFI_HII_SIBT_EXT4:
- CopyMem (
+ CopyMem(
&Length32,
(UINT8*)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + sizeof (UINT8)),
sizeof (UINT32)
@@ -795,7 +795,7 @@ InsertLackStringBlock (
//
// Copy old block in front of skip block.
//
- CopyMem (StringBlock, StringPackage->StringBlock, OldStringAddr - StringPackage->StringBlock);
+ CopyMem(StringBlock, StringPackage->StringBlock, OldStringAddr - StringPackage->StringBlock);
BlockPtr = StringBlock + (OldStringAddr - StringPackage->StringBlock);
if (FrontSkipNum > 0) {
@@ -832,7 +832,7 @@ InsertLackStringBlock (
//
// Append a EFI_HII_SIBT_END block to the end.
//
- CopyMem (BlockPtr, OldStringAddr + SkipLen, OldBlockSize - (OldStringAddr - StringPackage->StringBlock) - SkipLen);
+ CopyMem(BlockPtr, OldStringAddr + SkipLen, OldBlockSize - (OldStringAddr - StringPackage->StringBlock) - SkipLen);
if (FontBlock) {
*BlockType = EFI_HII_SIBT_STRING_UCS2_FONT;
@@ -990,7 +990,7 @@ SetStringWorker (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (Block, StringPackage->StringBlock, StringTextPtr - StringPackage->StringBlock);
+ CopyMem(Block, StringPackage->StringBlock, StringTextPtr - StringPackage->StringBlock);
BlockPtr = Block + (StringTextPtr - StringPackage->StringBlock);
while (*String != 0) {
@@ -1000,7 +1000,7 @@ SetStringWorker (
TmpSize = OldBlockSize - (StringTextPtr - StringPackage->StringBlock) - AsciiStrSize ((CHAR8 *) StringTextPtr);
- CopyMem (
+ CopyMem(
BlockPtr,
StringTextPtr + AsciiStrSize ((CHAR8 *)StringTextPtr),
TmpSize
@@ -1027,13 +1027,13 @@ SetStringWorker (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (Block, StringPackage->StringBlock, StringTextPtr - StringPackage->StringBlock);
+ CopyMem(Block, StringPackage->StringBlock, StringTextPtr - StringPackage->StringBlock);
BlockPtr = Block + (StringTextPtr - StringPackage->StringBlock);
- CopyMem (BlockPtr, String, StrSize (String));
+ CopyMem(BlockPtr, String, StrSize (String));
BlockPtr += StrSize (String);
- CopyMem (
+ CopyMem(
BlockPtr,
StringTextPtr + StringSize,
OldBlockSize - (StringTextPtr - StringPackage->StringBlock) - StringSize
@@ -1072,23 +1072,23 @@ SetStringWorker (
Ext2.Header.BlockType = EFI_HII_SIBT_EXT2;
Ext2.BlockType2 = EFI_HII_SIBT_FONT;
Ext2.Length = (UINT16) (BlockSize - OldBlockSize);
- CopyMem (BlockPtr, &Ext2, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
+ CopyMem(BlockPtr, &Ext2, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
BlockPtr += sizeof (EFI_HII_SIBT_EXT2_BLOCK);
*BlockPtr = LocalFont->FontId;
BlockPtr ++;
- CopyMem (BlockPtr, &GlobalFont->FontInfo->FontSize, sizeof (UINT16));
+ CopyMem(BlockPtr, &GlobalFont->FontInfo->FontSize, sizeof (UINT16));
BlockPtr += sizeof (UINT16);
- CopyMem (BlockPtr, &GlobalFont->FontInfo->FontStyle, sizeof (UINT32));
+ CopyMem(BlockPtr, &GlobalFont->FontInfo->FontStyle, sizeof (UINT32));
BlockPtr += sizeof (UINT32);
- CopyMem (
+ CopyMem(
BlockPtr,
GlobalFont->FontInfo->FontName,
StrSize (GlobalFont->FontInfo->FontName)
);
BlockPtr += StrSize (GlobalFont->FontInfo->FontName);
- CopyMem (BlockPtr, StringPackage->StringBlock, OldBlockSize);
+ CopyMem(BlockPtr, StringPackage->StringBlock, OldBlockSize);
FreePool(StringPackage->StringBlock);
StringPackage->StringBlock = Block;
@@ -1263,7 +1263,7 @@ HiiNewString (
//
// Copy original string blocks, except the EFI_HII_SIBT_END.
//
- CopyMem (StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
+ CopyMem(StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
//
// Create a blank EFI_HII_SIBT_STRING_UCS2 block
//
@@ -1329,7 +1329,7 @@ HiiNewString (
StringPackage->StringPkgHdr->Header.Type = EFI_HII_PACKAGE_STRINGS;
StringPackage->StringPkgHdr->HdrSize = HeaderSize;
StringPackage->StringPkgHdr->StringInfoOffset = HeaderSize;
- CopyMem (StringPackage->StringPkgHdr->LanguageWindow, mLanguageWindow, 16 * sizeof (CHAR16));
+ CopyMem(StringPackage->StringPkgHdr->LanguageWindow, mLanguageWindow, 16 * sizeof (CHAR16));
StringPackage->StringPkgHdr->LanguageName = 1;
AsciiStrCpyS (StringPackage->StringPkgHdr->Language, (HeaderSize - OFFSET_OF(EFI_HII_STRING_PACKAGE_HDR,Language)) / sizeof (CHAR8), (CHAR8 *) Language);
@@ -1355,7 +1355,7 @@ HiiNewString (
BlockPtr = StringPackage->StringBlock;
*BlockPtr = EFI_HII_SIBT_STRING_UCS2;
BlockPtr += sizeof (EFI_HII_STRING_BLOCK);
- CopyMem (BlockPtr, (EFI_STRING) LanguageName, StrSize ((EFI_STRING) LanguageName));
+ CopyMem(BlockPtr, (EFI_STRING) LanguageName, StrSize ((EFI_STRING) LanguageName));
BlockPtr += StrSize ((EFI_STRING) LanguageName);
for (Index = 2; Index <= *StringId - 1; Index ++) {
*BlockPtr = EFI_HII_SIBT_STRING_UCS2;
@@ -1392,14 +1392,14 @@ HiiNewString (
//
// Copy original string blocks, except the EFI_HII_SIBT_END.
//
- CopyMem (StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
+ CopyMem(StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
//
// Create a EFI_HII_SIBT_STRING_UCS2 block
//
BlockPtr = StringBlock + OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK);
*BlockPtr = EFI_HII_SIBT_STRING_UCS2;
BlockPtr += sizeof (EFI_HII_STRING_BLOCK);
- CopyMem (BlockPtr, (EFI_STRING) String, StrSize ((EFI_STRING) String));
+ CopyMem(BlockPtr, (EFI_STRING) String, StrSize ((EFI_STRING) String));
BlockPtr += StrSize ((EFI_STRING) String);
//
@@ -1432,7 +1432,7 @@ HiiNewString (
//
// Copy original string blocks, except the EFI_HII_SIBT_END.
//
- CopyMem (StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
+ CopyMem(StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
//
// Create a EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
//
@@ -1441,7 +1441,7 @@ HiiNewString (
BlockPtr += sizeof (EFI_HII_STRING_BLOCK);
*BlockPtr = LocalFont->FontId;
BlockPtr ++;
- CopyMem (BlockPtr, (EFI_STRING) String, StrSize ((EFI_STRING) String));
+ CopyMem(BlockPtr, (EFI_STRING) String, StrSize ((EFI_STRING) String));
BlockPtr += StrSize ((EFI_STRING) String);
//
@@ -1469,7 +1469,7 @@ HiiNewString (
//
// Copy original string blocks, except the EFI_HII_SIBT_END.
//
- CopyMem (StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
+ CopyMem(StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK));
//
// Create a EFI_HII_SIBT_FONT block firstly and then backup its info in string
@@ -1480,16 +1480,16 @@ HiiNewString (
Ext2.Header.BlockType = EFI_HII_SIBT_EXT2;
Ext2.BlockType2 = EFI_HII_SIBT_FONT;
Ext2.Length = (UINT16) FontBlockSize;
- CopyMem (BlockPtr, &Ext2, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
+ CopyMem(BlockPtr, &Ext2, sizeof (EFI_HII_SIBT_EXT2_BLOCK));
BlockPtr += sizeof (EFI_HII_SIBT_EXT2_BLOCK);
*BlockPtr = LocalFont->FontId;
BlockPtr ++;
- CopyMem (BlockPtr, &((EFI_FONT_INFO *) StringFontInfo)->FontSize, sizeof (UINT16));
+ CopyMem(BlockPtr, &((EFI_FONT_INFO *) StringFontInfo)->FontSize, sizeof (UINT16));
BlockPtr += sizeof (UINT16);
- CopyMem (BlockPtr, &((EFI_FONT_INFO *) StringFontInfo)->FontStyle, sizeof (EFI_HII_FONT_STYLE));
+ CopyMem(BlockPtr, &((EFI_FONT_INFO *) StringFontInfo)->FontStyle, sizeof (EFI_HII_FONT_STYLE));
BlockPtr += sizeof (EFI_HII_FONT_STYLE);
- CopyMem (
+ CopyMem(
BlockPtr,
&((EFI_FONT_INFO *) StringFontInfo)->FontName,
StrSize (((EFI_FONT_INFO *) StringFontInfo)->FontName)
@@ -1502,7 +1502,7 @@ HiiNewString (
BlockPtr += sizeof (EFI_HII_STRING_BLOCK);
*BlockPtr = LocalFont->FontId;
BlockPtr ++;
- CopyMem (BlockPtr, (EFI_STRING) String, StrSize ((EFI_STRING) String));
+ CopyMem(BlockPtr, (EFI_STRING) String, StrSize ((EFI_STRING) String));
BlockPtr += StrSize ((EFI_STRING) String);
//
diff --git a/MdeModulePkg/Universal/LoadFileOnFv2/LoadFileOnFv2.c b/MdeModulePkg/Universal/LoadFileOnFv2/LoadFileOnFv2.c
index b4ab008ba..d4d8da7ab 100644
--- a/MdeModulePkg/Universal/LoadFileOnFv2/LoadFileOnFv2.c
+++ b/MdeModulePkg/Universal/LoadFileOnFv2/LoadFileOnFv2.c
@@ -215,7 +215,7 @@ CreateFileDevicePath (
FilePath = (FILEPATH_DEVICE_PATH *) FileDevicePath;
FilePath->Header.Type = MEDIA_DEVICE_PATH;
FilePath->Header.SubType = MEDIA_FILEPATH_DP;
- CopyMem (&FilePath->PathName, FileName, Size);
+ CopyMem(&FilePath->PathName, FileName, Size);
SetDevicePathNodeLength (&FilePath->Header, Size + SIZE_OF_FILEPATH_DEVICE_PATH);
SetDevicePathEndNode (NextDevicePathNode (&FilePath->Header));
diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
index 7314198e8..47a34af30 100644
--- a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
+++ b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
@@ -59,7 +59,7 @@ SmmLockBoxSave (
return ;
}
- CopyMem (&TempLockBoxParameterSave, LockBoxParameterSave, sizeof (EFI_SMM_LOCK_BOX_PARAMETER_SAVE));
+ CopyMem(&TempLockBoxParameterSave, LockBoxParameterSave, sizeof (EFI_SMM_LOCK_BOX_PARAMETER_SAVE));
//
// Sanity check
@@ -109,7 +109,7 @@ SmmLockBoxSetAttributes (
return ;
}
- CopyMem (&TempLockBoxParameterSetAttributes, LockBoxParameterSetAttributes, sizeof (EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES));
+ CopyMem(&TempLockBoxParameterSetAttributes, LockBoxParameterSetAttributes, sizeof (EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES));
//
// Update data
@@ -148,7 +148,7 @@ SmmLockBoxUpdate (
return ;
}
- CopyMem (&TempLockBoxParameterUpdate, LockBoxParameterUpdate, sizeof (EFI_SMM_LOCK_BOX_PARAMETER_UPDATE));
+ CopyMem(&TempLockBoxParameterUpdate, LockBoxParameterUpdate, sizeof (EFI_SMM_LOCK_BOX_PARAMETER_UPDATE));
//
// Sanity check
@@ -194,7 +194,7 @@ SmmLockBoxRestore (
EFI_STATUS Status;
EFI_SMM_LOCK_BOX_PARAMETER_RESTORE TempLockBoxParameterRestore;
- CopyMem (&TempLockBoxParameterRestore, LockBoxParameterRestore, sizeof (EFI_SMM_LOCK_BOX_PARAMETER_RESTORE));
+ CopyMem(&TempLockBoxParameterRestore, LockBoxParameterRestore, sizeof (EFI_SMM_LOCK_BOX_PARAMETER_RESTORE));
//
// Sanity check
diff --git a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.c b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.c
index fe8df5ffd..d7497a295 100644
--- a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.c
+++ b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.c
@@ -339,7 +339,7 @@ WriteMemory (
}
while (Address < (Start + Size)) {
- CopyMem ((VOID *) (UINTN) Address, Private->MonoPattern, Private->MonoTestSize);
+ CopyMem((VOID *) (UINTN) Address, Private->MonoPattern, Private->MonoTestSize);
Address += Private->CoverageSpan;
}
//
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
index 484d1d7d1..40b624bda 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
@@ -1318,7 +1318,7 @@ DxePcdGetNextTokenSpace (
(DYNAMICEX_MAPPING *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->ExMapTableOffset),
(EFI_GUID *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->GuidTableOffset)
);
- CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);
+ CopyMem(TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);
TmpTokenSpaceBufferCount = PeiTokenSpaceTableSize;
FreePool(PeiTokenSpaceTable);
}
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c
index d7a6fc06f..72737056f 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
@@ -477,7 +477,7 @@ GetWorker (
// to the default value buffer in the PCD Database.
// So that we can free the Data allocated in GetHiiVariable.
//
- CopyMem (VaraiableDefaultBuffer, Data + VariableHead->Offset, GetSize);
+ CopyMem(VaraiableDefaultBuffer, Data + VariableHead->Offset, GetSize);
}
FreePool(Data);
}
@@ -858,7 +858,7 @@ BuildPcdDxeDataBase (
PcdDxeDbLen = mPcdDatabase.DxeDb->Length + mPcdDatabase.DxeDb->UninitDataBaseSize;
PcdDxeDb = AllocateZeroPool(PcdDxeDbLen);
ASSERT (PcdDxeDb != NULL);
- CopyMem (PcdDxeDb, mPcdDatabase.DxeDb, mPcdDatabase.DxeDb->Length);
+ CopyMem(PcdDxeDb, mPcdDatabase.DxeDb, mPcdDatabase.DxeDb->Length);
mPcdDatabase.DxeDb = PcdDxeDb;
GuidHob = GetFirstGuidHob (&gPcdDataBaseHobGuid);
@@ -1188,7 +1188,7 @@ SetWorker (
case PCD_TYPE_STRING:
if (SetPtrTypeSize (TmpTokenNumber, Size)) {
- CopyMem (StringTable + *((STRING_HEAD *)InternalData), Data, *Size);
+ CopyMem(StringTable + *((STRING_HEAD *)InternalData), Data, *Size);
Status = EFI_SUCCESS;
} else {
Status = EFI_INVALID_PARAMETER;
@@ -1222,7 +1222,7 @@ SetWorker (
case PCD_TYPE_DATA:
if (PtrType) {
if (SetPtrTypeSize (TmpTokenNumber, Size)) {
- CopyMem (InternalData, Data, *Size);
+ CopyMem(InternalData, Data, *Size);
Status = EFI_SUCCESS;
} else {
Status = EFI_INVALID_PARAMETER;
@@ -1416,7 +1416,7 @@ GetVariableSizeAndDataFromHiiPcd (
} else {
VaraiableDefaultBuffer = (UINT8 *) Database + VariableHead->DefaultValueOffset;
}
- CopyMem ((UINT8 *) VariableData + VariableHead->Offset, VaraiableDefaultBuffer, PcdDataSize);
+ CopyMem((UINT8 *) VariableData + VariableHead->Offset, VaraiableDefaultBuffer, PcdDataSize);
}
}
}
@@ -1491,7 +1491,7 @@ SetHiiVariable (
ASSERT_EFI_ERROR(Status);
- CopyMem ((UINT8 *)Buffer + Offset, Data, DataSize);
+ CopyMem((UINT8 *)Buffer + Offset, Data, DataSize);
if (SetAttributes == 0) {
SetAttributes = Attribute;
@@ -1523,7 +1523,7 @@ SetHiiVariable (
//
// Update buffer.
//
- CopyMem ((UINT8 *)Buffer + Offset, Data, DataSize);
+ CopyMem((UINT8 *)Buffer + Offset, Data, DataSize);
if (SetAttributes == 0) {
SetAttributes = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE;
diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c b/MdeModulePkg/Universal/PCD/Pei/Pcd.c
index 93edc3b41..ed1654836 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c
@@ -172,7 +172,7 @@ PcdSetNvStoreDefaultIdCallBack (
NvStoreBuffer = (VARIABLE_STORE_HEADER *) ((UINT8 *) DataHeader + sizeof (DataHeader->DataSize) + DataHeader->HeaderSize);
VarStoreHobData = (UINT8 *) BuildGuidHob (&NvStoreBuffer->Signature, NvStoreBuffer->Size);
ASSERT (VarStoreHobData != NULL);
- CopyMem (VarStoreHobData, NvStoreBuffer, NvStoreBuffer->Size);
+ CopyMem(VarStoreHobData, NvStoreBuffer, NvStoreBuffer->Size);
//
// Find the matched SkuId and DefaultId in the first section
//
@@ -306,7 +306,7 @@ EndOfPeiSignalPpiNotifyCallback (
ASSERT_EFI_ERROR(Status);
Length = PeiPcdDb->LengthForAllSkus;
Database = BuildGuidHob (&gPcdDataBaseHobGuid, Length);
- CopyMem (Database, PcdDb, Length);
+ CopyMem(Database, PcdDb, Length);
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c
index 259018a78..74b0f82f9 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.c
@@ -441,7 +441,7 @@ BuildPcdDatabase (
//
// PeiPcdDbBinary is smaller than Database
//
- CopyMem (Database, PeiPcdDbBinary, PeiPcdDbBinary->Length);
+ CopyMem(Database, PeiPcdDbBinary, PeiPcdDbBinary->Length);
SizeOfCallbackFnTable = Database->LocalTokenCount * sizeof (PCD_PPI_CALLBACK) * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry);
@@ -689,7 +689,7 @@ SetWorker (
case PCD_TYPE_STRING:
if (SetPtrTypeSize (TokenNumber, Size, PeiPcdDb)) {
StringTableIdx = *((STRING_HEAD *)InternalData);
- CopyMem ((UINT8 *)PeiPcdDb + PeiPcdDb->StringTableOffset + StringTableIdx, Data, *Size);
+ CopyMem((UINT8 *)PeiPcdDb + PeiPcdDb->StringTableOffset + StringTableIdx, Data, *Size);
return EFI_SUCCESS;
} else {
return EFI_INVALID_PARAMETER;
@@ -699,7 +699,7 @@ SetWorker (
{
if (PtrType) {
if (SetPtrTypeSize (TokenNumber, Size, PeiPcdDb)) {
- CopyMem (InternalData, Data, *Size);
+ CopyMem(InternalData, Data, *Size);
return EFI_SUCCESS;
} else {
return EFI_INVALID_PARAMETER;
@@ -935,7 +935,7 @@ GetWorker (
// If the operation is successful, we copy the data
// to the default value buffer in the PCD Database.
//
- CopyMem (VaraiableDefaultBuffer, (UINT8 *) Data + VariableHead->Offset, GetSize);
+ CopyMem(VaraiableDefaultBuffer, (UINT8 *) Data + VariableHead->Offset, GetSize);
}
return (VOID *) VaraiableDefaultBuffer;
}
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
index a309518f7..dd66e64c1 100644
--- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
+++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
@@ -1043,7 +1043,7 @@ SaveOverridesMapping (
*(UINT32 *) VariableIndex = OverrideItem->DriverInfoNum;
VariableIndex += sizeof (UINT32); // pass DriverNum
- CopyMem (VariableIndex, OverrideItem->ControllerDevicePath, GetDevicePathSize (OverrideItem->ControllerDevicePath));
+ CopyMem(VariableIndex, OverrideItem->ControllerDevicePath, GetDevicePathSize (OverrideItem->ControllerDevicePath));
VariableIndex += GetDevicePathSize (OverrideItem->ControllerDevicePath); // pass ControllerDevicePath
//
@@ -1056,7 +1056,7 @@ SaveOverridesMapping (
ImageInfoListIndex = GetFirstNode (&OverrideItem->DriverInfoList);
while (!IsNull (&OverrideItem->DriverInfoList, ImageInfoListIndex)) {
DriverImageInfo = CR(ImageInfoListIndex, DRIVER_IMAGE_INFO, Link, DRIVER_IMAGE_INFO_SIGNATURE);
- CopyMem (VariableIndex, DriverImageInfo->DriverImagePath, GetDevicePathSize (DriverImageInfo->DriverImagePath));
+ CopyMem(VariableIndex, DriverImageInfo->DriverImagePath, GetDevicePathSize (DriverImageInfo->DriverImagePath));
VariableIndex += GetDevicePathSize (DriverImageInfo->DriverImagePath); // pass DriverImageDevicePath
//
// Align the VariableIndex since the driver image device path may not be aligned
diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaIntrinsics.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaIntrinsics.c
index 05584a4b4..ec0d80386 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaIntrinsics.c
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaIntrinsics.c
@@ -17,7 +17,7 @@
#pragma function(memcpy)
void * memcpy (void *dest, const void *src, unsigned int count)
{
- return CopyMem (dest, src, (UINTN)count);
+ return CopyMem(dest, src, (UINTN)count);
}
/* Sets buffers to a specified character */
diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c
index d178f3d48..03270ee1a 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c
@@ -253,7 +253,7 @@ RegularExpressionGetInfo (
}
for (Index = 0; Index < ARRAY_SIZE (mSupportedSyntaxes); ++Index) {
- CopyMem (&RegExSyntaxTypeList[Index], mSupportedSyntaxes[Index], sizeof(**mSupportedSyntaxes));
+ CopyMem(&RegExSyntaxTypeList[Index], mSupportedSyntaxes[Index], sizeof(**mSupportedSyntaxes));
}
*RegExSyntaxTypeListSize = SyntaxSize;
diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c
index a120bfd86..1b7164e54 100644
--- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c
+++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c
@@ -306,7 +306,7 @@ ReportDispatcher (
CopyGuid (&RscData->CallerId, CallerId);
}
if (Data != NULL) {
- CopyMem (&RscData->Data, Data, Data->HeaderSize + Data->Size);
+ CopyMem(&RscData->Data, Data, Data->HeaderSize + Data->Size);
}
Status = gBS->SignalEvent (CallbackEntry->Event);
diff --git a/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c b/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c
index 1a8426f8a..a57539d23 100644
--- a/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c
+++ b/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c
@@ -290,7 +290,7 @@ CustomGuidedSectionExtract (
// OutputBuffer was returned as a different value,
// so copy section contents to the allocated memory buffer.
//
- CopyMem (AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize);
+ CopyMem(AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize);
*OutputBuffer = AllocatedOutputBuffer;
}
diff --git a/MdeModulePkg/Universal/SecurityStubDxe/Defer3rdPartyImageLoad.c b/MdeModulePkg/Universal/SecurityStubDxe/Defer3rdPartyImageLoad.c
index 3ef35b7a9..f3e3cdce4 100644
--- a/MdeModulePkg/Universal/SecurityStubDxe/Defer3rdPartyImageLoad.c
+++ b/MdeModulePkg/Universal/SecurityStubDxe/Defer3rdPartyImageLoad.c
@@ -216,7 +216,7 @@ GetDefferedImageInfo (
NewCount = 0;
for (Index = 0; Index < mDeferred3rdPartyImage.Count; Index++) {
if (!mDeferred3rdPartyImage.ImageInfo[Index].Loaded) {
- CopyMem (
+ CopyMem(
&mDeferred3rdPartyImage.ImageInfo[NewCount],
&mDeferred3rdPartyImage.ImageInfo[Index],
sizeof (DEFERRED_3RD_PARTY_IMAGE_INFO)
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
index fe8e85e75..0ee8ced2b 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
@@ -85,7 +85,7 @@ GrowStack (
//
// Copy from Old Stack to the New Stack
//
- CopyMem (
+ CopyMem(
NewStack,
*Stack,
(*StackEnd - *Stack) * sizeof (EFI_HII_VALUE)
@@ -146,7 +146,7 @@ PushStack (
//
// Push the item onto the stack
//
- CopyMem (*StackPtr, Data, sizeof (EFI_HII_VALUE));
+ CopyMem(*StackPtr, Data, sizeof (EFI_HII_VALUE));
if (Data->Type == EFI_IFR_TYPE_BUFFER) {
(*StackPtr)->Buffer = AllocateCopyPool(Data->BufferLen, Data->Buffer);
ASSERT ((*StackPtr)->Buffer != NULL);
@@ -187,7 +187,7 @@ PopStack (
// Pop the item off the stack
//
*StackPtr = *StackPtr - 1;
- CopyMem (Data, *StackPtr, sizeof (EFI_HII_VALUE));
+ CopyMem(Data, *StackPtr, sizeof (EFI_HII_VALUE));
return EFI_SUCCESS;
}
@@ -317,7 +317,7 @@ GrowConditionalStack (
//
// Copy from Old Stack to the New Stack
//
- CopyMem (
+ CopyMem(
NewStack,
*Stack,
(*StackEnd - *Stack) * MemberSize
@@ -377,7 +377,7 @@ PushConditionalStack (
//
// Push the item onto the stack
//
- CopyMem (*StackPtr, Data, sizeof (FORM_EXPRESSION *));
+ CopyMem(*StackPtr, Data, sizeof (FORM_EXPRESSION *));
*StackPtr = *StackPtr + 1;
return EFI_SUCCESS;
@@ -413,7 +413,7 @@ PopConditionalStack (
// Pop the item off the stack
//
*StackPtr = *StackPtr - 1;
- CopyMem (Data, *StackPtr, sizeof (FORM_EXPRESSION *));
+ CopyMem(Data, *StackPtr, sizeof (FORM_EXPRESSION *));
return EFI_SUCCESS;
}
@@ -1169,7 +1169,7 @@ IfrToString (
break;
case EFI_IFR_TYPE_STRING:
- CopyMem (Result, &Value, sizeof (EFI_HII_VALUE));
+ CopyMem(Result, &Value, sizeof (EFI_HII_VALUE));
return EFI_SUCCESS;
case EFI_IFR_TYPE_BOOLEAN:
@@ -1195,11 +1195,11 @@ IfrToString (
TmpBuf = AllocateZeroPool(SrcLen + 3);
ASSERT (TmpBuf != NULL);
if (Format == EFI_IFR_STRING_ASCII) {
- CopyMem (TmpBuf, SrcBuf, SrcLen);
+ CopyMem(TmpBuf, SrcBuf, SrcLen);
PrintFormat = L"%a";
} else {
// Format == EFI_IFR_STRING_UNICODE
- CopyMem (TmpBuf, SrcBuf, SrcLen * sizeof (CHAR16));
+ CopyMem(TmpBuf, SrcBuf, SrcLen * sizeof (CHAR16));
PrintFormat = L"%s";
}
UnicodeSPrint (Buffer, sizeof (Buffer), PrintFormat, TmpBuf);
@@ -1286,7 +1286,7 @@ IfrToUint (
FreePool(Value.Buffer);
}
} else {
- CopyMem (Result, &Value, sizeof (EFI_HII_VALUE));
+ CopyMem(Result, &Value, sizeof (EFI_HII_VALUE));
}
Result->Type = EFI_IFR_TYPE_NUM_SIZE_64;
@@ -1378,10 +1378,10 @@ IfrCatenate (
TmpBuf = GetBufferForValue(&Value[0]);
ASSERT (TmpBuf != NULL);
- CopyMem (Result->Buffer, TmpBuf, Length0);
+ CopyMem(Result->Buffer, TmpBuf, Length0);
TmpBuf = GetBufferForValue(&Value[1]);
ASSERT (TmpBuf != NULL);
- CopyMem (&Result->Buffer[Length0], TmpBuf, Length1);
+ CopyMem(&Result->Buffer[Length0], TmpBuf, Length1);
}
Done:
if (Value[0].Buffer != NULL) {
@@ -1835,7 +1835,7 @@ IfrMid (
Result->BufferLen = (UINT16)((BufferLen - Base) < Length ? (BufferLen - Base) : Length);
Result->Buffer = AllocateZeroPool(Result->BufferLen);
ASSERT (Result->Buffer != NULL);
- CopyMem (Result->Buffer, &Buffer[Base], Result->BufferLen);
+ CopyMem(Result->Buffer, &Buffer[Base], Result->BufferLen);
}
if (Value[2].Type == EFI_IFR_TYPE_BUFFER) {
@@ -2484,7 +2484,7 @@ GetQuestionValueFromForm (
goto Done;
}
- CopyMem (Value, &Question->HiiValue, sizeof (EFI_HII_VALUE));
+ CopyMem(Value, &Question->HiiValue, sizeof (EFI_HII_VALUE));
Done:
//
@@ -2675,7 +2675,7 @@ EvaluateExpression (
// Get value from Edit Buffer
//
Value->Type = OpCode->ValueType;
- CopyMem (&Value->Value, OpCode->VarStorage->EditBuffer + OpCode->VarStoreInfo.VarOffset, OpCode->ValueWidth);
+ CopyMem(&Value->Value, OpCode->VarStorage->EditBuffer + OpCode->VarStoreInfo.VarOffset, OpCode->ValueWidth);
break;
case EFI_HII_VARSTORE_NAME_VALUE:
if (OpCode->ValueType != EFI_IFR_TYPE_STRING) {
@@ -3125,7 +3125,7 @@ EvaluateExpression (
switch (OpCode->VarStorage->Type) {
case EFI_HII_VARSTORE_BUFFER:
case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
- CopyMem (OpCode->VarStorage->EditBuffer + OpCode->VarStoreInfo.VarOffset, &Value->Value, OpCode->ValueWidth);
+ CopyMem(OpCode->VarStorage->EditBuffer + OpCode->VarStoreInfo.VarOffset, &Value->Value, OpCode->ValueWidth);
Data1.Value.b = TRUE;
break;
case EFI_HII_VARSTORE_NAME_VALUE:
@@ -3610,7 +3610,7 @@ EvaluateExpression (
Done:
RestoreExpressionEvaluationStackOffset (StackOffset);
if (!EFI_ERROR(Status)) {
- CopyMem (&Expression->Result, Value, sizeof (EFI_HII_VALUE));
+ CopyMem(&Expression->Result, Value, sizeof (EFI_HII_VALUE));
}
return Status;
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
index b0bd48228..5473e28af 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
@@ -56,8 +56,8 @@ CreateStatement (
Statement->QuestionReferToBitField = FALSE;
StatementHdr = (EFI_IFR_STATEMENT_HEADER *) (OpCodeData + sizeof (EFI_IFR_OP_HEADER));
- CopyMem (&Statement->Prompt, &StatementHdr->Prompt, sizeof (EFI_STRING_ID));
- CopyMem (&Statement->Help, &StatementHdr->Help, sizeof (EFI_STRING_ID));
+ CopyMem(&Statement->Prompt, &StatementHdr->Prompt, sizeof (EFI_STRING_ID));
+ CopyMem(&Statement->Help, &StatementHdr->Help, sizeof (EFI_STRING_ID));
ConditionalExprCount = GetConditionalExpressionCount(ExpressStatement);
if (ConditionalExprCount > 0) {
@@ -70,7 +70,7 @@ CreateStatement (
ASSERT (Statement->Expression != NULL);
Statement->Expression->Count = (UINTN) ConditionalExprCount;
Statement->Expression->Signature = FORM_EXPRESSION_LIST_SIGNATURE;
- CopyMem (Statement->Expression->Expression, GetConditionalExpressionList(ExpressStatement), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));
+ CopyMem(Statement->Expression->Expression, GetConditionalExpressionList(ExpressStatement), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));
}
//
@@ -114,9 +114,9 @@ CreateQuestion (
}
QuestionHdr = (EFI_IFR_QUESTION_HEADER *) (OpCodeData + sizeof (EFI_IFR_OP_HEADER));
- CopyMem (&Statement->QuestionId, &QuestionHdr->QuestionId, sizeof (EFI_QUESTION_ID));
- CopyMem (&Statement->VarStoreId, &QuestionHdr->VarStoreId, sizeof (EFI_VARSTORE_ID));
- CopyMem (&Statement->VarStoreInfo.VarOffset, &QuestionHdr->VarStoreInfo.VarOffset, sizeof (UINT16));
+ CopyMem(&Statement->QuestionId, &QuestionHdr->QuestionId, sizeof (EFI_QUESTION_ID));
+ CopyMem(&Statement->VarStoreId, &QuestionHdr->VarStoreId, sizeof (EFI_VARSTORE_ID));
+ CopyMem(&Statement->VarStoreInfo.VarOffset, &QuestionHdr->VarStoreInfo.VarOffset, sizeof (UINT16));
Statement->QuestionFlags = QuestionHdr->Flags;
@@ -332,8 +332,8 @@ IntializeBrowserStorage (
{
switch (StorageType) {
case EFI_HII_VARSTORE_BUFFER:
- CopyMem (&BrowserStorage->Guid, &((EFI_IFR_VARSTORE *) OpCodeData)->Guid, sizeof (EFI_GUID));
- CopyMem (&BrowserStorage->Size, &((EFI_IFR_VARSTORE *) OpCodeData)->Size, sizeof (UINT16));
+ CopyMem(&BrowserStorage->Guid, &((EFI_IFR_VARSTORE *) OpCodeData)->Guid, sizeof (EFI_GUID));
+ CopyMem(&BrowserStorage->Size, &((EFI_IFR_VARSTORE *) OpCodeData)->Size, sizeof (UINT16));
BrowserStorage->Buffer = AllocateZeroPool(BrowserStorage->Size);
BrowserStorage->EditBuffer = AllocateZeroPool(BrowserStorage->Size);
@@ -341,9 +341,9 @@ IntializeBrowserStorage (
case EFI_HII_VARSTORE_EFI_VARIABLE:
case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
- CopyMem (&BrowserStorage->Guid, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Guid, sizeof (EFI_GUID));
- CopyMem (&BrowserStorage->Attributes, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Attributes, sizeof (UINT32));
- CopyMem (&BrowserStorage->Size, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Size, sizeof (UINT16));
+ CopyMem(&BrowserStorage->Guid, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Guid, sizeof (EFI_GUID));
+ CopyMem(&BrowserStorage->Attributes, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Attributes, sizeof (UINT32));
+ CopyMem(&BrowserStorage->Size, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Size, sizeof (UINT16));
if (StorageType == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
BrowserStorage->Buffer = AllocateZeroPool(BrowserStorage->Size);
@@ -352,7 +352,7 @@ IntializeBrowserStorage (
break;
case EFI_HII_VARSTORE_NAME_VALUE:
- CopyMem (&BrowserStorage->Guid, &((EFI_IFR_VARSTORE_NAME_VALUE *) OpCodeData)->Guid, sizeof (EFI_GUID));
+ CopyMem(&BrowserStorage->Guid, &((EFI_IFR_VARSTORE_NAME_VALUE *) OpCodeData)->Guid, sizeof (EFI_GUID));
InitializeListHead (&BrowserStorage->NameValueListHead);
break;
@@ -626,7 +626,7 @@ InitializeRequestElement (
NewStr = AllocateZeroPool(MaxLen * sizeof (CHAR16));
ASSERT (NewStr != NULL);
if (FormsetStorage->ConfigRequest != NULL) {
- CopyMem (NewStr, FormsetStorage->ConfigRequest, StringSize);
+ CopyMem(NewStr, FormsetStorage->ConfigRequest, StringSize);
FreePool(FormsetStorage->ConfigRequest);
}
FormsetStorage->ConfigRequest = NewStr;
@@ -678,7 +678,7 @@ InitializeRequestElement (
NewStr = AllocateZeroPool(MaxLen * sizeof (CHAR16));
ASSERT (NewStr != NULL);
if (ConfigInfo->ConfigRequest != NULL) {
- CopyMem (NewStr, ConfigInfo->ConfigRequest, StringSize);
+ CopyMem(NewStr, ConfigInfo->ConfigRequest, StringSize);
FreePool(ConfigInfo->ConfigRequest);
}
ConfigInfo->ConfigRequest = NewStr;
@@ -1326,20 +1326,20 @@ ParseOpCodes (
switch (Operand) {
case EFI_IFR_EQ_ID_VAL_OP:
- CopyMem (&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_VAL *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
+ CopyMem(&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_VAL *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
Value->Type = EFI_IFR_TYPE_NUM_SIZE_16;
- CopyMem (&Value->Value.u16, &((EFI_IFR_EQ_ID_VAL *) OpCodeData)->Value, sizeof (UINT16));
+ CopyMem(&Value->Value.u16, &((EFI_IFR_EQ_ID_VAL *) OpCodeData)->Value, sizeof (UINT16));
break;
case EFI_IFR_EQ_ID_ID_OP:
- CopyMem (&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_ID *) OpCodeData)->QuestionId1, sizeof (EFI_QUESTION_ID));
- CopyMem (&ExpressionOpCode->QuestionId2, &((EFI_IFR_EQ_ID_ID *) OpCodeData)->QuestionId2, sizeof (EFI_QUESTION_ID));
+ CopyMem(&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_ID *) OpCodeData)->QuestionId1, sizeof (EFI_QUESTION_ID));
+ CopyMem(&ExpressionOpCode->QuestionId2, &((EFI_IFR_EQ_ID_ID *) OpCodeData)->QuestionId2, sizeof (EFI_QUESTION_ID));
break;
case EFI_IFR_EQ_ID_VAL_LIST_OP:
- CopyMem (&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
- CopyMem (&ExpressionOpCode->ListLength, &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->ListLength, sizeof (UINT16));
+ CopyMem(&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
+ CopyMem(&ExpressionOpCode->ListLength, &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->ListLength, sizeof (UINT16));
ExpressionOpCode->ValueList = AllocateCopyPool(ExpressionOpCode->ListLength * sizeof (UINT16), &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->ValueList);
break;
@@ -1350,7 +1350,7 @@ ParseOpCodes (
case EFI_IFR_STRING_REF1_OP:
Value->Type = EFI_IFR_TYPE_STRING;
- CopyMem (&Value->Value.string, &(( EFI_IFR_STRING_REF1 *) OpCodeData)->StringId, sizeof (EFI_STRING_ID));
+ CopyMem(&Value->Value.string, &(( EFI_IFR_STRING_REF1 *) OpCodeData)->StringId, sizeof (EFI_STRING_ID));
break;
case EFI_IFR_RULE_REF_OP:
@@ -1367,16 +1367,16 @@ ParseOpCodes (
break;
case EFI_IFR_SECURITY_OP:
- CopyMem (&ExpressionOpCode->Guid, &((EFI_IFR_SECURITY *) OpCodeData)->Permissions, sizeof (EFI_GUID));
+ CopyMem(&ExpressionOpCode->Guid, &((EFI_IFR_SECURITY *) OpCodeData)->Permissions, sizeof (EFI_GUID));
break;
case EFI_IFR_MATCH2_OP:
- CopyMem (&ExpressionOpCode->Guid, &((EFI_IFR_MATCH2 *) OpCodeData)->SyntaxType, sizeof (EFI_GUID));
+ CopyMem(&ExpressionOpCode->Guid, &((EFI_IFR_MATCH2 *) OpCodeData)->SyntaxType, sizeof (EFI_GUID));
break;
case EFI_IFR_GET_OP:
case EFI_IFR_SET_OP:
- CopyMem (&TempVarstoreId, &((EFI_IFR_GET *) OpCodeData)->VarStoreId, sizeof (TempVarstoreId));
+ CopyMem(&TempVarstoreId, &((EFI_IFR_GET *) OpCodeData)->VarStoreId, sizeof (TempVarstoreId));
if (TempVarstoreId != 0) {
if (FormSet->StorageListHead.ForwardLink != NULL) {
Link = GetFirstNode (&FormSet->StorageListHead);
@@ -1438,8 +1438,8 @@ ParseOpCodes (
//
return EFI_INVALID_PARAMETER;
}
- CopyMem (&ExpressionOpCode->VarStoreInfo.VarName, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarName, sizeof (EFI_STRING_ID));
- CopyMem (&ExpressionOpCode->VarStoreInfo.VarOffset, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarOffset, sizeof (UINT16));
+ CopyMem(&ExpressionOpCode->VarStoreInfo.VarName, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarName, sizeof (EFI_STRING_ID));
+ CopyMem(&ExpressionOpCode->VarStoreInfo.VarOffset, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarOffset, sizeof (UINT16));
if ((ExpressionOpCode->VarStorage != NULL) &&
(ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_NAME_VALUE ||
ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE)) {
@@ -1454,15 +1454,15 @@ ParseOpCodes (
break;
case EFI_IFR_QUESTION_REF1_OP:
- CopyMem (&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
+ CopyMem(&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
break;
case EFI_IFR_QUESTION_REF3_OP:
if (OpCodeLength >= sizeof (EFI_IFR_QUESTION_REF3_2)) {
- CopyMem (&ExpressionOpCode->DevicePath, &(( EFI_IFR_QUESTION_REF3_2 *) OpCodeData)->DevicePath, sizeof (EFI_STRING_ID));
+ CopyMem(&ExpressionOpCode->DevicePath, &(( EFI_IFR_QUESTION_REF3_2 *) OpCodeData)->DevicePath, sizeof (EFI_STRING_ID));
if (OpCodeLength >= sizeof (EFI_IFR_QUESTION_REF3_3)) {
- CopyMem (&ExpressionOpCode->Guid, &(( EFI_IFR_QUESTION_REF3_3 *) OpCodeData)->Guid, sizeof (EFI_GUID));
+ CopyMem(&ExpressionOpCode->Guid, &(( EFI_IFR_QUESTION_REF3_3 *) OpCodeData)->Guid, sizeof (EFI_GUID));
}
}
break;
@@ -1502,17 +1502,17 @@ ParseOpCodes (
case EFI_IFR_UINT16_OP:
Value->Type = EFI_IFR_TYPE_NUM_SIZE_16;
- CopyMem (&Value->Value.u16, &(( EFI_IFR_UINT16 *) OpCodeData)->Value, sizeof (UINT16));
+ CopyMem(&Value->Value.u16, &(( EFI_IFR_UINT16 *) OpCodeData)->Value, sizeof (UINT16));
break;
case EFI_IFR_UINT32_OP:
Value->Type = EFI_IFR_TYPE_NUM_SIZE_32;
- CopyMem (&Value->Value.u32, &(( EFI_IFR_UINT32 *) OpCodeData)->Value, sizeof (UINT32));
+ CopyMem(&Value->Value.u32, &(( EFI_IFR_UINT32 *) OpCodeData)->Value, sizeof (UINT32));
break;
case EFI_IFR_UINT64_OP:
Value->Type = EFI_IFR_TYPE_NUM_SIZE_64;
- CopyMem (&Value->Value.u64, &(( EFI_IFR_UINT64 *) OpCodeData)->Value, sizeof (UINT64));
+ CopyMem(&Value->Value.u64, &(( EFI_IFR_UINT64 *) OpCodeData)->Value, sizeof (UINT64));
break;
case EFI_IFR_UNDEFINED_OP:
@@ -1597,8 +1597,8 @@ ParseOpCodes (
return EFI_INVALID_PARAMETER;
}
- CopyMem (&FormSet->FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
- CopyMem (&FormSet->Help, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
+ CopyMem(&FormSet->FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
+ CopyMem(&FormSet->Help, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
FormSet->OpCode = (EFI_IFR_OP_HEADER *) OpCodeData;//save the opcode address of formset
if (OpCodeLength > OFFSET_OF (EFI_IFR_FORM_SET, Flags)) {
@@ -1606,7 +1606,7 @@ ParseOpCodes (
// The formset OpCode contains ClassGuid
//
FormSet->NumberOfClassGuid = (UINT8) (((EFI_IFR_FORM_SET *) OpCodeData)->Flags & 0x3);
- CopyMem (FormSet->ClassGuid, OpCodeData + sizeof (EFI_IFR_FORM_SET), FormSet->NumberOfClassGuid * sizeof (EFI_GUID));
+ CopyMem(FormSet->ClassGuid, OpCodeData + sizeof (EFI_IFR_FORM_SET), FormSet->NumberOfClassGuid * sizeof (EFI_GUID));
}
break;
@@ -1623,8 +1623,8 @@ ParseOpCodes (
InitializeListHead (&CurrentForm->FormViewListHead);
CurrentForm->FormType = STANDARD_MAP_FORM_TYPE;
- CopyMem (&CurrentForm->FormId, &((EFI_IFR_FORM *) OpCodeData)->FormId, sizeof (UINT16));
- CopyMem (&CurrentForm->FormTitle, &((EFI_IFR_FORM *) OpCodeData)->FormTitle, sizeof (EFI_STRING_ID));
+ CopyMem(&CurrentForm->FormId, &((EFI_IFR_FORM *) OpCodeData)->FormId, sizeof (UINT16));
+ CopyMem(&CurrentForm->FormTitle, &((EFI_IFR_FORM *) OpCodeData)->FormTitle, sizeof (EFI_STRING_ID));
ConditionalExprCount = GetConditionalExpressionCount(ExpressForm);
if ( ConditionalExprCount > 0) {
@@ -1636,7 +1636,7 @@ ParseOpCodes (
ASSERT (CurrentForm->SuppressExpression != NULL);
CurrentForm->SuppressExpression->Count = (UINTN) ConditionalExprCount;
CurrentForm->SuppressExpression->Signature = FORM_EXPRESSION_LIST_SIGNATURE;
- CopyMem (CurrentForm->SuppressExpression->Expression, GetConditionalExpressionList(ExpressForm), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));
+ CopyMem(CurrentForm->SuppressExpression->Expression, GetConditionalExpressionList(ExpressForm), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));
}
if (Scope != 0) {
@@ -1664,7 +1664,7 @@ ParseOpCodes (
InitializeListHead (&CurrentForm->ConfigRequestHead);
InitializeListHead (&CurrentForm->FormViewListHead);
- CopyMem (&CurrentForm->FormId, &((EFI_IFR_FORM *) OpCodeData)->FormId, sizeof (UINT16));
+ CopyMem(&CurrentForm->FormId, &((EFI_IFR_FORM *) OpCodeData)->FormId, sizeof (UINT16));
MapMethod = (EFI_IFR_FORM_MAP_METHOD *) (OpCodeData + sizeof (EFI_IFR_FORM_MAP));
//
@@ -1678,7 +1678,7 @@ ParseOpCodes (
//
while (((UINTN) (UINT8 *) MapMethod - (UINTN) OpCodeData) < ((EFI_IFR_OP_HEADER *) OpCodeData)->Length) {
if (CompareGuid ((EFI_GUID *) (VOID *) &MapMethod->MethodIdentifier, &gEfiHiiStandardFormGuid)) {
- CopyMem (&CurrentForm->FormTitle, &MapMethod->MethodTitle, sizeof (EFI_STRING_ID));
+ CopyMem(&CurrentForm->FormTitle, &MapMethod->MethodTitle, sizeof (EFI_STRING_ID));
CurrentForm->FormType = STANDARD_MAP_FORM_TYPE;
break;
}
@@ -1689,7 +1689,7 @@ ParseOpCodes (
//
if (CurrentForm->FormTitle == 0) {
MapMethod = (EFI_IFR_FORM_MAP_METHOD *) (OpCodeData + sizeof (EFI_IFR_FORM_MAP));
- CopyMem (&CurrentForm->FormTitle, &MapMethod->MethodTitle, sizeof (EFI_STRING_ID));
+ CopyMem(&CurrentForm->FormTitle, &MapMethod->MethodTitle, sizeof (EFI_STRING_ID));
}
ConditionalExprCount = GetConditionalExpressionCount(ExpressForm);
@@ -1702,7 +1702,7 @@ ParseOpCodes (
ASSERT (CurrentForm->SuppressExpression != NULL);
CurrentForm->SuppressExpression->Count = (UINTN) ConditionalExprCount;
CurrentForm->SuppressExpression->Signature = FORM_EXPRESSION_LIST_SIGNATURE;
- CopyMem (CurrentForm->SuppressExpression->Expression, GetConditionalExpressionList(ExpressForm), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));
+ CopyMem(CurrentForm->SuppressExpression->Expression, GetConditionalExpressionList(ExpressForm), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));
}
if (Scope != 0) {
@@ -1726,7 +1726,7 @@ ParseOpCodes (
// Create a buffer Storage for this FormSet
//
Storage = CreateStorage (FormSet, EFI_HII_VARSTORE_BUFFER, OpCodeData);
- CopyMem (&Storage->VarStoreId, &((EFI_IFR_VARSTORE *) OpCodeData)->VarStoreId, sizeof (EFI_VARSTORE_ID));
+ CopyMem(&Storage->VarStoreId, &((EFI_IFR_VARSTORE *) OpCodeData)->VarStoreId, sizeof (EFI_VARSTORE_ID));
break;
case EFI_IFR_VARSTORE_NAME_VALUE_OP:
@@ -1734,7 +1734,7 @@ ParseOpCodes (
// Create a name/value Storage for this FormSet
//
Storage = CreateStorage (FormSet, EFI_HII_VARSTORE_NAME_VALUE, OpCodeData);
- CopyMem (&Storage->VarStoreId, &((EFI_IFR_VARSTORE_NAME_VALUE *) OpCodeData)->VarStoreId, sizeof (EFI_VARSTORE_ID));
+ CopyMem(&Storage->VarStoreId, &((EFI_IFR_VARSTORE_NAME_VALUE *) OpCodeData)->VarStoreId, sizeof (EFI_VARSTORE_ID));
break;
case EFI_IFR_VARSTORE_EFI_OP:
@@ -1752,7 +1752,7 @@ ParseOpCodes (
//
Storage = CreateStorage (FormSet, EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER, OpCodeData);
}
- CopyMem (&Storage->VarStoreId, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->VarStoreId, sizeof (EFI_VARSTORE_ID));
+ CopyMem(&Storage->VarStoreId, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->VarStoreId, sizeof (EFI_VARSTORE_ID));
break;
//
@@ -1764,8 +1764,8 @@ ParseOpCodes (
ASSERT (DefaultStore != NULL);
DefaultStore->Signature = FORMSET_DEFAULTSTORE_SIGNATURE;
- CopyMem (&DefaultStore->DefaultId, &((EFI_IFR_DEFAULTSTORE *) OpCodeData)->DefaultId, sizeof (UINT16));
- CopyMem (&DefaultStore->DefaultName, &((EFI_IFR_DEFAULTSTORE *) OpCodeData)->DefaultName, sizeof (EFI_STRING_ID));
+ CopyMem(&DefaultStore->DefaultId, &((EFI_IFR_DEFAULTSTORE *) OpCodeData)->DefaultId, sizeof (UINT16));
+ CopyMem(&DefaultStore->DefaultName, &((EFI_IFR_DEFAULTSTORE *) OpCodeData)->DefaultName, sizeof (EFI_STRING_ID));
//
// Insert it to the DefaultStore list of this Formset with ascending order.
//
@@ -1801,14 +1801,14 @@ ParseOpCodes (
CurrentStatement = CreateStatement (OpCodeData, FormSet, CurrentForm);
ASSERT (CurrentStatement != NULL);
CurrentStatement->FakeQuestionId = mUsedQuestionId++;
- CopyMem (&CurrentStatement->TextTwo, &((EFI_IFR_TEXT *) OpCodeData)->TextTwo, sizeof (EFI_STRING_ID));
+ CopyMem(&CurrentStatement->TextTwo, &((EFI_IFR_TEXT *) OpCodeData)->TextTwo, sizeof (EFI_STRING_ID));
break;
case EFI_IFR_RESET_BUTTON_OP:
CurrentStatement = CreateStatement (OpCodeData, FormSet, CurrentForm);
ASSERT (CurrentStatement != NULL);
CurrentStatement->FakeQuestionId = mUsedQuestionId++;
- CopyMem (&CurrentStatement->DefaultId, &((EFI_IFR_RESET_BUTTON *) OpCodeData)->DefaultId, sizeof (EFI_DEFAULT_ID));
+ CopyMem(&CurrentStatement->DefaultId, &((EFI_IFR_RESET_BUTTON *) OpCodeData)->DefaultId, sizeof (EFI_DEFAULT_ID));
break;
//
@@ -1825,7 +1825,7 @@ ParseOpCodes (
//
CurrentStatement->QuestionConfig = 0;
} else {
- CopyMem (&CurrentStatement->QuestionConfig, &((EFI_IFR_ACTION *) OpCodeData)->QuestionConfig, sizeof (EFI_STRING_ID));
+ CopyMem(&CurrentStatement->QuestionConfig, &((EFI_IFR_ACTION *) OpCodeData)->QuestionConfig, sizeof (EFI_STRING_ID));
}
break;
@@ -1835,16 +1835,16 @@ ParseOpCodes (
Value = &CurrentStatement->HiiValue;
Value->Type = EFI_IFR_TYPE_REF;
if (OpCodeLength >= sizeof (EFI_IFR_REF)) {
- CopyMem (&Value->Value.ref.FormId, &((EFI_IFR_REF *) OpCodeData)->FormId, sizeof (EFI_FORM_ID));
+ CopyMem(&Value->Value.ref.FormId, &((EFI_IFR_REF *) OpCodeData)->FormId, sizeof (EFI_FORM_ID));
if (OpCodeLength >= sizeof (EFI_IFR_REF2)) {
- CopyMem (&Value->Value.ref.QuestionId, &((EFI_IFR_REF2 *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
+ CopyMem(&Value->Value.ref.QuestionId, &((EFI_IFR_REF2 *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
if (OpCodeLength >= sizeof (EFI_IFR_REF3)) {
- CopyMem (&Value->Value.ref.FormSetGuid, &((EFI_IFR_REF3 *) OpCodeData)->FormSetId, sizeof (EFI_GUID));
+ CopyMem(&Value->Value.ref.FormSetGuid, &((EFI_IFR_REF3 *) OpCodeData)->FormSetId, sizeof (EFI_GUID));
if (OpCodeLength >= sizeof (EFI_IFR_REF4)) {
- CopyMem (&Value->Value.ref.DevicePath, &((EFI_IFR_REF4 *) OpCodeData)->DevicePath, sizeof (EFI_STRING_ID));
+ CopyMem(&Value->Value.ref.DevicePath, &((EFI_IFR_REF4 *) OpCodeData)->DevicePath, sizeof (EFI_STRING_ID));
}
}
}
@@ -1922,25 +1922,25 @@ ParseOpCodes (
break;
case EFI_IFR_NUMERIC_SIZE_2:
- CopyMem (&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.MinValue, sizeof (UINT16));
- CopyMem (&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.MaxValue, sizeof (UINT16));
- CopyMem (&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.Step, sizeof (UINT16));
+ CopyMem(&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.MinValue, sizeof (UINT16));
+ CopyMem(&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.MaxValue, sizeof (UINT16));
+ CopyMem(&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.Step, sizeof (UINT16));
CurrentStatement->StorageWidth = (UINT16) sizeof (UINT16);
Value->Type = EFI_IFR_TYPE_NUM_SIZE_16;
break;
case EFI_IFR_NUMERIC_SIZE_4:
- CopyMem (&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.MinValue, sizeof (UINT32));
- CopyMem (&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.MaxValue, sizeof (UINT32));
- CopyMem (&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.Step, sizeof (UINT32));
+ CopyMem(&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.MinValue, sizeof (UINT32));
+ CopyMem(&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.MaxValue, sizeof (UINT32));
+ CopyMem(&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.Step, sizeof (UINT32));
CurrentStatement->StorageWidth = (UINT16) sizeof (UINT32);
Value->Type = EFI_IFR_TYPE_NUM_SIZE_32;
break;
case EFI_IFR_NUMERIC_SIZE_8:
- CopyMem (&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.MinValue, sizeof (UINT64));
- CopyMem (&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.MaxValue, sizeof (UINT64));
- CopyMem (&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.Step, sizeof (UINT64));
+ CopyMem(&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.MinValue, sizeof (UINT64));
+ CopyMem(&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.MaxValue, sizeof (UINT64));
+ CopyMem(&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.Step, sizeof (UINT64));
CurrentStatement->StorageWidth = (UINT16) sizeof (UINT64);
Value->Type = EFI_IFR_TYPE_NUM_SIZE_64;
break;
@@ -2023,8 +2023,8 @@ ParseOpCodes (
// MaxSize is the maximum number of characters that can be accepted for this opcode.
// The characters are stored as Unicode, so the storage width should multiply 2.
//
- CopyMem (&CurrentStatement->Minimum, &((EFI_IFR_PASSWORD *) OpCodeData)->MinSize, sizeof (UINT16));
- CopyMem (&CurrentStatement->Maximum, &((EFI_IFR_PASSWORD *) OpCodeData)->MaxSize, sizeof (UINT16));
+ CopyMem(&CurrentStatement->Minimum, &((EFI_IFR_PASSWORD *) OpCodeData)->MinSize, sizeof (UINT16));
+ CopyMem(&CurrentStatement->Maximum, &((EFI_IFR_PASSWORD *) OpCodeData)->MaxSize, sizeof (UINT16));
CurrentStatement->StorageWidth = (UINT16)((UINTN) CurrentStatement->Maximum * sizeof (CHAR16));
CurrentStatement->HiiValue.Type = EFI_IFR_TYPE_STRING;
@@ -2088,13 +2088,13 @@ ParseOpCodes (
CurrentDefault->Signature = QUESTION_DEFAULT_SIGNATURE;
CurrentDefault->Value.Type = ((EFI_IFR_DEFAULT *) OpCodeData)->Type;
- CopyMem (&CurrentDefault->DefaultId, &((EFI_IFR_DEFAULT *) OpCodeData)->DefaultId, sizeof (UINT16));
+ CopyMem(&CurrentDefault->DefaultId, &((EFI_IFR_DEFAULT *) OpCodeData)->DefaultId, sizeof (UINT16));
if (CurrentDefault->Value.Type == EFI_IFR_TYPE_BUFFER) {
CurrentDefault->Value.BufferLen = (UINT16) (OpCodeLength - OFFSET_OF (EFI_IFR_DEFAULT, Value));
CurrentDefault->Value.Buffer = AllocateCopyPool(CurrentDefault->Value.BufferLen, &((EFI_IFR_DEFAULT *) OpCodeData)->Value);
ASSERT (CurrentDefault->Value.Buffer != NULL);
} else {
- CopyMem (&CurrentDefault->Value.Value, &((EFI_IFR_DEFAULT *) OpCodeData)->Value, OpCodeLength - OFFSET_OF (EFI_IFR_DEFAULT, Value));
+ CopyMem(&CurrentDefault->Value.Value, &((EFI_IFR_DEFAULT *) OpCodeData)->Value, OpCodeLength - OFFSET_OF (EFI_IFR_DEFAULT, Value));
ExtendValueToU64 (&CurrentDefault->Value);
}
@@ -2150,8 +2150,8 @@ ParseOpCodes (
CurrentOption->Flags = ((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Flags;
CurrentOption->Value.Type = ((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Type;
- CopyMem (&CurrentOption->Text, &((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Option, sizeof (EFI_STRING_ID));
- CopyMem (&CurrentOption->Value.Value, &((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Value, OpCodeLength - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
+ CopyMem(&CurrentOption->Text, &((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Option, sizeof (EFI_STRING_ID));
+ CopyMem(&CurrentOption->Value.Value, &((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Value, OpCodeLength - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
ExtendValueToU64 (&CurrentOption->Value);
ConditionalExprCount = GetConditionalExpressionCount(ExpressOption);
@@ -2164,7 +2164,7 @@ ParseOpCodes (
ASSERT (CurrentOption->SuppressExpression != NULL);
CurrentOption->SuppressExpression->Count = (UINTN) ConditionalExprCount;
CurrentOption->SuppressExpression->Signature = FORM_EXPRESSION_LIST_SIGNATURE;
- CopyMem (CurrentOption->SuppressExpression->Expression, GetConditionalExpressionList(ExpressOption), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));
+ CopyMem(CurrentOption->SuppressExpression->Expression, GetConditionalExpressionList(ExpressOption), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));
}
//
@@ -2221,7 +2221,7 @@ ParseOpCodes (
// Create an Expression node
//
CurrentExpression = CreateExpression (CurrentForm, OpCodeData);
- CopyMem (&CurrentExpression->Error, &((EFI_IFR_INCONSISTENT_IF *) OpCodeData)->Error, sizeof (EFI_STRING_ID));
+ CopyMem(&CurrentExpression->Error, &((EFI_IFR_INCONSISTENT_IF *) OpCodeData)->Error, sizeof (EFI_STRING_ID));
if (Operand == EFI_IFR_NO_SUBMIT_IF_OP) {
CurrentExpression->Type = EFI_HII_EXPRESSION_NO_SUBMIT_IF;
@@ -2245,7 +2245,7 @@ ParseOpCodes (
// Create an Expression node
//
CurrentExpression = CreateExpression (CurrentForm, OpCodeData);
- CopyMem (&CurrentExpression->Error, &((EFI_IFR_WARNING_IF *) OpCodeData)->Warning, sizeof (EFI_STRING_ID));
+ CopyMem(&CurrentExpression->Error, &((EFI_IFR_WARNING_IF *) OpCodeData)->Warning, sizeof (EFI_STRING_ID));
CurrentExpression->TimeOut = ((EFI_IFR_WARNING_IF *) OpCodeData)->TimeOut;
CurrentExpression->Type = EFI_HII_EXPRESSION_WARNING_IF;
InsertTailList (&ParentStatement->WarningListHead, &CurrentExpression->Link);
@@ -2470,7 +2470,7 @@ ParseOpCodes (
}
ASSERT (ImageId != NULL);
- CopyMem (ImageId, &((EFI_IFR_IMAGE *) OpCodeData)->Id, sizeof (EFI_IMAGE_ID));
+ CopyMem(ImageId, &((EFI_IFR_IMAGE *) OpCodeData)->Id, sizeof (EFI_IMAGE_ID));
break;
//
@@ -2495,12 +2495,12 @@ ParseOpCodes (
case EFI_IFR_FORM_OP:
case EFI_IFR_FORM_MAP_OP:
ASSERT (CurrentForm != NULL);
- CopyMem (&CurrentForm->RefreshGuid, &((EFI_IFR_REFRESH_ID *) OpCodeData)->RefreshEventGroupId, sizeof (EFI_GUID));
+ CopyMem(&CurrentForm->RefreshGuid, &((EFI_IFR_REFRESH_ID *) OpCodeData)->RefreshEventGroupId, sizeof (EFI_GUID));
break;
default:
ASSERT (ParentStatement != NULL);
- CopyMem (&ParentStatement->RefreshGuid, &((EFI_IFR_REFRESH_ID *) OpCodeData)->RefreshEventGroupId, sizeof (EFI_GUID));
+ CopyMem(&ParentStatement->RefreshGuid, &((EFI_IFR_REFRESH_ID *) OpCodeData)->RefreshEventGroupId, sizeof (EFI_GUID));
break;
}
break;
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index 611807dcc..68f11039c 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -337,7 +337,7 @@ InitializeDisplayStatement (
InsertTailList(&DisplayStatement->OptionListHead, &DisplayOption->Link);
}
- CopyMem (&DisplayStatement->CurrentValue, &Statement->HiiValue, sizeof (EFI_HII_VALUE));
+ CopyMem(&DisplayStatement->CurrentValue, &Statement->HiiValue, sizeof (EFI_HII_VALUE));
//
// Some special op code need an extra buffer to save the data.
@@ -1094,11 +1094,11 @@ GetFormsetGuidFromHiiHandle (
//
Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
Offset2 = 0;
- CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
+ CopyMem(&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
while (Offset < PackageListLength) {
Package = ((UINT8 *) HiiPackageList) + Offset;
- CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
Offset += PackageHeader.Length;
if (PackageHeader.Type == EFI_HII_PACKAGE_FORMS) {
@@ -1325,7 +1325,7 @@ FindParentFormSet (
ParentMenu = UiFindParentMenu(CurrentMenu, FormSetLevel);
if (ParentMenu != NULL) {
- CopyMem (&Selection->FormSetGuid, &ParentMenu->FormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&Selection->FormSetGuid, &ParentMenu->FormSetGuid, sizeof (EFI_GUID));
Selection->Handle = ParentMenu->HiiHandle;
Selection->FormId = ParentMenu->FormId;
Selection->QuestionId = ParentMenu->QuestionId;
@@ -1418,7 +1418,7 @@ ProcessGotoOpCode (
return EFI_SUCCESS;
}
- CopyMem (&Selection->FormSetGuid,&Statement->HiiValue.Value.ref.FormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&Selection->FormSetGuid,&Statement->HiiValue.Value.ref.FormSetGuid, sizeof (EFI_GUID));
Selection->FormId = Statement->HiiValue.Value.ref.FormId;
Selection->QuestionId = Statement->HiiValue.Value.ref.QuestionId;
} else if (!IsZeroGuid (&Statement->HiiValue.Value.ref.FormSetGuid)) {
@@ -1447,7 +1447,7 @@ ProcessGotoOpCode (
return EFI_SUCCESS;
}
- CopyMem (&Selection->FormSetGuid, &Statement->HiiValue.Value.ref.FormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&Selection->FormSetGuid, &Statement->HiiValue.Value.ref.FormSetGuid, sizeof (EFI_GUID));
Selection->FormId = Statement->HiiValue.Value.ref.FormId;
Selection->QuestionId = Statement->HiiValue.Value.ref.QuestionId;
} else if (Statement->HiiValue.Value.ref.FormId != 0) {
@@ -1612,7 +1612,7 @@ ProcessUserInput (
case EFI_IFR_STRING_OP:
DeleteString(Statement->HiiValue.Value.string, gCurrentSelection->FormSet->HiiHandle);
Statement->HiiValue.Value.string = UserInput->InputValue.Value.string;
- CopyMem (Statement->BufferValue, UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen);
+ CopyMem(Statement->BufferValue, UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen);
FreePool(UserInput->InputValue.Buffer);
break;
@@ -1626,7 +1626,7 @@ ProcessUserInput (
DeleteString(Statement->HiiValue.Value.string, gCurrentSelection->FormSet->HiiHandle);
Statement->HiiValue.Value.string = UserInput->InputValue.Value.string;
- CopyMem (Statement->BufferValue, UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen);
+ CopyMem(Statement->BufferValue, UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen);
ZeroMem (UserInput->InputValue.Buffer, (UINTN) UserInput->InputValue.BufferLen);
FreePool(UserInput->InputValue.Buffer);
//
@@ -1645,11 +1645,11 @@ ProcessUserInput (
break;
case EFI_IFR_ORDERED_LIST_OP:
- CopyMem (Statement->BufferValue, UserInput->InputValue.Buffer, UserInput->InputValue.BufferLen);
+ CopyMem(Statement->BufferValue, UserInput->InputValue.Buffer, UserInput->InputValue.BufferLen);
break;
default:
- CopyMem (&Statement->HiiValue, &UserInput->InputValue, sizeof (EFI_HII_VALUE));
+ CopyMem(&Statement->HiiValue, &UserInput->InputValue, sizeof (EFI_HII_VALUE));
break;
}
break;
@@ -1890,7 +1890,7 @@ FindNextMenu (
Selection->Action = UI_ACTION_REFRESH_FORM;
} else {
Selection->Action = UI_ACTION_REFRESH_FORMSET;
- CopyMem (&Selection->FormSetGuid, &ParentMenu->FormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&Selection->FormSetGuid, &ParentMenu->FormSetGuid, sizeof (EFI_GUID));
Selection->Handle = ParentMenu->HiiHandle;
}
@@ -2035,7 +2035,7 @@ ProcessCallBackFunction (
BackUpBuffer = AllocateCopyPool(Statement->StorageWidth, Statement->BufferValue);
ASSERT (BackUpBuffer != NULL);
} else {
- CopyMem (&BackUpValue, &HiiValue->Value, sizeof (EFI_IFR_TYPE_VALUE));
+ CopyMem(&BackUpValue, &HiiValue->Value, sizeof (EFI_IFR_TYPE_VALUE));
}
}
@@ -2059,9 +2059,9 @@ ProcessCallBackFunction (
ASSERT (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth);
if (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth) {
ZeroMem (Statement->BufferValue, Statement->StorageWidth);
- CopyMem (Statement->BufferValue, NewString, StrSize (NewString));
+ CopyMem(Statement->BufferValue, NewString, StrSize (NewString));
} else {
- CopyMem (Statement->BufferValue, NewString, Statement->StorageWidth);
+ CopyMem(Statement->BufferValue, NewString, Statement->StorageWidth);
}
FreePool(NewString);
}
@@ -2158,9 +2158,9 @@ ProcessCallBackFunction (
//
if (Action == EFI_BROWSER_ACTION_CHANGING && Status == EFI_UNSUPPORTED) {
if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {
- CopyMem (Statement->BufferValue, BackUpBuffer, Statement->StorageWidth);
+ CopyMem(Statement->BufferValue, BackUpBuffer, Statement->StorageWidth);
} else {
- CopyMem (&HiiValue->Value, &BackUpValue, sizeof (EFI_IFR_TYPE_VALUE));
+ CopyMem(&HiiValue->Value, &BackUpValue, sizeof (EFI_IFR_TYPE_VALUE));
}
//
@@ -2310,9 +2310,9 @@ ProcessRetrieveForQuestion (
ASSERT (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth);
if (StrLen (NewString) * sizeof (CHAR16) <= Statement->StorageWidth) {
ZeroMem (Statement->BufferValue, Statement->StorageWidth);
- CopyMem (Statement->BufferValue, NewString, StrSize (NewString));
+ CopyMem(Statement->BufferValue, NewString, StrSize (NewString));
} else {
- CopyMem (Statement->BufferValue, NewString, Statement->StorageWidth);
+ CopyMem(Statement->BufferValue, NewString, Statement->StorageWidth);
}
FreePool(NewString);
}
@@ -2532,7 +2532,7 @@ SetupBrowser (
// Cross reference will not be taken, restore all essential field
//
Selection->Handle = mCurrentHiiHandle;
- CopyMem (&Selection->FormSetGuid, &mCurrentFormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&Selection->FormSetGuid, &mCurrentFormSetGuid, sizeof (EFI_GUID));
Selection->FormId = mCurrentFormId;
Selection->QuestionId = 0;
Selection->Action = UI_ACTION_REFRESH_FORM;
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 5a3240e3c..7e350d775 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -98,7 +98,7 @@ UiAddMenuList (
MenuList->Signature = FORM_ENTRY_INFO_SIGNATURE;
MenuList->HiiHandle = HiiHandle;
- CopyMem (&MenuList->FormSetGuid, FormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&MenuList->FormSetGuid, FormSetGuid, sizeof (EFI_GUID));
MenuList->FormId = FormId;
MenuList->QuestionId = QuestionId;
@@ -308,7 +308,7 @@ UiCopyMenuList (
ASSERT (NewMenuEntry != NULL);
NewMenuEntry->Signature = FORM_ENTRY_INFO_SIGNATURE;
NewMenuEntry->HiiHandle = MenuList->HiiHandle;
- CopyMem (&NewMenuEntry->FormSetGuid, &MenuList->FormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&NewMenuEntry->FormSetGuid, &MenuList->FormSetGuid, sizeof (EFI_GUID));
NewMenuEntry->FormId = MenuList->FormId;
NewMenuEntry->QuestionId = MenuList->QuestionId;
@@ -507,10 +507,10 @@ SendForm (
Selection->Handle = Handles[Index];
if (FormSetGuid != NULL) {
- CopyMem (&Selection->FormSetGuid, FormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&Selection->FormSetGuid, FormSetGuid, sizeof (EFI_GUID));
Selection->FormId = FormId;
} else {
- CopyMem (&Selection->FormSetGuid, &gEfiHiiPlatformSetupFormsetGuid, sizeof (EFI_GUID));
+ CopyMem(&Selection->FormSetGuid, &gEfiHiiPlatformSetupFormsetGuid, sizeof (EFI_GUID));
}
do {
@@ -1384,7 +1384,7 @@ GetBitsQuestionValue (
StartBit = Question->BitVarOffset % 8;
EndBit = StartBit + Question->BitStorageWidth - 1;
- CopyMem ((UINT8 *) &BufferValue, Buffer, Question->StorageWidth);
+ CopyMem((UINT8 *) &BufferValue, Buffer, Question->StorageWidth);
RetVal = BitFieldRead32 (BufferValue, StartBit, EndBit);
@@ -1393,7 +1393,7 @@ GetBitsQuestionValue (
// Note: Since Question with BufferValue (orderedlist, password, string)are not supported to refer bit field.
// Only oneof/checkbox/oneof can support bit field.So we can copy the value to the Hiivalue of Question directly.
//
- CopyMem ((UINT8 *) &Question->HiiValue.Value, (UINT8 *) &RetVal, Question->StorageWidth);
+ CopyMem((UINT8 *) &Question->HiiValue.Value, (UINT8 *) &RetVal, Question->StorageWidth);
}
/**
@@ -1420,11 +1420,11 @@ SetBitsQuestionValue (
StartBit = Question->BitVarOffset % 8;
EndBit = StartBit + Question->BitStorageWidth - 1;
- CopyMem ((UINT8*) &Operand, Buffer, Question->StorageWidth);
+ CopyMem((UINT8*) &Operand, Buffer, Question->StorageWidth);
RetVal = BitFieldWrite32 (Operand, StartBit, EndBit, Value);
- CopyMem (Buffer, (UINT8*) &RetVal, Question->StorageWidth);
+ CopyMem(Buffer, (UINT8*) &RetVal, Question->StorageWidth);
}
/**
@@ -1605,16 +1605,16 @@ GetQuestionValue (
if (Question->ValueExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
ASSERT (Question->HiiValue.Type == EFI_IFR_TYPE_BUFFER && Question->HiiValue.Buffer != NULL);
if (Question->StorageWidth > Question->ValueExpression->Result.BufferLen) {
- CopyMem (Question->HiiValue.Buffer, Question->ValueExpression->Result.Buffer, Question->ValueExpression->Result.BufferLen);
+ CopyMem(Question->HiiValue.Buffer, Question->ValueExpression->Result.Buffer, Question->ValueExpression->Result.BufferLen);
Question->HiiValue.BufferLen = Question->ValueExpression->Result.BufferLen;
} else {
- CopyMem (Question->HiiValue.Buffer, Question->ValueExpression->Result.Buffer, Question->StorageWidth);
+ CopyMem(Question->HiiValue.Buffer, Question->ValueExpression->Result.Buffer, Question->StorageWidth);
Question->HiiValue.BufferLen = Question->StorageWidth;
}
FreePool(Question->ValueExpression->Result.Buffer);
}
Question->HiiValue.Type = Question->ValueExpression->Result.Type;
- CopyMem (&Question->HiiValue.Value, &Question->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
+ CopyMem(&Question->HiiValue.Value, &Question->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
}
return Status;
}
@@ -1632,16 +1632,16 @@ GetQuestionValue (
if (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
ASSERT (Question->HiiValue.Type == EFI_IFR_TYPE_BUFFER && Question->HiiValue.Buffer != NULL);
if (Question->StorageWidth > Question->ReadExpression->Result.BufferLen) {
- CopyMem (Question->HiiValue.Buffer, Question->ReadExpression->Result.Buffer, Question->ReadExpression->Result.BufferLen);
+ CopyMem(Question->HiiValue.Buffer, Question->ReadExpression->Result.Buffer, Question->ReadExpression->Result.BufferLen);
Question->HiiValue.BufferLen = Question->ReadExpression->Result.BufferLen;
} else {
- CopyMem (Question->HiiValue.Buffer, Question->ReadExpression->Result.Buffer, Question->StorageWidth);
+ CopyMem(Question->HiiValue.Buffer, Question->ReadExpression->Result.Buffer, Question->StorageWidth);
Question->HiiValue.BufferLen = Question->StorageWidth;
}
FreePool(Question->ReadExpression->Result.Buffer);
}
Question->HiiValue.Type = Question->ReadExpression->Result.Type;
- CopyMem (&Question->HiiValue.Value, &Question->ReadExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
+ CopyMem(&Question->HiiValue.Value, &Question->ReadExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
return EFI_SUCCESS;
}
}
@@ -1758,7 +1758,7 @@ GetQuestionValue (
if (Question->QuestionReferToBitField) {
GetBitsQuestionValue (Question, Storage->EditBuffer + Question->VarStoreInfo.VarOffset);
} else {
- CopyMem (Dst, Storage->EditBuffer + Question->VarStoreInfo.VarOffset, StorageWidth);
+ CopyMem(Dst, Storage->EditBuffer + Question->VarStoreInfo.VarOffset, StorageWidth);
}
} else {
//
@@ -1768,7 +1768,7 @@ GetQuestionValue (
if (Question->QuestionReferToBitField) {
GetBitsQuestionValue (Question, Storage->Buffer + Question->VarStoreInfo.VarOffset);
} else {
- CopyMem (Dst, Storage->Buffer + Question->VarStoreInfo.VarOffset, StorageWidth);
+ CopyMem(Dst, Storage->Buffer + Question->VarStoreInfo.VarOffset, StorageWidth);
}
}
} else {
@@ -1858,7 +1858,7 @@ GetQuestionValue (
// Synchronize Edit Buffer
//
if (IsBufferStorage) {
- CopyMem (Storage->EditBuffer + Question->VarStoreInfo.VarOffset, Dst, StorageWidth);
+ CopyMem(Storage->EditBuffer + Question->VarStoreInfo.VarOffset, Dst, StorageWidth);
} else {
SetValueByName (Storage, Question->VariableName, Value, GetSetValueWithEditBuffer, NULL);
}
@@ -2040,7 +2040,7 @@ SetQuestionValue (
if (Question->QuestionReferToBitField) {
SetBitsQuestionValue (Question, Storage->EditBuffer + Question->VarStoreInfo.VarOffset, (UINT32)(*Src));
} else {
- CopyMem (Storage->EditBuffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
+ CopyMem(Storage->EditBuffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
}
} else if (SetValueTo == GetSetValueWithBuffer) {
//
@@ -2050,7 +2050,7 @@ SetQuestionValue (
if (Question->QuestionReferToBitField) {
SetBitsQuestionValue (Question, Storage->Buffer + Question->VarStoreInfo.VarOffset, (UINT32)(*Src));
} else {
- CopyMem (Storage->Buffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
+ CopyMem(Storage->Buffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
}
}
} else {
@@ -2197,7 +2197,7 @@ SetQuestionValue (
//
// Sync storage, from editbuffer to buffer.
//
- CopyMem (Storage->Buffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
+ CopyMem(Storage->Buffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
}
return Status;
@@ -2482,7 +2482,7 @@ SynchronizeStorage (
FreePool(Result);
}
} else {
- CopyMem (Dst, Src, BufferSize);
+ CopyMem(Dst, Src, BufferSize);
}
} else if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
Link = GetFirstNode (&Storage->NameValueListHead);
@@ -4271,9 +4271,9 @@ ReGetDefault:
ASSERT (StrLen (NewString) * sizeof (CHAR16) <= Question->StorageWidth);
if (StrLen (NewString) * sizeof (CHAR16) <= Question->StorageWidth) {
ZeroMem (Question->BufferValue, Question->StorageWidth);
- CopyMem (Question->BufferValue, NewString, StrSize (NewString));
+ CopyMem(Question->BufferValue, NewString, StrSize (NewString));
} else {
- CopyMem (Question->BufferValue, NewString, Question->StorageWidth);
+ CopyMem(Question->BufferValue, NewString, Question->StorageWidth);
}
FreePool(NewString);
@@ -4313,25 +4313,25 @@ ReGetDefault:
if (Default->ValueExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
ASSERT (HiiValue->Type == EFI_IFR_TYPE_BUFFER && Question->BufferValue != NULL);
if (Question->StorageWidth > Default->ValueExpression->Result.BufferLen) {
- CopyMem (Question->HiiValue.Buffer, Default->ValueExpression->Result.Buffer, Default->ValueExpression->Result.BufferLen);
+ CopyMem(Question->HiiValue.Buffer, Default->ValueExpression->Result.Buffer, Default->ValueExpression->Result.BufferLen);
Question->HiiValue.BufferLen = Default->ValueExpression->Result.BufferLen;
} else {
- CopyMem (Question->HiiValue.Buffer, Default->ValueExpression->Result.Buffer, Question->StorageWidth);
+ CopyMem(Question->HiiValue.Buffer, Default->ValueExpression->Result.Buffer, Question->StorageWidth);
Question->HiiValue.BufferLen = Question->StorageWidth;
}
FreePool(Default->ValueExpression->Result.Buffer);
}
HiiValue->Type = Default->ValueExpression->Result.Type;
- CopyMem (&HiiValue->Value, &Default->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
+ CopyMem(&HiiValue->Value, &Default->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
} else {
//
// Default value is embedded in EFI_IFR_DEFAULT
//
if (Default->Value.Type == EFI_IFR_TYPE_BUFFER) {
ASSERT (HiiValue->Buffer != NULL);
- CopyMem (HiiValue->Buffer, Default->Value.Buffer, Default->Value.BufferLen);
+ CopyMem(HiiValue->Buffer, Default->Value.Buffer, Default->Value.BufferLen);
} else {
- CopyMem (HiiValue, &Default->Value, sizeof (EFI_HII_VALUE));
+ CopyMem(HiiValue, &Default->Value, sizeof (EFI_HII_VALUE));
}
}
@@ -4342,9 +4342,9 @@ ReGetDefault:
}
if (Question->StorageWidth > StrSize (StrValue)) {
ZeroMem (Question->BufferValue, Question->StorageWidth);
- CopyMem (Question->BufferValue, StrValue, StrSize (StrValue));
+ CopyMem(Question->BufferValue, StrValue, StrSize (StrValue));
} else {
- CopyMem (Question->BufferValue, StrValue, Question->StorageWidth);
+ CopyMem(Question->BufferValue, StrValue, Question->StorageWidth);
}
}
@@ -4376,7 +4376,7 @@ ReGetDefault:
if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Option->Flags & EFI_IFR_OPTION_DEFAULT) != 0)) ||
((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Option->Flags & EFI_IFR_OPTION_DEFAULT_MFG) != 0))
) {
- CopyMem (HiiValue, &Option->Value, sizeof (EFI_HII_VALUE));
+ CopyMem(HiiValue, &Option->Value, sizeof (EFI_HII_VALUE));
return EFI_SUCCESS;
}
@@ -4486,7 +4486,7 @@ ReGetDefault:
continue;
}
- CopyMem (HiiValue, &Option->Value, sizeof (EFI_HII_VALUE));
+ CopyMem(HiiValue, &Option->Value, sizeof (EFI_HII_VALUE));
Status = EFI_SUCCESS;
break;
}
@@ -5000,7 +5000,7 @@ IsQuestionValueChanged (
BufferWidth = 0;
break;
}
- CopyMem (&BackUpValue, &Question->HiiValue, sizeof (EFI_HII_VALUE));
+ CopyMem(&BackUpValue, &Question->HiiValue, sizeof (EFI_HII_VALUE));
if (GetValueFrom == GetSetValueWithBothBuffer) {
Status = GetQuestionValue (FormSet, Form, Question, GetSetValueWithEditBuffer);
@@ -5024,7 +5024,7 @@ IsQuestionValueChanged (
BufferWidth = 0;
break;
}
- CopyMem (&BackUpValue2, &Question->HiiValue, sizeof (EFI_HII_VALUE));
+ CopyMem(&BackUpValue2, &Question->HiiValue, sizeof (EFI_HII_VALUE));
Status = GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
ASSERT_EFI_ERROR(Status);
@@ -5043,9 +5043,9 @@ IsQuestionValueChanged (
}
}
- CopyMem (&Question->HiiValue, &BackUpValue, sizeof (EFI_HII_VALUE));
+ CopyMem(&Question->HiiValue, &BackUpValue, sizeof (EFI_HII_VALUE));
if (BackUpBuffer != NULL) {
- CopyMem (Question->BufferValue, BackUpBuffer, BufferWidth);
+ CopyMem(Question->BufferValue, BackUpBuffer, BufferWidth);
FreePool(BackUpBuffer);
}
@@ -5182,7 +5182,7 @@ RemoveElement (
//
DestStr = NewStr;
NewStr += StrLen (RequestElement);
- CopyMem (DestStr, NewStr, StrSize (NewStr));
+ CopyMem(DestStr, NewStr, StrSize (NewStr));
Storage->SpareStrLen += StrLen (RequestElement);
}
@@ -5363,7 +5363,7 @@ AppendConfigRequest (
ASSERT (NewStr != NULL);
if (*ConfigRequest != NULL) {
- CopyMem (NewStr, *ConfigRequest, StringSize);
+ CopyMem(NewStr, *ConfigRequest, StringSize);
FreePool(*ConfigRequest);
}
*ConfigRequest = NewStr;
@@ -5825,12 +5825,12 @@ GetIfrBinaryData (
//
Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
Offset2 = 0;
- CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
+ CopyMem(&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
ClassGuidMatch = FALSE;
while (Offset < PackageListLength) {
Package = ((UINT8 *) HiiPackageList) + Offset;
- CopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
+ CopyMem(&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
if (PackageHeader.Type == EFI_HII_PACKAGE_FORMS) {
//
@@ -5896,7 +5896,7 @@ GetIfrBinaryData (
//
// Return the FormSet GUID
//
- CopyMem (FormSetGuid, &((EFI_IFR_FORM_SET *) OpCodeData)->Guid, sizeof (EFI_GUID));
+ CopyMem(FormSetGuid, &((EFI_IFR_FORM_SET *) OpCodeData)->Guid, sizeof (EFI_GUID));
}
//
@@ -5949,7 +5949,7 @@ InitializeFormSet (
FormSet->Signature = FORM_BROWSER_FORMSET_SIGNATURE;
FormSet->HiiHandle = Handle;
- CopyMem (&FormSet->Guid, FormSetGuid, sizeof (EFI_GUID));
+ CopyMem(&FormSet->Guid, FormSetGuid, sizeof (EFI_GUID));
FormSet->QuestionInited = FALSE;
//
diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
index bd0c0d92b..c857775da 100644
--- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
+++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
@@ -504,7 +504,7 @@ SmbiosAdd (
SmbiosEntry->Smbios64BitTable = Smbios64BitTable;
InsertTailList (&Private->DataListHead, &SmbiosEntry->Link);
- CopyMem (Raw, Record, StructureSize);
+ CopyMem(Raw, Record, StructureSize);
((EFI_SMBIOS_TABLE_HEADER*)Raw)->Handle = *SmbiosHandle;
//
@@ -737,9 +737,9 @@ SmbiosUpdateString (
//
// Copy SMBIOS structure and optional strings.
//
- CopyMem (Raw, SmbiosEntry->RecordHeader + 1, Record->Length + TargetStrOffset);
- CopyMem ((VOID*)((UINTN)Raw + Record->Length + TargetStrOffset), String, InputStrLen + 1);
- CopyMem ((CHAR8*)((UINTN)Raw + Record->Length + TargetStrOffset + InputStrLen + 1),
+ CopyMem(Raw, SmbiosEntry->RecordHeader + 1, Record->Length + TargetStrOffset);
+ CopyMem((VOID*)((UINTN)Raw + Record->Length + TargetStrOffset), String, InputStrLen + 1);
+ CopyMem((CHAR8*)((UINTN)Raw + Record->Length + TargetStrOffset + InputStrLen + 1),
(CHAR8*)Record + Record->Length + TargetStrOffset + TargetStrLen + 1,
SmbiosEntry->RecordHeader->RecordSize - sizeof (EFI_SMBIOS_RECORD_HEADER) - Record->Length - TargetStrOffset - TargetStrLen - 1);
@@ -1078,7 +1078,7 @@ SmbiosCreateTable (
EntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *) (UINTN) PhysicalAddress;
- CopyMem (
+ CopyMem(
EntryPointStructure,
&EntryPointStructureData,
sizeof (SMBIOS_TABLE_ENTRY_POINT)
@@ -1179,7 +1179,7 @@ SmbiosCreateTable (
if ((Status == EFI_SUCCESS) && (CurrentSmbiosEntry->Smbios32BitTable)) {
GetSmbiosStructureSize(SmbiosProtocol, SmbiosRecord, &RecordSize, &NumOfStr);
- CopyMem (BufferPointer, SmbiosRecord, RecordSize);
+ CopyMem(BufferPointer, SmbiosRecord, RecordSize);
BufferPointer = BufferPointer + RecordSize;
}
} while (!EFI_ERROR(Status));
@@ -1187,7 +1187,7 @@ SmbiosCreateTable (
//
// Assemble End-Of-Table structure
//
- CopyMem (BufferPointer, &EndStructure, sizeof (EndStructure));
+ CopyMem(BufferPointer, &EndStructure, sizeof (EndStructure));
//
// Fixup checksums in the Entry Point Structure
@@ -1261,7 +1261,7 @@ SmbiosCreate64BitTable (
Smbios30EntryPointStructure = (SMBIOS_TABLE_3_0_ENTRY_POINT *) (UINTN) PhysicalAddress;
- CopyMem (
+ CopyMem(
Smbios30EntryPointStructure,
&Smbios30EntryPointStructureData,
sizeof (SMBIOS_TABLE_3_0_ENTRY_POINT)
@@ -1350,7 +1350,7 @@ SmbiosCreate64BitTable (
// This record can be added to 64-bit table
//
GetSmbiosStructureSize(SmbiosProtocol, SmbiosRecord, &RecordSize, &NumOfStr);
- CopyMem (BufferPointer, SmbiosRecord, RecordSize);
+ CopyMem(BufferPointer, SmbiosRecord, RecordSize);
BufferPointer = BufferPointer + RecordSize;
}
} while (!EFI_ERROR(Status));
@@ -1358,7 +1358,7 @@ SmbiosCreate64BitTable (
//
// Assemble End-Of-Table structure
//
- CopyMem (BufferPointer, &EndStructure, sizeof (EndStructure));
+ CopyMem(BufferPointer, &EndStructure, sizeof (EndStructure));
//
// Fixup checksums in the Entry Point Structure
diff --git a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
index fea319626..179e1cb80 100644
--- a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
+++ b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
@@ -292,13 +292,13 @@ FilterSmbiosEntry (
// The field is present in the SMBIOS entry.
//
if ((Filter[Index].Flags & SMBIOS_FILTER_TABLE_FLAG_IS_STRING) != 0) {
- CopyMem (&StringId, (UINT8 *)TableEntry + Filter[Index].Offset, sizeof(StringId));
+ CopyMem(&StringId, (UINT8 *)TableEntry + Filter[Index].Offset, sizeof(StringId));
if (StringId != 0) {
// set ' ' for string field
String = GetSmbiosStringById (TableEntry, StringId, &StringLen);
ASSERT (String != NULL);
//DEBUG ((EFI_D_INFO,"StrId(0x%x)-%a(%d)\n", StringId, String, StringLen));
- SetMem (String, StringLen, ' ');
+ SetMem(String, StringLen, ' ');
}
}
// zero non-string field
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index 263f114c5..55684ef54 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.c
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c
@@ -717,11 +717,11 @@ GetVariableHeader (
//
// Partial content is in NV storage.
//
- CopyMem ((UINT8 *) *VariableHeader, (UINT8 *) Variable, PartialHeaderSize);
+ CopyMem((UINT8 *) *VariableHeader, (UINT8 *) Variable, PartialHeaderSize);
//
// Another partial content is in spare block.
//
- CopyMem ((UINT8 *) *VariableHeader + PartialHeaderSize, (UINT8 *) (UINTN) SpareAddress, GetVariableHeaderSize (StoreInfo->AuthFlag) - PartialHeaderSize);
+ CopyMem((UINT8 *) *VariableHeader + PartialHeaderSize, (UINT8 *) (UINTN) SpareAddress, GetVariableHeaderSize (StoreInfo->AuthFlag) - PartialHeaderSize);
}
}
} else {
@@ -768,11 +768,11 @@ GetVariableNameOrData (
//
// Partial content is in NV storage.
//
- CopyMem (Buffer, NameOrData, PartialSize);
+ CopyMem(Buffer, NameOrData, PartialSize);
//
// Another partial content is in spare block.
//
- CopyMem (Buffer + PartialSize, (UINT8 *) (UINTN) SpareAddress, Size - PartialSize);
+ CopyMem(Buffer + PartialSize, (UINT8 *) (UINTN) SpareAddress, Size - PartialSize);
return;
}
}
@@ -780,7 +780,7 @@ GetVariableNameOrData (
//
// Variable name/data is consecutive.
//
- CopyMem (Buffer, NameOrData, Size);
+ CopyMem(Buffer, NameOrData, Size);
}
/**
@@ -1211,7 +1211,7 @@ PeiGetNextVariableName (
if (VarNameSize <= *VariableNameSize) {
GetVariableNameOrData (&StoreInfo, (UINT8 *) GetVariableNamePtr (Variable.CurrPtr, StoreInfo.AuthFlag), VarNameSize, (UINT8 *) VariableName);
- CopyMem (VariableGuid, GetVendorGuidPtr (VariableHeader, StoreInfo.AuthFlag), sizeof (EFI_GUID));
+ CopyMem(VariableGuid, GetVendorGuidPtr (VariableHeader, StoreInfo.AuthFlag), sizeof (EFI_GUID));
Status = EFI_SUCCESS;
} else {
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
index 584e4f658..2a8b9654b 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
@@ -105,16 +105,16 @@ MeasureVariable (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (&VarLog->VariableName, VendorGuid, sizeof(VarLog->VariableName));
+ CopyMem(&VarLog->VariableName, VendorGuid, sizeof(VarLog->VariableName));
VarLog->UnicodeNameLength = VarNameLength;
VarLog->VariableDataLength = VarSize;
- CopyMem (
+ CopyMem(
VarLog->UnicodeName,
VarName,
VarNameLength * sizeof (*VarName)
);
if (VarSize != 0) {
- CopyMem (
+ CopyMem(
(CHAR16 *)VarLog->UnicodeName + VarNameLength,
VarData,
VarSize
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
index 7f44e4757..44f447602 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
@@ -250,7 +250,7 @@ SetVariableCheckHandlerMorLock (
// Lock success, provision the key
//
mMorLockKeyEmpty = FALSE;
- CopyMem (mMorLockKey, Data, MOR_LOCK_V2_KEY_SIZE);
+ CopyMem(mMorLockKey, Data, MOR_LOCK_V2_KEY_SIZE);
mMorLockState = MorLockStateLocked;
//
// return EFI_ALREADY_STARTED to skip variable set.
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 840079bdb..64e3abdad 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -316,7 +316,7 @@ UpdateVariableStore (
//
// If Volatile/Emulated Non-volatile Variable just do a simple mem copy.
//
- CopyMem ((UINT8 *)(UINTN)DataPtr, Buffer, DataSize);
+ CopyMem((UINT8 *)(UINTN)DataPtr, Buffer, DataSize);
return EFI_SUCCESS;
}
@@ -1040,12 +1040,12 @@ Reclaim (
ValidBuffer = (UINT8 *) mNvVariableCache;
}
- SetMem (ValidBuffer, MaximumBufferSize, 0xff);
+ SetMem(ValidBuffer, MaximumBufferSize, 0xff);
//
// Copy variable store header.
//
- CopyMem (ValidBuffer, VariableStoreHeader, sizeof (VARIABLE_STORE_HEADER));
+ CopyMem(ValidBuffer, VariableStoreHeader, sizeof (VARIABLE_STORE_HEADER));
CurrPtr = (UINT8 *) GetStartPointer ((VARIABLE_STORE_HEADER *) ValidBuffer);
//
@@ -1056,7 +1056,7 @@ Reclaim (
NextVariable = GetNextVariablePtr (Variable);
if (Variable != UpdatingVariable && Variable->State == VAR_ADDED) {
VariableSize = (UINTN) NextVariable - (UINTN) Variable;
- CopyMem (CurrPtr, (UINT8 *) Variable, VariableSize);
+ CopyMem(CurrPtr, (UINT8 *) Variable, VariableSize);
CurrPtr += VariableSize;
if ((!IsVolatile) && ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD)) {
HwErrVariableTotalSize += VariableSize;
@@ -1106,7 +1106,7 @@ Reclaim (
// Promote VAR_IN_DELETED_TRANSITION to VAR_ADDED.
//
VariableSize = (UINTN) NextVariable - (UINTN) Variable;
- CopyMem (CurrPtr, (UINT8 *) Variable, VariableSize);
+ CopyMem(CurrPtr, (UINT8 *) Variable, VariableSize);
((VARIABLE_HEADER *) CurrPtr)->State = VAR_ADDED;
CurrPtr += VariableSize;
if ((!IsVolatile) && ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD)) {
@@ -1154,7 +1154,7 @@ Reclaim (
}
}
- CopyMem (CurrPtr, (UINT8 *) NewVariable, NewVariableSize);
+ CopyMem(CurrPtr, (UINT8 *) NewVariable, NewVariableSize);
((VARIABLE_HEADER *) CurrPtr)->State = VAR_ADDED;
if (UpdatingVariable != NULL) {
UpdatingPtrTrack->CurrPtr = (VARIABLE_HEADER *)((UINTN)UpdatingPtrTrack->StartPtr + ((UINTN)CurrPtr - (UINTN)GetStartPointer ((VARIABLE_STORE_HEADER *) ValidBuffer)));
@@ -1167,8 +1167,8 @@ Reclaim (
//
// If volatile/emulated non-volatile variable store, just copy valid buffer.
//
- SetMem ((UINT8 *) (UINTN) VariableBase, VariableStoreHeader->Size, 0xff);
- CopyMem ((UINT8 *) (UINTN) VariableBase, ValidBuffer, (UINTN) CurrPtr - (UINTN) ValidBuffer);
+ SetMem((UINT8 *) (UINTN) VariableBase, VariableStoreHeader->Size, 0xff);
+ CopyMem((UINT8 *) (UINTN) VariableBase, ValidBuffer, (UINTN) CurrPtr - (UINTN) ValidBuffer);
*LastVariableOffset = (UINTN) CurrPtr - (UINTN) ValidBuffer;
if (!IsVolatile) {
//
@@ -1222,7 +1222,7 @@ Done:
//
// For NV variable reclaim, we use mNvVariableCache as the buffer, so copy the data back.
//
- CopyMem (mNvVariableCache, (UINT8 *)(UINTN)VariableBase, VariableStoreHeader->Size);
+ CopyMem(mNvVariableCache, (UINT8 *)(UINTN)VariableBase, VariableStoreHeader->Size);
}
return Status;
@@ -1496,7 +1496,7 @@ GetLangFromSupportedLangCodes (
//
CompareLength = ISO_639_2_ENTRY_SIZE;
mVariableModuleGlobal->Lang[CompareLength] = '\0';
- return CopyMem (mVariableModuleGlobal->Lang, SupportedLang + Index * CompareLength, CompareLength);
+ return CopyMem(mVariableModuleGlobal->Lang, SupportedLang + Index * CompareLength, CompareLength);
} else {
while (TRUE) {
@@ -1521,7 +1521,7 @@ GetLangFromSupportedLangCodes (
// In driver entry, it pre-allocates a runtime attribute memory to accommodate this string.
//
mVariableModuleGlobal->PlatformLang[CompareLength] = '\0';
- return CopyMem (mVariableModuleGlobal->PlatformLang, Supported - CompareLength, CompareLength);
+ return CopyMem(mVariableModuleGlobal->PlatformLang, Supported - CompareLength, CompareLength);
}
SubIndex++;
@@ -1641,7 +1641,7 @@ VariableGetBestLanguage (
Buffer = (Iso639Language != 0) ? mVariableModuleGlobal->Lang : mVariableModuleGlobal->PlatformLang;
Buffer[CompareLength] = '\0';
- return CopyMem (Buffer, Supported, CompareLength);
+ return CopyMem(Buffer, Supported, CompareLength);
}
}
@@ -2242,7 +2242,7 @@ UpdateVariable (
//
NextVariable = GetEndPointer ((VARIABLE_STORE_HEADER *) ((UINTN) mVariableModuleGlobal->VariableGlobal.VolatileVariableBase));
ScratchSize = mVariableModuleGlobal->ScratchBufferSize;
- SetMem (NextVariable, ScratchSize, 0xff);
+ SetMem(NextVariable, ScratchSize, 0xff);
DataReady = FALSE;
if (Variable->CurrPtr != NULL) {
@@ -2357,7 +2357,7 @@ UpdateVariable (
//
DataOffset = GetVariableDataOffset (CacheVariable->CurrPtr);
BufferForMerge = (UINT8 *) ((UINTN) NextVariable + DataOffset);
- CopyMem (BufferForMerge, (UINT8 *) ((UINTN) CacheVariable->CurrPtr + DataOffset), DataSizeOfVariable (CacheVariable->CurrPtr));
+ CopyMem(BufferForMerge, (UINT8 *) ((UINTN) CacheVariable->CurrPtr + DataOffset), DataSizeOfVariable (CacheVariable->CurrPtr));
//
// Set Max Auth/Non-Volatile/Volatile Variable Data Size as default MaxDataSize.
@@ -2385,7 +2385,7 @@ UpdateVariable (
Status = EFI_INVALID_PARAMETER;
goto Done;
}
- CopyMem ((UINT8*) ((UINTN) BufferForMerge + DataSizeOfVariable (CacheVariable->CurrPtr)), Data, DataSize);
+ CopyMem((UINT8*) ((UINTN) BufferForMerge + DataSizeOfVariable (CacheVariable->CurrPtr)), Data, DataSize);
MergedBufSize = DataSizeOfVariable (CacheVariable->CurrPtr) + DataSize;
//
@@ -2465,7 +2465,7 @@ UpdateVariable (
if (((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) &&
(TimeStamp != NULL)) {
if ((Attributes & EFI_VARIABLE_APPEND_WRITE) == 0) {
- CopyMem (&AuthVariable->TimeStamp, TimeStamp, sizeof (EFI_TIME));
+ CopyMem(&AuthVariable->TimeStamp, TimeStamp, sizeof (EFI_TIME));
} else {
//
// In the case when the EFI_VARIABLE_APPEND_WRITE attribute is set, only
@@ -2474,9 +2474,9 @@ UpdateVariable (
//
if (Variable->CurrPtr != NULL) {
if (VariableCompareTimeStampInternal (&(((AUTHENTICATED_VARIABLE_HEADER *) CacheVariable->CurrPtr)->TimeStamp), TimeStamp)) {
- CopyMem (&AuthVariable->TimeStamp, TimeStamp, sizeof (EFI_TIME));
+ CopyMem(&AuthVariable->TimeStamp, TimeStamp, sizeof (EFI_TIME));
} else {
- CopyMem (&AuthVariable->TimeStamp, &(((AUTHENTICATED_VARIABLE_HEADER *) CacheVariable->CurrPtr)->TimeStamp), sizeof (EFI_TIME));
+ CopyMem(&AuthVariable->TimeStamp, &(((AUTHENTICATED_VARIABLE_HEADER *) CacheVariable->CurrPtr)->TimeStamp), sizeof (EFI_TIME));
}
}
}
@@ -2491,7 +2491,7 @@ UpdateVariable (
VarNameOffset = GetVariableHeaderSize ();
VarNameSize = StrSize (VariableName);
- CopyMem (
+ CopyMem(
(UINT8 *) ((UINTN) NextVariable + VarNameOffset),
VariableName,
VarNameSize
@@ -2503,14 +2503,14 @@ UpdateVariable (
// NextVariable during EFI_VARIABLE_APPEND_WRITE operation preparation.
//
if (!DataReady) {
- CopyMem (
+ CopyMem(
(UINT8 *) ((UINTN) NextVariable + VarDataOffset),
Data,
DataSize
);
}
- CopyMem (GetVendorGuidPtr (NextVariable), VendorGuid, sizeof (EFI_GUID));
+ CopyMem(GetVendorGuidPtr (NextVariable), VendorGuid, sizeof (EFI_GUID));
//
// There will be pad bytes after Data, the NextVariable->NameSize and
// NextVariable->DataSize should not include pad size so that variable
@@ -2662,7 +2662,7 @@ UpdateVariable (
//
// Update the memory copy of Flash region.
//
- CopyMem ((UINT8 *)mNvVariableCache + mVariableModuleGlobal->NonVolatileLastVariableOffset, (UINT8 *)NextVariable, VarSize);
+ CopyMem((UINT8 *)mNvVariableCache + mVariableModuleGlobal->NonVolatileLastVariableOffset, (UINT8 *)NextVariable, VarSize);
} else {
//
// Emulated non-volatile variable mode.
@@ -2864,7 +2864,7 @@ VariableServiceGetVariable (
goto Done;
}
- CopyMem (Data, GetVariableDataPtr (Variable.CurrPtr), VarDataSize);
+ CopyMem(Data, GetVariableDataPtr (Variable.CurrPtr), VarDataSize);
// if (Attributes != NULL) {
// *Attributes = Variable.CurrPtr->Attributes;
// }
@@ -3111,8 +3111,8 @@ VariableServiceGetNextVariableName (
VarNameSize = NameSizeOfVariable (VariablePtr);
ASSERT (VarNameSize != 0);
if (VarNameSize <= *VariableNameSize) {
- CopyMem (VariableName, GetVariableNamePtr (VariablePtr), VarNameSize);
- CopyMem (VendorGuid, GetVendorGuidPtr (VariablePtr), sizeof (EFI_GUID));
+ CopyMem(VariableName, GetVariableNamePtr (VariablePtr), VarNameSize);
+ CopyMem(VendorGuid, GetVendorGuidPtr (VariablePtr), sizeof (EFI_GUID));
Status = EFI_SUCCESS;
} else {
Status = EFI_BUFFER_TOO_SMALL;
@@ -3817,7 +3817,7 @@ InitRealNonVolatileVariableStore (
//
// Copy NV storage data to the memory buffer.
//
- CopyMem (NvStorageData, (UINT8 *) (UINTN) NvStorageBase, NvStorageSize);
+ CopyMem(NvStorageData, (UINT8 *) (UINTN) NvStorageBase, NvStorageSize);
Status = GetFtwProtocol ((VOID **)&FtwProtocol);
//
@@ -3835,7 +3835,7 @@ InitRealNonVolatileVariableStore (
//
// Copy the backed up NV storage data to the memory buffer from spare block.
//
- CopyMem (NvStorageData, (UINT8 *) (UINTN) (FtwLastWriteData->SpareAddress), NvStorageSize);
+ CopyMem(NvStorageData, (UINT8 *) (UINTN) (FtwLastWriteData->SpareAddress), NvStorageSize);
} else if ((FtwLastWriteData->TargetAddress > NvStorageBase) &&
(FtwLastWriteData->TargetAddress < (NvStorageBase + NvStorageSize))) {
//
@@ -3847,7 +3847,7 @@ InitRealNonVolatileVariableStore (
//
// Copy the partial backed up NV storage data to the memory buffer from spare block.
//
- CopyMem (NvStorageData + BackUpOffset, (UINT8 *) (UINTN) FtwLastWriteData->SpareAddress, BackUpSize);
+ CopyMem(NvStorageData + BackUpOffset, (UINT8 *) (UINTN) FtwLastWriteData->SpareAddress, BackUpSize);
}
}
}
@@ -3973,7 +3973,7 @@ InitEmuNonVolatileVariableStore (
}
if (FullyInitializeStore) {
- SetMem (VariableStore, VariableStoreLength, 0xff);
+ SetMem(VariableStore, VariableStoreLength, 0xff);
//
// Use gEfiAuthenticatedVariableGuid for potential auth variable support.
//
@@ -4327,12 +4327,12 @@ ConvertNormalVarStorageToAuthVarStorage (
// Copy Variable Name
//
NextPtr = (UINT8 *) (AuthStartPtr + 1);
- CopyMem (NextPtr, GetVariableNamePtr (StartPtr), AuthStartPtr->NameSize);
+ CopyMem(NextPtr, GetVariableNamePtr (StartPtr), AuthStartPtr->NameSize);
//
// Copy Variable Data
//
NextPtr = NextPtr + AuthStartPtr->NameSize + GET_PAD_SIZE (AuthStartPtr->NameSize);
- CopyMem (NextPtr, GetVariableDataPtr (StartPtr), AuthStartPtr->DataSize);
+ CopyMem(NextPtr, GetVariableDataPtr (StartPtr), AuthStartPtr->DataSize);
//
// Go to next variable
//
@@ -4523,7 +4523,7 @@ VariableCommonInitialize (
return EFI_OUT_OF_RESOURCES;
}
- SetMem (VolatileVariableStore, PcdGet32 (PcdVariableStoreSize) + ScratchSize, 0xff);
+ SetMem(VolatileVariableStore, PcdGet32 (PcdVariableStoreSize) + ScratchSize, 0xff);
//
// Initialize Variable Specific Data.
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c
index 6a4b95a96..6e6b22579 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c
@@ -373,8 +373,8 @@ SmmVariableGetStatistics (
*InfoSize = StatisticsInfoSize;
return EFI_BUFFER_TOO_SMALL;
}
- CopyMem (InfoEntry, VariableInfo, sizeof (VARIABLE_INFO_ENTRY));
- CopyMem (InfoName, VariableInfo->Name, NameSize);
+ CopyMem(InfoEntry, VariableInfo, sizeof (VARIABLE_INFO_ENTRY));
+ CopyMem(InfoName, VariableInfo->Name, NameSize);
*InfoSize = StatisticsInfoSize;
return EFI_SUCCESS;
}
@@ -413,8 +413,8 @@ SmmVariableGetStatistics (
return EFI_BUFFER_TOO_SMALL;
}
- CopyMem (InfoEntry, VariableInfo, sizeof (VARIABLE_INFO_ENTRY));
- CopyMem (InfoName, VariableInfo->Name, NameSize);
+ CopyMem(InfoEntry, VariableInfo, sizeof (VARIABLE_INFO_ENTRY));
+ CopyMem(InfoName, VariableInfo->Name, NameSize);
*InfoSize = StatisticsInfoSize;
return EFI_SUCCESS;
@@ -504,7 +504,7 @@ SmmVariableHandler (
//
// Copy the input communicate buffer payload to pre-allocated SMM variable buffer payload.
//
- CopyMem (mVariableBufferPayload, SmmVariableFunctionHeader->Data, CommBufferPayloadSize);
+ CopyMem(mVariableBufferPayload, SmmVariableFunctionHeader->Data, CommBufferPayloadSize);
SmmVariableHeader = (SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE *) mVariableBufferPayload;
if (((UINTN)(~0) - SmmVariableHeader->DataSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE, Name)) ||
((UINTN)(~0) - SmmVariableHeader->NameSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE, Name) + SmmVariableHeader->DataSize)) {
@@ -547,7 +547,7 @@ SmmVariableHandler (
&SmmVariableHeader->DataSize,
(UINT8 *)SmmVariableHeader->Name + SmmVariableHeader->NameSize
);
- CopyMem (SmmVariableFunctionHeader->Data, mVariableBufferPayload, CommBufferPayloadSize);
+ CopyMem(SmmVariableFunctionHeader->Data, mVariableBufferPayload, CommBufferPayloadSize);
break;
case SMM_VARIABLE_FUNCTION_GET_NEXT_VARIABLE_NAME:
@@ -558,7 +558,7 @@ SmmVariableHandler (
//
// Copy the input communicate buffer payload to pre-allocated SMM variable buffer payload.
//
- CopyMem (mVariableBufferPayload, SmmVariableFunctionHeader->Data, CommBufferPayloadSize);
+ CopyMem(mVariableBufferPayload, SmmVariableFunctionHeader->Data, CommBufferPayloadSize);
GetNextVariableName = (SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME *) mVariableBufferPayload;
if ((UINTN)(~0) - GetNextVariableName->NameSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME, Name)) {
//
@@ -592,7 +592,7 @@ SmmVariableHandler (
GetNextVariableName->Name,
&GetNextVariableName->Guid
);
- CopyMem (SmmVariableFunctionHeader->Data, mVariableBufferPayload, CommBufferPayloadSize);
+ CopyMem(SmmVariableFunctionHeader->Data, mVariableBufferPayload, CommBufferPayloadSize);
break;
case SMM_VARIABLE_FUNCTION_SET_VARIABLE:
@@ -603,7 +603,7 @@ SmmVariableHandler (
//
// Copy the input communicate buffer payload to pre-allocated SMM variable buffer payload.
//
- CopyMem (mVariableBufferPayload, SmmVariableFunctionHeader->Data, CommBufferPayloadSize);
+ CopyMem(mVariableBufferPayload, SmmVariableFunctionHeader->Data, CommBufferPayloadSize);
SmmVariableHeader = (SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE *) mVariableBufferPayload;
if (((UINTN)(~0) - SmmVariableHeader->DataSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE, Name)) ||
((UINTN)(~0) - SmmVariableHeader->NameSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE, Name) + SmmVariableHeader->DataSize)) {
@@ -747,7 +747,7 @@ SmmVariableHandler (
//
// Copy the input communicate buffer payload to pre-allocated SMM variable buffer payload.
//
- CopyMem (mVariableBufferPayload, SmmVariableFunctionHeader->Data, CommBufferPayloadSize);
+ CopyMem(mVariableBufferPayload, SmmVariableFunctionHeader->Data, CommBufferPayloadSize);
CommVariableProperty = (SMM_VARIABLE_COMMUNICATE_VAR_CHECK_VARIABLE_PROPERTY *) mVariableBufferPayload;
if ((UINTN) (~0) - CommVariableProperty->NameSize < OFFSET_OF (SMM_VARIABLE_COMMUNICATE_VAR_CHECK_VARIABLE_PROPERTY, Name)) {
//
@@ -786,7 +786,7 @@ SmmVariableHandler (
&CommVariableProperty->Guid,
&CommVariableProperty->VariableProperty
);
- CopyMem (SmmVariableFunctionHeader->Data, mVariableBufferPayload, CommBufferPayloadSize);
+ CopyMem(SmmVariableFunctionHeader->Data, mVariableBufferPayload, CommBufferPayloadSize);
break;
default:
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
index b10513804..47427aa13 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
@@ -238,7 +238,7 @@ VariableLockRequestToLock (
CopyGuid (&VariableToLock->Guid, VendorGuid);
VariableToLock->NameSize = VariableNameSize;
- CopyMem (VariableToLock->Name, VariableName, VariableToLock->NameSize);
+ CopyMem(VariableToLock->Name, VariableName, VariableToLock->NameSize);
//
// Send data to SMM.
@@ -337,9 +337,9 @@ VarCheckVariablePropertySet (
ASSERT (CommVariableProperty != NULL);
CopyGuid (&CommVariableProperty->Guid, Guid);
- CopyMem (&CommVariableProperty->VariableProperty, VariableProperty, sizeof (*VariableProperty));
+ CopyMem(&CommVariableProperty->VariableProperty, VariableProperty, sizeof (*VariableProperty));
CommVariableProperty->NameSize = VariableNameSize;
- CopyMem (CommVariableProperty->Name, Name, CommVariableProperty->NameSize);
+ CopyMem(CommVariableProperty->Name, Name, CommVariableProperty->NameSize);
//
// Send data to SMM.
@@ -409,14 +409,14 @@ VarCheckVariablePropertyGet (
CopyGuid (&CommVariableProperty->Guid, Guid);
CommVariableProperty->NameSize = VariableNameSize;
- CopyMem (CommVariableProperty->Name, Name, CommVariableProperty->NameSize);
+ CopyMem(CommVariableProperty->Name, Name, CommVariableProperty->NameSize);
//
// Send data to SMM.
//
Status = SendCommunicateBuffer (PayloadSize);
if (Status == EFI_SUCCESS) {
- CopyMem (VariableProperty, &CommVariableProperty->VariableProperty, sizeof (*VariableProperty));
+ CopyMem(VariableProperty, &CommVariableProperty->VariableProperty, sizeof (*VariableProperty));
}
Done:
@@ -502,7 +502,7 @@ RuntimeServiceGetVariable (
} else {
SmmVariableHeader->Attributes = *Attributes;
}
- CopyMem (SmmVariableHeader->Name, VariableName, SmmVariableHeader->NameSize);
+ CopyMem(SmmVariableHeader->Name, VariableName, SmmVariableHeader->NameSize);
//
// Send data to SMM.
@@ -528,7 +528,7 @@ RuntimeServiceGetVariable (
}
if (Data != NULL) {
- CopyMem (Data, (UINT8 *)SmmVariableHeader->Name + SmmVariableHeader->NameSize, SmmVariableHeader->DataSize);
+ CopyMem(Data, (UINT8 *)SmmVariableHeader->Name + SmmVariableHeader->NameSize, SmmVariableHeader->DataSize);
} else {
Status = EFI_INVALID_PARAMETER;
}
@@ -613,7 +613,7 @@ RuntimeServiceGetNextVariableName (
//
// Copy whole string
//
- CopyMem (SmmGetNextVariableName->Name, VariableName, InVariableNameSize);
+ CopyMem(SmmGetNextVariableName->Name, VariableName, InVariableNameSize);
if (OutVariableNameSize > InVariableNameSize) {
ZeroMem ((UINT8 *) SmmGetNextVariableName->Name + InVariableNameSize, OutVariableNameSize - InVariableNameSize);
}
@@ -638,7 +638,7 @@ RuntimeServiceGetNextVariableName (
}
CopyGuid (VendorGuid, &SmmGetNextVariableName->Guid);
- CopyMem (VariableName, SmmGetNextVariableName->Name, SmmGetNextVariableName->NameSize);
+ CopyMem(VariableName, SmmGetNextVariableName->Name, SmmGetNextVariableName->NameSize);
Done:
ReleaseLockOnlyAtBootTime (&mVariableServicesLock);
@@ -719,8 +719,8 @@ RuntimeServiceSetVariable (
SmmVariableHeader->DataSize = DataSize;
SmmVariableHeader->NameSize = VariableNameSize;
SmmVariableHeader->Attributes = Attributes;
- CopyMem (SmmVariableHeader->Name, VariableName, SmmVariableHeader->NameSize);
- CopyMem ((UINT8 *) SmmVariableHeader->Name + SmmVariableHeader->NameSize, Data, DataSize);
+ CopyMem(SmmVariableHeader->Name, VariableName, SmmVariableHeader->NameSize);
+ CopyMem((UINT8 *) SmmVariableHeader->Name + SmmVariableHeader->NameSize, Data, DataSize);
//
// Send data to SMM.
diff --git a/MdePkg/Include/Library/BaseMemoryLib.h b/MdePkg/Include/Library/BaseMemoryLib.h
index 46026ffd1..081928d1e 100644
--- a/MdePkg/Include/Library/BaseMemoryLib.h
+++ b/MdePkg/Include/Library/BaseMemoryLib.h
@@ -32,7 +32,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -54,7 +54,7 @@ CopyMem (
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Include/Library/SmmMemLib.h b/MdePkg/Include/Library/SmmMemLib.h
index 72edc9adc..2d86848ed 100644
--- a/MdePkg/Include/Library/SmmMemLib.h
+++ b/MdePkg/Include/Library/SmmMemLib.h
@@ -99,7 +99,7 @@ SmmCopyMemFromSmram (
**/
EFI_STATUS
EFIAPI
-SmmCopyMem (
+SmmCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -123,7 +123,7 @@ SmmCopyMem (
**/
EFI_STATUS
EFIAPI
-SmmSetMem (
+SmmSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c b/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c
index 7cf563464..13c2e47b7 100644
--- a/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c
+++ b/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c
@@ -271,7 +271,7 @@ DebugClearMemory (
//
// SetMem() checks for the the ASSERT() condition on Length and returns Buffer
//
- return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
+ return SetMem(Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
}
diff --git a/MdePkg/Library/BaseLib/FilePaths.c b/MdePkg/Library/BaseLib/FilePaths.c
index 40e8d773c..bb2217f94 100644
--- a/MdePkg/Library/BaseLib/FilePaths.c
+++ b/MdePkg/Library/BaseLib/FilePaths.c
@@ -84,14 +84,14 @@ PathCleanUpDirectories(
// Replace the "\\" with "\"
//
while ((TempString = StrStr (Path, L"\\\\")) != NULL) {
- CopyMem (TempString, TempString + 1, StrSize (TempString + 1));
+ CopyMem(TempString, TempString + 1, StrSize (TempString + 1));
}
//
// Remove all the "\.". E.g.: fs0:\abc\.\def\.
//
while ((TempString = StrStr (Path, L"\\.\\")) != NULL) {
- CopyMem (TempString, TempString + 2, StrSize (TempString + 2));
+ CopyMem(TempString, TempString + 2, StrSize (TempString + 2));
}
if ((StrLen (Path) >= 2) && (StrCmp (Path + StrLen (Path) - 2, L"\\.") == 0)) {
Path[StrLen (Path) - 1] = CHAR_NULL;
@@ -106,7 +106,7 @@ PathCleanUpDirectories(
*(TempString + 1) = CHAR_NULL;
PathRemoveLastItem(Path);
if (*(TempString + 3) != CHAR_NULL) {
- CopyMem (Path + StrLen (Path), TempString + 4, StrSize (TempString + 4));
+ CopyMem(Path + StrLen (Path), TempString + 4, StrSize (TempString + 4));
}
}
diff --git a/MdePkg/Library/BaseLib/SafeString.c b/MdePkg/Library/BaseLib/SafeString.c
index 84e9e52d8..3749da9ee 100644
--- a/MdePkg/Library/BaseLib/SafeString.c
+++ b/MdePkg/Library/BaseLib/SafeString.c
@@ -1295,10 +1295,10 @@ StrToIpv6Address (
//
return RETURN_UNSUPPORTED;
}
- CopyMem (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart);
+ CopyMem(&Address->Addr[0], &LocalAddress.Addr[0], CompressStart);
ZeroMem (&Address->Addr[CompressStart], ARRAY_SIZE (Address->Addr) - AddressIndex);
if (AddressIndex > CompressStart) {
- CopyMem (
+ CopyMem(
&Address->Addr[CompressStart + ARRAY_SIZE (Address->Addr) - AddressIndex],
&LocalAddress.Addr[CompressStart],
AddressIndex - CompressStart
@@ -1456,7 +1456,7 @@ StrToIpv4Address (
return RETURN_UNSUPPORTED;
}
- CopyMem (Address, &LocalAddress, sizeof (*Address));
+ CopyMem(Address, &LocalAddress, sizeof (*Address));
if (PrefixLength != NULL) {
*PrefixLength = LocalPrefixLength;
}
@@ -3272,10 +3272,10 @@ AsciiStrToIpv6Address (
//
return RETURN_UNSUPPORTED;
}
- CopyMem (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart);
+ CopyMem(&Address->Addr[0], &LocalAddress.Addr[0], CompressStart);
ZeroMem (&Address->Addr[CompressStart], ARRAY_SIZE (Address->Addr) - AddressIndex);
if (AddressIndex > CompressStart) {
- CopyMem (
+ CopyMem(
&Address->Addr[CompressStart + ARRAY_SIZE (Address->Addr) - AddressIndex],
&LocalAddress.Addr[CompressStart],
AddressIndex - CompressStart
@@ -3426,7 +3426,7 @@ AsciiStrToIpv4Address (
return RETURN_UNSUPPORTED;
}
- CopyMem (Address, &LocalAddress, sizeof (*Address));
+ CopyMem(Address, &LocalAddress, sizeof (*Address));
if (PrefixLength != NULL) {
*PrefixLength = LocalPrefixLength;
}
diff --git a/MdePkg/Library/BaseLib/X86Thunk.c b/MdePkg/Library/BaseLib/X86Thunk.c
index 5c8a03989..a9036c82e 100644
--- a/MdePkg/Library/BaseLib/X86Thunk.c
+++ b/MdePkg/Library/BaseLib/X86Thunk.c
@@ -103,7 +103,7 @@ AsmPrepareThunk16 (
ASSERT (ThunkContext->RealModeBufferSize >= m16Size);
ASSERT ((UINTN)ThunkContext->RealModeBuffer + m16Size <= 0x100000);
- CopyMem (ThunkContext->RealModeBuffer, &m16Start, m16Size);
+ CopyMem(ThunkContext->RealModeBuffer, &m16Start, m16Size);
//
// Point RealModeGdt to the GDT to be used in transition
@@ -228,7 +228,7 @@ AsmThunk16 (
ThunkContext->RealModeBuffer
);
- CopyMem (ThunkContext->RealModeState, UpdatedRegs, sizeof (*UpdatedRegs));
+ CopyMem(ThunkContext->RealModeState, UpdatedRegs, sizeof (*UpdatedRegs));
}
/**
diff --git a/MdePkg/Library/BaseMemoryLib/CopyMem.c b/MdePkg/Library/BaseMemoryLib/CopyMem.c
index 55e8616c9..b0d65f738 100644
--- a/MdePkg/Library/BaseMemoryLib/CopyMem.c
+++ b/MdePkg/Library/BaseMemoryLib/CopyMem.c
@@ -28,7 +28,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
diff --git a/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c
index 1ac5f33f2..534af4083 100644
--- a/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c
@@ -38,7 +38,7 @@
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -53,5 +53,5 @@ CopyMem (
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
+ return InternalMemCopyMem(DestinationBuffer, SourceBuffer, Length);
}
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c
index 6a261ae34..de288f564 100644
--- a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c
+++ b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c
@@ -101,7 +101,7 @@ InternalMemZeroMem (
IN UINTN Length
)
{
- return InternalMemSetMem (Buffer, Length, 0);
+ return InternalMemSetMem(Buffer, Length, 0);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibInternals.h b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h
index 9d3730aff..eb9f7536f 100644
--- a/MdePkg/Library/BaseMemoryLib/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h
@@ -34,7 +34,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -52,7 +52,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem.c b/MdePkg/Library/BaseMemoryLib/SetMem.c
index d42abb128..ffb8236bc 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMem.c
+++ b/MdePkg/Library/BaseMemoryLib/SetMem.c
@@ -29,7 +29,7 @@
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
index 39ec8cb0d..347853768 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
@@ -35,7 +35,7 @@
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -47,7 +47,7 @@ SetMem (
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return InternalMemSetMem (Buffer, Length, Value);
+ return InternalMemSetMem(Buffer, Length, Value);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
index 438abf4e8..f81e9ee48 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
@@ -38,7 +38,7 @@
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -53,5 +53,5 @@ CopyMem (
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
+ return InternalMemCopyMem(DestinationBuffer, SourceBuffer, Length);
}
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.nasm
index 5cace177d..b4765582d 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.nasm
@@ -20,7 +20,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.nasm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.nasm
index 8af2ea552..cf4c19dda 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.nasm
@@ -20,7 +20,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h
index ae3dbaadc..9e2e0f690 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h
@@ -34,7 +34,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -52,7 +52,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
index 39ec8cb0d..347853768 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
@@ -35,7 +35,7 @@
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -47,7 +47,7 @@ SetMem (
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return InternalMemSetMem (Buffer, Length, Value);
+ return InternalMemSetMem(Buffer, Length, Value);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.nasm
index 5769c00bf..37a20e4fd 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; OUT VOID *DestinationBuffer,
; IN CONST VOID *SourceBuffer,
; IN UINTN Length
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.nasm b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.nasm
index 450113ba8..eae6eb1e8 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemSetMem (
+; InternalMemSetMem(
; OUT VOID *Buffer,
; IN UINTN Length,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
index c36af196a..4ca5b6f4c 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
@@ -30,7 +30,7 @@
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c
index f27b95c11..63bd17951 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c
@@ -54,7 +54,7 @@ CopyGuid (
ASSERT (DestinationGuid != NULL);
ASSERT (SourceGuid != NULL);
- return InternalMemCopyMem (DestinationGuid, SourceGuid, sizeof (GUID));
+ return InternalMemCopyMem(DestinationGuid, SourceGuid, sizeof (GUID));
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c
index 438abf4e8..f81e9ee48 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c
@@ -38,7 +38,7 @@
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -53,5 +53,5 @@ CopyMem (
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
+ return InternalMemCopyMem(DestinationBuffer, SourceBuffer, Length);
}
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.nasm
index 0aa371a47..a0f6ba2d6 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.nasm
@@ -19,7 +19,7 @@
;------------------------------------------------------------------------------
; VOID *
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.nasm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.nasm
index 6200d5ff9..de581916a 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.nasm
@@ -19,7 +19,7 @@
;------------------------------------------------------------------------------
; VOID *
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h
index bbd8b63cb..74f87c726 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h
@@ -34,7 +34,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -52,7 +52,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
index 39ec8cb0d..347853768 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
@@ -35,7 +35,7 @@
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -47,7 +47,7 @@ SetMem (
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return InternalMemSetMem (Buffer, Length, Value);
+ return InternalMemSetMem(Buffer, Length, Value);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.nasm
index 33545712b..f34e15d37 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.nasm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.nasm
index 3abc668ed..09400e2c0 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c
index 438abf4e8..f81e9ee48 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c
@@ -38,7 +38,7 @@
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -53,5 +53,5 @@ CopyMem (
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
+ return InternalMemCopyMem(DestinationBuffer, SourceBuffer, Length);
}
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.nasm
index b598caa54..aabb744a8 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.nasm
@@ -19,7 +19,7 @@
;------------------------------------------------------------------------------
; VOID *
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.nasm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.nasm
index 6200d5ff9..de581916a 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.nasm
@@ -19,7 +19,7 @@
;------------------------------------------------------------------------------
; VOID *
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h
index 68cd31626..6bc1bc8ed 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h
@@ -34,7 +34,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -52,7 +52,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
index 39ec8cb0d..347853768 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
@@ -35,7 +35,7 @@
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -47,7 +47,7 @@ SetMem (
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return InternalMemSetMem (Buffer, Length, Value);
+ return InternalMemSetMem(Buffer, Length, Value);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.nasm
index c29dab6cd..1067b55da 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.nasm b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.nasm
index ecf733f8f..cb58a97f6 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c
index 438abf4e8..f81e9ee48 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c
@@ -38,7 +38,7 @@
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -53,5 +53,5 @@ CopyMem (
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
+ return InternalMemCopyMem(DestinationBuffer, SourceBuffer, Length);
}
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.nasm
index 8203ffeb1..8bdef90f5 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.nasm
@@ -19,7 +19,7 @@
;------------------------------------------------------------------------------
; VOID *
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.nasm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.nasm
index ec38f70b2..7bd23a9cf 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.nasm
@@ -19,7 +19,7 @@
;------------------------------------------------------------------------------
; VOID *
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
index 5be42bcb8..94a6d8507 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
@@ -34,7 +34,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -52,7 +52,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
index 39ec8cb0d..347853768 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
@@ -35,7 +35,7 @@
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -47,7 +47,7 @@ SetMem (
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return InternalMemSetMem (Buffer, Length, Value);
+ return InternalMemSetMem(Buffer, Length, Value);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.nasm
index c29dab6cd..1067b55da 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.nasm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.nasm
index d5eaf7a91..cd1c8a2a6 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
index 438abf4e8..f81e9ee48 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
@@ -38,7 +38,7 @@
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -53,5 +53,5 @@ CopyMem (
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
+ return InternalMemCopyMem(DestinationBuffer, SourceBuffer, Length);
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.nasm
index 0aa371a47..a0f6ba2d6 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.nasm
@@ -19,7 +19,7 @@
;------------------------------------------------------------------------------
; VOID *
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.nasm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.nasm
index 24313cb4b..00d4a82d6 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.nasm
@@ -20,7 +20,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
index ce376afda..ddd0969e9 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
@@ -34,7 +34,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -52,7 +52,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
index 39ec8cb0d..347853768 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
@@ -35,7 +35,7 @@
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -47,7 +47,7 @@ SetMem (
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return InternalMemSetMem (Buffer, Length, Value);
+ return InternalMemSetMem(Buffer, Length, Value);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.nasm b/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.nasm
index 33545712b..f34e15d37 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.nasm
@@ -21,7 +21,7 @@
;------------------------------------------------------------------------------
; VOID *
; EFIAPI
-; InternalMemCopyMem (
+; InternalMemCopyMem(
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.nasm b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.nasm
index 5bd1c2262..720d24254 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.nasm
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.nasm
@@ -20,7 +20,7 @@
;------------------------------------------------------------------------------
; VOID *
-; InternalMemSetMem (
+; InternalMemSetMem(
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT8 Value
diff --git a/MdePkg/Library/BasePcdLibNull/PcdLib.c b/MdePkg/Library/BasePcdLibNull/PcdLib.c
index 49447880a..20751dd2f 100644
--- a/MdePkg/Library/BasePcdLibNull/PcdLib.c
+++ b/MdePkg/Library/BasePcdLibNull/PcdLib.c
@@ -1243,7 +1243,7 @@ LibPatchPcdSetPtr (
return NULL;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
return (VOID *) Buffer;
}
@@ -1293,7 +1293,7 @@ LibPatchPcdSetPtrS (
return RETURN_INVALID_PARAMETER;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
return RETURN_SUCCESS;
}
@@ -1347,7 +1347,7 @@ LibPatchPcdSetPtrAndSize (
return NULL;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
*SizeOfPatchVariable = *SizeOfBuffer;
return (VOID *) Buffer;
@@ -1402,7 +1402,7 @@ LibPatchPcdSetPtrAndSizeS (
return RETURN_INVALID_PARAMETER;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
*SizeOfPatchVariable = *SizeOfBuffer;
return RETURN_SUCCESS;
diff --git a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
index 7e868db89..0ddb8ae51 100644
--- a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
@@ -156,7 +156,7 @@ PeCoffLoaderRelocateImageEx (
if (*FixupData != NULL) {
*FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64));
// Fixup16 is not aligned so we must copy it. Thumb instructions are streams of 16 bytes.
- CopyMem (*FixupData, Fixup16, sizeof (UINT64));
+ CopyMem(*FixupData, Fixup16, sizeof (UINT64));
*FixupData = *FixupData + sizeof(UINT64);
}
break;
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
index 07bb62f86..9ad896ba8 100644
--- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
+++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
@@ -1206,7 +1206,7 @@ PeCoffLoaderLoadImage (
// can from the original image, and then use that to make sure everything
// is legit.
//
- CopyMem (&CheckContext, ImageContext, sizeof (PE_COFF_LOADER_IMAGE_CONTEXT));
+ CopyMem(&CheckContext, ImageContext, sizeof (PE_COFF_LOADER_IMAGE_CONTEXT));
Status = PeCoffLoaderGetImageInfo (&CheckContext);
if (RETURN_ERROR (Status)) {
@@ -1908,7 +1908,7 @@ PeCoffLoaderImageReadFromMemory (
ASSERT (FileHandle != NULL);
ASSERT (Buffer != NULL);
- CopyMem (Buffer, ((UINT8 *)FileHandle) + FileOffset, *ReadSize);
+ CopyMem(Buffer, ((UINT8 *)FileHandle) + FileOffset, *ReadSize);
return RETURN_SUCCESS;
}
diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
index 28b4bf9d8..ce357e7a1 100644
--- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
+++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
@@ -343,7 +343,7 @@ ReadPTLen (
SetMem16 (&Sd->mPTTable[0] , sizeof (Sd->mPTTable), CharC);
- SetMem (Sd->mPTLen, nn, 0);
+ SetMem(Sd->mPTLen, nn, 0);
return 0;
}
@@ -419,7 +419,7 @@ ReadCLen (
//
CharC = (UINT16) GetBits (Sd, CBIT);
- SetMem (Sd->mCLen, NC, 0);
+ SetMem(Sd->mCLen, NC, 0);
SetMem16 (&Sd->mCTable[0], sizeof (Sd->mCTable), CharC);
return ;
@@ -469,7 +469,7 @@ ReadCLen (
}
}
- SetMem (Sd->mCLen + Index, NC - Index, 0);
+ SetMem(Sd->mCLen + Index, NC - Index, 0);
MakeTable (Sd, NC, Sd->mCLen, 12, Sd->mCTable);
@@ -777,7 +777,7 @@ UefiTianoDecompress (
}
Src = Src + 8;
- SetMem (Sd, sizeof (SCRATCH_DATA), 0);
+ SetMem(Sd, sizeof (SCRATCH_DATA), 0);
//
// The length of the field 'Position Set Code Length Array Size' in Block Header.
diff --git a/MdePkg/Library/DxeHstiLib/HstiAip.c b/MdePkg/Library/DxeHstiLib/HstiAip.c
index 6e65f791d..5ee22f71a 100644
--- a/MdePkg/Library/DxeHstiLib/HstiAip.c
+++ b/MdePkg/Library/DxeHstiLib/HstiAip.c
@@ -114,7 +114,7 @@ HstiAipSetInfo (
HstiAip->HstiMaxSize = InformationBlockSize;
}
- CopyMem (HstiAip->Hsti, InformationBlock, InformationBlockSize);
+ CopyMem(HstiAip->Hsti, InformationBlock, InformationBlockSize);
HstiAip->HstiSize = InformationBlockSize;
return EFI_SUCCESS;
}
diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c
index eae01b81a..7d9039eca 100644
--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
+++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
@@ -222,10 +222,10 @@ InternalHstiIsValidTable (
//
// ErrorString might not be CHAR16 aligned.
//
- CopyMem (&ErrorChar, ErrorString, sizeof(ErrorChar));
+ CopyMem(&ErrorChar, ErrorString, sizeof(ErrorChar));
for (ErrorStringLength = 0; (ErrorChar != 0) && (ErrorStringLength < (ErrorStringSize/2)); ErrorStringLength++) {
ErrorString++;
- CopyMem (&ErrorChar, ErrorString, sizeof(ErrorChar));
+ CopyMem(&ErrorChar, ErrorString, sizeof(ErrorChar));
}
//
@@ -302,7 +302,7 @@ HstiLibSetTable (
}
HstiAip->Signature = HSTI_AIP_PRIVATE_SIGNATURE;
- CopyMem (&HstiAip->Aip, &mAdapterInformationProtocol, sizeof(EFI_ADAPTER_INFORMATION_PROTOCOL));
+ CopyMem(&HstiAip->Aip, &mAdapterInformationProtocol, sizeof(EFI_ADAPTER_INFORMATION_PROTOCOL));
HstiAip->HstiSize = HstiSize;
HstiAip->HstiMaxSize = HstiSize;
@@ -531,8 +531,8 @@ InternalHstiRecordErrorString (
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (NewHsti, Hsti, Offset);
- CopyMem ((UINT8 *)NewHsti + Offset, ErrorString, StringSize);
+ CopyMem(NewHsti, Hsti, Offset);
+ CopyMem((UINT8 *)NewHsti + Offset, ErrorString, StringSize);
Status = Aip->SetInformation (
Aip,
diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c
index 381253437..b6f418b73 100644
--- a/MdePkg/Library/DxePcdLib/DxePcdLib.c
+++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c
@@ -1408,7 +1408,7 @@ LibPatchPcdSetPtr (
return NULL;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
return (VOID *) Buffer;
}
@@ -1458,7 +1458,7 @@ LibPatchPcdSetPtrS (
return RETURN_INVALID_PARAMETER;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
return RETURN_SUCCESS;
}
@@ -1513,7 +1513,7 @@ LibPatchPcdSetPtrAndSize (
return NULL;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
*SizeOfPatchVariable = *SizeOfBuffer;
return (VOID *) Buffer;
@@ -1568,7 +1568,7 @@ LibPatchPcdSetPtrAndSizeS (
return RETURN_INVALID_PARAMETER;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
*SizeOfPatchVariable = *SizeOfBuffer;
return RETURN_SUCCESS;
diff --git a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c
index 87a5b42ed..bfc679462 100644
--- a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c
+++ b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c
@@ -334,7 +334,7 @@ DebugClearMemory (
//
// SetMem() checks for the the ASSERT() condition on Length and returns Buffer
//
- return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
+ return SetMem(Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
}
diff --git a/MdePkg/Library/DxeSmbusLib/SmbusLib.c b/MdePkg/Library/DxeSmbusLib/SmbusLib.c
index e16d3491f..866e9bb24 100644
--- a/MdePkg/Library/DxeSmbusLib/SmbusLib.c
+++ b/MdePkg/Library/DxeSmbusLib/SmbusLib.c
@@ -581,6 +581,6 @@ SmBusBlockProcessCall (
//
// Assuming that ReadBuffer is large enough to save another memory copy.
//
- ReadBuffer = CopyMem (ReadBuffer, WriteBuffer, Length);
+ ReadBuffer = CopyMem(ReadBuffer, WriteBuffer, Length);
return InternalSmBusExec (EfiSmbusBWBRProcessCall, SmBusAddress, Length, ReadBuffer, Status);
}
diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c
index 6e1c90d82..9ac571e1c 100644
--- a/MdePkg/Library/PeiHobLib/HobLib.c
+++ b/MdePkg/Library/PeiHobLib/HobLib.c
@@ -464,7 +464,7 @@ BuildGuidDataHob (
return HobData;
}
- return CopyMem (HobData, Data, DataLength);
+ return CopyMem(HobData, Data, DataLength);
}
/**
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
index 5e964f707..80de7d6be 100644
--- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
@@ -583,7 +583,7 @@ InternalAllocateCopyPool(
Memory = InternalAllocatePool (PoolType, AllocationSize);
if (Memory != NULL) {
- Memory = CopyMem (Memory, Buffer, AllocationSize);
+ Memory = CopyMem(Memory, Buffer, AllocationSize);
}
return Memory;
}
@@ -619,7 +619,7 @@ AllocateCopyPool(
Memory = AllocatePool (AllocationSize);
if (Memory != NULL) {
- Memory = CopyMem (Memory, Buffer, AllocationSize);
+ Memory = CopyMem(Memory, Buffer, AllocationSize);
}
return Memory;
}
@@ -712,7 +712,7 @@ InternalReallocatePool (
NewBuffer = InternalAllocateZeroPool(PoolType, NewSize);
if (NewBuffer != NULL && OldBuffer != NULL) {
- CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
+ CopyMem(NewBuffer, OldBuffer, MIN (OldSize, NewSize));
FreePool(OldBuffer);
}
return NewBuffer;
diff --git a/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c b/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
index 438abf4e8..f81e9ee48 100644
--- a/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
@@ -38,7 +38,7 @@
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -53,5 +53,5 @@ CopyMem (
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
+ return InternalMemCopyMem(DestinationBuffer, SourceBuffer, Length);
}
diff --git a/MdePkg/Library/PeiMemoryLib/MemLib.c b/MdePkg/Library/PeiMemoryLib/MemLib.c
index 180c11bea..f4dc3056f 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLib.c
+++ b/MdePkg/Library/PeiMemoryLib/MemLib.c
@@ -11,7 +11,7 @@
/**
Copies a source buffer to a destination buffer, and returns the destination buffer.
- This function wraps the gPS->CopyMem ().
+ This function wraps the gPS->CopyMem().
@param DestinationBuffer The pointer to the destination buffer of the memory copy.
@param SourceBuffer The pointer to the source buffer of the memory copy.
@@ -22,13 +22,13 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *Destination,
IN CONST VOID *Source,
IN UINTN Length
)
{
- (*GetPeiServicesTablePointer ())->CopyMem (
+ (*GetPeiServicesTablePointer ())->CopyMem(
Destination,
(VOID*)Source,
Length
@@ -39,7 +39,7 @@ InternalMemCopyMem (
/**
Fills a target buffer with a byte value, and returns the target buffer.
- This function wraps the gPS->SetMem ().
+ This function wraps the gPS->SetMem().
@param Buffer Memory to set.
@param Size The number of bytes to set.
@@ -50,13 +50,13 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Size,
IN UINT8 Value
)
{
- (*GetPeiServicesTablePointer ())->SetMem (
+ (*GetPeiServicesTablePointer ())->SetMem(
Buffer,
Size,
Value
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c b/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c
index f646850ed..789cce510 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c
+++ b/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c
@@ -101,7 +101,7 @@ InternalMemZeroMem (
IN UINTN Length
)
{
- return InternalMemSetMem (Buffer, Length, 0);
+ return InternalMemSetMem(Buffer, Length, 0);
}
/**
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
index 43d555a98..4e2a520ae 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
+++ b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
@@ -19,7 +19,7 @@
/**
Copies a source buffer to a destination buffer, and returns the destination buffer.
- This function wraps the (*PeiServices)->CopyMem ().
+ This function wraps the (*PeiServices)->CopyMem().
@param DestinationBuffer The pointer to the destination buffer of the memory copy.
@param SourceBuffer The pointer to the source buffer of the memory copy.
@@ -30,7 +30,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *Destination,
IN CONST VOID *Source,
IN UINTN Length
@@ -39,7 +39,7 @@ InternalMemCopyMem (
/**
Fills a target buffer with a byte value, and returns the target buffer.
- This function wraps the (*PeiServices)->SetMem ().
+ This function wraps the (*PeiServices)->SetMem().
@param Buffer The memory to set.
@param Size The number of bytes to set.
@@ -50,7 +50,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Size,
IN UINT8 Value
diff --git a/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c b/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
index 39ec8cb0d..347853768 100644
--- a/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
@@ -35,7 +35,7 @@
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -47,7 +47,7 @@ SetMem (
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return InternalMemSetMem (Buffer, Length, Value);
+ return InternalMemSetMem(Buffer, Length, Value);
}
/**
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
index 34e5b5bce..9f1ea838e 100644
--- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
+++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
@@ -1384,7 +1384,7 @@ LibPatchPcdSetPtr (
return NULL;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
return (VOID *) Buffer;
}
@@ -1434,7 +1434,7 @@ LibPatchPcdSetPtrS (
return RETURN_INVALID_PARAMETER;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
return RETURN_SUCCESS;
}
@@ -1489,7 +1489,7 @@ LibPatchPcdSetPtrAndSize (
return NULL;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
*SizeOfPatchVariable = *SizeOfBuffer;
return (VOID *) Buffer;
@@ -1544,7 +1544,7 @@ LibPatchPcdSetPtrAndSizeS (
return RETURN_INVALID_PARAMETER;
}
- CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
+ CopyMem(PatchVariable, Buffer, *SizeOfBuffer);
*SizeOfPatchVariable = *SizeOfBuffer;
return RETURN_SUCCESS;
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
index 9318df8a1..1c054b794 100644
--- a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
@@ -115,7 +115,7 @@ MigratePeiServicesTablePointer (
//
// Idt table needs to be migrated into memory.
//
- CopyMem ((VOID *) (UINTN) IdtBase, (VOID *) (Idtr.Base - sizeof (UINTN)), Idtr.Limit + 1 + sizeof (UINTN));
+ CopyMem((VOID *) (UINTN) IdtBase, (VOID *) (Idtr.Base - sizeof (UINTN)), Idtr.Limit + 1 + sizeof (UINTN));
Idtr.Base = (UINTN) IdtBase + sizeof (UINTN);
AsmWriteIdtr (&Idtr);
diff --git a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c
index d644583ba..7de6d1acb 100644
--- a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c
+++ b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c
@@ -573,6 +573,6 @@ SmBusBlockProcessCall (
//
// Assuming that ReadBuffer is large enough to save another memory copy.
//
- ReadBuffer = CopyMem (ReadBuffer, WriteBuffer, Length);
+ ReadBuffer = CopyMem(ReadBuffer, WriteBuffer, Length);
return InternalSmBusExec (EfiSmbusBWBRProcessCall, SmBusAddress, Length, ReadBuffer, Status);
}
diff --git a/MdePkg/Library/SmmIoLib/SmmIoLib.c b/MdePkg/Library/SmmIoLib/SmmIoLib.c
index cf46e8e7e..aafd9981d 100644
--- a/MdePkg/Library/SmmIoLib/SmmIoLib.c
+++ b/MdePkg/Library/SmmIoLib/SmmIoLib.c
@@ -175,7 +175,7 @@ MergeGcdMmioEntry (
NewGcdMemoryMapEntry = GcdMemoryMap;
GcdMemoryMapEnd = (EFI_GCD_MEMORY_SPACE_DESCRIPTOR *) ((UINT8 *) GcdMemoryMap + (*NumberOfDescriptors) * sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR));
while ((UINTN)GcdMemoryMapEntry < (UINTN)GcdMemoryMapEnd) {
- CopyMem (NewGcdMemoryMapEntry, GcdMemoryMapEntry, sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR));
+ CopyMem(NewGcdMemoryMapEntry, GcdMemoryMapEntry, sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR));
NextGcdMemoryMapEntry = GcdMemoryMapEntry + 1;
do {
diff --git a/MdePkg/Library/SmmMemLib/SmmMemLib.c b/MdePkg/Library/SmmMemLib/SmmMemLib.c
index d346dd013..9780567d7 100644
--- a/MdePkg/Library/SmmMemLib/SmmMemLib.c
+++ b/MdePkg/Library/SmmMemLib/SmmMemLib.c
@@ -258,7 +258,7 @@ SmmCopyMemToSmram (
DEBUG ((EFI_D_ERROR, "SmmCopyMemToSmram: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));
return EFI_SECURITY_VIOLATION;
}
- CopyMem (DestinationBuffer, SourceBuffer, Length);
+ CopyMem(DestinationBuffer, SourceBuffer, Length);
return EFI_SUCCESS;
}
@@ -291,7 +291,7 @@ SmmCopyMemFromSmram (
DEBUG ((EFI_D_ERROR, "SmmCopyMemFromSmram: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));
return EFI_SECURITY_VIOLATION;
}
- CopyMem (DestinationBuffer, SourceBuffer, Length);
+ CopyMem(DestinationBuffer, SourceBuffer, Length);
return EFI_SUCCESS;
}
@@ -315,7 +315,7 @@ SmmCopyMemFromSmram (
**/
EFI_STATUS
EFIAPI
-SmmCopyMem (
+SmmCopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -329,7 +329,7 @@ SmmCopyMem (
DEBUG ((EFI_D_ERROR, "SmmCopyMem: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));
return EFI_SECURITY_VIOLATION;
}
- CopyMem (DestinationBuffer, SourceBuffer, Length);
+ CopyMem(DestinationBuffer, SourceBuffer, Length);
return EFI_SUCCESS;
}
@@ -351,7 +351,7 @@ SmmCopyMem (
**/
EFI_STATUS
EFIAPI
-SmmSetMem (
+SmmSetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -361,7 +361,7 @@ SmmSetMem (
DEBUG ((EFI_D_ERROR, "SmmSetMem: Security Violation: Source (0x%x), Length (0x%x)\n", Buffer, Length));
return EFI_SECURITY_VIOLATION;
}
- SetMem (Buffer, Length, Value);
+ SetMem(Buffer, Length, Value);
return EFI_SUCCESS;
}
@@ -408,7 +408,7 @@ SmmMemLibInternalGetGcdMemoryMap (
(MemSpaceMap[Index].Capabilities & (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED | EFI_MEMORY_TESTED)) ==
(EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED)
) {
- CopyMem (
+ CopyMem(
&mSmmMemLibGcdMemSpace[mSmmMemLibGcdMemNumberOfDesc],
&MemSpaceMap[Index],
sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR)
@@ -527,7 +527,7 @@ SmmLibInternalEndOfDxeNotify (
case EfiRuntimeServicesCode:
case EfiRuntimeServicesData:
case EfiACPIMemoryNVS:
- CopyMem (mMemoryMap, MemoryMap, DescriptorSize);
+ CopyMem(mMemoryMap, MemoryMap, DescriptorSize);
mMemoryMap = NEXT_MEMORY_DESCRIPTOR(mMemoryMap, DescriptorSize);
break;
}
diff --git a/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c
index 682205937..061243e89 100644
--- a/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c
@@ -711,7 +711,7 @@ InternalAllocateCopyPool(
Memory = InternalAllocatePool (PoolType, AllocationSize);
if (Memory != NULL) {
- Memory = CopyMem (Memory, Buffer, AllocationSize);
+ Memory = CopyMem(Memory, Buffer, AllocationSize);
}
return Memory;
}
@@ -834,7 +834,7 @@ InternalReallocatePool (
NewBuffer = InternalAllocateZeroPool(PoolType, NewSize);
if (NewBuffer != NULL && OldBuffer != NULL) {
- CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
+ CopyMem(NewBuffer, OldBuffer, MIN (OldSize, NewSize));
FreePool(OldBuffer);
}
return NewBuffer;
diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
index cf168d05c..a79af8b38 100644
--- a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
@@ -272,7 +272,7 @@ DebugClearMemory (
//
// SetMem() checks for the the ASSERT() condition on Length and returns Buffer
//
- return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
+ return SetMem(Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
}
diff --git a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c
index dff376a8e..8682b905c 100644
--- a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c
@@ -326,7 +326,7 @@ DebugClearMemory (
//
// SetMem() checks for the the ASSERT() condition on Length and returns Buffer
//
- return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
+ return SetMem(Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
}
diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
index 40eb697e7..5320bb82a 100644
--- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
@@ -273,7 +273,7 @@ DebugClearMemory (
//
// SetMem() checks for the the ASSERT() condition on Length and returns Buffer
//
- return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
+ return SetMem(Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
}
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
index 882b00f50..718e337bc 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
@@ -2505,7 +2505,7 @@ DevPathFromTextUsbWwid (
// There is no memory allocated in UsbWwid for the '\0' in SerialNumberStr.
// Therefore, the '\0' will not be copied.
//
- CopyMem (
+ CopyMem(
(UINT8 *) UsbWwid + sizeof (USB_WWID_DEVICE_PATH),
SerialNumberStr,
SerialNumberStrLen * sizeof (CHAR16)
@@ -2710,7 +2710,7 @@ DevPathFromTextWiFi (
}
UnicodeStrToAsciiStrS (SSIdStr, AsciiStr, sizeof (AsciiStr));
- CopyMem (WiFiDp->SSId, AsciiStr, DataLen);
+ CopyMem(WiFiDp->SSId, AsciiStr, DataLen);
}
return (EFI_DEVICE_PATH_PROTOCOL *) WiFiDp;
@@ -2931,7 +2931,7 @@ DevPathFromTextHD (
Hd->MBRType = 0x01;
Signature32 = (UINT32) Strtoi (SignatureStr);
- CopyMem (Hd->Signature, &Signature32, sizeof (UINT32));
+ CopyMem(Hd->Signature, &Signature32, sizeof (UINT32));
} else if (StrCmp (TypeStr, L"GPT") == 0) {
Hd->SignatureType = SIGNATURE_TYPE_GUID;
Hd->MBRType = 0x02;
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index 310befd3c..188f3f945 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -1680,7 +1680,7 @@ DevPathToTextWiFi (
WiFi = DevPath;
SSId[32] = '\0';
- CopyMem (SSId, WiFi->SSId, 32);
+ CopyMem(SSId, WiFi->SSId, 32);
UefiDevicePathLibCatPrint (Str, L"Wi-Fi(%a)", SSId);
}
@@ -1800,7 +1800,7 @@ DevPathToTextUri (
UriStr = AllocatePool (UriLength + 1);
ASSERT (UriStr != NULL);
- CopyMem (UriStr, Uri->Uri, UriLength);
+ CopyMem(UriStr, Uri->Uri, UriLength);
UriStr[UriLength] = '\0';
UefiDevicePathLibCatPrint (Str, L"Uri(%a)", UriStr);
FreePool(UriStr);
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c
index 77ad31445..63f86acec 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c
@@ -337,7 +337,7 @@ SetDevicePathEndNode (
)
{
ASSERT (Node != NULL);
- CopyMem (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath));
+ CopyMem(Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath));
}
/**
@@ -485,13 +485,13 @@ UefiDevicePathLibAppendDevicePath (
NewDevicePath = AllocatePool (Size);
if (NewDevicePath != NULL) {
- NewDevicePath = CopyMem (NewDevicePath, FirstDevicePath, Size1);
+ NewDevicePath = CopyMem(NewDevicePath, FirstDevicePath, Size1);
//
// Over write FirstDevicePath EndNode and do the copy
//
DevicePath2 = (EFI_DEVICE_PATH_PROTOCOL *) ((CHAR8 *) NewDevicePath +
(Size1 - END_DEVICE_PATH_LENGTH));
- CopyMem (DevicePath2, SecondDevicePath, Size2);
+ CopyMem(DevicePath2, SecondDevicePath, Size2);
}
return NewDevicePath;
@@ -549,7 +549,7 @@ UefiDevicePathLibAppendDevicePathNode (
if (TempDevicePath == NULL) {
return NULL;
}
- TempDevicePath = CopyMem (TempDevicePath, DevicePathNode, NodeLength);
+ TempDevicePath = CopyMem(TempDevicePath, DevicePathNode, NodeLength);
//
// Add and end device path node to convert Node to device path
//
@@ -618,7 +618,7 @@ UefiDevicePathLibAppendDevicePathInstance (
NewDevicePath = AllocatePool (SrcSize + InstanceSize);
if (NewDevicePath != NULL) {
- TempDevicePath = CopyMem (NewDevicePath, DevicePath, SrcSize);;
+ TempDevicePath = CopyMem(NewDevicePath, DevicePath, SrcSize);;
while (!IsDevicePathEnd (TempDevicePath)) {
TempDevicePath = NextDevicePathNode (TempDevicePath);
@@ -626,7 +626,7 @@ UefiDevicePathLibAppendDevicePathInstance (
TempDevicePath->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE;
TempDevicePath = NextDevicePathNode (TempDevicePath);
- CopyMem (TempDevicePath, DevicePathInstance, InstanceSize);
+ CopyMem(TempDevicePath, DevicePathInstance, InstanceSize);
}
return NewDevicePath;
@@ -880,7 +880,7 @@ FileDevicePath (
FilePath = (FILEPATH_DEVICE_PATH *) FileDevicePath;
FilePath->Header.Type = MEDIA_DEVICE_PATH;
FilePath->Header.SubType = MEDIA_FILEPATH_DP;
- CopyMem (&FilePath->PathName, FileName, Size);
+ CopyMem(&FilePath->PathName, FileName, Size);
SetDevicePathNodeLength (&FilePath->Header, Size + SIZE_OF_FILEPATH_DEVICE_PATH);
SetDevicePathEndNode (NextDevicePathNode (&FilePath->Header));
diff --git a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c
index ae40130fd..ef73e9f90 100644
--- a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c
+++ b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c
@@ -378,7 +378,7 @@ SetDevicePathEndNode (
)
{
ASSERT (Node != NULL);
- CopyMem (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath));
+ CopyMem(Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath));
}
/**
@@ -701,7 +701,7 @@ FileDevicePath (
FilePath = (FILEPATH_DEVICE_PATH *) FileDevicePath;
FilePath->Header.Type = MEDIA_DEVICE_PATH;
FilePath->Header.SubType = MEDIA_FILEPATH_DP;
- CopyMem (&FilePath->PathName, FileName, Size);
+ CopyMem(&FilePath->PathName, FileName, Size);
SetDevicePathNodeLength (&FilePath->Header, Size + SIZE_OF_FILEPATH_DEVICE_PATH);
SetDevicePathEndNode (NextDevicePathNode (&FilePath->Header));
diff --git a/MdePkg/Library/UefiLib/Acpi.c b/MdePkg/Library/UefiLib/Acpi.c
index 1a1214b9a..424f33363 100644
--- a/MdePkg/Library/UefiLib/Acpi.c
+++ b/MdePkg/Library/UefiLib/Acpi.c
@@ -59,7 +59,7 @@ ScanTableInSDT (
BasePtr = (UINTN)(Sdt + 1);
for (Index = 0; Index < EntryCount; Index ++) {
EntryPtr = 0;
- CopyMem (&EntryPtr, (VOID *)(BasePtr + Index * TablePointerSize), TablePointerSize);
+ CopyMem(&EntryPtr, (VOID *)(BasePtr + Index * TablePointerSize), TablePointerSize);
Table = (EFI_ACPI_COMMON_HEADER *)((UINTN)(EntryPtr));
if ((Table != NULL) && (Table->Signature == Signature)) {
if (PreviousTable != NULL) {
@@ -107,7 +107,7 @@ LocateAcpiFacsFromFadt (
if (Fadt->Header.Revision < EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION) {
Facs = (EFI_ACPI_COMMON_HEADER *)(UINTN)Fadt->FirmwareCtrl;
} else {
- CopyMem (&Data64, &Fadt->XFirmwareCtrl, sizeof(UINT64));
+ CopyMem(&Data64, &Fadt->XFirmwareCtrl, sizeof(UINT64));
if (Data64 != 0) {
Facs = (EFI_ACPI_COMMON_HEADER *)(UINTN)Data64;
} else {
@@ -140,7 +140,7 @@ LocateAcpiDsdtFromFadt (
if (Fadt->Header.Revision < EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION) {
Dsdt = (EFI_ACPI_COMMON_HEADER *)(UINTN)Fadt->Dsdt;
} else {
- CopyMem (&Data64, &Fadt->XDsdt, sizeof(UINT64));
+ CopyMem(&Data64, &Fadt->XDsdt, sizeof(UINT64));
if (Data64 != 0) {
Dsdt = (EFI_ACPI_COMMON_HEADER *)(UINTN)Data64;
} else {
diff --git a/MdePkg/Library/UefiLib/Console.c b/MdePkg/Library/UefiLib/Console.c
index 8ba00f1a3..e8e92ebee 100644
--- a/MdePkg/Library/UefiLib/Console.c
+++ b/MdePkg/Library/UefiLib/Console.c
@@ -441,7 +441,7 @@ CreatePopUp (
//
// Save the current console cursor position and attributes
//
- CopyMem (&SavedConsoleMode, ConOut->Mode, sizeof (SavedConsoleMode));
+ CopyMem(&SavedConsoleMode, ConOut->Mode, sizeof (SavedConsoleMode));
//
// Retrieve the number of columns and rows in the current console mode
diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
index fa324e8d7..f10f8f8a0 100644
--- a/MdePkg/Library/UefiLib/UefiLib.c
+++ b/MdePkg/Library/UefiLib/UefiLib.c
@@ -980,7 +980,7 @@ AddUnicodeString (
// newly allocated Unicode String Table.
//
if (*UnicodeStringTable != NULL) {
- CopyMem (
+ CopyMem(
NewUnicodeStringTable,
*UnicodeStringTable,
NumberOfEntries * sizeof (EFI_UNICODE_STRING_TABLE)
@@ -1191,7 +1191,7 @@ AddUnicodeString2 (
// newly allocated Unicode String Table.
//
if (*UnicodeStringTable != NULL) {
- CopyMem (
+ CopyMem(
NewUnicodeStringTable,
*UnicodeStringTable,
NumberOfEntries * sizeof (EFI_UNICODE_STRING_TABLE)
@@ -1697,7 +1697,7 @@ GetBestLanguage (
if (BestLanguage == NULL) {
return NULL;
}
- return CopyMem (BestLanguage, Supported, CompareLength);
+ return CopyMem(BestLanguage, Supported, CompareLength);
}
}
diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c
index 3754ec0a0..411158c92 100644
--- a/MdePkg/Library/UefiLib/UefiLibPrint.c
+++ b/MdePkg/Library/UefiLib/UefiLibPrint.c
@@ -444,18 +444,18 @@ InternalPrintGraphic (
ZeroMem (&FontInfo, sizeof (EFI_FONT_DISPLAY_INFO));
if (Foreground != NULL) {
- CopyMem (&FontInfo.ForegroundColor, Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
+ CopyMem(&FontInfo.ForegroundColor, Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
} else {
- CopyMem (
+ CopyMem(
&FontInfo.ForegroundColor,
&mEfiColors[Sto->Mode->Attribute & 0x0f],
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
);
}
if (Background != NULL) {
- CopyMem (&FontInfo.BackgroundColor, Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
+ CopyMem(&FontInfo.BackgroundColor, Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
} else {
- CopyMem (
+ CopyMem(
&FontInfo.BackgroundColor,
&mEfiColors[Sto->Mode->Attribute >> 4],
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
diff --git a/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
index b1323c7cd..438c34365 100644
--- a/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
@@ -596,7 +596,7 @@ InternalAllocateCopyPool(
Memory = InternalAllocatePool (PoolType, AllocationSize);
if (Memory != NULL) {
- Memory = CopyMem (Memory, Buffer, AllocationSize);
+ Memory = CopyMem(Memory, Buffer, AllocationSize);
}
return Memory;
}
@@ -716,7 +716,7 @@ InternalReallocatePool (
NewBuffer = InternalAllocateZeroPool(PoolType, NewSize);
if (NewBuffer != NULL && OldBuffer != NULL) {
- CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));
+ CopyMem(NewBuffer, OldBuffer, MIN (OldSize, NewSize));
FreePool(OldBuffer);
}
return NewBuffer;
diff --git a/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c b/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c
index 438abf4e8..f81e9ee48 100644
--- a/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c
@@ -38,7 +38,7 @@
**/
VOID *
EFIAPI
-CopyMem (
+CopyMem(
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
@@ -53,5 +53,5 @@ CopyMem (
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
+ return InternalMemCopyMem(DestinationBuffer, SourceBuffer, Length);
}
diff --git a/MdePkg/Library/UefiMemoryLib/MemLib.c b/MdePkg/Library/UefiMemoryLib/MemLib.c
index cff22fa3c..da230b8a4 100644
--- a/MdePkg/Library/UefiMemoryLib/MemLib.c
+++ b/MdePkg/Library/UefiMemoryLib/MemLib.c
@@ -22,13 +22,13 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *Destination,
IN CONST VOID *Source,
IN UINTN Length
)
{
- gBS->CopyMem (Destination, (VOID*)Source, Length);
+ gBS->CopyMem(Destination, (VOID*)Source, Length);
return Destination;
}
@@ -46,7 +46,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Size,
IN UINT8 Value
diff --git a/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c b/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c
index 73ef0d92d..d7b5d2de5 100644
--- a/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c
+++ b/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c
@@ -101,7 +101,7 @@ InternalMemZeroMem (
IN UINTN Length
)
{
- return InternalMemSetMem (Buffer, Length, 0);
+ return InternalMemSetMem(Buffer, Length, 0);
}
/**
diff --git a/MdePkg/Library/UefiMemoryLib/MemLibInternals.h b/MdePkg/Library/UefiMemoryLib/MemLibInternals.h
index cda2a52d7..455bd2cd6 100644
--- a/MdePkg/Library/UefiMemoryLib/MemLibInternals.h
+++ b/MdePkg/Library/UefiMemoryLib/MemLibInternals.h
@@ -30,7 +30,7 @@
**/
VOID *
EFIAPI
-InternalMemCopyMem (
+InternalMemCopyMem(
OUT VOID *Destination,
IN CONST VOID *Source,
IN UINTN Length
@@ -50,7 +50,7 @@ InternalMemCopyMem (
**/
VOID *
EFIAPI
-InternalMemSetMem (
+InternalMemSetMem(
OUT VOID *Buffer,
IN UINTN Size,
IN UINT8 Value
diff --git a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c
index 1d54a8afe..91430c1cf 100644
--- a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c
@@ -35,7 +35,7 @@
**/
VOID *
EFIAPI
-SetMem (
+SetMem(
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
@@ -47,7 +47,7 @@ SetMem (
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return InternalMemSetMem (Buffer, Length, Value);
+ return InternalMemSetMem(Buffer, Length, Value);
}
/**
diff --git a/MemoryFix/AptioMemoryFix/BootFixes.c b/MemoryFix/AptioMemoryFix/BootFixes.c
index db5d55404..bcbbd823a 100644
--- a/MemoryFix/AptioMemoryFix/BootFixes.c
+++ b/MemoryFix/AptioMemoryFix/BootFixes.c
@@ -294,7 +294,7 @@ PrepareJumpFromKernel (
return EFI_BUFFER_TOO_SMALL;
}
- CopyMem ((VOID *)(UINTN)HigherMem, (VOID *)&JumpToKernel, Size);
+ CopyMem((VOID *)(UINTN)HigherMem, (VOID *)&JumpToKernel, Size);
DEBUG ((DEBUG_VERBOSE, "PrepareJumpFromKernel(): JumpToKernel relocated from %p, to %x, size = %x\n",
&JumpToKernel, HigherMem, Size));
@@ -320,7 +320,7 @@ PrepareJumpFromKernel (
//
// Copy sys table to the new location.
//
- CopyMem ((VOID *)(UINTN)gSysTableRtArea, gST, gST->Hdr.HeaderSize);
+ CopyMem((VOID *)(UINTN)gSysTableRtArea, gST, gST->Hdr.HeaderSize);
return Status;
}
@@ -342,12 +342,12 @@ KernelEntryPatchJump (
//
// Save original kernel entry code
//
- CopyMem ((VOID *)mOrigKernelCode, (VOID *)(UINTN)KernelEntry, mOrigKernelCodeSize);
+ CopyMem((VOID *)mOrigKernelCode, (VOID *)(UINTN)KernelEntry, mOrigKernelCodeSize);
//
// Copy EntryPatchCode code to kernel entry address
//
- CopyMem ((VOID *)(UINTN)KernelEntry, (VOID *)&EntryPatchCode, mOrigKernelCodeSize);
+ CopyMem((VOID *)(UINTN)KernelEntry, (VOID *)&EntryPatchCode, mOrigKernelCodeSize);
//
// Pass KernelEntry to assembler funcs.
@@ -396,7 +396,7 @@ KernelEntryPatchJumpBack (
//
// Restore original kernel entry code.
//
- CopyMem ((VOID *)(UINTN)AsmKernelEntry, (VOID *)mOrigKernelCode, mOrigKernelCodeSize);
+ CopyMem((VOID *)(UINTN)AsmKernelEntry, (VOID *)mOrigKernelCode, mOrigKernelCodeSize);
return Args;
}
@@ -480,7 +480,7 @@ ExecSetVirtualAddressesToMemMap (
//
// Copy region with EFI_MEMORY_RUNTIME flag to mVirtualMemoryMap.
//
- CopyMem ((VOID*)VirtualDesc, (VOID*)Desc, DescriptorSize);
+ CopyMem((VOID*)VirtualDesc, (VOID*)Desc, DescriptorSize);
//
// Define virtual to phisical mapping.
@@ -530,7 +530,7 @@ CopyEfiSysTableToRtArea (
Src = (EFI_SYSTEM_TABLE*)(UINTN)*EfiSystemTable;
Dest = (EFI_SYSTEM_TABLE*)(UINTN)gSysTableRtArea;
- CopyMem (Dest, Src, Src->Hdr.HeaderSize);
+ CopyMem(Dest, Src, Src->Hdr.HeaderSize);
*EfiSystemTable = (UINT32)(UINTN)Dest;
}
diff --git a/MemoryFix/AptioMemoryFix/CustomSlide.c b/MemoryFix/AptioMemoryFix/CustomSlide.c
index 6301e413f..2794b1cae 100644
--- a/MemoryFix/AptioMemoryFix/CustomSlide.c
+++ b/MemoryFix/AptioMemoryFix/CustomSlide.c
@@ -509,7 +509,7 @@ UnlockSlideSupportForSafeMode (
// Here we just patch the comparison code and the check by straight nopping.
//
DEBUG ((DEBUG_VERBOSE, "Patching new safe mode aslr check...\n"));
- SetMem (StartOff + FirstOff, sizeof (SearchSeqNew) + 1, 0x90);
+ SetMem(StartOff + FirstOff, sizeof (SearchSeqNew) + 1, 0x90);
return;
}
@@ -537,8 +537,8 @@ UnlockSlideSupportForSafeMode (
// We are allowed to use this instead of to simulate if (false).
//
DEBUG ((DEBUG_VERBOSE, "Patching safe mode aslr check...\n"));
- SetMem (StartOff + FirstOff, sizeof (SearchSeq), 0xFF);
- SetMem (StartOff + SecondOff, sizeof (SearchSeq), 0xFF);
+ SetMem(StartOff + FirstOff, sizeof (SearchSeq), 0xFF);
+ SetMem(StartOff + SecondOff, sizeof (SearchSeq), 0xFF);
}
}
diff --git a/MemoryFix/AptioMemoryFix/RtShims.c b/MemoryFix/AptioMemoryFix/RtShims.c
index e2de02ccb..be9ea3b53 100644
--- a/MemoryFix/AptioMemoryFix/RtShims.c
+++ b/MemoryFix/AptioMemoryFix/RtShims.c
@@ -129,7 +129,7 @@ VOID InstallRtShims (
gGetVariableOverride = (UINTN)GetVariableOverride;
- CopyMem (
+ CopyMem(
gRtShims,
(VOID *)&gRtShimsDataStart,
((UINTN)&gRtShimsDataEnd - (UINTN)&gRtShimsDataStart)
diff --git a/MemoryFix/OsxAptioFixDrv/OsxAptioFix3Drv.c b/MemoryFix/OsxAptioFixDrv/OsxAptioFix3Drv.c
index a377828fb..64451d503 100644
--- a/MemoryFix/OsxAptioFixDrv/OsxAptioFix3Drv.c
+++ b/MemoryFix/OsxAptioFixDrv/OsxAptioFix3Drv.c
@@ -458,7 +458,7 @@ RunImageWithOverrides(
gGetNextVariableName = (UINTN)gRT->GetNextVariableName;
gSetVariable = (UINTN)gRT->SetVariable;
- CopyMem (
+ CopyMem(
RTShims,
(VOID *)&gRTShimsDataStart,
((UINTN)&gRTShimsDataEnd - (UINTN)&gRTShimsDataStart)
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
index 05a72ee39..809f2b4b6 100644
--- a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
+++ b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
@@ -110,27 +110,27 @@ InitializePcatIsaAcpiDeviceList (
Index = 0;
if (PcdGetBool (PcdIsaAcpiCom1Enable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom1Device, sizeof(mPcatIsaAcpiCom1Device));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom1Device, sizeof(mPcatIsaAcpiCom1Device));
Index++;
}
if (PcdGetBool (PcdIsaAcpiCom2Enable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom2Device, sizeof(mPcatIsaAcpiCom2Device));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom2Device, sizeof(mPcatIsaAcpiCom2Device));
Index++;
}
if (PcdGetBool (PcdIsaAcpiPs2KeyboardEnable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2KeyboardDevice, sizeof(mPcatIsaAcpiPs2KeyboardDevice));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2KeyboardDevice, sizeof(mPcatIsaAcpiPs2KeyboardDevice));
Index++;
}
if (PcdGetBool (PcdIsaAcpiPs2MouseEnable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2MouseDevice, sizeof(mPcatIsaAcpiPs2MouseDevice));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2MouseDevice, sizeof(mPcatIsaAcpiPs2MouseDevice));
Index++;
}
if (PcdGetBool (PcdIsaAcpiFloppyAEnable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyADevice, sizeof(mPcatIsaAcpiFloppyADevice));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyADevice, sizeof(mPcatIsaAcpiFloppyADevice));
Index++;
}
if (PcdGetBool (PcdIsaAcpiFloppyBEnable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyBDevice, sizeof(mPcatIsaAcpiFloppyBDevice));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyBDevice, sizeof(mPcatIsaAcpiFloppyBDevice));
Index++;
}
}
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c.bak b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c.bak
index a580d55d6..a910aa1b7 100644
--- a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c.bak
+++ b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c.bak
@@ -115,27 +115,27 @@ InitializePcatIsaAcpiDeviceList (
Index = 0;
if (PcdGetBool (PcdIsaAcpiCom1Enable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom1Device, sizeof(mPcatIsaAcpiCom1Device));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom1Device, sizeof(mPcatIsaAcpiCom1Device));
Index++;
}
if (PcdGetBool (PcdIsaAcpiCom2Enable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom2Device, sizeof(mPcatIsaAcpiCom2Device));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiCom2Device, sizeof(mPcatIsaAcpiCom2Device));
Index++;
}
if (PcdGetBool (PcdIsaAcpiPs2KeyboardEnable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2KeyboardDevice, sizeof(mPcatIsaAcpiPs2KeyboardDevice));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2KeyboardDevice, sizeof(mPcatIsaAcpiPs2KeyboardDevice));
Index++;
}
if (PcdGetBool (PcdIsaAcpiPs2MouseEnable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2MouseDevice, sizeof(mPcatIsaAcpiPs2MouseDevice));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiPs2MouseDevice, sizeof(mPcatIsaAcpiPs2MouseDevice));
Index++;
}
if (PcdGetBool (PcdIsaAcpiFloppyAEnable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyADevice, sizeof(mPcatIsaAcpiFloppyADevice));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyADevice, sizeof(mPcatIsaAcpiFloppyADevice));
Index++;
}
if (PcdGetBool (PcdIsaAcpiFloppyBEnable)) {
- CopyMem (&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyBDevice, sizeof(mPcatIsaAcpiFloppyBDevice));
+ CopyMem(&gPcatIsaAcpiDeviceList[Index], &mPcatIsaAcpiFloppyBDevice, sizeof(mPcatIsaAcpiFloppyBDevice));
Index++;
}
}
diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
index 0ab8d2b95..206f482f9 100644
--- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
+++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
@@ -462,7 +462,7 @@ PcRtcSetTime (
return Status;
}
- CopyMem (&RtcTime, Time, sizeof (EFI_TIME));
+ CopyMem(&RtcTime, Time, sizeof (EFI_TIME));
//
// Acquire RTC Lock to make access to RTC atomic
@@ -728,7 +728,7 @@ PcRtcSetWakeupTime (
//
// Make a local copy of the time and date
//
- CopyMem (&RtcTime, Time, sizeof (EFI_TIME));
+ CopyMem(&RtcTime, Time, sizeof (EFI_TIME));
}
//
diff --git a/Protocols/AptioInputFix/Keycode/AIKData.c b/Protocols/AptioInputFix/Keycode/AIKData.c
index 862db9443..4dcc4f586 100644
--- a/Protocols/AptioInputFix/Keycode/AIKData.c
+++ b/Protocols/AptioInputFix/Keycode/AIKData.c
@@ -44,7 +44,7 @@ AIKDataReadEntry (
return EFI_NOT_READY;
}
- CopyMem (KeyData, Data->KeyBufferTail, sizeof (*KeyData));
+ CopyMem(KeyData, Data->KeyBufferTail, sizeof (*KeyData));
Data->KeyBufferSize--;
Data->KeyBufferTail++;
@@ -73,7 +73,7 @@ AIKDataWriteEntry (
}
Data->KeyBufferSize++;
- CopyMem (Data->KeyBufferHead, KeyData, sizeof (*KeyData));
+ CopyMem(Data->KeyBufferHead, KeyData, sizeof (*KeyData));
Data->KeyBufferHead++;
if (Data->KeyBufferHead == &Data->KeyBuffer[AIK_DATA_BUFFER_SIZE]) {
Data->KeyBufferHead = Data->KeyBuffer;
diff --git a/Protocols/AptioInputFix/Keycode/AIKShim.c b/Protocols/AptioInputFix/Keycode/AIKShim.c
index f86855e0c..53a3a167a 100644
--- a/Protocols/AptioInputFix/Keycode/AIKShim.c
+++ b/Protocols/AptioInputFix/Keycode/AIKShim.c
@@ -115,7 +115,7 @@ AIKShimTextInputReadKeyStroke (
&& (AmiKeyData.KeyState.KeyToggleState & KEY_STATE_EXPOSED)) {
Status = EFI_NOT_READY;
} else {
- CopyMem (Key, &AmiKeyData.Key, sizeof (AmiKeyData.Key));
+ CopyMem(Key, &AmiKeyData.Key, sizeof (AmiKeyData.Key));
}
}
@@ -169,8 +169,8 @@ AIKShimTextInputReadKeyStrokeEx (
//
Status = AIKDataReadEntry (&gAikSelf.Data, &AmiKeyData);
if (!EFI_ERROR(Status)) {
- CopyMem (&KeyData->Key, &AmiKeyData.Key, sizeof (AmiKeyData.Key));
- CopyMem (&KeyData->KeyState, &AmiKeyData.KeyState, sizeof (AmiKeyData.KeyState));
+ CopyMem(&KeyData->Key, &AmiKeyData.Key, sizeof (AmiKeyData.Key));
+ CopyMem(&KeyData->KeyState, &AmiKeyData.KeyState, sizeof (AmiKeyData.KeyState));
}
return Status;
diff --git a/Protocols/AptioInputFix/Keycode/AIKTarget.c b/Protocols/AptioInputFix/Keycode/AIKTarget.c
index caa7d50cb..d4f481590 100644
--- a/Protocols/AptioInputFix/Keycode/AIKTarget.c
+++ b/Protocols/AptioInputFix/Keycode/AIKTarget.c
@@ -83,11 +83,11 @@ AIKTargetRefresh (
if (Target->KeyCounters[Index] + AIK_TARGET_FORGET_THRESHOLD <= Target->Counter) {
Left = Target->NumberOfKeys - (Index + 1);
if (Left > 0) {
- CopyMem (
+ CopyMem(
&Target->KeyCounters[Index],
&Target->KeyCounters[Index+1],
sizeof (Target->KeyCounters[0]) * Left);
- CopyMem (
+ CopyMem(
&Target->Keys[Index],
&Target->Keys[Index+1],
sizeof (Target->Keys[0]) * Left);
diff --git a/Protocols/DataHubDxe/DataHub.c b/Protocols/DataHubDxe/DataHub.c
index 278ca9246..ac47707d2 100644
--- a/Protocols/DataHubDxe/DataHub.c
+++ b/Protocols/DataHubDxe/DataHub.c
@@ -108,8 +108,8 @@ DataHubLogData (
Record->Version = EFI_DATA_RECORD_HEADER_VERSION;
Record->HeaderSize = (UINT16) sizeof (EFI_DATA_RECORD_HEADER);
Record->RecordSize = RecordSize;
- CopyMem (&Record->DataRecordGuid, DataRecordGuid, sizeof (EFI_GUID));
- CopyMem (&Record->ProducerName, ProducerName, sizeof (EFI_GUID));
+ CopyMem(&Record->DataRecordGuid, DataRecordGuid, sizeof (EFI_GUID));
+ CopyMem(&Record->ProducerName, ProducerName, sizeof (EFI_GUID));
Record->DataRecordClass = DataRecordClass;
//
@@ -117,7 +117,7 @@ DataHubLogData (
//
Record->LogMonotonicCount = ++Private->GlobalMonotonicCount;
- CopyMem (&Record->LogTime, &LogTime, sizeof (LogTime));
+ CopyMem(&Record->LogTime, &LogTime, sizeof (LogTime));
//
// Insert log into the internal linked list.
@@ -127,7 +127,7 @@ DataHubLogData (
LogEntry->RecordSize = sizeof (EFI_DATA_ENTRY) + RawDataSize;
InsertTailList (&Private->DataListHead, &LogEntry->Link);
- CopyMem (Raw, RawData, RawDataSize);
+ CopyMem(Raw, RawData, RawDataSize);
EfiReleaseLock (&Private->DataLock);
@@ -452,7 +452,7 @@ DataHubRegisterFilterDriver (
}
if (FilterDataRecordGuid != NULL) {
- CopyMem (&FilterDriver->FilterDataRecordGuid, FilterDataRecordGuid, sizeof (EFI_GUID));
+ CopyMem(&FilterDriver->FilterDataRecordGuid, FilterDataRecordGuid, sizeof (EFI_GUID));
}
//
// Search for duplicate entries
diff --git a/Protocols/EmuVariableUefi/EmuVariable.c b/Protocols/EmuVariableUefi/EmuVariable.c
index 9bb574610..d5033e25c 100644
--- a/Protocols/EmuVariableUefi/EmuVariable.c
+++ b/Protocols/EmuVariableUefi/EmuVariable.c
@@ -498,7 +498,7 @@ GetLangFromSupportedLangCodes (
//
CompareLength = ISO_639_2_ENTRY_SIZE;
mVariableModuleGlobal->Lang[CompareLength] = '\0';
- return CopyMem (mVariableModuleGlobal->Lang, SupportedLang + Index * CompareLength, CompareLength);
+ return CopyMem(mVariableModuleGlobal->Lang, SupportedLang + Index * CompareLength, CompareLength);
} else {
while (TRUE) {
@@ -523,7 +523,7 @@ GetLangFromSupportedLangCodes (
// In driver entry, it pre-allocates a runtime attribute memory to accommodate this string.
//
mVariableModuleGlobal->PlatformLang[CompareLength] = '\0';
- return CopyMem (mVariableModuleGlobal->PlatformLang, Supported - CompareLength, CompareLength);
+ return CopyMem(mVariableModuleGlobal->PlatformLang, Supported - CompareLength, CompareLength);
}
SubIndex++;
@@ -642,7 +642,7 @@ VariableGetBestLanguage (
Buffer = Iso639Language ? mVariableModuleGlobal->Lang : mVariableModuleGlobal->PlatformLang;
Buffer[CompareLength] = '\0';
- return CopyMem (Buffer, Supported, CompareLength);
+ return CopyMem(Buffer, Supported, CompareLength);
}
}
@@ -1036,13 +1036,13 @@ UpdateVariable (
NextVariable->NameSize = (UINT32)VarNameSize;
NextVariable->DataSize = (UINT32)DataSize;
- CopyMem (&NextVariable->VendorGuid, VendorGuid, sizeof (EFI_GUID));
- CopyMem (
+ CopyMem(&NextVariable->VendorGuid, VendorGuid, sizeof (EFI_GUID));
+ CopyMem(
(UINT8 *) ((UINTN) NextVariable + VarNameOffset),
VariableName,
VarNameSize
);
- CopyMem (
+ CopyMem(
(UINT8 *) ((UINTN) NextVariable + VarDataOffset),
Data,
DataSize
@@ -1213,7 +1213,7 @@ EmuGetVariable (
VariableDataPtr = GetVariableDataPtr (Variable.CurrPtr);
// ASSERT (VariableDataPtr != NULL);
- CopyMem (Data, VariableDataPtr, VarDataSize);
+ CopyMem(Data, VariableDataPtr, VarDataSize);
if (Attributes != NULL) {
*Attributes = Variable.CurrPtr->Attributes;
}
@@ -1309,12 +1309,12 @@ EmuGetNextVariableName (
if (!(VariableClassAtRuntime () && ((Variable.CurrPtr->Attributes & EFI_VARIABLE_RUNTIME_ACCESS) == 0))) {
VarNameSize = Variable.CurrPtr->NameSize;
if (VarNameSize <= *VariableNameSize) {
- CopyMem (
+ CopyMem(
VariableName,
GET_VARIABLE_NAME_PTR (Variable.CurrPtr),
VarNameSize
);
- CopyMem (
+ CopyMem(
VendorGuid,
&Variable.CurrPtr->VendorGuid,
sizeof (EFI_GUID)
@@ -1688,7 +1688,7 @@ InitializeVariableStore (
}
if (FullyInitializeStore) {
- SetMem (VariableStore, PcdGet32 (PcdVariableStoreSize), 0xff);
+ SetMem(VariableStore, PcdGet32 (PcdVariableStoreSize), 0xff);
}
//
diff --git a/Protocols/EmuVariableUefi/InitVariable.c b/Protocols/EmuVariableUefi/InitVariable.c
index fd1b7978b..e1aafa9aa 100644
--- a/Protocols/EmuVariableUefi/InitVariable.c
+++ b/Protocols/EmuVariableUefi/InitVariable.c
@@ -544,7 +544,7 @@ VariableServiceInitialize (
// Store orig RS var services
//
gRT = SystemTable->RuntimeServices;
- CopyMem (&gOrgRT, gRT, sizeof(EFI_RUNTIME_SERVICES));
+ CopyMem(&gOrgRT, gRT, sizeof(EFI_RUNTIME_SERVICES));
DBG(", orig services stored");
diff --git a/rEFIt_UEFI/Platform/AcpiPatcher.cpp b/rEFIt_UEFI/Platform/AcpiPatcher.cpp
index 68d6ab851..0c79911ba 100644
--- a/rEFIt_UEFI/Platform/AcpiPatcher.cpp
+++ b/rEFIt_UEFI/Platform/AcpiPatcher.cpp
@@ -1824,7 +1824,7 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, CHAR8 *OSVersion)
// DBG("RSDT entry = 0x%X\n", *pEntryR);
if (*pEntryR != 0) {
*pEntryX = 0;
- CopyMem (pEntryX, pEntryR, sizeof(UINT32));
+ CopyMem(pEntryX, pEntryR, sizeof(UINT32));
pEntryR++;
pEntry += sizeof(UINT64);
} else {
diff --git a/rEFIt_UEFI/Platform/BootOptions.cpp b/rEFIt_UEFI/Platform/BootOptions.cpp
index 17f0282be..4846080a0 100644
--- a/rEFIt_UEFI/Platform/BootOptions.cpp
+++ b/rEFIt_UEFI/Platform/BootOptions.cpp
@@ -488,7 +488,7 @@ DeleteFromBootOrder (
// BootNum found at Index - copy the rest over it
//
if (Index < BootOrderLen - 1) {
- CopyMem (&BootOrder[Index],
+ CopyMem(&BootOrder[Index],
&BootOrder[Index + 1],
(BootOrderLen - (Index + 1)) * sizeof(UINT16)
);
@@ -667,16 +667,16 @@ CompileBootOption (
Ptr8 += sizeof(BootOption->FilePathListLength);
// Description
- CopyMem ((CHAR16*)Ptr8, BootOption->Description, BootOption->DescriptionSize);
+ CopyMem((CHAR16*)Ptr8, BootOption->Description, BootOption->DescriptionSize);
Ptr8 += BootOption->DescriptionSize;
// FilePathList
- CopyMem (Ptr8, BootOption->FilePathList, BootOption->FilePathListLength);
+ CopyMem(Ptr8, BootOption->FilePathList, BootOption->FilePathListLength);
Ptr8 += BootOption->FilePathListLength;
// OptionalData
if (BootOption->OptionalDataSize > 0) {
- CopyMem (Ptr8, BootOption->OptionalData, BootOption->OptionalDataSize);
+ CopyMem(Ptr8, BootOption->OptionalData, BootOption->OptionalDataSize);
// Ptr8 += BootOption->OptionalDataSize;
}
diff --git a/rEFIt_UEFI/Platform/Events.cpp b/rEFIt_UEFI/Platform/Events.cpp
index 89e577106..ff9f2ab48 100644
--- a/rEFIt_UEFI/Platform/Events.cpp
+++ b/rEFIt_UEFI/Platform/Events.cpp
@@ -255,13 +255,12 @@ OnExitBootServices(IN EFI_EVENT Event, IN VOID *Context)
//
// Patch kernel and kexts if needed
//
- if ( !((REFIT_ABSTRACT_MENU_ENTRY*)Context)->getLOADER_ENTRY() ) {
- DebugLog(2, "Bug : Context must be a LOADER_ENTRY\n");
- // what to do ?
- }
- KernelAndKextsPatcherStart(((REFIT_ABSTRACT_MENU_ENTRY*)Context)->getLOADER_ENTRY());
+ LOADER_ENTRY *Entry = ((REFIT_ABSTRACT_MENU_ENTRY*)Context)->getLOADER_ENTRY();
+ if (Entry) {
+ Entry->KernelAndKextsPatcherStart();
+ }
-#if 0
+#if 0 //it will be as a sample of possible patches in future
// gBS->Stall(2000000);
//PauseForKey(L"press any key to MemoryFix");
if (gSettings.MemoryFix) {
@@ -331,20 +330,10 @@ OnExitBootServices(IN EFI_EVENT Event, IN VOID *Context)
}
}
#endif
+
if (gSettings.USBFixOwnership) {
- // Note: blocks on Aptio
-// DisableUsbLegacySupport();
FixOwnership();
}
- // Unlock boot screen
- // apianti - This may cause issues since it frees memory, there's
- // no need to free it at this point since it was all allocated as
- // boot memory so it will be gone anyway after exit boot services
- /*
- if (EFI_ERROR(Status = UnlockBootScreen())) {
- DBG("Failed to unlock boot screen!\n");
- }
- // */
}
VOID
diff --git a/rEFIt_UEFI/Platform/Hibernate.cpp b/rEFIt_UEFI/Platform/Hibernate.cpp
index d419c7ed5..3065dc034 100644
--- a/rEFIt_UEFI/Platform/Hibernate.cpp
+++ b/rEFIt_UEFI/Platform/Hibernate.cpp
@@ -1075,7 +1075,7 @@ PrepareHibernation (IN REFIT_VOLUME *Volume)
Status = GetVariable2 (L"IOHibernateRTCVariables", &gEfiAppleBootGuid, &Value, &Size);
DBG("get IOHR variable status=%s, size=%llu, RTC info=%d\n", strerror(Status), Size, HasHibernateInfoInRTC);
if (!HasHibernateInfo && !EFI_ERROR(Status) && Size == sizeof (RtcVars)) {
- CopyMem (RtcRawVars, Value, sizeof (RtcVars));
+ CopyMem(RtcRawVars, Value, sizeof (RtcVars));
HasHibernateInfo = (RtcVars.signature[0] == 'A' && RtcVars.signature[1] == 'A' &&
RtcVars.signature[2] == 'P' && RtcVars.signature[3] == 'L');
}
diff --git a/rEFIt_UEFI/Platform/LegacyBiosThunk.cpp b/rEFIt_UEFI/Platform/LegacyBiosThunk.cpp
index 79457ccc9..9e326a6ee 100644
--- a/rEFIt_UEFI/Platform/LegacyBiosThunk.cpp
+++ b/rEFIt_UEFI/Platform/LegacyBiosThunk.cpp
@@ -126,7 +126,7 @@ InitializeInterruptRedirection (
//
// Copy code to legacy region
//
- CopyMem ((VOID *)(UINTN)LegacyRegionBase, (VOID *)&InterruptRedirectionCode[0], sizeof (InterruptRedirectionCode));
+ CopyMem((VOID *)(UINTN)LegacyRegionBase, (VOID *)&InterruptRedirectionCode[0], sizeof (InterruptRedirectionCode));
//
// Get VectorBase, it should be 0x68
@@ -291,7 +291,7 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES;
- CopyMem (&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
+ CopyMem(&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
Ret = (BOOLEAN) (Regs->E.EFLAGS.Bits.CF == 1);
@@ -346,7 +346,7 @@ LegacyBiosFarCall86 (
ThunkRegSet.E.DS = Regs->E.DS;
ThunkRegSet.E.ES = Regs->E.ES;
-/* CopyMem (&(ThunkRegSet.E.EFLAGS), &(Regs->E.EFlags), sizeof (UINT32));
+/* CopyMem(&(ThunkRegSet.E.EFLAGS), &(Regs->E.EFlags), sizeof (UINT32));
if ((Stack != NULL) && (StackSize != 0)) {
AsmThunk16SetUserStack (&mThunkContext, Stack, StackSize);
@@ -445,7 +445,7 @@ LegacyBiosFarCall86 (
Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES;
- CopyMem (&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
+ CopyMem(&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
Ret = (BOOLEAN) (Regs->E.EFLAGS.Bits.CF == 1);
diff --git a/rEFIt_UEFI/Platform/LegacyBoot.cpp b/rEFIt_UEFI/Platform/LegacyBoot.cpp
index 9e6e74343..d7fcd92c2 100644
--- a/rEFIt_UEFI/Platform/LegacyBoot.cpp
+++ b/rEFIt_UEFI/Platform/LegacyBoot.cpp
@@ -189,7 +189,7 @@ EFI_STATUS BiosReadSectorsFromDrive(UINT8 DriveNum, UINT64 Lba, UINTN NumSectors
Dap->lba = Lba;
// set registers
- SetMem (&Regs, sizeof (Regs), 0);
+ SetMem(&Regs, sizeof (Regs), 0);
// first reset disk controller as the controller seems to be in an undefined state sometimes
DBG("Reset disk controller: %hhX\n", DriveNum);
@@ -470,7 +470,7 @@ EFI_STATUS bootMBR(REFIT_VOLUME* volume)
UINT8 BiosDriveNum;
//UINTN LogSize;
- SetMem (&Regs, sizeof (Regs), 0);
+ SetMem(&Regs, sizeof (Regs), 0);
addrEnablePaging(0);
Status = gBS->LocateProtocol(&gEfiLegacy8259ProtocolGuid, NULL, (VOID**)&gLegacy8259);
@@ -616,7 +616,7 @@ EFI_STATUS bootPBRtest(REFIT_VOLUME* volume)
EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *Facs = NULL;
IA32_REGISTER_SET Regs;
- SetMem (&Regs, sizeof (Regs), 0);
+ SetMem(&Regs, sizeof (Regs), 0);
addrEnablePaging(0);
//
// find the partition device path node
@@ -940,7 +940,7 @@ EFI_STATUS bootPBR(REFIT_VOLUME* volume, BOOLEAN SataReset)
// prepare 16bit regs:
// DX = BIOS drive num
//
- SetMem (&Regs, sizeof (Regs), 0);
+ SetMem(&Regs, sizeof (Regs), 0);
Regs.X.DX = BiosDriveNum;
// set up SI to partition table entry, some boot1 boot code (such a boot1f32 and boot1h) depend on it
@@ -1103,7 +1103,7 @@ VOID DumpBiosMemoryMap()
IA32_REGISTER_SET Regs;
UINT8* BiosMap = (UINT8*)(UINTN)0x7C00;
- SetMem (&Regs, sizeof (Regs), 0);
+ SetMem(&Regs, sizeof (Regs), 0);
addrEnablePaging(0);
Status = gBS->LocateProtocol(&gEfiLegacy8259ProtocolGuid, NULL, (VOID**)&gLegacy8259);
diff --git a/rEFIt_UEFI/Platform/Nvram.cpp b/rEFIt_UEFI/Platform/Nvram.cpp
index fce047692..c2deb770e 100644
--- a/rEFIt_UEFI/Platform/Nvram.cpp
+++ b/rEFIt_UEFI/Platform/Nvram.cpp
@@ -804,7 +804,7 @@ GetEfiBootDeviceFromNvram ()
if (Guid != NULL) {
gEfiBootDeviceGuid = (__typeof__(gEfiBootDeviceGuid))AllocatePool (sizeof(EFI_GUID));
if (gEfiBootDeviceGuid != NULL) {
- CopyMem (gEfiBootDeviceGuid, Guid, sizeof(EFI_GUID));
+ CopyMem(gEfiBootDeviceGuid, Guid, sizeof(EFI_GUID));
DBG(" - Guid = %s\n", strguid(gEfiBootDeviceGuid));
}
}
diff --git a/rEFIt_UEFI/Platform/Settings.cpp b/rEFIt_UEFI/Platform/Settings.cpp
index 9acfda56f..456b5138c 100644
--- a/rEFIt_UEFI/Platform/Settings.cpp
+++ b/rEFIt_UEFI/Platform/Settings.cpp
@@ -536,7 +536,7 @@ UINT8
if (Prop->data != NULL /*&& Prop->dataLen > 0*/) { //rehabman: allow zero length data
// data property
Data = (__typeof__(Data))AllocateZeroPool(Prop->dataLen);
- CopyMem (Data, Prop->data, Prop->dataLen);
+ CopyMem(Data, Prop->data, Prop->dataLen);
if (DataLen != NULL) {
*DataLen = Prop->dataLen;
@@ -1021,7 +1021,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
CHAR16 **newForceKexts = (__typeof__(newForceKexts))AllocateZeroPool((Patches->NrForceKexts + Count) * sizeof(CHAR16 *));
if (Patches->ForceKexts != NULL) {
- CopyMem (newForceKexts, Patches->ForceKexts, (Patches->NrForceKexts * sizeof(CHAR16 *)));
+ CopyMem(newForceKexts, Patches->ForceKexts, (Patches->NrForceKexts * sizeof(CHAR16 *)));
FreePool(Patches->ForceKexts);
}
@@ -4948,7 +4948,7 @@ GetUserSettings(
gSettings.ArbProperties->ValueType = kTagTypeString;
} else if (Prop3 && (Prop3->type == kTagTypeInteger)) {
gSettings.ArbProperties->Value = (__typeof__(gSettings.ArbProperties->Value))AllocatePool(4);
- CopyMem (gSettings.ArbProperties->Value, &(Prop3->string), 4);
+ CopyMem(gSettings.ArbProperties->Value, &(Prop3->string), 4);
gSettings.ArbProperties->ValueLen = 4;
gSettings.ArbProperties->ValueType = kTagTypeInteger;
} else if (Prop3 && (Prop3->type == kTagTypeTrue)) {
@@ -4970,7 +4970,7 @@ GetUserSettings(
//Special case. In future there must be more such cases
if ((AsciiStrStr(gSettings.ArbProperties->Key, "-platform-id") != NULL)) {
- CopyMem ((CHAR8*)&gSettings.IgPlatform, gSettings.ArbProperties->Value, 4);
+ CopyMem((CHAR8*)&gSettings.IgPlatform, gSettings.ArbProperties->Value, 4);
}
}
} //for() device properties
@@ -5056,7 +5056,7 @@ GetUserSettings(
gSettings.AddProperties[Index].ValueLen = AsciiStrLen(Prop2->string) + 1;
} else if (Prop2 && (Prop2->type == kTagTypeInteger)) {
gSettings.AddProperties[Index].Value = (__typeof__(gSettings.AddProperties[Index].Value))AllocatePool (4);
- CopyMem (gSettings.AddProperties[Index].Value, &(Prop2->string), 4);
+ CopyMem(gSettings.AddProperties[Index].Value, &(Prop2->string), 4);
gSettings.AddProperties[Index].ValueLen = 4;
} else {
//else data
@@ -5266,7 +5266,7 @@ GetUserSettings(
}
}
- CopyMem (&TableId, (CHAR8*)&Id[0], 8);
+ CopyMem(&TableId, (CHAR8*)&Id[0], 8);
DBG(" table-id=\"%s\" (%16.16llX)\n", Id, TableId);
}
// Get the table len to drop
@@ -6124,7 +6124,7 @@ GetUserSettings(
// if CustomUUID and InjectSystemID are not specified
// then use InjectSystemID=TRUE and SMBIOS UUID
// to get Chameleon's default behaviour (to make user's life easier)
- CopyMem ((VOID*)&gUuid, (VOID*)&gSettings.SmUUID, sizeof(EFI_GUID));
+ CopyMem((VOID*)&gUuid, (VOID*)&gSettings.SmUUID, sizeof(EFI_GUID));
gSettings.InjectSystemID = TRUE;
// SystemParameters again - values that can depend on previous params
@@ -6210,7 +6210,7 @@ GetUserSettings(
{
EFI_GUID AppleGuid;
- CopyMem ((VOID*)&AppleGuid, (VOID*)&gUuid, sizeof(EFI_GUID));
+ CopyMem((VOID*)&AppleGuid, (VOID*)&gUuid, sizeof(EFI_GUID));
AppleGuid.Data1 = SwapBytes32 (AppleGuid.Data1);
AppleGuid.Data2 = SwapBytes16 (AppleGuid.Data2);
AppleGuid.Data3 = SwapBytes16 (AppleGuid.Data3);
@@ -6781,7 +6781,7 @@ GetDevices ()
if (NGFX != 0) {
// we found GOP on a GPU scanned later, make space for this GPU at first position
for (i=NGFX; i>0; i--) {
- CopyMem (&gGraphics[i], &gGraphics[i-1], sizeof(GFX_PROPERTIES));
+ CopyMem(&gGraphics[i], &gGraphics[i-1], sizeof(GFX_PROPERTIES));
}
ZeroMem(&gGraphics[0], sizeof(GFX_PROPERTIES));
gfx = &gGraphics[0]; // GPU with active GOP will be added at the first position
@@ -8111,13 +8111,9 @@ InjectKextsFromDir (
return Status;
}
-EFI_STATUS
-SetFSInjection (
- IN LOADER_ENTRY *Entry
- )
+EFI_STATUS LOADER_ENTRY::SetFSInjection ()
{
EFI_STATUS Status;
- REFIT_VOLUME *Volume;
FSINJECTION_PROTOCOL *FSInject;
CHAR16 *SrcDir = NULL;
//BOOLEAN InjectionNeeded = FALSE;
@@ -8127,19 +8123,6 @@ SetFSInjection (
MsgLog ("Beginning FSInjection\n");
- Volume = Entry->Volume;
-
- // some checks?
- /*
- // apianti - this seems to not work sometimes or ever, so just always start
- if ((Volume->BootType == BOOTING_BY_PBR) ||
- (Volume->BootType == BOOTING_BY_MBR) ||
- (Volume->BootType == BOOTING_BY_CD)) {
- MsgLog ("not started - not an EFI boot\n");
- return EFI_UNSUPPORTED;
- }
- */
-
// get FSINJECTION_PROTOCOL
Status = gBS->LocateProtocol(&gFSInjectProtocolGuid, NULL, (void **)&FSInject);
if (EFI_ERROR(Status)) {
@@ -8149,11 +8132,11 @@ SetFSInjection (
}
// check if blocking of caches is needed
- if ( OSFLAG_ISSET(Entry->Flags, OSFLAG_NOCACHES) || Entry->LoadOptions.contains("-f") ) {
+ if ( OSFLAG_ISSET(Flags, OSFLAG_NOCACHES) || LoadOptions.contains("-f") ) {
MsgLog ("Blocking kext caches\n");
// BlockCaches = TRUE;
// add caches to blacklist
- Blacklist = FSInject->CreateStringList ();
+ Blacklist = FSInject->CreateStringList();
if (Blacklist == NULL) {
MsgLog (" - ERROR: Not enough memory!\n");
return EFI_NOT_STARTED;
@@ -8216,9 +8199,9 @@ SetFSInjection (
// check if kext injection is needed
// (will be done only if caches are blocked or if boot.efi refuses to load kernelcache)
//SrcDir = NULL;
- if (OSFLAG_ISSET(Entry->Flags, OSFLAG_WITHKEXTS)) {
+ if (OSFLAG_ISSET(Flags, OSFLAG_WITHKEXTS)) {
SrcDir = GetOtherKextsDir(TRUE);
- Status = FSInject->Install (
+ Status = FSInject->Install(
Volume->DeviceHandle,
L"\\System\\Library\\Extensions",
SelfVolume->DeviceHandle,
@@ -8231,31 +8214,31 @@ SetFSInjection (
InjectKextsFromDir(Status, SrcDir);
FreePool(SrcDir);
- SrcDir = GetOSVersionKextsDir (Entry->OSVersion);
- Status = FSInject->Install (
+ SrcDir = GetOSVersionKextsDir(OSVersion);
+ Status = FSInject->Install(
Volume->DeviceHandle,
L"\\System\\Library\\Extensions",
SelfVolume->DeviceHandle,
- //GetOSVersionKextsDir (Entry->OSVersion),
+ //GetOSVersionKextsDir(OSVersion),
SrcDir,
Blacklist,
ForceLoadKexts
);
- //InjectKextsFromDir(Status, GetOSVersionKextsDir(Entry->OSVersion));
+ //InjectKextsFromDir(Status, GetOSVersionKextsDir(OSVersion));
InjectKextsFromDir(Status, SrcDir);
FreePool(SrcDir);
} else {
- MsgLog ("skipping kext injection (not requested)\n");
+ MsgLog("skipping kext injection (not requested)\n");
}
// prepare list of kext that will be forced to load
- ForceLoadKexts = FSInject->CreateStringList ();
+ ForceLoadKexts = FSInject->CreateStringList();
if (ForceLoadKexts == NULL) {
- MsgLog (" - Error: not enough memory!\n");
+ MsgLog(" - Error: not enough memory!\n");
return EFI_NOT_STARTED;
}
- KextPatcherRegisterKexts (FSInject, ForceLoadKexts, Entry);
+ KextPatcherRegisterKexts(FSInject, ForceLoadKexts);
// reinit Volume->RootDir? it seems it's not needed.
diff --git a/rEFIt_UEFI/Platform/kernel_patcher.cpp b/rEFIt_UEFI/Platform/kernel_patcher.cpp
index df90303c0..5b8c78408 100644
--- a/rEFIt_UEFI/Platform/kernel_patcher.cpp
+++ b/rEFIt_UEFI/Platform/kernel_patcher.cpp
@@ -31,7 +31,8 @@
#endif
// runtime debug
-#define DBG_RT(entry, ...) if ((entry != NULL) && (entry->KernelAndKextPatches != NULL) && entry->KernelAndKextPatches->KPDebug) { printf(__VA_ARGS__); }
+//make it a member of LOADER_ENTRY class entry.DBG_RT(...)
+//#define DBG_RT( ...) if ((KernelAndKextPatches != NULL) && KernelAndKextPatches->KPDebug) { printf(__VA_ARGS__); }
EFI_PHYSICAL_ADDRESS KernelRelocBase = 0;
@@ -79,27 +80,53 @@ VOID SetKernelRelocBase()
return;
}
+//Slice
+// the purpose of the procedure is to find a table of symbols in the kernel
+EFI_STATUS LOADER_ENTRY::getVTable(UINT8 * kernel)
+{
+ INT32 LinkAdr = FindBin(kernel, 0x3000, (const UINT8 *)kLinkEditSegment, (UINT32)strlen(kLinkEditSegment));
+ if (LinkAdr == -1) {
+ return EFI_NOT_FOUND;
+ }
+// const UINT8 vtable[] = {0x04,00,00,00, 0x0F, 0x08, 00,00};
+
+// INT32 Tabble = FindBin(kernel, 0x2000000, vtable, 8);
+ INT32 NTabble = FindBin(kernel, 0x2000000, (const UINT8 *)ctor_used, (UINT32)strlen(ctor_used));
+ if (NTabble < 0) {
+ return EFI_NOT_FOUND;
+ }
+ NTabble -=4;
+ DBG_RT("LinkAdr=%x Tabble=%x\n",LinkAdr, NTabble);
+ SEGMENT *LinkSeg = (SEGMENT*)&kernel[LinkAdr];
+ AddrVtable = LinkSeg->AddrVtable;
+ SizeVtable = LinkSeg->SizeVtable;
+ NamesTable = LinkSeg->AddrNames;
+ //TODO find an origin of the shift
+ INT32 shift = NTabble - NamesTable;
+ DBG_RT("AddrVtable=%x Size=%x AddrNames=%x shift=%x\n", AddrVtable, SizeVtable, NamesTable, shift);
+ NamesTable = NTabble;
+ AddrVtable += shift;
+ return EFI_SUCCESS;
+}
+
//search a procedure by Name and return its offset in the kernel
-UINTN searchProc(unsigned char * kernel, const char *procedure, UINTN *procLen)
+UINTN LOADER_ENTRY::searchProc(UINT8 * kernel, const char *procedure, UINTN *procLen)
{
if (!procedure) {
return 0;
}
- INT32 LinkAdr = FindBin(kernel, 0x1000, (const UINT8 *)kLinkEditSegment, (UINT32)strlen(kLinkEditSegment));
- if (LinkAdr == -1) {
- return 0;
- }
- SEGMENT *LinkSeg = (SEGMENT*)&kernel[LinkAdr];
- UINT32 AddrVtable = LinkSeg->AddrVtable;
- UINT32 SizeVtable = LinkSeg->SizeVtable;
- const char* Names = (const char*)(&kernel[LinkSeg->AddrNames]);
+ const char* Names = (const char*)(&kernel[NamesTable]);
VTABLE * vArray = (VTABLE*)(&kernel[AddrVtable]);
//search for the name
+// gBS->Stall(9000000);
size_t i;
bool found = false;
for (i=0; iStall(3000000);
if (AsciiStrStr(&Names[Offset], procedure) != NULL) { //if (CompareMem(&Names[Offset], procedure, nameLen) == 0) {
found = true;
break;
@@ -111,20 +138,20 @@ UINTN searchProc(unsigned char * kernel, const char *procedure, UINTN *procLen)
INT32 SegVAddr;
switch (vArray[i].Seg) {
case ID_SEG_TEXT:
- SegVAddr = FindBin(kernel, 0x60, (const UINT8 *)kTextSegment, (UINT32)strlen(kTextSegment));
+ SegVAddr = FindBin(kernel, 0x600, (const UINT8 *)kTextSegment, (UINT32)strlen(kTextSegment));
break;
case ID_SEG_DATA:
- SegVAddr = FindBin(kernel, 0x600, (const UINT8 *)kDataSegment, (UINT32)strlen(kDataSegment));
+ SegVAddr = FindBin(kernel, 0x1600, (const UINT8 *)kDataSegment, (UINT32)strlen(kDataSegment));
break;
case ID_SEG_DATA_CONST:
- SegVAddr = FindBin(kernel, 0x1000, (const UINT8 *)kDataConstSegment, (UINT32)strlen(kDataConstSegment));
+ SegVAddr = FindBin(kernel, 0x2000, (const UINT8 *)kDataConstSegment, (UINT32)strlen(kDataConstSegment));
break;
case ID_SEG_KLD:
case ID_SEG_KLD2:
- SegVAddr = FindBin(kernel, 0x1000, (const UINT8 *)kKldSegment, (UINT32)strlen(kKldSegment));
+ SegVAddr = FindBin(kernel, 0x2000, (const UINT8 *)kKldSegment, (UINT32)strlen(kKldSegment));
break;
default:
- // DBG_RT(Entry, "unknown segment %x \n", vArray[i].Seg);
+ DBG_RT("unknown segment %x \n", vArray[i].Seg);
return 0; //
}
@@ -145,7 +172,8 @@ UINTN searchProc(unsigned char * kernel, const char *procedure, UINTN *procLen)
//TimeWalker - extended and corrected for systems up to Yosemite
-VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
+//TODO - Slice: no more needed
+VOID LOADER_ENTRY::KernelPatcher_64(VOID* kernelData)
{
UINT8 *bytes = (UINT8*)kernelData;
UINT32 patchLocation=0, patchLocation1=0;
@@ -155,7 +183,7 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
UINT32 cpuid_family_addr=0, cpuid_model_addr=0;
UINT64 os_version;
-// DBG_RT(Entry, "Looking for _cpuid_set_info _panic ...\n");
+// DBG_RT( "Looking for _cpuid_set_info _panic ...\n");
// Determine location of _cpuid_set_info _panic call for reference
// basically looking for info_p->cpuid_model = bitfield32(reg[eax], 7, 4);
@@ -169,16 +197,16 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
}
if (!patchLocation) {
-// DBG_RT(Entry, "_cpuid_set_info Unsupported CPU _panic not found \n");
+// DBG_RT( "_cpuid_set_info Unsupported CPU _panic not found \n");
return;
}
- os_version = AsciiOSVersionToUint64(Entry->OSVersion);
+ os_version = AsciiOSVersionToUint64(OSVersion);
// make sure only kernels for OSX 10.6.0 to 10.7.3 are being patched by this approach
if (os_version >= AsciiOSVersionToUint64("10.6") && os_version <= AsciiOSVersionToUint64("10.7.3")) {
-// DBG_RT(Entry, "will patch kernel for macOS 10.6.0 to 10.7.3\n");
+// DBG_RT( "will patch kernel for macOS 10.6.0 to 10.7.3\n");
// remove tsc_init: unknown CPU family panic for kernels prior to 10.6.2 which still had Atom support
if (os_version < AsciiOSVersionToUint64("10.6.2")) {
@@ -187,7 +215,7 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
if (bytes[i] == 0x48 && bytes[i+1] == 0x8D && bytes[i+2] == 0x3D && bytes[i+3] == 0xF4 &&
bytes[i+4] == 0x63 && bytes[i+5] == 0x2A && bytes[i+6] == 0x00) {
patchLocation1 = i+9;
-// DBG_RT(Entry, "Found _tsc_init _panic address at 0x%08x\n",patchLocation1);
+// DBG_RT( "Found _tsc_init _panic address at 0x%08x\n",patchLocation1);
break;
}
}
@@ -208,7 +236,7 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
C7051C2C5F0000000000 mov dword [ds:0xffffff80008a22c0], 0x0 (example from 10.7)
*/
switchaddr = patchLocation - 19;
-// DBG_RT(Entry, "switch statement patch location is 0x%08x\n", (switchaddr+6));
+// DBG_RT( "switch statement patch location is 0x%08x\n", (switchaddr+6));
if (bytes[switchaddr + 0] == 0xC7 && bytes[switchaddr + 1] == 0x05 &&
bytes[switchaddr + 5] == 0x00 && bytes[switchaddr + 6] == 0x00 &&
@@ -238,16 +266,16 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
cpuid_model_addr = cpuid_family_addr - 0X153;
}
-// DBG_RT(Entry, "cpuid_family address: 0x%08x\n", cpuid_family_addr);
-// DBG_RT(Entry, "cpuid_model address: 0x%08x\n", cpuid_model_addr);
+// DBG_RT( "cpuid_family address: 0x%08x\n", cpuid_family_addr);
+// DBG_RT( "cpuid_model address: 0x%08x\n", cpuid_model_addr);
switchaddr += 6; // offset 6 bytes in mov operation to write a dword instead of zero
// calculate mask for patching, cpuid_family mask not needed as we offset on a valid mask
mask_model = cpuid_model_addr - (switchaddr+14);
-// DBG_RT(Entry, "model mask 0x%08x\n", mask_model);
+// DBG_RT( "model mask 0x%08x\n", mask_model);
-// DBG_RT(Entry, "overriding cpuid_family and cpuid_model as CPUID_INTEL_PENRYN\n");
+// DBG_RT( "overriding cpuid_family and cpuid_model as CPUID_INTEL_PENRYN\n");
bytes[switchaddr+0] = (CPUFAMILY_INTEL_PENRYN & 0x000000FF) >> 0;
bytes[switchaddr+1] = (CPUFAMILY_INTEL_PENRYN & 0x0000FF00) >> 8;
bytes[switchaddr+2] = (CPUFAMILY_INTEL_PENRYN & 0x00FF0000) >> 16;
@@ -272,16 +300,16 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
}
}
else {
-// DBG_RT(Entry, "Unable to determine cpuid_family address, patching aborted\n");
+// DBG_RT( "Unable to determine cpuid_family address, patching aborted\n");
return;
}
}
// patch ssse3
- if (!SSSE3 && (AsciiStrnCmp(Entry->OSVersion,"10.6",4)==0)) {
+ if (!SSSE3 && (AsciiStrnCmp(OSVersion,"10.6",4)==0)) {
Patcher_SSE3_6((VOID*)bytes);
}
- if (!SSSE3 && (AsciiStrnCmp(Entry->OSVersion,"10.7",4)==0)) {
+ if (!SSSE3 && (AsciiStrnCmp(OSVersion,"10.7",4)==0)) {
Patcher_SSE3_7((VOID*)bytes);
}
}
@@ -290,7 +318,7 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
// it needs to be exploited in diff manner due to the lack of space
else if (os_version >= AsciiOSVersionToUint64("10.7.4")) {
- DBG_RT(Entry, "will patch kernel for macOS 10.7.4+\n");
+ DBG_RT( "will patch kernel for macOS 10.7.4+\n");
/*
Here is our switchaddress location ... it should be case 20 from CPUID switch statement
@@ -298,7 +326,7 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
7417 je 0xffffff80002a8d71
*/
switchaddr = patchLocation-45;
- DBG_RT(Entry, "switch statement patch location is 0x%08x\n", switchaddr);
+ DBG_RT( "switch statement patch location is 0x%08x\n", switchaddr);
if(bytes[switchaddr + 0] == 0x83 && bytes[switchaddr + 1] == 0x3D &&
bytes[switchaddr + 5] == 0x00 && bytes[switchaddr + 6] == 0x00 &&
@@ -319,13 +347,13 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
// for 10.6.8+ kernels it's 339 bytes apart from cpuid_family address
cpuid_model_addr = cpuid_family_addr - 0X153;
- DBG_RT(Entry, "cpuid_family address: 0x%08x\n", cpuid_family_addr);
- DBG_RT(Entry, "cpuid_model address: 0x%08x\n", cpuid_model_addr);
+ DBG_RT( "cpuid_family address: 0x%08x\n", cpuid_family_addr);
+ DBG_RT( "cpuid_model address: 0x%08x\n", cpuid_model_addr);
// Calculate masks for patching
mask_family = cpuid_family_addr - (switchaddr +15);
mask_model = cpuid_model_addr - (switchaddr +25);
- DBG_RT(Entry, "\nfamily mask: 0x%08x \nmodel mask: 0x%08x\n", mask_family, mask_model);
+ DBG_RT( "\nfamily mask: 0x%08x \nmodel mask: 0x%08x\n", mask_family, mask_model);
// retain original
// test ebx, ebx
@@ -372,13 +400,13 @@ VOID KernelPatcher_64(VOID* kernelData, LOADER_ENTRY *Entry)
}
}
else {
- DBG_RT(Entry, "Unable to determine cpuid_family address, patching aborted\n");
+ DBG_RT( "Unable to determine cpuid_family address, patching aborted\n");
return;
}
}
}
-VOID KernelPatcher_32(VOID* kernelData, CHAR8 *OSVersion)
+VOID LOADER_ENTRY::KernelPatcher_32(VOID* kernelData, CHAR8 *OSVersion)
{
UINT8* bytes = (UINT8*)kernelData;
UINT32 patchLocation=0, patchLocation1=0;
@@ -469,7 +497,7 @@ VOID KernelPatcher_32(VOID* kernelData, CHAR8 *OSVersion)
bytes[patchLocation - 2] = bytes[jumpaddr + 6];
bytes[patchLocation - 1] = CPUIDFAMILY_DEFAULT; //cpuid_family need alway set 0x06
- bytes[patchLocation + 0] = CPUID_MODEL_MEROM; //cpuid_model set CPUID_MODEL_MEROM
+ bytes[patchLocation + 0] = CPU_MODEL_MEROM; //cpuid_model set CPU_MODEL_MEROM
bytes[patchLocation + 1] = 0x01; //cpuid_extmodel alway set 0x01
bytes[patchLocation + 2] = 0x00; //cpuid_extfamily alway set 0x00
bytes[patchLocation + 3] = 0x90;
@@ -488,7 +516,7 @@ VOID KernelPatcher_32(VOID* kernelData, CHAR8 *OSVersion)
}
//Slice - FakeCPUID substitution, (c)2014
-
+//TODO remake to patterns
//procedure location
STATIC UINT8 StrCpuid1_tigLeo[] = {0xb9, 0x01, 0x00, 0x00, 0x00, 0x89, 0xc8, 0x0f, 0xa2};
STATIC UINT8 StrCpuid1_snowLeo[] = {0xb8, 0x01, 0x00, 0x00, 0x00, 0x31, 0xdb, 0x89, 0xd9, 0x89, 0xda, 0x0f, 0xa2};
@@ -567,30 +595,30 @@ STATIC UINT8 CataSearchModel[] = {0x44, 0x89, 0xE0, 0xC0, 0xE8, 0x04};
STATIC UINT8 CataSearchExt[] = {0x44, 0x89, 0xE0, 0xC1, 0xE8, 0x10};
STATIC UINT8 CataReplaceMovEax[] = {0xB8, 0x00, 0x00, 0x00, 0x00, 0x90}; // mov eax, val || nop
-BOOLEAN PatchCPUID(UINT8* bytes, UINT8* Location, INT32 LenLoc,
+BOOLEAN LOADER_ENTRY::PatchCPUID(UINT8* bytes, UINT8* Location, INT32 LenLoc,
UINT8* Search4, UINT8* Search10, UINT8* ReplaceModel,
- UINT8* ReplaceExt, INT32 Len, LOADER_ENTRY *Entry)
+ UINT8* ReplaceExt, INT32 Len)
{
INT32 patchLocation=0, patchLocation1=0;
INT32 Adr = 0, Num;
BOOLEAN Patched = FALSE;
- UINT8 FakeModel = (Entry->KernelAndKextPatches->FakeCPUID >> 4) & 0x0f;
- UINT8 FakeExt = (Entry->KernelAndKextPatches->FakeCPUID >> 0x10) & 0x0f;
+ UINT8 FakeModel = (KernelAndKextPatches->FakeCPUID >> 4) & 0x0f;
+ UINT8 FakeExt = (KernelAndKextPatches->FakeCPUID >> 0x10) & 0x0f;
for (Num = 0; Num < 2; Num++) {
Adr = FindBin(&bytes[Adr], 0x800000 - Adr, (const UINT8*)Location, (UINT32)LenLoc);
if (Adr < 0) {
break;
}
- DBG_RT(Entry, "found location at %x\n", Adr);
+ DBG_RT( "found location at %x\n", Adr);
patchLocation = FindBin(&bytes[Adr], 0x100, (const UINT8*)Search4, (UINT32)Len);
if (patchLocation > 0 && patchLocation < 70) {
//found
- DBG_RT(Entry, "found Model location at %x\n", Adr + patchLocation);
+ DBG_RT( "found Model location at %x\n", Adr + patchLocation);
CopyMem(&bytes[Adr + patchLocation], ReplaceModel, Len);
bytes[Adr + patchLocation + 1] = FakeModel;
patchLocation1 = FindBin(&bytes[Adr], 0x100, (const UINT8*)Search10, (UINT32)Len);
if (patchLocation1 > 0 && patchLocation1 < 100) {
- DBG_RT(Entry, "found ExtModel location at %x\n", Adr + patchLocation1);
+ DBG_RT( "found ExtModel location at %x\n", Adr + patchLocation1);
CopyMem(&bytes[Adr + patchLocation1], ReplaceExt, Len);
bytes[Adr + patchLocation1 + 1] = FakeExt;
}
@@ -600,64 +628,64 @@ BOOLEAN PatchCPUID(UINT8* bytes, UINT8* Location, INT32 LenLoc,
return Patched;
}
-VOID KernelCPUIDPatch(UINT8* kernelData, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::KernelCPUIDPatch(UINT8* kernelData)
{
// Tiger/Leopard patterns
- DBG_RT(Entry, "CPUID: try Tiger/Leopard patch...\n");
+ DBG_RT( "CPUID: try Tiger/Leopard patch...\n");
if (PatchCPUID(kernelData, &StrCpuid1_tigLeo[0], sizeof(StrCpuid1_tigLeo), &TigLeoSLSearchModel[0],
&TigLeoSLSearchExt[0], &TigLeoSLReplaceModel[0], &TigLeoSLReplaceModel[0],
- sizeof(TigLeoSLSearchModel), Entry)) {
- DBG_RT(Entry, "...done!\n");
+ sizeof(TigLeoSLSearchModel))) {
+ DBG_RT( "...done!\n");
return;
}
// Snow Leopard patterns
- DBG_RT(Entry, "CPUID: try Snow Leopard patch...\n");
+ DBG_RT( "CPUID: try Snow Leopard patch...\n");
if (PatchCPUID(kernelData, &StrCpuid1_snowLeo[0], sizeof(StrCpuid1_snowLeo), &TigLeoSLSearchModel[0],
&TigLeoSLSearchExt[0], &TigLeoSLReplaceModel[0], &TigLeoSLReplaceModel[0],
- sizeof(TigLeoSLSearchModel), Entry)) {
- DBG_RT(Entry, "...done!\n");
+ sizeof(TigLeoSLSearchModel))) {
+ DBG_RT( "...done!\n");
return;
}
// Lion patterns
- DBG_RT(Entry, "CPUID: try Lion patch...\n");
+ DBG_RT( "CPUID: try Lion patch...\n");
if (PatchCPUID(kernelData, &StrMsr8b[0], sizeof(StrMsr8b), &LionSearchModel[0],
&LionSearchExt[0], &LionReplaceModel[0], &LionReplaceModel[0],
- sizeof(LionSearchModel), Entry)) {
- DBG_RT(Entry, "...done!\n");
+ sizeof(LionSearchModel))) {
+ DBG_RT( "...done!\n");
return;
}
// Mountain Lion/Mavericks patterns
- DBG_RT(Entry, "CPUID: try Mountain Lion/Mavericks patch...\n");
+ DBG_RT( "CPUID: try Mountain Lion/Mavericks patch...\n");
if (PatchCPUID(kernelData, &StrMsr8b[0], sizeof(StrMsr8b), &MLMavSearchModel[0],
&MLMavSearchExt[0], &MLMavReplaceModel[0], &MLMavReplaceExt[0],
- sizeof(MLMavSearchModel), Entry)) {
- DBG_RT(Entry, "...done!\n");
+ sizeof(MLMavSearchModel))) {
+ DBG_RT( "...done!\n");
return;
}
// Yosemite/El Capitan/Sierra patterns
- DBG_RT(Entry, "CPUID: try Yosemite/El Capitan/Sierra patch...\n");
+ DBG_RT( "CPUID: try Yosemite/El Capitan/Sierra patch...\n");
if (PatchCPUID(kernelData, &StrMsr8b[0], sizeof(StrMsr8b), &YosECSieSearchModel[0],
&YosECSieSearchExt[0], &LionReplaceModel[0], &LionReplaceModel[0],
- sizeof(YosECSieSearchModel), Entry)) {
- DBG_RT(Entry, "...done!\n");
+ sizeof(YosECSieSearchModel))) {
+ DBG_RT( "...done!\n");
return;
}
// High Sierra/Mojave patterns
// Sherlocks: 10.13/10.14
- DBG_RT(Entry, "CPUID: try High Sierra/Mojave patch...\n");
+ DBG_RT( "CPUID: try High Sierra/Mojave patch...\n");
if (PatchCPUID(kernelData, &StrMsr8b[0], sizeof(StrMsr8b), &HSieMojSearchModel[0],
&YosECSieSearchExt[0], &LionReplaceModel[0], &LionReplaceModel[0],
- sizeof(HSieMojSearchModel), Entry)) {
- DBG_RT(Entry, "...done!\n");
+ sizeof(HSieMojSearchModel))) {
+ DBG_RT( "...done!\n");
return;
}
// Catalina patterns
// PMheart: 10.15.DP1
- DBG_RT(Entry, "CPUID: try Catalina patch...\n");
+ DBG_RT( "CPUID: try Catalina patch...\n");
if (PatchCPUID(kernelData, &StrMsr8b[0], sizeof(StrMsr8b), &CataSearchModel[0],
&CataSearchExt[0], &CataReplaceMovEax[0], &CataReplaceMovEax[0],
- sizeof(CataSearchModel), Entry)) {
- DBG_RT(Entry, "...done!\n");
+ sizeof(CataSearchModel))) {
+ DBG_RT( "...done!\n");
return;
}
}
@@ -666,8 +694,8 @@ VOID KernelCPUIDPatch(UINT8* kernelData, LOADER_ENTRY *Entry)
// new way by RehabMan 2017-08-13
// cleanup by Sherlocks 2020-03-23
#define CompareWithMask(x,m,c) (((x) & (m)) == (c))
-
-BOOLEAN KernelPatchPm(VOID *kernelData, LOADER_ENTRY *Entry)
+//TODO - remake using CompareMemMask
+BOOLEAN LOADER_ENTRY::KernelPatchPm(VOID *kernelData)
{
UINT64* Ptr = (UINT64*)kernelData;
UINT64* End = Ptr + 0x1000000/sizeof(UINT64);
@@ -675,7 +703,7 @@ BOOLEAN KernelPatchPm(VOID *kernelData, LOADER_ENTRY *Entry)
return FALSE;
}
- DBG_RT(Entry, "Patching kernel power management...\n");
+ DBG_RT("Patching kernel power management...\n");
for (; Ptr < End; Ptr += 2) {
// check for xcpm_scope_msr common 0xE2 prologue
@@ -703,17 +731,17 @@ BOOLEAN KernelPatchPm(VOID *kernelData, LOADER_ENTRY *Entry)
if (CompareWithMask(Ptr[3], 0xFFFFFFFFFFFFFF00, 0x000000001E000000) && 0 == Ptr[4] && 0 == Ptr[5]) {
// zero out 0xE2 MSR and CPU mask
Ptr[0] = 0;
- DBG_RT(Entry, "Kernel power management: entry 1E found and patched\n");
+ DBG_RT("Kernel power management: entry 1E found and patched\n");
// XX00007E 00000000 00000000 00000000 00000000 00000000
} else if (CompareWithMask(Ptr[3], 0xFFFFFFFFFFFFFF00, 0x000000007E000000) && 0 == Ptr[4] && 0 == Ptr[5]) {
// zero out 0xE2 MSR and CPU mask
Ptr[0] = 0;
- DBG_RT(Entry, "Kernel power management: entry 7E found and patched\n");
+ DBG_RT("Kernel power management: entry 7E found and patched\n");
}
}
}
- if (Entry->KernelAndKextPatches->KPDebug) {
+ if (KernelAndKextPatches->KPDebug) {
gBS->Stall(3000000);
}
@@ -723,7 +751,7 @@ BOOLEAN KernelPatchPm(VOID *kernelData, LOADER_ENTRY *Entry)
const UINT8 PanicNoKextDumpFind[] = {0x00, 0x25, 0x2E, 0x2A, 0x73, 0x00};
//STATIC UINT8 PanicNoKextDumpReplace[6] = {0x00, 0x00, 0x2E, 0x2A, 0x73, 0x00};
-BOOLEAN KernelPanicNoKextDump(VOID *kernelData)
+BOOLEAN LOADER_ENTRY::KernelPanicNoKextDump(VOID *kernelData)
{
UINT8 *bytes = (UINT8*)kernelData;
INT32 patchLocation;
@@ -735,7 +763,7 @@ BOOLEAN KernelPanicNoKextDump(VOID *kernelData)
return FALSE;
}
-BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
+BOOLEAN LOADER_ENTRY::KernelLapicPatch_64(VOID *kernelData)
{
// Credits to donovan6000 and Sherlocks for providing the lapic kernel patch source used to build this function
@@ -743,7 +771,7 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
UINT32 patchLocation1 = 0, patchLocation2 = 0;
UINT32 i, y;
- DBG_RT(Entry, "Looking for Lapic panic call (64-bit) Start\n");
+ DBG_RT( "Looking for Lapic panic call (64-bit) Start\n");
for (i = 0; i < 0x1000000; i++) {
if (bytes[i+0] == 0x65 && bytes[i+1] == 0x8B && bytes[i+2] == 0x04 && bytes[i+3] == 0x25 &&
@@ -751,28 +779,28 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
bytes[i+45] == 0x65 && bytes[i+46] == 0x8B && bytes[i+47] == 0x04 && bytes[i+48] == 0x25 &&
bytes[i+49] == 0x3C && bytes[i+50] == 0x00 && bytes[i+51] == 0x00 && bytes[i+52] == 0x00) {
patchLocation1 = i+40;
- DBG_RT(Entry, "Found Lapic panic (10.6) at 0x%08x\n", patchLocation1);
+ DBG_RT( "Found Lapic panic (10.6) at 0x%08x\n", patchLocation1);
break;
} else if (bytes[i+0] == 0x65 && bytes[i+1] == 0x8B && bytes[i+2] == 0x04 && bytes[i+3] == 0x25 &&
bytes[i+4] == 0x14 && bytes[i+5] == 0x00 && bytes[i+6] == 0x00 && bytes[i+7] == 0x00 &&
bytes[i+35] == 0x65 && bytes[i+36] == 0x8B && bytes[i+37] == 0x04 && bytes[i+38] == 0x25 &&
bytes[i+39] == 0x14 && bytes[i+40] == 0x00 && bytes[i+41] == 0x00 && bytes[i+42] == 0x00) {
patchLocation1 = i+30;
- DBG_RT(Entry, "Found Lapic panic (10.7 - 10.8) at 0x%08x\n", patchLocation1);
+ DBG_RT( "Found Lapic panic (10.7 - 10.8) at 0x%08x\n", patchLocation1);
break;
} else if (bytes[i+0] == 0x65 && bytes[i+1] == 0x8B && bytes[i+2] == 0x04 && bytes[i+3] == 0x25 &&
bytes[i+4] == 0x1C && bytes[i+5] == 0x00 && bytes[i+6] == 0x00 && bytes[i+7] == 0x00 &&
bytes[i+36] == 0x65 && bytes[i+37] == 0x8B && bytes[i+38] == 0x04 && bytes[i+39] == 0x25 &&
bytes[i+40] == 0x1C && bytes[i+41] == 0x00 && bytes[i+42] == 0x00 && bytes[i+43] == 0x00) {
patchLocation1 = i+31;
- DBG_RT(Entry, "Found Lapic panic (10.9) at 0x%08x\n", patchLocation1);
+ DBG_RT( "Found Lapic panic (10.9) at 0x%08x\n", patchLocation1);
break;
// 00 29 C7 78 XX 31 DB 8D 47 FA 83
} else if (bytes[i+0] == 0x00 && bytes[i+1] == 0x29 && bytes[i+2] == 0xC7 && bytes[i+3] == 0x78 &&
//(bytes[i+4] == 0x3F || bytes[i+4] == 0x4F) && // 3F:10.10-10.12/4F:10.13+
bytes[i+5] == 0x31 && bytes[i+6] == 0xDB && bytes[i+7] == 0x8D && bytes[i+8] == 0x47 &&
bytes[i+9] == 0xFA && bytes[i+10] == 0x83) {
- DBG_RT(Entry, "Found Lapic panic Base (10.10 - recent macOS)\n");
+ DBG_RT( "Found Lapic panic Base (10.10 - recent macOS)\n");
for (y = i; y < 0x1000000; y++) {
// Lapic panic patch, by vit9696
// mov eax, gs:XX
@@ -783,7 +811,7 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
bytes[y+5] == 0x00 && bytes[y+6] == 0x00 && bytes[y+7] == 0x00 &&
bytes[y+8] == 0x3B && bytes[y+9] == 0x05 && bytes[y+13] == 0x00) {
patchLocation1 = y;
- DBG_RT(Entry, "Found Lapic panic (10.10 - recent macOS) at 0x%08x\n", patchLocation1);
+ DBG_RT( "Found Lapic panic (10.10 - recent macOS) at 0x%08x\n", patchLocation1);
break;
}
}
@@ -792,7 +820,7 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
}
if (!patchLocation1) {
- DBG_RT(Entry, "Can't find Lapic panic, kernel patch aborted.\n");
+ DBG_RT( "Can't find Lapic panic, kernel patch aborted.\n");
return FALSE;
}
@@ -800,18 +828,18 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
if (bytes[patchLocation1 + 0] == 0x90 && bytes[patchLocation1 + 1] == 0x90 &&
bytes[patchLocation1 + 2] == 0x90 && bytes[patchLocation1 + 3] == 0x90 &&
bytes[patchLocation1 + 4] == 0x90) {
- DBG_RT(Entry, "Lapic panic already patched, kernel file (10.6 - 10.9) manually patched?\n");
+ DBG_RT( "Lapic panic already patched, kernel file (10.6 - 10.9) manually patched?\n");
return FALSE;
} else if (bytes[patchLocation1 + 0] == 0x31 && bytes[patchLocation1 + 1] == 0xC0 &&
bytes[patchLocation1 + 2] == 0x90 && bytes[patchLocation1 + 3] == 0x90) {
- DBG_RT(Entry, "Lapic panic already patched, kernel file (10.10 - recent macOS) manually patched?\n");
+ DBG_RT( "Lapic panic already patched, kernel file (10.10 - recent macOS) manually patched?\n");
return FALSE;
} else {
if (bytes[patchLocation1 + 8] == 0x3B && bytes[patchLocation1 + 9] == 0x05 &&
bytes[patchLocation1 + 13] == 0x00) {
// 65 8B 04 25 XX 00 00 00 3B 05 XX XX XX 00
// 31 C0 90 90 90 90 90 90 90 90 90 90 90 90
- DBG_RT(Entry, "Patched Lapic panic (10.10 - recent macOS)\n");
+ DBG_RT( "Patched Lapic panic (10.10 - recent macOS)\n");
bytes[patchLocation1 + 0] = 0x31;
bytes[patchLocation1 + 1] = 0xC0;
for (i = 2; i < 14; i++) {
@@ -824,7 +852,7 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
//(bytes[i+4] == 0x3F || bytes[i+4] == 0x4F) && // 3F:10.10-10.12/4F:10.13+
bytes[i+5] == 0x31 && bytes[i+6] == 0xDB && bytes[i+7] == 0x8D && bytes[i+8] == 0x47 &&
bytes[i+9] == 0xFA && bytes[i+10] == 0x83) {
- DBG_RT(Entry, "Found Lapic panic master Base (10.10 - recent macOS)\n");
+ DBG_RT( "Found Lapic panic master Base (10.10 - recent macOS)\n");
for (y = i; y < 0x1000000; y++) {
// Lapic panic master patch, by vit9696
// cmp cs:_debug_boot_arg, 0
@@ -832,7 +860,7 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
if (bytes[y+0] == 0xE8 && bytes[y+3] == 0xFF && bytes[y+4] == 0xFF &&
bytes[y+5] == 0x83 && bytes[y+10] == 0x00 && bytes[y+11] == 0x00) {
patchLocation2 = y;
- DBG_RT(Entry, "Found Lapic panic master (10.10 - recent macOS) at 0x%08x\n", patchLocation2);
+ DBG_RT( "Found Lapic panic master (10.10 - recent macOS) at 0x%08x\n", patchLocation2);
break;
}
}
@@ -841,16 +869,16 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
}
if (!patchLocation2) {
- DBG_RT(Entry, "Can't find Lapic panic master (10.10 - recent macOS), kernel patch aborted.\n");
+ DBG_RT( "Can't find Lapic panic master (10.10 - recent macOS), kernel patch aborted.\n");
return FALSE;
}
// Already patched? May be running a non-vanilla kernel already?
if (bytes[patchLocation2 + 5] == 0x31 && bytes[patchLocation2 + 6] == 0xC0) {
- DBG_RT(Entry, "Lapic panic master already patched, kernel file (10.10 - recent macOS) manually patched?\n");
+ DBG_RT( "Lapic panic master already patched, kernel file (10.10 - recent macOS) manually patched?\n");
return FALSE;
} else {
- DBG_RT(Entry, "Patched Lapic panic master (10.10 - recent macOS)\n");
+ DBG_RT( "Patched Lapic panic master (10.10 - recent macOS)\n");
// E8 XX XX FF FF 83 XX XX XX XX 00 00
// E8 XX XX FF FF 31 C0 90 90 90 90 90 xor eax,eax; nop; nop;....
bytes[patchLocation2 + 5] = 0x31;
@@ -860,21 +888,21 @@ BOOLEAN KernelLapicPatch_64(VOID *kernelData, LOADER_ENTRY *Entry)
}
}
} else {
- DBG_RT(Entry, "Patched Lapic panic (10.6 - 10.9)\n");
+ DBG_RT( "Patched Lapic panic (10.6 - 10.9)\n");
for (i = 0; i < 5; i++) {
bytes[patchLocation1 + i] = 0x90;
}
}
}
- if (Entry->KernelAndKextPatches->KPDebug) {
+ if (KernelAndKextPatches->KPDebug) {
gBS->Stall(3000000);
}
return TRUE;
}
-BOOLEAN KernelLapicPatch_32(VOID *kernelData, LOADER_ENTRY *Entry)
+BOOLEAN LOADER_ENTRY::KernelLapicPatch_32(VOID *kernelData)
{
// Credits to donovan6000 and Sherlocks for providing the lapic kernel patch source used to build this function
@@ -882,7 +910,7 @@ BOOLEAN KernelLapicPatch_32(VOID *kernelData, LOADER_ENTRY *Entry)
UINT32 patchLocation = 0;
UINT32 i;
- DBG_RT(Entry, "Looking for Lapic panic call (32-bit) Start\n");
+ DBG_RT( "Looking for Lapic panic call (32-bit) Start\n");
for (i = 0; i < 0x1000000; i++) {
if (bytes[i+0] == 0x65 && bytes[i+1] == 0xA1 && bytes[i+2] == 0x0C && bytes[i+3] == 0x00 &&
@@ -890,13 +918,13 @@ BOOLEAN KernelLapicPatch_32(VOID *kernelData, LOADER_ENTRY *Entry)
bytes[i+30] == 0x65 && bytes[i+31] == 0xA1 && bytes[i+32] == 0x0C && bytes[i+33] == 0x00 &&
bytes[i+34] == 0x00 && bytes[i+35] == 0x00) {
patchLocation = i+25;
- DBG_RT(Entry, "Found Lapic panic at 0x%08x\n", patchLocation);
+ DBG_RT( "Found Lapic panic at 0x%08x\n", patchLocation);
break;
}
}
if (!patchLocation) {
- DBG_RT(Entry, "Can't find Lapic panic, kernel patch aborted.\n");
+ DBG_RT( "Can't find Lapic panic, kernel patch aborted.\n");
return FALSE;
}
@@ -905,16 +933,16 @@ BOOLEAN KernelLapicPatch_32(VOID *kernelData, LOADER_ENTRY *Entry)
if (bytes[patchLocation + 0] == 0x90 && bytes[patchLocation + 1] == 0x90 &&
bytes[patchLocation + 2] == 0x90 && bytes[patchLocation + 3] == 0x90 &&
bytes[patchLocation + 4] == 0x90) {
- DBG_RT(Entry, "Lapic panic already patched, kernel file manually patched?\n");
+ DBG_RT( "Lapic panic already patched, kernel file manually patched?\n");
return FALSE;
} else {
- DBG_RT(Entry, "Patched Lapic panic (32-bit)\n");
+ DBG_RT( "Patched Lapic panic (32-bit)\n");
for (i = 0; i < 5; i++) {
bytes[patchLocation + i] = 0x90;
}
}
- if (Entry->KernelAndKextPatches->KPDebug) {
+ if (KernelAndKextPatches->KPDebug) {
gBS->Stall(3000000);
}
@@ -927,7 +955,7 @@ BOOLEAN KernelLapicPatch_32(VOID *kernelData, LOADER_ENTRY *Entry)
// SandyBridge-E, Ivy Bridge, Ivy Bridge-E, Haswell Celeron/Pentium, Haswell-E, Broadwell-E, ...
// credit Pike R.Alpha, stinga11, syscl
//
-BOOLEAN (*EnableExtCpuXCPM)(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idle);
+BOOLEAN (*EnableExtCpuXCPM)(VOID *kernelData, BOOLEAN use_xcpm_idle);
//
// syscl - applyKernPatch a wrapper for SearchAndReplace() to make the CpuPM patch tidy and clean
@@ -956,7 +984,7 @@ static inline BOOLEAN IsXCPMOSVersionCompat(UINT64 os_version)
//
// syscl - SandyBridgeEPM(): enable PowerManagement on SandyBridge-E
//
-BOOLEAN SandyBridgeEPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idle)
+BOOLEAN LOADER_ENTRY::SandyBridgeEPM(VOID *kernelData, BOOLEAN use_xcpm_idle)
{
// note: a dummy function that made patches consistency
return TRUE;
@@ -966,14 +994,14 @@ BOOLEAN SandyBridgeEPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_i
// syscl - Enable Haswell-E XCPM
// Hex data provided and polished (c) PMheart, idea (c) Pike R.Alpha
//
-BOOLEAN HaswellEXCPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idle)
+BOOLEAN LOADER_ENTRY::HaswellEXCPM(VOID *kernelData, BOOLEAN use_xcpm_idle)
{
DBG("HaswellEXCPM() ===>\n");
UINT8 *kern = (UINT8*)kernelData;
CONST CHAR8 *comment;
UINT32 i;
UINT32 patchLocation;
- UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion);
+ UINT64 os_version = AsciiOSVersionToUint64(OSVersion);
// check OS version suit for patches
if (!IsXCPMOSVersionCompat(os_version)) {
@@ -1114,13 +1142,13 @@ BOOLEAN HaswellEXCPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idl
//
// Enable Broadwell-E/EP PowerManagement on 10.12+ by syscl
//
-BOOLEAN BroadwellEPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idle)
+BOOLEAN LOADER_ENTRY::BroadwellEPM(VOID *kernelData, BOOLEAN use_xcpm_idle)
{
DBG("BroadwellEPM() ===>\n");
UINT8 *kern = (UINT8*)kernelData;
UINT32 i;
UINT32 patchLocation;
- UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion);
+ UINT64 os_version = AsciiOSVersionToUint64(OSVersion);
// check OS version suit for patches
if (!IsXCPMOSVersionCompat(os_version)) {
@@ -1129,8 +1157,8 @@ BOOLEAN BroadwellEPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idl
return FALSE;
}
- Entry->KernelAndKextPatches->FakeCPUID = (UINT32)(os_version < AsciiOSVersionToUint64("10.10.3") ? 0x0306C0 : 0x040674);
- KernelCPUIDPatch(kern, Entry);
+ KernelAndKextPatches->FakeCPUID = (UINT32)(os_version < AsciiOSVersionToUint64("10.10.3") ? 0x0306C0 : 0x040674);
+ KernelCPUIDPatch(kern);
DBG("Searching _xcpm_pkg_scope_msr ...\n");
if (os_version >= AsciiOSVersionToUint64("10.12")) {
@@ -1165,11 +1193,11 @@ BOOLEAN BroadwellEPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idl
// implemented by syscl
// credit also Pike R.Alpha, stinga11, Sherlocks, vit9696
//
-BOOLEAN HaswellLowEndXCPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idle)
+BOOLEAN LOADER_ENTRY::HaswellLowEndXCPM(VOID *kernelData, BOOLEAN use_xcpm_idle)
{
DBG("HaswellLowEndXCPM() ===>\n");
UINT8 *kern = (UINT8*)kernelData;
- UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion);
+ UINT64 os_version = AsciiOSVersionToUint64(OSVersion);
CONST CHAR8 *comment;
// check OS version suit for patches
@@ -1179,8 +1207,8 @@ BOOLEAN HaswellLowEndXCPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcp
return FALSE;
}
- Entry->KernelAndKextPatches->FakeCPUID = (UINT32)(0x0306A0); // correct FakeCPUID
- KernelCPUIDPatch(kern, Entry);
+ KernelAndKextPatches->FakeCPUID = (UINT32)(0x0306A0); // correct FakeCPUID
+ KernelCPUIDPatch(kern);
// 10.8.5 - 10.11.x no need the following kernel patches on Haswell Celeron/Pentium
if (os_version >= AsciiOSVersionToUint64("10.8.5") && os_version < AsciiOSVersionToUint64("10.12") &&
@@ -1242,13 +1270,13 @@ BOOLEAN HaswellLowEndXCPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcp
//
// this patch provides XCPM support for Ivy Bridge. by PMheart
//
-BOOLEAN KernelIvyBridgeXCPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idle)
+BOOLEAN LOADER_ENTRY::KernelIvyBridgeXCPM(VOID *kernelData, BOOLEAN use_xcpm_idle)
{
UINT8 *kern = (UINT8*)kernelData;
CONST CHAR8 *comment;
UINT32 i;
UINT32 patchLocation;
- UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion);
+ UINT64 os_version = AsciiOSVersionToUint64(OSVersion);
// check whether Ivy Bridge
if (gCPUStructure.Model != CPU_MODEL_IVY_BRIDGE) {
@@ -1331,13 +1359,13 @@ BOOLEAN KernelIvyBridgeXCPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_x
// this patch provides XCPM support for Ivy Bridge-E. by PMheart
// attempt to enable XCPM for Ivy-E, still need to test further
//
-BOOLEAN KernelIvyE5XCPM(VOID *kernelData, LOADER_ENTRY *Entry, BOOLEAN use_xcpm_idle)
+BOOLEAN LOADER_ENTRY::KernelIvyE5XCPM(VOID *kernelData, BOOLEAN use_xcpm_idle)
{
UINT8 *kern = (UINT8*)kernelData;
CONST CHAR8 *comment;
UINT32 i;
UINT32 patchLocation;
- UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion);
+ UINT64 os_version = AsciiOSVersionToUint64(OSVersion);
// check whether Ivy Bridge-E5
if (gCPUStructure.Model != CPU_MODEL_IVY_BRIDGE_E5) {
@@ -1781,13 +1809,13 @@ VOID Get_PreLink()
}
VOID
-FindBootArgs(IN LOADER_ENTRY *Entry)
+LOADER_ENTRY::FindBootArgs()
{
UINT8 *ptr;
UINT8 archMode = sizeof(UINTN) * 8;
// start searching from 0x200000.
- ptr = (UINT8*)(UINTN)0x200000;
+ ptr = (UINT8*)0x200000ull;
while(TRUE) {
@@ -1806,14 +1834,14 @@ FindBootArgs(IN LOADER_ENTRY *Entry)
dtLength = &bootArgs2->deviceTreeLength;
KernelSlide = bootArgs2->kslide;
- DBG_RT(Entry, "Found bootArgs2 at 0x%llX, DevTree at 0x%llX\n", (UINTN)ptr, (UINTN)bootArgs2->deviceTreeP);
+ DBG_RT( "Found bootArgs2 at 0x%llX, DevTree at 0x%llX\n", (UINTN)ptr, (UINTN)bootArgs2->deviceTreeP);
//DBG("bootArgs2->kaddr = 0x%08X and bootArgs2->ksize = 0x%08X\n", bootArgs2->kaddr, bootArgs2->ksize);
//DBG("bootArgs2->efiMode = 0x%02X\n", bootArgs2->efiMode);
- DBG_RT(Entry, "bootArgs2->CommandLine = %s\n", bootArgs2->CommandLine);
- DBG_RT(Entry, "bootArgs2->flags = 0x%hx\n", bootArgs2->flags);
- DBG_RT(Entry, "bootArgs2->kslide = 0x%x\n", bootArgs2->kslide);
- DBG_RT(Entry, "bootArgs2->bootMemStart = 0x%llx\n", bootArgs2->bootMemStart);
- if (Entry && Entry->KernelAndKextPatches && Entry->KernelAndKextPatches->KPDebug)
+ DBG_RT( "bootArgs2->CommandLine = %s\n", bootArgs2->CommandLine);
+ DBG_RT( "bootArgs2->flags = 0x%hx\n", bootArgs2->flags);
+ DBG_RT( "bootArgs2->kslide = 0x%x\n", bootArgs2->kslide);
+ DBG_RT( "bootArgs2->bootMemStart = 0x%llx\n", bootArgs2->bootMemStart);
+ if (KernelAndKextPatches && KernelAndKextPatches->KPDebug)
gBS->Stall(2000000);
// disable other pointer
@@ -1835,7 +1863,7 @@ FindBootArgs(IN LOADER_ENTRY *Entry)
dtRoot = (CHAR8*)(UINTN)bootArgs1->deviceTreeP;
dtLength = &bootArgs1->deviceTreeLength;
- DBG_RT(Entry, "Found bootArgs1 at 0x%8s, DevTree at %p\n", ptr, dtRoot);
+ DBG_RT( "Found bootArgs1 at 0x%8s, DevTree at %p\n", ptr, dtRoot);
//DBG("bootArgs1->kaddr = 0x%08X and bootArgs1->ksize = 0x%08X\n", bootArgs1->kaddr, bootArgs1->ksize);
//DBG("bootArgs1->efiMode = 0x%02X\n", bootArgs1->efiMode);
@@ -1849,69 +1877,69 @@ FindBootArgs(IN LOADER_ENTRY *Entry)
}
BOOLEAN
-KernelUserPatch(IN UINT8 *UKernelData, LOADER_ENTRY *Entry)
+LOADER_ENTRY::KernelUserPatch(IN UINT8 *UKernelData)
{
INTN Num, i = 0, y = 0;
// old confuse
- // We are using Entry->KernelAndKextPatches as set by Custom Entries.
+ // We are using KernelAndKextPatches as set by Custom Entries.
// while config patches go to gSettings.KernelAndKextPatches
// how to resolve it?
-
- for (; i < Entry->KernelAndKextPatches->NrKernels; ++i) {
- DBG_RT(Entry, "Patch[%lld]: %s\n", i, Entry->KernelAndKextPatches->KernelPatches[i].Label);
- if (!Entry->KernelAndKextPatches->KernelPatches[i].MenuItem.BValue) {
- //DBG_RT(Entry, "Patch[%d]: %a :: is not allowed for booted OS %a\n", i, Entry->KernelAndKextPatches->KernelPatches[i].Label, Entry->OSVersion);
- DBG_RT(Entry, "==> disabled\n");
+
+ for (; i < KernelAndKextPatches->NrKernels; ++i) {
+ DBG_RT( "Patch[%lld]: %s\n", i, KernelAndKextPatches->KernelPatches[i].Label);
+ if (!KernelAndKextPatches->KernelPatches[i].MenuItem.BValue) {
+ //DBG_RT( "Patch[%d]: %a :: is not allowed for booted OS %a\n", i, KernelAndKextPatches->KernelPatches[i].Label, OSVersion);
+ DBG_RT( "==> disabled\n");
continue;
}
bool once = false;
UINTN procLen = 0;
- UINTN procAddr = searchProc(UKernelData, Entry->KernelAndKextPatches->KernelPatches[i].ProcedureName, &procLen);
-
- if (Entry->KernelAndKextPatches->KernelPatches[i].SearchLen == 0) {
- Entry->KernelAndKextPatches->KernelPatches[i].SearchLen = KERNEL_MAX_SIZE;
+ UINTN procAddr = searchProc(UKernelData, KernelAndKextPatches->KernelPatches[i].ProcedureName, &procLen);
+ DBG_RT("procedure %s found at 0x%llx\n", KernelAndKextPatches->KernelPatches[i].ProcedureName, procAddr);
+ if (KernelAndKextPatches->KernelPatches[i].SearchLen == 0) {
+ KernelAndKextPatches->KernelPatches[i].SearchLen = KERNEL_MAX_SIZE;
if (procLen > KERNEL_MAX_SIZE) {
procLen = KERNEL_MAX_SIZE - procAddr;
once = true;
}
} else {
- procLen = Entry->KernelAndKextPatches->KernelPatches[i].SearchLen;
+ procLen = KernelAndKextPatches->KernelPatches[i].SearchLen;
}
UINT8 * curs = &UKernelData[procAddr];
UINTN j = 0;
while (j < KERNEL_MAX_SIZE) {
- if (!Entry->KernelAndKextPatches->KernelPatches[i].StartPattern || //old behavior
+ if (!KernelAndKextPatches->KernelPatches[i].StartPattern || //old behavior
CompareMemMask(curs,
- Entry->KernelAndKextPatches->KernelPatches[i].StartPattern,
- Entry->KernelAndKextPatches->KernelPatches[i].StartMask,
- Entry->KernelAndKextPatches->KernelPatches[i].StartPatternLen)) {
- DBG_RT(Entry, " StartPattern found\n");
+ KernelAndKextPatches->KernelPatches[i].StartPattern,
+ KernelAndKextPatches->KernelPatches[i].StartMask,
+ KernelAndKextPatches->KernelPatches[i].StartPatternLen)) {
+ DBG_RT( " StartPattern found\n");
Num = SearchAndReplaceMask(curs,
procLen,
- Entry->KernelAndKextPatches->KernelPatches[i].Data,
- Entry->KernelAndKextPatches->KernelPatches[i].MaskFind,
- Entry->KernelAndKextPatches->KernelPatches[i].DataLen,
- Entry->KernelAndKextPatches->KernelPatches[i].Patch,
- Entry->KernelAndKextPatches->KernelPatches[i].MaskReplace,
- Entry->KernelAndKextPatches->KernelPatches[i].Count
+ KernelAndKextPatches->KernelPatches[i].Data,
+ KernelAndKextPatches->KernelPatches[i].MaskFind,
+ KernelAndKextPatches->KernelPatches[i].DataLen,
+ KernelAndKextPatches->KernelPatches[i].Patch,
+ KernelAndKextPatches->KernelPatches[i].MaskReplace,
+ KernelAndKextPatches->KernelPatches[i].Count
);
if (Num) {
y++;
- curs += Entry->KernelAndKextPatches->KernelPatches[i].SearchLen - 1;
- j += Entry->KernelAndKextPatches->KernelPatches[i].SearchLen - 1;
+ curs += KernelAndKextPatches->KernelPatches[i].SearchLen - 1;
+ j += KernelAndKextPatches->KernelPatches[i].SearchLen - 1;
}
- DBG_RT(Entry, "==> %s : %lld replaces done\n", Num ? "Success" : "Error", Num);
+ DBG_RT( "==> %s : %lld replaces done\n", Num ? "Success" : "Error", Num);
if (once ||
- !Entry->KernelAndKextPatches->KernelPatches[i].StartPattern ||
- !Entry->KernelAndKextPatches->KernelPatches[i].StartPatternLen) {
+ !KernelAndKextPatches->KernelPatches[i].StartPattern ||
+ !KernelAndKextPatches->KernelPatches[i].StartPatternLen) {
break;
}
}
j++; curs++;
}
}
- if (Entry->KernelAndKextPatches->KPDebug) {
+ if (KernelAndKextPatches->KPDebug) {
gBS->Stall(2000000);
}
@@ -1919,53 +1947,53 @@ KernelUserPatch(IN UINT8 *UKernelData, LOADER_ENTRY *Entry)
}
BOOLEAN
-BooterPatch(IN UINT8 *BooterData, IN UINT64 BooterSize, LOADER_ENTRY *Entry)
+LOADER_ENTRY::BooterPatch(IN UINT8 *BooterData, IN UINT64 BooterSize)
{
INTN Num, i = 0, y = 0;
- if (!Entry->KernelAndKextPatches->BootPatches[i].SearchLen) {
- Entry->KernelAndKextPatches->BootPatches[i].SearchLen = BooterSize;
+ if (!KernelAndKextPatches->BootPatches[i].SearchLen) {
+ KernelAndKextPatches->BootPatches[i].SearchLen = BooterSize;
}
- for (; i < Entry->KernelAndKextPatches->NrBoots; ++i) {
- DBG_RT(Entry, "Patch[%lld]: %s\n", i, Entry->KernelAndKextPatches->BootPatches[i].Label);
- if (!Entry->KernelAndKextPatches->BootPatches[i].MenuItem.BValue) {
- DBG_RT(Entry, "==> disabled\n");
+ for (; i < KernelAndKextPatches->NrBoots; ++i) {
+ DBG_RT( "Patch[%lld]: %s\n", i, KernelAndKextPatches->BootPatches[i].Label);
+ if (!KernelAndKextPatches->BootPatches[i].MenuItem.BValue) {
+ DBG_RT( "==> disabled\n");
continue;
}
UINT8 * curs = BooterData;
UINTN j = 0;
while (j < BooterSize) {
- if (!Entry->KernelAndKextPatches->BootPatches[i].StartPattern || //old behavior
+ if (!KernelAndKextPatches->BootPatches[i].StartPattern || //old behavior
CompareMemMask(curs,
- Entry->KernelAndKextPatches->BootPatches[i].StartPattern,
- Entry->KernelAndKextPatches->BootPatches[i].StartMask,
- Entry->KernelAndKextPatches->BootPatches[i].StartPatternLen)) {
- DBG_RT(Entry, " StartPattern found\n");
+ KernelAndKextPatches->BootPatches[i].StartPattern,
+ KernelAndKextPatches->BootPatches[i].StartMask,
+ KernelAndKextPatches->BootPatches[i].StartPatternLen)) {
+ DBG_RT( " StartPattern found\n");
Num = SearchAndReplaceMask(BooterData,
- Entry->KernelAndKextPatches->BootPatches[i].SearchLen,
- Entry->KernelAndKextPatches->BootPatches[i].Data,
- Entry->KernelAndKextPatches->BootPatches[i].MaskFind,
- Entry->KernelAndKextPatches->BootPatches[i].DataLen,
- Entry->KernelAndKextPatches->BootPatches[i].Patch,
- Entry->KernelAndKextPatches->BootPatches[i].MaskReplace,
- Entry->KernelAndKextPatches->BootPatches[i].Count
+ KernelAndKextPatches->BootPatches[i].SearchLen,
+ KernelAndKextPatches->BootPatches[i].Data,
+ KernelAndKextPatches->BootPatches[i].MaskFind,
+ KernelAndKextPatches->BootPatches[i].DataLen,
+ KernelAndKextPatches->BootPatches[i].Patch,
+ KernelAndKextPatches->BootPatches[i].MaskReplace,
+ KernelAndKextPatches->BootPatches[i].Count
);
if (Num) {
y++;
- curs += Entry->KernelAndKextPatches->KernelPatches[i].SearchLen - 1;
- j += Entry->KernelAndKextPatches->KernelPatches[i].SearchLen - 1;
+ curs += KernelAndKextPatches->KernelPatches[i].SearchLen - 1;
+ j += KernelAndKextPatches->KernelPatches[i].SearchLen - 1;
}
- DBG_RT(Entry, "==> %s : %lld replaces done\n", Num ? "Success" : "Error", Num);
- if (!Entry->KernelAndKextPatches->BootPatches[i].StartPattern ||
- !Entry->KernelAndKextPatches->BootPatches[i].StartPatternLen) {
+ DBG_RT( "==> %s : %lld replaces done\n", Num ? "Success" : "Error", Num);
+ if (!KernelAndKextPatches->BootPatches[i].StartPattern ||
+ !KernelAndKextPatches->BootPatches[i].StartPatternLen) {
break;
}
}
j++; curs++;
}
}
- if (Entry->KernelAndKextPatches->KPDebug) {
+ if (KernelAndKextPatches->KPDebug) {
gBS->Stall(2000000);
}
@@ -1973,7 +2001,7 @@ BooterPatch(IN UINT8 *BooterData, IN UINT64 BooterSize, LOADER_ENTRY *Entry)
}
VOID
-KernelAndKextPatcherInit(IN LOADER_ENTRY *Entry)
+LOADER_ENTRY::KernelAndKextPatcherInit()
{
if (PatcherInited) {
return;
@@ -1988,7 +2016,7 @@ KernelAndKextPatcherInit(IN LOADER_ENTRY *Entry)
// Find bootArgs - we need then for proper detection
// of kernel Mach-O header
- FindBootArgs(Entry);
+ FindBootArgs();
if (bootArgs1 == NULL && bootArgs2 == NULL) {
DBG("BootArgs not found - skipping patches!\n");
return;
@@ -2000,7 +2028,7 @@ KernelAndKextPatcherInit(IN LOADER_ENTRY *Entry)
// for ML: bootArgs2->kslide + 0x00200000
// for AptioFix booting - it's always at KernelRelocBase + 0x00200000
- UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion);
+ UINT64 os_version = AsciiOSVersionToUint64(OSVersion);
if (os_version < AsciiOSVersionToUint64("10.6")) {
KernelData = (UINT8*)(UINTN)(KernelSlide + KernelRelocBase + 0x00111000);
} else {
@@ -2009,14 +2037,14 @@ KernelAndKextPatcherInit(IN LOADER_ENTRY *Entry)
// check that it is Mach-O header and detect architecture
if(MACH_GET_MAGIC(KernelData) == MH_MAGIC || MACH_GET_MAGIC(KernelData) == MH_CIGAM) {
- DBG("Found 32 bit kernel at 0x%p\n", KernelData);
+ DBG("Found 32 bit kernel at 0x%llx\n", (UINTN)KernelData);
is64BitKernel = FALSE;
} else if (MACH_GET_MAGIC(KernelData) == MH_MAGIC_64 || MACH_GET_MAGIC(KernelData) == MH_CIGAM_64) {
- DBG_RT(Entry, "Found 64 bit kernel at 0x%p\n", KernelData);
+ DBG_RT( "Found 64 bit kernel at 0x%llx\n", (UINTN)KernelData);
is64BitKernel = TRUE;
} else {
// not valid Mach-O header - exiting
- DBG_RT(Entry, "Kernel not found at 0x%p - skipping patches!\n", KernelData);
+ DBG_RT( "Kernel not found at 0x%llx - skipping patches!\n", (UINTN)KernelData);
KernelData = NULL;
return;
}
@@ -2025,229 +2053,225 @@ KernelAndKextPatcherInit(IN LOADER_ENTRY *Entry)
Get_PreLink();
isKernelcache = PrelinkTextSize > 0 && PrelinkInfoSize > 0;
- DBG_RT(Entry, "isKernelcache: %ls\n", isKernelcache ? L"Yes" : L"No");
+ DBG_RT( "isKernelcache: %ls\n", isKernelcache ? L"Yes" : L"No");
}
VOID
-KernelAndKextsPatcherStart(IN LOADER_ENTRY *Entry)
+LOADER_ENTRY::KernelAndKextsPatcherStart()
{
BOOLEAN KextPatchesNeeded, patchedOk;
// it was intended for custom entries but not work if no suctom entries used
// so set common until better solution invented
- Entry->KernelAndKextPatches = (KERNEL_AND_KEXT_PATCHES *)(((UINTN)&gSettings) + OFFSET_OF(SETTINGS_DATA, KernelAndKextPatches));
+ KernelAndKextPatches = (KERNEL_AND_KEXT_PATCHES *)(((UINTN)&gSettings) + OFFSET_OF(SETTINGS_DATA, KernelAndKextPatches));
// we will call KernelAndKextPatcherInit() only if needed
- if ((Entry == NULL) || (Entry->KernelAndKextPatches == NULL)) return; //entry is not null as double check
+ if (KernelAndKextPatches == NULL) return; //entry is not null as double check
KextPatchesNeeded = (
- Entry->KernelAndKextPatches->KPAppleIntelCPUPM ||
- Entry->KernelAndKextPatches->KPAppleRTC ||
- Entry->KernelAndKextPatches->KPDELLSMBIOS ||
- (Entry->KernelAndKextPatches->KPATIConnectorsPatch != NULL) ||
- ((Entry->KernelAndKextPatches->NrKexts > 0) && (Entry->KernelAndKextPatches->KextPatches != NULL))
+ KernelAndKextPatches->KPAppleIntelCPUPM ||
+ KernelAndKextPatches->KPAppleRTC ||
+ KernelAndKextPatches->KPDELLSMBIOS ||
+ (KernelAndKextPatches->KPATIConnectorsPatch != NULL) ||
+ ((KernelAndKextPatches->NrKexts > 0) && (KernelAndKextPatches->KextPatches != NULL))
);
- DBG_RT(Entry, "\nKernelToPatch: ");
- DBG_RT(Entry, "Kernels patches: %d\n", Entry->KernelAndKextPatches->NrKernels);
- if (gSettings.KernelPatchesAllowed && (Entry->KernelAndKextPatches->KernelPatches != NULL) && Entry->KernelAndKextPatches->NrKernels) {
- DBG_RT(Entry, "Enabled: \n");
- KernelAndKextPatcherInit(Entry);
+ DBG_RT("\nKernelToPatch: ");
+ DBG_RT("Kernels patches: %d\n", KernelAndKextPatches->NrKernels);
+ if (gSettings.KernelPatchesAllowed && (KernelAndKextPatches->KernelPatches != NULL) && KernelAndKextPatches->NrKernels) {
+ DBG_RT("Enabled: \n");
+ KernelAndKextPatcherInit();
if (KernelData == NULL) goto NoKernelData;
- patchedOk = KernelUserPatch(KernelData, Entry);
- DBG_RT(Entry, patchedOk ? " OK\n" : " FAILED!\n");
+ if (EFI_ERROR(getVTable(KernelData))) {
+ goto NoKernelData;
+ }
+ patchedOk = KernelUserPatch(KernelData);
+ DBG_RT(patchedOk ? " OK\n" : " FAILED!\n");
// gBS->Stall(5000000);
} else {
- DBG_RT(Entry, "Disabled\n");
+ DBG_RT("Disabled\n");
}
- DBG_RT(Entry, "\nKernelCpu patch: ");
- if (Entry->KernelAndKextPatches->KPKernelCpu) {
+ DBG_RT( "\nKernelCpu patch: ");
+ if (KernelAndKextPatches->KPKernelCpu) {
//
// Kernel patches
//
- DBG_RT(Entry, "Enabled: \n");
- KernelAndKextPatcherInit(Entry);
+ DBG_RT( "Enabled: \n");
+ KernelAndKextPatcherInit();
if (KernelData == NULL) goto NoKernelData;
if(is64BitKernel) {
- DBG_RT(Entry, "64 bit patch ...\n");
- KernelPatcher_64(KernelData, Entry);
+ DBG_RT( "64 bit patch ...\n");
+ KernelPatcher_64(KernelData);
} else {
- DBG_RT(Entry, "32 bit patch ...\n");
- KernelPatcher_32(KernelData, Entry->OSVersion);
+ DBG_RT( "32 bit patch ...\n");
+ KernelPatcher_32(KernelData, OSVersion);
}
- DBG_RT(Entry, " OK\n");
+ DBG_RT( " OK\n");
} else {
- DBG_RT(Entry, "Disabled\n");
+ DBG_RT( "Disabled\n");
}
//other method for KernelCPU patch is FakeCPUID
- DBG_RT(Entry, "\nFakeCPUID patch: ");
- if (Entry->KernelAndKextPatches->FakeCPUID) {
- DBG_RT(Entry, "Enabled: 0x%06x\n", Entry->KernelAndKextPatches->FakeCPUID);
- KernelAndKextPatcherInit(Entry);
+ DBG_RT( "\nFakeCPUID patch: ");
+ if (KernelAndKextPatches->FakeCPUID) {
+ DBG_RT( "Enabled: 0x%06x\n", KernelAndKextPatches->FakeCPUID);
+ KernelAndKextPatcherInit();
if (KernelData == NULL) goto NoKernelData;
- KernelCPUIDPatch((UINT8*)KernelData, Entry);
+ KernelCPUIDPatch((UINT8*)KernelData);
} else {
- DBG_RT(Entry, "Disabled\n");
+ DBG_RT( "Disabled\n");
}
// CPU power management patch for haswell with locked msr
- DBG_RT(Entry, "\nKernelPm patch: ");
- if (Entry->KernelAndKextPatches->KPKernelPm) {
- DBG_RT(Entry, "Enabled: \n");
- KernelAndKextPatcherInit(Entry);
+ DBG_RT( "\nKernelPm patch: ");
+ if (KernelAndKextPatches->KPKernelPm) {
+ DBG_RT( "Enabled: \n");
+ KernelAndKextPatcherInit();
if (KernelData == NULL) goto NoKernelData;
patchedOk = FALSE;
if (is64BitKernel) {
- patchedOk = KernelPatchPm(KernelData, Entry);
+ patchedOk = KernelPatchPm(KernelData);
}
- DBG_RT(Entry, patchedOk ? " OK\n" : " FAILED!\n");
+ DBG_RT( patchedOk ? " OK\n" : " FAILED!\n");
} else {
- DBG_RT(Entry, "Disabled\n");
+ DBG_RT( "Disabled\n");
}
// Patch to not dump kext at panic (c)vit9696
- DBG_RT(Entry, "\nPanicNoKextDump patch: ");
- if (Entry->KernelAndKextPatches->KPPanicNoKextDump) {
- DBG_RT(Entry, "Enabled: \n");
- KernelAndKextPatcherInit(Entry);
+ DBG_RT( "\nPanicNoKextDump patch: ");
+ if (KernelAndKextPatches->KPPanicNoKextDump) {
+ DBG_RT( "Enabled: \n");
+ KernelAndKextPatcherInit();
if (KernelData == NULL) goto NoKernelData;
patchedOk = KernelPanicNoKextDump(KernelData);
- DBG_RT(Entry, patchedOk ? " OK\n" : " FAILED!\n");
+ DBG_RT( patchedOk ? " OK\n" : " FAILED!\n");
} else {
- DBG_RT(Entry, "Disabled\n");
+ DBG_RT( "Disabled\n");
}
// Lapic Panic Kernel Patch
- DBG_RT(Entry, "\nKernelLapic patch: ");
- if (Entry->KernelAndKextPatches->KPKernelLapic) {
- DBG_RT(Entry, "Enabled: \n");
- KernelAndKextPatcherInit(Entry);
+ DBG_RT( "\nKernelLapic patch: ");
+ if (KernelAndKextPatches->KPKernelLapic) {
+ DBG_RT( "Enabled: \n");
+ KernelAndKextPatcherInit();
if (KernelData == NULL) goto NoKernelData;
if(is64BitKernel) {
- DBG_RT(Entry, "64-bit patch ...\n");
- patchedOk = KernelLapicPatch_64(KernelData, Entry);
+ DBG_RT( "64-bit patch ...\n");
+ patchedOk = KernelLapicPatch_64(KernelData);
} else {
- DBG_RT(Entry, "32-bit patch ...\n");
- patchedOk = KernelLapicPatch_32(KernelData, Entry);
+ DBG_RT( "32-bit patch ...\n");
+ patchedOk = KernelLapicPatch_32(KernelData);
}
- DBG_RT(Entry, patchedOk ? " OK\n" : " FAILED!\n");
+ DBG_RT( patchedOk ? " OK\n" : " FAILED!\n");
} else {
- DBG_RT(Entry, "Disabled\n");
+ DBG_RT( "Disabled\n");
}
- if (Entry->KernelAndKextPatches->KPKernelXCPM) {
+ if (KernelAndKextPatches->KPKernelXCPM) {
//
// syscl - EnableExtCpuXCPM: Enable unsupported CPU's PowerManagement
//
- EnableExtCpuXCPM = NULL;
+// EnableExtCpuXCPM = NULL;
patchedOk = FALSE;
+ BOOLEAN apply_idle_patch = (gCPUStructure.Model >= CPU_MODEL_SKYLAKE_U) && gSettings.HWP;
+ KernelAndKextPatcherInit();
+ if (KernelData == NULL) goto NoKernelData;
+
+ // syscl - now enable extra Cpu's PowerManagement
+ // only Intel support this feature till now
+ // move below code outside the if condition if AMD supports
+ // XCPM later on
+
if (gCPUStructure.Vendor == CPU_VENDOR_INTEL) {
switch (gCPUStructure.Model) {
case CPU_MODEL_JAKETOWN:
// SandyBridge-E LGA2011
- EnableExtCpuXCPM = SandyBridgeEPM;
+ patchedOk = SandyBridgeEPM(KernelData, apply_idle_patch);
gSNBEAICPUFixRequire = TRUE; // turn on SandyBridge-E AppleIntelCPUPowerManagement Fix
break;
case CPU_MODEL_IVY_BRIDGE:
// IvyBridge
- EnableExtCpuXCPM = KernelIvyBridgeXCPM;
+ patchedOk = KernelIvyBridgeXCPM(KernelData, apply_idle_patch);
break;
case CPU_MODEL_IVY_BRIDGE_E5:
// IvyBridge-E
- EnableExtCpuXCPM = KernelIvyE5XCPM;
+ patchedOk = KernelIvyE5XCPM(KernelData, apply_idle_patch);
break;
case CPU_MODEL_HASWELL_E:
// Haswell-E
- EnableExtCpuXCPM = HaswellEXCPM;
+ patchedOk = HaswellEXCPM(KernelData, apply_idle_patch);
break;
case CPU_MODEL_BROADWELL_E5:
case CPU_MODEL_BROADWELL_DE:
// Broadwell-E/EP
- EnableExtCpuXCPM = BroadwellEPM;
+ patchedOk = BroadwellEPM(KernelData, apply_idle_patch);
gBDWEIOPCIFixRequire = TRUE;
break;
default:
if (gCPUStructure.Model >= CPU_MODEL_HASWELL &&
- (AsciiStrStr(gCPUStructure.BrandString, "Celeron") || AsciiStrStr(gCPUStructure.BrandString, "Pentium"))) {
+ (AsciiStrStr(gCPUStructure.BrandString, "Celeron") ||
+ AsciiStrStr(gCPUStructure.BrandString, "Pentium"))) {
// Haswell+ low-end CPU
- EnableExtCpuXCPM = HaswellLowEndXCPM;
+ patchedOk = HaswellLowEndXCPM(KernelData, apply_idle_patch);
}
break;
}
-
- // syscl - now enable extra Cpu's PowerManagement
- // only Intel support this feature till now
- // move below code outside the if condition if AMD supports
- // XCPM later on
- if (EnableExtCpuXCPM) {
- BOOLEAN apply_idle_patch = (gCPUStructure.Model >= CPU_MODEL_SKYLAKE_U) && gSettings.HWP;
- KernelAndKextPatcherInit(Entry);
- if (KernelData == NULL) goto NoKernelData;
- patchedOk = EnableExtCpuXCPM(KernelData, Entry, apply_idle_patch);
- }
}
- DBG_RT(Entry, "EnableExtCpuXCPM - %s!\n", patchedOk? "OK" : "FAILED");
- }
-
- if (Entry->KernelAndKextPatches->KPDebug) {
- gBS->Stall(2000000);
+ DBG_RT( "EnableExtCpuXCPM - %s!\n", patchedOk? "OK" : "FAILED");
}
+ Stall(2000000);
//
// Kext patches
//
// we need to scan kexts if "InjectKexts true and CheckFakeSMC"
- if (/*OSFLAG_ISSET(Entry->Flags, OSFLAG_WITHKEXTS) || */
- OSFLAG_ISSET(Entry->Flags, OSFLAG_CHECKFAKESMC)) {
- DBG_RT(Entry, "\nAllowing kext patching to check if FakeSMC is present\n");
+ if (/*OSFLAG_ISSET(Flags, OSFLAG_WITHKEXTS) || */
+ OSFLAG_ISSET(Flags, OSFLAG_CHECKFAKESMC)) {
+ DBG_RT( "\nAllowing kext patching to check if FakeSMC is present\n");
gSettings.KextPatchesAllowed = TRUE;
KextPatchesNeeded = TRUE;
}
- DBG_RT(Entry, "\nKextPatches Needed: %c, Allowed: %c ... ",
+ DBG_RT( "\nKextPatches Needed: %c, Allowed: %c ... ",
(KextPatchesNeeded ? L'Y' : L'n'),
(gSettings.KextPatchesAllowed ? L'Y' : L'n')
);
if (KextPatchesNeeded && gSettings.KextPatchesAllowed) {
- KernelAndKextPatcherInit(Entry);
+ KernelAndKextPatcherInit();
if (KernelData == NULL) goto NoKernelData;
- DBG_RT(Entry, "\nKext patching STARTED\n");
- KextPatcherStart(Entry); //is FakeSMC found in cache then inject will be disabled
- DBG_RT(Entry, "\nKext patching ENDED\n");
+ DBG_RT( "\nKext patching STARTED\n");
+ KextPatcherStart(); //is FakeSMC found in cache then inject will be disabled
+ DBG_RT( "\nKext patching ENDED\n");
} else {
- DBG_RT(Entry, "Disabled\n");
+ DBG_RT( "Disabled\n");
}
- if (Entry->KernelAndKextPatches->KPDebug) {
- DBG_RT(Entry, "Pausing 10 secs ...\n\n");
- gBS->Stall(10000000);
- }
+ Stall(10000000);
//
// Kext add
//
-// if (Entry->KernelAndKextPatches->KPDebug) {
+// if (KernelAndKextPatches->KPDebug) {
// if (OSFLAG_ISSET(Entry->Flags, OSFLAG_CHECKFAKESMC) &&
// OSFLAG_ISUNSET(Entry->Flags, OSFLAG_WITHKEXTS)) {
// disabled kext injection if FakeSMC is already present
// Entry->Flags = OSFLAG_UNSET(Entry->Flags, OSFLAG_WITHKEXTS); //Slice - we are already here
//
-// DBG_RT(Entry, "\nInjectKexts: disabled because FakeSMC is already present and InjectKexts option set to Detect\n");
+// DBG_RT( "\nInjectKexts: disabled because FakeSMC is already present and InjectKexts option set to Detect\n");
// gBS->Stall(500000);
// }
// }
- if (OSFLAG_ISSET(Entry->Flags, OSFLAG_WITHKEXTS)) {
+ if (OSFLAG_ISSET(Flags, OSFLAG_WITHKEXTS)) {
UINT32 deviceTreeP;
- UINT32 deviceTreeLength;
+ UINT32 *deviceTreeLength;
EFI_STATUS Status;
UINTN DataSize;
@@ -2256,33 +2280,29 @@ KernelAndKextsPatcherStart(IN LOADER_ENTRY *Entry)
Status = gRT->GetVariable (L"FSInject.KextsInjected", &gEfiGlobalVariableGuid, NULL, &DataSize, NULL);
if (Status == EFI_BUFFER_TOO_SMALL) {
// var exists - just exit
- if (Entry->KernelAndKextPatches->KPDebug) {
- DBG_RT(Entry, "\nInjectKexts: skipping, FSInject already injected them\n");
- gBS->Stall(500000);
- }
+
+ DBG_RT( "\nInjectKexts: skipping, FSInject already injected them\n");
+ Stall(500000);
return;
}
- KernelAndKextPatcherInit(Entry);
+ KernelAndKextPatcherInit();
if (KernelData == NULL) goto NoKernelData;
if (bootArgs1 != NULL) {
deviceTreeP = bootArgs1->deviceTreeP;
- deviceTreeLength = bootArgs1->deviceTreeLength;
+ deviceTreeLength = &bootArgs1->deviceTreeLength;
} else if (bootArgs2 != NULL) {
deviceTreeP = bootArgs2->deviceTreeP;
- deviceTreeLength = bootArgs2->deviceTreeLength;
+ deviceTreeLength = &bootArgs2->deviceTreeLength;
} else return;
- Status = InjectKexts(deviceTreeP, &deviceTreeLength, Entry);
+ Status = InjectKexts(deviceTreeP, deviceTreeLength);
- if (!EFI_ERROR(Status)) KernelBooterExtensionsPatch(KernelData, Entry);
+ if (!EFI_ERROR(Status)) KernelBooterExtensionsPatch(KernelData);
}
return;
NoKernelData:
- if (Entry->KernelAndKextPatches->KPDebug) {
- DBG_RT(Entry, "==> ERROR: Kernel not found\n");
- gBS->Stall(5000000);
- }
+ Stall(5000000);
}
diff --git a/rEFIt_UEFI/Platform/kernel_patcher.h b/rEFIt_UEFI/Platform/kernel_patcher.h
index 47a93583b..ac76be557 100644
--- a/rEFIt_UEFI/Platform/kernel_patcher.h
+++ b/rEFIt_UEFI/Platform/kernel_patcher.h
@@ -8,20 +8,18 @@
#include "boot.h"
-#define CPUFAMILY_INTEL_6_13 0xaa33392b
-#define CPUFAMILY_INTEL_YONAH 0x73d67300
-#define CPUFAMILY_INTEL_MEROM 0x426f69ef
+#define DBG_RT( ...) if ((KernelAndKextPatches != NULL) && KernelAndKextPatches->KPDebug) { printf(__VA_ARGS__); }
+
+
+#define CPUFAMILY_INTEL_6_13 0xaa33392b
+#define CPUFAMILY_INTEL_YONAH 0x73d67300
+#define CPUFAMILY_INTEL_MEROM 0x426f69ef
#define CPUFAMILY_INTEL_PENRYN 0x78ea4fbc
#define CPUFAMILY_INTEL_NEHALEM 0x6b5a4cd2
#define CPUFAMILY_INTEL_WESTMERE 0x573b5eec
#define CPUIDFAMILY_DEFAULT 6
-#define CPUID_MODEL_6_13 13
-#define CPUID_MODEL_YONAH 14
-#define CPUID_MODEL_MEROM 15
-#define CPUID_MODEL_PENRYN 23
-
#define MACH_GET_MAGIC(hdr) (((struct mach_header_64*)(hdr))->magic)
#define MACH_GET_NCMDS(hdr) (((struct mach_header_64*)(hdr))->ncmds)
#define MACH_GET_CPU(hdr) (((struct mach_header_64*)(hdr))->cputype)
@@ -29,37 +27,36 @@
#define SC_GET_CMD(hdr) (((struct segment_command_64*)(hdr))->cmd)
-#define kPrelinkTextSegment "__PRELINK_TEXT"
-#define kPrelinkTextSection "__text"
+const char kPrelinkTextSegment[] = "__PRELINK_TEXT";
+const char kPrelinkTextSection[] = "__text";
+const char kPrelinkLinkStateSegment[] = "__PRELINK_STATE";
+const char kPrelinkKernelLinkStateSection[] = "__kernel";
+const char kPrelinkKextsLinkStateSection[] = "__kexts";
+const char kPrelinkInfoSegment[] = "__PRELINK_INFO";
+const char kPrelinkInfoSection[] = "__info";
+const char kLinkEditSegment[] = "__LINKEDIT";
+const char kTextSegment[] = "__TEXT";
+const char kDataSegment[] = "__DATA";
+const char kDataConstSegment[] = "__DATA_CONST";
+const char kKldSegment[] = "__KLD";
-#define kPrelinkLinkStateSegment "__PRELINK_STATE"
-#define kPrelinkKernelLinkStateSection "__kernel"
-#define kPrelinkKextsLinkStateSection "__kexts"
-
-#define kPrelinkInfoSegment "__PRELINK_INFO"
-#define kPrelinkInfoSection "__info"
-
-#define kLinkEditSegment "__LINKEDIT"
-#define kTextSegment "__TEXT"
#define ID_SEG_TEXT 0x010f
-#define kDataSegment "__DATA"
#define ID_SEG_DATA 0x0f0f
-#define kDataConstSegment "__DATA_CONST"
#define ID_SEG_DATA_CONST 0x110f
-#define kKldSegment "__KLD"
#define ID_SEG_KLD 0x180f
#define ID_SEG_KLD2 0x1a0f
-#define kPrelinkBundlePathKey "_PrelinkBundlePath"
-#define kPrelinkExecutableRelativePathKey "_PrelinkExecutableRelativePath"
-#define kPrelinkExecutableLoadKey "_PrelinkExecutableLoadAddr"
-#define kPrelinkExecutableSourceKey "_PrelinkExecutableSourceAddr"
-#define kPrelinkExecutableSizeKey "_PrelinkExecutableSize"
-#define kPrelinkInfoDictionaryKey "_PrelinkInfoDictionary"
-#define kPrelinkInterfaceUUIDKey "_PrelinkInterfaceUUID"
-#define kPrelinkKmodInfoKey "_PrelinkKmodInfo"
-#define kPrelinkLinkStateKey "_PrelinkLinkState"
-#define kPrelinkLinkStateSizeKey "_PrelinkLinkStateSize"
+const char ctor_used[] = ".constructors_used";
+const char kPrelinkBundlePathKey[] = "_PrelinkBundlePath";
+const char kPrelinkExecutableRelativePathKey[] = "_PrelinkExecutableRelativePath";
+const char kPrelinkExecutableLoadKey[] = "_PrelinkExecutableLoadAddr";
+const char kPrelinkExecutableSourceKey[] = "_PrelinkExecutableSourceAddr";
+const char kPrelinkExecutableSizeKey[] = "_PrelinkExecutableSize";
+const char kPrelinkInfoDictionaryKey[] = "_PrelinkInfoDictionary";
+const char kPrelinkInterfaceUUIDKey[] = "_PrelinkInterfaceUUID";
+const char kPrelinkKmodInfoKey[] = "_PrelinkKmodInfo";
+const char kPrelinkLinkStateKey[] = "_PrelinkLinkState";
+const char kPrelinkLinkStateSizeKey[] = "_PrelinkLinkStateSize";
#define kPropCFBundleIdentifier ("CFBundleIdentifier")
#define kPropCFBundleExecutable ("CFBundleExecutable")
@@ -133,7 +130,7 @@ extern UINT32 PrelinkInfoLoadCmdAddr;
extern UINT32 PrelinkInfoAddr;
extern UINT32 PrelinkInfoSize;
-extern UINT32 DisplayVendor[];
+extern UINT32 DisplayVendor[];
//VOID findCPUfamily();
extern BOOLEAN SSSE3;
@@ -147,7 +144,7 @@ VOID Patcher_SSE3_7(VOID* kernelData);
#include "../gui/menu_items/menu_items.h" // for LOADER_ENTRY
class LOADER_ENTRY;
-VOID KernelAndKextsPatcherStart(IN LOADER_ENTRY *Entry);
+//VOID KernelAndKextsPatcherStart(IN LOADER_ENTRY *Entry);
//VOID register_kernel_symbol(CONST CHAR8* name);
//UINT64 symbol_handler(CHAR8* symbolName, UINT64 addr);
@@ -163,14 +160,14 @@ VOID KernelAndKextsPatcherStart(IN LOADER_ENTRY *Entry);
// Called from SetFSInjection(), before boot.efi is started,
// to allow patchers to prepare FSInject to force load needed kexts.
//
-VOID KextPatcherRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_LIST *ForceLoadKexts, LOADER_ENTRY *Entry);
+//VOID KextPatcherRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_LIST *ForceLoadKexts, LOADER_ENTRY *Entry);
//
// Entry for all kext patches.
// Will iterate through kext in prelinked kernel (kernelcache)
// or DevTree (drivers boot) and do patches.
//
-VOID KextPatcherStart(LOADER_ENTRY *Entry);
+//VOID KextPatcherStart(LOADER_ENTRY *Entry);
//
// Searches Source for Search pattern of size SearchSize
@@ -191,6 +188,6 @@ UINTN SearchAndReplace(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINTN Se
UINTN SearchAndReplaceMask(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINT8 *MaskSearch, UINTN SearchSize, UINT8 *Replace, UINT8 *MaskReplace, INTN MaxReplaces);
-UINTN searchProc(unsigned char * kernel, const char *procedure, UINTN *procLen);
+//UINTN searchProc(LOADER_ENTRY *Entry, unsigned char * kernel, const char *procedure, UINTN *procLen);
#endif /* !__LIBSAIO_KERNEL_PATCHER_H */
diff --git a/rEFIt_UEFI/Platform/kext_inject.cpp b/rEFIt_UEFI/Platform/kext_inject.cpp
index fd2875b9d..bcde91123 100644
--- a/rEFIt_UEFI/Platform/kext_inject.cpp
+++ b/rEFIt_UEFI/Platform/kext_inject.cpp
@@ -18,8 +18,7 @@
#endif
// runtime debug
-#define DBG_RT(entry, ...) if ((entry != NULL) && (entry->KernelAndKextPatches != NULL) && entry->KernelAndKextPatches->KPDebug) { printf(__VA_ARGS__); }
-
+//
#define OLD_EXTRA_KEXT_PATCH 1
////////////////////
@@ -126,10 +125,10 @@ BOOLEAN checkOSBundleRequired(UINT8 loaderType, TagPtr dict)
return inject;
}
-extern VOID KernelAndKextPatcherInit(IN LOADER_ENTRY *Entry);
-extern VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, INT32 N, LOADER_ENTRY *Entry);
+//extern VOID KernelAndKextPatcherInit(IN LOADER_ENTRY *Entry);
+//extern VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, INT32 N, LOADER_ENTRY *Entry);
-EFI_STATUS EFIAPI LoadKext(IN LOADER_ENTRY *Entry, IN EFI_FILE *RootDir, IN CHAR16 *FileName, IN cpu_type_t archCpuType, IN OUT _DeviceTreeBuffer *kext)
+EFI_STATUS EFIAPI LOADER_ENTRY::LoadKext(IN EFI_FILE *RootDir, IN CHAR16 *FileName, IN cpu_type_t archCpuType, IN OUT VOID *kext_v)
{
EFI_STATUS Status;
UINT8* infoDictBuffer = NULL;
@@ -146,6 +145,7 @@ EFI_STATUS EFIAPI LoadKext(IN LOADER_ENTRY *Entry, IN EFI_FILE *RootDir, IN CHAR
BOOLEAN NoContents = FALSE;
BOOLEAN inject = FALSE;
_BooterKextFileInfo *infoAddr = NULL;
+ _DeviceTreeBuffer *kext = (_DeviceTreeBuffer *)kext_v;
TempName = PoolPrint(L"%s\\%s", FileName, L"Contents\\Info.plist");
// snwprintf(TempName, 512, L"%s\\%s", FileName, "Contents\\Info.plist");
@@ -169,7 +169,7 @@ EFI_STATUS EFIAPI LoadKext(IN LOADER_ENTRY *Entry, IN EFI_FILE *RootDir, IN CHAR
return EFI_NOT_FOUND;
}
- inject = checkOSBundleRequired(Entry->LoaderType, dict);
+ inject = checkOSBundleRequired(LoaderType, dict);
if(!inject) {
MsgLog("Skipping kext injection by OSBundleRequired : %ls\n", FileName);
return EFI_UNSUPPORTED;
@@ -225,14 +225,14 @@ EFI_STATUS EFIAPI LoadKext(IN LOADER_ENTRY *Entry, IN EFI_FILE *RootDir, IN CHAR
return EFI_SUCCESS;
}
-EFI_STATUS EFIAPI AddKext(IN LOADER_ENTRY *Entry, IN EFI_FILE *RootDir, IN CHAR16 *FileName, IN cpu_type_t archCpuType)
+EFI_STATUS EFIAPI LOADER_ENTRY::AddKext(IN EFI_FILE *RootDir, IN CHAR16 *FileName, IN cpu_type_t archCpuType)
{
EFI_STATUS Status;
KEXT_ENTRY *KextEntry;
KextEntry = (__typeof__(KextEntry))AllocatePool (sizeof(KEXT_ENTRY));
KextEntry->Signature = KEXT_SIGNATURE;
- Status = LoadKext(Entry, RootDir, FileName, archCpuType, &KextEntry->kext);
+ Status = LoadKext(RootDir, FileName, archCpuType, &KextEntry->kext);
if(EFI_ERROR(Status)) {
FreePool(KextEntry);
} else {
@@ -275,12 +275,12 @@ UINT32 GetKextsSize()
return kextsSize;
}
-VOID LoadPlugInKexts(IN LOADER_ENTRY *Entry, IN EFI_FILE *RootDir, IN CHAR16 *DirName, IN cpu_type_t archCpuType, IN BOOLEAN Force)
+VOID LOADER_ENTRY::LoadPlugInKexts(IN EFI_FILE *RootDir, IN CHAR16 *DirName, IN cpu_type_t archCpuType, IN BOOLEAN Force)
{
REFIT_DIR_ITER PlugInIter;
EFI_FILE_INFO *PlugInFile;
CHAR16 *FileName;
- if ((Entry == NULL) || (RootDir == NULL) || (DirName == NULL)) {
+ if ((RootDir == NULL) || (DirName == NULL)) {
return;
}
DirIterOpen(RootDir, DirName, &PlugInIter);
@@ -290,13 +290,13 @@ VOID LoadPlugInKexts(IN LOADER_ENTRY *Entry, IN EFI_FILE *RootDir, IN CHAR16 *Di
FileName = PoolPrint(L"%s\\%s", DirName, PlugInFile->FileName);
// snwprintf(FileName, 512, "%s\\%s", DirName, PlugInFile->FileName);
MsgLog(" %ls PlugIn kext: %ls\n", Force ? L"Force" : L"Extra", FileName);
- AddKext(Entry, RootDir, FileName, archCpuType);
+ AddKext( RootDir, FileName, archCpuType);
FreePool(FileName);
}
DirIterClose(&PlugInIter);
}
-VOID AddKexts(IN LOADER_ENTRY *Entry, CONST CHAR16 *SrcDir, CONST CHAR16 *Path/*, CHAR16 *UniSysVers*/, cpu_type_t archCpuType)
+VOID LOADER_ENTRY::AddKexts(CONST CHAR16 *SrcDir, CONST CHAR16 *Path, cpu_type_t archCpuType)
{
CHAR16 *FileName;
CHAR16 *PlugInName;
@@ -314,7 +314,7 @@ VOID AddKexts(IN LOADER_ENTRY *Entry, CONST CHAR16 *SrcDir, CONST CHAR16 *Path/*
if (!(CurrentKext->MenuItem.BValue)) {
// inject require
MsgLog("->Extra kext: %ls (v.%ls)\n", FileName, CurrentKext->Version);
- Status = AddKext(Entry, SelfVolume->RootDir, FileName, archCpuType);
+ Status = AddKext(SelfVolume->RootDir, FileName, archCpuType);
if(!EFI_ERROR(Status)) {
// decide which plugins to inject
CurrentPlugInKext = CurrentKext->PlugInList;
@@ -324,7 +324,7 @@ VOID AddKexts(IN LOADER_ENTRY *Entry, CONST CHAR16 *SrcDir, CONST CHAR16 *Path/*
if (!(CurrentPlugInKext->MenuItem.BValue)) {
// inject PlugIn require
MsgLog(" |-- PlugIn kext: %ls (v.%ls)\n", PlugInName, CurrentPlugInKext->Version);
- AddKext(Entry, SelfVolume->RootDir, PlugInName, archCpuType);
+ AddKext(SelfVolume->RootDir, PlugInName, archCpuType);
} else {
MsgLog(" |-- Disabled plug-in kext: %ls (v.%ls)\n", PlugInName, CurrentPlugInKext->Version);
}
@@ -345,7 +345,7 @@ VOID AddKexts(IN LOADER_ENTRY *Entry, CONST CHAR16 *SrcDir, CONST CHAR16 *Path/*
}
-EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
+EFI_STATUS LOADER_ENTRY::LoadKexts()
{
CHAR16 *SrcDir = NULL;
REFIT_DIR_ITER PlugInIter;
@@ -368,21 +368,17 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
SIDELOAD_KEXT *CurrentPlugInKext = NULL;
SIDELOAD_KEXT *Next = NULL;
- if (Entry == 0)/* || OSFLAG_ISUNSET(Entry->Flags, OSFLAG_WITHKEXTS) */ {
- return EFI_NOT_STARTED;
- }
-
// Make Arch point to the last appearance of "arch=" in LoadOptions (which is what boot.efi will use).
- if (Entry->LoadOptions.notEmpty()) {
-// for (Ptr = StrStr(Entry->LoadOptions, L"arch="); Ptr != NULL; Arch = Ptr + StrLen(L"arch="), Ptr = StrStr(Arch, L"arch="));
+ if (LoadOptions.notEmpty()) {
+// for (Ptr = StrStr(LoadOptions, L"arch="); Ptr != NULL; Arch = Ptr + StrLen(L"arch="), Ptr = StrStr(Arch, L"arch="));
}
if (Arch != NULL && StrnCmp(Arch,L"x86_64",StrLen(L"x86_64")) == 0) {
archCpuType = CPU_TYPE_X86_64;
} else if (Arch != NULL && StrnCmp(Arch,L"i386",StrLen(L"i386")) == 0) {
archCpuType = CPU_TYPE_I386;
- } else if (Entry->OSVersion != NULL) {
- UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion);
+ } else if (OSVersion != NULL) {
+ UINT64 os_version = AsciiOSVersionToUint64(OSVersion);
if (os_version >= AsciiOSVersionToUint64("10.8")) {
archCpuType = CPU_TYPE_X86_64; // For OSVersion >= 10.8, only x86_64 exists
} else if (os_version < AsciiOSVersionToUint64("10.7")) {
@@ -391,35 +387,35 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
}
// Force kexts to load
- if ((Entry->KernelAndKextPatches != NULL) &&
- (Entry->KernelAndKextPatches->NrForceKexts > 0) &&
- (Entry->KernelAndKextPatches->ForceKexts != NULL)) {
+ if ((KernelAndKextPatches != NULL) &&
+ (KernelAndKextPatches->NrForceKexts > 0) &&
+ (KernelAndKextPatches->ForceKexts != NULL)) {
INT32 i = 0;
- for (; i < Entry->KernelAndKextPatches->NrForceKexts; ++i) {
- MsgLog(" Force kext: %ls\n", Entry->KernelAndKextPatches->ForceKexts[i]);
- if (Entry->Volume && Entry->Volume->RootDir) {
+ for (; i < KernelAndKextPatches->NrForceKexts; ++i) {
+ MsgLog(" Force kext: %ls\n", KernelAndKextPatches->ForceKexts[i]);
+ if (Volume && Volume->RootDir) {
// Check if the entry is a directory
- if (StrStr(Entry->KernelAndKextPatches->ForceKexts[i], L".kext") == NULL) {
- DirIterOpen(Entry->Volume->RootDir, Entry->KernelAndKextPatches->ForceKexts[i], &PlugInIter);
+ if (StrStr(KernelAndKextPatches->ForceKexts[i], L".kext") == NULL) {
+ DirIterOpen(Volume->RootDir, KernelAndKextPatches->ForceKexts[i], &PlugInIter);
while (DirIterNext(&PlugInIter, 1, L"*.kext", &PlugInFile)) {
if (PlugInFile->FileName[0] == '.' || StrStr(PlugInFile->FileName, L".kext") == NULL)
continue; // skip this
- FileName = PoolPrint(L"%s\\%s", Entry->KernelAndKextPatches->ForceKexts[i], PlugInFile->FileName);
- // snwprintf(FileName, 512, "%s\\%s", Entry->KernelAndKextPatches->ForceKexts[i], PlugInFile->FileName);
+ FileName = PoolPrint(L"%s\\%s", KernelAndKextPatches->ForceKexts[i], PlugInFile->FileName);
+ // snwprintf(FileName, 512, "%s\\%s", KernelAndKextPatches->ForceKexts[i], PlugInFile->FileName);
MsgLog(" Force kext: %ls\n", FileName);
- AddKext(Entry, Entry->Volume->RootDir, FileName, archCpuType);
+ AddKext( Volume->RootDir, FileName, archCpuType);
PlugIns = PoolPrint(L"%s\\Contents\\PlugIns", FileName);
// snwprintf(PlugIns, 512, "%s\\Contents\\PlugIns", FileName);
- LoadPlugInKexts(Entry, Entry->Volume->RootDir, PlugIns, archCpuType, TRUE);
+ LoadPlugInKexts(Volume->RootDir, PlugIns, archCpuType, TRUE);
FreePool(FileName);
FreePool(PlugIns);
}
DirIterClose(&PlugInIter);
} else {
- AddKext(Entry, Entry->Volume->RootDir, Entry->KernelAndKextPatches->ForceKexts[i], archCpuType);
- PlugIns = PoolPrint(L"%s\\Contents\\PlugIns", Entry->KernelAndKextPatches->ForceKexts[i]);
- // snwprintf(PlugIns, 512, "%s\\Contents\\PlugIns", Entry->KernelAndKextPatches->ForceKexts[i]);
- LoadPlugInKexts(Entry, Entry->Volume->RootDir, PlugIns, archCpuType, TRUE);
+ AddKext( Volume->RootDir, KernelAndKextPatches->ForceKexts[i], archCpuType);
+ PlugIns = PoolPrint(L"%s\\Contents\\PlugIns", KernelAndKextPatches->ForceKexts[i]);
+ // snwprintf(PlugIns, 512, "%s\\Contents\\PlugIns", KernelAndKextPatches->ForceKexts[i]);
+ LoadPlugInKexts(Volume->RootDir, PlugIns, archCpuType, TRUE);
FreePool(PlugIns);
}
}
@@ -427,18 +423,18 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
}
CHAR16 UniOSVersion[16];
- AsciiStrToUnicodeStrS(Entry->OSVersion, UniOSVersion, 16);
+ AsciiStrToUnicodeStrS(OSVersion, UniOSVersion, 16);
DBG("UniOSVersion == %ls\n", UniOSVersion);
CHAR16 UniShortOSVersion[6];
CHAR8 ShortOSVersion[6];
- if (AsciiOSVersionToUint64(Entry->OSVersion) < AsciiOSVersionToUint64("10.10")) {
+ if (AsciiOSVersionToUint64(OSVersion) < AsciiOSVersionToUint64("10.10")) {
// OSVersion that are earlier than 10.10(form: 10.x.y)
- AsciiStrnCpyS(ShortOSVersion, 6, Entry->OSVersion, 4);
- AsciiStrToUnicodeStrS(Entry->OSVersion, UniShortOSVersion, 5);
+ AsciiStrnCpyS(ShortOSVersion, 6, OSVersion, 4);
+ AsciiStrToUnicodeStrS(OSVersion, UniShortOSVersion, 5);
} else {
- AsciiStrnCpyS(ShortOSVersion, 6, Entry->OSVersion, 5);
- AsciiStrToUnicodeStrS(Entry->OSVersion, UniShortOSVersion, 6);
+ AsciiStrnCpyS(ShortOSVersion, 6, OSVersion, 5);
+ AsciiStrToUnicodeStrS(OSVersion, UniShortOSVersion, 6);
}
DBG("ShortOSVersion == %s\n", ShortOSVersion);
DBG("UniShortOSVersion == %ls\n", UniShortOSVersion);
@@ -446,14 +442,14 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
// syscl - allow specific load inject kext
// Clover/Kexts/Other is for general injection thus we need to scan both Other and OSVersion folder
if ((SrcDir = GetOtherKextsDir(TRUE)) != NULL) {
- AddKexts(Entry, SrcDir, L"Other", archCpuType);
+ AddKexts(SrcDir, L"Other", archCpuType);
FreePool(SrcDir);
} else {
DBG("GetOtherKextsDir(TRUE) return NULL\n");
}
// slice: CLOVER/kexts/Off keep disabled kext which can be allowed
if ((SrcDir = GetOtherKextsDir(FALSE)) != NULL) {
- AddKexts(Entry, SrcDir, L"Off", archCpuType);
+ AddKexts(SrcDir, L"Off", archCpuType);
FreePool(SrcDir);
} else {
DBG("GetOtherKextsDir(FALSE) return NULL\n");
@@ -468,13 +464,13 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
CHAR16 *DirPath;
OSAllVersionKextsDir = PoolPrint(L"%s\\kexts\\10", OEMPath);
// snwprintf(OSAllVersionKextsDir, sizeof(OSAllVersionKextsDir), "%s\\kexts\\10", OEMPath);
- AddKexts(Entry, OSAllVersionKextsDir, L"10", archCpuType);
+ AddKexts(OSAllVersionKextsDir, L"10", archCpuType);
FreePool(OSAllVersionKextsDir);
- if (OSTYPE_IS_OSX_INSTALLER(Entry->LoaderType)) {
+ if (OSTYPE_IS_OSX_INSTALLER(LoaderType)) {
DirName = PoolPrint(L"10_install");
// snwprintf(DirName, sizeof(DirName), "10_install");
- } else if (OSTYPE_IS_OSX_RECOVERY(Entry->LoaderType)) {
+ } else if (OSTYPE_IS_OSX_RECOVERY(LoaderType)) {
DirName = PoolPrint(L"10_recovery");
// snwprintf(DirName, sizeof(DirName), "10_recovery");
} else {
@@ -483,7 +479,7 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
}
DirPath = PoolPrint(L"%s\\kexts\\%s", OEMPath, DirName);
// snwprintf(DirPath, sizeof(DirPath), "%s\\kexts\\%s", OEMPath, DirName);
- AddKexts(Entry, DirPath, DirName, archCpuType);
+ AddKexts( DirPath, DirName, archCpuType);
FreePool(DirPath);
FreePool(DirName);
@@ -492,13 +488,13 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
OSShortVersionKextsDir = PoolPrint(L"%s\\kexts\\%s", OEMPath, UniShortOSVersion);
// snwprintf(OSShortVersionKextsDir, sizeof(OSShortVersionKextsDir), "%s\\kexts\\%s", OEMPath, UniShortOSVersion);
- AddKexts(Entry, OSShortVersionKextsDir, UniShortOSVersion, archCpuType);
+ AddKexts( OSShortVersionKextsDir, UniShortOSVersion, archCpuType);
FreePool(OSShortVersionKextsDir);
- if (OSTYPE_IS_OSX_INSTALLER(Entry->LoaderType)) {
+ if (OSTYPE_IS_OSX_INSTALLER(LoaderType)) {
DirName = PoolPrint(L"%s_install", UniShortOSVersion);
// snwprintf(DirName, sizeof(DirName), "%s_install", UniShortOSVersion);
- } else if (OSTYPE_IS_OSX_RECOVERY(Entry->LoaderType)) {
+ } else if (OSTYPE_IS_OSX_RECOVERY(LoaderType)) {
DirName = PoolPrint(L"%s_recovery", UniShortOSVersion);
// snwprintf(DirName, sizeof(DirName), "%s_recovery", UniShortOSVersion);
} else {
@@ -507,7 +503,7 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
}
DirPath = PoolPrint(L"%s\\kexts\\%s", OEMPath, DirName);
// snwprintf(DirPath, sizeof(DirPath), "%s\\kexts\\%s", OEMPath, DirName);
- AddKexts(Entry, DirPath, DirName, archCpuType);
+ AddKexts( DirPath, DirName, archCpuType);
FreePool(DirPath);
FreePool(DirName);
@@ -516,23 +512,23 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
// 10.{version}.0 if NO minor version
// 10.{version}.{minor version} if minor version is > 0
- if ( AsciiStrCmp(ShortOSVersion, Entry->OSVersion) == 0 ) {
- OSVersionKextsDirName = PoolPrint(L"%a.0", Entry->OSVersion);
- // snwprintf(OSVersionKextsDirName, sizeof(OSVersionKextsDirName), "%a.0", Entry->OSVersion);
+ if ( AsciiStrCmp(ShortOSVersion, OSVersion) == 0 ) {
+ OSVersionKextsDirName = PoolPrint(L"%a.0", OSVersion);
+ // snwprintf(OSVersionKextsDirName, sizeof(OSVersionKextsDirName), "%a.0", OSVersion);
} else {
- OSVersionKextsDirName = PoolPrint(L"%a", Entry->OSVersion);
- // snwprintf(OSVersionKextsDirName, sizeof(OSVersionKextsDirName), "%a", Entry->OSVersion);
+ OSVersionKextsDirName = PoolPrint(L"%a", OSVersion);
+ // snwprintf(OSVersionKextsDirName, sizeof(OSVersionKextsDirName), "%a", OSVersion);
}
DirPath = PoolPrint(L"%s\\kexts\\%s", OEMPath, OSVersionKextsDirName);
// snwprintf(DirPath, sizeof(DirPath), "%s\\kexts\\%s", OEMPath, OSVersionKextsDirName);
- AddKexts(Entry, DirPath, OSVersionKextsDirName, archCpuType);
+ AddKexts( DirPath, OSVersionKextsDirName, archCpuType);
FreePool(DirPath);
- if ( OSTYPE_IS_OSX_INSTALLER(Entry->LoaderType)) {
+ if ( OSTYPE_IS_OSX_INSTALLER(LoaderType)) {
DirName = PoolPrint(L"%s_install", OSVersionKextsDirName);
// snwprintf(DirName, sizeof(DirName), "%s_install", OSVersionKextsDirName);
- } else if (OSTYPE_IS_OSX_RECOVERY(Entry->LoaderType)) {
+ } else if (OSTYPE_IS_OSX_RECOVERY(LoaderType)) {
DirName = PoolPrint(L"%s_recovery", OSVersionKextsDirName);
// snwprintf(DirName, sizeof(DirName), "%s_recovery", OSVersionKextsDirName);
} else {
@@ -541,7 +537,7 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
}
DirPath = PoolPrint(L"%s\\kexts\\%s", OEMPath, DirName);
// snwprintf(DirPath, sizeof(DirPath), "%s\\kexts\\%s", OEMPath, DirName);
- AddKexts(Entry, DirPath, DirName, archCpuType);
+ AddKexts( DirPath, DirName, archCpuType);
FreePool(DirPath);
FreePool(DirName);
FreePool(OSVersionKextsDirName);
@@ -654,7 +650,7 @@ typedef struct {
#define MKEXT_SIGNATURE 0x58534f4d
#define MKEXT_VERSION_1 0x00800001
-int is_mkext_v1(LOADER_ENTRY *Entry, UINT8* drvPtr)
+int LOADER_ENTRY::is_mkext_v1(UINT8* drvPtr)
{
_DeviceTreeBuffer *dtb = (_DeviceTreeBuffer*) (((UINT8*)drvPtr) + sizeof(DeviceTreeNodeProperty));
MKextHeader* mkext_ptr = (MKextHeader*)(UINTN)(dtb->paddr);
@@ -662,13 +658,13 @@ int is_mkext_v1(LOADER_ENTRY *Entry, UINT8* drvPtr)
if (mkext_ptr->Magic == MKEXT_MAGIC
&& mkext_ptr->Signature == MKEXT_SIGNATURE
&& mkext_ptr->Version == MKEXT_VERSION_1) {
- DBG_RT(Entry, "MKext_v1 found at paddr=0x%08x, length=0x%08x\n", dtb->paddr, dtb->length);
+ DBG_RT("MKext_v1 found at paddr=0x%08x, length=0x%08x\n", dtb->paddr, dtb->length);
return 1;
}
return 0;
}
-void patch_mkext_v1(LOADER_ENTRY *Entry, UINT8 *drvPtr)
+void LOADER_ENTRY::patch_mkext_v1(UINT8 *drvPtr)
{
_DeviceTreeBuffer *dtb = (_DeviceTreeBuffer*) (((UINT8*)drvPtr) + sizeof(DeviceTreeNodeProperty));
MKextHeader* mkext_ptr = (MKextHeader*)(UINTN)dtb->paddr;
@@ -734,7 +730,7 @@ void patch_mkext_v1(LOADER_ENTRY *Entry, UINT8 *drvPtr)
////////////////////
// OnExitBootServices
////////////////////
-EFI_STATUS InjectKexts(/*IN EFI_MEMORY_DESCRIPTOR *Desc*/ IN UINT32 deviceTreeP, IN UINT32* deviceTreeLength, LOADER_ENTRY *Entry)
+EFI_STATUS LOADER_ENTRY::InjectKexts(IN UINT32 deviceTreeP, IN UINT32* deviceTreeLength)
{
UINT8 *dtEntry = (UINT8*)(UINTN) deviceTreeP;
UINTN dtLen = (UINTN) *deviceTreeLength;
@@ -761,16 +757,16 @@ EFI_STATUS InjectKexts(/*IN EFI_MEMORY_DESCRIPTOR *Desc*/ IN UINT32 deviceTreeP,
UINTN Index;
- DBG_RT(Entry, "\nInjectKexts: ");
+ DBG_RT("\nInjectKexts: ");
KextCount = GetKextCount();
if (KextCount == 0) {
- DBG_RT(Entry, "no kexts to inject.\nPausing 5 secs ...\n");
- if (Entry->KernelAndKextPatches->KPDebug) {
+ DBG_RT("no kexts to inject.\nPausing 5 secs ...\n");
+ if (KernelAndKextPatches->KPDebug) {
gBS->Stall(5000000);
}
return EFI_NOT_FOUND;
}
- DBG_RT(Entry, "%d kexts ...\n", KextCount);
+ DBG_RT("%d kexts ...\n", KextCount);
// kextsBase = Desc->PhysicalStart + (((UINTN) Desc->NumberOfPages) * EFI_PAGE_SIZE);
// kextsPages = EFI_SIZE_TO_PAGES(kext.length);
@@ -849,24 +845,23 @@ EFI_STATUS InjectKexts(/*IN EFI_MEMORY_DESCRIPTOR *Desc*/ IN UINT32 deviceTreeP,
drvPtr += sizeof(DeviceTreeNodeProperty) + sizeof(_DeviceTreeBuffer);
KextBase = RoundPage(KextBase + KextEntry->kext.length);
- DBG_RT(Entry, " %llu - %s\n", Index, (CHAR8 *)(UINTN)drvinfo->bundlePathPhysAddr);
+ DBG_RT(" %llu - %s\n", Index, (CHAR8 *)(UINTN)drvinfo->bundlePathPhysAddr);
if (gSettings.KextPatchesAllowed) {
INT32 i;
CHAR8 SavedValue;
CHAR8 *InfoPlist = (CHAR8*)(UINTN)drvinfo->infoDictPhysAddr;
SavedValue = InfoPlist[drvinfo->infoDictLength];
InfoPlist[drvinfo->infoDictLength] = '\0';
- KernelAndKextPatcherInit(Entry);
- for (i = 0; i < Entry->KernelAndKextPatches->NrKexts; i++) {
- if ((Entry->KernelAndKextPatches->KextPatches[i].DataLen > 0) &&
- (AsciiStrStr(InfoPlist, Entry->KernelAndKextPatches->KextPatches[i].Name) != NULL)) {
+ KernelAndKextPatcherInit();
+ for (i = 0; i < KernelAndKextPatches->NrKexts; i++) {
+ if ((KernelAndKextPatches->KextPatches[i].DataLen > 0) &&
+ (AsciiStrStr(InfoPlist, KernelAndKextPatches->KextPatches[i].Name) != NULL)) {
AnyKextPatch(
(UINT8*)(UINTN)drvinfo->executablePhysAddr,
drvinfo->executableLength,
InfoPlist,
drvinfo->infoDictLength,
- i,
- Entry
+ i
);
}
}
@@ -876,10 +871,8 @@ EFI_STATUS InjectKexts(/*IN EFI_MEMORY_DESCRIPTOR *Desc*/ IN UINT32 deviceTreeP,
}
}
- if (Entry->KernelAndKextPatches->KPDebug) {
- DBG_RT(Entry, "Done.\n");
- gBS->Stall(5000000);
- }
+ DBG_RT("Done.\n");
+ Stall(5000000);
return EFI_SUCCESS;
}
@@ -918,7 +911,7 @@ UINT8 KBELionReplaceEXT_X64[] = { 0xE8, 0x0C, 0xFD, 0xFF, 0xFF, 0x90, 0x90, 0
//
-VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
+VOID EFIAPI LOADER_ENTRY::KernelBooterExtensionsPatch(IN UINT8 *Kernel)
{
UINTN Num = 0;
UINTN NumSnow_i386_EXT = 0;
@@ -928,7 +921,7 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
UINT32 patchLocation2 = 0, patchLocation3 = 0;
UINT32 i, y;
- DBG_RT(Entry, "\nPatching kernel for injected kexts...\n");
+ DBG_RT("\nPatching kernel for injected kexts...\n");
if (is64BitKernel) {
NumSnow_X64_EXT = SearchAndCount(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_X64, sizeof(KBESnowSearchEXT_X64));
@@ -950,10 +943,10 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
if (is64BitKernel) {
if (NumSnow_X64_EXT == 1) {
Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_X64, sizeof(KBESnowSearchEXT_X64), KBESnowReplaceEXT_X64, 1);
- DBG_RT(Entry, "==> kernel Snow Leopard X64: %llu replaces done.\n", Num);
+ DBG_RT("==> kernel Snow Leopard X64: %llu replaces done.\n", Num);
} else if (NumLion_X64_EXT == 1) {
Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_X64, sizeof(KBELionSearchEXT_X64), KBELionReplaceEXT_X64, 1);
- DBG_RT(Entry, "==> kernel Lion X64: %llu replaces done.\n", Num);
+ DBG_RT("==> kernel Lion X64: %llu replaces done.\n", Num);
} else {
// EXT - load extra kexts besides kernelcache.
#if OLD_EXTRA_KEXT_PATCH
@@ -963,14 +956,14 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
if (Kernel[i+0] == 0x01 && Kernel[i+1] == 0x00 && Kernel[i+2] == 0x31 &&
Kernel[i+3] == 0xFF && Kernel[i+4] == 0xBE && Kernel[i+5] == 0x14 &&
Kernel[i+6] == 0x00 && Kernel[i+7] == 0x05) {
- DBG_RT(Entry, "==> found EXT Base (10.8 - recent macOS)\n");
+ DBG_RT("==> found EXT Base (10.8 - recent macOS)\n");
for (y = i; y < 0x1000000; y++) {
// E8 XX 00 00 00 EB XX XX
if (Kernel[y+0] == 0xE8 && Kernel[y+2] == 0x00 && Kernel[y+3] == 0x00 &&
Kernel[y+4] == 0x00 && Kernel[y+5] == 0xEB) {
//(Kernel[y+7] == 0x48 || Kernel[y+7] == 0xE8)) { // 48:10.8-10.9/E8:10.10+
patchLocation1 = y;
- DBG_RT(Entry, "==> found EXT (10.8 - recent macOS) at 0x%08x\n", patchLocation1);
+ DBG_RT("==> found EXT (10.8 - recent macOS) at 0x%08x\n", patchLocation1);
break;
}
}
@@ -979,12 +972,12 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
}
if (!patchLocation1) {
- DBG_RT(Entry, "==> can't find EXT (10.8 - recent macOS), kernel patch aborted.\n");
+ DBG_RT("==> can't find EXT (10.8 - recent macOS), kernel patch aborted.\n");
gBS->Stall(3000000);
}
if (patchLocation1) {
- DBG_RT(Entry, "==> patched EXT (10.8 - recent macOS)\n");
+ DBG_RT("==> patched EXT (10.8 - recent macOS) location=%x\n", patchLocation1);
for (i = 5; i < 7; i++) {
// E8 XX 00 00 00 EB XX XX
// E8 XX 00 00 00 90 90 XX
@@ -996,46 +989,61 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
UINTN procLocation = searchProc(Kernel, "readStartupExtensions", &procLen);
UINT8 findJmp[] = {0xEB, 0x05};
UINT8 patchJmp[] = {0x90, 0x90};
- if (!SearchAndReplace(Kernel + procLocation, 0x100, findJmp, 2, patchJmp, 1)) {
- DBG_RT(Entry, "load kexts not patched\n");
+ DBG_RT("==> procLocation=%llx\n", procLocation);
+ if (!SearchAndReplace(&Kernel[procLocation], 0x100, findJmp, 2, patchJmp, 1)) {
+ DBG_RT("load kexts not patched\n");
+ } else {
+ DBG_RT("load kexts patched\n");
}
+ Stall(9000000);
#endif
// SIP - bypass kext check by System Integrity Protection.
+ //TODO - what is this???
+ //the pattern found in __ZN6OSKext14loadExecutableEv: // OSKext::loadExecutable()
+// iMac2017:Catalina sergey$ ./FindMask kernel -p loadExecutable -e 1000 -f 488500740048000048,FFFF00FF00FF0000FF
+// descending
+// procedure at 7a1ed0, len = ffffffffffff4b50
+// proclen=4096, end=4096 startLen=0
+// found start at 0x7a1ed0
+// found pattern: 1
+// address: 007a29b7
+// bytes:4885c074224889c348
+
for (i = 0; i < 0x1000000; i++) {
// 45 31 FF 41 XX 01 00 00 DC 48
if (Kernel[i+0] == 0x45 && Kernel[i+1] == 0x31 && Kernel[i+3] == 0x41 &&
//(Kernel[i+4] == 0xBF || Kernel[i+4] == 0xBE) && // BF:10.11/BE:10.12+
Kernel[i+5] == 0x01 && Kernel[i+6] == 0x00 && Kernel[i+7] == 0x00 &&
Kernel[i+8] == 0xDC && Kernel[i+9] == 0x48) {
- DBG_RT(Entry, "==> found SIP Base (10.11 - recent macOS)\n");
- for (y = i; y < 0x1000000; y++) {
+ DBG_RT("==> found SIP Base (10.11 - recent macOS)\n");
+ for (y = i; y < 0x2000; y++) {
// 48 85 XX 74 XX 48 XX XX 48
if (Kernel[y+0] == 0x48 && Kernel[y+1] == 0x85 && Kernel[y+3] == 0x74 &&
Kernel[y+5] == 0x48 && Kernel[y+8] == 0x48) {
patchLocation2 = y;
- DBG_RT(Entry, "==> found SIP (10.11 - 10.14) at 0x%08x\n", patchLocation2);
+ DBG_RT("==> found SIP (10.11 - 10.14) at 0x%08x\n", patchLocation2);
break;
- // 00 85 C0 0F 84 XX 00 00 00 49
+ // 00 85 C0 0F 84 XX 00 00 00 49 //???? - not found in Catalina
} else if (Kernel[y+0] == 0x00 && Kernel[y+1] == 0x85 && Kernel[y+2] == 0xC0 &&
Kernel[y+3] == 0x0F && Kernel[y+4] == 0x84 && Kernel[y+9] == 0x49) {
patchLocation2 = y;
- DBG_RT(Entry, "==> found SIP (10.15 - recent macOS) at 0x%08x\n", patchLocation2);
+ DBG_RT("==> found SIP (10.15 - recent macOS) at 0x%08x\n", patchLocation2);
break;
}
}
break;
}
}
-
+ Stall(9000000);
if (!patchLocation2) {
- DBG_RT(Entry, "==> can't find SIP (10.11 - recent macOS), kernel patch aborted.\n");
- gBS->Stall(3000000);
+ DBG_RT("==> can't find SIP (10.11 - recent macOS), kernel patch aborted.\n");
+ Stall(3000000);
}
-
+ //Slice - looks like this patch is wrong for Catalina which kernel I have
if (patchLocation2) {
if (Kernel[patchLocation2 + 0] == 0x48 && Kernel[patchLocation2 + 1] == 0x85) {
Kernel[patchLocation2 + 3] = 0xEB;
- DBG_RT(Entry, "==> patched SIP (10.11 - 10.14)\n");
+ DBG_RT("==> patched SIP (10.11 - 10.14)\n");
if (Kernel[patchLocation2 + 4] == 0x6C) {
// 48 85 XX 74 6C 48 XX XX 48
// 48 85 XX EB 15 48 XX XX 48
@@ -1047,7 +1055,7 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
}
// PMheart
} else if (Kernel[patchLocation2 + 0] == 0x00 && Kernel[patchLocation2 + 1] == 0x85) {
- DBG_RT(Entry, "==> patched SIP (10.15 - recent macOS)\n");
+ DBG_RT("==> patched SIP (10.15 - recent macOS)\n");
for (i = 3; i < 9; i++) {
// 00 85 C0 0F 84 XX 00 00 00 49
// 00 85 C0 90 90 90 90 90 90 49
@@ -1055,7 +1063,7 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
}
}
}
-
+ Stall(9000000);
// KxldUnmap by vit9696
// Avoid race condition in OSKext::removeKextBootstrap when using booter kexts without keepsyms=1.
for (i = 0; i < 0x1000000; i++) {
@@ -1072,13 +1080,13 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
Kernel[i+12] == 0x83 && Kernel[i+13] == 0xEC && Kernel[i+14] == 0x30 &&
Kernel[i+15] == 0x48 && Kernel[i+16] == 0xC7 && Kernel[i+17] == 0x45 &&
Kernel[i+18] == 0xB8 && Kernel[i+53] == 0xFF && Kernel[i+64] == 0xFF && Kernel[i+65] == 0xFF) {
- DBG_RT(Entry, "==> found KxldUnmap Base (10.14 - recent macOS)\n");
+ DBG_RT("==> found KxldUnmap Base (10.14 - recent macOS)\n");
for (y = i; y < 0x1000000; y++) {
// 00 0F 85 XX XX 00 00 48
if (Kernel[y+0] == 0x00 && Kernel[y+1] == 0x0F && Kernel[y+2] == 0x85 &&
Kernel[y+5] == 0x00 && Kernel[y+6] == 0x00 && Kernel[y+7] == 0x48) {
patchLocation3 = y;
- DBG_RT(Entry, "==> found KxldUnmap (10.14 - recent macOS) at 0x%08x\n", patchLocation3);
+ DBG_RT("==> found KxldUnmap (10.14 - recent macOS) at 0x%08x\n", patchLocation3);
break;
}
}
@@ -1087,12 +1095,12 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
}
if (!patchLocation3) {
- DBG_RT(Entry, "==> can't find KxldUnmap (10.14 - recent macOS), kernel patch aborted.\n");
- gBS->Stall(3000000);
+ DBG_RT("==> can't find KxldUnmap (10.14 - recent macOS), kernel patch aborted.\n");
+ Stall(3000000);
}
if (patchLocation3) {
- DBG_RT(Entry, "==> patched KxldUnmap (10.14 - recent macOS)\n");
+ DBG_RT("==> patched KxldUnmap (10.14 - recent macOS)\n");
// 00 0F 85 XX XX 00 00 48
// 00 90 E9 XX XX 00 00 48
Kernel[patchLocation3 + 1] = 0x90;
@@ -1103,17 +1111,17 @@ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel, LOADER_ENTRY *Entry)
// i386
if (NumSnow_i386_EXT == 1) {
Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBESnowSearchEXT_i386, sizeof(KBESnowSearchEXT_i386), KBESnowReplaceEXT_i386, 1);
- DBG_RT(Entry, "==> kernel Snow Leopard i386: %llu replaces done.\n", Num);
+ DBG_RT("==> kernel Snow Leopard i386: %llu replaces done.\n", Num);
} else if (NumLion_i386_EXT == 1) {
Num = SearchAndReplace(Kernel, KERNEL_MAX_SIZE, KBELionSearchEXT_i386, sizeof(KBELionSearchEXT_i386), KBELionReplaceEXT_i386, 1);
- DBG_RT(Entry, "==> kernel Lion i386: %llu replaces done.\n", Num);
+ DBG_RT("==> kernel Lion i386: %llu replaces done.\n", Num);
} else {
- DBG_RT(Entry, "==> ERROR: NOT patched - unknown kernel.\n");
+ DBG_RT("==> ERROR: NOT patched - unknown kernel.\n");
}
}
- if (Entry->KernelAndKextPatches->KPDebug) {
- DBG_RT(Entry, "Pausing 5 secs ...\n");
- gBS->Stall(5000000);
+ if (KernelAndKextPatches->KPDebug) {
+ DBG_RT("Pausing 5 secs ...\n");
+ Stall(5000000);
}
}
diff --git a/rEFIt_UEFI/Platform/kext_inject.h b/rEFIt_UEFI/Platform/kext_inject.h
index 5134615a5..7169a46b4 100644
--- a/rEFIt_UEFI/Platform/kext_inject.h
+++ b/rEFIt_UEFI/Platform/kext_inject.h
@@ -90,9 +90,9 @@ typedef struct
// functions
////////////////////
class LOADER_ENTRY;
-EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry);
-EFI_STATUS InjectKexts(IN UINT32 deviceTreeP, IN UINT32* deviceTreeLength, LOADER_ENTRY *Entry);
+//EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry);
+//EFI_STATUS InjectKexts(IN UINT32 deviceTreeP, IN UINT32* deviceTreeLength, LOADER_ENTRY *Entry);
-VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *KernelData, LOADER_ENTRY *Entry);
+//VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *KernelData, LOADER_ENTRY *Entry);
-#endif
\ No newline at end of file
+#endif
diff --git a/rEFIt_UEFI/Platform/kext_patcher.cpp b/rEFIt_UEFI/Platform/kext_patcher.cpp
index 8980d744e..5a6b44965 100644
--- a/rEFIt_UEFI/Platform/kext_patcher.cpp
+++ b/rEFIt_UEFI/Platform/kext_patcher.cpp
@@ -23,7 +23,7 @@
#endif
// runtime debug
-#define DBG_RT(entry, ...) if ((entry != NULL) && (entry->KernelAndKextPatches != NULL) && entry->KernelAndKextPatches->KPDebug) { printf(__VA_ARGS__); }
+#define DBG_RT(...) if ((KernelAndKextPatches != NULL) && KernelAndKextPatches->KPDebug) { printf(__VA_ARGS__); }
//
// Searches Source for Search pattern of size SearchSize
@@ -56,6 +56,7 @@ UINTN SearchAndReplace(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINTN Se
{
UINTN NumReplaces = 0;
BOOLEAN NoReplacesRestriction = MaxReplaces <= 0;
+// UINT8 *Begin = Source;
UINT8 *End = Source + SourceSize;
if (!Source || !Search || !Replace || !SearchSize) {
return 0;
@@ -63,6 +64,7 @@ UINTN SearchAndReplace(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINTN Se
while ((Source < End) && (NoReplacesRestriction || (MaxReplaces > 0))) {
if (CompareMem(Source, Search, SearchSize) == 0) {
+ // printf(" found pattern at %llx\n", (UINTN)(Source - Begin));
CopyMem(Source, Replace, SearchSize);
NumReplaces++;
MaxReplaces--;
@@ -184,8 +186,8 @@ UINTN SearchAndReplaceTxt(UINT8 *Source, UINT64 SourceSize, UINT8 *Search, UINTN
if (!Pos) {
break;
}
- CopyMem (Pos, Replace, SearchSize);
- SetMem (Pos + SearchSize, Skip, 0x20); //fill skip places with spaces
+ CopyMem(Pos, Replace, SearchSize);
+ SetMem(Pos + SearchSize, Skip, 0x20); //fill skip places with spaces
NumReplaces++;
MaxReplaces--;
Source = FirstMatch + SearchSize + Skip;
@@ -281,7 +283,7 @@ CHAR8 ATIKextBundleId[2][64];
//
// Inits patcher: prepares ATIKextBundleIds.
//
-VOID ATIConnectorsPatchInit(LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::ATIConnectorsPatchInit()
{
//
// prepar boundle ids
@@ -292,13 +294,13 @@ VOID ATIConnectorsPatchInit(LOADER_ENTRY *Entry)
sizeof(ATIKextBundleId[0]),
"com.apple.kext.ATI%sController", // when it was AsciiSPrint, %a was used with KPATIConnectorsController which is CHAR16 ??? Result is printing stop at first char <= 255
//now it is CHAR8*
- Entry->KernelAndKextPatches->KPATIConnectorsController
+ KernelAndKextPatches->KPATIConnectorsController
);
// ML
snprintf(ATIKextBundleId[1],
sizeof(ATIKextBundleId[1]),
"com.apple.kext.AMD%sController", // when it was AsciiSPrint, %a was used with KPATIConnectorsController which is CHAR16 ??? Result is printing stop at first char <= 255
- Entry->KernelAndKextPatches->KPATIConnectorsController
+ KernelAndKextPatches->KPATIConnectorsController
);
ATIConnectorsPatchInited = TRUE;
@@ -311,16 +313,17 @@ VOID ATIConnectorsPatchInit(LOADER_ENTRY *Entry)
//
// Registers kexts that need force-load during WithKexts boot.
//
-VOID ATIConnectorsPatchRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_LIST *ForceLoadKexts, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::ATIConnectorsPatchRegisterKexts(void *FSInject_v, void *ForceLoadKexts_v)
{
-
+ FSINJECTION_PROTOCOL *FSInject = (FSINJECTION_PROTOCOL *)FSInject_v;
+ FSI_STRING_LIST *ForceLoadKexts = (FSI_STRING_LIST *)ForceLoadKexts_v;
// for future?
FSInject->AddStringToList(ForceLoadKexts,
- PoolPrint(L"\\AMD%aController.kext\\Contents\\Info.plist", Entry->KernelAndKextPatches->KPATIConnectorsController)
+ PoolPrint(L"\\AMD%aController.kext\\Contents\\Info.plist", KernelAndKextPatches->KPATIConnectorsController)
);
// Lion, ML, SnowLeo 10.6.7 2011 MBP
FSInject->AddStringToList(ForceLoadKexts,
- PoolPrint(L"\\ATI%aController.kext\\Contents\\Info.plist", Entry->KernelAndKextPatches->KPATIConnectorsController)
+ PoolPrint(L"\\ATI%aController.kext\\Contents\\Info.plist", KernelAndKextPatches->KPATIConnectorsController)
);
// SnowLeo
FSInject->AddStringToList(ForceLoadKexts, L"\\ATIFramebuffer.kext\\Contents\\Info.plist");
@@ -338,40 +341,38 @@ VOID ATIConnectorsPatchRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_
//
// Patch function.
//
-VOID ATIConnectorsPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::ATIConnectorsPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize)
{
UINTN Num = 0;
- DBG_RT(Entry, "\nATIConnectorsPatch: driverAddr = %s, driverSize = %x\nController = %s\n",
- Driver, DriverSize, Entry->KernelAndKextPatches->KPATIConnectorsController);
+ DBG_RT("\nATIConnectorsPatch: driverAddr = %s, driverSize = %x\nController = %s\n",
+ Driver, DriverSize, KernelAndKextPatches->KPATIConnectorsController);
ExtractKextBundleIdentifier(InfoPlist);
- DBG_RT(Entry, "Kext: %s\n", gKextBundleIdentifier);
+ DBG_RT("Kext: %s\n", gKextBundleIdentifier);
// number of occurences od Data should be 1
- Num = SearchAndCount(Driver, DriverSize, Entry->KernelAndKextPatches->KPATIConnectorsData, Entry->KernelAndKextPatches->KPATIConnectorsDataLen);
+ Num = SearchAndCount(Driver, DriverSize, KernelAndKextPatches->KPATIConnectorsData, KernelAndKextPatches->KPATIConnectorsDataLen);
if (Num > 1) {
// error message - shoud always be printed
printf("==> KPATIConnectorsData found %llu times in %s - skipping patching!\n", Num, gKextBundleIdentifier);
- gBS->Stall(5*1000000);
+ Stall(5*1000000);
return;
}
// patch
Num = SearchAndReplace(Driver,
DriverSize,
- Entry->KernelAndKextPatches->KPATIConnectorsData,
- Entry->KernelAndKextPatches->KPATIConnectorsDataLen,
- Entry->KernelAndKextPatches->KPATIConnectorsPatch,
+ KernelAndKextPatches->KPATIConnectorsData,
+ KernelAndKextPatches->KPATIConnectorsDataLen,
+ KernelAndKextPatches->KPATIConnectorsPatch,
1);
- if (Entry->KernelAndKextPatches->KPDebug) {
if (Num > 0) {
- DBG_RT(Entry, "==> patched %llu times!\n", Num);
+ DBG_RT("==> patched %llu times!\n", Num);
} else {
- DBG_RT(Entry, "==> NOT patched!\n");
+ DBG_RT("==> NOT patched!\n");
}
- gBS->Stall(5000000);
- }
+ Stall(5000000);
}
@@ -392,17 +393,17 @@ STATIC UINT8 MovlE2ToEcx[] = { 0xB9, 0xE2, 0x00, 0x00, 0x00 };
STATIC UINT8 MovE2ToCx[] = { 0x66, 0xB9, 0xE2, 0x00 };
STATIC UINT8 Wrmsr[] = { 0x0F, 0x30 };
-VOID AppleIntelCPUPMPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::AppleIntelCPUPMPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize)
{
UINTN Index1;
UINTN Index2;
UINTN Count = 0;
- DBG_RT(Entry, "\nAppleIntelCPUPMPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
- if (Entry->KernelAndKextPatches->KPDebug) {
+ DBG_RT("\nAppleIntelCPUPMPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
+ if (KernelAndKextPatches->KPDebug) {
ExtractKextBundleIdentifier(InfoPlist);
}
- DBG_RT(Entry, "Kext: %s\n", gKextBundleIdentifier);
+ DBG_RT("Kext: %s\n", gKextBundleIdentifier);
//TODO: we should scan only __text __TEXT
for (Index1 = 0; Index1 < DriverSize; Index1++) {
@@ -415,7 +416,7 @@ VOID AppleIntelCPUPMPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UI
Count++;
Driver[Index2] = 0x90;
Driver[Index2 + 1] = 0x90;
- DBG_RT(Entry, " %llu. patched at 0x%llx\n", Count, Index2);
+ DBG_RT(" %llu. patched at 0x%llx\n", Count, Index2);
break;
} else if ((Driver[Index2] == 0xC9 && Driver[Index2 + 1] == 0xC3) ||
(Driver[Index2] == 0x5D && Driver[Index2 + 1] == 0xC3) ||
@@ -434,7 +435,7 @@ VOID AppleIntelCPUPMPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UI
Count++;
Driver[Index2] = 0x90;
Driver[Index2 + 1] = 0x90;
- DBG_RT(Entry, " %llu. patched at 0x%llx\n", Count, Index2);
+ DBG_RT(" %llu. patched at 0x%llx\n", Count, Index2);
break;
} else if ((Driver[Index2] == 0xC9 && Driver[Index2 + 1] == 0xC3) ||
(Driver[Index2] == 0x5D && Driver[Index2 + 1] == 0xC3) ||
@@ -447,10 +448,8 @@ VOID AppleIntelCPUPMPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UI
}
}
}
- DBG_RT(Entry, "= %llu patches\n", Count);
- if (Entry->KernelAndKextPatches->KPDebug) {
- gBS->Stall(5000000);
- }
+ DBG_RT("= %llu patches\n", Count);
+ Stall(5000000);
}
@@ -488,7 +487,7 @@ STATIC UINT8 Moj4CataReplace[] = { 0xeb, 0x33, 0x0f, 0xb7 };
// we are planning to patch.
//
-VOID AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize)
{
UINTN Num = 0;
@@ -498,11 +497,11 @@ VOID AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 In
UINTN NumMavMoj3 = 0;
UINTN NumMoj4 = 0;
- DBG_RT(Entry, "\nAppleRTCPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
- if (Entry->KernelAndKextPatches->KPDebug) {
+ DBG_RT("\nAppleRTCPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
+ if (KernelAndKextPatches->KPDebug) {
ExtractKextBundleIdentifier(InfoPlist);
}
- DBG_RT(Entry, "Kext: %s\n", gKextBundleIdentifier);
+ DBG_RT("Kext: %s\n", gKextBundleIdentifier);
if (is64BitKernel) {
NumLion_X64 = SearchAndCount(Driver, DriverSize, LionSearch_X64, sizeof(LionSearch_X64));
@@ -518,31 +517,29 @@ VOID AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 In
// and we'll skip it
printf("AppleRTCPatch: ERROR: multiple patterns found (LionX64: %llu, Lioni386: %llu, ML: %llu, MavMoj3: %llu, Moj4: %llu) - skipping patching!\n",
NumLion_X64, NumLion_i386, NumML, NumMavMoj3, NumMoj4);
- gBS->Stall(5000000);
+ Stall(5000000);
return;
}
if (NumLion_X64 == 1) {
Num = SearchAndReplace(Driver, DriverSize, LionSearch_X64, sizeof(LionSearch_X64), LionReplace_X64, 1);
- DBG_RT(Entry, "==> Lion X64: %llu replaces done.\n", Num);
+ DBG_RT("==> Lion X64: %llu replaces done.\n", Num);
} else if (NumLion_i386 == 1) {
Num = SearchAndReplace(Driver, DriverSize, LionSearch_i386, sizeof(LionSearch_i386), LionReplace_i386, 1);
- DBG_RT(Entry, "==> Lion i386: %llu replaces done.\n", Num);
+ DBG_RT("==> Lion i386: %llu replaces done.\n", Num);
} else if (NumML == 1) {
Num = SearchAndReplace(Driver, DriverSize, MLSearch, sizeof(MLSearch), MLReplace, 1);
- DBG_RT(Entry, "==> MountainLion X64: %llu replaces done.\n", Num);
+ DBG_RT("==> MountainLion X64: %llu replaces done.\n", Num);
} else if (NumMavMoj3 == 1) {
Num = SearchAndReplace(Driver, DriverSize, MavMoj3Search, sizeof(MavMoj3Search), MavMoj3Replace, 1);
- DBG_RT(Entry, "==> Mav/Yos/El/Sie/HS/Moj3 X64: %llu replaces done.\n", Num);
+ DBG_RT("==> Mav/Yos/El/Sie/HS/Moj3 X64: %llu replaces done.\n", Num);
} else if (NumMoj4 == 1) {
Num = SearchAndReplace(Driver, DriverSize, Moj4CataSearch, sizeof(Moj4CataSearch), Moj4CataReplace, 1);
- DBG_RT(Entry, "==> Mojave4 X64: %llu replaces done.\n", Num);
+ DBG_RT("==> Mojave4 X64: %llu replaces done.\n", Num);
} else {
- DBG_RT(Entry, "==> Patterns not found - patching NOT done.\n");
- }
- if (Entry->KernelAndKextPatches->KPDebug) {
- gBS->Stall(5000000);
+ DBG_RT("==> Patterns not found - patching NOT done.\n");
}
+ Stall(5000000);
}
@@ -553,19 +550,17 @@ VOID AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 In
// disable kext injection InjectKexts()
//
// not used since 4242
-VOID CheckForFakeSMC(CHAR8 *InfoPlist, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::CheckForFakeSMC(CHAR8 *InfoPlist)
{
- if (OSFLAG_ISSET(Entry->Flags, OSFLAG_CHECKFAKESMC) &&
- OSFLAG_ISSET(Entry->Flags, OSFLAG_WITHKEXTS)) {
+ if (OSFLAG_ISSET(Flags, OSFLAG_CHECKFAKESMC) &&
+ OSFLAG_ISSET(Flags, OSFLAG_WITHKEXTS)) {
if (AsciiStrStr(InfoPlist, "org.netkas.driver.FakeSMC") != NULL
|| AsciiStrStr(InfoPlist, "org.netkas.FakeSMC") != NULL
|| AsciiStrStr(InfoPlist, "as.vit9696.VirtualSMC") != NULL)
{
- Entry->Flags = OSFLAG_UNSET(Entry->Flags, OSFLAG_WITHKEXTS);
- if (Entry->KernelAndKextPatches->KPDebug) {
- DBG_RT(Entry, "\nFakeSMC or VirtualSMC found, UNSET WITHKEXTS\n");
- gBS->Stall(5000000);
- }
+ Flags = OSFLAG_UNSET(Flags, OSFLAG_WITHKEXTS);
+ DBG_RT("\nFakeSMC or VirtualSMC found, UNSET WITHKEXTS\n");
+ Stall(5000000);
}
}
}
@@ -588,41 +583,38 @@ STATIC UINT8 DELL_SMBIOS_GUID_Replace[] = { 0x45, 0x42, 0x39, 0x44, 0x32, 0x44
// all computers even though Apple.Inc should obey the rule
// that's why we can be so confident to write patch pattern this way - syscl
//
-VOID DellSMBIOSPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::DellSMBIOSPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize)
{
- //
- // syscl
- // Note, smbios truncate issue only affects Broadwell platform and platform
- // later than Broadwell thus we don't need to consider OS versinos earlier
- // than Yosemite, they are all pure 64bit platforms
- //
- UINTN gPatchCount = 0;
-
- DBG_RT(Entry, "\nDellSMBIOSPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
- if (Entry->KernelAndKextPatches->KPDebug)
- {
- ExtractKextBundleIdentifier(InfoPlist);
- }
- DBG_RT(Entry, "Kext: %s\n", gKextBundleIdentifier);
-
- //
- // now, let's patch it!
- //
- gPatchCount = SearchAndReplace(Driver, DriverSize, DELL_SMBIOS_GUID_Search, sizeof(DELL_SMBIOS_GUID_Search), DELL_SMBIOS_GUID_Replace, 1);
-
- if (gPatchCount == 1)
- {
- DBG_RT(Entry, "==> AppleSMBIOS: %llu replaces done.\n", gPatchCount);
- }
- else
- {
- DBG_RT(Entry, "==> Patterns not found - patching NOT done.\n");
- }
-
- if (Entry->KernelAndKextPatches->KPDebug)
- {
- gBS->Stall(5000000);
- }
+ //
+ // syscl
+ // Note, smbios truncate issue only affects Broadwell platform and platform
+ // later than Broadwell thus we don't need to consider OS versinos earlier
+ // than Yosemite, they are all pure 64bit platforms
+ //
+ UINTN gPatchCount = 0;
+
+ DBG_RT("\nDellSMBIOSPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
+ if (KernelAndKextPatches->KPDebug)
+ {
+ ExtractKextBundleIdentifier(InfoPlist);
+ }
+ DBG_RT("Kext: %s\n", gKextBundleIdentifier);
+
+ //
+ // now, let's patch it!
+ //
+ gPatchCount = SearchAndReplace(Driver, DriverSize, DELL_SMBIOS_GUID_Search, sizeof(DELL_SMBIOS_GUID_Search), DELL_SMBIOS_GUID_Replace, 1);
+
+ if (gPatchCount >= 1)
+ {
+ DBG_RT("==> AppleSMBIOS: %llu replaces done.\n", gPatchCount);
+ }
+ else
+ {
+ DBG_RT("==> Patterns not found - patching NOT done.\n");
+ }
+
+ Stall(5000000);
}
@@ -632,17 +624,17 @@ VOID DellSMBIOSPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
// SNBE_AICPUPatch implemented by syscl
// Fix AppleIntelCPUPowerManagement on SandyBridge-E (c) omni, stinga11
//
-VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize)
{
UINT32 i;
- UINT64 os_ver = AsciiOSVersionToUint64(Entry->OSVersion);
+ UINT64 os_ver = AsciiOSVersionToUint64(OSVersion);
- DBG_RT(Entry, "\nSNBE_AICPUPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
- if (Entry->KernelAndKextPatches->KPDebug) {
+ DBG_RT("\nSNBE_AICPUPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
+ if (KernelAndKextPatches->KPDebug) {
ExtractKextBundleIdentifier(InfoPlist);
}
- DBG_RT(Entry, "Kext: %s\n", gKextBundleIdentifier);
+ DBG_RT("Kext: %s\n", gKextBundleIdentifier);
// now let's patch it
if (os_ver < AsciiOSVersionToUint64("10.9") || os_ver >= AsciiOSVersionToUint64("10.14")) {
@@ -886,9 +878,7 @@ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
}
}
- if (Entry->KernelAndKextPatches->KPDebug) {
- gBS->Stall(5000000);
- }
+ Stall(5000000);
}
@@ -910,17 +900,17 @@ STATIC UINT8 BroadwellE_IOPCI_Repl_SieHS[] = { 0x48, 0x81, 0xFB, 0x00, 0x00, 0
STATIC UINT8 BroadwellE_IOPCI_Find_MojCata[] = { 0x48, 0x3D, 0x00, 0x00, 0x00, 0x40 };
STATIC UINT8 BroadwellE_IOPCI_Repl_MojCata[] = { 0x48, 0x3D, 0x00, 0x00, 0x00, 0x80 };
-VOID BDWE_IOPCIPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::BDWE_IOPCIPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize)
{
UINTN count = 0;
- UINT64 os_ver = AsciiOSVersionToUint64(Entry->OSVersion);
+ UINT64 os_ver = AsciiOSVersionToUint64(OSVersion);
- DBG_RT(Entry, "\nBDWE_IOPCIPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
- if (Entry->KernelAndKextPatches->KPDebug) {
+ DBG_RT("\nBDWE_IOPCIPatch: driverAddr = %s, driverSize = %x\n", Driver, DriverSize);
+ if (KernelAndKextPatches->KPDebug) {
ExtractKextBundleIdentifier(InfoPlist);
}
- DBG_RT(Entry, "Kext: %s\n", gKextBundleIdentifier);
+ DBG_RT("Kext: %s\n", gKextBundleIdentifier);
//
// now, let's patch it!
//
@@ -934,14 +924,12 @@ VOID BDWE_IOPCIPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
}
if (count) {
- DBG_RT(Entry, "==> IOPCIFamily: %llu replaces done.\n", count);
+ DBG_RT("==> IOPCIFamily: %llu replaces done.\n", count);
} else {
- DBG_RT(Entry, "==> Patterns not found - patching NOT done.\n");
+ DBG_RT("==> Patterns not found - patching NOT done.\n");
}
- if (Entry->KernelAndKextPatches->KPDebug) {
- gBS->Stall(5000000);
- }
+ Stall(5000000);
}
@@ -960,102 +948,102 @@ VOID BDWE_IOPCIPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32
// Generic kext patch functions
//
//
-VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, INT32 N, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, INT32 N)
{
UINTN Num = 0;
INTN Ind;
- DBG_RT(Entry, "\nAnyKextPatch %d: driverAddr = %s, driverSize = %x\nAnyKext = %s\n",
- N, Driver, DriverSize, Entry->KernelAndKextPatches->KextPatches[N].Label);
+ DBG_RT("\nAnyKextPatch %d: driverAddr = %s, driverSize = %x\nAnyKext = %s\n",
+ N, Driver, DriverSize, KernelAndKextPatches->KextPatches[N].Label);
- if (!Entry->KernelAndKextPatches->KextPatches[N].MenuItem.BValue) {
- DBG_RT(Entry, "==> DISABLED!\n");
+ if (!KernelAndKextPatches->KextPatches[N].MenuItem.BValue) {
+ DBG_RT("==> DISABLED!\n");
return;
}
- if (!Entry->KernelAndKextPatches->KextPatches[N].SearchLen ||
- (Entry->KernelAndKextPatches->KextPatches[N].SearchLen > DriverSize)) {
- Entry->KernelAndKextPatches->KextPatches[N].SearchLen = DriverSize;
+ if (!KernelAndKextPatches->KextPatches[N].SearchLen ||
+ (KernelAndKextPatches->KextPatches[N].SearchLen > DriverSize)) {
+ KernelAndKextPatches->KextPatches[N].SearchLen = DriverSize;
}
- if (Entry->KernelAndKextPatches->KPDebug) {
+ if (KernelAndKextPatches->KPDebug) {
ExtractKextBundleIdentifier(InfoPlist);
}
- DBG_RT(Entry, "Kext: %s\n", gKextBundleIdentifier);
+ DBG_RT("Kext: %s\n", gKextBundleIdentifier);
- if (!Entry->KernelAndKextPatches->KextPatches[N].IsPlistPatch) {
+ if (!KernelAndKextPatches->KextPatches[N].IsPlistPatch) {
// kext binary patch
- DBG_RT(Entry, "Binary patch\n");
+ DBG_RT("Binary patch\n");
bool once = false;
UINTN procLen = 0;
- UINTN procAddr = searchProc(Driver, Entry->KernelAndKextPatches->KextPatches[N].ProcedureName, &procLen);
+ UINTN procAddr = searchProc(Driver, KernelAndKextPatches->KextPatches[N].ProcedureName, &procLen);
- if (Entry->KernelAndKextPatches->KextPatches[N].SearchLen == 0) {
- Entry->KernelAndKextPatches->KextPatches[N].SearchLen = DriverSize;
+ if (KernelAndKextPatches->KextPatches[N].SearchLen == 0) {
+ KernelAndKextPatches->KextPatches[N].SearchLen = DriverSize;
if (procLen > DriverSize) {
procLen = DriverSize - procAddr;
once = true;
}
} else {
- procLen = Entry->KernelAndKextPatches->KextPatches[N].SearchLen;
+ procLen = KernelAndKextPatches->KextPatches[N].SearchLen;
}
UINT8 * curs = &Driver[procAddr];
UINTN j = 0;
while (j < DriverSize) {
- if (!Entry->KernelAndKextPatches->KextPatches[N].StartPattern || //old behavior
+ if (!KernelAndKextPatches->KextPatches[N].StartPattern || //old behavior
CompareMemMask(curs,
- Entry->KernelAndKextPatches->KextPatches[N].StartPattern,
- Entry->KernelAndKextPatches->KextPatches[N].StartMask,
- Entry->KernelAndKextPatches->KextPatches[N].StartPatternLen)) {
- DBG_RT(Entry, " StartPattern found\n");
+ KernelAndKextPatches->KextPatches[N].StartPattern,
+ KernelAndKextPatches->KextPatches[N].StartMask,
+ KernelAndKextPatches->KextPatches[N].StartPatternLen)) {
+ DBG_RT(" StartPattern found\n");
Num = SearchAndReplaceMask(Driver,
procLen,
- Entry->KernelAndKextPatches->KextPatches[N].Data,
- Entry->KernelAndKextPatches->KextPatches[N].MaskFind,
- Entry->KernelAndKextPatches->KextPatches[N].DataLen,
- Entry->KernelAndKextPatches->KextPatches[N].Patch,
- Entry->KernelAndKextPatches->KextPatches[N].MaskReplace,
+ KernelAndKextPatches->KextPatches[N].Data,
+ KernelAndKextPatches->KextPatches[N].MaskFind,
+ KernelAndKextPatches->KextPatches[N].DataLen,
+ KernelAndKextPatches->KextPatches[N].Patch,
+ KernelAndKextPatches->KextPatches[N].MaskReplace,
-1);
if (Num) {
- curs += Entry->KernelAndKextPatches->KextPatches[N].SearchLen - 1;
- j += Entry->KernelAndKextPatches->KextPatches[N].SearchLen - 1;
+ curs += KernelAndKextPatches->KextPatches[N].SearchLen - 1;
+ j += KernelAndKextPatches->KextPatches[N].SearchLen - 1;
}
}
if (once ||
- !Entry->KernelAndKextPatches->KextPatches[N].StartPattern ||
- !Entry->KernelAndKextPatches->KextPatches[N].StartPatternLen) {
+ !KernelAndKextPatches->KextPatches[N].StartPattern ||
+ !KernelAndKextPatches->KextPatches[N].StartPatternLen) {
break;
}
j++; curs++;
}
} else {
// Info plist patch
- DBG_RT(Entry, "Info.plist data : '");
- for (Ind = 0; Ind < Entry->KernelAndKextPatches->KextPatches[N].DataLen; Ind++) {
- DBG_RT(Entry, "%c", Entry->KernelAndKextPatches->KextPatches[N].Data[Ind]);
+ DBG_RT("Info.plist data : '");
+ for (Ind = 0; Ind < KernelAndKextPatches->KextPatches[N].DataLen; Ind++) {
+ DBG_RT("%c", KernelAndKextPatches->KextPatches[N].Data[Ind]);
}
- DBG_RT(Entry, "' ->\n");
- DBG_RT(Entry, "Info.plist patch: '");
- for (Ind = 0; Ind < Entry->KernelAndKextPatches->KextPatches[N].DataLen; Ind++) {
- DBG_RT(Entry, "%c", Entry->KernelAndKextPatches->KextPatches[N].Patch[Ind]);
+ DBG_RT("' ->\n");
+ DBG_RT("Info.plist patch: '");
+ for (Ind = 0; Ind < KernelAndKextPatches->KextPatches[N].DataLen; Ind++) {
+ DBG_RT("%c", KernelAndKextPatches->KextPatches[N].Patch[Ind]);
}
- DBG_RT(Entry, "' \n");
+ DBG_RT("' \n");
Num = SearchAndReplaceTxt((UINT8*)InfoPlist,
InfoPlistSize,
- Entry->KernelAndKextPatches->KextPatches[N].Data,
- Entry->KernelAndKextPatches->KextPatches[N].DataLen,
- Entry->KernelAndKextPatches->KextPatches[N].Patch,
+ KernelAndKextPatches->KextPatches[N].Data,
+ KernelAndKextPatches->KextPatches[N].DataLen,
+ KernelAndKextPatches->KextPatches[N].Patch,
-1);
}
- if (Entry->KernelAndKextPatches->KPDebug) {
+ if (KernelAndKextPatches->KPDebug) {
if (Num > 0) {
- DBG_RT(Entry, "==> patched %llu times!\n", Num);
+ DBG_RT("==> patched %llu times!\n", Num);
} else {
- DBG_RT(Entry, "==> NOT patched!\n");
+ DBG_RT("==> NOT patched!\n");
}
gBS->Stall(2000000);
}
@@ -1065,109 +1053,94 @@ VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 Inf
// Called from SetFSInjection(), before boot.efi is started,
// to allow patchers to prepare FSInject to force load needed kexts.
//
-VOID KextPatcherRegisterKexts(FSINJECTION_PROTOCOL *FSInject, FSI_STRING_LIST *ForceLoadKexts, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::KextPatcherRegisterKexts(void *FSInject_v, void *ForceLoadKexts)
{
- INTN i;
-
- if (Entry->KernelAndKextPatches->KPATIConnectorsController != NULL) {
- ATIConnectorsPatchRegisterKexts(FSInject, ForceLoadKexts, Entry);
+ FSINJECTION_PROTOCOL *FSInject = (FSINJECTION_PROTOCOL *)FSInject_v;
+ if (KernelAndKextPatches->KPATIConnectorsController != NULL) {
+ ATIConnectorsPatchRegisterKexts(FSInject_v, ForceLoadKexts);
}
- for (i = 0; i < Entry->KernelAndKextPatches->NrKexts; i++) {
- FSInject->AddStringToList(ForceLoadKexts,
+ for (INTN i = 0; i < KernelAndKextPatches->NrKexts; i++) {
+ FSInject->AddStringToList((FSI_STRING_LIST*)ForceLoadKexts,
PoolPrint(L"\\%a.kext\\Contents\\Info.plist",
- Entry->KernelAndKextPatches->KextPatches[i].Name) );
+ KernelAndKextPatches->KextPatches[i].Name) );
}
-
}
//
// PatchKext is called for every kext from prelinked kernel (kernelcache) or from DevTree (booting with drivers).
// Add kext detection code here and call kext specific patch function.
//
-VOID PatchKext(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::PatchKext(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize)
{
- INT32 i;
-
- if (Entry->KernelAndKextPatches->KPATIConnectorsController != NULL) {
+ if (KernelAndKextPatches->KPATIConnectorsController != NULL) {
//
// ATIConnectors
//
if (!ATIConnectorsPatchInited) {
- ATIConnectorsPatchInit(Entry);
+ ATIConnectorsPatchInit();
}
if ( AsciiStrStr(InfoPlist, ATIKextBundleId[0]) != NULL // ATI boundle id
|| AsciiStrStr(InfoPlist, ATIKextBundleId[1]) != NULL // AMD boundle id
|| AsciiStrStr(InfoPlist, "com.apple.kext.ATIFramebuffer") != NULL // SnowLeo
|| AsciiStrStr(InfoPlist, "com.apple.kext.AMDFramebuffer") != NULL //Maverics
) {
- ATIConnectorsPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, Entry);
+ ATIConnectorsPatch(Driver, DriverSize, InfoPlist, InfoPlistSize);
return;
}
}
ExtractKextBundleIdentifier(InfoPlist);
- if (Entry->KernelAndKextPatches->KPAppleIntelCPUPM &&
+ if (KernelAndKextPatches->KPAppleIntelCPUPM &&
(AsciiStrStr(InfoPlist,
"com.apple.driver.AppleIntelCPUPowerManagement") != NULL)) {
//
// AppleIntelCPUPM
//
- AppleIntelCPUPMPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, Entry);
- } else if (Entry->KernelAndKextPatches->KPAppleRTC &&
+ AppleIntelCPUPMPatch(Driver, DriverSize, InfoPlist, InfoPlistSize);
+ } else if (KernelAndKextPatches->KPAppleRTC &&
(AsciiStrStr(InfoPlist, "com.apple.driver.AppleRTC") != NULL)) {
//
// AppleRTC
//
- AppleRTCPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, Entry);
- } else if (Entry->KernelAndKextPatches->KPDELLSMBIOS &&
+ AppleRTCPatch(Driver, DriverSize, InfoPlist, InfoPlistSize);
+ } else if (KernelAndKextPatches->KPDELLSMBIOS &&
(AsciiStrStr(InfoPlist, "com.apple.driver.AppleSMBIOS") != NULL)) {
//
// DellSMBIOSPatch
//
- DBG_RT(Entry, "Remap SMBIOS Table require, AppleSMBIOS...\n");
- DellSMBIOSPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, Entry);
- } else if (Entry->KernelAndKextPatches->KPDELLSMBIOS &&
+ DBG_RT("Remap SMBIOS Table require, AppleSMBIOS...\n");
+ DellSMBIOSPatch(Driver, DriverSize, InfoPlist, InfoPlistSize);
+ } else if (KernelAndKextPatches->KPDELLSMBIOS &&
(AsciiStrStr(InfoPlist, "com.apple.driver.AppleACPIPlatform") != NULL)) {
//
// DellSMBIOS
//
// AppleACPIPlatform
//
- DellSMBIOSPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, Entry);
+ DellSMBIOSPatch(Driver, DriverSize, InfoPlist, InfoPlistSize);
} else if (gBDWEIOPCIFixRequire && (AsciiStrStr(InfoPlist, "com.apple.iokit.IOPCIFamily") != NULL)) {
//
- // Braodwell-E IOPCIFamily Patch
+ // Broadwell-E IOPCIFamily Patch
//
- BDWE_IOPCIPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, Entry);
+ BDWE_IOPCIPatch(Driver, DriverSize, InfoPlist, InfoPlistSize);
} else if (gSNBEAICPUFixRequire && (AsciiStrStr(InfoPlist, "com.apple.driver.AppleIntelCPUPowerManagement") != NULL)) {
//
// SandyBridge-E AppleIntelCPUPowerManagement Patch implemented by syscl
//
- SNBE_AICPUPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, Entry);
+ SNBE_AICPUPatch(Driver, DriverSize, InfoPlist, InfoPlistSize);
}
- //else {
- //
- //others
- //
- for (i = 0; i < Entry->KernelAndKextPatches->NrKexts; i++) {
- CHAR8 *Name = Entry->KernelAndKextPatches->KextPatches[i].Name;
+ for (INT32 i = 0; i < KernelAndKextPatches->NrKexts; i++) {
+ CHAR8 *Name = KernelAndKextPatches->KextPatches[i].Name;
BOOLEAN isBundle = (AsciiStrStr(Name, ".") != NULL);
- if ((Entry->KernelAndKextPatches->KextPatches[i].DataLen > 0) &&
+ if ((KernelAndKextPatches->KextPatches[i].DataLen > 0) &&
isBundle?(AsciiStrCmp(gKextBundleIdentifier, Name) == 0):(AsciiStrStr(gKextBundleIdentifier, Name) != NULL)) {
- // (AsciiStrStr(InfoPlist, Entry->KernelAndKextPatches->KextPatches[i].Name) != NULL)) {
- DBG_RT(Entry, "\n\nPatch kext: %s\n", Entry->KernelAndKextPatches->KextPatches[i].Name);
- AnyKextPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, i, Entry);
+ // (AsciiStrStr(InfoPlist, KernelAndKextPatches->KextPatches[i].Name) != NULL)) {
+ DBG_RT("\n\nPatch kext: %s\n", KernelAndKextPatches->KextPatches[i].Name);
+ AnyKextPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, i);
}
}
-// }
-
- //
- // Check for FakeSMC (InjectKexts if no FakeSMC)
- //
- // apianti - Why recheck individual info plist if we checked the whole prelinked
- // CheckForFakeSMC(InfoPlist, Entry);
}
//
@@ -1325,7 +1298,7 @@ UINT64 GetPlistHexValue(CONST CHAR8 *Plist, CONST CHAR8 *Key, CONST CHAR8 *Whole
// ...
//
// ...
-VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::PatchPrelinkedKexts()
{
CHAR8 *WholePlist;
CHAR8 *DictPtr;
@@ -1354,7 +1327,7 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
//Slice
// I see no reason to disable kext injection if FakeSMC found in cache
//since rev4240 we have manual kext inject disable
- CheckForFakeSMC(WholePlist, Entry);
+ CheckForFakeSMC(WholePlist);
DictPtr = WholePlist;
while ((DictPtr = AsciiStrStr(DictPtr, "dict>")) != NULL) {
@@ -1401,8 +1374,7 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
(UINT8*)(UINTN)KextAddr,
KextSize,
InfoPlistStart,
- (UINT32)(InfoPlistEnd - InfoPlistStart),
- Entry
+ (UINT32)(InfoPlistEnd - InfoPlistStart)
);
// return saved char
@@ -1419,7 +1391,7 @@ VOID PatchPrelinkedKexts(LOADER_ENTRY *Entry)
// Iterates over kexts loaded by booter
// and calls PatchKext() for each.
//
-VOID PatchLoadedKexts(LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::PatchLoadedKexts()
{
DTEntry MMEntry;
_BooterKextFileInfo *KextFileInfo;
@@ -1461,8 +1433,7 @@ VOID PatchLoadedKexts(LOADER_ENTRY *Entry)
(UINT8*)(UINTN)KextFileInfo->executablePhysAddr,
KextFileInfo->executableLength,
InfoPlist,
- KextFileInfo->infoDictLength,
- Entry
+ KextFileInfo->infoDictLength
);
InfoPlist[KextFileInfo->infoDictLength] = SavedValue;
@@ -1482,20 +1453,16 @@ VOID PatchLoadedKexts(LOADER_ENTRY *Entry)
// Will iterate through kext in prelinked kernel (kernelcache)
// or DevTree (drivers boot) and do patches.
//
-VOID KextPatcherStart(LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::KextPatcherStart()
{
if (isKernelcache) {
- DBG_RT(Entry, "Patching kernelcache ...\n");
- if (Entry->KernelAndKextPatches->KPDebug) {
- gBS->Stall(2000000);
- }
- PatchPrelinkedKexts(Entry);
+ DBG_RT("Patching kernelcache ...\n");
+ Stall(2000000);
+ PatchPrelinkedKexts();
} else {
- DBG_RT(Entry, "Patching loaded kexts ...\n");
- if (Entry->KernelAndKextPatches->KPDebug) {
- gBS->Stall(2000000);
- }
- PatchLoadedKexts(Entry);
+ DBG_RT("Patching loaded kexts ...\n");
+ Stall(2000000);
+ PatchLoadedKexts();
}
}
diff --git a/rEFIt_UEFI/Platform/platformdata.cpp b/rEFIt_UEFI/Platform/platformdata.cpp
index 442261c08..af3228fb1 100644
--- a/rEFIt_UEFI/Platform/platformdata.cpp
+++ b/rEFIt_UEFI/Platform/platformdata.cpp
@@ -1306,8 +1306,8 @@ VOID SetDMISettingsForModel(MACHINE_TYPES Model, BOOLEAN Redefine)
break;
}
}
- CopyMem (gSettings.REV, ApplePlatformData[Model].smcRevision, 6);
- CopyMem (gSettings.EPCI, &ApplePlatformData[Model].smcConfig, 4);
+ CopyMem(gSettings.REV, ApplePlatformData[Model].smcRevision, 6);
+ CopyMem(gSettings.EPCI, &ApplePlatformData[Model].smcConfig, 4);
}
MACHINE_TYPES GetModelFromString(CHAR8 *ProductName)
@@ -1348,9 +1348,9 @@ VOID GetDefaultSettings()
((gGraphics[1].Vendor == Nvidia) && (gGraphics[1].Family < 0xE0)));
gSettings.GraphicsInjector = gSettings.InjectATI || gSettings.InjectNVidia;
- CopyMem (gSettings.NVCAP, default_NVCAP, 20);
- CopyMem (gSettings.Dcfg, default_dcfg_0, 4);
- CopyMem (&gSettings.Dcfg[4], default_dcfg_1, 4);
+ CopyMem(gSettings.NVCAP, default_NVCAP, 20);
+ CopyMem(gSettings.Dcfg, default_dcfg_0, 4);
+ CopyMem(&gSettings.Dcfg[4], default_dcfg_1, 4);
//gSettings.CustomEDID = NULL; //no sense to assign 0 as the structure is zeroed
gSettings.DualLink = 0xA; // A(auto): DualLink auto-detection
gSettings.HDAInjection = FALSE;
diff --git a/rEFIt_UEFI/Platform/smbios.cpp b/rEFIt_UEFI/Platform/smbios.cpp
index 8c99cca3a..4b45f6759 100644
--- a/rEFIt_UEFI/Platform/smbios.cpp
+++ b/rEFIt_UEFI/Platform/smbios.cpp
@@ -2035,7 +2035,7 @@ EFI_STATUS PrepatchSmbios()
NumberOfRecords = 0;
MaxStructureSize = 0;
//preliminary fill EntryPoint with some data
- CopyMem ((VOID *)SmbiosEpsNew, (VOID *)EntryPoint, sizeof(SMBIOS_TABLE_ENTRY_POINT));
+ CopyMem((VOID *)SmbiosEpsNew, (VOID *)EntryPoint, sizeof(SMBIOS_TABLE_ENTRY_POINT));
Smbios = (VOID*)(SmbiosEpsNew + 1); //this is a C-language trick. I hate it but use. +1 means +sizeof(SMBIOS_TABLE_ENTRY_POINT)
diff --git a/rEFIt_UEFI/gui/menu_items/menu_items.h b/rEFIt_UEFI/gui/menu_items/menu_items.h
index e55215947..c20d85b5a 100644
--- a/rEFIt_UEFI/gui/menu_items/menu_items.h
+++ b/rEFIt_UEFI/gui/menu_items/menu_items.h
@@ -38,12 +38,13 @@
#include "../../libeg/libeg.h"
#include "../../refit/lib.h"
-#ifdef __cplusplus
+#include "../../Platform/LoaderUefi.h"
+
#include "../../cpp_foundation/XObjArray.h"
#include "../../cpp_foundation/XStringArray.h"
#include "../../cpp_foundation/XString.h"
#include "../../libeg/XPointer.h"
-#endif
+
//
//#define REFIT_DEBUG (2)
@@ -129,6 +130,9 @@ class REFIT_ABSTRACT_MENU_ENTRY
virtual REFIT_MENU_ENTRY_OTHER* getREFIT_MENU_ENTRY_OTHER() { return nullptr; };
virtual REFIT_MENU_ENTRY_ITEM_ABSTRACT* getREFIT_MENU_ITEM_IEM_ABSTRACT() { return nullptr; };
virtual REFIT_MENU_ITEM_BOOTNUM* getREFIT_MENU_ITEM_BOOTNUM() { return nullptr; };
+ virtual void StartLoader() {};
+ virtual void StartLegacy() {};
+ virtual void StartTool() {};
REFIT_ABSTRACT_MENU_ENTRY() : Row(0), ShortcutDigit(0), ShortcutLetter(0), Image(), AtClick(ActionNone), AtDoubleClick(ActionNone), AtRightClick(ActionNone), AtMouseOver(ActionNone), SubScreen(NULL)
{};
@@ -282,6 +286,8 @@ class REFIT_ABSTRACT_MENU_ENTRY
UINT8 NoMemset;
UINT16 Flags;
EFI_DEVICE_PATH *DevicePath;
+
+ VOID StartTool();
REFIT_MENU_ENTRY_LOADER_TOOL() : REFIT_MENU_ITEM_ABSTRACT_ENTRY_LOADER(), NoMemset(1), Flags(0), DevicePath(0) {};
@@ -325,6 +331,8 @@ class REFIT_ABSTRACT_MENU_ENTRY
{
public:
LEGACY_ENTRY() : REFIT_MENU_ITEM_BOOTNUM() {};
+
+ VOID StartLegacy();
virtual LEGACY_ENTRY* getLEGACY_ENTRY() { return this; };
};
@@ -349,12 +357,73 @@ class REFIT_ABSTRACT_MENU_ENTRY
XImage CustomLogo;
KERNEL_AND_KEXT_PATCHES *KernelAndKextPatches;
CONST CHAR16 *Settings;
+ UINT32 AddrVtable;
+ UINT32 SizeVtable;
+ UINT32 NamesTable;
LOADER_ENTRY()
: REFIT_MENU_ITEM_BOOTNUM(), VolName(0), DevicePath(0), Flags(0), LoaderType(0), OSVersion(0), BuildVersion(0),
BootBgColor({0,0,0,0}),
- CustomBoot(0), KernelAndKextPatches(0), Settings(0)
+ CustomBoot(0), KernelAndKextPatches(0), Settings(0),
+ AddrVtable(0), SizeVtable(0), NamesTable(0)
{};
+
+ VOID FindBootArgs();
+ EFI_STATUS getVTable(UINT8* kernel);
+ UINTN searchProc(UINT8 * kernel, const char *procedure, UINTN *procLen);
+ VOID KernelAndKextsPatcherStart();
+ VOID KernelAndKextPatcherInit();
+ BOOLEAN KernelUserPatch(UINT8 * kernel);
+ BOOLEAN KernelPatchPm(VOID *kernelData);
+ BOOLEAN KernelLapicPatch_32(VOID *kernelData);
+ BOOLEAN KernelLapicPatch_64(VOID *kernelData);
+ BOOLEAN BooterPatch(IN UINT8 *BooterData, IN UINT64 BooterSize);
+ VOID EFIAPI KernelBooterExtensionsPatch(IN UINT8 *Kernel);
+ BOOLEAN KernelPanicNoKextDump(VOID *kernelData);
+ VOID KernelCPUIDPatch(UINT8* kernelData);
+ BOOLEAN PatchCPUID(UINT8* bytes, UINT8* Location, INT32 LenLoc,
+ UINT8* Search4, UINT8* Search10, UINT8* ReplaceModel,
+ UINT8* ReplaceExt, INT32 Len);
+ VOID KernelPatcher_32(VOID* kernelData, CHAR8 *OSVersion);
+ VOID KernelPatcher_64(VOID* kernelData);
+ VOID FilterKernelPatches();
+ VOID FilterKextPatches();
+ VOID FilterBootPatches();
+
+ EFI_STATUS SetFSInjection();
+ EFI_STATUS InjectKexts(IN UINT32 deviceTreeP, IN UINT32 *deviceTreeLength);
+ EFI_STATUS LoadKexts();
+ int is_mkext_v1(UINT8* drvPtr);
+ void patch_mkext_v1(UINT8 *drvPtr);
+ // why EFIAPI?
+ EFI_STATUS EFIAPI LoadKext(IN EFI_FILE *RootDir, IN CHAR16 *FileName, IN cpu_type_t archCpuType, IN OUT VOID *kext);
+ EFI_STATUS EFIAPI AddKext(IN EFI_FILE *RootDir, IN CHAR16 *FileName, IN cpu_type_t archCpuType);
+ VOID LoadPlugInKexts(IN EFI_FILE *RootDir, IN CHAR16 *DirName, IN cpu_type_t archCpuType, IN BOOLEAN Force);
+ VOID AddKexts(CONST CHAR16 *SrcDir, CONST CHAR16 *Path, cpu_type_t archCpuType);
+ VOID KextPatcherRegisterKexts(void *FSInject, void *ForceLoadKexts);
+ VOID KextPatcherStart();
+ VOID PatchPrelinkedKexts();
+ VOID PatchLoadedKexts();
+ VOID PatchKext(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize);
+ VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize, INT32 N);
+ VOID ATIConnectorsPatchInit();
+ VOID ATIConnectorsPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize);
+ VOID ATIConnectorsPatchRegisterKexts(void *FSInject_v, void *ForceLoadKexts_v);
+ VOID AppleIntelCPUPMPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize);
+ VOID AppleRTCPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize);
+ VOID CheckForFakeSMC(CHAR8 *InfoPlist);
+ VOID DellSMBIOSPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize);
+ VOID SNBE_AICPUPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize);
+ VOID BDWE_IOPCIPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 InfoPlistSize);
+ BOOLEAN SandyBridgeEPM(VOID *kernelData, BOOLEAN use_xcpm_idle);
+ BOOLEAN HaswellEXCPM(VOID *kernelData, BOOLEAN use_xcpm_idle);
+ BOOLEAN HaswellLowEndXCPM(VOID *kernelData, BOOLEAN use_xcpm_idle);
+ BOOLEAN BroadwellEPM(VOID *kernelData, BOOLEAN use_xcpm_idle);
+ BOOLEAN KernelIvyBridgeXCPM(VOID *kernelData, BOOLEAN use_xcpm_idle);
+ BOOLEAN KernelIvyE5XCPM(VOID *kernelData, BOOLEAN use_xcpm_idle);
+
+ VOID Stall(int Pause) { if ((KernelAndKextPatches != NULL) && KernelAndKextPatches->KPDebug) { gBS->Stall(Pause); } };
+ VOID StartLoader();
LOADER_ENTRY* getPartiallyDuplicatedEntry() const;
virtual LOADER_ENTRY* getLOADER_ENTRY() { return this; };
} ;
diff --git a/rEFIt_UEFI/libeg/BmLib.cpp b/rEFIt_UEFI/libeg/BmLib.cpp
index 817358828..f0542f86c 100644
--- a/rEFIt_UEFI/libeg/BmLib.cpp
+++ b/rEFIt_UEFI/libeg/BmLib.cpp
@@ -158,7 +158,7 @@ EfiStrDuplicate (
Dest = (__typeof__(Dest))AllocatePool (Size);
// ASSERT (Dest != NULL);
if (Dest != NULL) {
- CopyMem (Dest, Src, Size);
+ CopyMem(Dest, Src, Size);
}
return Dest;
@@ -324,7 +324,7 @@ EfiReallocatePool (
if (OldPool != NULL) {
if (NewPool != NULL) {
- CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
+ CopyMem(NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
}
FreePool(OldPool);
diff --git a/rEFIt_UEFI/refit/IO.cpp b/rEFIt_UEFI/refit/IO.cpp
index 032f19b6a..41a0ecfc5 100644
--- a/rEFIt_UEFI/refit/IO.cpp
+++ b/rEFIt_UEFI/refit/IO.cpp
@@ -194,7 +194,7 @@ Returns:
//
// Append the new text
//
- CopyMem (spc->Str + spc->Len, Buffer, len * sizeof (CHAR16));
+ CopyMem(spc->Str + spc->Len, Buffer, len * sizeof (CHAR16));
spc->Len += len;
//
@@ -241,7 +241,7 @@ Returns:
{
PRINT_STATE ps;
- SetMem (&ps, sizeof (ps), 0);
+ SetMem(&ps, sizeof (ps), 0);
ps.Output = (IN EFI_STATUS (EFIAPI *)(VOID *context, CONST CHAR16 *str)) Output; // C++ doesn't cast automatically to void* for param 1
ps.Context = spc;
ps.fmt.u.pw = fmt;
@@ -358,7 +358,7 @@ Returns:
return 0;
}
- SetMem (&ps, sizeof (ps), 0);
+ SetMem(&ps, sizeof (ps), 0);
ps.Context = Out;
ps.Output = (EFI_STATUS (EFIAPI *) (VOID *, CONST CHAR16 *)) Out->OutputString; // C++ doesn't cast automatically to void* for param 1
ps.SetAttr = (EFI_STATUS (EFIAPI *) (VOID *, UINTN)) Out->SetAttribute;
@@ -495,7 +495,7 @@ PFLUSH (
ps->Output (ps->Context, ps->Buffer);
}
- CopyMem (
+ CopyMem(
((CHAR8 *) (ps->Buffer)) - PRINT_JOINT_BUFFER_LEN,
((CHAR8 *) (ps->Pos)) - PRINT_JOINT_BUFFER_LEN,
PRINT_JOINT_BUFFER_LEN
@@ -1493,7 +1493,7 @@ Returns:
return ;
}
- // SetMem (InStr, StrLength * sizeof (CHAR16), 0);
+ // SetMem(InStr, StrLength * sizeof (CHAR16), 0);
//prepare default string
Len = StrLen(InStr);
StrPos = 0;
@@ -1527,7 +1527,7 @@ Returns:
StrPos -= 1;
Update = StrPos;
Delete = 1;
- CopyMem (InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
+ CopyMem(InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
//
// Adjust the current column and row
@@ -1572,7 +1572,7 @@ Returns:
if (Len) {
Update = StrPos;
Delete = 1;
- CopyMem (InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
+ CopyMem(InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
}
break;
@@ -1648,7 +1648,7 @@ Returns:
Len = StrLen (InStr);
if (Delete) {
- SetMem (InStr + Len, Delete * sizeof (CHAR16), 0x00);
+ SetMem(InStr + Len, Delete * sizeof (CHAR16), 0x00);
}
if (StrPos > Len) {
diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp
index 74aa70e5d..746aa80bb 100644
--- a/rEFIt_UEFI/refit/main.cpp
+++ b/rEFIt_UEFI/refit/main.cpp
@@ -120,7 +120,7 @@ CONST CHAR8* AudioOutputNames[] = {
extern VOID HelpRefit(VOID);
extern VOID AboutRefit(VOID);
-extern BOOLEAN BooterPatch(IN UINT8 *BooterData, IN UINT64 BooterSize, LOADER_ENTRY *Entry);
+//extern BOOLEAN BooterPatch(IN UINT8 *BooterData, IN UINT64 BooterSize, LOADER_ENTRY *Entry);
extern UINTN ThemesNum;
extern CONST CHAR16 *ThemesList[];
@@ -410,93 +410,91 @@ VOID DumpKernelAndKextPatches(KERNEL_AND_KEXT_PATCHES *Patches)
}
}
#endif
-VOID FilterKextPatches(IN LOADER_ENTRY *Entry) //zzzz
+VOID LOADER_ENTRY::FilterKextPatches()
{
- if (gSettings.KextPatchesAllowed && (Entry->KernelAndKextPatches->KextPatches != NULL) && Entry->KernelAndKextPatches->NrKexts) {
- INTN i;
+ if (gSettings.KextPatchesAllowed && (KernelAndKextPatches->KextPatches != NULL) && (KernelAndKextPatches->NrKexts != 0)) {
DBG("Filtering KextPatches:\n");
- for (i = 0; i < Entry->KernelAndKextPatches->NrKexts; i++) {
+ for (INTN i = 0; i < KernelAndKextPatches->NrKexts; i++) {
DBG(" - [%02lld]: %s :: %s :: [OS: %s | MatchOS: %s | MatchBuild: %s]",
i,
- Entry->KernelAndKextPatches->KextPatches[i].Label,
- Entry->KernelAndKextPatches->KextPatches[i].IsPlistPatch ? "PlistPatch" : "BinPatch",
- Entry->OSVersion,
- Entry->KernelAndKextPatches->KextPatches[i].MatchOS ? Entry->KernelAndKextPatches->KextPatches[i].MatchOS : "All",
- Entry->KernelAndKextPatches->KextPatches[i].MatchBuild != NULL ? Entry->KernelAndKextPatches->KextPatches[i].MatchBuild : "All"
+ KernelAndKextPatches->KextPatches[i].Label,
+ KernelAndKextPatches->KextPatches[i].IsPlistPatch ? "PlistPatch" : "BinPatch",
+ OSVersion,
+ KernelAndKextPatches->KextPatches[i].MatchOS ? KernelAndKextPatches->KextPatches[i].MatchOS : "All",
+ KernelAndKextPatches->KextPatches[i].MatchBuild != NULL ? KernelAndKextPatches->KextPatches[i].MatchBuild : "All"
);
- if (!Entry->KernelAndKextPatches->KextPatches[i].MenuItem.BValue) {
+ if (!KernelAndKextPatches->KextPatches[i].MenuItem.BValue) {
DBG(" ==> disabled by user\n");
continue;
}
- if ((Entry->BuildVersion != NULL) && (Entry->KernelAndKextPatches->KextPatches[i].MatchBuild != NULL)) {
- Entry->KernelAndKextPatches->KextPatches[i].MenuItem.BValue = IsPatchEnabled(Entry->KernelAndKextPatches->KextPatches[i].MatchBuild, Entry->BuildVersion);
- DBG(" ==> %s\n", Entry->KernelAndKextPatches->KextPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
+ if ((BuildVersion != NULL) && (KernelAndKextPatches->KextPatches[i].MatchBuild != NULL)) {
+ KernelAndKextPatches->KextPatches[i].MenuItem.BValue = IsPatchEnabled(KernelAndKextPatches->KextPatches[i].MatchBuild, BuildVersion);
+ DBG(" ==> %s\n", KernelAndKextPatches->KextPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
continue;
}
- Entry->KernelAndKextPatches->KextPatches[i].MenuItem.BValue = IsPatchEnabled(Entry->KernelAndKextPatches->KextPatches[i].MatchOS, Entry->OSVersion);
- DBG(" ==> %s\n", Entry->KernelAndKextPatches->KextPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
+ KernelAndKextPatches->KextPatches[i].MenuItem.BValue = IsPatchEnabled(KernelAndKextPatches->KextPatches[i].MatchOS, OSVersion);
+ DBG(" ==> %s\n", KernelAndKextPatches->KextPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
}
}
}
-VOID FilterKernelPatches(IN LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::FilterKernelPatches()
{
- if (gSettings.KernelPatchesAllowed && (Entry->KernelAndKextPatches->KernelPatches != NULL) && Entry->KernelAndKextPatches->NrKernels) {
+ if (gSettings.KernelPatchesAllowed && (KernelAndKextPatches->KernelPatches != NULL) && KernelAndKextPatches->NrKernels) {
INTN i = 0;
DBG("Filtering KernelPatches:\n");
- for (; i < Entry->KernelAndKextPatches->NrKernels; ++i) {
+ for (; i < KernelAndKextPatches->NrKernels; ++i) {
DBG(" - [%02lld]: %s :: [OS: %s | MatchOS: %s | MatchBuild: %s]",
i,
- Entry->KernelAndKextPatches->KernelPatches[i].Label,
- Entry->OSVersion,
- Entry->KernelAndKextPatches->KernelPatches[i].MatchOS ? Entry->KernelAndKextPatches->KernelPatches[i].MatchOS : "All",
- Entry->KernelAndKextPatches->KernelPatches[i].MatchBuild != NULL ? Entry->KernelAndKextPatches->KernelPatches[i].MatchBuild : "no"
+ KernelAndKextPatches->KernelPatches[i].Label,
+ OSVersion,
+ KernelAndKextPatches->KernelPatches[i].MatchOS ? KernelAndKextPatches->KernelPatches[i].MatchOS : "All",
+ KernelAndKextPatches->KernelPatches[i].MatchBuild != NULL ? KernelAndKextPatches->KernelPatches[i].MatchBuild : "no"
);
- if (!Entry->KernelAndKextPatches->KernelPatches[i].MenuItem.BValue) {
+ if (!KernelAndKextPatches->KernelPatches[i].MenuItem.BValue) {
DBG(" ==> disabled by user\n");
continue;
}
- if ((Entry->BuildVersion != NULL) && (Entry->KernelAndKextPatches->KernelPatches[i].MatchBuild != NULL)) {
- Entry->KernelAndKextPatches->KernelPatches[i].MenuItem.BValue = IsPatchEnabled(Entry->KernelAndKextPatches->KernelPatches[i].MatchBuild, Entry->BuildVersion);
- DBG(" ==> %s by build\n", Entry->KernelAndKextPatches->KernelPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
+ if ((BuildVersion != NULL) && (KernelAndKextPatches->KernelPatches[i].MatchBuild != NULL)) {
+ KernelAndKextPatches->KernelPatches[i].MenuItem.BValue = IsPatchEnabled(KernelAndKextPatches->KernelPatches[i].MatchBuild, BuildVersion);
+ DBG(" ==> %s by build\n", KernelAndKextPatches->KernelPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
continue;
}
- Entry->KernelAndKextPatches->KernelPatches[i].MenuItem.BValue = IsPatchEnabled(Entry->KernelAndKextPatches->KernelPatches[i].MatchOS, Entry->OSVersion);
- DBG(" ==> %s by OS\n", Entry->KernelAndKextPatches->KernelPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
+ KernelAndKextPatches->KernelPatches[i].MenuItem.BValue = IsPatchEnabled(KernelAndKextPatches->KernelPatches[i].MatchOS, OSVersion);
+ DBG(" ==> %s by OS\n", KernelAndKextPatches->KernelPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
}
}
}
-VOID FilterBootPatches(IN LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::FilterBootPatches()
{
- if ((Entry->KernelAndKextPatches->BootPatches != NULL) && Entry->KernelAndKextPatches->NrBoots) {
- INTN i = 0;
+ if ((KernelAndKextPatches->BootPatches != NULL) && KernelAndKextPatches->NrBoots) {
DBG("Filtering BootPatches:\n");
- for (; i < Entry->KernelAndKextPatches->NrBoots; ++i) {
+ for (INTN i = 0; i < KernelAndKextPatches->NrBoots; ++i) {
DBG(" - [%02lld]: %s :: [OS: %s | MatchOS: %s | MatchBuild: %s]",
i,
- Entry->KernelAndKextPatches->BootPatches[i].Label,
- Entry->OSVersion,
- Entry->KernelAndKextPatches->BootPatches[i].MatchOS ? Entry->KernelAndKextPatches->BootPatches[i].MatchOS : "All",
- Entry->KernelAndKextPatches->BootPatches[i].MatchBuild != NULL ? Entry->KernelAndKextPatches->BootPatches[i].MatchBuild : "no"
+ KernelAndKextPatches->BootPatches[i].Label,
+ OSVersion,
+ KernelAndKextPatches->BootPatches[i].MatchOS ? KernelAndKextPatches->BootPatches[i].MatchOS : "All",
+ KernelAndKextPatches->BootPatches[i].MatchBuild != NULL ? KernelAndKextPatches->BootPatches[i].MatchBuild : "no"
);
- if (!Entry->KernelAndKextPatches->BootPatches[i].MenuItem.BValue) {
+ if (!KernelAndKextPatches->BootPatches[i].MenuItem.BValue) {
DBG(" ==> disabled by user\n");
continue;
}
- if ((Entry->BuildVersion != NULL) && (Entry->KernelAndKextPatches->BootPatches[i].MatchBuild != NULL)) {
- Entry->KernelAndKextPatches->BootPatches[i].MenuItem.BValue = IsPatchEnabled(Entry->KernelAndKextPatches->BootPatches[i].MatchBuild, Entry->BuildVersion);
- DBG(" ==> %s by build\n", Entry->KernelAndKextPatches->BootPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
+ if ((BuildVersion != NULL) && (KernelAndKextPatches->BootPatches[i].MatchBuild != NULL)) {
+ KernelAndKextPatches->BootPatches[i].MenuItem.BValue = IsPatchEnabled(KernelAndKextPatches->BootPatches[i].MatchBuild, BuildVersion);
+ DBG(" ==> %s by build\n", KernelAndKextPatches->BootPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
continue;
}
- Entry->KernelAndKextPatches->BootPatches[i].MenuItem.BValue = IsPatchEnabled(Entry->KernelAndKextPatches->BootPatches[i].MatchOS, Entry->OSVersion);
- DBG(" ==> %s by OS\n", Entry->KernelAndKextPatches->BootPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
+ KernelAndKextPatches->BootPatches[i].MenuItem.BValue = IsPatchEnabled(KernelAndKextPatches->BootPatches[i].MatchOS, OSVersion);
+ DBG(" ==> %s by OS\n", KernelAndKextPatches->BootPatches[i].MenuItem.BValue ? "allowed" : "not allowed");
}
}
@@ -564,7 +562,7 @@ VOID CheckEmptyFB()
}
}
-static VOID StartLoader(IN LOADER_ENTRY *Entry)
+VOID LOADER_ENTRY::StartLoader()
{
EFI_STATUS Status;
EFI_TEXT_STRING ConOutOutputString = 0;
@@ -577,11 +575,11 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
// DBG("StartLoader() start\n");
DbgHeader("StartLoader");
- if (Entry->Settings) {
- DBG("Entry->Settings: %ls\n", Entry->Settings);
- Status = LoadUserSettings(SelfRootDir, Entry->Settings, &dict);
+ if (Settings) {
+ DBG(" Settings: %ls\n", Settings);
+ Status = LoadUserSettings(SelfRootDir, Settings, &dict);
if (!EFI_ERROR(Status)) {
- DBG(" - found custom settings for this entry: %ls\n", Entry->Settings);
+ DBG(" - found custom settings for this entry: %ls\n", Settings);
gBootChanged = TRUE;
Status = GetUserSettings(SelfRootDir, dict);
if (EFI_ERROR(Status)) {
@@ -590,7 +588,7 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
if ((gSettings.CpuFreqMHz > 100) && (gSettings.CpuFreqMHz < 20000)) {
gCPUStructure.MaxSpeed = gSettings.CpuFreqMHz;
}
- //CopyMem (Entry->KernelAndKextPatches,
+ //CopyMem(KernelAndKextPatches,
// &gSettings.KernelAndKextPatches,
// sizeof(KERNEL_AND_KEXT_PATCHES));
//DBG("Custom KernelAndKextPatches copyed to started entry\n");
@@ -651,22 +649,22 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
// nsvg__deleteParser(mainParser); //temporary disabled
//destruct_globals_objects(NULL); //we can't destruct our globals here. We need, for example, Volumes.
- //DumpKernelAndKextPatches(Entry->KernelAndKextPatches);
+ //DumpKernelAndKextPatches(KernelAndKextPatches);
DBG("start loader\n");
// Load image into memory (will be started later)
- Status = LoadEFIImage(Entry->DevicePath, Entry->LoaderPath.basename(), NULL, &ImageHandle);
+ Status = LoadEFIImage(DevicePath, LoaderPath.basename(), NULL, &ImageHandle);
if (EFI_ERROR(Status)) {
DBG("Image is not loaded, status=%s\n", strerror(Status));
return; // no reason to continue if loading image failed
}
- egClearScreen(&Entry->BootBgColor); //if not set then it is already MenuBackgroundPixel
+ egClearScreen(&BootBgColor); //if not set then it is already MenuBackgroundPixel
// KillMouse();
-// if (Entry->LoaderType == OSTYPE_OSX) {
- if (OSTYPE_IS_OSX(Entry->LoaderType) ||
- OSTYPE_IS_OSX_RECOVERY(Entry->LoaderType) ||
- OSTYPE_IS_OSX_INSTALLER(Entry->LoaderType)) {
+// if (LoaderType == OSTYPE_OSX) {
+ if (OSTYPE_IS_OSX(LoaderType) ||
+ OSTYPE_IS_OSX_RECOVERY(LoaderType) ||
+ OSTYPE_IS_OSX_INSTALLER(LoaderType)) {
// To display progress bar properly (especially in FV2 mode) boot.efi needs to be in graphics mode.
// Unfortunately many UEFI implementations change the resolution when SetMode happens.
@@ -688,7 +686,7 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
// Correct OSVersion if it was not found
// This should happen only for 10.7-10.9 OSTYPE_OSX_INSTALLER
// For these cases, take OSVersion from loaded boot.efi image in memory
- if (/*Entry->LoaderType == OSTYPE_OSX_INSTALLER ||*/ !Entry->OSVersion) {
+ if (/*LoaderType == OSTYPE_OSX_INSTALLER ||*/ !OSVersion) {
if (!EFI_ERROR(Status)) {
// version in boot.efi appears as "Mac OS X 10.?"
@@ -712,54 +710,54 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
InstallerVersion = NULL; // flag known version was not found
}
if (InstallerVersion != NULL) { // known version was found in image
- if (Entry->OSVersion != NULL) {
- FreePool(Entry->OSVersion);
+ if (OSVersion != NULL) {
+ FreePool(OSVersion);
}
- Entry->OSVersion = (__typeof__(Entry->OSVersion))AllocateCopyPool(AsciiStrLen(InstallerVersion)+1, InstallerVersion);
- Entry->OSVersion[AsciiStrLen(InstallerVersion)] = '\0';
-// DBG("Corrected OSVersion: %s\n", Entry->OSVersion);
+ OSVersion = (__typeof__(OSVersion))AllocateCopyPool(AsciiStrLen(InstallerVersion)+1, InstallerVersion);
+ OSVersion[AsciiStrLen(InstallerVersion)] = '\0';
+// DBG("Corrected OSVersion: %s\n", OSVersion);
}
}
}
- if (Entry->BuildVersion != NULL) {
- FreePool(Entry->BuildVersion);
- Entry->BuildVersion = NULL;
+ if (BuildVersion != NULL) {
+ FreePool(BuildVersion);
+ BuildVersion = NULL;
}
}
- if (Entry->BuildVersion != NULL) {
- DBG(" %s (%s)\n", Entry->OSVersion, Entry->BuildVersion);
+ if (BuildVersion != NULL) {
+ DBG(" %s (%s)\n", OSVersion, BuildVersion);
} else {
- DBG(" %s\n", Entry->OSVersion);
+ DBG(" %s\n", OSVersion);
}
- if (Entry->OSVersion && (AsciiOSVersionToUint64(Entry->OSVersion) >= AsciiOSVersionToUint64("10.11"))) {
- if (OSFLAG_ISSET(Entry->Flags, OSFLAG_NOSIP)) {
+ if (OSVersion && (AsciiOSVersionToUint64(OSVersion) >= AsciiOSVersionToUint64("10.11"))) {
+ if (OSFLAG_ISSET(Flags, OSFLAG_NOSIP)) {
gSettings.CsrActiveConfig = (UINT32)0x37F;
gSettings.BooterConfig = 0x28;
}
ReadSIPCfg();
}
- FilterKextPatches(Entry);
- FilterKernelPatches(Entry);
- FilterBootPatches(Entry);
- if (LoadedImage && !BooterPatch((UINT8*)LoadedImage->ImageBase, LoadedImage->ImageSize, Entry)) {
+ FilterKextPatches();
+ FilterKernelPatches();
+ FilterBootPatches();
+ if (LoadedImage && !BooterPatch((UINT8*)LoadedImage->ImageBase, LoadedImage->ImageSize)) {
DBG("Will not patch boot.efi\n");
}
// Set boot argument for kernel if no caches, this should force kernel loading
- if ( OSFLAG_ISSET(Entry->Flags, OSFLAG_NOCACHES) && !Entry->LoadOptions.containsStartWithIC("Kernel=") ) {
+ if ( OSFLAG_ISSET(Flags, OSFLAG_NOCACHES) && !LoadOptions.containsStartWithIC("Kernel=") ) {
XString KernelLocation;
- if (Entry->OSVersion && AsciiOSVersionToUint64(Entry->OSVersion) <= AsciiOSVersionToUint64("10.9")) {
+ if (OSVersion && AsciiOSVersionToUint64(OSVersion) <= AsciiOSVersionToUint64("10.9")) {
KernelLocation.SPrintf("\"Kernel=/mach_kernel\"");
} else {
// used for 10.10, 10.11, and new version.
KernelLocation.SPrintf("\"Kernel=/System/Library/Kernels/kernel\"");
}
- Entry->LoadOptions.AddID(KernelLocation);
+ LoadOptions.AddID(KernelLocation);
}
//we are booting OSX - restore emulation if it's not installed before g boot.efi
@@ -772,64 +770,64 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
CheckEmptyFB();
PatchSmbios();
// DBG("PatchACPI\n");
- PatchACPI(Entry->Volume, Entry->OSVersion);
+ PatchACPI(Volume, OSVersion);
// If KPDebug is true boot in verbose mode to see the debug messages
- if ((Entry->KernelAndKextPatches != NULL) && Entry->KernelAndKextPatches->KPDebug) {
- Entry->LoadOptions.AddID("-v"_XS);
+ if ((KernelAndKextPatches != NULL) && KernelAndKextPatches->KPDebug) {
+ LoadOptions.AddID("-v"_XS);
}
DbgHeader("RestSetup macOS");
// DBG("SetDevices\n");
- SetDevices(Entry);
+ SetDevices(this);
// DBG("SetFSInjection\n");
- SetFSInjection(Entry);
+ SetFSInjection();
//PauseForKey(L"SetFSInjection");
// DBG("SetVariablesForOSX\n");
- SetVariablesForOSX(Entry);
+ SetVariablesForOSX(this);
// DBG("SetVariablesForOSX\n");
- EventsInitialize(Entry);
+ EventsInitialize(this);
// DBG("FinalizeSmbios\n");
FinalizeSmbios();
SetCPUProperties();
- if (OSFLAG_ISSET(Entry->Flags, OSFLAG_HIBERNATED)) {
- DoHibernateWake = PrepareHibernation(Entry->Volume);
+ if (OSFLAG_ISSET(Flags, OSFLAG_HIBERNATED)) {
+ DoHibernateWake = PrepareHibernation(Volume);
}
SetupDataForOSX(DoHibernateWake);
if ( gDriversFlags.AptioFixLoaded &&
!DoHibernateWake &&
- !Entry->LoadOptions.containsStartWithIC("slide=") ) {
+ !LoadOptions.containsStartWithIC("slide=") ) {
// Add slide=0 argument for ML+ if not present
- Entry->LoadOptions.AddID("slide=0"_XS);
+ LoadOptions.AddID("slide=0"_XS);
}
/**
* syscl - append "-xcpm" argument conditionally if set KernelXCPM on Intel Haswell+ low-end CPUs
*/
- if ((Entry->KernelAndKextPatches != NULL) && Entry->KernelAndKextPatches->KPKernelXCPM &&
+ if ((KernelAndKextPatches != NULL) && KernelAndKextPatches->KPKernelXCPM &&
gCPUStructure.Vendor == CPU_VENDOR_INTEL && gCPUStructure.Model >= CPU_MODEL_HASWELL &&
(AsciiStrStr(gCPUStructure.BrandString, "Celeron") || AsciiStrStr(gCPUStructure.BrandString, "Pentium")) &&
- (AsciiOSVersionToUint64(Entry->OSVersion) >= AsciiOSVersionToUint64("10.8.5")) &&
- (AsciiOSVersionToUint64(Entry->OSVersion) < AsciiOSVersionToUint64("10.12")) &&
- (!Entry->LoadOptions.containsIC("-xcpm"))) {
+ (AsciiOSVersionToUint64(OSVersion) >= AsciiOSVersionToUint64("10.8.5")) &&
+ (AsciiOSVersionToUint64(OSVersion) < AsciiOSVersionToUint64("10.12")) &&
+ (!LoadOptions.containsIC("-xcpm"))) {
// add "-xcpm" argv if not present on Haswell+ Celeron/Pentium
- Entry->LoadOptions.AddID("-xcpm"_XS);
+ LoadOptions.AddID("-xcpm"_XS);
}
// add -xcpm on Ivy Bridge if set KernelXCPM and system version is 10.8.5 - 10.11.x
- if ((Entry->KernelAndKextPatches != NULL) && Entry->KernelAndKextPatches->KPKernelXCPM &&
+ if ((KernelAndKextPatches != NULL) && KernelAndKextPatches->KPKernelXCPM &&
gCPUStructure.Model == CPU_MODEL_IVY_BRIDGE &&
- (AsciiOSVersionToUint64(Entry->OSVersion) >= AsciiOSVersionToUint64("10.8.5")) &&
- (AsciiOSVersionToUint64(Entry->OSVersion) < AsciiOSVersionToUint64("10.12")) &&
- (!Entry->LoadOptions.containsIC("-xcpm"))) {
+ (AsciiOSVersionToUint64(OSVersion) >= AsciiOSVersionToUint64("10.8.5")) &&
+ (AsciiOSVersionToUint64(OSVersion) < AsciiOSVersionToUint64("10.12")) &&
+ (!LoadOptions.containsIC("-xcpm"))) {
// add "-xcpm" argv if not present on Ivy Bridge
- Entry->LoadOptions.AddID("-xcpm"_XS);
+ LoadOptions.AddID("-xcpm"_XS);
}
if (AudioIo) {
@@ -840,7 +838,7 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
// DBG("LoadKexts\n");
// LoadKexts writes to DataHub, where large writes can prevent hibernate wake (happens when several kexts present in Clover's kexts dir)
if (!DoHibernateWake) {
- LoadKexts(Entry);
+ LoadKexts();
}
// blocking boot.efi output if -v is not specified
@@ -849,11 +847,11 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
// which is wrong
// apianti - only block console output if using graphics
// but don't block custom boot logo
- if ( Entry->LoadOptions.containsIC("-v") ) {
- Entry->Flags = OSFLAG_UNSET(Entry->Flags, OSFLAG_USEGRAPHICS);
+ if ( LoadOptions.containsIC("-v") ) {
+ Flags = OSFLAG_UNSET(Flags, OSFLAG_USEGRAPHICS);
}
}
- else if (OSTYPE_IS_WINDOWS(Entry->LoaderType)) {
+ else if (OSTYPE_IS_WINDOWS(LoaderType)) {
if (AudioIo) {
AudioIo->StopPlayback(AudioIo);
@@ -873,7 +871,7 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
//PauseForKey(L"continue");
}
- else if (OSTYPE_IS_LINUX(Entry->LoaderType) || (Entry->LoaderType == OSTYPE_LINEFI)) {
+ else if (OSTYPE_IS_LINUX(LoaderType) || (LoaderType == OSTYPE_LINEFI)) {
DBG("Closing events for Linux\n");
gBS->CloseEvent (OnReadyToBootEvent);
@@ -889,7 +887,7 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
}
if (gSettings.LastBootedVolume) {
- SetStartupDiskVolume(Entry->Volume, Entry->LoaderType == OSTYPE_OSX ? NullXStringW : Entry->LoaderPath);
+ SetStartupDiskVolume(Volume, LoaderType == OSTYPE_OSX ? NullXStringW : LoaderPath);
} else if (gSettings.DefaultVolume != NULL) {
// DefaultVolume specified in Config.plist or in Boot Option
// we'll remove macOS Startup Disk vars which may be present if it is used
@@ -919,10 +917,10 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
*/
// DBG("BeginExternalScreen\n");
- BeginExternalScreen(OSFLAG_ISSET(Entry->Flags, OSFLAG_USEGRAPHICS)/*, L"Booting OS"*/);
+ BeginExternalScreen(OSFLAG_ISSET(Flags, OSFLAG_USEGRAPHICS)/*, L"Booting OS"*/);
- if (!OSTYPE_IS_WINDOWS(Entry->LoaderType)) {
- if (OSFLAG_ISSET(Entry->Flags, OSFLAG_USEGRAPHICS)) {
+ if (!OSTYPE_IS_WINDOWS(LoaderType)) {
+ if (OSFLAG_ISSET(Flags, OSFLAG_USEGRAPHICS)) {
// save orig OutputString and replace it with
// null implementation
ConOutOutputString = gST->ConOut->OutputString;
@@ -930,7 +928,7 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
}
// Initialize the boot screen
- if (EFI_ERROR(Status = InitBootScreen(Entry))) {
+ if (EFI_ERROR(Status = InitBootScreen(this))) {
if (Status != EFI_ABORTED) DBG("Failed to initialize custom boot screen: %s!\n", strerror(Status));
}
else if (EFI_ERROR(Status = LockBootScreen())) {
@@ -938,9 +936,9 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
}
} // !OSTYPE_IS_WINDOWS
- if (OSTYPE_IS_OSX(Entry->LoaderType) ||
- OSTYPE_IS_OSX_RECOVERY(Entry->LoaderType) ||
- OSTYPE_IS_OSX_INSTALLER(Entry->LoaderType)) {
+ if (OSTYPE_IS_OSX(LoaderType) ||
+ OSTYPE_IS_OSX_RECOVERY(LoaderType) ||
+ OSTYPE_IS_OSX_INSTALLER(LoaderType)) {
if (DoHibernateWake) {
DBG("Closing events for wake\n");
@@ -973,16 +971,16 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
}
// DBG("StartEFIImage\n");
-// StartEFIImage(Entry->DevicePath, Entry->LoadOptions,
-// Basename(Entry->LoaderPath), Basename(Entry->LoaderPath), NULL, NULL);
+// StartEFIImage(DevicePath, LoadOptions,
+// Basename(LoaderPath), Basename(LoaderPath), NULL, NULL);
// DBG("StartEFILoadedImage\n");
- StartEFILoadedImage(ImageHandle, Entry->LoadOptions, Basename(Entry->LoaderPath.wc_str()), Entry->LoaderPath.basename(), NULL);
+ StartEFILoadedImage(ImageHandle, LoadOptions, Basename(LoaderPath.wc_str()), LoaderPath.basename(), NULL);
// Unlock boot screen
if (EFI_ERROR(Status = UnlockBootScreen())) {
DBG("Failed to unlock custom boot screen: %s!\n", strerror(Status));
}
- if (OSFLAG_ISSET(Entry->Flags, OSFLAG_USEGRAPHICS)) {
+ if (OSFLAG_ISSET(Flags, OSFLAG_USEGRAPHICS)) {
// return back orig OutputString
gST->ConOut->OutputString = ConOutOutputString;
}
@@ -995,7 +993,7 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
#define MAX_DISCOVERED_PATHS (16)
//#define PREBOOT_LOG L"EFI\\CLOVER\\misc\\preboot.log"
-static VOID StartLegacy(IN LEGACY_ENTRY *Entry)
+VOID LEGACY_ENTRY::StartLegacy()
{
EFI_STATUS Status = EFI_UNSUPPORTED;
@@ -1007,7 +1005,7 @@ static VOID StartLegacy(IN LEGACY_ENTRY *Entry)
}
if (gSettings.LastBootedVolume) {
- SetStartupDiskVolume(Entry->Volume, NullXStringW);
+ SetStartupDiskVolume(Volume, NullXStringW);
} else if (gSettings.DefaultVolume != NULL) {
// DefaultVolume specified in Config.plist:
// we'll remove macOS Startup Disk vars which may be present if it is used
@@ -1019,28 +1017,28 @@ static VOID StartLegacy(IN LEGACY_ENTRY *Entry)
egClearScreen(&MenuBackgroundPixel);
BeginExternalScreen(TRUE/*, L"Booting Legacy OS"*/);
XImage BootLogoX;
- BootLogoX.LoadXImage(ThemeX.ThemeDir, Entry->Volume->LegacyOS->IconName);
+ BootLogoX.LoadXImage(ThemeX.ThemeDir, Volume->LegacyOS->IconName);
BootLogoX.Draw((UGAWidth - BootLogoX.GetWidth()) >> 1,
(UGAHeight - BootLogoX.GetHeight()) >> 1);
//try my LegacyBoot
- switch (Entry->Volume->BootType) {
+ switch (Volume->BootType) {
case BOOTING_BY_CD:
- Status = bootElTorito(Entry->Volume);
+ Status = bootElTorito(Volume);
break;
case BOOTING_BY_MBR:
- Status = bootMBR(Entry->Volume);
+ Status = bootMBR(Volume);
break;
case BOOTING_BY_PBR:
if (StrCmp(gSettings.LegacyBoot, L"LegacyBiosDefault") == 0) {
Status = bootLegacyBiosDefault(gSettings.LegacyBiosDefaultEntry);
} else if (StrCmp(gSettings.LegacyBoot, L"PBRtest") == 0) {
- Status = bootPBRtest(Entry->Volume);
+ Status = bootPBRtest(Volume);
} else if (StrCmp(gSettings.LegacyBoot, L"PBRsata") == 0) {
- Status = bootPBR(Entry->Volume, TRUE);
+ Status = bootPBR(Volume, TRUE);
} else {
// default
- Status = bootPBR(Entry->Volume, FALSE);
+ Status = bootPBR(Volume, FALSE);
}
break;
default:
@@ -1055,13 +1053,13 @@ static VOID StartLegacy(IN LEGACY_ENTRY *Entry)
// pre-boot tool functions
//
-static VOID StartTool(IN REFIT_MENU_ENTRY_LOADER_TOOL *Entry)
+VOID REFIT_MENU_ENTRY_LOADER_TOOL::StartTool()
{
- DBG("Start Tool: %ls\n", Entry->LoaderPath.wc_str());
+ DBG("Start Tool: %ls\n", LoaderPath.wc_str());
egClearScreen(&MenuBackgroundPixel);
// assumes "Start " as assigned below
- BeginExternalScreen(OSFLAG_ISSET(Entry->Flags, OSFLAG_USEGRAPHICS)/*, &Entry->Title[6]*/); // Shouldn't we check that length of Title is at least 6 ?
- StartEFIImage(Entry->DevicePath, Entry->LoadOptions, Basename(Entry->LoaderPath.wc_str()), Entry->LoaderPath.basename(), NULL, NULL);
+ BeginExternalScreen(OSFLAG_ISSET(Flags, OSFLAG_USEGRAPHICS)/*, &Entry->Title[6]*/); // Shouldn't we check that length of Title is at least 6 ?
+ StartEFIImage(DevicePath, LoadOptions, Basename(LoaderPath.wc_str()), LoaderPath.basename(), NULL, NULL);
FinishExternalScreen();
//ReinitSelfLib();
}
@@ -2531,9 +2529,9 @@ RefitMain (IN EFI_HANDLE ImageHandle,
)
{
if (DefaultEntry->getLOADER_ENTRY()) {
- StartLoader(DefaultEntry->getLOADER_ENTRY());
+ DefaultEntry->StartLoader();
} else if (DefaultEntry->getLEGACY_ENTRY()){
- StartLegacy(DefaultEntry->getLEGACY_ENTRY());
+ DefaultEntry->StartLegacy();
}
GlobalConfig.FastBoot = FALSE; //Hmm... will never be here
}
@@ -2559,9 +2557,9 @@ RefitMain (IN EFI_HANDLE ImageHandle,
GlobalConfig.Timeout = -1;
if ((DefaultEntry != NULL) && (MenuExit == MENU_EXIT_TIMEOUT)) {
if (DefaultEntry->getLOADER_ENTRY()) {
- StartLoader(DefaultEntry->getLOADER_ENTRY());
+ DefaultEntry->StartLoader();
} else if (DefaultEntry->getLEGACY_ENTRY()){
- StartLegacy(DefaultEntry->getLEGACY_ENTRY());
+ DefaultEntry->StartLegacy();
}
// if something goes wrong - break main loop to reinit volumes
break;
@@ -2666,7 +2664,7 @@ RefitMain (IN EFI_HANDLE ImageHandle,
*/
if ( ChosenEntry->getLOADER_ENTRY() ) { // Boot OS via .EFI loader
SetBootCurrent(ChosenEntry->getLOADER_ENTRY());
- StartLoader(ChosenEntry->getLOADER_ENTRY());
+ ChosenEntry->StartLoader();
//if boot.efi failed we should somehow exit from the loop
TerminateScreen();
MainLoopRunning = FALSE;
@@ -2685,12 +2683,12 @@ RefitMain (IN EFI_HANDLE ImageHandle,
AfterTool = TRUE;
} else {
SetBootCurrent(ChosenEntry->getLEGACY_ENTRY());
- StartLegacy(ChosenEntry->getLEGACY_ENTRY());
+ ChosenEntry->StartLegacy();
}
}
if ( ChosenEntry->getREFIT_MENU_ENTRY_LOADER_TOOL() ) { // Start a EFI tool
- StartTool(ChosenEntry->getREFIT_MENU_ENTRY_LOADER_TOOL());
+ ChosenEntry->StartTool();
TerminateScreen(); //does not happen
// return EFI_SUCCESS;
// BdsLibConnectAllDriversToAllControllers();