mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Move all non-README links to cirosantilli.com where the file is not cut off...
This commit is contained in:
@@ -1 +1 @@
|
||||
https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-setup
|
||||
https://cirosantilli.com/linux-kernel-module-cheat#baremetal-setup
|
||||
|
||||
@@ -12,7 +12,7 @@ int main(void) {
|
||||
uint64_t CurrentEL;
|
||||
__asm__ ("mrs %0, CurrentEL;" : "=r" (CurrentEL) : :);
|
||||
printf("CurrentEL 0x%" PRIX64 "\n", CurrentEL);
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-levels */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-exception-levels */
|
||||
printf("CurrentEL.EL 0x%" PRIX64 "\n", CurrentEL >> 2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-multicore */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-multicore */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
@@ -39,7 +39,7 @@ cpu0_only:
|
||||
|
||||
#if !LKMC_GEM5
|
||||
/* Wake up CPU 1 from initial sleep!
|
||||
* See:https://github.com/cirosantilli/linux-kernel-module-cheat#arm-psci
|
||||
* See:https://cirosantilli.com/linux-kernel-module-cheat#arm-psci
|
||||
*/
|
||||
/* PCSI function identifier: CPU_ON. */
|
||||
ldr w0, =0xc4000003
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#semihosting */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#semihosting */
|
||||
|
||||
.global lkmc_start
|
||||
lkmc_start:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-svc-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-svc-instruction */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-svc-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-svc-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ int main(void) {
|
||||
uint32_t spsr;
|
||||
__asm__ ("mrs %0, spsr" : "=r" (spsr) : :);
|
||||
printf("SPSR 0x%" PRIX32 "\n", spsr);
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-levels */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-exception-levels */
|
||||
printf("SPSR.M 0x%" PRIX32 "\n", spsr & 0xF);
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-multicore */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-multicore */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ lkmc_start:
|
||||
ldr x0, =lkmc_vector_table
|
||||
msr vbar_el1, x0
|
||||
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#aarch64-baremetal-neon-setup */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#aarch64-baremetal-neon-setup */
|
||||
mov x1, 0x3 << 20
|
||||
msr cpacr_el1, x1
|
||||
isb
|
||||
@@ -15,7 +15,7 @@ lkmc_start:
|
||||
ldr x0, =stack_top
|
||||
mov sp, x0
|
||||
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#magic-failure-string */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#magic-failure-string */
|
||||
adr x0, lkmc_baremetal_on_exit_callback
|
||||
bl on_exit
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ lkmc_start:
|
||||
mov r0, 1 << 30 /* Create value with FPEXC (bit 30) set in r0 */
|
||||
vmsr fpexc, r0 /* Enable VFP and SIMD extensions */
|
||||
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#magic-failure-string */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#magic-failure-string */
|
||||
ldr r0, =lkmc_baremetal_on_exit_callback
|
||||
bl on_exit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user