SmbiosView tool changes for Protocol Records info decode and print.
This commit adds the following decoding functionality:
First, it prints the `MCHostInterfaceProtocol Number`,
then print the `ProtocolType` with the prefix #x(0 based index),
and finally dump `ProtocolTypeData` as hex.
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
Changes include:
* Added missing \r\n line endings inside string literals
* Fixed inconsistent indentation in multi-line string entries
* Removed duplicated #language en-US directive
* Aligned string formatting to match the UNI specification
Updated files:
ShellPkg/DynamicCommand/HttpDynamicCommand/Http.uni
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
The issues were identified during testing of the parser
https://github.com/xpahos/edk2-idea.
Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
The type field for Smbios tables in smbiosview is set from values in
this query table. An entry is added to correctly display the Type 45
table name rather than "Undefined Value" in smbiosview output.
Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.
`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.
Compared to macro-based include guards, `#pragma once`:
- Eliminates the risk of macro name collisions or copy/paste errors
where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
(e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
file entirely, rather than re-reading it to find the matching
`#endif` ("multiple-include optimization").
- Note that some compilers may already optimize traditional include
guards, by recognzining the idiomatic pattern.
This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.
However, this is considered acceptable given:
1. edk2 already defines a subset of supported compilers in
BaseTools/Conf/tools_def.template, all of which have supported
`#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
include guard naming and potential macro collisions.
Approximate compiler support dates:
- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
(http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Add prints for SMBIOS Type 2 "Number of Contained Object Handles" and
"Contained Object Handles" fields.
Signed-off-by: Cassandra Lam <Cassandra.Lam@amd.com>
1. Safe wrapper function for DumpHex that validates PCI configuration
space boundaries. This function ensures that hex dumps do not exceed
the standard 4KB PCIe configuration space boundary. If the requested
dump would exceed this boundary, it prints an error message and
truncates the dump size to remain within valid bounds.
2. Enhance DVSEC capability structure size calculation method. Size is
now obtained from the DesignatedVendorSpecificHeader1.Bits.DvsecLength
register.
Issue: https://github.com/tianocore/edk2/issues/11554
Signed-off-by: Pranav V V <pranav.v.v@intel.com>
Make use the newly introduced ShellPrintDefaultEx() alias and
replace wherever it is possible:
- "ShellPrintEx (-1, -1,"
with:
- "ShellPrintDefaultEx ("
No functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Make use the newly introduced ShellPrintHiiDefaultEx() alias and
replace wherever it is possible:
- "ShellPrintHiiEx (-1, -1, NULL,"
with:
- "ShellPrintHiiDefaultEx ("
No functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
In an effort to simplify the code in the ShellPkg,
extract a ParseMemoryDescriptors() function.
No functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
In an effort to simplify the code in the ShellPkg:
- create a MEMORY_TYPE_INFO struct, storing per-MemoryType configuration
information to facilitate the operations to do for each MemoryType.
- create a MEMORY_TYPE_PAGES_INFO struct, storing per-MemoryType
Pages and PagesSize count.
Also use these arrays to facilitate Pages accounting and remove
per-MemoryType variables.
No functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
In an effort to simplify the code in the ShellPkg,
replace the MemoryType names that are currently stored in individual
variables by an array of names, facilitating access to these names.
No functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
In an effort to simplify the code in the ShellPkg,
remove the SHELL_STATUS parameter returned by:
- DisplayRtProperties()
- DisplayImageExecutionEntries()
- DisplayConformanceProfiles()
These functions are independent display functions. Thus failing to
display a configuration table should not prevent from displaying
the remaining tables.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
In an effort to simplify the code in the ShellPkg,
remove EfiGetSystemConfigurationTable() calls fetching Configuration
Table addresses that have already been collected.
No functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
In an effort to simplify the code in the ShellPkg,
inverse checks against the 'Address'. This also lowers the
indentation level.
No functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
In an effort to simplify the code in the ShellPkg,
remove the per-System Table variables by indexed arrays.
The only functional change introduced is that a non-null Smbios3
System Table:
- always replaces an Smbios System Table
- ASSERT if (Smbios3 != 0) and (Smbios != 0)
Otherwise no functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Memory Range Capsule is described in the UEFI spec 2.9
s8.5.3 Update Capsule with the following GUID:
{0DE9F0EC-88B6-428F-977A-258F1D0E5E72}
Support to print the EFI_MEMORY_RANGE_CAPSULE address in the EFI
Configuration table was added in commit: 42b0443599
("ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c")
but EFI_MEMORY_RANGE_CAPSULE type and GUID is not present in edk2.
Thus dmem always print a 0 value for this configuration table.
Remove support of EFI_MEMORY_RANGE_CAPSULE in dmem.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
The SAL System Table is unsupported and its support was
removed in commit:
f4c874c45d ("ShellPkg/UefiShellDebug1CommandsLib")
Remove remaining of SAL System Table handling.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
In an effort to simplify the code in the ShellPkg,
extract a DisplaySystemTable().
This also lowers the indentation level.
No functional change is introduced.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
gEfiDeviceIoProtocolGuid identifies EFI_DEVICE_IO_PROTOCOL,
which provided low-level I/O and MMIO access for UEFI drivers.
It was removed in UEFI 2.10A and 2.11 due to overlapping
functionality with modern protocols like EFI_PCI_IO_PROTOCOL
and EFI_CPU_IO2_PROTOCOL. These newer protocols offer improved
modularity, abstraction, and safety, making EFI_DEVICE_IO_PROTOCOL
obsolete.
Cc: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Gowtham M <gowthamm@ami.com>