VirtualBox

Ignore:
Timestamp:
Aug 12, 2020 4:09:12 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139865
Message:

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/PlatformPei/AmdSev.c

    r80721 r85718  
    1010// The package level header files this module uses
    1111//
     12#include <IndustryStandard/Q35MchIch9.h>
    1213#include <Library/DebugLib.h>
    1314#include <Library/HobLib.h>
     
    1718#include <Register/Amd/Cpuid.h>
    1819#include <Register/Cpuid.h>
     20#include <Register/Intel/SmramSaveStateMap.h>
    1921
    2022#include "Platform.h"
     
    8486    ASSERT_RETURN_ERROR (LocateMapStatus);
    8587
    86     BuildMemoryAllocationHob (
    87       MapPagesBase,                      // BaseAddress
    88       EFI_PAGES_TO_SIZE (MapPagesCount), // Length
    89       EfiBootServicesData                // MemoryType
    90       );
     88    if (mQ35SmramAtDefaultSmbase) {
     89      //
     90      // The initial SMRAM Save State Map has been covered as part of a larger
     91      // reserved memory allocation in InitializeRamRegions().
     92      //
     93      ASSERT (SMM_DEFAULT_SMBASE <= MapPagesBase);
     94      ASSERT (
     95        (MapPagesBase + EFI_PAGES_TO_SIZE (MapPagesCount) <=
     96         SMM_DEFAULT_SMBASE + MCH_DEFAULT_SMBASE_SIZE)
     97        );
     98    } else {
     99      BuildMemoryAllocationHob (
     100        MapPagesBase,                      // BaseAddress
     101        EFI_PAGES_TO_SIZE (MapPagesCount), // Length
     102        EfiBootServicesData                // MemoryType
     103        );
     104    }
    91105  }
    92106}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette