mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 20:44:26 +01:00
userland/arch/aarch64/dump_regs.c
This commit is contained in:
@@ -9300,8 +9300,10 @@ Converting `arch/*` images to `vmlinux` is possible in theory x86 with https://g
|
|||||||
The following kernel modules and <<baremetal>> executables dump and disassemble various registers which cannot be observed from userland (usually "system registers", "control registers"):
|
The following kernel modules and <<baremetal>> executables dump and disassemble various registers which cannot be observed from userland (usually "system registers", "control registers"):
|
||||||
|
|
||||||
* link:kernel_modules/dump_regs.c[]
|
* link:kernel_modules/dump_regs.c[]
|
||||||
* link:baremetal/arch/aarch64/dump_regs.c[]
|
* link:userland/arch/arm/dump_regs.c[]
|
||||||
|
* link:userland/arch/aarch64/dump_regs.c[]
|
||||||
* link:baremetal/arch/arm/dump_regs.c[]
|
* link:baremetal/arch/arm/dump_regs.c[]
|
||||||
|
* link:baremetal/arch/aarch64/dump_regs.c[]
|
||||||
|
|
||||||
Some of those programs are using:
|
Some of those programs are using:
|
||||||
|
|
||||||
|
|||||||
@@ -544,6 +544,10 @@ path_properties_tuples = (
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
'dump_regs.c': {
|
||||||
|
# https://gem5.atlassian.net/browse/GEM5-619
|
||||||
|
'allowed_emulators': {'qemu'},
|
||||||
|
},
|
||||||
'freestanding': (
|
'freestanding': (
|
||||||
freestanding_properties,
|
freestanding_properties,
|
||||||
{
|
{
|
||||||
|
|||||||
13
userland/arch/aarch64/dump_regs.c
Normal file
13
userland/arch/aarch64/dump_regs.c
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/* https://cirosantilli.com/linux-kernel-module-cheat#dump-regs */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <lkmc.h>
|
||||||
|
#include <lkmc/aarch64.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
lkmc_sysreg_print_cntvct_el0();
|
||||||
|
lkmc_sysreg_print_cntfrq_el0();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user