Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions UefiTestingPkg/AuditTests/DMAProtectionAudit/UEFI/Acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ FindAcpiPtr (
/**
Get the ACPI table.

@retval EFI_SUCCESS The ACPI table is got.
@retval EFI_NOT_FOUND The ACPI table is not found.
@retval EFI_SUCCESS The ACPI table is found.
@retval EFI_INVALID_PARAMETER The ACPI Table is NULL.
@retval EFI_NOT_FOUND The ACPI table is not found.
**/
EFI_STATUS
GetAcpiTable (
Expand All @@ -156,8 +157,6 @@ GetAcpiTable (

if (AcpiTable == NULL) {
return EFI_INVALID_PARAMETER;
} else if (*AcpiTable != NULL) {
return EFI_ALREADY_STARTED;
}

*AcpiTable = NULL;
Expand All @@ -172,12 +171,10 @@ GetAcpiTable (
);
}

if (EFI_ERROR (Status)) {
if (EFI_ERROR (Status) || (AcpiConfigurationTable == NULL)) {
return EFI_NOT_FOUND;
}

ASSERT (AcpiConfigurationTable != NULL);

*AcpiTable = FindAcpiPtr (
(EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *)AcpiConfigurationTable,
AcpiSignature
Expand Down
5 changes: 3 additions & 2 deletions UefiTestingPkg/AuditTests/DMAProtectionAudit/UEFI/Acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ typedef struct {
/**
Get the ACPI table.

@retval EFI_SUCCESS The ACPI table is got.
@retval EFI_NOT_FOUND The ACPI table is not found.
@retval EFI_SUCCESS The ACPI table is found.
@retval EFI_INVALID_PARAMETER The ACPI Table is NULL.
@retval EFI_NOT_FOUND The ACPI table is not found.
**/
EFI_STATUS
GetAcpiTable (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,5 +259,9 @@ GetIvrsAcpiTable (
VOID
)
{
if (mAcpiIVRSTable != NULL) {
return EFI_SUCCESS;
}

return GetAcpiTable (IVRS_HEADER_SIGNATURE, (VOID **)&mAcpiIVRSTable);
}
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,9 @@ GetDmarAcpiTable (
VOID
)
{
if (mAcpiDmarTable != NULL) {
return EFI_SUCCESS;
}

return GetAcpiTable (EFI_ACPI_4_0_DMA_REMAPPING_TABLE_SIGNATURE, (VOID **)&mAcpiDmarTable);
}
Loading