From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=chen.a.chen@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4ABDC223522AD for ; Tue, 13 Mar 2018 00:30:23 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 00:36:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,464,1515484800"; d="scan'208";a="37697352" Received: from chenche4.ccr.corp.intel.com ([10.239.158.50]) by fmsmga001.fm.intel.com with ESMTP; 13 Mar 2018 00:36:43 -0700 From: chenc2 To: edk2-devel@lists.01.org Cc: chenc2 , Ni Ruiyu , Zhang Chao Date: Tue, 13 Mar 2018 15:36:41 +0800 Message-Id: <20180313073641.2392-1-chen.a.chen@intel.com> X-Mailer: git-send-email 2.13.2.windows.1 Subject: [PATCH] ShellPkg/Dmpstore: Enhance display information for Auth3 variable. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 07:30:23 -0000 Add "EA" flag for dumping auth3 variable. When dumping Auth3 variable, it will not only displaying variable content but also in addition to metadata. Give a warning message when dumping auth3 variable. Cc: Ni Ruiyu Cc: Zhang Chao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: chenc2 --- ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 9 +++++++++ .../UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 1 + 2 files changed, 10 insertions(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c index 5791da9acc..adcec41992 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c @@ -69,6 +69,9 @@ GetAttrType ( if ((Atts & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) { StrnCatGrow (&RetString, &BufLen, L"+AT", 0); } + if ((Atts & EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS) != 0) { + StrnCatGrow(&RetString, &BufLen, L"+EA", 0); + } if (RetString == NULL) { RetString = StrnCatGrow(&RetString, &BufLen, L"Invalid", 0); @@ -507,6 +510,12 @@ CascadeProcessVariables ( if (Type == DmpStoreDisplay) { if (!EFI_ERROR(Status) && (DataBuffer != NULL) && (FoundVarName != NULL)) { AttrString = GetAttrType(Atts); + if (StrStr (AttrString, L"EA") != NULL) { + ShellPrintHiiEx ( + -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_VAR_EA_WARNING), gShellDebug1HiiHandle + ); + } + if (StandardFormatOutput) { HexString = AllocatePool ((DataSize * 2 + 1) * sizeof (CHAR16)); if (HexString != NULL) { diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni index 011a7bfc2d..90ce69c932 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni @@ -394,6 +394,7 @@ #string STR_DMPSTORE_NO_VAR_FOUND_G #language en-US "%H%s%N: No matching variables found. Guid %g\r\n" #string STR_DMPSTORE_NO_VAR_FOUND_G_SFO #language en-US "VariableInfo,\"\",\"%g\",\"\",\"\",\"\"\r\n" #string STR_DMPSTORE_VAR_SFO #language en-US "VariableInfo,\"%s\",\"%g\",\"0x%x\",\"0x%x\",\"%s\"\r\n" +#string STR_DMPSTORE_VAR_EA_WARNING #language en-US "(Enhanced Authenticated Variable, Should be interpreted according to the metadata headers!)\r\n" #string STR_GET_HELP_COMP #language en-US "" ".TH comp 0 "Compare 2 files"\r\n" -- 2.13.2.windows.1