Changeset 80721 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/PlatformPei/AmdSev.c
- Timestamp:
- Sep 11, 2019 8:46:37 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133262
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-129237 /vendor/edk2/current 103735-103757,103769-103776,129194-133213
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/PlatformPei/AmdSev.c
r77662 r80721 4 4 Copyright (c) 2017, Advanced Micro Devices. All rights reserved.<BR> 5 5 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD 8 License which accompanies this distribution. The full text of the license 9 may be found at http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 6 SPDX-License-Identifier: BSD-2-Clause-Patent 13 7 14 8 **/ … … 16 10 // The package level header files this module uses 17 11 // 12 #include <Library/DebugLib.h> 13 #include <Library/HobLib.h> 14 #include <Library/MemEncryptSevLib.h> 15 #include <Library/PcdLib.h> 18 16 #include <PiPei.h> 17 #include <Register/Amd/Cpuid.h> 18 #include <Register/Cpuid.h> 19 19 20 #include <Library/DebugLib.h> 21 #include <Library/PcdLib.h> 22 #include <Register/Cpuid.h> 23 #include <Register/Amd/Cpuid.h> 24 #include <Library/MemEncryptSevLib.h> 20 #include "Platform.h" 25 21 26 22 /** … … 31 27 **/ 32 28 VOID 33 EFIAPI34 29 AmdSevInitialize ( 35 30 VOID … … 67 62 PcdStatus = PcdSet32S (PcdOptionRomImageVerificationPolicy, 0x4); 68 63 ASSERT_RETURN_ERROR (PcdStatus); 64 65 // 66 // When SMM is required, cover the pages containing the initial SMRAM Save 67 // State Map with a memory allocation HOB: 68 // 69 // There's going to be a time interval between our decrypting those pages for 70 // SMBASE relocation and re-encrypting the same pages after SMBASE 71 // relocation. We shall ensure that the DXE phase stay away from those pages 72 // until after re-encryption, in order to prevent an information leak to the 73 // hypervisor. 74 // 75 if (FeaturePcdGet (PcdSmmSmramRequire) && (mBootMode != BOOT_ON_S3_RESUME)) { 76 RETURN_STATUS LocateMapStatus; 77 UINTN MapPagesBase; 78 UINTN MapPagesCount; 79 80 LocateMapStatus = MemEncryptSevLocateInitialSmramSaveStateMapPages ( 81 &MapPagesBase, 82 &MapPagesCount 83 ); 84 ASSERT_RETURN_ERROR (LocateMapStatus); 85 86 BuildMemoryAllocationHob ( 87 MapPagesBase, // BaseAddress 88 EFI_PAGES_TO_SIZE (MapPagesCount), // Length 89 EfiBootServicesData // MemoryType 90 ); 91 } 69 92 }
Note:
See TracChangeset
for help on using the changeset viewer.