mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-25 17:38:22 +08:00
NE alpha8
-Fixed a bug with Lenovo GUID introduced in alpha7
This commit is contained in:
parent
8283ee9f29
commit
d36951da88
@ -17,7 +17,7 @@
|
|||||||
UEFITool::UEFITool(QWidget *parent) :
|
UEFITool::UEFITool(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
ui(new Ui::UEFITool),
|
ui(new Ui::UEFITool),
|
||||||
version(tr("0.30.0_alpha7"))
|
version(tr("0.30.0_alpha8"))
|
||||||
{
|
{
|
||||||
clipboard = QApplication::clipboard();
|
clipboard = QApplication::clipboard();
|
||||||
|
|
||||||
|
@ -53,10 +53,6 @@ const QByteArray EFI_CAPSULE_GUID
|
|||||||
const QByteArray INTEL_CAPSULE_GUID
|
const QByteArray INTEL_CAPSULE_GUID
|
||||||
("\xB9\x82\x91\x53\xB5\xAB\x91\x43\xB6\x9A\xE3\xA9\x43\xF7\x2F\xCC", 16);
|
("\xB9\x82\x91\x53\xB5\xAB\x91\x43\xB6\x9A\xE3\xA9\x43\xF7\x2F\xCC", 16);
|
||||||
|
|
||||||
// Lenovo capsule GUID
|
|
||||||
const QByteArray LENOVO_CAPSULE_GUID
|
|
||||||
("\x8B\xA6\x3C\x4A\x23\x77\xFB\x48\x80\x3D\x57\x8C\xC1\xFE\xC4\x4D", 16);
|
|
||||||
|
|
||||||
// Toshiba EFI Capsule header
|
// Toshiba EFI Capsule header
|
||||||
typedef struct _TOSHIBA_CAPSULE_HEADER {
|
typedef struct _TOSHIBA_CAPSULE_HEADER {
|
||||||
EFI_GUID CapsuleGuid;
|
EFI_GUID CapsuleGuid;
|
||||||
|
@ -71,8 +71,7 @@ STATUS FfsParser::parseImageFile(const QByteArray & buffer, const QModelIndex &
|
|||||||
UINT32 capsuleHeaderSize = 0;
|
UINT32 capsuleHeaderSize = 0;
|
||||||
QModelIndex index;
|
QModelIndex index;
|
||||||
if (buffer.startsWith(EFI_CAPSULE_GUID)
|
if (buffer.startsWith(EFI_CAPSULE_GUID)
|
||||||
|| buffer.startsWith(INTEL_CAPSULE_GUID)
|
|| buffer.startsWith(INTEL_CAPSULE_GUID)) {
|
||||||
|| buffer.startsWith(LENOVO_CAPSULE_GUID)) {
|
|
||||||
// Get info
|
// Get info
|
||||||
const EFI_CAPSULE_HEADER* capsuleHeader = (const EFI_CAPSULE_HEADER*)buffer.constData();
|
const EFI_CAPSULE_HEADER* capsuleHeader = (const EFI_CAPSULE_HEADER*)buffer.constData();
|
||||||
capsuleHeaderSize = capsuleHeader->HeaderSize;
|
capsuleHeaderSize = capsuleHeader->HeaderSize;
|
||||||
|
@ -62,7 +62,7 @@ STATUS FitParser::parse(const QModelIndex & index, const QModelIndex & lastVtfIn
|
|||||||
// Calculate FIT entry checksum
|
// Calculate FIT entry checksum
|
||||||
UINT8 calculated = calculateChecksum8((const UINT8*)fitHeader, fitSize);
|
UINT8 calculated = calculateChecksum8((const UINT8*)fitHeader, fitSize);
|
||||||
if (calculated) {
|
if (calculated) {
|
||||||
remark.append(tr("Invalid FIT table checksum, ").hexarg2(calculated, 2));
|
remark.append(tr("Invalid FIT table checksum, "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,9 +159,8 @@ STATUS FitParser::findFitRecursive(const QModelIndex & index, QModelIndex & foun
|
|||||||
// Get parsing data for the current item
|
// Get parsing data for the current item
|
||||||
PARSING_DATA pdata = parsingDataFromQModelIndex(index);
|
PARSING_DATA pdata = parsingDataFromQModelIndex(index);
|
||||||
|
|
||||||
// Check item's address to be in required range
|
|
||||||
INT32 offset = model->body(index).indexOf(FIT_SIGNATURE);
|
|
||||||
// Check for FIT signature in item's body
|
// Check for FIT signature in item's body
|
||||||
|
INT32 offset = model->body(index).indexOf(FIT_SIGNATURE);
|
||||||
if (offset >= 0) {
|
if (offset >= 0) {
|
||||||
// FIT candidate found, calculate it's physical address
|
// FIT candidate found, calculate it's physical address
|
||||||
UINT32 fitAddress = pdata.address + model->header(index).size() + (UINT32)offset;
|
UINT32 fitAddress = pdata.address + model->header(index).size() + (UINT32)offset;
|
||||||
|
Loading…
Reference in New Issue
Block a user