From f386eda43021069b8151db40599eaeb308eb2fb3 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Thu, 11 Apr 2019 19:30:30 +0300 Subject: [PATCH] Add support for parsing NVRAM_NVAR_BB_DEFAULTS_FILE_GUID, closes #71 --- common/ffsparser.cpp | 7 ++++++- common/nvram.h | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/ffsparser.cpp b/common/ffsparser.cpp index 410382f..0336026 100644 --- a/common/ffsparser.cpp +++ b/common/ffsparser.cpp @@ -1669,8 +1669,13 @@ USTATUS FfsParser::parseFileBody(const UModelIndex & index) return nvramParser->parseNvarStore(index); } + if (fileGuid == NVRAM_NVAR_BB_DEFAULTS_FILE_GUID) { + model->setText(index, UString("NVAR bb defaults")); + return nvramParser->parseNvarStore(index); + } + // Parse vendor hash file - else if (fileGuid == BG_VENDOR_HASH_FILE_GUID_PHOENIX) { + if (fileGuid == BG_VENDOR_HASH_FILE_GUID_PHOENIX) { return parseVendorHashFile(fileGuid, index); } diff --git a/common/nvram.h b/common/nvram.h index 3b27a24..eb03516 100644 --- a/common/nvram.h +++ b/common/nvram.h @@ -38,6 +38,10 @@ const UByteArray NVRAM_NVAR_EXTERNAL_DEFAULTS_FILE_GUID const UByteArray NVRAM_NVAR_PEI_EXTERNAL_DEFAULTS_FILE_GUID ("\x50\xDC\xD3\x77\x2B\xD4\x16\x49\xAC\x80\x8F\x46\x90\x35\xD1\x50", 16); +// AF516361-B4C5-436E-A7E3-A149A31B1461 +const UByteArray NVRAM_NVAR_BB_DEFAULTS_FILE_GUID +("\x61\x63\x51\xAF\xC5\xB4\x6E\x43\xA7\xE3\xA1\x49\xA3\x1B\x14\x61", 16); + extern UString nvarAttributesToUString(const UINT8 attributes); extern UString nvarExtendedAttributesToUString(const UINT8 attributes); extern UString efiTimeToUString(const EFI_TIME & time);