mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
ShellPkg/Acpiview: Refactor EINJ table parser validation
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>
This commit is contained in:
parent
750c92dc8b
commit
2816ff0ab0
1 changed files with 3 additions and 1 deletions
|
|
@ -327,7 +327,9 @@ ParseAcpiEinj (
|
|||
);
|
||||
|
||||
// Validate Error Source Descriptors Count.
|
||||
if ((mEinjInjectionHdrSize == NULL) || (*mEinjInjectionHdrSize != Offset)) {
|
||||
if ((mEinjInjectionHdrSize == NULL) ||
|
||||
(*mEinjInjectionHdrSize != (Offset - sizeof (EFI_ACPI_DESCRIPTION_HEADER))))
|
||||
{
|
||||
IncrementErrorCount ();
|
||||
Print (L"ERROR: Invalid Injection Header...\n");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue