mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-14 00:41:35 +01:00
allow empty data in plist
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
3493015cf2
commit
b58f4bbbd3
@ -1210,7 +1210,6 @@ UsbBusControllerDriverSupported (
|
||||
if (Status == EFI_ALREADY_STARTED) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
// DBG("1\n");
|
||||
if (EFI_ERROR(Status)) {
|
||||
//
|
||||
// If failed to open USB_HC2, fall back to USB_HC
|
||||
@ -1226,7 +1225,6 @@ UsbBusControllerDriverSupported (
|
||||
if (Status == EFI_ALREADY_STARTED) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
// DBG("2\n");
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
@ -1242,7 +1240,6 @@ UsbBusControllerDriverSupported (
|
||||
);
|
||||
|
||||
} else {
|
||||
// DBG("3\n");
|
||||
//
|
||||
// Close the USB_HC2 used to perform the supported test
|
||||
//
|
||||
@ -1253,7 +1250,6 @@ UsbBusControllerDriverSupported (
|
||||
Controller
|
||||
);
|
||||
}
|
||||
// DBG("4\n");
|
||||
//
|
||||
// Open the EFI Device Path protocol needed to perform the supported test
|
||||
//
|
||||
@ -1268,7 +1264,6 @@ UsbBusControllerDriverSupported (
|
||||
if (Status == EFI_ALREADY_STARTED) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
// DBG("5\n");
|
||||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// Close protocol, don't use device path protocol in the Support() function
|
||||
@ -1282,7 +1277,6 @@ UsbBusControllerDriverSupported (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
// DBG("6\n");
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -3055,6 +3055,7 @@ XStringW GetBundleVersion(const XStringW& FullName)
|
||||
Status = egLoadFile(SelfRootDir, FullName.wc_str(), (UINT8**)&InfoPlistPtr, &Size);
|
||||
}
|
||||
if(!EFI_ERROR(Status)) {
|
||||
DBG("file %ls\n", InfoPlistPath.wc_str());
|
||||
Status = ParseXML(InfoPlistPtr, &InfoPlistDict, Size);
|
||||
if(!EFI_ERROR(Status) && (InfoPlistDict != nullptr)) {
|
||||
Prop = InfoPlistDict->propertyForKey("CFBundleVersion");
|
||||
|
@ -1866,19 +1866,19 @@ BOOLEAN radeon_card_posted(VOID)
|
||||
#if 1
|
||||
//dump radeon registers after BIOS POST
|
||||
reg = (UINTN)REG32(card->mmio, RADEON_BIOS_0_SCRATCH);
|
||||
DBG("BIOS_0_SCRATCH=0x%08llX, ", reg);
|
||||
// DBG("BIOS_0_SCRATCH=0x%08llX, ", reg);
|
||||
reg = (UINTN)REG32(card->mmio, RADEON_BIOS_1_SCRATCH);
|
||||
DBG("1=0x%08llX, ", reg);
|
||||
// DBG("1=0x%08llX, ", reg);
|
||||
reg = (UINTN)REG32(card->mmio, RADEON_BIOS_2_SCRATCH);
|
||||
DBG("2=0x%08llX, ", reg);
|
||||
// DBG("2=0x%08llX, ", reg);
|
||||
reg = (UINTN)REG32(card->mmio, RADEON_BIOS_3_SCRATCH);
|
||||
DBG("3=0x%08llX, ", reg);
|
||||
// DBG("3=0x%08llX, ", reg);
|
||||
reg = (UINTN)REG32(card->mmio, RADEON_BIOS_4_SCRATCH);
|
||||
DBG("4=0x%08llX, ", reg);
|
||||
DBG("RADEON_BIOS_4_SCRATCH=0x%08llX, ", reg);
|
||||
reg = (UINTN)REG32(card->mmio, RADEON_BIOS_5_SCRATCH);
|
||||
DBG("5=0x%08llX, ", reg);
|
||||
// DBG("5=0x%08llX, ", reg);
|
||||
reg = (UINTN)REG32(card->mmio, RADEON_BIOS_6_SCRATCH);
|
||||
DBG("6=0x%08llX\n", reg);
|
||||
// DBG("6=0x%08llX\n", reg);
|
||||
#endif
|
||||
|
||||
// first check CRTCs
|
||||
|
@ -237,7 +237,7 @@ EFI_STATUS ParseXML(const CHAR8* buffer, TagDict** dict, size_t bufSize)
|
||||
} else {
|
||||
bufferSize = (UINT32)strlen(buffer);
|
||||
}
|
||||
|
||||
DBG("buffer size=%ld\n", bufferSize);
|
||||
if(dict == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@ -253,11 +253,11 @@ EFI_STATUS ParseXML(const CHAR8* buffer, TagDict** dict, size_t bufSize)
|
||||
configBuffer[i] = 0x20; //replace random zero bytes to spaces
|
||||
}
|
||||
}
|
||||
|
||||
buffer_start = configBuffer;
|
||||
while (TRUE)
|
||||
{
|
||||
Status = XMLParseNextTag(configBuffer + pos, &tag, &length);
|
||||
DBG("pos=%u\n", pos);
|
||||
if (EFI_ERROR(Status)) {
|
||||
DBG("error parsing next tag\n");
|
||||
break;
|
||||
@ -275,13 +275,11 @@ EFI_STATUS ParseXML(const CHAR8* buffer, TagDict** dict, size_t bufSize)
|
||||
tag->FreeTag();
|
||||
tag = NULL;
|
||||
}
|
||||
|
||||
// FreePool(configBuffer);
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
*dict = tag->getDict();
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -676,8 +674,9 @@ EFI_STATUS ParseTagData(CHAR8* buffer, TagStruct* * tag, UINT32* lenPtr)
|
||||
// dmazar: base64 decode data
|
||||
UINTN len = 0;
|
||||
UINT8* data = (UINT8 *)Base64DecodeClover(buffer, &len);
|
||||
tmpTag->setDataValue(data, len);
|
||||
|
||||
if (data != nullptr && len != 0) {
|
||||
tmpTag->setDataValue(data, len);
|
||||
}
|
||||
*tag = tmpTag;
|
||||
*lenPtr = length;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user