kext and kernel patches will be part of LOADER_ENTRY class

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2020-05-01 19:26:28 +03:00
parent 804bca204a
commit 6b33696c93
484 changed files with 3077 additions and 3046 deletions

View File

@ -193,7 +193,7 @@ InitializeReset (
// Copy it to Runtime Memory // Copy it to Runtime Memory
// //
// ASSERT (sizeof (EFI_ACPI_DESCRIPTION) == GET_GUID_HOB_DATA_SIZE (HobAcpiDescription)); // 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 Base - %lx\n", mAcpiDescription.RESET_REG.Address));
// DEBUG ((DEBUG_INFO, "ACPI Reset Value - %02x\n", (UINTN)mAcpiDescription.RESET_VALUE)); // DEBUG ((DEBUG_INFO, "ACPI Reset Value - %02x\n", (UINTN)mAcpiDescription.RESET_VALUE));

View File

@ -74,7 +74,7 @@ Enqueue (
return EFI_NOT_READY; 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; Queue->Rear = (Queue->Rear + 1) % QUEUE_MAX_COUNT;
return EFI_SUCCESS; return EFI_SUCCESS;
@ -101,7 +101,7 @@ Dequeue (
return EFI_NOT_READY; 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; Queue->Front = (Queue->Front + 1) % QUEUE_MAX_COUNT;
return EFI_SUCCESS; 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; return EFI_SUCCESS;
} }
@ -2708,7 +2708,7 @@ BiosKeyboardRegisterKeyNotify (
NewNotify->Signature = BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE; NewNotify->Signature = BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction; NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify; 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); InsertTailList (&BiosKeyboardPrivate->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle; *NotifyHandle = NewNotify->NotifyHandle;

View File

@ -107,7 +107,7 @@ InitializeInterruptRedirection (
// //
// Copy code to legacy region // 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 // Get VectorBase, it should be 0x68
@ -226,7 +226,7 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS; Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES; 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); Ret = (BOOLEAN) (Regs->E.EFLAGS.Bits.CF == 1);

View File

@ -1245,7 +1245,7 @@ BiosVideoCheckForVbe (
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
goto Done; goto Done;
} }
CopyMem ( CopyMem(
BiosVideoPrivate->EdidDiscovered.Edid, BiosVideoPrivate->EdidDiscovered.Edid,
BiosVideoPrivate->VbeEdidDataBlock, BiosVideoPrivate->VbeEdidDataBlock,
VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE
@ -1260,7 +1260,7 @@ BiosVideoCheckForVbe (
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
goto Done; goto Done;
} }
CopyMem ( CopyMem(
BiosVideoPrivate->EdidActive.Edid, BiosVideoPrivate->EdidActive.Edid,
BiosVideoPrivate->VbeEdidDataBlock, BiosVideoPrivate->VbeEdidDataBlock,
VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE
@ -1421,7 +1421,7 @@ BiosVideoCheckForVbe (
} }
if (ModeNumber > 1) { if (ModeNumber > 1) {
CopyMem ( CopyMem(
ModeBuffer, ModeBuffer,
BiosVideoPrivate->ModeData, BiosVideoPrivate->ModeData,
(ModeNumber - 1) * sizeof (BIOS_VIDEO_MODE_DATA) (ModeNumber - 1) * sizeof (BIOS_VIDEO_MODE_DATA)
@ -2121,7 +2121,7 @@ BiosVideoGraphicsOutputVbeBlt (
VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth); VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth);
VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth); VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth);
CopyMem ( CopyMem(
VbeBuffer, VbeBuffer,
VbeBuffer1, VbeBuffer1,
TotalBytes TotalBytes
@ -2157,7 +2157,7 @@ BiosVideoGraphicsOutputVbeBlt (
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position); ((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
for (Index = 0; Index < Width; Index++) { for (Index = 0; Index < Width; Index++) {
CopyMem ( CopyMem(
VbeBuffer, VbeBuffer,
&Pixel, &Pixel,
VbePixelWidth VbePixelWidth
@ -2167,7 +2167,7 @@ BiosVideoGraphicsOutputVbeBlt (
VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth); VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth);
for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) { for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) {
CopyMem ( CopyMem(
(VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth), (VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth),
VbeBuffer, VbeBuffer,
TotalBytes TotalBytes
@ -2201,7 +2201,7 @@ BiosVideoGraphicsOutputVbeBlt (
Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) | Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) |
((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) | ((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) |
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position); ((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
CopyMem ( CopyMem(
VbeBuffer, VbeBuffer,
&Pixel, &Pixel,
VbePixelWidth VbePixelWidth
@ -2572,7 +2572,7 @@ BiosVideoGraphicsOutputVgaBlt (
DestinationAddress = (UINT8 *) (MemAddress + (DestinationY << 6) + (DestinationY << 4) + (DestinationX >> 3)); DestinationAddress = (UINT8 *) (MemAddress + (DestinationY << 6) + (DestinationY << 4) + (DestinationX >> 3));
Bytes = Width >> 3; Bytes = Width >> 3;
for (Index = 0, Offset = 0; Index < Height; Index++, Offset += BytesPerScanLine) { for (Index = 0, Offset = 0; Index < Height; Index++, Offset += BytesPerScanLine) {
PciIo->CopyMem ( PciIo->CopyMem(
PciIo, PciIo,
EfiPciIoWidthUint8, EfiPciIoWidthUint8,
EFI_PCI_IO_PASS_THROUGH_BAR, EFI_PCI_IO_PASS_THROUGH_BAR,

View File

@ -1432,7 +1432,7 @@ BiosVideoCheckForVbe (
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
goto Done; goto Done;
} }
CopyMem ( CopyMem(
BiosVideoPrivate->EdidDiscovered.Edid, BiosVideoPrivate->EdidDiscovered.Edid,
EdidActiveDataBlock, EdidActiveDataBlock,
EdidActiveDataSize EdidActiveDataSize
@ -1447,7 +1447,7 @@ BiosVideoCheckForVbe (
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
goto Done; goto Done;
} }
CopyMem ( CopyMem(
BiosVideoPrivate->EdidActive.Edid, BiosVideoPrivate->EdidActive.Edid,
EdidActiveDataBlock, EdidActiveDataBlock,
EdidActiveDataSize EdidActiveDataSize
@ -1715,7 +1715,7 @@ BiosVideoCheckForVbe (
} }
if (ModeNumber > 1) { if (ModeNumber > 1) {
CopyMem ( CopyMem(
ModeBuffer, ModeBuffer,
BiosVideoPrivate->ModeData, BiosVideoPrivate->ModeData,
(ModeNumber - 1) * sizeof (BIOS_VIDEO_MODE_DATA) (ModeNumber - 1) * sizeof (BIOS_VIDEO_MODE_DATA)
@ -2007,7 +2007,7 @@ BiosVideoGraphicsOutputQueryMode (
(*Info)->HorizontalResolution = ModeData->HorizontalResolution; (*Info)->HorizontalResolution = ModeData->HorizontalResolution;
(*Info)->VerticalResolution = ModeData->VerticalResolution; (*Info)->VerticalResolution = ModeData->VerticalResolution;
(*Info)->PixelFormat = ModeData->PixelFormat; (*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; (*Info)->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
@ -2152,7 +2152,7 @@ BiosVideoGraphicsOutputSetMode (
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution; This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
This->Mode->Info->VerticalResolution = ModeData->VerticalResolution; This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
This->Mode->Info->PixelFormat = ModeData->PixelFormat; 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->Info->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
@ -2356,7 +2356,7 @@ BiosVideoGraphicsOutputSetMode (
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution; This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
This->Mode->Info->VerticalResolution = ModeData->VerticalResolution; This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
This->Mode->Info->PixelFormat = ModeData->PixelFormat; 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->Info->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
@ -2644,7 +2644,7 @@ BiosVideoGraphicsOutputVbeBlt (
VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth); VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth);
VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth); VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth);
CopyMem ( CopyMem(
VbeBuffer, VbeBuffer,
VbeBuffer1, VbeBuffer1,
TotalBytes TotalBytes
@ -2680,7 +2680,7 @@ BiosVideoGraphicsOutputVbeBlt (
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position); ((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
for (Index = 0; Index < Width; Index++) { for (Index = 0; Index < Width; Index++) {
/* CopyMem ( /* CopyMem(
VbeBuffer, VbeBuffer,
&Pixel, &Pixel,
VbePixelWidth VbePixelWidth
@ -2691,7 +2691,7 @@ BiosVideoGraphicsOutputVbeBlt (
VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth); VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth);
for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) { for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) {
CopyMem ( CopyMem(
(VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth), (VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth),
VbeBuffer, VbeBuffer,
TotalBytes TotalBytes
@ -2725,7 +2725,7 @@ BiosVideoGraphicsOutputVbeBlt (
Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) | Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) |
((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) | ((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) |
((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position); ((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
/* CopyMem ( /* CopyMem(
VbeBuffer, VbeBuffer,
&Pixel, &Pixel,
VbePixelWidth VbePixelWidth
@ -3097,7 +3097,7 @@ BiosVideoGraphicsOutputVgaBlt (
DestinationAddress = (UINT8 *) (MemAddress + (DestinationY << 6) + (DestinationY << 4) + (DestinationX >> 3)); DestinationAddress = (UINT8 *) (MemAddress + (DestinationY << 6) + (DestinationY << 4) + (DestinationX >> 3));
Bytes = Width >> 3; Bytes = Width >> 3;
for (Index = 0, Offset = 0; Index < Height; Index++, Offset += BytesPerScanLine) { for (Index = 0, Offset = 0; Index < Height; Index++, Offset += BytesPerScanLine) {
PciIo->CopyMem ( PciIo->CopyMem(
PciIo, PciIo,
EfiPciIoWidthUint8, EfiPciIoWidthUint8,
EFI_PCI_IO_PASS_THROUGH_BAR, EFI_PCI_IO_PASS_THROUGH_BAR,

View File

@ -107,7 +107,7 @@ InitializeInterruptRedirection (
// //
// Copy code to legacy region // 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 // Get VectorBase, it should be 0x68
@ -226,7 +226,7 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS; Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES; 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); Ret = (BOOLEAN) (Regs->E.EFLAGS.Bits.CF == 1);

View File

@ -1283,7 +1283,7 @@ LegacyBiosInt86 (
ThunkRegSet.E.DS = Regs->E.DS; ThunkRegSet.E.DS = Regs->E.DS;
ThunkRegSet.E.ES = Regs->E.ES; 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 // 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 = (UINT16 *)((UINT8 *) mThunkContext.RealModeBuffer + mThunkContext.RealModeBufferSize - sizeof (UINT16));
Stack16 -= sizeof (ThunkRegSet.E.EFLAGS) / 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.SS = (UINT16) (((UINTN) Stack16 >> 16) << 12);
ThunkRegSet.E.ESP = (UINT16) (UINTN) Stack16; ThunkRegSet.E.ESP = (UINT16) (UINTN) Stack16;
@ -1347,7 +1347,7 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS; Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES; 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); Ret = (BOOLEAN) (Regs->E.EFlags.CF == 1);

View File

@ -2087,7 +2087,7 @@ RegisterFontPackage (
SimplifiedFont->NumberOfNarrowGlyphs = (UINT16) (mNarrowFontSize / sizeof (EFI_NARROW_GLYPH)); SimplifiedFont->NumberOfNarrowGlyphs = (UINT16) (mNarrowFontSize / sizeof (EFI_NARROW_GLYPH));
Location = (UINT8 *) (&SimplifiedFont->NumberOfWideGlyphs + 1); 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. // Add this simplified font package to a package list then install it.

View File

@ -159,7 +159,7 @@ InstallLegacyTables (
BasePtr = (UINTN)(&(Xsdt->Entry)); BasePtr = (UINTN)(&(Xsdt->Entry));
for (Index = 0; Index < EntryCount; Index ++) { 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)); Table = (EFI_ACPI_DESCRIPTION_HEADER*)((UINTN)(Entry64));
TableSize = Table->Length; TableSize = Table->Length;
if (Index == 0) { if (Index == 0) {

View File

@ -759,7 +759,7 @@ SetOption (
// //
// Update // Update
// //
CopyMem (OrgData, Data, DataSize); CopyMem(OrgData, Data, DataSize);
AmlHandle->Modified = TRUE; AmlHandle->Modified = TRUE;
return EFI_SUCCESS; return EFI_SUCCESS;
@ -884,7 +884,7 @@ SdtDuplicateHandle (
DstAmlHandle = AllocatePool (sizeof(*DstAmlHandle)); DstAmlHandle = AllocatePool (sizeof(*DstAmlHandle));
ASSERT (DstAmlHandle != NULL); ASSERT (DstAmlHandle != NULL);
CopyMem (DstAmlHandle, (VOID *)AmlHandle, sizeof(*DstAmlHandle)); CopyMem(DstAmlHandle, (VOID *)AmlHandle, sizeof(*DstAmlHandle));
return DstAmlHandle; return DstAmlHandle;
} }
@ -1100,7 +1100,7 @@ SdtAcpiTableAcpiSdtConstructor (
VOID *Registration; VOID *Registration;
InitializeListHead (&AcpiTableInstance->NotifyList); 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. // Register event for ExitPmAuth, so that we can uninstall ACPI SDT protocol after ExitPmAuth.

View File

@ -251,7 +251,7 @@ PublishTables (
// the table pointers in XSDT are not aligned on 8 byte boundary. // the table pointers in XSDT are not aligned on 8 byte boundary.
// //
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Fadt3; Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Fadt3;
CopyMem ( CopyMem(
CurrentXsdtEntry, CurrentXsdtEntry,
&Buffer64, &Buffer64,
sizeof (UINT64) sizeof (UINT64)
@ -457,7 +457,7 @@ ReallocateAcpiTableBuffer (
EFI_STATUS Status; EFI_STATUS Status;
UINT64 CurrentData; 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 // Enlarge the max table number from mEfiAcpiMaxNumTables to mEfiAcpiMaxNumTables + EFI_ACPI_MAX_NUM_TABLES
// //
@ -513,20 +513,20 @@ ReallocateAcpiTableBuffer (
// //
// Initialize RSDP // 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; 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; AcpiTableInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt3;
CurrentData = (UINT64) (UINTN) AcpiTableInstance->Xsdt; 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 // 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->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->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 // Calculate orignal ACPI table buffer size
@ -669,7 +669,7 @@ AddTableToList (
// Initialize the table contents // Initialize the table contents
// //
CurrentTableList->Signature = EFI_ACPI_TABLE_LIST_SIGNATURE; CurrentTableList->Signature = EFI_ACPI_TABLE_LIST_SIGNATURE;
CopyMem (CurrentTableList->Table, Table, CurrentTableSize); CopyMem(CurrentTableList->Table, Table, CurrentTableSize);
CurrentTableList->Handle = AcpiTableInstance->CurrentHandle++; CurrentTableList->Handle = AcpiTableInstance->CurrentHandle++;
*Handle = CurrentTableList->Handle; *Handle = CurrentTableList->Handle;
CurrentTableList->Version = Version; CurrentTableList->Version = Version;
@ -719,7 +719,7 @@ AddTableToList (
// //
// RSDP OEM information is updated to match the FADT OEM information // RSDP OEM information is updated to match the FADT OEM information
// //
CopyMem ( CopyMem(
&AcpiTableInstance->Rsdp1->OemId, &AcpiTableInstance->Rsdp1->OemId,
&AcpiTableInstance->Fadt1->Header.OemId, &AcpiTableInstance->Fadt1->Header.OemId,
6 6
@ -728,13 +728,13 @@ AddTableToList (
// //
// RSDT OEM information is updated to match the FADT OEM information. // RSDT OEM information is updated to match the FADT OEM information.
// //
CopyMem ( CopyMem(
&AcpiTableInstance->Rsdt1->OemId, &AcpiTableInstance->Rsdt1->OemId,
&AcpiTableInstance->Fadt1->Header.OemId, &AcpiTableInstance->Fadt1->Header.OemId,
6 6
); );
CopyMem ( CopyMem(
&AcpiTableInstance->Rsdt1->OemTableId, &AcpiTableInstance->Rsdt1->OemTableId,
&AcpiTableInstance->Fadt1->Header.OemTableId, &AcpiTableInstance->Fadt1->Header.OemTableId,
sizeof (UINT64) sizeof (UINT64)
@ -754,14 +754,14 @@ AddTableToList (
// //
AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3; AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3; Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;
CopyMem ( CopyMem(
&AcpiTableInstance->Fadt3->XFirmwareCtrl, &AcpiTableInstance->Fadt3->XFirmwareCtrl,
&Buffer64, &Buffer64,
sizeof (UINT64) sizeof (UINT64)
); );
AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
CopyMem ( CopyMem(
&AcpiTableInstance->Fadt3->XDsdt, &AcpiTableInstance->Fadt3->XDsdt,
&Buffer64, &Buffer64,
sizeof (UINT64) sizeof (UINT64)
@ -770,7 +770,7 @@ AddTableToList (
// //
// RSDP OEM information is updated to match the FADT OEM information // RSDP OEM information is updated to match the FADT OEM information
// //
CopyMem ( CopyMem(
&AcpiTableInstance->Rsdp3->OemId, &AcpiTableInstance->Rsdp3->OemId,
&AcpiTableInstance->Fadt3->Header.OemId, &AcpiTableInstance->Fadt3->Header.OemId,
6 6
@ -779,12 +779,12 @@ AddTableToList (
// //
// RSDT OEM information is updated to match FADT OEM information. // RSDT OEM information is updated to match FADT OEM information.
// //
CopyMem ( CopyMem(
&AcpiTableInstance->Rsdt3->OemId, &AcpiTableInstance->Rsdt3->OemId,
&AcpiTableInstance->Fadt3->Header.OemId, &AcpiTableInstance->Fadt3->Header.OemId,
6 6
); );
CopyMem ( CopyMem(
&AcpiTableInstance->Rsdt3->OemTableId, &AcpiTableInstance->Rsdt3->OemTableId,
&AcpiTableInstance->Fadt3->Header.OemTableId, &AcpiTableInstance->Fadt3->Header.OemTableId,
sizeof (UINT64) sizeof (UINT64)
@ -794,12 +794,12 @@ AddTableToList (
// //
// XSDT OEM information is updated to match FADT OEM information. // XSDT OEM information is updated to match FADT OEM information.
// //
CopyMem ( CopyMem(
&AcpiTableInstance->Xsdt->OemId, &AcpiTableInstance->Xsdt->OemId,
&AcpiTableInstance->Fadt3->Header.OemId, &AcpiTableInstance->Fadt3->Header.OemId,
6 6
); );
CopyMem ( CopyMem(
&AcpiTableInstance->Xsdt->OemTableId, &AcpiTableInstance->Xsdt->OemTableId,
&AcpiTableInstance->Fadt3->Header.OemTableId, &AcpiTableInstance->Fadt3->Header.OemTableId,
sizeof (UINT64) sizeof (UINT64)
@ -876,7 +876,7 @@ AddTableToList (
if (AcpiTableInstance->Fadt3 != NULL) { if (AcpiTableInstance->Fadt3 != NULL) {
AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3; AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3; Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;
CopyMem ( CopyMem(
&AcpiTableInstance->Fadt3->XFirmwareCtrl, &AcpiTableInstance->Fadt3->XFirmwareCtrl,
&Buffer64, &Buffer64,
sizeof (UINT64) sizeof (UINT64)
@ -953,7 +953,7 @@ AddTableToList (
if (AcpiTableInstance->Fadt3 != NULL) { if (AcpiTableInstance->Fadt3 != NULL) {
AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3;
Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3;
CopyMem ( CopyMem(
&AcpiTableInstance->Fadt3->XDsdt, &AcpiTableInstance->Fadt3->XDsdt,
&Buffer64, &Buffer64,
sizeof (UINT64) sizeof (UINT64)
@ -1096,7 +1096,7 @@ AddTableToList (
// the table pointers in XSDT are not aligned on 8 byte boundary. // the table pointers in XSDT are not aligned on 8 byte boundary.
// //
Buffer64 = (UINT64) (UINTN) CurrentTableList->Table; Buffer64 = (UINT64) (UINTN) CurrentTableList->Table;
CopyMem ( CopyMem(
CurrentXsdtEntry, CurrentXsdtEntry,
&Buffer64, &Buffer64,
sizeof (UINT64) sizeof (UINT64)
@ -1227,7 +1227,7 @@ RemoveTableFromRsdt (
// //
// Read the entry value out of the XSDT // Read the entry value out of the XSDT
// //
CopyMem (&CurrentTablePointer64, CurrentXsdtEntry, sizeof (UINT64)); CopyMem(&CurrentTablePointer64, CurrentXsdtEntry, sizeof (UINT64));
} else { } else {
// //
// Initialize to NULL // Initialize to NULL
@ -1246,10 +1246,10 @@ RemoveTableFromRsdt (
// We actually copy all + 1 to copy the initialized value of memory over // We actually copy all + 1 to copy the initialized value of memory over
// the last entry. // 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); Rsdt->Length = Rsdt->Length - sizeof (UINT32);
if (Xsdt != NULL) { 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); Xsdt->Length = Xsdt->Length - sizeof (UINT64);
} }
break; break;
@ -1830,20 +1830,20 @@ AcpiTableAcpiTableConstructor (
// Initialize RSDP // Initialize RSDP
// //
CurrentData = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE; CurrentData = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE;
CopyMem (&AcpiTableInstance->Rsdp1->Signature, &CurrentData, sizeof (UINT64)); CopyMem(&AcpiTableInstance->Rsdp1->Signature, &CurrentData, sizeof (UINT64));
CopyMem (AcpiTableInstance->Rsdp1->OemId, EFI_ACPI_OEM_ID, 6); CopyMem(AcpiTableInstance->Rsdp1->OemId, EFI_ACPI_OEM_ID, 6);
AcpiTableInstance->Rsdp1->Reserved = EFI_ACPI_RESERVED_BYTE; AcpiTableInstance->Rsdp1->Reserved = EFI_ACPI_RESERVED_BYTE;
AcpiTableInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt1; AcpiTableInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt1;
CurrentData = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE; CurrentData = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE;
CopyMem (&AcpiTableInstance->Rsdp3->Signature, &CurrentData, sizeof (UINT64)); CopyMem(&AcpiTableInstance->Rsdp3->Signature, &CurrentData, sizeof (UINT64));
CopyMem (AcpiTableInstance->Rsdp3->OemId, EFI_ACPI_OEM_ID, 6); CopyMem(AcpiTableInstance->Rsdp3->OemId, EFI_ACPI_OEM_ID, 6);
AcpiTableInstance->Rsdp3->Revision = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION; AcpiTableInstance->Rsdp3->Revision = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION;
AcpiTableInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt3; AcpiTableInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiTableInstance->Rsdt3;
AcpiTableInstance->Rsdp3->Length = sizeof (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER); AcpiTableInstance->Rsdp3->Length = sizeof (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER);
CurrentData = (UINT64) (UINTN) AcpiTableInstance->Xsdt; CurrentData = (UINT64) (UINTN) AcpiTableInstance->Xsdt;
CopyMem (&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64)); CopyMem(&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64));
SetMem (AcpiTableInstance->Rsdp3->Reserved, 3, EFI_ACPI_RESERVED_BYTE); SetMem(AcpiTableInstance->Rsdp3->Reserved, 3, EFI_ACPI_RESERVED_BYTE);
// //
// Initialize Rsdt // Initialize Rsdt
@ -1855,9 +1855,9 @@ AcpiTableAcpiTableConstructor (
AcpiTableInstance->Rsdt1->Signature = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE; AcpiTableInstance->Rsdt1->Signature = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt1->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER); AcpiTableInstance->Rsdt1->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Rsdt1->Revision = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION; 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; 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->OemRevision = EFI_ACPI_OEM_REVISION;
AcpiTableInstance->Rsdt1->CreatorId = EFI_ACPI_CREATOR_ID; AcpiTableInstance->Rsdt1->CreatorId = EFI_ACPI_CREATOR_ID;
AcpiTableInstance->Rsdt1->CreatorRevision = EFI_ACPI_CREATOR_REVISION; 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->Signature = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt3->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER); AcpiTableInstance->Rsdt3->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Rsdt3->Revision = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION; 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; 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->OemRevision = EFI_ACPI_OEM_REVISION;
AcpiTableInstance->Rsdt3->CreatorId = EFI_ACPI_CREATOR_ID; AcpiTableInstance->Rsdt3->CreatorId = EFI_ACPI_CREATOR_ID;
AcpiTableInstance->Rsdt3->CreatorRevision = EFI_ACPI_CREATOR_REVISION; 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->Signature = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Xsdt->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER); AcpiTableInstance->Xsdt->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Xsdt->Revision = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION; 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; 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->OemRevision = EFI_ACPI_OEM_REVISION;
AcpiTableInstance->Xsdt->CreatorId = EFI_ACPI_CREATOR_ID; AcpiTableInstance->Xsdt->CreatorId = EFI_ACPI_CREATOR_ID;
AcpiTableInstance->Xsdt->CreatorRevision = EFI_ACPI_CREATOR_REVISION; AcpiTableInstance->Xsdt->CreatorRevision = EFI_ACPI_CREATOR_REVISION;

View File

@ -53,7 +53,7 @@ AmlCreateNode (
// ASSERT (AmlNodeList != NULL); // ASSERT (AmlNodeList != NULL);
AmlNodeList->Signature = EFI_AML_NODE_LIST_SIGNATURE; 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->Buffer = NULL;
AmlNodeList->Size = 0; AmlNodeList->Size = 0;
InitializeListHead (&AmlNodeList->Link); InitializeListHead (&AmlNodeList->Link);

View File

@ -355,7 +355,7 @@ AmlGetAslNameStringSize (
@param[in] Length Buffer length. @param[in] Length Buffer length.
**/ **/
VOID VOID
AmlUpperCaseCopyMem ( AmlUpperCaseCopyMem(
IN UINT8 *DstBuffer, IN UINT8 *DstBuffer,
IN UINT8 *SrcBuffer, IN UINT8 *SrcBuffer,
IN UINTN Length IN UINTN Length
@ -413,7 +413,7 @@ AmlNameFromAslName (
AmlBuffer ++; AmlBuffer ++;
Buffer ++; Buffer ++;
} else if (Parent > 0) { } else if (Parent > 0) {
SetMem (AmlBuffer, Parent, AML_PARENT_PREFIX_CHAR); SetMem(AmlBuffer, Parent, AML_PARENT_PREFIX_CHAR);
AmlBuffer += Parent; AmlBuffer += Parent;
Buffer += Parent; Buffer += Parent;
} }
@ -437,8 +437,8 @@ AmlNameFromAslName (
while (*Buffer != 0) { while (*Buffer != 0) {
NameLength = AmlGetAslNameSegLength (Buffer); NameLength = AmlGetAslNameSegLength (Buffer);
ASSERT ((NameLength != 0) && (NameLength <= AML_NAME_SEG_SIZE)); ASSERT ((NameLength != 0) && (NameLength <= AML_NAME_SEG_SIZE));
AmlUpperCaseCopyMem (AmlBuffer, Buffer, NameLength); AmlUpperCaseCopyMem(AmlBuffer, Buffer, NameLength);
SetMem (AmlBuffer + NameLength, AML_NAME_SEG_SIZE - NameLength, AML_NAME_CHAR__); SetMem(AmlBuffer + NameLength, AML_NAME_SEG_SIZE - NameLength, AML_NAME_CHAR__);
Buffer += NameLength; Buffer += NameLength;
AmlBuffer += AML_NAME_SEG_SIZE; AmlBuffer += AML_NAME_SEG_SIZE;
if (*Buffer == 0) { if (*Buffer == 0) {

View File

@ -737,8 +737,8 @@ BdsDxeSetVariableAndReportStatusCodeOnError (
SetVariableStatus->DataSize = DataSize; SetVariableStatus->DataSize = DataSize;
SetVariableStatus->SetStatus = Status; SetVariableStatus->SetStatus = Status;
SetVariableStatus->Attributes = Attributes; SetVariableStatus->Attributes = Attributes;
CopyMem (SetVariableStatus + 1, VariableName, NameSize); CopyMem(SetVariableStatus + 1, VariableName, NameSize);
CopyMem (((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize); CopyMem(((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, DataSize);
REPORT_STATUS_CODE_EX ( REPORT_STATUS_CODE_EX (
EFI_ERROR_CODE, EFI_ERROR_CODE,

View File

@ -141,7 +141,7 @@ OrderLegacyBootOption4SameType (
// //
// Overwrite the old BootOption // Overwrite the old BootOption
// //
CopyMem (&BootOrder[StartPosition], NewBootOption, (*DisBootOptionCount + *EnBootOptionCount) * sizeof (UINT16)); CopyMem(&BootOrder[StartPosition], NewBootOption, (*DisBootOptionCount + *EnBootOptionCount) * sizeof (UINT16));
Status = gRT->SetVariable ( Status = gRT->SetVariable (
L"BootOrder", L"BootOrder",
&gEfiGlobalVariableGuid, &gEfiGlobalVariableGuid,
@ -192,7 +192,7 @@ GroupMultipleLegacyBootOption4SameType (
BDS_COMMON_OPTION *BootOption; BDS_COMMON_OPTION *BootOption;
LIST_ENTRY List; LIST_ENTRY List;
SetMem (DeviceTypeIndex, sizeof (DeviceTypeIndex), 0xff); SetMem(DeviceTypeIndex, sizeof (DeviceTypeIndex), 0xff);
BootOrder = BdsLibGetVariableAndSize ( BootOrder = BdsLibGetVariableAndSize (
L"BootOrder", L"BootOrder",
@ -224,7 +224,7 @@ GroupMultipleLegacyBootOption4SameType (
// insert the current boot option before *NextIndex, causing [*Next .. Index] shift right one position // insert the current boot option before *NextIndex, causing [*Next .. Index] shift right one position
// //
OptionNumber = BootOrder[Index]; 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; BootOrder[*NextIndex] = OptionNumber;
// //

View File

@ -281,7 +281,7 @@ EfiStrDuplicate (
Dest = AllocatePool (Size); //don't need to zero because of CopyMem. SpeedUp Dest = AllocatePool (Size); //don't need to zero because of CopyMem. SpeedUp
// ASSERT (Dest != NULL); // ASSERT (Dest != NULL);
if (Dest != NULL) { if (Dest != NULL) {
CopyMem (Dest, Src, Size); CopyMem(Dest, Src, Size);
} }
return Dest; return Dest;
@ -420,7 +420,7 @@ EfiReallocatePool (
if (OldPool != NULL) { if (OldPool != NULL) {
if (NewPool != NULL) { if (NewPool != NULL) {
CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize); CopyMem(NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
} }
FreePool(OldPool); FreePool(OldPool);

View File

@ -172,7 +172,7 @@ InitializeBmmConfig (
// //
// Backup Initialize BMM configuartion data to BmmOldFakeNVData // 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. // 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; return EFI_SUCCESS;
} }
@ -1030,7 +1030,7 @@ BootMaintCallback (
Index++; Index++;
} }
CopyMem ( CopyMem(
OldLegacyDev, OldLegacyDev,
NewLegacyDev, NewLegacyDev,
Number Number
@ -1090,11 +1090,11 @@ DiscardChangeHandler (
switch (Private->BmmPreviousPageId) { switch (Private->BmmPreviousPageId) {
case FORM_BOOT_CHG_ID: case FORM_BOOT_CHG_ID:
CopyMem (CurrentFakeNVMap->BootOptionOrder, Private->BmmOldFakeNVData.BootOptionOrder, sizeof (CurrentFakeNVMap->BootOptionOrder)); CopyMem(CurrentFakeNVMap->BootOptionOrder, Private->BmmOldFakeNVData.BootOptionOrder, sizeof (CurrentFakeNVMap->BootOptionOrder));
break; break;
case FORM_DRV_CHG_ID: case FORM_DRV_CHG_ID:
CopyMem (CurrentFakeNVMap->DriverOptionOrder, Private->BmmOldFakeNVData.DriverOptionOrder, sizeof (CurrentFakeNVMap->DriverOptionOrder)); CopyMem(CurrentFakeNVMap->DriverOptionOrder, Private->BmmOldFakeNVData.DriverOptionOrder, sizeof (CurrentFakeNVMap->DriverOptionOrder));
break; break;
case FORM_BOOT_DEL_ID: case FORM_BOOT_DEL_ID:
@ -1196,7 +1196,7 @@ InitializeBM (
// //
Data = (UINT8 *)(PackageListHeader + 1); Data = (UINT8 *)(PackageListHeader + 1);
Length = ReadUnaligned32 ((UINT32 *) BdsDxeStrings) - sizeof (UINT32); 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. // Add End type HII package.

View File

@ -941,7 +941,7 @@ BOpt_GetBootOptions (
continue; continue;
} }
CopyMem (LoadOption, LoadOptionFromVar, BootOptionSize); CopyMem(LoadOption, LoadOptionFromVar, BootOptionSize);
FreePool(LoadOptionFromVar); FreePool(LoadOptionFromVar);
if (BootNext != NULL) { if (BootNext != NULL) {
@ -1033,7 +1033,7 @@ BOpt_GetBootOptions (
NewLoadContext->FilePathList = AllocateZeroPool(NewLoadContext->FilePathListLength); NewLoadContext->FilePathList = AllocateZeroPool(NewLoadContext->FilePathListLength);
ASSERT (NewLoadContext->FilePathList != NULL); ASSERT (NewLoadContext->FilePathList != NULL);
CopyMem ( CopyMem(
NewLoadContext->FilePathList, NewLoadContext->FilePathList,
(EFI_DEVICE_PATH_PROTOCOL *) LoadOptionPtr, (EFI_DEVICE_PATH_PROTOCOL *) LoadOptionPtr,
NewLoadContext->FilePathListLength NewLoadContext->FilePathListLength
@ -1059,7 +1059,7 @@ BOpt_GetBootOptions (
NewLoadContext->OptionalData = AllocateZeroPool(OptionalDataSize); NewLoadContext->OptionalData = AllocateZeroPool(OptionalDataSize);
ASSERT (NewLoadContext->OptionalData != NULL); ASSERT (NewLoadContext->OptionalData != NULL);
CopyMem ( CopyMem(
NewLoadContext->OptionalData, NewLoadContext->OptionalData,
LoadOptionPtr, LoadOptionPtr,
OptionalDataSize OptionalDataSize
@ -1536,7 +1536,7 @@ BOpt_GetDriverOptions (
continue; continue;
} }
CopyMem (LoadOption, LoadOptionFromVar, DriverOptionSize); CopyMem(LoadOption, LoadOptionFromVar, DriverOptionSize);
FreePool(LoadOptionFromVar); FreePool(LoadOptionFromVar);
NewMenuEntry = BOpt_CreateMenuEntry (BM_LOAD_CONTEXT_SELECT); NewMenuEntry = BOpt_CreateMenuEntry (BM_LOAD_CONTEXT_SELECT);
@ -1573,7 +1573,7 @@ BOpt_GetDriverOptions (
StringSize = StrSize ((UINT16 *) LoadOptionPtr); StringSize = StrSize ((UINT16 *) LoadOptionPtr);
NewLoadContext->Description = AllocateZeroPool(StringSize); NewLoadContext->Description = AllocateZeroPool(StringSize);
ASSERT (NewLoadContext->Description != NULL); ASSERT (NewLoadContext->Description != NULL);
CopyMem ( CopyMem(
NewLoadContext->Description, NewLoadContext->Description,
(UINT16 *) LoadOptionPtr, (UINT16 *) LoadOptionPtr,
StringSize StringSize
@ -1584,7 +1584,7 @@ BOpt_GetDriverOptions (
NewLoadContext->FilePathList = AllocateZeroPool(NewLoadContext->FilePathListLength); NewLoadContext->FilePathList = AllocateZeroPool(NewLoadContext->FilePathListLength);
ASSERT (NewLoadContext->FilePathList != NULL); ASSERT (NewLoadContext->FilePathList != NULL);
CopyMem ( CopyMem(
NewLoadContext->FilePathList, NewLoadContext->FilePathList,
(EFI_DEVICE_PATH_PROTOCOL *) LoadOptionPtr, (EFI_DEVICE_PATH_PROTOCOL *) LoadOptionPtr,
NewLoadContext->FilePathListLength NewLoadContext->FilePathListLength
@ -1610,7 +1610,7 @@ BOpt_GetDriverOptions (
NewLoadContext->OptionalData = AllocateZeroPool(OptionalDataSize); NewLoadContext->OptionalData = AllocateZeroPool(OptionalDataSize);
ASSERT (NewLoadContext->OptionalData != NULL); ASSERT (NewLoadContext->OptionalData != NULL);
CopyMem ( CopyMem(
NewLoadContext->OptionalData, NewLoadContext->OptionalData,
LoadOptionPtr, LoadOptionPtr,
OptionalDataSize OptionalDataSize
@ -1793,7 +1793,7 @@ GetLegacyDeviceOrder (
LegacyOrder[OptionIndex] = (UINT8) (VarDevOrder & 0xFF); LegacyOrder[OptionIndex] = (UINT8) (VarDevOrder & 0xFF);
} }
} }
CopyMem (OldData, LegacyOrder, 100); CopyMem(OldData, LegacyOrder, 100);
} }
} }
} }

View File

@ -118,7 +118,7 @@ ChangeTerminalDevicePath (
while (!IsDevicePathEnd (Node)) { while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node; Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) { if (IsIsaSerialNode (Acpi)) {
CopyMem (&Com, &Acpi->UID, sizeof (UINT32)); CopyMem(&Com, &Acpi->UID, sizeof (UINT32));
} }
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Com); NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Com);
@ -126,25 +126,25 @@ ChangeTerminalDevicePath (
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) { if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
Uart = (UART_DEVICE_PATH *) Node; Uart = (UART_DEVICE_PATH *) Node;
CopyMem ( CopyMem(
&Uart->BaudRate, &Uart->BaudRate,
&NewTerminalContext->BaudRate, &NewTerminalContext->BaudRate,
sizeof (UINT64) sizeof (UINT64)
); );
CopyMem ( CopyMem(
&Uart->DataBits, &Uart->DataBits,
&NewTerminalContext->DataBits, &NewTerminalContext->DataBits,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&Uart->Parity, &Uart->Parity,
&NewTerminalContext->Parity, &NewTerminalContext->Parity,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&Uart->StopBits, &Uart->StopBits,
&NewTerminalContext->StopBits, &NewTerminalContext->StopBits,
sizeof (UINT8) sizeof (UINT8)
@ -175,25 +175,25 @@ ChangeTerminalDevicePath (
while (!IsDevicePathEnd (Node1)) { while (!IsDevicePathEnd (Node1)) {
if ((DevicePathType (Node1) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node1) == MSG_UART_DP)) { if ((DevicePathType (Node1) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node1) == MSG_UART_DP)) {
Uart1 = (UART_DEVICE_PATH *) Node1; Uart1 = (UART_DEVICE_PATH *) Node1;
CopyMem ( CopyMem(
&Uart1->BaudRate, &Uart1->BaudRate,
&NewTerminalContext->BaudRate, &NewTerminalContext->BaudRate,
sizeof (UINT64) sizeof (UINT64)
); );
CopyMem ( CopyMem(
&Uart1->DataBits, &Uart1->DataBits,
&NewTerminalContext->DataBits, &NewTerminalContext->DataBits,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&Uart1->Parity, &Uart1->Parity,
&NewTerminalContext->Parity, &NewTerminalContext->Parity,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&Uart1->StopBits, &Uart1->StopBits,
&NewTerminalContext->StopBits, &NewTerminalContext->StopBits,
sizeof (UINT8) sizeof (UINT8)
@ -245,7 +245,7 @@ ChangeVariableDevicePath (
while (!IsDevicePathEnd (Node)) { while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node; Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) { 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)) { if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
@ -259,25 +259,25 @@ ChangeVariableDevicePath (
// ASSERT (NewMenuEntry != NULL); // ASSERT (NewMenuEntry != NULL);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
Uart = (UART_DEVICE_PATH *) Node; Uart = (UART_DEVICE_PATH *) Node;
CopyMem ( CopyMem(
&Uart->BaudRate, &Uart->BaudRate,
&NewTerminalContext->BaudRate, &NewTerminalContext->BaudRate,
sizeof (UINT64) sizeof (UINT64)
); );
CopyMem ( CopyMem(
&Uart->DataBits, &Uart->DataBits,
&NewTerminalContext->DataBits, &NewTerminalContext->DataBits,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&Uart->Parity, &Uart->Parity,
&NewTerminalContext->Parity, &NewTerminalContext->Parity,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&Uart->StopBits, &Uart->StopBits,
&NewTerminalContext->StopBits, &NewTerminalContext->StopBits,
sizeof (UINT8) sizeof (UINT8)
@ -330,7 +330,7 @@ RetrieveUartUid (
if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) { if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) {
if (AcpiUid != NULL) { if (AcpiUid != NULL) {
CopyMem (AcpiUid, &Acpi->UID, sizeof (UINT32)); CopyMem(AcpiUid, &Acpi->UID, sizeof (UINT32));
} }
return TRUE; return TRUE;
} else { } else {
@ -484,7 +484,7 @@ LocateSerialIo (
} }
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
CopyMem (&NewMenuEntry->OptionNumber, &Acpi->UID, sizeof (UINT32)); CopyMem(&NewMenuEntry->OptionNumber, &Acpi->UID, sizeof (UINT32));
NewTerminalContext->DevicePath = DuplicateDevicePath (DevicePath); NewTerminalContext->DevicePath = DuplicateDevicePath (DevicePath);
// //
// BugBug: I have no choice, calling EfiLibStrFromDatahub will hang the system! // BugBug: I have no choice, calling EfiLibStrFromDatahub will hang the system!
@ -505,25 +505,25 @@ LocateSerialIo (
(VOID **) &SerialIo (VOID **) &SerialIo
); );
CopyMem ( CopyMem(
&NewTerminalContext->BaudRate, &NewTerminalContext->BaudRate,
&SerialIo->Mode->BaudRate, &SerialIo->Mode->BaudRate,
sizeof (UINT64) sizeof (UINT64)
); );
CopyMem ( CopyMem(
&NewTerminalContext->DataBits, &NewTerminalContext->DataBits,
&SerialIo->Mode->DataBits, &SerialIo->Mode->DataBits,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&NewTerminalContext->Parity, &NewTerminalContext->Parity,
&SerialIo->Mode->Parity, &SerialIo->Mode->Parity,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&NewTerminalContext->StopBits, &NewTerminalContext->StopBits,
&SerialIo->Mode->StopBits, &SerialIo->Mode->StopBits,
sizeof (UINT8) sizeof (UINT8)
@ -578,7 +578,7 @@ LocateSerialIo (
Vendor.Header.SubType = MSG_VENDOR_DP; Vendor.Header.SubType = MSG_VENDOR_DP;
for (Index2 = 0; Index2 < 4; Index2++) { 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)); SetDevicePathNodeLength (&Vendor.Header, sizeof (VENDOR_DEVICE_PATH));
NewDevicePath = AppendDevicePathNode ( NewDevicePath = AppendDevicePathNode (
NewTerminalContext->DevicePath, NewTerminalContext->DevicePath,
@ -646,7 +646,7 @@ UpdateComAttributeFromVariable (
while (!IsDevicePathEnd (Node)) { while (!IsDevicePathEnd (Node)) {
Acpi = (ACPI_HID_DEVICE_PATH *) Node; Acpi = (ACPI_HID_DEVICE_PATH *) Node;
if (IsIsaSerialNode (Acpi)) { 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)) { if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (Node) == MSG_UART_DP)) {
@ -657,25 +657,25 @@ UpdateComAttributeFromVariable (
} }
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
CopyMem ( CopyMem(
&NewTerminalContext->BaudRate, &NewTerminalContext->BaudRate,
&Uart->BaudRate, &Uart->BaudRate,
sizeof (UINT64) sizeof (UINT64)
); );
CopyMem ( CopyMem(
&NewTerminalContext->DataBits, &NewTerminalContext->DataBits,
&Uart->DataBits, &Uart->DataBits,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&NewTerminalContext->Parity, &NewTerminalContext->Parity,
&Uart->Parity, &Uart->Parity,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&NewTerminalContext->StopBits, &NewTerminalContext->StopBits,
&Uart->StopBits, &Uart->StopBits,
sizeof (UINT8) sizeof (UINT8)
@ -701,23 +701,23 @@ UpdateComAttributeFromVariable (
// previous acquired uart attributes // previous acquired uart attributes
// //
Uart1 = (UART_DEVICE_PATH *) SerialNode; Uart1 = (UART_DEVICE_PATH *) SerialNode;
CopyMem ( CopyMem(
&Uart1->BaudRate, &Uart1->BaudRate,
&NewTerminalContext->BaudRate, &NewTerminalContext->BaudRate,
sizeof (UINT64) sizeof (UINT64)
); );
CopyMem ( CopyMem(
&Uart1->DataBits, &Uart1->DataBits,
&NewTerminalContext->DataBits, &NewTerminalContext->DataBits,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&Uart1->Parity, &Uart1->Parity,
&NewTerminalContext->Parity, &NewTerminalContext->Parity,
sizeof (UINT8) sizeof (UINT8)
); );
CopyMem ( CopyMem(
&Uart1->StopBits, &Uart1->StopBits,
&NewTerminalContext->StopBits, &NewTerminalContext->StopBits,
sizeof (UINT8) sizeof (UINT8)
@ -1014,7 +1014,7 @@ IsTerminalDevicePath (
} }
if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) { if ((Acpi != NULL) && IsIsaSerialNode (Acpi)) {
CopyMem (Com, &Acpi->UID, sizeof (UINT32)); CopyMem(Com, &Acpi->UID, sizeof (UINT32));
} else { } else {
return FALSE; return FALSE;
} }

View File

@ -1438,7 +1438,7 @@ UpdateSetLegacyDeviceOrderPage (
} }
} }
CopyMem (OldData, LegacyOrder, 100); CopyMem(OldData, LegacyOrder, 100);
HiiFreeOpCodeHandle (OptionsOpCodeHandle); HiiFreeOpCodeHandle (OptionsOpCodeHandle);

View File

@ -439,7 +439,7 @@ Var_UpdateConsoleOption (
Vendor.Header.SubType = MSG_VENDOR_DP; Vendor.Header.SubType = MSG_VENDOR_DP;
ASSERT (NewTerminalContext->TerminalType < (sizeof (TerminalTypeGuid) / sizeof (TerminalTypeGuid[0]))); ASSERT (NewTerminalContext->TerminalType < (sizeof (TerminalTypeGuid) / sizeof (TerminalTypeGuid[0])));
CopyMem ( CopyMem(
&Vendor.Guid, &Vendor.Guid,
&TerminalTypeGuid[NewTerminalContext->TerminalType], &TerminalTypeGuid[NewTerminalContext->TerminalType],
sizeof (EFI_GUID) sizeof (EFI_GUID)
@ -609,7 +609,7 @@ Var_UpdateDriverOption (
NewLoadContext->FilePathListLength = *((UINT16 *) Ptr); NewLoadContext->FilePathListLength = *((UINT16 *) Ptr);
Ptr += sizeof (UINT16); Ptr += sizeof (UINT16);
CopyMem ( CopyMem(
Ptr, Ptr,
DescriptionData, DescriptionData,
StrSize (DescriptionData) StrSize (DescriptionData)
@ -618,14 +618,14 @@ Var_UpdateDriverOption (
NewLoadContext->Description = AllocateZeroPool(StrSize (DescriptionData)); NewLoadContext->Description = AllocateZeroPool(StrSize (DescriptionData));
ASSERT (NewLoadContext->Description != NULL); ASSERT (NewLoadContext->Description != NULL);
NewMenuEntry->DisplayString = NewLoadContext->Description; NewMenuEntry->DisplayString = NewLoadContext->Description;
CopyMem ( CopyMem(
NewLoadContext->Description, NewLoadContext->Description,
(VOID *) Ptr, (VOID *) Ptr,
StrSize (DescriptionData) StrSize (DescriptionData)
); );
Ptr += StrSize (DescriptionData); Ptr += StrSize (DescriptionData);
CopyMem ( CopyMem(
Ptr, Ptr,
CallbackData->LoadContext->FilePathList, CallbackData->LoadContext->FilePathList,
GetDevicePathSize (CallbackData->LoadContext->FilePathList) GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@ -634,7 +634,7 @@ Var_UpdateDriverOption (
NewLoadContext->FilePathList = AllocateZeroPool(GetDevicePathSize (CallbackData->LoadContext->FilePathList)); NewLoadContext->FilePathList = AllocateZeroPool(GetDevicePathSize (CallbackData->LoadContext->FilePathList));
ASSERT (NewLoadContext->FilePathList != NULL); ASSERT (NewLoadContext->FilePathList != NULL);
CopyMem ( CopyMem(
NewLoadContext->FilePathList, NewLoadContext->FilePathList,
(VOID *) Ptr, (VOID *) Ptr,
GetDevicePathSize (CallbackData->LoadContext->FilePathList) GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@ -657,7 +657,7 @@ Var_UpdateDriverOption (
if (OptionalDataExist) { if (OptionalDataExist) {
Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList); Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList);
CopyMem ( CopyMem(
Ptr, Ptr,
OptionalData, OptionalData,
StrSize (OptionalData) StrSize (OptionalData)
@ -680,7 +680,7 @@ Var_UpdateDriverOption (
NewDriverOrderList = AllocateZeroPool(DriverOrderListSize + sizeof (UINT16)); NewDriverOrderList = AllocateZeroPool(DriverOrderListSize + sizeof (UINT16));
ASSERT (NewDriverOrderList != NULL); ASSERT (NewDriverOrderList != NULL);
if (DriverOrderList != NULL) { if (DriverOrderList != NULL) {
CopyMem (NewDriverOrderList, DriverOrderList, DriverOrderListSize); CopyMem(NewDriverOrderList, DriverOrderList, DriverOrderListSize);
EfiLibDeleteVariable (L"DriverOrder", &gEfiGlobalVariableGuid); EfiLibDeleteVariable (L"DriverOrder", &gEfiGlobalVariableGuid);
} }
NewDriverOrderList[DriverOrderListSize / sizeof (UINT16)] = Index; NewDriverOrderList[DriverOrderListSize / sizeof (UINT16)] = Index;
@ -793,7 +793,7 @@ Var_UpdateBootOption (
NewLoadContext->FilePathListLength = *((UINT16 *) Ptr); NewLoadContext->FilePathListLength = *((UINT16 *) Ptr);
Ptr += sizeof (UINT16); Ptr += sizeof (UINT16);
CopyMem ( CopyMem(
Ptr, Ptr,
NvRamMap->BootDescriptionData, NvRamMap->BootDescriptionData,
StrSize (NvRamMap->BootDescriptionData) StrSize (NvRamMap->BootDescriptionData)
@ -803,14 +803,14 @@ Var_UpdateBootOption (
ASSERT (NewLoadContext->Description != NULL); ASSERT (NewLoadContext->Description != NULL);
NewMenuEntry->DisplayString = NewLoadContext->Description; NewMenuEntry->DisplayString = NewLoadContext->Description;
CopyMem ( CopyMem(
NewLoadContext->Description, NewLoadContext->Description,
(VOID *) Ptr, (VOID *) Ptr,
StrSize (NvRamMap->BootDescriptionData) StrSize (NvRamMap->BootDescriptionData)
); );
Ptr += StrSize (NvRamMap->BootDescriptionData); Ptr += StrSize (NvRamMap->BootDescriptionData);
CopyMem ( CopyMem(
Ptr, Ptr,
CallbackData->LoadContext->FilePathList, CallbackData->LoadContext->FilePathList,
GetDevicePathSize (CallbackData->LoadContext->FilePathList) GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@ -819,7 +819,7 @@ Var_UpdateBootOption (
NewLoadContext->FilePathList = AllocateZeroPool(GetDevicePathSize (CallbackData->LoadContext->FilePathList)); NewLoadContext->FilePathList = AllocateZeroPool(GetDevicePathSize (CallbackData->LoadContext->FilePathList));
ASSERT (NewLoadContext->FilePathList != NULL); ASSERT (NewLoadContext->FilePathList != NULL);
CopyMem ( CopyMem(
NewLoadContext->FilePathList, NewLoadContext->FilePathList,
(VOID *) Ptr, (VOID *) Ptr,
GetDevicePathSize (CallbackData->LoadContext->FilePathList) GetDevicePathSize (CallbackData->LoadContext->FilePathList)
@ -842,7 +842,7 @@ Var_UpdateBootOption (
if (OptionalDataExist) { if (OptionalDataExist) {
Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList); Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList);
CopyMem (Ptr, NvRamMap->BootOptionalData, StrSize (NvRamMap->BootOptionalData)); CopyMem(Ptr, NvRamMap->BootOptionalData, StrSize (NvRamMap->BootOptionalData));
} }
Status = gRT->SetVariable ( Status = gRT->SetVariable (
@ -864,7 +864,7 @@ if (BootOrderList != NULL) {
NewBootOrderList = AllocateZeroPool(BootOrderListSize + sizeof (UINT16)); NewBootOrderList = AllocateZeroPool(BootOrderListSize + sizeof (UINT16));
// ASSERT (NewBootOrderList != NULL); // ASSERT (NewBootOrderList != NULL);
if (NewBootOrderList != NULL) { if (NewBootOrderList != NULL) {
CopyMem (NewBootOrderList, BootOrderList, BootOrderListSize); CopyMem(NewBootOrderList, BootOrderList, BootOrderListSize);
NewBootOrderList[BootOrderListSize / sizeof (UINT16)] = Index; NewBootOrderList[BootOrderListSize / sizeof (UINT16)] = Index;
} }
@ -1005,7 +1005,7 @@ Var_UpdateBootOrder (
for (Index = OrderIndex; Index < BootOrderListSize / sizeof (UINT16); Index++) { for (Index = OrderIndex; Index < BootOrderListSize / sizeof (UINT16); Index++) {
if ((BootOrderList[Index] == (UINT16) (CallbackData->BmmFakeNvData.BootOptionOrder[OrderIndex] - 1)) && (OrderIndex != Index)) { if ((BootOrderList[Index] == (UINT16) (CallbackData->BmmFakeNvData.BootOptionOrder[OrderIndex] - 1)) && (OrderIndex != Index)) {
OptionNumber = BootOrderList[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; BootOrderList[OrderIndex] = OptionNumber;
} }
} }
@ -1238,7 +1238,7 @@ Var_UpdateBBSOption (
} }
} }
CopyMem ( CopyMem(
DevOrder->Data, DevOrder->Data,
NewOrder, NewOrder,
DevOrder->Length - sizeof (DevOrder->Length) DevOrder->Length - sizeof (DevOrder->Length)

View File

@ -291,7 +291,7 @@ ExtractDisplayedHiiFormFromHiiHandle (
while (Offset < PackageListLength) { while (Offset < PackageListLength) {
Package = ((UINT8 *) HiiPackageList) + Offset; 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) { if (PackageHeader.Type == EFI_HII_PACKAGE_FORMS) {
// //
@ -316,8 +316,8 @@ ExtractDisplayedHiiFormFromHiiHandle (
ClassGuid = (EFI_GUID *) (VOID *)(OpCodeData + sizeof (EFI_IFR_FORM_SET)); ClassGuid = (EFI_GUID *) (VOID *)(OpCodeData + sizeof (EFI_IFR_FORM_SET));
while (ClassGuidNum-- > 0) { while (ClassGuidNum-- > 0) {
if (CompareGuid (SetupClassGuid, ClassGuid)) { if (CompareGuid (SetupClassGuid, ClassGuid)) {
CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, 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)); CopyMem(FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
*FormSetGuid = AllocateCopyPool(sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid); *FormSetGuid = AllocateCopyPool(sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
ASSERT (*FormSetGuid != NULL); ASSERT (*FormSetGuid != NULL);
FreePool(HiiPackageList); FreePool(HiiPackageList);
@ -326,8 +326,8 @@ ExtractDisplayedHiiFormFromHiiHandle (
ClassGuid ++; ClassGuid ++;
} }
} else { } else {
CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, 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)); CopyMem(FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
*FormSetGuid = AllocateCopyPool(sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid); *FormSetGuid = AllocateCopyPool(sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
ASSERT (*FormSetGuid != NULL); ASSERT (*FormSetGuid != NULL);
FreePool(HiiPackageList); FreePool(HiiPackageList);
@ -773,14 +773,14 @@ AdjustArrayData (
NewHiiHandles = AllocateZeroPool((ArrayCount + 2) * sizeof (EFI_HII_HANDLE)); NewHiiHandles = AllocateZeroPool((ArrayCount + 2) * sizeof (EFI_HII_HANDLE));
ASSERT (NewHiiHandles != NULL); ASSERT (NewHiiHandles != NULL);
CopyMem (NewHiiHandles, *HiiHandles, Offset * sizeof (EFI_HII_HANDLE)); CopyMem(NewHiiHandles, *HiiHandles, Offset * sizeof (EFI_HII_HANDLE));
NewHiiHandles[Offset] = NewHiiHandles[Offset - 1]; 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 *)); NewGuidLists = AllocateZeroPool((ArrayCount + 2) * sizeof (EFI_GUID *));
ASSERT (NewGuidLists != NULL); ASSERT (NewGuidLists != NULL);
CopyMem (NewGuidLists, *GuidLists, Offset * sizeof (EFI_GUID *)); CopyMem(NewGuidLists, *GuidLists, Offset * sizeof (EFI_GUID *));
NewGuidLists[Offset] = FormSetGuid; NewGuidLists[Offset] = FormSetGuid;
FreePool(*HiiHandles); FreePool(*HiiHandles);

View File

@ -918,9 +918,9 @@ ShowProgress (
// DEBUG ((EFI_D_INFO, "\n\nStart showing progress bar... Press any key to stop it! ...Zzz....\n")); // 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(&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0); SetMem(&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff); SetMem(&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
TmpStr = GetStringById (STRING_TOKEN (STR_START_BOOT_OPTION)); TmpStr = GetStringById (STRING_TOKEN (STR_START_BOOT_OPTION));

View File

@ -206,7 +206,7 @@ RegisterHotkey (
} }
if (KeyOrder != NULL) { if (KeyOrder != NULL) {
CopyMem (NewKeyOrder, KeyOrder, KeyOrderSize); CopyMem(NewKeyOrder, KeyOrder, KeyOrderSize);
} }
NewKeyOrder[Index] = RegisterOptionNumber; NewKeyOrder[Index] = RegisterOptionNumber;
@ -765,7 +765,7 @@ HotkeyGetOptionNumbers (
break; break;
} }
} }
CopyMem (&OptionNumbers[Index + 1], &OptionNumbers[Index], (*Count - Index) * sizeof (UINT16)); CopyMem(&OptionNumbers[Index + 1], &OptionNumbers[Index], (*Count - Index) * sizeof (UINT16));
OptionNumbers[Index] = OptionNumber; OptionNumbers[Index] = OptionNumber;
(*Count)++; (*Count)++;
} }

View File

@ -302,7 +302,7 @@ GetNextLanguage (
Index++; Index++;
} }
CopyMem (Lang, StringPtr, Index); CopyMem(Lang, StringPtr, Index);
Lang[Index] = 0; Lang[Index] = 0;
if (StringPtr[Index] == ';') { if (StringPtr[Index] == ';') {

View File

@ -113,7 +113,7 @@ PlatformBdsShowProgress (
// //
// Clear progress area // Clear progress area
// //
SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0); SetMem(&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
if (GraphicsOutput != NULL) { if (GraphicsOutput != NULL) {
/*Status = */GraphicsOutput->Blt ( /*Status = */GraphicsOutput->Blt (
@ -250,9 +250,9 @@ BdsMemoryTest (
ErrorOut = FALSE; ErrorOut = FALSE;
TestAbort = FALSE; TestAbort = FALSE;
SetMem (&Foreground, 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(&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff); SetMem(&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
RequireSoftECCInit = FALSE; RequireSoftECCInit = FALSE;

View File

@ -59,7 +59,7 @@ GrowDepexStack (
// //
// Copy to Old Stack to the New Stack // Copy to Old Stack to the New Stack
// //
CopyMem ( CopyMem(
NewStack, NewStack,
mDepexEvaluationStack, mDepexEvaluationStack,
(mDepexEvaluationStackEnd - mDepexEvaluationStack) * sizeof (BOOLEAN) (mDepexEvaluationStackEnd - mDepexEvaluationStack) * sizeof (BOOLEAN)
@ -187,7 +187,7 @@ CorePreProcessDepex (
} }
if (DriverEntry->Before || DriverEntry->After) { if (DriverEntry->Before || DriverEntry->After) {
CopyMem (&DriverEntry->BeforeAfterGuid, Iterator + 1, sizeof (EFI_GUID)); CopyMem(&DriverEntry->BeforeAfterGuid, Iterator + 1, sizeof (EFI_GUID));
} }
return EFI_SUCCESS; return EFI_SUCCESS;
@ -301,7 +301,7 @@ CoreIsSchedulable (
// Push operator is followed by a GUID. Test to see if the GUID protocol // Push operator is followed by a GUID. Test to see if the GUID protocol
// is installed and push the boolean result on the stack. // 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); Status = CoreLocateProtocol (&DriverGuid, NULL, &Interface);
@ -407,7 +407,7 @@ CoreIsSchedulable (
return Operator; return Operator;
case EFI_DEP_REPLACE_TRUE: 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)); DEBUG ((DEBUG_DISPATCH, " PUSH GUID(%g) = TRUE\n", &DriverGuid));
Status = PushBool (TRUE); Status = PushBool (TRUE);

View File

@ -1061,7 +1061,7 @@ CoreProcessFvImageFile (
// //
// Move FvImage into the aligned buffer and release the original buffer. // 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; FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) AlignedBuffer;
CoreFreePool(Buffer); CoreFreePool(Buffer);
Buffer = NULL; Buffer = NULL;

View File

@ -174,14 +174,14 @@ GenericProtocolNotify (
// Copy all the registered Image to new gRuntime protocol // Copy all the registered Image to new gRuntime protocol
// //
for (Link = gRuntimeTemplate.ImageHead.ForwardLink; Link != &gRuntimeTemplate.ImageHead; Link = TempLinkNode.ForwardLink) { 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); InsertTailList (&gRuntime->ImageHead, Link);
} }
// //
// Copy all the registered Event to new gRuntime protocol // Copy all the registered Event to new gRuntime protocol
// //
for (Link = gRuntimeTemplate.EventHead.ForwardLink; Link != &gRuntimeTemplate.EventHead; Link = TempLinkNode.ForwardLink) { 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); InsertTailList (&gRuntime->EventHead, Link);
} }

View File

@ -209,7 +209,7 @@ GetFwVolHeader (
// //
// Copy the standard header into the buffer // 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 // Read the rest of the header

View File

@ -365,7 +365,7 @@ FvReadFile (
// //
// Copy data into callers buffer // Copy data into callers buffer
// //
CopyMem (*Buffer, SrcPtr, FileSize); CopyMem(*Buffer, SrcPtr, FileSize);
return Status; return Status;
} }

View File

@ -255,7 +255,7 @@ FwVolBlockReadBlock (
// //
// Perform read operation // Perform read operation
// //
CopyMem (Buffer, LbaOffset, NumOfBytesRead); CopyMem(Buffer, LbaOffset, NumOfBytesRead);
if (NumOfBytesRead == *NumBytes) { if (NumOfBytesRead == *NumBytes) {
return EFI_SUCCESS; return EFI_SUCCESS;

View File

@ -431,7 +431,7 @@ CoreInsertGcdMapEntry (
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
CopyMem (BottomEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY)); CopyMem(BottomEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
Entry->BaseAddress = BaseAddress; Entry->BaseAddress = BaseAddress;
BottomEntry->EndAddress = BaseAddress - 1; BottomEntry->EndAddress = BaseAddress - 1;
InsertTailList (Link, &BottomEntry->Link); InsertTailList (Link, &BottomEntry->Link);
@ -443,7 +443,7 @@ CoreInsertGcdMapEntry (
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
CopyMem (TopEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY)); CopyMem(TopEntry, Entry, sizeof (EFI_GCD_MAP_ENTRY));
TopEntry->BaseAddress = BaseAddress + Length; TopEntry->BaseAddress = BaseAddress + Length;
Entry->EndAddress = BaseAddress + Length - 1; Entry->EndAddress = BaseAddress + Length - 1;
InsertHeadList (Link, &TopEntry->Link); InsertHeadList (Link, &TopEntry->Link);
@ -2067,7 +2067,7 @@ CoreInitializeMemoryServices (
EfiMemoryTypeInformation = GET_GUID_HOB_DATA (GuidHob); EfiMemoryTypeInformation = GET_GUID_HOB_DATA (GuidHob);
DataSize = GET_GUID_HOB_DATA_SIZE (GuidHob); DataSize = GET_GUID_HOB_DATA_SIZE (GuidHob);
if (EfiMemoryTypeInformation != NULL && DataSize > 0 && DataSize <= (EfiMaxMemoryType + 1) * sizeof (EFI_MEMORY_TYPE_INFORMATION)) { if (EfiMemoryTypeInformation != NULL && DataSize > 0 && DataSize <= (EfiMaxMemoryType + 1) * sizeof (EFI_MEMORY_TYPE_INFORMATION)) {
CopyMem (&gMemoryTypeInformation, EfiMemoryTypeInformation, DataSize); CopyMem(&gMemoryTypeInformation, EfiMemoryTypeInformation, DataSize);
} }
} }

View File

@ -92,8 +92,8 @@ CoreConnectController (
RemainingDevicePathSize = GetDevicePathSize (RemainingDevicePath); RemainingDevicePathSize = GetDevicePathSize (RemainingDevicePath);
TempFilePath = AllocatePool (HandleFilePathSize + RemainingDevicePathSize); TempFilePath = AllocatePool (HandleFilePathSize + RemainingDevicePathSize);
// ASSERT (TempFilePath != NULL); // ASSERT (TempFilePath != NULL);
CopyMem (TempFilePath, HandleFilePath, HandleFilePathSize); CopyMem(TempFilePath, HandleFilePath, HandleFilePathSize);
CopyMem ((UINT8 *) TempFilePath + HandleFilePathSize, RemainingDevicePath, RemainingDevicePathSize); CopyMem((UINT8 *) TempFilePath + HandleFilePathSize, RemainingDevicePath, RemainingDevicePathSize);
FilePath = TempFilePath; FilePath = TempFilePath;
} }
Status = gSecurity2->FileAuthentication ( Status = gSecurity2->FileAuthentication (

View File

@ -254,7 +254,7 @@ CoreReadImageFile (
*ReadSize = 0; *ReadSize = 0;
} }
CopyMem (Buffer, (CHAR8 *)FHand->Source + Offset, *ReadSize); CopyMem(Buffer, (CHAR8 *)FHand->Source + Offset, *ReadSize);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
@ -1805,7 +1805,7 @@ CoreExit (
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
goto Done; goto Done;
} }
CopyMem (Image->ExitData, ExitData, Image->ExitDataSize); CopyMem(Image->ExitData, ExitData, Image->ExitDataSize);
} }
CoreRestoreTpl (OldTpl); CoreRestoreTpl (OldTpl);

View File

@ -191,7 +191,7 @@ CoreAddRange (
// used for other purposes. // used for other purposes.
// //
if (Type == EfiConventionalMemory && Start == 0 && (End >= EFI_PAGE_SIZE - 1)) { 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); RemoveEntryList (&mMapStack[mMapDepth].Link);
mMapStack[mMapDepth].Link.ForwardLink = NULL; mMapStack[mMapDepth].Link.ForwardLink = NULL;
CopyMem (Entry , &mMapStack[mMapDepth], sizeof (MEMORY_MAP)); CopyMem(Entry , &mMapStack[mMapDepth], sizeof (MEMORY_MAP));
Entry->FromPages = TRUE; Entry->FromPages = TRUE;
// //

View File

@ -209,7 +209,7 @@ CoreNewDebugImageInfoEntry (
// //
// Copy the old table into the new one // Copy the old table into the new one
// //
CopyMem (NewTable, Table, TableSize); CopyMem(NewTable, Table, TableSize);
// //
// Free the old table // Free the old table
// //

View File

@ -90,7 +90,7 @@ CoreInstallConfigurationTable (
// Copy over deleted entry // Copy over deleted entry
// //
// Print(L"Copy over deleted entry\n"); // Print(L"Copy over deleted entry\n");
CopyMem ( CopyMem(
&(EfiConfigurationTable[Index]), &(EfiConfigurationTable[Index]),
&(gDxeCoreST->ConfigurationTable[Index + 1]), &(gDxeCoreST->ConfigurationTable[Index + 1]),
(gDxeCoreST->NumberOfTableEntries - Index) * sizeof (EFI_CONFIGURATION_TABLE) (gDxeCoreST->NumberOfTableEntries - Index) * sizeof (EFI_CONFIGURATION_TABLE)
@ -132,7 +132,7 @@ CoreInstallConfigurationTable (
// Copy the old table to the new table. // Copy the old table to the new table.
// //
// Print(L"Copy the old table to the new table\n"); // Print(L"Copy the old table to the new table\n");
CopyMem ( CopyMem(
EfiConfigurationTable, EfiConfigurationTable,
gDxeCoreST->ConfigurationTable, gDxeCoreST->ConfigurationTable,
Index * sizeof (EFI_CONFIGURATION_TABLE) Index * sizeof (EFI_CONFIGURATION_TABLE)

View File

@ -369,7 +369,7 @@ OpenSectionStreamEx (
// //
// Copy in stream data // Copy in stream data
// //
CopyMem (NewStream->StreamBuffer, SectionStream, SectionStreamLength); CopyMem(NewStream->StreamBuffer, SectionStream, SectionStreamLength);
} else { } else {
// //
// It's possible to have a zero length section stream. // 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. // 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) { } else if (CompressionType == EFI_STANDARD_COMPRESSION) {
// //
// Only support the EFI_SATNDARD_COMPRESSION algorithm. // Only support the EFI_SATNDARD_COMPRESSION algorithm.
@ -1311,7 +1311,7 @@ GetSection (
goto GetSection_Done; goto GetSection_Done;
} }
} }
CopyMem (*Buffer, CopyBuffer, CopySize); CopyMem(*Buffer, CopyBuffer, CopySize);
*BufferSize = SectionSize; *BufferSize = SectionSize;
GetSection_Done: GetSection_Done:
@ -1579,7 +1579,7 @@ CustomGuidedSectionExtract (
// OutputBuffer was returned as a different value, // OutputBuffer was returned as a different value,
// so copy section contents to the allocated memory buffer. // so copy section contents to the allocated memory buffer.
// //
CopyMem (AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize); CopyMem(AllocatedOutputBuffer, *OutputBuffer, OutputBufferSize);
*OutputBuffer = AllocatedOutputBuffer; *OutputBuffer = AllocatedOutputBuffer;
} }

View File

@ -140,7 +140,7 @@ Returns:
// CHAR8 PrintBuffer[256]; // CHAR8 PrintBuffer[256];
EFILDRHANDOFF HandoffCopy; EFILDRHANDOFF HandoffCopy;
CopyMem ((VOID*) &HandoffCopy, (VOID*) Handoff, sizeof (EFILDRHANDOFF)); CopyMem((VOID*) &HandoffCopy, (VOID*) Handoff, sizeof (EFILDRHANDOFF));
Handoff = &HandoffCopy; Handoff = &HandoffCopy;
// ClearScreen(); // ClearScreen();

View File

@ -724,7 +724,7 @@ PrepareHobMemoryDescriptor (
// //
gHob->MemoryDescriptor.MemDesc = (EFI_MEMORY_DESCRIPTOR *)((UINTN) gHob->MemoryDescriptor.MemDesc & ~EFI_PAGE_MASK); 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; return gHob->MemoryDescriptor.MemDesc;
} }
@ -868,7 +868,7 @@ PrepareHobNvStorage (
// Efivar.bin doesn't exist // Efivar.bin doesn't exist
// 1. Init variable storage header to valid header // 1. Init variable storage header to valid header
// //
CopyMem ( CopyMem(
(VOID *) (UINTN) NV_STORAGE_START, (VOID *) (UINTN) NV_STORAGE_START,
&VarStoreHeader, &VarStoreHeader,
sizeof (VARIABLE_STORE_HEADER) sizeof (VARIABLE_STORE_HEADER)
@ -876,7 +876,7 @@ PrepareHobNvStorage (
// //
// 2. set all bits in variable storage body to 1 // 2. set all bits in variable storage body to 1
// //
SetMem ( SetMem(
(VOID *) (UINTN) (NV_STORAGE_START + sizeof (VARIABLE_STORE_HEADER)), (VOID *) (UINTN) (NV_STORAGE_START + sizeof (VARIABLE_STORE_HEADER)),
NV_STORAGE_SIZE - sizeof (VARIABLE_STORE_HEADER), NV_STORAGE_SIZE - sizeof (VARIABLE_STORE_HEADER),
0xff 0xff
@ -900,8 +900,8 @@ PrepareHobNvStorage (
} }
NvStorageFvbHeader.Checksum = (UINT16) (0x10000 - Checksum); NvStorageFvbHeader.Checksum = (UINT16) (0x10000 - Checksum);
StorageFvbBase = (EFI_PHYSICAL_ADDRESS)(((UINTN)NvStorageTop - NV_STORAGE_FVB_SIZE - NV_FTW_FVB_SIZE) & ~EFI_PAGE_MASK); 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((VOID *) (UINTN) StorageFvbBase, &NvStorageFvbHeader, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
CopyMem ( CopyMem(
(VOID *) (UINTN) (StorageFvbBase + sizeof (EFI_FIRMWARE_VOLUME_HEADER)), (VOID *) (UINTN) (StorageFvbBase + sizeof (EFI_FIRMWARE_VOLUME_HEADER)),
&BlockMapEntryEnd, &BlockMapEntryEnd,
sizeof (EFI_FV_BLOCK_MAP_ENTRY) sizeof (EFI_FV_BLOCK_MAP_ENTRY)
@ -910,7 +910,7 @@ PrepareHobNvStorage (
// //
// 2. Relocate variable data // 2. Relocate variable data
// //
CopyMem ( CopyMem(
(VOID *) (UINTN) (StorageFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH), (VOID *) (UINTN) (StorageFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH),
(VOID *) (UINTN) NV_STORAGE_START, (VOID *) (UINTN) NV_STORAGE_START,
NV_STORAGE_SIZE NV_STORAGE_SIZE
@ -919,7 +919,7 @@ PrepareHobNvStorage (
// //
// 3. Set the remaining memory to 0xff // 3. Set the remaining memory to 0xff
// //
SetMem ( SetMem(
(VOID *) (UINTN) (StorageFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH + NV_STORAGE_SIZE), (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, NV_STORAGE_FVB_SIZE - NV_STORAGE_SIZE - EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH,
0xff 0xff
@ -966,7 +966,7 @@ PrepareHobPhit (
gHob->Phit.EfiFreeMemoryTop = (EFI_PHYSICAL_ADDRESS)(UINTN)FreeMemoryTop; gHob->Phit.EfiFreeMemoryTop = (EFI_PHYSICAL_ADDRESS)(UINTN)FreeMemoryTop;
gHob->Phit.EfiFreeMemoryBottom = gHob->Phit.EfiMemoryBottom + sizeof(HOB_TEMPLATE); 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 = (HOB_TEMPLATE *)(UINTN)gHob->Phit.EfiMemoryBottom;
gHob->Phit.EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS)(UINTN)&gHob->EndOfHobList; gHob->Phit.EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS)(UINTN)&gHob->EndOfHobList;

View File

@ -166,7 +166,7 @@ ScanTableInXSDT (
BasePtr = (UINTN)(&(Xsdt->Entry)); BasePtr = (UINTN)(&(Xsdt->Entry));
for (Index = 0; Index < EntryCount; Index ++) { 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)); Table = (EFI_ACPI_DESCRIPTION_HEADER*)((UINTN)(EntryPtr));
if (Table->Signature == Signature) { if (Table->Signature == Signature) {
*FoundTable = Table; *FoundTable = Table;
@ -298,14 +298,14 @@ PrepareFadtTable (
// For fields not included in ACPI 1.0 spec, we get the value based on table length // 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)) { if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPmTmrBlk) + sizeof (Fadt->XPmTmrBlk)) {
CopyMem ( CopyMem(
&AcpiDescription->PM_TMR_BLK, &AcpiDescription->PM_TMR_BLK,
&Fadt->XPmTmrBlk, &Fadt->XPmTmrBlk,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE) 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)) { if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, ResetValue) + sizeof (Fadt->ResetValue)) {
CopyMem ( CopyMem(
&AcpiDescription->RESET_REG, &AcpiDescription->RESET_REG,
&Fadt->ResetReg, &Fadt->ResetReg,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE) 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)) { if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPm1aEvtBlk) + sizeof (Fadt->XPm1aEvtBlk)) {
CopyMem ( CopyMem(
&AcpiDescription->PM1a_EVT_BLK, &AcpiDescription->PM1a_EVT_BLK,
&Fadt->XPm1aEvtBlk, &Fadt->XPm1aEvtBlk,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE) sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
@ -336,7 +336,7 @@ PrepareFadtTable (
AcpiDescription->PM1_EVT_LEN = Fadt->Pm1EvtLen; AcpiDescription->PM1_EVT_LEN = Fadt->Pm1EvtLen;
if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPm1aCntBlk) + sizeof (Fadt->XPm1aCntBlk)) { if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPm1aCntBlk) + sizeof (Fadt->XPm1aCntBlk)) {
CopyMem ( CopyMem(
&AcpiDescription->PM1a_CNT_BLK, &AcpiDescription->PM1a_CNT_BLK,
&Fadt->XPm1aCntBlk, &Fadt->XPm1aCntBlk,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE) sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
@ -351,7 +351,7 @@ PrepareFadtTable (
AcpiDescription->PM1_CNT_LEN = Fadt->Pm1CntLen; AcpiDescription->PM1_CNT_LEN = Fadt->Pm1CntLen;
if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPm2CntBlk) + sizeof (Fadt->XPm2CntBlk)) { if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPm2CntBlk) + sizeof (Fadt->XPm2CntBlk)) {
CopyMem ( CopyMem(
&AcpiDescription->PM2_CNT_BLK, &AcpiDescription->PM2_CNT_BLK,
&Fadt->XPm2CntBlk, &Fadt->XPm2CntBlk,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE) sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)

View File

@ -134,7 +134,7 @@ EfiLoader (
SystemHang ("Failed to find free space to hold decompressed BFV\n"); SystemHang ("Failed to find free space to hold decompressed BFV\n");
} }
ZeroMem ((VOID *)(UINTN)BfvBase, BfvPageNumber * EFI_PAGE_SIZE); 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'); // PrintHeader ('B');

View File

@ -541,7 +541,7 @@ EfiLdrPeCoffImageRead (
OUT VOID *Buffer OUT VOID *Buffer
) )
{ {
CopyMem (Buffer, (VOID *)((UINTN)FHand + Offset), ReadSize); CopyMem(Buffer, (VOID *)((UINTN)FHand + Offset), ReadSize);
return EFI_SUCCESS; return EFI_SUCCESS;
} }

View File

@ -1191,7 +1191,7 @@ Returns:
PciIoDevice->BusOverride = FALSE; PciIoDevice->BusOverride = FALSE;
PciIoDevice->IsPciExp = 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 // Initialize the PCI I/O instance structure

View File

@ -181,7 +181,7 @@ PciIoConfigWrite (
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PciIoCopyMem ( PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex, 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; // return EFI_SUCCESS;
} }
@ -859,7 +859,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PciIoCopyMem ( PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex, IN UINT8 DestBarIndex,
@ -912,7 +912,7 @@ Returns:
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
Status = PciIoDevice->PciRootBridgeIo->CopyMem ( Status = PciIoDevice->PciRootBridgeIo->CopyMem(
PciIoDevice->PciRootBridgeIo, PciIoDevice->PciRootBridgeIo,
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
DestOffset, DestOffset,

View File

@ -61,7 +61,7 @@ PciRomAddImageMapping (
return ; return ;
} }
CopyMem (TempMapping, mRomImageTable, mNumberOfPciRomImages * sizeof (EFI_PCI_ROM_IMAGE_MAPPING)); CopyMem(TempMapping, mRomImageTable, mNumberOfPciRomImages * sizeof (EFI_PCI_ROM_IMAGE_MAPPING));
if (mRomImageTable != NULL) { if (mRomImageTable != NULL) {
gBS->FreePool(mRomImageTable); gBS->FreePool(mRomImageTable);

View File

@ -139,7 +139,7 @@ InstallMiscSmbios (
AString = GetSmbiosString (SmbiosTable, SmbiosTable.Type0->BiosVersion); AString = GetSmbiosString (SmbiosTable, SmbiosTable.Type0->BiosVersion);
UString = AllocateZeroPool((AsciiStrLen(AString) + 1) * sizeof(CHAR16) + sizeof(FIRMWARE_BIOS_VERSIONE)); UString = AllocateZeroPool((AsciiStrLen(AString) + 1) * sizeof(CHAR16) + sizeof(FIRMWARE_BIOS_VERSIONE));
ASSERT (UString != NULL); 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); AsciiStrToUnicodeStr (AString, UString + sizeof(FIRMWARE_BIOS_VERSIONE) / sizeof(CHAR16) - 1);
Token = HiiSetString (gStringHandle, 0, UString, NULL); Token = HiiSetString (gStringHandle, 0, UString, NULL);
@ -169,7 +169,7 @@ InstallMiscSmbios (
AString = GetSmbiosString (SmbiosTable, SmbiosTable.Type1->ProductName); AString = GetSmbiosString (SmbiosTable, SmbiosTable.Type1->ProductName);
UString = AllocateZeroPool((AsciiStrLen(AString) + 1) * sizeof(CHAR16) + sizeof(FIRMWARE_PRODUCT_NAME)); UString = AllocateZeroPool((AsciiStrLen(AString) + 1) * sizeof(CHAR16) + sizeof(FIRMWARE_PRODUCT_NAME));
ASSERT (UString != NULL); 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); AsciiStrToUnicodeStr (AString, UString + sizeof(FIRMWARE_PRODUCT_NAME) / sizeof(CHAR16) - 1);
Token = HiiSetString (gStringHandle, 0, UString, NULL); Token = HiiSetString (gStringHandle, 0, UString, NULL);

View File

@ -456,7 +456,7 @@ PcRtcSetTime (
return Status; return Status;
} }
CopyMem (&RtcTime, Time, sizeof (EFI_TIME)); CopyMem(&RtcTime, Time, sizeof (EFI_TIME));
// //
// Acquire RTC Lock to make access to RTC atomic // Acquire RTC Lock to make access to RTC atomic
@ -701,7 +701,7 @@ PcRtcSetWakeupTime (
// //
// Make a local copy of the time and date // Make a local copy of the time and date
// //
CopyMem (&RtcTime, Time, sizeof (EFI_TIME)); CopyMem(&RtcTime, Time, sizeof (EFI_TIME));
} }
// //

View File

@ -138,7 +138,7 @@ Returns:
} }
if (Width >= MMIO_COPY_UINT8) { if (Width >= MMIO_COPY_UINT8) {
Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8); Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8);
Status = Private->PciRootBridgeIo->CopyMem ( Status = Private->PciRootBridgeIo->CopyMem(
Private->PciRootBridgeIo, Private->PciRootBridgeIo,
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
(UINT64)(UINTN) Buffer, (UINT64)(UINTN) Buffer,
@ -202,7 +202,7 @@ Returns:
} }
if (Width >= MMIO_COPY_UINT8) { if (Width >= MMIO_COPY_UINT8) {
Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8); Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8);
Status = Private->PciRootBridgeIo->CopyMem ( Status = Private->PciRootBridgeIo->CopyMem(
Private->PciRootBridgeIo, Private->PciRootBridgeIo,
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
Address, Address,

View File

@ -124,7 +124,7 @@ PcatRootBridgeIoPciRW (
UsePciExpressAccess = FALSE; UsePciExpressAccess = FALSE;
CopyMem (&PciAddress, &UserAddress, sizeof(UINT64)); CopyMem(&PciAddress, &UserAddress, sizeof(UINT64));
if (PciAddress.ExtendedRegister > 0xFF) { if (PciAddress.ExtendedRegister > 0xFF) {
// //

View File

@ -124,7 +124,7 @@ PcatRootBridgeIoPciRW (
UsePciExpressAccess = FALSE; UsePciExpressAccess = FALSE;
CopyMem (&PciAddress, &UserAddress, sizeof(UINT64)); CopyMem(&PciAddress, &UserAddress, sizeof(UINT64));
if (PciAddress.ExtendedRegister > 0xFF) { if (PciAddress.ExtendedRegister > 0xFF) {
// //

View File

@ -71,7 +71,7 @@ PcatRootBridgeIoMemWrite (
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PcatRootBridgeIoCopyMem ( PcatRootBridgeIoCopyMem(
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 DestAddress, IN UINT64 DestAddress,
@ -474,7 +474,7 @@ PcatRootBridgeIoMemWrite (
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PcatRootBridgeIoCopyMem ( PcatRootBridgeIoCopyMem(
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 DestAddress, IN UINT64 DestAddress,
@ -679,7 +679,7 @@ PcatRootBridgeIoMap (
// so the Bus Master can read the contents of the real buffer. // so the Bus Master can read the contents of the real buffer.
// //
if (Operation == EfiPciOperationBusMasterRead || Operation == EfiPciOperationBusMasterRead64) { if (Operation == EfiPciOperationBusMasterRead || Operation == EfiPciOperationBusMasterRead64) {
CopyMem ( CopyMem(
(VOID *)(UINTN)MapInfo->MappedHostAddress, (VOID *)(UINTN)MapInfo->MappedHostAddress,
(VOID *)(UINTN)MapInfo->HostAddress, (VOID *)(UINTN)MapInfo->HostAddress,
MapInfo->NumberOfBytes MapInfo->NumberOfBytes
@ -769,7 +769,7 @@ PcatRootBridgeIoUnmap (
// so the processor can read the contents of the real buffer. // so the processor can read the contents of the real buffer.
// //
if (MapInfo->Operation == EfiPciOperationBusMasterWrite || MapInfo->Operation == EfiPciOperationBusMasterWrite64) { if (MapInfo->Operation == EfiPciOperationBusMasterWrite || MapInfo->Operation == EfiPciOperationBusMasterWrite64) {
CopyMem ( CopyMem(
(VOID *)(UINTN)MapInfo->HostAddress, (VOID *)(UINTN)MapInfo->HostAddress,
(VOID *)(UINTN)MapInfo->MappedHostAddress, (VOID *)(UINTN)MapInfo->MappedHostAddress,
MapInfo->NumberOfBytes MapInfo->NumberOfBytes

View File

@ -124,7 +124,7 @@ PcatRootBridgeIoPciRW (
UsePciExpressAccess = FALSE; UsePciExpressAccess = FALSE;
CopyMem (&PciAddress, &UserAddress, sizeof(UINT64)); CopyMem(&PciAddress, &UserAddress, sizeof(UINT64));
if (PciAddress.ExtendedRegister > 0xFF) { if (PciAddress.ExtendedRegister > 0xFF) {
// //

View File

@ -1149,7 +1149,7 @@ InitInterruptDescriptorTable (
UINT16 CurrentCs; UINT16 CurrentCs;
VOID *IntHandler; VOID *IntHandler;
SetMem (ExternalVectorTable, sizeof(ExternalVectorTable), 0); SetMem(ExternalVectorTable, sizeof(ExternalVectorTable), 0);
// //
// Get original IDT address and size. // Get original IDT address and size.

View File

@ -182,7 +182,7 @@ InitGlobalDescriptorTable (
// //
// Initialize all GDT entries // Initialize all GDT entries
// //
CopyMem (gdt, &GdtTemplate, sizeof (GdtTemplate)); CopyMem(gdt, &GdtTemplate, sizeof (GdtTemplate));
// //
// Write GDT register // Write GDT register

View File

@ -396,7 +396,7 @@ SmmCpuIo2Initialize (
// //
// Copy the SMM CPU I/O Protocol instance into the System Management System Table // 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 // Install the SMM CPU I/O Protocol into the SMM protocol database

View File

@ -80,7 +80,7 @@ InitializeCpuInterruptHandlers (
mReservedVectors = AllocatePool (sizeof (RESERVED_VECTORS_DATA) * CPU_INTERRUPT_NUM); mReservedVectors = AllocatePool (sizeof (RESERVED_VECTORS_DATA) * CPU_INTERRUPT_NUM);
ASSERT (mReservedVectors != NULL); 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) { if (VectorInfo != NULL) {
Status = ReadAndVerifyVectorInfo (VectorInfo, mReservedVectors, CPU_INTERRUPT_NUM); Status = ReadAndVerifyVectorInfo (VectorInfo, mReservedVectors, CPU_INTERRUPT_NUM);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
@ -105,7 +105,7 @@ InitializeCpuInterruptHandlers (
// //
IdtTable = AllocateZeroPool(sizeof (IA32_IDT_GATE_DESCRIPTOR) * CPU_INTERRUPT_NUM); IdtTable = AllocateZeroPool(sizeof (IA32_IDT_GATE_DESCRIPTOR) * CPU_INTERRUPT_NUM);
ASSERT (IdtTable != NULL); 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); AsmGetTemplateAddressMap (&TemplateMap);
ASSERT (TemplateMap.ExceptionStubHeaderSize <= HOOKAFTER_STUB_SIZE); ASSERT (TemplateMap.ExceptionStubHeaderSize <= HOOKAFTER_STUB_SIZE);
@ -114,7 +114,7 @@ InitializeCpuInterruptHandlers (
InterruptEntry = (UINTN) InterruptEntryCode; InterruptEntry = (UINTN) InterruptEntryCode;
for (Index = 0; Index < CPU_INTERRUPT_NUM; Index ++) { for (Index = 0; Index < CPU_INTERRUPT_NUM; Index ++) {
CopyMem ( CopyMem(
(VOID *) InterruptEntry, (VOID *) InterruptEntry,
(VOID *) TemplateMap.ExceptionStart, (VOID *) TemplateMap.ExceptionStart,
TemplateMap.ExceptionStubHeaderSize TemplateMap.ExceptionStubHeaderSize

View File

@ -161,7 +161,7 @@ UpdateIdtTable (
continue; continue;
case EFI_VECTOR_HANDOFF_HOOK_AFTER: case EFI_VECTOR_HANDOFF_HOOK_AFTER:
InitializeSpinLock (&mReservedVectors[Index].SpinLock); InitializeSpinLock (&mReservedVectors[Index].SpinLock);
CopyMem ( CopyMem(
(VOID *) mReservedVectors[Index].HookAfterStubHeaderCode, (VOID *) mReservedVectors[Index].HookAfterStubHeaderCode,
(VOID *) TemplateMap->HookAfterStubHeaderStart, (VOID *) TemplateMap->HookAfterStubHeaderStart,
TemplateMap->ExceptionStubHeaderSize TemplateMap->ExceptionStubHeaderSize
@ -217,7 +217,7 @@ InitializeCpuExceptionHandlersWorker (
IA32_IDT_GATE_DESCRIPTOR *IdtTable; IA32_IDT_GATE_DESCRIPTOR *IdtTable;
mReservedVectors = mReservedVectorsData; 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) { if (VectorInfo != NULL) {
Status = ReadAndVerifyVectorInfo (VectorInfo, mReservedVectors, CPU_EXCEPTION_NUM); Status = ReadAndVerifyVectorInfo (VectorInfo, mReservedVectors, CPU_EXCEPTION_NUM);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {

View File

@ -80,7 +80,7 @@ InitializeCpuExceptionHandlers (
UINTN InterruptHandler; UINTN InterruptHandler;
if (VectorInfo != NULL) { 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); Status = ReadAndVerifyVectorInfo (VectorInfo, ReservedVectorData, CPU_EXCEPTION_NUM);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;

View File

@ -711,7 +711,7 @@ S3ResumeExecuteBootScript (
// //
IdtBuffer = AllocatePages (EFI_SIZE_TO_PAGES((IdtDescriptor->Limit + 1) + 16)); IdtBuffer = AllocatePages (EFI_SIZE_TO_PAGES((IdtDescriptor->Limit + 1) + 16));
ASSERT (IdtBuffer != NULL); 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); IdtDescriptor->Base = (UINTN)((UINT8*)IdtBuffer + 16);
*(UINTN*)(IdtDescriptor->Base - sizeof(UINTN)) = (UINTN)GetPeiServicesTablePointer (); *(UINTN*)(IdtDescriptor->Base - sizeof(UINTN)) = (UINTN)GetPeiServicesTablePointer ();
} }

View File

@ -560,13 +560,13 @@ AhciBuildCommand (
CommandFis->AhciCFisPmNum = PortMultiplier; 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)); ZeroMem (&AhciRegisters->AhciCommandTable->AtapiCmd, 0x40U + (PrdtNumber << 4));
Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD; Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD;
if (AtapiCommand != NULL) { if (AtapiCommand != NULL) {
CopyMem ( CopyMem(
&AhciRegisters->AhciCommandTable->AtapiCmd, &AhciRegisters->AhciCommandTable->AtapiCmd,
AtapiCommand, AtapiCommand,
AtapiCommandLength AtapiCommandLength
@ -612,7 +612,7 @@ AhciBuildCommand (
} }
#endif #endif
CopyMem ( CopyMem(
&AhciRegisters->AhciCmdList[CommandSlotNumber], &AhciRegisters->AhciCmdList[CommandSlotNumber],
CommandList, CommandList,
sizeof (EFI_AHCI_COMMAND_LIST) sizeof (EFI_AHCI_COMMAND_LIST)

View File

@ -2062,7 +2062,7 @@ ExtScsiPassThruPassThru (
// But to response EFI_DISK_INFO.Identify() request from ScsiDisk, we should handle this command. // But to response EFI_DISK_INFO.Identify() request from ScsiDisk, we should handle this command.
// //
if (*((UINT8*)Packet->Cdb) == ATA_CMD_IDENTIFY_DEVICE) { 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) { if (Instance->Mode == EfiAtaAhciMode) {
((EFI_IDENTIFY_DATA*) Packet->InDataBuffer)->AtapiData.reserved_224_254[0] = 0U; // hide stashed value ((EFI_IDENTIFY_DATA*) Packet->InDataBuffer)->AtapiData.reserved_224_254[0] = 0U; // hide stashed value
} }
@ -2123,7 +2123,7 @@ ExtScsiPassThruPassThru (
break; 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); SenseDataLen += sizeof (EFI_SCSI_SENSE_DATA);
// //
@ -2417,7 +2417,7 @@ ExtScsiPassThruGetTargetLun (
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
SetMem (*Target, TARGET_MAX_BYTES, 0xFF); SetMem(*Target, TARGET_MAX_BYTES, 0xFF);
DevicePathNode = (EFI_DEV_PATH *) DevicePath; DevicePathNode = (EFI_DEV_PATH *) DevicePath;

View File

@ -200,7 +200,7 @@ IdeWritePortWMultiple (
// //
// Copy data from user buffer to working buffer // Copy data from user buffer to working buffer
// //
CopyMem (AlignedBuffer, Buffer, Size); CopyMem(AlignedBuffer, Buffer, Size);
} else { } else {
AlignedBuffer = (UINT16 *) Buffer; AlignedBuffer = (UINT16 *) Buffer;
} }
@ -282,7 +282,7 @@ IdeReadPortWMultiple (
// //
// Copy data to user buffer // Copy data to user buffer
// //
CopyMem (Buffer, AlignedBuffer, Size); CopyMem(Buffer, AlignedBuffer, Size);
gBS->FreePool(WorkingBuffer); gBS->FreePool(WorkingBuffer);
} }
} }
@ -328,7 +328,7 @@ DumpAllIdeRegisters (
// //
// Dump the content of all ATA registers. // 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 (); // DEBUG_CODE_BEGIN ();
@ -2312,7 +2312,7 @@ AtaPacketCommandExecute (
} }
ZeroMem (PacketCommand, 12); ZeroMem (PacketCommand, 12);
CopyMem (PacketCommand, Packet->Cdb, Packet->CdbLength); CopyMem(PacketCommand, Packet->Cdb, Packet->CdbLength);
// //
// No OVL; No DMA // No OVL; No DMA
@ -2900,7 +2900,7 @@ DetectAndConfigIdeDevice (
gBS->Stall (100); gBS->Stall (100);
for (IdeDevice = 0; IdeDevice < EfiIdeMaxDevice; IdeDevice++) { 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. // Select Master or Slave device to get the return signature for ATA DEVICE DIAGNOSTIC cmd.
// //

View File

@ -1474,7 +1474,7 @@ AtaDiskInfoIdentify (
Status = EFI_BUFFER_TOO_SMALL; Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (ATA_IDENTIFY_DATA)) { if (*IdentifyDataSize >= sizeof (ATA_IDENTIFY_DATA)) {
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
CopyMem (IdentifyData, AtaDevice->IdentifyData, sizeof (ATA_IDENTIFY_DATA)); CopyMem(IdentifyData, AtaDevice->IdentifyData, sizeof (ATA_IDENTIFY_DATA));
} }
*IdentifyDataSize = sizeof (ATA_IDENTIFY_DATA); *IdentifyDataSize = sizeof (ATA_IDENTIFY_DATA);

View File

@ -151,7 +151,7 @@ AtaDevicePassThru (
return EFI_OUT_OF_RESOURCES; 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); Packet->Acb = AllocateCopyPool(sizeof (EFI_ATA_COMMAND_BLOCK), &AtaDevice->Acb);
} else { } else {
Packet = &AtaDevice->Packet; Packet = &AtaDevice->Packet;
@ -1006,7 +1006,7 @@ TrustTransferAtaDevice (
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
CopyMem (NewBuffer, Buffer, TransferLength); CopyMem(NewBuffer, Buffer, TransferLength);
FreePool(Buffer); FreePool(Buffer);
Buffer = NewBuffer; Buffer = NewBuffer;
} }

View File

@ -197,7 +197,7 @@ SCSIBusDriverBindingSupported (
SCSI_TARGET_ID ScsiTargetId; SCSI_TARGET_ID ScsiTargetId;
TargetId = &ScsiTargetId.ScsiId.ExtScsi[0]; 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 // To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as
@ -339,7 +339,7 @@ SCSIBusDriverBindingStart (
PassThruStatus = EFI_SUCCESS; PassThruStatus = EFI_SUCCESS;
TargetId = &ScsiTargetId.ScsiId.ExtScsi[0]; TargetId = &ScsiTargetId.ScsiId.ExtScsi[0];
SetMem (TargetId, TARGET_MAX_BYTES, 0xFF); SetMem(TargetId, TARGET_MAX_BYTES, 0xFF);
DevicePathStatus = gBS->OpenProtocol ( DevicePathStatus = gBS->OpenProtocol (
Controller, Controller,
@ -820,7 +820,7 @@ ScsiGetDeviceLocation (
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This); ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
CopyMem (*Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES); CopyMem(*Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
*Lun = ScsiIoDevice->Lun; *Lun = ScsiIoDevice->Lun;
@ -878,7 +878,7 @@ ScsiResetDevice (
UINT8 Target[TARGET_MAX_BYTES]; UINT8 Target[TARGET_MAX_BYTES];
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This); ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
CopyMem (Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES); CopyMem(Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
if (ScsiIoDevice->ExtScsiSupport) { if (ScsiIoDevice->ExtScsiSupport) {
@ -967,7 +967,7 @@ ScsiExecuteSCSICommand (
} }
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This); 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)); mWorkingBuffer = AllocateAlignedBuffer(ScsiIoDevice, sizeof(EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET));
if (mWorkingBuffer == NULL) { if (mWorkingBuffer == NULL) {

View File

@ -763,7 +763,7 @@ ScsiDiskDetectMedia (
*MediaChange = FALSE; *MediaChange = FALSE;
TimeoutEvt = NULL; TimeoutEvt = NULL;
CopyMem (&OldMedia, ScsiDiskDevice->BlkIo.Media, sizeof (OldMedia)); CopyMem(&OldMedia, ScsiDiskDevice->BlkIo.Media, sizeof (OldMedia));
Status = gBS->CreateEvent ( Status = gBS->CreateEvent (
EVT_TIMER, EVT_TIMER,
@ -1666,7 +1666,7 @@ ScsiDiskRequestSenseKeys (
} }
} }
CopyMem (ScsiDiskDevice->SenseData + *NumberOfSenseKeys, PtrSenseData, SenseDataLength); CopyMem(ScsiDiskDevice->SenseData + *NumberOfSenseKeys, PtrSenseData, SenseDataLength);
(*NumberOfSenseKeys) += 1; (*NumberOfSenseKeys) += 1;
// //
@ -3062,7 +3062,7 @@ ScsiDiskInfoInquiry (
Status = EFI_BUFFER_TOO_SMALL; Status = EFI_BUFFER_TOO_SMALL;
if (*InquiryDataSize >= sizeof (ScsiDiskDevice->InquiryData)) { if (*InquiryDataSize >= sizeof (ScsiDiskDevice->InquiryData)) {
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
CopyMem (InquiryData, &ScsiDiskDevice->InquiryData, sizeof (ScsiDiskDevice->InquiryData)); CopyMem(InquiryData, &ScsiDiskDevice->InquiryData, sizeof (ScsiDiskDevice->InquiryData));
} }
*InquiryDataSize = sizeof (ScsiDiskDevice->InquiryData); *InquiryDataSize = sizeof (ScsiDiskDevice->InquiryData);
return Status; return Status;
@ -3110,7 +3110,7 @@ ScsiDiskInfoIdentify (
Status = EFI_BUFFER_TOO_SMALL; Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (ScsiDiskDevice->IdentifyData)) { if (*IdentifyDataSize >= sizeof (ScsiDiskDevice->IdentifyData)) {
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
CopyMem (IdentifyData, &ScsiDiskDevice->IdentifyData, sizeof (ScsiDiskDevice->IdentifyData)); CopyMem(IdentifyData, &ScsiDiskDevice->IdentifyData, sizeof (ScsiDiskDevice->IdentifyData));
} }
*IdentifyDataSize = sizeof (ScsiDiskDevice->IdentifyData); *IdentifyDataSize = sizeof (ScsiDiskDevice->IdentifyData);
return Status; return Status;
@ -3253,7 +3253,7 @@ InitializeInstallDiskInfo (
// //
// Copy the DiskInfo protocol template. // Copy the DiskInfo protocol template.
// //
CopyMem (&ScsiDiskDevice->DiskInfo, &gScsiDiskInfoProtocolTemplate, sizeof (gScsiDiskInfoProtocolTemplate)); CopyMem(&ScsiDiskDevice->DiskInfo, &gScsiDiskInfoProtocolTemplate, sizeof (gScsiDiskInfoProtocolTemplate));
while (!IsDevicePathEnd (DevicePathNode)) { while (!IsDevicePathEnd (DevicePathNode)) {
ChildDevicePathNode = NextDevicePathNode (DevicePathNode); ChildDevicePathNode = NextDevicePathNode (DevicePathNode);

View File

@ -274,7 +274,7 @@ IsaIoMemWrite (
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
IsaIoCopyMem ( IsaIoCopyMem(
IN EFI_ISA_IO_PROTOCOL *This, IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width, IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset, IN UINT32 DestOffset,

View File

@ -96,7 +96,7 @@ InitializeIsaIoInstance (
// //
// Use the ISA IO Protocol structure template to initialize the ISA IO instance // Use the ISA IO Protocol structure template to initialize the ISA IO instance
// //
CopyMem ( CopyMem(
&IsaIoDevice->IsaIo, &IsaIoDevice->IsaIo,
&mIsaIoInterface, &mIsaIoInterface,
sizeof (EFI_ISA_IO_PROTOCOL) sizeof (EFI_ISA_IO_PROTOCOL)
@ -367,7 +367,7 @@ IsaIoUnmap (
// so the processor can read the contents of the real buffer. // so the processor can read the contents of the real buffer.
// //
if (IsaMapInfo->Operation == EfiIsaIoOperationBusMasterWrite) { if (IsaMapInfo->Operation == EfiIsaIoOperationBusMasterWrite) {
CopyMem ( CopyMem(
(VOID *) (UINTN) IsaMapInfo->HostAddress, (VOID *) (UINTN) IsaMapInfo->HostAddress,
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress, (VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
IsaMapInfo->NumberOfBytes IsaMapInfo->NumberOfBytes
@ -631,7 +631,7 @@ IsaIoMemWrite (
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
IsaIoCopyMem ( IsaIoCopyMem(
IN EFI_ISA_IO_PROTOCOL *This, IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width, IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset, IN UINT32 DestOffset,
@ -676,7 +676,7 @@ IsaIoCopyMem (
return Status; return Status;
} }
Status = IsaIoDevice->PciIo->CopyMem ( Status = IsaIoDevice->PciIo->CopyMem(
IsaIoDevice->PciIo, IsaIoDevice->PciIo,
(EFI_PCI_IO_PROTOCOL_WIDTH) Width, (EFI_PCI_IO_PROTOCOL_WIDTH) Width,
EFI_PCI_IO_PASS_THROUGH_BAR, EFI_PCI_IO_PASS_THROUGH_BAR,
@ -831,7 +831,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
// so the DMA agent can read the contents of the real buffer. // so the DMA agent can read the contents of the real buffer.
// //
if (Operation == EfiIsaIoOperationSlaveRead) { if (Operation == EfiIsaIoOperationSlaveRead) {
CopyMem ( CopyMem(
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress, (VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
(VOID *) (UINTN) IsaMapInfo->HostAddress, (VOID *) (UINTN) IsaMapInfo->HostAddress,
IsaMapInfo->NumberOfBytes IsaMapInfo->NumberOfBytes
@ -1134,7 +1134,7 @@ IsaIoMapFullSupport (
// so the DMA agent can read the contents of the real buffer. // so the DMA agent can read the contents of the real buffer.
// //
if (Operation == EfiIsaIoOperationBusMasterRead) { if (Operation == EfiIsaIoOperationBusMasterRead) {
CopyMem ( CopyMem(
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress, (VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
(VOID *) (UINTN) IsaMapInfo->HostAddress, (VOID *) (UINTN) IsaMapInfo->HostAddress,
IsaMapInfo->NumberOfBytes IsaMapInfo->NumberOfBytes

View File

@ -440,7 +440,7 @@ InitializeIsaIoInstance (
// //
// Use the ISA IO Protocol structure template to initialize the ISA IO instance // Use the ISA IO Protocol structure template to initialize the ISA IO instance
// //
CopyMem ( CopyMem(
&IsaIoDevice->IsaIo, &IsaIoDevice->IsaIo,
&mIsaIoInterface, &mIsaIoInterface,
sizeof (EFI_ISA_IO_PROTOCOL) sizeof (EFI_ISA_IO_PROTOCOL)
@ -770,7 +770,7 @@ IsaIoUnmap (
// so the processor can read the contents of the real buffer. // so the processor can read the contents of the real buffer.
// //
if (IsaMapInfo->Operation == EfiIsaIoOperationBusMasterWrite) { if (IsaMapInfo->Operation == EfiIsaIoOperationBusMasterWrite) {
CopyMem ( CopyMem(
(VOID *) (UINTN) IsaMapInfo->HostAddress, (VOID *) (UINTN) IsaMapInfo->HostAddress,
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress, (VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
IsaMapInfo->NumberOfBytes IsaMapInfo->NumberOfBytes
@ -971,7 +971,7 @@ IsaIoMemWrite (
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
IsaIoCopyMem ( IsaIoCopyMem(
IN EFI_ISA_IO_PROTOCOL *This, IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width, IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset, IN UINT32 DestOffset,
@ -1016,7 +1016,7 @@ IsaIoCopyMem (
return Status; return Status;
} }
Status = IsaIoDevice->PciIo->CopyMem ( Status = IsaIoDevice->PciIo->CopyMem(
IsaIoDevice->PciIo, IsaIoDevice->PciIo,
(EFI_PCI_IO_PROTOCOL_WIDTH) Width, (EFI_PCI_IO_PROTOCOL_WIDTH) Width,
EFI_PCI_IO_PASS_THROUGH_BAR, EFI_PCI_IO_PASS_THROUGH_BAR,
@ -1171,7 +1171,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
// so the DMA agent can read the contents of the real buffer. // so the DMA agent can read the contents of the real buffer.
// //
if (Operation == EfiIsaIoOperationSlaveRead) { if (Operation == EfiIsaIoOperationSlaveRead) {
CopyMem ( CopyMem(
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress, (VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
(VOID *) (UINTN) IsaMapInfo->HostAddress, (VOID *) (UINTN) IsaMapInfo->HostAddress,
IsaMapInfo->NumberOfBytes IsaMapInfo->NumberOfBytes
@ -1474,7 +1474,7 @@ IsaIoMapFullSupport (
// so the DMA agent can read the contents of the real buffer. // so the DMA agent can read the contents of the real buffer.
// //
if (Operation == EfiIsaIoOperationBusMasterRead) { if (Operation == EfiIsaIoOperationBusMasterRead) {
CopyMem ( CopyMem(
(VOID *) (UINTN) IsaMapInfo->MappedHostAddress, (VOID *) (UINTN) IsaMapInfo->MappedHostAddress,
(VOID *) (UINTN) IsaMapInfo->HostAddress, (VOID *) (UINTN) IsaMapInfo->HostAddress,
IsaMapInfo->NumberOfBytes IsaMapInfo->NumberOfBytes

View File

@ -274,7 +274,7 @@ IsaIoMemWrite (
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
IsaIoCopyMem ( IsaIoCopyMem(
IN EFI_ISA_IO_PROTOCOL *This, IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width, IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset, IN UINT32 DestOffset,

View File

@ -561,7 +561,7 @@ SerialControllerDriverStart (
// already checked to make sure the RemainingDevicePath contains settings // already checked to make sure the RemainingDevicePath contains settings
// that we can support. // 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); FlowControl = (UART_FLOW_CONTROL_DEVICE_PATH *) NextDevicePathNode (RemainingDevicePath);
if (IsUartFlowControlNode (FlowControl)) { if (IsUartFlowControlNode (FlowControl)) {
FlowControlMap = ReadUnaligned32 (&FlowControl->FlowControlMap); FlowControlMap = ReadUnaligned32 (&FlowControl->FlowControlMap);
@ -1520,7 +1520,7 @@ IsaSerialSetAttributes (
+ GetDevicePathSize (SerialDevice->ParentDevicePath) + GetDevicePathSize (SerialDevice->ParentDevicePath)
- END_DEVICE_PATH_LENGTH - END_DEVICE_PATH_LENGTH
); );
CopyMem (Uart, &SerialDevice->UartDevicePath, sizeof (UART_DEVICE_PATH)); CopyMem(Uart, &SerialDevice->UartDevicePath, sizeof (UART_DEVICE_PATH));
Status = gBS->ReinstallProtocolInterface ( Status = gBS->ReinstallProtocolInterface (
SerialDevice->Handle, SerialDevice->Handle,
&gEfiDevicePathProtocolGuid, &gEfiDevicePathProtocolGuid,

View File

@ -54,7 +54,7 @@ PopEfikeyBufHead (
// Retrieve and remove the values // Retrieve and remove the values
// //
if (KeyData != NULL) { 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; Queue->Head = (Queue->Head + 1) % KEYBOARD_EFI_KEY_MAX_COUNT;
return EFI_SUCCESS; return EFI_SUCCESS;
@ -78,7 +78,7 @@ PushEfikeyBufTail (
// //
PopEfikeyBufHead (Queue, NULL); 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; 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; return EFI_SUCCESS;
} }
} }
@ -345,7 +345,7 @@ KeyboardWaitForKey (
// next key from the queue // next key from the queue
// //
while (!IsEfikeyBufEmpty (&ConsoleIn->EfiKeyQueue)) { while (!IsEfikeyBufEmpty (&ConsoleIn->EfiKeyQueue)) {
CopyMem ( CopyMem(
&KeyData, &KeyData,
&(ConsoleIn->EfiKeyQueue.Buffer[ConsoleIn->EfiKeyQueue.Head]), &(ConsoleIn->EfiKeyQueue.Buffer[ConsoleIn->EfiKeyQueue.Head]),
sizeof (EFI_KEY_DATA) sizeof (EFI_KEY_DATA)
@ -608,7 +608,7 @@ KeyboardRegisterKeyNotify (
NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE; NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction; NewNotify->KeyNotificationFn = KeyNotificationFunction;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA)); CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry); InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify; *NotifyHandle = NewNotify;

View File

@ -669,7 +669,7 @@ MouseAbsolutePointerGetState (
} }
OldTpl = gBS->RaiseTPL (TPL_NOTIFY); 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 // clear mouse state

View File

@ -682,7 +682,7 @@ MouseGetState (
} }
OldTpl = gBS->RaiseTPL (TPL_NOTIFY); 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 // clear mouse state

View File

@ -389,7 +389,7 @@ PartitionInstallGptChildHandles (
HdDev.SignatureType = SIGNATURE_TYPE_GUID; HdDev.SignatureType = SIGNATURE_TYPE_GUID;
HdDev.PartitionStart = Entry->StartingLBA; HdDev.PartitionStart = Entry->StartingLBA;
HdDev.PartitionSize = Entry->EndingLBA - Entry->StartingLBA + 1; 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, " Index : %d\n", (UINT32) Index));
DEBUG ((EFI_D_INFO, " Start LBA : %lx\n", (UINT64) HdDev.PartitionStart)); DEBUG ((EFI_D_INFO, " Start LBA : %lx\n", (UINT64) HdDev.PartitionStart));
@ -506,7 +506,7 @@ PartitionValidGptTable (
return FALSE; return FALSE;
} }
CopyMem (PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER)); CopyMem(PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER));
if (!PartitionCheckGptEntryArrayCRC (BlockIo, DiskIo, PartHeader)) { if (!PartitionCheckGptEntryArrayCRC (BlockIo, DiskIo, PartHeader)) {
FreePool(PartHdr); FreePool(PartHdr);
return FALSE; return FALSE;
@ -620,7 +620,7 @@ PartitionRestoreGptTable (
(PartHeader->LastUsableLBA + 1) : \ (PartHeader->LastUsableLBA + 1) : \
(PRIMARY_PART_HEADER_LBA + 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->MyLBA = PartHeader->AlternateLBA;
PartHdr->AlternateLBA = PartHeader->MyLBA; PartHdr->AlternateLBA = PartHeader->MyLBA;

View File

@ -182,7 +182,7 @@ PartitionInstallMbrChildHandles (
if (DevicePathType (LastDevicePathNode) == MEDIA_DEVICE_PATH && if (DevicePathType (LastDevicePathNode) == MEDIA_DEVICE_PATH &&
DevicePathSubType (LastDevicePathNode) == MEDIA_HARDDRIVE_DP DevicePathSubType (LastDevicePathNode) == MEDIA_HARDDRIVE_DP
) { ) {
CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev)); CopyMem(&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
} else { } else {
LastDevicePathNode = NULL; LastDevicePathNode = NULL;
} }
@ -225,7 +225,7 @@ PartitionInstallMbrChildHandles (
HdDev.PartitionNumber = PartitionNumber ++; HdDev.PartitionNumber = PartitionNumber ++;
HdDev.PartitionStart = UNPACK_UINT32 (Mbr->Partition[Index].StartingLBA); HdDev.PartitionStart = UNPACK_UINT32 (Mbr->Partition[Index].StartingLBA);
HdDev.PartitionSize = UNPACK_UINT32 (Mbr->Partition[Index].SizeInLBA); 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 ( Status = PartitionInstallChildHandle (
This, This,

View File

@ -1143,7 +1143,7 @@ PartitionInstallChildHandle (
Private->BlockIo.Revision = ParentBlockIo->Revision; Private->BlockIo.Revision = ParentBlockIo->Revision;
Private->BlockIo.Media = &Private->Media; 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.Reset = PartitionReset;
Private->BlockIo.ReadBlocks = PartitionReadBlocks; Private->BlockIo.ReadBlocks = PartitionReadBlocks;
@ -1156,7 +1156,7 @@ PartitionInstallChildHandle (
if (Private->DiskIo2 != NULL) { if (Private->DiskIo2 != NULL) {
ASSERT (Private->ParentBlockIo2 != NULL); ASSERT (Private->ParentBlockIo2 != NULL);
Private->BlockIo2.Media = &Private->Media2; 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.Reset = PartitionResetEx;
Private->BlockIo2.ReadBlocksEx = PartitionReadBlocksEx; Private->BlockIo2.ReadBlocksEx = PartitionReadBlocksEx;

View File

@ -927,7 +927,7 @@ IdeInitSubmitData (
// Make a local copy of device's IdentifyData and mark the valid flag // Make a local copy of device's IdentifyData and mark the valid flag
// //
if (IdentifyData != NULL) { if (IdentifyData != NULL) {
CopyMem ( CopyMem(
&(SataPrivateData->IdentifyData[Index]), &(SataPrivateData->IdentifyData[Index]),
IdentifyData, IdentifyData,
sizeof (EFI_IDENTIFY_DATA) sizeof (EFI_IDENTIFY_DATA)
@ -1005,7 +1005,7 @@ IdeInitDisqualifyMode (
// Record the disqualified modes per channel per device. From ATA/ATAPI spec, // 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. // 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]), &(SataPrivateData->DisqulifiedModes[(UINTN) Channel * (UINTN) SataPrivateData->DeviceCount + (UINTN) Device]),
BadModes, BadModes,
sizeof (EFI_ATA_COLLECTIVE_MODE) sizeof (EFI_ATA_COLLECTIVE_MODE)

View File

@ -553,7 +553,7 @@ UsbIoGetDeviceDescriptor (
UsbIf = USB_INTERFACE_FROM_USBIO (This); UsbIf = USB_INTERFACE_FROM_USBIO (This);
Dev = UsbIf->Device; 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); gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS; return EFI_SUCCESS;
@ -598,7 +598,7 @@ UsbIoGetActiveConfigDescriptor (
goto ON_EXIT; 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: ON_EXIT:
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);
@ -633,7 +633,7 @@ UsbIoGetInterfaceDescriptor (
OldTpl = gBS->RaiseTPL (USB_BUS_TPL); OldTpl = gBS->RaiseTPL (USB_BUS_TPL);
UsbIf = USB_INTERFACE_FROM_USBIO (This); 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); gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS; return EFI_SUCCESS;
@ -677,7 +677,7 @@ UsbIoGetEndpointDescriptor (
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
CopyMem ( CopyMem(
Descriptor, Descriptor,
&(UsbIf->IfSetting->Endpoints[Index]->Desc), &(UsbIf->IfSetting->Endpoints[Index]->Desc),
sizeof (EFI_USB_ENDPOINT_DESCRIPTOR) sizeof (EFI_USB_ENDPOINT_DESCRIPTOR)
@ -798,7 +798,7 @@ UsbIoGetStringDescriptor (
goto FREE_STR; goto FREE_STR;
} }
CopyMem (Buf, StrDesc->String, StrDesc->Length - 2); CopyMem(Buf, StrDesc->String, StrDesc->Length - 2);
*String = (CHAR16 *) Buf; *String = (CHAR16 *) Buf;
Status = EFI_SUCCESS; Status = EFI_SUCCESS;

View File

@ -210,7 +210,7 @@ UsbCreateDesc (
return NULL; return NULL;
} }
CopyMem (Desc, Head, (UINTN) DescLen); CopyMem(Desc, Head, (UINTN) DescLen);
*Consumed = Offset + Head->Len; *Consumed = Offset + Head->Len;

View File

@ -133,7 +133,7 @@ UsbCreateInterface (
} }
UsbIf->IfSetting = IfDesc->Settings[IfDesc->ActiveIndex]; UsbIf->IfSetting = IfDesc->Settings[IfDesc->ActiveIndex];
CopyMem ( CopyMem(
&(UsbIf->UsbIo), &(UsbIf->UsbIo),
&mUsbIoProtocol, &mUsbIoProtocol,
sizeof (EFI_USB_IO_PROTOCOL) sizeof (EFI_USB_IO_PROTOCOL)

View File

@ -684,7 +684,7 @@ UsbOnHubInterrupt (
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
CopyMem (HubIf->ChangeMap, Data, DataLength); CopyMem(HubIf->ChangeMap, Data, DataLength);
gBS->SignalEvent (HubIf->HubNotify); gBS->SignalEvent (HubIf->HubNotify);
return EFI_SUCCESS; return EFI_SUCCESS;

View File

@ -815,7 +815,7 @@ GetUsbDPFromFullDP (
if (!UsbDevicePathPtr) { if (!UsbDevicePathPtr) {
return NULL; return NULL;
} }
CopyMem (UsbDevicePathPtr, UsbDevicePathBeginPtr, Size); CopyMem(UsbDevicePathPtr, UsbDevicePathBeginPtr, Size);
// //
// Append end device path node // Append end device path node
// //

View File

@ -834,7 +834,7 @@ USBKeyboardReadKeyStroke (
} }
} }
CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY)); CopyMem(Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
} }
@ -876,7 +876,7 @@ USBKeyboardWaitForKey (
// //
// If there is pending key, signal the event. // If there is pending key, signal the event.
// //
CopyMem ( CopyMem(
&KeyData, &KeyData,
UsbKeyboardDevice->EfiKeyQueue.Buffer[UsbKeyboardDevice->EfiKeyQueue.Head], UsbKeyboardDevice->EfiKeyQueue.Buffer[UsbKeyboardDevice->EfiKeyQueue.Head],
sizeof (EFI_KEY_DATA) sizeof (EFI_KEY_DATA)
@ -1294,7 +1294,7 @@ USBKeyboardRegisterKeyNotify (
NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE; NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction; NewNotify->KeyNotificationFn = KeyNotificationFunction;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA)); CopyMem(&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&UsbKeyboardDevice->NotifyList, &NewNotify->NotifyEntry); InsertTailList (&UsbKeyboardDevice->NotifyList, &NewNotify->NotifyEntry);

View File

@ -630,7 +630,7 @@ SetKeyboardLayoutEvent (
// //
// Copy from HII keyboard layout package binary for alignment // 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. // Fill the key into KeyConvertionTable, whose index is calculated from USB keycode.
@ -642,7 +642,7 @@ SetKeyboardLayoutEvent (
FreePool(KeyboardLayout); FreePool(KeyboardLayout);
return; 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. // For non-spacing key, create the list with a non-spacing key followed by physical keys.
@ -657,7 +657,7 @@ SetKeyboardLayoutEvent (
KeyCount = 0; KeyCount = 0;
NsKey = KeyDescriptor + 1; NsKey = KeyDescriptor + 1;
for (Index2 = (UINT8) Index + 1; Index2 < KeyboardLayout->DescriptorCount; Index2++) { 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) { if (TempKey.Modifier == EFI_NS_KEY_DEPENDENCY_MODIFIER) {
KeyCount++; KeyCount++;
} else { } else {
@ -689,7 +689,7 @@ SetKeyboardLayoutEvent (
// //
TableEntry = GetKeyDescriptor (UsbKeyboardDevice, 0x58); TableEntry = GetKeyDescriptor (UsbKeyboardDevice, 0x58);
KeyDescriptor = GetKeyDescriptor (UsbKeyboardDevice, 0x28); KeyDescriptor = GetKeyDescriptor (UsbKeyboardDevice, 0x28);
CopyMem (TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR)); CopyMem(TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
FreePool(KeyboardLayout); FreePool(KeyboardLayout);
} }
@ -1819,7 +1819,7 @@ Enqueue (
Queue->Head = (Queue->Head + 1) % (MAX_KEY_ALLOWED + 1); 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. // Adjust the tail pointer of the FIFO keyboard buffer.
@ -1852,7 +1852,7 @@ Dequeue (
return EFI_DEVICE_ERROR; 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. // Adjust the head pointer of the FIFO keyboard buffer.

View File

@ -101,7 +101,7 @@ GetNextHidItem (
// 2-byte data // 2-byte data
// //
if ((EndPos - StartPos) >= 2) { if ((EndPos - StartPos) >= 2) {
CopyMem (&HidItem->Data.Uint16, StartPos, sizeof (UINT16)); CopyMem(&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
StartPos += 2; StartPos += 2;
return StartPos; return StartPos;
} }
@ -112,7 +112,7 @@ GetNextHidItem (
// //
HidItem->Size = 4; HidItem->Size = 4;
if ((EndPos - StartPos) >= 4) { if ((EndPos - StartPos) >= 4) {
CopyMem (&HidItem->Data.Uint32, StartPos, sizeof (UINT32)); CopyMem(&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
StartPos += 4; StartPos += 4;
return StartPos; return StartPos;
} }

View File

@ -926,7 +926,7 @@ GetMouseState (
// //
// Retrieve mouse state from USB_MOUSE_DEV, which was filled by OnMouseInterruptComplete() // Retrieve mouse state from USB_MOUSE_DEV, which was filled by OnMouseInterruptComplete()
// //
CopyMem ( CopyMem(
MouseState, MouseState,
&MouseDev->State, &MouseDev->State,
sizeof (EFI_SIMPLE_POINTER_STATE) sizeof (EFI_SIMPLE_POINTER_STATE)

View File

@ -1051,7 +1051,7 @@ XhcControlTransfer (
// //
// Store a copy of device scriptor as hub device need this info to configure endpoint. // 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 (Xhc->UsbDevContext[SlotId].DevDesc.BcdUSB >= 0x0300) {
// //
// If it's a usb3.0 device, then its max packet size is a 2^n. // 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; Index = Xhc->UsbDevContext[SlotId].DevDesc.NumConfigurations - 1;
} }
Xhc->UsbDevContext[SlotId].ConfDesc[Index] = AllocateZeroPool(*DataLength); 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. // Default to use AlternateSetting 0 for all interfaces.
// //
@ -1868,7 +1868,7 @@ XhcCreateUsbHc (
Xhc->PciIo = PciIo; Xhc->PciIo = PciIo;
Xhc->DevicePath = DevicePath; Xhc->DevicePath = DevicePath;
Xhc->OriginalPciAttributes = OriginalPciAttributes; Xhc->OriginalPciAttributes = OriginalPciAttributes;
CopyMem (&Xhc->Usb2Hc, &gXhciUsb2HcTemplate, sizeof (EFI_USB2_HC_PROTOCOL)); CopyMem(&Xhc->Usb2Hc, &gXhciUsb2HcTemplate, sizeof (EFI_USB2_HC_PROTOCOL));
InitializeListHead (&Xhc->AsyncIntTransfers); InitializeListHead (&Xhc->AsyncIntTransfers);

View File

@ -43,7 +43,7 @@ XhcCreateCmdTrb (
XhcSyncTrsRing (Xhc, Urb->Ring); XhcSyncTrsRing (Xhc, Urb->Ring);
Urb->TrbNum = 1; Urb->TrbNum = 1;
Urb->TrbStart = Urb->Ring->RingEnqueue; 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->TrbStart->CycleBit = Urb->Ring->RingPCS & BIT0;
Urb->TrbEnd = Urb->TrbStart; Urb->TrbEnd = Urb->TrbStart;
@ -1629,7 +1629,7 @@ XhcMonitorAsyncRequests (
continue; continue;
} }
CopyMem (ProcBuf, Urb->Data, Urb->Completed); CopyMem(ProcBuf, Urb->Data, Urb->Completed);
} }
// //
@ -3146,7 +3146,7 @@ XhcSetConfigCmd (
InputContext = Xhc->UsbDevContext[SlotId].InputContext; InputContext = Xhc->UsbDevContext[SlotId].InputContext;
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext; OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
ZeroMem (InputContext, sizeof (INPUT_CONTEXT)); ZeroMem (InputContext, sizeof (INPUT_CONTEXT));
CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT)); CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
// ASSERT (ConfigDesc != NULL); // ASSERT (ConfigDesc != NULL);
if (!ConfigDesc) { if (!ConfigDesc) {
@ -3239,7 +3239,7 @@ XhcSetConfigCmd64 (
InputContext = Xhc->UsbDevContext[SlotId].InputContext; InputContext = Xhc->UsbDevContext[SlotId].InputContext;
OutputContext = Xhc->UsbDevContext[SlotId].OutputContext; OutputContext = Xhc->UsbDevContext[SlotId].OutputContext;
ZeroMem (InputContext, sizeof (INPUT_CONTEXT_64)); 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); // ASSERT (ConfigDesc != NULL);
if (!ConfigDesc) { if (!ConfigDesc) {
@ -3523,7 +3523,7 @@ XhcSetInterface (
// So the default Drop Context and Add Context flags can be '0' to cover 1). // So the default Drop Context and Add Context flags can be '0' to cover 1).
// //
ZeroMem (InputContext, sizeof (INPUT_CONTEXT)); ZeroMem (InputContext, sizeof (INPUT_CONTEXT));
CopyMem (&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT)); CopyMem(&InputContext->Slot, &OutputContext->Slot, sizeof (SLOT_CONTEXT));
//ASSERT (ConfigDesc != NULL); //ASSERT (ConfigDesc != NULL);
@ -3725,7 +3725,7 @@ XhcSetInterface64 (
// So the default Drop Context and Add Context flags can be '0' to cover 1). // So the default Drop Context and Add Context flags can be '0' to cover 1).
// //
ZeroMem (InputContext, sizeof (INPUT_CONTEXT_64)); 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); //ASSERT (ConfigDesc != NULL);

View File

@ -696,13 +696,13 @@ FSI_FP_Read(
//Print(L"\nGot: %s\n", FSIThis->FName); //Print(L"\nGot: %s\n", FSIThis->FName);
String = AsciiStrStr((CHAR8*)Buffer, "<string>Safe Boot</string>"); String = AsciiStrStr((CHAR8*)Buffer, "<string>Safe Boot</string>");
if (String != NULL) { if (String != NULL) {
CopyMem (String, "<string>Root</string> ", 26); CopyMem(String, "<string>Root</string> ", 26);
Print(L"\nForced load: %s\n", FSIThis->FName); Print(L"\nForced load: %s\n", FSIThis->FName);
//gBS->Stall(5000000); //gBS->Stall(5000000);
} else { } else {
String = AsciiStrStr((CHAR8*)Buffer, "<string>Network-Root</string>"); String = AsciiStrStr((CHAR8*)Buffer, "<string>Network-Root</string>");
if (String != NULL) { if (String != NULL) {
CopyMem (String, "<string>Root</string> ", 29); CopyMem(String, "<string>Root</string> ", 29);
Print(L"\nForced load: %s\n", FSIThis->FName); Print(L"\nForced load: %s\n", FSIThis->FName);
//gBS->Stall(5000000); //gBS->Stall(5000000);
} }

View File

@ -169,7 +169,7 @@ StartApfsDriver (
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
CopyMem ((VOID *) NewSystemTable, gST, gST->Hdr.HeaderSize); CopyMem((VOID *) NewSystemTable, gST, gST->Hdr.HeaderSize);
NewSystemTable->ConOut = &mNullTextOutputProtocol; NewSystemTable->ConOut = &mNullTextOutputProtocol;
NewSystemTable->Hdr.CRC32 = 0; NewSystemTable->Hdr.CRC32 = 0;
@ -837,7 +837,7 @@ ApfsDriverLoaderStart (
// Extract Container UUID // Extract Container UUID
// //
ContainerSuperBlock = (APFS_CSB *)ApfsBlock; ContainerSuperBlock = (APFS_CSB *)ApfsBlock;
CopyMem (&ContainerUuid, &ContainerSuperBlock->Uuid, sizeof (EFI_GUID)); CopyMem(&ContainerUuid, &ContainerSuperBlock->Uuid, sizeof (EFI_GUID));
EfiBootRecordBlockPtr = ContainerSuperBlock->EfiBootRecordBlock; EfiBootRecordBlockPtr = ContainerSuperBlock->EfiBootRecordBlock;
// //
@ -999,7 +999,7 @@ ApfsDriverLoaderStart (
Private->ControllerHandle = ControllerHandle; Private->ControllerHandle = ControllerHandle;
EfiBootRecordLocationInfo = &Private->EfiBootRecordLocationInfo; EfiBootRecordLocationInfo = &Private->EfiBootRecordLocationInfo;
EfiBootRecordLocationInfo->ControllerHandle = ControllerHandle; EfiBootRecordLocationInfo->ControllerHandle = ControllerHandle;
CopyMem (&EfiBootRecordLocationInfo->ContainerUuid, &ContainerUuid, 16); CopyMem(&EfiBootRecordLocationInfo->ContainerUuid, &ContainerUuid, 16);
Status = gBS->InstallMultipleProtocolInterfaces ( Status = gBS->InstallMultipleProtocolInterfaces (
&Private->ControllerHandle, &Private->ControllerHandle,

View File

@ -111,7 +111,7 @@ Returns:
// //
// Write LFN directory entry // Write LFN directory entry
// //
SetMem (LfnBuffer, sizeof (CHAR16) * LFN_CHAR_TOTAL * EntryCount, 0xff); SetMem(LfnBuffer, sizeof (CHAR16) * LFN_CHAR_TOTAL * EntryCount, 0xff);
Status = StrCpyS ( Status = StrCpyS (
LfnBuffer, LfnBuffer,
sizeof (LfnBuffer) / sizeof (LfnBuffer[0]), sizeof (LfnBuffer) / sizeof (LfnBuffer[0]),
@ -132,11 +132,11 @@ Returns:
LfnEntry.Ordinal |= FAT_LFN_LAST; 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; 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; 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; LfnBufferPointer += LFN_CHAR3_LEN;
EntryPos--; EntryPos--;
if (DirEnt->Invalid) { if (DirEnt->Invalid) {
@ -264,7 +264,7 @@ Returns:
UINT8 *Entry2; UINT8 *Entry2;
Entry1 = (UINT8 *) &DirEnt1->Entry; Entry1 = (UINT8 *) &DirEnt1->Entry;
Entry2 = (UINT8 *) &DirEnt2->Entry; Entry2 = (UINT8 *) &DirEnt2->Entry;
CopyMem ( CopyMem(
Entry1 + FAT_ENTRY_INFO_OFFSET, Entry1 + FAT_ENTRY_INFO_OFFSET,
Entry2 + FAT_ENTRY_INFO_OFFSET, Entry2 + FAT_ENTRY_INFO_OFFSET,
sizeof (FAT_DIRECTORY_ENTRY) - FAT_ENTRY_INFO_OFFSET sizeof (FAT_DIRECTORY_ENTRY) - FAT_ENTRY_INFO_OFFSET
@ -335,11 +335,11 @@ Returns:
break; break;
} }
CopyMem (LfnBufferPointer, LfnEntry.Name1, sizeof (CHAR16) * LFN_CHAR1_LEN); CopyMem(LfnBufferPointer, LfnEntry.Name1, sizeof (CHAR16) * LFN_CHAR1_LEN);
LfnBufferPointer += 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; 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; LfnBufferPointer += LFN_CHAR3_LEN;
LfnOrdinal++; LfnOrdinal++;
} while ((LfnEntry.Ordinal & FAT_LFN_LAST) == 0); } while ((LfnEntry.Ordinal & FAT_LFN_LAST) == 0);
@ -475,7 +475,7 @@ Returns:
// Remember the directory's entry position on disk // Remember the directory's entry position on disk
// //
DirEnt->EntryPos = (UINT16) ODir->CurrentEndPos; DirEnt->EntryPos = (UINT16) ODir->CurrentEndPos;
CopyMem (&DirEnt->Entry, &Entry, sizeof (FAT_DIRECTORY_ENTRY)); CopyMem(&DirEnt->Entry, &Entry, sizeof (FAT_DIRECTORY_ENTRY));
FatLoadLongNameEntry (OFile, DirEnt); FatLoadLongNameEntry (OFile, DirEnt);
if (DirEnt->FileString == NULL) { if (DirEnt->FileString == NULL) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
@ -559,12 +559,12 @@ Returns:
} }
ZeroMem (&FatLastAccess.Time, sizeof (FatLastAccess.Time)); 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 (&FatLastAccess, &Info->LastAccessTime);
FatFatTimeToEfiTime (&Entry->FileCreateTime, &Info->CreateTime); FatFatTimeToEfiTime (&Entry->FileCreateTime, &Info->CreateTime);
FatFatTimeToEfiTime (&Entry->FileModificationTime, &Info->ModificationTime); FatFatTimeToEfiTime (&Entry->FileModificationTime, &Info->ModificationTime);
Info->Attribute = Entry->Attributes & EFI_FILE_VALID_ATTR; Info->Attribute = Entry->Attributes & EFI_FILE_VALID_ATTR;
CopyMem ((CHAR8 *) Buffer + Size, DirEnt->FileString, NameSize); CopyMem((CHAR8 *) Buffer + Size, DirEnt->FileString, NameSize);
} }
*BufferSize = ResultSize; *BufferSize = ResultSize;
@ -763,7 +763,7 @@ Returns:
DirEnt->EntryCount = 1; DirEnt->EntryCount = 1;
FileString = DirEnt->FileString; FileString = DirEnt->FileString;
File8Dot3Name = DirEnt->Entry.FileName; File8Dot3Name = DirEnt->Entry.FileName;
SetMem (File8Dot3Name, FAT_NAME_LEN, ' '); SetMem(File8Dot3Name, FAT_NAME_LEN, ' ');
if (StrCmp (FileString, L".") == 0) { if (StrCmp (FileString, L".") == 0) {
// //
// "." entry // "." entry
@ -997,8 +997,8 @@ Returns:
// We will append this entry to the end of directory // We will append this entry to the end of directory
// //
FatGetCurrentFatTime (&DirEnt->Entry.FileCreateTime); FatGetCurrentFatTime (&DirEnt->Entry.FileCreateTime);
CopyMem (&DirEnt->Entry.FileModificationTime, &DirEnt->Entry.FileCreateTime, sizeof (FAT_DATE_TIME)); 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.FileLastAccess, &DirEnt->Entry.FileCreateTime.Date, sizeof (FAT_DATE));
NewEndPos = ODir->CurrentEndPos + DirEnt->EntryCount; NewEndPos = ODir->CurrentEndPos + DirEnt->EntryCount;
if (NewEndPos * sizeof (FAT_DIRECTORY_ENTRY) > OFile->FileSize) { if (NewEndPos * sizeof (FAT_DIRECTORY_ENTRY) > OFile->FileSize) {
if (NewEndPos >= (OFile->IsFixedRootDir ? OFile->Volume->RootEntries : FAT_MAX_DIRENTRY_COUNT)) { if (NewEndPos >= (OFile->IsFixedRootDir ? OFile->Volume->RootEntries : FAT_MAX_DIRENTRY_COUNT)) {
@ -1108,7 +1108,7 @@ Returns:
LabelDirEnt.Entry.Attributes = FAT_ATTRIBUTE_VOLUME_ID; 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)) { if (FatStrToFat (Name, FAT_NAME_LEN, LabelDirEnt.Entry.FileName)) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }

View File

@ -83,7 +83,7 @@ Returns:
// //
if (IoMode == READ_DISK) { if (IoMode == READ_DISK) {
if (CacheTag->Dirty) { if (CacheTag->Dirty) {
CopyMem ( CopyMem(
Buffer + ((PageNo - StartPageNo) << PageAlignment), Buffer + ((PageNo - StartPageNo) << PageAlignment),
BaseAddress + (GroupNo << PageAlignment), BaseAddress + (GroupNo << PageAlignment),
PageSize PageSize
@ -289,7 +289,7 @@ Returns:
Source = Buffer; Source = Buffer;
} }
CopyMem (Destination, Source, Length); CopyMem(Destination, Source, Length);
} }
return Status; return Status;

View File

@ -54,7 +54,7 @@ Returns:
PossibleShortName = TRUE; PossibleShortName = TRUE;
SeparateDot = NULL; SeparateDot = NULL;
SetMem (File8Dot3Name, FAT_NAME_LEN, ' '); SetMem(File8Dot3Name, FAT_NAME_LEN, ' ');
for (TempName = FileName; *TempName; TempName++) { for (TempName = FileName; *TempName; TempName++) {
if (*TempName == L'.') { if (*TempName == L'.') {
SeparateDot = TempName; SeparateDot = TempName;

View File

@ -281,7 +281,7 @@ Returns:
// Update the last modification time // Update the last modification time
// //
FatGetCurrentFatTime (&FatNow); FatGetCurrentFatTime (&FatNow);
CopyMem (&DirEnt->Entry.FileLastAccess, &FatNow.Date, sizeof (FAT_DATE)); CopyMem(&DirEnt->Entry.FileLastAccess, &FatNow.Date, sizeof (FAT_DATE));
if (!OFile->PreserveLastModification) { if (!OFile->PreserveLastModification) {
FatGetCurrentFatTime (&DirEnt->Entry.FileModificationTime); FatGetCurrentFatTime (&DirEnt->Entry.FileModificationTime);
} }

View File

@ -133,7 +133,7 @@ Returns:
Volume->FatInfoSector.FreeInfo.ClusterCount, Volume->FatInfoSector.FreeInfo.ClusterCount,
ClusterAlignment ClusterAlignment
); );
CopyMem ((CHAR8 *) Buffer + Size, Name, NameSize); CopyMem((CHAR8 *) Buffer + Size, Name, NameSize);
} }
*BufferSize = ResultSize; *BufferSize = ResultSize;
@ -183,7 +183,7 @@ Returns:
Status = EFI_BUFFER_TOO_SMALL; Status = EFI_BUFFER_TOO_SMALL;
if (*BufferSize >= ResultSize) { if (*BufferSize >= ResultSize) {
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
CopyMem ((CHAR8 *) Buffer + Size, Name, NameSize); CopyMem((CHAR8 *) Buffer + Size, Name, NameSize);
} }
*BufferSize = ResultSize; *BufferSize = ResultSize;

View File

@ -58,7 +58,7 @@ Returns:
IFile->Signature = FAT_IFILE_SIGNATURE; 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 // Report the correct revision number based on the DiskIo2 availability

View File

@ -355,7 +355,7 @@ PciIoConfigWrite (
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PciIoCopyMem ( PciIoCopyMem(
IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex, IN UINT8 DestBarIndex,

Some files were not shown because too many files have changed in this diff Show More