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
1 change: 1 addition & 0 deletions apps/uefi/Bsa.inf
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
../../test_pool/peripherals/d002.c
../../test_pool/peripherals/d003.c
../../test_pool/peripherals/d005.c
../../test_pool/peripherals/d004.c
../../test_pool/memory_map/m001.c
../../test_pool/memory_map/m002.c
../../test_pool/memory_map/m003.c
Expand Down
1 change: 1 addition & 0 deletions apps/uefi/Sbsa.inf
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
../../test_pool/peripherals/d002.c
../../test_pool/peripherals/d003.c
../../test_pool/peripherals/d005.c
../../test_pool/peripherals/d004.c
../../test_pool/memory_map/m001.c
../../test_pool/memory_map/m002.c
../../test_pool/memory_map/m003.c
Expand Down
1 change: 1 addition & 0 deletions apps/uefi/Vbsa.inf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
../../test_pool/peripherals/d002.c
../../test_pool/peripherals/d003.c
../../test_pool/peripherals/d005.c
../../test_pool/peripherals/d004.c
../../test_pool/memory_map/m001.c
../../test_pool/memory_map/m002.c
../../test_pool/memory_map/m003.c
Expand Down
6 changes: 6 additions & 0 deletions apps/uefi/acs.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ extern char8_t *module_name_string[MODULE_ID_SENTINEL];

/* UEFI-only declarations */
void HelpMsg(VOID);
uint32_t createPeInfoTable(void);
uint32_t createGicInfoTable(void);
uint32_t createRasInfoTable(void);
void createTimerInfoTable(void);
void createWatchdogInfoTable(void);
void createDmaInfoTable(void);
void createPcieVirtInfoTable(void);
void print_selection_summary(void);
void FlushImage(void);
Expand Down
10 changes: 10 additions & 0 deletions apps/uefi/acs_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,16 @@ createCxlInfoTable(
val_cxl_create_info_table(CxlInfoTable);
}

void
createDmaInfoTable(
)
{
UINT64 *DmaInfoTable;

DmaInfoTable = val_aligned_alloc(SIZE_4K, sizeof(DMA_INFO_TABLE)
+ sizeof(DMA_INFO_BLOCK));
val_dma_create_info_table(DmaInfoTable);
}
VOID
createPeripheralInfoTable(
)
Expand Down
2 changes: 2 additions & 0 deletions apps/uefi/bsa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ freeAcsMem()
val_pcie_free_info_table();
val_iovirt_free_info_table();
val_peripheral_free_info_table();
val_dma_free_info_table();
val_smbios_free_info_table();
}

Expand Down Expand Up @@ -197,6 +198,7 @@ execute_tests()
createPcieVirtInfoTable();
createPeripheralInfoTable();
createSmbiosInfoTable();
createDmaInfoTable();
val_allocate_shared_mem();

FlushImage();
Expand Down
1 change: 1 addition & 0 deletions apps/uefi/pc_bsa.inf
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
../../test_pool/peripherals/d002.c
../../test_pool/peripherals/d003.c
../../test_pool/peripherals/d005.c
../../test_pool/peripherals/d004.c
../../test_pool/memory_map/m001.c
../../test_pool/memory_map/m002.c
../../test_pool/memory_map/m003.c
Expand Down
2 changes: 2 additions & 0 deletions apps/uefi/pc_bsa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ freeAcsMem()
val_pcie_free_info_table();
val_iovirt_free_info_table();
val_peripheral_free_info_table();
val_dma_free_info_table();
val_tpm2_free_info_table();
val_free_shared_mem();
val_srat_free_info_table();
Expand Down Expand Up @@ -181,6 +182,7 @@ execute_tests()
createWatchdogInfoTable();
createPcieVirtInfoTable();
createPeripheralInfoTable();
createDmaInfoTable();
createTpm2InfoTable();
createSratInfoTable();
val_drtm_create_info_table();
Expand Down
2 changes: 2 additions & 0 deletions apps/uefi/sbsa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ freeAcsMem()
val_cxl_free_info_table();
val_iovirt_free_info_table();
val_peripheral_free_info_table();
val_dma_free_info_table();
val_smbios_free_info_table();
val_pmu_free_info_table();
val_cache_free_info_table();
Expand Down Expand Up @@ -203,6 +204,7 @@ execute_tests()
createPcieVirtInfoTable();
createCxlInfoTable();
createPeripheralInfoTable();
createDmaInfoTable();
createSmbiosInfoTable();
createCacheInfoTable();
createPccInfoTable();
Expand Down
2 changes: 2 additions & 0 deletions apps/uefi/vbsa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ freeAcsMem()
val_pcie_free_info_table();
val_iovirt_free_info_table();
val_peripheral_free_info_table();
val_dma_free_info_table();
val_smbios_free_info_table();
}

Expand Down Expand Up @@ -181,6 +182,7 @@ execute_tests()
createWatchdogInfoTable();
createPcieVirtInfoTable();
createPeripheralInfoTable();
createDmaInfoTable();
createSmbiosInfoTable();
val_allocate_shared_mem();

Expand Down
1 change: 1 addition & 0 deletions apps/uefi/xbsa_acpi.inf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
../../test_pool/peripherals/d002.c
../../test_pool/peripherals/d003.c
../../test_pool/peripherals/d005.c
../../test_pool/peripherals/d004.c
../../test_pool/memory_map/m001.c
../../test_pool/memory_map/m002.c
../../test_pool/memory_map/m003.c
Expand Down
2 changes: 2 additions & 0 deletions apps/uefi/xbsa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ freeAcsMem(void)
val_cxl_free_info_table();
val_iovirt_free_info_table();
val_peripheral_free_info_table();
val_dma_free_info_table();
val_smbios_free_info_table();
val_pmu_free_info_table();
val_cache_free_info_table();
Expand Down Expand Up @@ -238,6 +239,7 @@ execute_tests()
createPcieVirtInfoTable();
createCxlInfoTable();
createPeripheralInfoTable();
createDmaInfoTable();
createSmbiosInfoTable();
createCacheInfoTable();
createPccInfoTable();
Expand Down
1 change: 1 addition & 0 deletions pal/uefi_acpi/PalLib.inf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
src/pal_pcc.c
src/pal_tpm2.c
src/pal_cxl.c
src/pal_dma.c

[Packages]
ArmPkg/ArmPkg.dec
Expand Down
29 changes: 29 additions & 0 deletions pal/uefi_acpi/include/pal_uefi.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "Include/IndustryStandard/Tpm20.h"
#include "Include/IndustryStandard/Tpm2Acpi.h"

typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL;

#define PLATFORM_TIMEOUT_MEDIUM 0x1000

UINT64 pal_get_acpi_table_ptr(UINT32 table_signature);
Expand Down Expand Up @@ -992,6 +994,33 @@ typedef struct {

#pragma pack()

typedef enum {
DMA_TYPE_USB = 0x2000,
DMA_TYPE_SATA,
DMA_TYPE_OTHER,
} DMA_INFO_TYPE_e;

typedef struct {
VOID *CpuAddr;
VOID *Mapping;
EFI_PCI_IO_PROTOCOL *PciIo;
UINTN Pages;
BOOLEAN UsingPci;
} PAL_DMA_MAP;

typedef struct {
DMA_INFO_TYPE_e type;
void *target; ///< Implementation-specific target pointer.
void *port;
void *host; // It will be used only by PAL. hence void.
UINT32 flags;
} DMA_INFO_BLOCK;

typedef struct {
UINT32 num_dma_ctrls;
DMA_INFO_BLOCK info[]; ///< Array of information blocks - per DMA controller
} DMA_INFO_TABLE;

/** @brief TPM2 Info Table **/

typedef struct {
Expand Down
Loading
Loading