mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
dump_regs: id_isar6_el1
This commit is contained in:
3
lkmc.h
3
lkmc.h
@@ -47,6 +47,9 @@ void lkmc_assert_memcmp(const void *s1, const void *s2, size_t n, uint32_t line)
|
|||||||
#define LKMC_CONCAT_EVAL(a,b) a ## b
|
#define LKMC_CONCAT_EVAL(a,b) a ## b
|
||||||
#define LKMC_CONCAT(a,b) LKMC_CONCAT_EVAL(a, b)
|
#define LKMC_CONCAT(a,b) LKMC_CONCAT_EVAL(a, b)
|
||||||
|
|
||||||
|
#define LKMC_STRINGIFY_DO(x) #x
|
||||||
|
#define LKMC_STRINGIFY(x) LKMC_STRINGIFY_DO(x)
|
||||||
|
|
||||||
#define LKMC_GLOBAL(name) \
|
#define LKMC_GLOBAL(name) \
|
||||||
.global name; \
|
.global name; \
|
||||||
name:
|
name:
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#ifndef LKMC_AARCH64_DUMP_REGS_H
|
#ifndef LKMC_AARCH64_DUMP_REGS_H
|
||||||
#define LKMC_AARCH64_DUMP_REGS_H
|
#define LKMC_AARCH64_DUMP_REGS_H
|
||||||
|
|
||||||
|
#include <lkmc.h>
|
||||||
|
|
||||||
/* https://cirosantilli.com/linux-kernel-module-cheat#dump-regs */
|
/* https://cirosantilli.com/linux-kernel-module-cheat#dump-regs */
|
||||||
|
|
||||||
#ifndef LKMC_DUMP_SYSTEM_REGS_PRINTF
|
#ifndef LKMC_DUMP_SYSTEM_REGS_PRINTF
|
||||||
@@ -30,6 +32,14 @@ void lkmc_dump_system_regs() {
|
|||||||
LKMC_DUMP_SYSTEM_REGS_PRINTF("ID_AA64ISAR1_EL1 0x%" PRIX64 "\n", id_aa64isar1_el1);
|
LKMC_DUMP_SYSTEM_REGS_PRINTF("ID_AA64ISAR1_EL1 0x%" PRIX64 "\n", id_aa64isar1_el1);
|
||||||
LKMC_DUMP_SYSTEM_REGS_PRINTF("ID_AA64ISAR1_EL1.JSCVT 0x%" PRIX64 "\n", (id_aa64isar1_el1 >> 12) & 0xF);
|
LKMC_DUMP_SYSTEM_REGS_PRINTF("ID_AA64ISAR1_EL1.JSCVT 0x%" PRIX64 "\n", (id_aa64isar1_el1 >> 12) & 0xF);
|
||||||
|
|
||||||
|
uint32_t id_isar0_el1;
|
||||||
|
__asm__ ("mrs %0, id_isar0_el1" : "=r" (id_isar0_el1) : :);
|
||||||
|
LKMC_DUMP_SYSTEM_REGS_PRINTF("ID_ISAR0_EL1 0x%" PRIX32 "\n", id_isar0_el1);
|
||||||
|
|
||||||
|
uint32_t id_isar6_el1;
|
||||||
|
__asm__ ("mrs %0, s3_0_c0_c2_7" : "=r" (id_isar6_el1) : :);
|
||||||
|
LKMC_DUMP_SYSTEM_REGS_PRINTF("ID_ISAR6_EL1 0x%" PRIX32 "\n", id_isar6_el1);
|
||||||
|
|
||||||
uint64_t id_aa64pfr0_el1;
|
uint64_t id_aa64pfr0_el1;
|
||||||
__asm__ ("mrs %0, id_aa64pfr0_el1" : "=r" (id_aa64pfr0_el1) : :);
|
__asm__ ("mrs %0, id_aa64pfr0_el1" : "=r" (id_aa64pfr0_el1) : :);
|
||||||
LKMC_DUMP_SYSTEM_REGS_PRINTF("ID_AA64PFR0_EL1 0x%" PRIX64 "\n", id_aa64pfr0_el1);
|
LKMC_DUMP_SYSTEM_REGS_PRINTF("ID_AA64PFR0_EL1 0x%" PRIX64 "\n", id_aa64pfr0_el1);
|
||||||
|
|||||||
Reference in New Issue
Block a user