diff options
author | Laszlo Ersek <lersek@redhat.com> | 2015-11-30 18:41:29 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-11-30 18:41:29 +0000 |
commit | cdef34ec12f91023fa86bb49d1f33541d87eb132 (patch) | |
tree | 5e13d4076cf9e4d5de9ebfa90da91a90cc8c176f /OvmfPkg/PlatformPei/Platform.c | |
parent | efb0f16e9839b39830bf3eb4017d5964f06c7122 (diff) | |
download | edk2-cdef34ec12f91023fa86bb49d1f33541d87eb132.zip edk2-cdef34ec12f91023fa86bb49d1f33541d87eb132.tar.gz edk2-cdef34ec12f91023fa86bb49d1f33541d87eb132.tar.bz2 |
OvmfPkg: PlatformPei: allow caching in AddReservedMemoryBaseSizeHob()
AddReservedMemoryBaseSizeHob() should be able to set the same resource
attributes for reserved memory as AddMemoryBaseSizeHob() sets for system
memory. Add a new parameter called "Cacheable" to
AddReservedMemoryBaseSizeHob(), and set it to FALSE in the only caller we
have at the moment.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19038 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/PlatformPei/Platform.c')
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index a6d9616..0b11275 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -88,7 +88,8 @@ AddIoMemoryBaseSizeHob ( VOID
AddReservedMemoryBaseSizeHob (
EFI_PHYSICAL_ADDRESS MemoryBase,
- UINT64 MemorySize
+ UINT64 MemorySize,
+ BOOLEAN Cacheable
)
{
BuildResourceDescriptorHob (
@@ -96,6 +97,12 @@ AddReservedMemoryBaseSizeHob ( EFI_RESOURCE_ATTRIBUTE_PRESENT |
EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
+ (Cacheable ?
+ EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE :
+ 0
+ ) |
EFI_RESOURCE_ATTRIBUTE_TESTED,
MemoryBase,
MemorySize
|