mirror of https://github.com/acidanthera/audk.git
Ring3: Fixed Uart bug.
This commit is contained in:
parent
760614b0c5
commit
88d942e2d3
|
@ -29,11 +29,10 @@ DebugLibFdtPL011UartUserConstructor (
|
|||
for (Index = 0; Index < SystemTable->NumberOfTableEntries; ++Index) {
|
||||
if (CompareGuid (&gEarlyPL011BaseAddressGuid, &(SystemTable->ConfigurationTable[Index].VendorGuid))) {
|
||||
mDebugLibFdtPL011UartAddress = (UINTN)SystemTable->ConfigurationTable[Index].VendorTable;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,6 +39,7 @@ InitializeRing3 (
|
|||
UINTN Index;
|
||||
EFI_CONFIGURATION_TABLE *Conf;
|
||||
EARLY_PL011_BASE_ADDRESS *UartBase;
|
||||
CONST VOID *Hob;
|
||||
|
||||
//
|
||||
// Set Ring3 EntryPoint and BootServices.
|
||||
|
@ -77,19 +78,18 @@ InitializeRing3 (
|
|||
|
||||
Conf->VendorTable = gRing3Data->SystemTable.ConfigurationTable[Index].VendorTable;
|
||||
|
||||
if (CompareGuid (&gEfiHobListGuid, &(Conf->VendorGuid))) {
|
||||
UartBase = GET_GUID_HOB_DATA (Conf->VendorTable);
|
||||
gUartBaseAddress = (UINTN)UartBase->DebugAddress;
|
||||
}
|
||||
|
||||
++Conf;
|
||||
}
|
||||
|
||||
Hob = GetFirstGuidHob (&gEarlyPL011BaseAddressGuid);
|
||||
UartBase = GET_GUID_HOB_DATA (Hob);
|
||||
gUartBaseAddress = (UINTN)UartBase->DebugAddress;
|
||||
|
||||
CopyGuid (&(Conf->VendorGuid), &gEarlyPL011BaseAddressGuid);
|
||||
Conf->VendorTable = (VOID *)gUartBaseAddress;
|
||||
++gRing3Data->SystemTable.NumberOfTableEntries;
|
||||
|
||||
DEBUG ((DEBUG_ERROR, "Core: gUartBaseAddress = %p\n", gUartBaseAddress));
|
||||
DEBUG ((DEBUG_ERROR, "Core: gUartBaseAddress = 0x%p\n", gUartBaseAddress));
|
||||
|
||||
gRing3Data->SystemTable.ConfigurationTable = (EFI_CONFIGURATION_TABLE *)(UINTN)Physical;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue