diff options
Diffstat (limited to 'ArmPkg')
-rw-r--r-- | ArmPkg/Drivers/CpuDxe/CpuDxe.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c index d089cb2d11..7d328d096b 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c @@ -225,9 +225,18 @@ EFI_CPU_ARCH_PROTOCOL mCpu = { CpuGetTimerValue,
CpuSetMemoryAttributes,
0, // NumberOfTimers
- 4, // DmaBufferAlignment
+ 2048, // DmaBufferAlignment
};
+STATIC
+VOID
+InitializeDma (
+ IN OUT EFI_CPU_ARCH_PROTOCOL *CpuArchProtocol
+ )
+{
+ CpuArchProtocol->DmaBufferAlignment = ArmCacheWritebackGranule ();
+}
+
EFI_STATUS
CpuDxeInitialize (
IN EFI_HANDLE ImageHandle,
@@ -239,6 +248,8 @@ CpuDxeInitialize ( InitializeExceptions (&mCpu);
+ InitializeDma (&mCpu);
+
Status = gBS->InstallMultipleProtocolInterfaces (
&mCpuHandle,
&gEfiCpuArchProtocolGuid, &mCpu,
|