diff --git a/README.adoc b/README.adoc index ae67508..1bd5fa8 100644 --- a/README.adoc +++ b/README.adoc @@ -14739,6 +14739,8 @@ The Linux kernel shows `/proc/cpuinfo` compatibility as `sve`. Official spec: https://developer.arm.com/docs/100891/latest/sve-overview/introducing-sve +SVE support is indicated by `ID_AA64PFR0_EL1.SVE` which is dumped from link:baremetal/arch/aarch64/dump_regs.c[]. + ===== SVE bibliography * https://www.rico.cat/files/ICS18-gem5-sve-tutorial.pdf step by step of a complete code execution examples, the best initial tutorial so far diff --git a/baremetal/arch/aarch64/dump_regs.c b/baremetal/arch/aarch64/dump_regs.c index 68f067c..201cbb8 100644 --- a/baremetal/arch/aarch64/dump_regs.c +++ b/baremetal/arch/aarch64/dump_regs.c @@ -11,6 +11,11 @@ int main(void) { /* https://cirosantilli.com/linux-kernel-module-cheat#arm-paging */ printf("SCTLR_EL1.M 0x%" PRIX32 "\n", (sctlr_el1 >> 0) & 1); + uint64_t id_aa64pfr0_el1; + __asm__ ("mrs %0, id_aa64pfr0_el1" : "=r" (id_aa64pfr0_el1) : :); + printf("ID_AA64PFR0_EL1 0x%" PRIX64 "\n", id_aa64pfr0_el1); + printf("ID_AA64PFR0_EL1.SVE 0x%" PRIX64 "\n", (id_aa64pfr0_el1 >> 32) & 0xF); + uint64_t CurrentEL; __asm__ ("mrs %0, CurrentEL;" : "=r" (CurrentEL) : :); printf("CurrentEL 0x%" PRIX64 "\n", CurrentEL);