X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SecurityPkg%2FTcg%2FMemoryOverwriteControl%2FTcgMor.c;h=c16761bb3dd99cc71d807f4af625b2490352da3b;hp=4fc3330c3964d0d2851537d5aedcc09cd88df3c5;hb=b3548d32ddb553a9e95503457c66d11462622d16;hpb=5a702acd3df099307d9bae0725f97b52b4895382 diff --git a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c b/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c index 4fc3330c39..c16761bb3d 100644 --- a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c +++ b/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c @@ -1,17 +1,17 @@ /** @file TCG MOR (Memory Overwrite Request) Control Driver. - This driver initilize MemoryOverwriteRequestControl variable. It + This driver initilize MemoryOverwriteRequestControl variable. It will clear MOR_CLEAR_MEMORY_BIT bit if it is set. It will also do TPer Reset for those encrypted drives through EFI_STORAGE_SECURITY_COMMAND_PROTOCOL at EndOfDxe. -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
-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 +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+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 http://opensource.org/licenses/bsd-license.php -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -36,7 +36,7 @@ OnReadyToBoot ( { EFI_STATUS Status; UINTN DataSize; - + if (MOR_CLEAR_MEMORY_VALUE (mMorControl) == 0x0) { // // MorControl is expected, directly return to avoid unnecessary variable operation @@ -47,14 +47,14 @@ OnReadyToBoot ( // Clear MOR_CLEAR_MEMORY_BIT // DEBUG ((EFI_D_INFO, "TcgMor: Clear MorClearMemory bit\n")); - mMorControl &= 0xFE; + mMorControl &= 0xFE; DataSize = sizeof (mMorControl); Status = gRT->SetVariable ( - MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, - &gEfiMemoryOverwriteControlDataGuid, + MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, + &gEfiMemoryOverwriteControlDataGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - DataSize, + DataSize, &mMorControl ); if (EFI_ERROR (Status)) { @@ -304,7 +304,7 @@ TPerResetAtEndOfDxe ( @param[in] ImageHandle Image handle of this driver. @param[in] SystemTable A Pointer to the EFI System Table. - @retval EFI_SUCEESS + @retval EFI_SUCEESS @return Others Some error occurs. **/ EFI_STATUS @@ -324,10 +324,10 @@ MorDriverEntryPoint ( DataSize = sizeof (mMorControl); Status = gRT->GetVariable ( - MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, - &gEfiMemoryOverwriteControlDataGuid, - NULL, - &DataSize, + MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, + &gEfiMemoryOverwriteControlDataGuid, + NULL, + &DataSize, &mMorControl ); if (EFI_ERROR (Status)) { @@ -336,10 +336,10 @@ MorDriverEntryPoint ( // mMorControl = 0; Status = gRT->SetVariable ( - MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, - &gEfiMemoryOverwriteControlDataGuid, + MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, + &gEfiMemoryOverwriteControlDataGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - DataSize, + DataSize, &mMorControl ); DEBUG ((EFI_D_INFO, "TcgMor: Create MOR variable! Status = %r\n", Status));