From 3cc11904a11b1bb47c89884fccccc51b20cb10c2 Mon Sep 17 00:00:00 2001 From: Gustave Monce Date: Sun, 21 Aug 2022 22:34:58 +0200 Subject: [PATCH] Fix an issue when building in debug mode (4) --- Platforms/SurfaceDuoPkg/PrePi/Pi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Platforms/SurfaceDuoPkg/PrePi/Pi.c b/Platforms/SurfaceDuoPkg/PrePi/Pi.c index e8e8defa..09cad513 100644 --- a/Platforms/SurfaceDuoPkg/PrePi/Pi.c +++ b/Platforms/SurfaceDuoPkg/PrePi/Pi.c @@ -53,11 +53,11 @@ typedef VOID (*LINUX_KERNEL) (UINT64 ParametersBase, VOID EFIAPI ProcessLibraryConstructorList(VOID); -PARM_MEMORY_REGION_DESCRIPTOR_EX PStoreMemoryRegion = NULL; +PARM_MEMORY_REGION_DESCRIPTOR_EX PStoreMemoryRegion2 = NULL; EFI_STATUS EFIAPI -SerialPortLocateArea(PARM_MEMORY_REGION_DESCRIPTOR_EX* MemoryDescriptor) +SerialPortLocateArea2(PARM_MEMORY_REGION_DESCRIPTOR_EX* MemoryDescriptor) { PARM_MEMORY_REGION_DESCRIPTOR_EX MemoryDescriptorEx = gDeviceMemoryDescriptorEx; @@ -122,11 +122,11 @@ VOID Main(IN VOID *StackBase, IN UINTN StackSize, IN VOID *KernelLoadAddress, IN UINT32 Lid0Status = 0; #if USE_MEMORY_FOR_SERIAL_OUTPUT == 1 - SerialPortLocateArea(&PStoreMemoryRegion); + SerialPortLocateArea2(&PStoreMemoryRegion2); // Clear PStore area - UINT8 *base = (UINT8 *)PStoreMemoryRegion->Address; - for (UINTN i = 0; i < PStoreMemoryRegion->Length; i++) { + UINT8 *base = (UINT8 *)PStoreMemoryRegion2->Address; + for (UINTN i = 0; i < PStoreMemoryRegion2->Length; i++) { base[i] = 0; } #endif