1
0
Fork 0
mirror of https://github.com/LongSoft/UEFITool.git synced 2025-05-29 22:45:16 -04:00

Support for _FDC and Fsys NVRAM formats

- only one format remains - EVSA
- added scope to text search UI, because of NVRAM variables having texts
in headers
This commit is contained in:
Nikolaj Schlej 2016-04-05 00:47:34 +02:00
parent d648ce133e
commit 40200bca12
13 changed files with 426 additions and 76 deletions

View file

@ -101,7 +101,7 @@ QString errorCodeToQString(UINT8 errorCode)
}
// CRC32 implementation
UINT32 crc32(UINT32 initial, const UINT8* buffer, UINT32 length)
UINT32 crc32(UINT32 initial, const UINT8* buffer, const UINT32 length)
{
static const UINT32 crcTable[256] = {
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535,
@ -141,12 +141,10 @@ UINT32 crc32(UINT32 initial, const UINT8* buffer, UINT32 length)
0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,
0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D };
UINT32 crc32;
UINT32 i;
// Accumulate crc32 for buffer
crc32 = initial ^ 0xFFFFFFFF;
for (i = 0; i < length; i++) {
UINT32 crc32 = initial ^ 0xFFFFFFFF;
for (UINT32 i = 0; i < length; i++) {
crc32 = (crc32 >> 8) ^ crcTable[(crc32 ^ buffer[i]) & 0xFF];
}