Skip to content

Commit

Permalink
Fix an issue when building in debug mode (4)
Browse files Browse the repository at this point in the history
  • Loading branch information
gus33000 committed Aug 21, 2022
1 parent 6813b18 commit 3cc1190
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Platforms/SurfaceDuoPkg/PrePi/Pi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3cc1190

Please sign in to comment.