Skip to content

Commit

Permalink
Add support for PCCT based MSC
Browse files Browse the repository at this point in the history
 - allocated memory for PCC info table and calling
   val_pcc_create_info_table.

Fixes: #454
Deps : ARM-software/bsa-acs#333

Signed-off-by: Amrathesh <[email protected]>
  • Loading branch information
amrathesh committed Sep 10, 2024
1 parent 9fc2359 commit 2c110b1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,11 @@ For more details on running the generated binaries on Bare-metal environment, re
SBSA ACS test suite may run at higher privilege level. An attacker may utilize these tests as a means to elevate privilege which can potentially reveal the platform security assets. To prevent the leakage of secure information, it is strongly recommended that the ACS test suite is run only on development platforms. If it is run on production systems, the system should be scrubbed after running the test suite.

## Limitations
Validating the compliance of certain PCIe rules defined in the SBSA specification requires the PCIe end-point to generate specific stimulus during the runtime of the test. Examples of such stimulus are P2P, PASID, ATC, etc. The tests that requires these stimuli are grouped together in the exerciser module. The exerciser layer is an abstraction layer that enables the integration of hardware capable of generating such stimuli to the test framework.
- Validating the compliance of certain PCIe rules defined in the SBSA specification requires the PCIe end-point to generate specific stimulus during the runtime of the test. Examples of such stimulus are P2P, PASID, ATC, etc. The tests that requires these stimuli are grouped together in the exerciser module. The exerciser layer is an abstraction layer that enables the integration of hardware capable of generating such stimuli to the test framework.
The details of the hardware or Verification IP which enable these exerciser tests are platform specific and are beyond the scope of this document.

- The MPAM MSC PCC (ACPI Platform Communication Channel) support has been implemented but not yet verified on any platform. Please raise an issue if any failures or errors are encountered during the ACS run.

### SBSA Tests dependencies
- MPAM tests will require EL3 firmware to enable access to MPAM registers from lower EL's.
If arm trusted firmware is used as EL3 fimrware, enable ENABLE_MPAM_FOR_LOWER_ELS=1 during arm TF build.
Expand Down
2 changes: 2 additions & 0 deletions uefi_app/SbsaAvs.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
/*[24+(24*5) B Each + 4 B Header]*/
#define HMAT_INFO_TBL_SZ 12288 /*Supports maximum of 400 Proximity domains*/
/*[24 B Each + 8 B Header]*/
#define PCC_INFO_TBL_SZ 262144 /*Supports maximum of PCC info entries*/
/*[112 B Each + 4B Header]*/

#ifdef _AARCH64_BUILD_
unsigned long __stack_chk_guard = 0xBAAAAAAD;
Expand Down
25 changes: 25 additions & 0 deletions uefi_app/SbsaAvsMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,27 @@ createSratInfoTable(
return Status;
}

EFI_STATUS
createPccInfoTable(
)
{
UINT64 *PccInfoTable;
EFI_STATUS Status;

Status = gBS->AllocatePool(EfiBootServicesData,
PCC_INFO_TBL_SZ,
(VOID **) &PccInfoTable);

if (EFI_ERROR(Status))
{
Print(L"Allocate Pool failed %x\n", Status);
return Status;
}
val_pcc_create_info_table(PccInfoTable);

return Status;
}

/**
@brief This API allocates memory for info table and
calls create info table function passed as parameter.
Expand Down Expand Up @@ -425,6 +446,7 @@ freeSbsaAvsMem()
val_srat_free_info_table();
val_ras2_free_info_table();
val_free_shared_mem();
val_pcc_free_info_table();
}

VOID
Expand Down Expand Up @@ -785,6 +807,9 @@ ShellAppMainsbsa (
if (Status)
return Status;

/* required before calling createMpamInfoTable() */
createPccInfoTable();

Status = createGicInfoTable();
if (Status)
return Status;
Expand Down

0 comments on commit 2c110b1

Please sign in to comment.