Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions UEFITool/QHexView/src/model/qhexdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ uchar QHexDocument::at(int offset) const { return m_buffer->at(offset); }

QHexDocument* QHexDocument::fromFile(QString filename, QObject* parent) {
QFile f(filename);
f.open(QFile::ReadOnly);
return QHexDocument::fromMemory<QMemoryBuffer>(f.readAll(), parent);
QByteArray data;
if(f.open(QFile::ReadOnly))
data = f.readAll();
return QHexDocument::fromMemory<QMemoryBuffer>(data, parent);
}

void QHexDocument::undo() {
Expand Down
2 changes: 1 addition & 1 deletion UEFITool/QHexView/src/qhexview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ void QHexView::mouseMoveEvent(QMouseEvent* e) {
void QHexView::wheelEvent(QWheelEvent* e) {
e->ignore();

#if defined(Q_OS_OSX)
#if defined(Q_OS_MACOS)
// In macOS scrollbar invisibility should not prevent scrolling from working
if(!m_hexdocument)
return;
Expand Down
4 changes: 2 additions & 2 deletions common/ffs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ extern const UByteArray INSYDE_FLASH_MAP_REGION_LOGO_GUID // DACFAB69-F977-4784-
("\x69\xAB\xCF\xDA\x77\xF9\x84\x47\x8A\xD8\x77\x24\xA6\xF4\xB4\x40", 16);
extern const UByteArray INSYDE_FLASH_MAP_REGION_MICROCODE_GUID // B49866F8-8CD2-49E4-A16D-B60FBEC31C4B
("\xF8\x66\x98\xB4\xD2\x8C\xE4\x49\xA1\x6D\xB6\x0F\xBE\xC3\x1C\x4B", 16);
extern const UByteArray INSYDE_FLASH_MAP_REGION_MSDM_TABLE_GUID // B344EB1A-F97E-4F14-A1E17E63BC40C8CE
extern const UByteArray INSYDE_FLASH_MAP_REGION_MSDM_TABLE_GUID // B344EB1A-F97E-4F14-A1E1-7E63BC40C8CE
("\x1A\xEB\x44\xB3\x7E\xF9\x14\x4F\xA1\xE1\x7E\x63\xBC\x40\xC8\xCE", 16);
extern const UByteArray INSYDE_FLASH_MAP_REGION_MULTI_CONFIG_GUID // 5994B592-2F14-48D5-BB40-BD27969C7780
("\x92\xB5\x94\x59\x14\x2F\xD5\x48\xBB\x40\xBD\x27\x96\x9C\x77\x80", 16);
Expand Down Expand Up @@ -148,7 +148,7 @@ extern const UByteArray INSYDE_FLASH_MAP_REGION_PEI_FV_GUID // CF1406C5-3FEC-47E
("\xC5\x06\x14\xCF\xEC\x3F\xEB\x47\xA6\xC3\xB7\x1A\x3E\xE0\x0B\x95", 16);
extern const UByteArray INSYDE_FLASH_MAP_REGION_UNSIGNED_FV_GUID // F2A016B6-E814-402E-A395-46D3CF75264A
("\xB6\x16\xA0\xF2\x14\xE8\x2E\x40\xA3\x95\x46\xD3\xCF\x75\x26\x4A", 16);
extern const UByteArray INSYDE_FLASH_MAP_REGION_FACTORY_COPY_GUID // 0000C000-0000-0000-0000-000000000000
extern const UByteArray INSYDE_FLASH_MAP_REGION_FACTORY_COPY_GUID // 00000C00-0000-0000-0000-000000000000
("\x00\x0C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16);
extern const UByteArray INSYDE_FLASH_MAP_REGION_OPTION_ROM_GUID // 244A24AF-C124-49A3-B286-ACE1AB31FD25
("\xAF\x24\x4A\x24\x24\xC1\xA3\x49\xB2\x86\xAC\xE1\xAB\x31\xFD\x25", 16);
Expand Down
6 changes: 3 additions & 3 deletions common/ffsparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ USTATUS FfsParser::parseRawArea(const UModelIndex & index)
(UINT32)entry->region_size(),
entry->attributes());

// Add atributes
// Add attributes
// Ignored or Valid
if ((entry->attributes() & INSYDE_FLASH_DEVICE_MAP_ENTRY_ATTRIBUTE_IGNORED) == 0) {
info += UString("EntryValid");
Expand All @@ -1035,9 +1035,9 @@ USTATUS FfsParser::parseRawArea(const UModelIndex & index)
else if ((entry->attributes() & INSYDE_FLASH_DEVICE_MAP_ENTRY_ATTRIBUTE_MODIFIABLE) == INSYDE_FLASH_DEVICE_MAP_ENTRY_ATTRIBUTE_MODIFIABLE) {
info += UString(", HashIgnored");
}
// Unknown atributes other than the two known above
// Unknown attributes other than the two known above
if (entry->attributes() > INSYDE_FLASH_DEVICE_MAP_ENTRY_ATTRIBUTE_IGNORED + INSYDE_FLASH_DEVICE_MAP_ENTRY_ATTRIBUTE_MODIFIABLE) {
UINT32 unknown_attributes = entry->attributes() & ((UINT32)(0xFFFFFFFFC));
UINT32 unknown_attributes = entry->attributes() & ~(UINT32)(INSYDE_FLASH_DEVICE_MAP_ENTRY_ATTRIBUTE_IGNORED | INSYDE_FLASH_DEVICE_MAP_ENTRY_ATTRIBUTE_MODIFIABLE);
info += usprintf(", Unknown %08Xh", unknown_attributes);
msg(usprintf("%s: FlashDeviceMap entry with unknown attributes %08Xh", __FUNCTION__, unknown_attributes), headerIndex);
}
Expand Down
14 changes: 7 additions & 7 deletions common/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@ UString hashTypeToUString(const UINT16 algorithm_id)
UString insydeFlashDeviceMapEntryTypeGuidToUString(const EFI_GUID & guid)
{
const UByteArray baGuid((const char*)&guid, sizeof(EFI_GUID));
if (baGuid == INSYDE_FLASH_MAP_REGION_AUX_FV_GUID) return UString("Aux Firmare Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_BOOT_FV_GUID) return UString("Boot Firmare Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_AUX_FV_GUID) return UString("Aux Firmware Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_BOOT_FV_GUID) return UString("Boot Firmware Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_BVDT_GUID) return UString("BIOS Version Data Table");
if (baGuid == INSYDE_FLASH_MAP_REGION_EC_GUID) return UString("EC Firmware");
if (baGuid == INSYDE_FLASH_MAP_REGION_FTW_BACKUP_GUID) return UString("FTW Backup");
if (baGuid == INSYDE_FLASH_MAP_REGION_FTW_STATE_GUID) return UString("FTW State");
if (baGuid == INSYDE_FLASH_MAP_REGION_FV_GUID) return UString("Firmare Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_FV_OTHER_GUID) return UString("Other Firmare Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_FV_GUID) return UString("Firmware Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_FV_OTHER_GUID) return UString("Other Firmware Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_GPNV_GUID) return UString("GPNV");
if (baGuid == INSYDE_FLASH_MAP_REGION_LICENSE_GUID) return UString("License");
if (baGuid == INSYDE_FLASH_MAP_REGION_LOGO_GUID) return UString("Logo");
Expand All @@ -306,9 +306,9 @@ UString insydeFlashDeviceMapEntryTypeGuidToUString(const EFI_GUID & guid)
if (baGuid == INSYDE_FLASH_MAP_REGION_UNKNOWN_GUID) return UString("Unknown");
if (baGuid == INSYDE_FLASH_MAP_REGION_UNUSED_GUID) return UString("Unused");
if (baGuid == INSYDE_FLASH_MAP_REGION_USB_OPTION_ROM_GUID) return UString("USB Option ROM");
if (baGuid == INSYDE_FLASH_MAP_REGION_DXE_FV_GUID) return UString("DXE Firmare Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_PEI_FV_GUID) return UString("PEI Firmare Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_UNSIGNED_FV_GUID) return UString("Unsigned Firmare Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_DXE_FV_GUID) return UString("DXE Firmware Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_PEI_FV_GUID) return UString("PEI Firmware Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_UNSIGNED_FV_GUID) return UString("Unsigned Firmware Volume");
if (baGuid == INSYDE_FLASH_MAP_REGION_FACTORY_COPY_GUID) return UString("Factory Copy");
if (baGuid == INSYDE_FLASH_MAP_REGION_OPTION_ROM_GUID) return UString("Option ROM");
if (baGuid == INSYDE_FLASH_MAP_REGION_BDF_OPTION_ROM_GUID) return UString("BusDeviceFunction Option ROM");
Expand Down
Loading