MdePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
all SMRAM range via SMM_ACCESS2_PROTOCOL, including the range for firmware (like SMM Core
|
||||
and SMM driver) and/or specific dedicated hardware.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -86,9 +86,9 @@ SmmMemLibInternalCalculateMaximumSupportAddress (
|
||||
if (PhysicalAddressBits > 48) {
|
||||
PhysicalAddressBits = 48;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Save the maximum support address in one global variable
|
||||
// Save the maximum support address in one global variable
|
||||
//
|
||||
mSmmMemLibInternalMaximumSupportAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)(LShiftU64 (1, PhysicalAddressBits) - 1);
|
||||
DEBUG ((EFI_D_INFO, "mSmmMemLibInternalMaximumSupportAddress = 0x%lx\n", mSmmMemLibInternalMaximumSupportAddress));
|
||||
@@ -111,7 +111,7 @@ SmmIsBufferOutsideSmmValid (
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
|
||||
|
||||
//
|
||||
// Check override.
|
||||
// NOTE: (B:0->L:4G) is invalid for IA32, but (B:1->L:4G-1)/(B:4G-1->L:1) is valid.
|
||||
@@ -131,7 +131,7 @@ SmmIsBufferOutsideSmmValid (
|
||||
));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
for (Index = 0; Index < mSmmMemLibInternalSmramCount; Index ++) {
|
||||
if (((Buffer >= mSmmMemLibInternalSmramRanges[Index].CpuStart) && (Buffer < mSmmMemLibInternalSmramRanges[Index].CpuStart + mSmmMemLibInternalSmramRanges[Index].PhysicalSize)) ||
|
||||
((mSmmMemLibInternalSmramRanges[Index].CpuStart >= Buffer) && (mSmmMemLibInternalSmramRanges[Index].CpuStart < Buffer + Length))) {
|
||||
@@ -157,7 +157,7 @@ SmmIsBufferOutsideSmmValid (
|
||||
if (mSmmReadyToLock) {
|
||||
EFI_MEMORY_DESCRIPTOR *MemoryMap;
|
||||
BOOLEAN InValidCommunicationRegion;
|
||||
|
||||
|
||||
InValidCommunicationRegion = FALSE;
|
||||
MemoryMap = mMemoryMap;
|
||||
for (Index = 0; Index < mMemoryMapEntryCount; Index++) {
|
||||
@@ -222,7 +222,7 @@ SmmCopyMemToSmram (
|
||||
If the check passes, it copies memory and returns EFI_SUCCESS.
|
||||
If the check fails, it returns EFI_SECURITY_VIOLATION.
|
||||
The implementation must be reentrant.
|
||||
|
||||
|
||||
@param DestinationBuffer The pointer to the destination buffer of the memory copy.
|
||||
@param SourceBuffer The pointer to the source buffer of the memory copy.
|
||||
@param Length The number of bytes to copy from SourceBuffer to DestinationBuffer.
|
||||
@@ -255,7 +255,7 @@ SmmCopyMemFromSmram (
|
||||
If the check passes, it copies memory and returns EFI_SUCCESS.
|
||||
If the check fails, it returns EFI_SECURITY_VIOLATION.
|
||||
The implementation must be reentrant, and it must handle the case where source buffer overlaps destination buffer.
|
||||
|
||||
|
||||
@param DestinationBuffer The pointer to the destination buffer of the memory copy.
|
||||
@param SourceBuffer The pointer to the source buffer of the memory copy.
|
||||
@param Length The number of bytes to copy from SourceBuffer to DestinationBuffer.
|
||||
@@ -292,11 +292,11 @@ SmmCopyMem (
|
||||
It checks if target buffer is valid per processor architecture and not overlap with SMRAM.
|
||||
If the check passes, it fills memory and returns EFI_SUCCESS.
|
||||
If the check fails, it returns EFI_SECURITY_VIOLATION.
|
||||
|
||||
|
||||
@param Buffer The memory to set.
|
||||
@param Length The number of bytes to set.
|
||||
@param Value The value with which to fill Length bytes of Buffer.
|
||||
|
||||
|
||||
@retval EFI_SECURITY_VIOLATION The Buffer is invalid per processor architecture or overlap with SMRAM.
|
||||
@retval EFI_SUCCESS Memory is set.
|
||||
|
||||
@@ -359,7 +359,7 @@ SmmLibInternalEndOfDxeNotify (
|
||||
do {
|
||||
Status = gBS->AllocatePool (EfiBootServicesData, MemoryMapSize, (VOID **)&MemoryMap);
|
||||
ASSERT (MemoryMap != NULL);
|
||||
|
||||
|
||||
Status = gBS->GetMemoryMap (
|
||||
&MemoryMapSize,
|
||||
MemoryMap,
|
||||
@@ -391,7 +391,7 @@ SmmLibInternalEndOfDxeNotify (
|
||||
MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize);
|
||||
}
|
||||
MemoryMap = MemoryMapStart;
|
||||
|
||||
|
||||
//
|
||||
// Get Data
|
||||
//
|
||||
@@ -412,7 +412,7 @@ SmmLibInternalEndOfDxeNotify (
|
||||
}
|
||||
mMemoryMap = SmmMemoryMapStart;
|
||||
MemoryMap = MemoryMapStart;
|
||||
|
||||
|
||||
gBS->FreePool (MemoryMap);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -458,7 +458,7 @@ SmmMemLibConstructor (
|
||||
EFI_STATUS Status;
|
||||
EFI_SMM_ACCESS2_PROTOCOL *SmmAccess;
|
||||
UINTN Size;
|
||||
|
||||
|
||||
//
|
||||
// Get SMRAM information
|
||||
//
|
||||
|
Reference in New Issue
Block a user