X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FSmbiosView%2FEventLogInfo.c;h=984c17889059e01d6046517c264e58b0a814b3f1;hp=a1e14678f34271cbe3bb19d02e9977a421608e4c;hb=fc7d997c35372126823c3b0acf7b67c45cbeea36;hpb=33c031ee2092282a069ce07d30202082ceaf61fe
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.c
index a1e14678f3..984c178890 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.c
@@ -1,18 +1,12 @@
-/**
+/** @file
Module for clarifying the content of the smbios structure element info.
- Copyright (c) 2005-2010, Intel Corporation. All rights reserved.
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
-#include "../UefiShellDebug1CommandsLib.h"
+#include "UefiShellDebug1CommandsLib.h"
#include "PrintInfo.h"
#include "QueryTable.h"
#include "EventLogInfo.h"
@@ -24,7 +18,6 @@
@param[in] Option Whether to print the additional information.
**/
VOID
-EFIAPI
DisplaySELAccessMethod (
IN CONST UINT8 Key,
IN CONST UINT8 Option
@@ -76,7 +69,6 @@ DisplaySELAccessMethod (
@param[in] Option Whether to print the additional information.
**/
VOID
-EFIAPI
DisplaySELLogStatus (
UINT8 Key,
UINT8 Option
@@ -115,7 +107,6 @@ DisplaySELLogStatus (
@param[in] Option Whether to print the additional information.
**/
VOID
-EFIAPI
DisplaySysEventLogHeaderFormat (
UINT8 Key,
UINT8 Option
@@ -141,6 +132,12 @@ DisplaySysEventLogHeaderFormat (
}
}
+/**
+ Display the header information for SEL log items.
+
+ @param[in] Key The information key.
+ @param[in] Option The option index.
+**/
VOID
DisplaySELLogHeaderLen (
UINT8 Key,
@@ -163,9 +160,14 @@ DisplaySELLogHeaderLen (
}
}
+/**
+ Display the header information for type 1 items.
+
+ @param[in] LogHeader The buffer with the information.
+**/
VOID
DisplaySysEventLogHeaderType1 (
- UINT8 *LogHeader
+ IN UINT8 *LogHeader
)
{
LOG_HEADER_TYPE1_FORMAT *Header;
@@ -186,8 +188,8 @@ DisplaySysEventLogHeaderType1 (
Header->OEMReserved[3],
Header->OEMReserved[4]
);
- ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_TIME), gShellDebug1HiiHandle, Header->METW);
- ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_COUNT), gShellDebug1HiiHandle, Header->MECI);
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_TIME), gShellDebug1HiiHandle, Header->Metw);
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_COUNT), gShellDebug1HiiHandle, Header->Meci);
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_ADDRESS), gShellDebug1HiiHandle, Header->CMOSAddress);
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_INDEX), gShellDebug1HiiHandle, Header->CMOSBitIndex);
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_CHECKSUM_STARTING_OFF), gShellDebug1HiiHandle, Header->StartingOffset);
@@ -209,7 +211,6 @@ DisplaySysEventLogHeaderType1 (
@param[in] LogHeader Format informcation.
**/
VOID
-EFIAPI
DisplaySysEventLogHeader (
UINT8 LogHeaderFormat,
UINT8 *LogHeader
@@ -235,6 +236,12 @@ DisplaySysEventLogHeader (
}
}
+/**
+ Display the El Vdf information.
+
+ @param[in] ElVdfType The information type.
+ @param[in] VarData The information buffer.
+**/
VOID
DisplayElVdfInfo (
UINT8 ElVdfType,
@@ -317,7 +324,6 @@ DisplayElVdfInfo (
@param[in] LogAreaLength Length of the data.
**/
VOID
-EFIAPI
DisplaySysEventLogData (
UINT8 *LogData,
UINT16 LogAreaLength
@@ -341,16 +347,12 @@ DisplaySysEventLogData (
Offset = 0;
Log = (LOG_RECORD_FORMAT *) LogData;
while (Log != NULL && Log->Type != END_OF_LOG && Offset < LogAreaLength) {
- //
- // Get a Event Log Record
- //
- Log = (LOG_RECORD_FORMAT *) (LogData + Offset);
if (Log != NULL) {
//
// Display Event Log Record Information
//
- DisplaySELVarDataFormatType (Log->Type, SHOW_DETAIL);
+ DisplaySELTypes (Log->Type, SHOW_DETAIL);
DisplaySELLogHeaderLen (Log->Length, SHOW_DETAIL);
Offset += Log->Length;
@@ -367,6 +369,10 @@ DisplaySysEventLogData (
Print (L"20");
} else {
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ERROR), gShellDebug1HiiHandle);
+ //
+ // Get a Event Log Record
+ //
+ Log = (LOG_RECORD_FORMAT *) (LogData + Offset);
continue;
}
@@ -385,11 +391,19 @@ DisplaySysEventLogData (
// Display Variable Data Format
//
if (Log->Length <= (sizeof (LOG_RECORD_FORMAT) - 1)) {
+ //
+ // Get a Event Log Record
+ //
+ Log = (LOG_RECORD_FORMAT *) (LogData + Offset);
continue;
}
ElVdfType = Log->LogVariableData[0];
DisplayElVdfInfo (ElVdfType, Log->LogVariableData);
+ //
+ // Get a Event Log Record
+ //
+ Log = (LOG_RECORD_FORMAT *) (LogData + Offset);
}
}
}