Skip to content

Commit b44c042

Browse files
SrikarJosyulachetan-rathore
authored andcommitted
dev(timer): add S_L5TI_01 timer frequency test
- Add timer test t006 for S_L5TI_01 to verify that the OS-visible generic counter reports a 1GHz frequency through CNTFRQ_EL0 - Add a platform time API for an independent timer source and use it as a sanity check against CNTPCT_EL0 progression - Include the new test into SBSA rule metadata, timer execution, UEFI build files, CMake test lists, and the SBSA checklist - Add UEFI ACPI/DT implementations using GetTime and baremetal stubs for RD platforms Signed-off-by: Srikar Josyula <srikar.josyula@arm.com> Change-Id: I553fbdde5804312ba556601d4d4dce3421d2068f
1 parent 1413d33 commit b44c042

21 files changed

Lines changed: 265 additions & 10 deletions

File tree

apps/uefi/Bsa.inf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
../../test_pool/timer/t003.c
8484
../../test_pool/timer/t004.c
8585
../../test_pool/timer/t005.c
86+
../../test_pool/timer/t006.c
8687
../../test_pool/timer/t008.c
8788
../../test_pool/watchdog/w001.c
8889
../../test_pool/watchdog/w002.c

apps/uefi/Sbsa.inf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
../../test_pool/timer/t003.c
8787
../../test_pool/timer/t004.c
8888
../../test_pool/timer/t005.c
89+
../../test_pool/timer/t006.c
8990
../../test_pool/timer/t008.c
9091
../../test_pool/watchdog/w001.c
9192
../../test_pool/watchdog/w002.c

apps/uefi/SbsaNist.inf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
../../test_pool/gic/g014.c
8181
../../test_pool/gic/g015.c
8282
../../test_pool/gic/g016.c
83+
../../test_pool/timer/t006.c
8384
../../test_pool/watchdog/w003.c
8485
../../test_pool/smmu/i008.c
8586
../../test_pool/smmu/i009.c

apps/uefi/Vbsa.inf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
../../test_pool/timer/t003.c
8686
../../test_pool/timer/t004.c
8787
../../test_pool/timer/t005.c
88+
../../test_pool/timer/t006.c
8889
../../test_pool/timer/t008.c
8990
../../test_pool/watchdog/w001.c
9091
../../test_pool/watchdog/w002.c

apps/uefi/pc_bsa.inf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
../../test_pool/timer/t003.c
8787
../../test_pool/timer/t004.c
8888
../../test_pool/timer/t005.c
89+
../../test_pool/timer/t006.c
8990
../../test_pool/timer/t008.c
9091
../../test_pool/watchdog/w001.c
9192
../../test_pool/watchdog/w002.c

apps/uefi/xbsa_acpi.inf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
../../test_pool/gic/g014.c
193193
../../test_pool/gic/g015.c
194194
../../test_pool/gic/g016.c
195+
../../test_pool/timer/t006.c
195196
../../test_pool/timer/t008.c
196197
../../test_pool/watchdog/w003.c
197198
../../test_pool/smmu/i008.c

docs/sbsa/arm_sbsa_testcase_checklist.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,11 @@ The checklist provides information about:
474474
<td>L5</td>
475475
<td>S_L5TI_01</td>
476476
<td>S_L5TI_01</td>
477-
<td>Not Covered</td>
478-
<td></td>
479-
<td></td>
480-
<td></td>
481-
<td></td>
477+
<td>406</td>
478+
<td>Check OS visible counter reports 1GHz</td>
479+
<td>Yes</td>
480+
<td>Yes</td>
481+
<td>No</td>
482482
<td></td>
483483
</tr>
484484
<tr>

pal/baremetal/target/RDN2/src/pal_sbsa.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ extern const PLATFORM_OVERRIDE_MEMORY_INFO_TABLE platform_mem_cfg;
3232
extern const PCIE_INFO_TABLE platform_pcie_cfg;
3333
extern const WD_INFO_TABLE platform_wd_cfg;
3434

35+
/** Timer API **/
36+
/**
37+
@brief Platform defined method to read time in microseconds from an independent timer source
38+
39+
@return PAL_STATUS_NOT_IMPLEMENTED - API not implemented, Other values - Success
40+
**/
41+
uint64_t
42+
pal_get_platform_time_us(void)
43+
{
44+
pal_warn_not_implemented(__func__);
45+
return PAL_STATUS_NOT_IMPLEMENTED;
46+
}
47+
3548
/** SMMU API's **/
3649
/**
3750
@brief Platform defined method to check if CATU is behind an ETR device

pal/baremetal/target/RDV3/src/pal_sbsa.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ extern const PLATFORM_OVERRIDE_MEMORY_INFO_TABLE platform_mem_cfg;
3232
extern const PCIE_INFO_TABLE platform_pcie_cfg;
3333
extern const WD_INFO_TABLE platform_wd_cfg;
3434

35+
/** Timer API **/
36+
/**
37+
@brief Platform defined method to read time in microseconds from an independent timer source
38+
39+
@return PAL_STATUS_NOT_IMPLEMENTED - API not implemented, Other values - Success
40+
**/
41+
uint64_t
42+
pal_get_platform_time_us(void)
43+
{
44+
pal_warn_not_implemented(__func__);
45+
return PAL_STATUS_NOT_IMPLEMENTED;
46+
}
47+
3548
/** SMMU API's **/
3649
/**
3750
@brief Platform defined method to check if CATU is behind an ETR device

pal/baremetal/target/RDV3CFG1/src/pal_sbsa.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ extern const PLATFORM_OVERRIDE_MEMORY_INFO_TABLE platform_mem_cfg;
3232
extern const PCIE_INFO_TABLE platform_pcie_cfg;
3333
extern const WD_INFO_TABLE platform_wd_cfg;
3434

35+
/** Timer API **/
36+
/**
37+
@brief Platform defined method to read time in microseconds from an independent timer source
38+
39+
@return PAL_STATUS_NOT_IMPLEMENTED - API not implemented, Other values - Success
40+
**/
41+
uint64_t
42+
pal_get_platform_time_us(void)
43+
{
44+
pal_warn_not_implemented(__func__);
45+
return PAL_STATUS_NOT_IMPLEMENTED;
46+
}
47+
3548
/** SMMU API's **/
3649
/**
3750
@brief Platform defined method to check if CATU is behind an ETR device

0 commit comments

Comments
 (0)