| Age | Commit message (Collapse) | Author | Files | Lines |
|
Restore informations lost in the pci shell command.
sbsa-ref Host Bridge:
```
Cache Line Size(C): 00 Latency Timer(D): 00
Header Type(0E): 00, Single function, PCI device
Class: Bridge Device - Host/PCI bridge -
+Base Address Registers(10):
+ (None)
+Expansion ROM Disabled(30)
+
+Cardbus CIS ptr(28): 00000000
+Sub VendorID(2C): 1AF4 Subsystem ID(2E): 1100
+Capabilities Ptr(34): 00
+Interrupt Line(3C): FF Interrupt Pin(3D): 00
+Min_Gnt(3E): 00 Max_Lat(3F): 00
```
sbsa-ref Ethernet Controller:
```
Cache Line Size(C): 00 Latency Timer(D): 00
Header Type(0E): 00, Single function, PCI device
Class: Network Controller - Ethernet controller -
+Base Address Registers(10):
+ Start_Address Type Space Prefetchable? Size Limit
+ --------------------------------------------------------------------------
+ 81060000 Mem 32 bits No 00020000 8107FFFF
+ 81040000 Mem 32 bits No 00020000 8105FFFF
+ 0000 I/O 0020 001F
+ 81080000 Mem 32 bits No 00004000 81083FFF
+ --------------------------------------------------------------------------
+Expansion ROM Disabled(30)
+
+Cardbus CIS ptr(28): 00000000
+Sub VendorID(2C): 8086 Subsystem ID(2E): 0000
+Capabilities Ptr(34): C8
+Interrupt Line(3C): FF Interrupt Pin(3D): 01
+Min_Gnt(3E): 00 Max_Lat(3F): 00
Pci Express device capability structure:
CapID( 0): 10 NextCap Ptr( 1): A0
```
Signed-off-by: Vincent Gatine <vincent.gatine@sipearl.com>
|
|
The ACPI 6.5 specification introduces the CCEL (CC Event Log) table
in section 5.2.34:
https://uefi.org/specs/ACPI/6.5/
05_ACPI_Software_Programming_Model.html#cc-event-log-acpi-table
Extend AcpiView with a parser to decode and display CCEL table
contents. This allows users to inspect CCEL tables from the UEFI
Shell.
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
|
|
Move the reserved-field validators from MpamParser.c into AcpiParser.c
and expose them through AcpiParser.h so they can be reused by multiple
Acpiview parsers.
Update the AGDI, MPAM and WSMT parsers to use the common helpers for
byte-length and bit-length reserved fields.
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
|
|
The RegisterParser() function is failing with error code
EFI_OUT_OF_RESOURCES as we have run out of space for
registering the ACPI table parsers in mTableParserList[].
Therefore, increase the MAX_ACPI_TABLE_PARSERS to 128.
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
|
|
Add the missing SMBIOS Type 28 Temperature Probe location decode values
to smbiosview.
The Type 28 Location field defines values 0x0C through 0x0F for Front
Panel Board, Back Panel Board, Power System Board, and Drive Back Plane,
but smbiosview only decoded values up to 0x0B.
Signed-off-by: VarshitPandya <varshit.pandya@arm.com>
|
|
The smbiosview Type 26 Voltage Probe decoder uses the low 5 bits of
LocationAndStatus as the probe location and the high 3 bits as the probe
status.
However, the Type 26 lookup tables were swapped: VPLocationTable contained
status strings and VPStatusTable contained location strings. This caused
valid records to be displayed as, for example:
Voltage Probe - Location: OK
Voltage Probe - Status: Processor
Swap the table contents so Type 26 output matches the SMBIOS
LocationAndStatus bit layout.
Signed-off-by: VarshitPandya <varshit.pandya@arm.com>
|
|
In AllocateMemory(), several pointers are used without prior null
checks. This may lead to unexpected behavior or system crashes if any
of these pointers are NULL.
Add explicit null checks for these pointers to ensure safe access and
prevent potential null pointer dereferences.
Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
|
|
Use a Temperature Probe specific HII string when displaying the Type 28
Location field in smbiosview.
The Type 28 decoder was using the Voltage Probe location label, causing
temperature probe records to be displayed with the wrong field name.
Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
|
|
Decode the Type 26 Voltage Probe Location and Status fields according
to the SMBIOS 3.9.0 specification, section 7.27, "Voltage Probe
(Type 26)".
Table 95, "Voltage Probe: Location and Status fields", defines bits
4:0 as the Location field and bits 7:5 as the Status field. smbiosview
was decoding these fields in the opposite order, causing the displayed
voltage probe location and status to be swapped.
Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
|
|
Fixes https://github.com/tianocore/edk2/issues/12689
When the UEFI Shell mapping table is empty (NULL), the console layout
becomes corrupted in DEBUG builds. This occurs because the cursor position
for the message map: No mapping found. is computed incorrectly under DEBUG
mode. The presence of DEBUG output from the Shell driver causes
gST->ConOut->Mode->CursorRow to no longer reflect the actual cursor position
on the serial port, leading to misplacement of subsequent output.
This patch replaces the existing print routine with ShellPrintHiiDefaultEx().
The new function automatically calculates the correct cursor position for the
"No mapping found" line, eliminating the dependency on the stale CursorRow
value. As a result, the layout remains consistent regardless of DEBUG message
activity.
Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
|
|
Replace manual alignment checks with IS_ALIGNED() and
ADDRESS_IS_ALIGNED().
Convert the following bitmask and modulo forms:
- ((E & ((PowOf2Expr) - ONE)) == ZERO)
- ((E & ((PowOf2Expr) - ONE)) != ZERO)
- ((E % (PowOf2Expr)) == ZERO)
- ((E % (PowOf2Expr)) != ZERO)
to the corresponding helper macro forms:
+ IS_ALIGNED (E, PowOf2Expr)
+ !IS_ALIGNED (E, PowOf2Expr)
PowOf2Expr is limited to known power-of-two expressions, including
SIZE_* and BASE_* macros, EFI_PAGE_SIZE, CPU_STACK_ALIGNMENT,
RUNTIME_PAGE_ALLOCATION_GRANULARITY, sizeof() of UEFI integer types
(e.g. BOOLEAN, CHAR16, UINT32, UINTN) and pointer types, and 1 << E1
expressions.
Address checks that cast the checked value to UINTN are written with
ADDRESS_IS_ALIGNED().
The change was generated with the Coccinelle semantic patch below.
```smpl
@power_of_2_expr@
expression PowOf2Expr;
expression E1;
typedef BOOLEAN, CHAR8, CHAR16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, INTN, UINTN;
type ScalarType = { BOOLEAN, CHAR8, CHAR16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, INTN, UINTN };
type AnyType;
type PointerType = AnyType *;
idexpression ScalarType ScalarValue;
idexpression PointerType PointerValue;
constant SizeBase =~ "^(SIZE|BASE)_(1|2|4|8|16|32|64|128|256|512)[KMGTPE]B$";
constant NamedPowerOf2 =~ "^(EFI_PAGE_SIZE|CPU_STACK_ALIGNMENT|RUNTIME_PAGE_ALLOCATION_GRANULARITY)$";
constant ONE = {1, 1U, 1u};
@@
(
(
SizeBase
|
NamedPowerOf2
|
ONE << E1
|
sizeof (ScalarType)
|
sizeof (PointerType)
|
sizeof (ScalarValue)
|
sizeof (PointerValue)
)
&
PowOf2Expr
)
@aligned depends on power_of_2_expr disable is_zero,isnt_zero@
expression E;
expression power_of_2_expr.PowOf2Expr;
constant ONE = {1, 1U, 1u};
constant ZERO = {0, 0U, 0u};
@@
(
((E & (E - ONE)) == ZERO)
|
- ((E & ((PowOf2Expr) - ONE)) == ZERO)
+ IS_ALIGNED (E, PowOf2Expr)
|
((E & (E - ONE)) != ZERO)
|
- ((E & ((PowOf2Expr) - ONE)) != ZERO)
+ !IS_ALIGNED (E, PowOf2Expr)
|
- ((E % (PowOf2Expr)) == ZERO)
+ IS_ALIGNED (E, PowOf2Expr)
|
- ((E % (PowOf2Expr)) != ZERO)
+ !IS_ALIGNED (E, PowOf2Expr)
)
@address_is_aligned@
typedef UINTN;
expression *Address;
expression Alignment;
@@
- IS_ALIGNED ((UINTN) Address, Alignment)
+ ADDRESS_IS_ALIGNED (Address, Alignment)
@normalize_aligned disable paren expression@
expression E, SZ;
@@
(
- (IS_ALIGNED (E, SZ))
+ IS_ALIGNED (E, SZ)
|
- (!IS_ALIGNED (E, SZ))
+ !IS_ALIGNED (E, SZ)
)
@normalize_macro_args disable paren expression@
expression E, SZ;
@@
(
- IS_ALIGNED ((E), SZ)
+ IS_ALIGNED (E, SZ)
|
- IS_ALIGNED (E, (SZ))
+ IS_ALIGNED (E, SZ)
)
```
Signed-off-by: Mingjie Shen <shen497@purdue.edu>
|
|
According to INF specification, UEFI_APPLICATION cannot have Depex
section. So remove it.
Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
|
|
ACPI defines Injection Header Size as the length of the EINJ
injection header, not necessarily the absolute offset of the
instruction entries. Update parser validation to use the correct
entry offset calculation and accept the layout used by Linux and
existing firmware tables.
Signed-off-by: Simon Wang <simowang@nvidia.com>
|
|
Fix spelling errors in definitions in Pci22.h.
Update consumers in MdeModulePkg, OvmfPkg, ShellPkg,
and SourceLevelDebugPkg.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.
Lower the indentation level in the newly created MainCmdXXX()
functions.
Some ASSERT() are removed in Help.c as they check variables
which were initialized a few lines above.
No functional change should be induced by this patch.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a PrintMatchingHelp() function in the Help command
to help splitting the logic MainCmdHelp() function.
No functional change should be induced by this patch.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a ProcessFileList() in:
- Touch.c
- Type.c
to lower the indentation level and simplify the logic.
No functional change should be induced by this patch.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.
Extract a MainCmdXXX() function for each shell command.
This command contains the possible operations the command aims
to operate. The ShellCommandRunXXX() function from which it
is extracted is only responsible of:
- initializing the shell/command environment
- parsing the command parameter and creating a Package
- freeing the Package
No functional change should be induced by this patch.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.
Return directly if ShellCommandLineParse() returned an error Status.
In such case, the "Package" that should be allocated by
ShellCommandLineParse() is already freed in:
ShellCommandLineParse()
\-ShellCommandLineParseEx()
\-InternalCommandLineParse()
so there is no need to free it with ShellCommandLineFreeVarList().
No functional change should be induced by this patch.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Add a 'cxl' command to list and query CXL devices.
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
|
|
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.
Lower the indentation level in the newly created MainCmdXXX()
functions.
Remove the ShellStatus variable which is not necessary.
No functional change should be induced by this patch.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.
Extract a MainCmdXXX() function for each shell command.
This command contains the possible operations the command aims
to operate. The ShellCommandRunXXX() function from which it
is extracted is only responsible of:
- initializing the shell/command environment
- parsing the command parameter and creating a Package
- freeing the Package
No functional change should be induced by this patch.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.
Return directly if ShellCommandLineParse() returned an error Status.
In such case, the "Package" that should be allocated by
ShellCommandLineParse() is already freed in:
ShellCommandLineParse()
\-ShellCommandLineParseEx()
\-InternalCommandLineParse()
so there is no need to free it with ShellCommandLineFreeVarList().
No functional change should be induced by this patch.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
In Shell driver, gShellAliasGuid appears twice in [Guids] section,
so remove the duplicate one.
Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
|
|
Extract a GetTimeZoneFromString() function to decrease the
size of MainCmdTime().
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a PrintDaylight() function to decrease the
size of MainCmdTime().
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a PrintTime() function to factorize the code.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a GetCurrentTime() function to factorize error
messages.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a PrintLsOutputCurr() function to decrease
the size of PrintLsOutput().
The patch also rationalize the usage of the Found
parameter:
- Found is updated only when a valid MetaFile is found
- a IsRecursive variable is created to distinguish
the first PrintLsOutput() call from the other
recursive ones.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Invert some conditions in PrintLsOutputRec() to lower
the indentation level.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a PrintLsOutputRec() function to decrease
the size of PrintLsOutput().
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
The TimeZone parameter is not used. Remove it.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
If no file/directory has been found, the number of
files/directories must be 0.
Hard-code these values to avoid depending on the
FileCount/FileSize/DirCount variables.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a GetCorrectedPath() function to decrease
the size of PrintLsOutput().
Also free the CorrectedPath in PrintLsOutput() before
re-allocating it to prepare for follow-up factorization.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Move ShellCloseFileMetaArg() calls to close the
MetaArg whenever its usage is not needed anymore.
This prepares for follow-up factorization.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a UpdateFileLocalTime() function to decrease
the size of PrintLsOutput().
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Extract a DeleteDirectory() function to decrease
the size of CascadeDelete().
The extracted logic is slighly modified to lower
the indendation level.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Replace existing checks against L"." and L".." by
a named function.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Add a ValidDataBits() utility function to check
the Data Bits are valid.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Add a GetStopBits() utility function to convert
the StopBits to the EFI_STOP_BITS_TYPE type.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Invert error handling to lower the indentation level
in DisplaySettings().
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Add a GetParityType() utility function to convert
the Parity to the EFI_PARITY_TYPE type.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Add name conversion arrays:
- ParityBitName
- StopBitsName
to seamlessly convert parity/stop bits to a matching name.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
The "ACPI for Memory System Resource Partitioning and Monitoring" spec
(Arm DEN0065, [1]) in version 2.0 described the "MMIO size" field in the
"MPAM MSC node" subtable as being always 0 if the the "PCC" interface type
is used for that MSC. Version 3.0 of the spec changes that field to convey
the enablement status of that MSC: "If set to 1, this MSC is accessible
... If set to 0, this MSC is non-functional...."
Relax the strict check for this value being 0 in the acpiview validation
checks, to also allow the new value of "1".
[1] https://developer.arm.com/documentation/den0065/3-0/
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
|
Status is set but never used.
Remove the variable.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Flatten the following functions to make them easier to read:
- TraverseHandleDatabase()
- GetDeviceHandleInfo()
- DoDecodeByProtocol()
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Free Language/FormatString before exiting the function.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|