mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
build-baremetal: enable parallel build and target selection just like build-userland
The factoring out also led to some small bugs being found and solved ;-)
This commit is contained in:
@@ -36,7 +36,7 @@ cpu1_sleep_forever:
|
||||
cpu0_only:
|
||||
/* Only CPU 0 reaches this point. */
|
||||
|
||||
#if !defined(GEM5)
|
||||
#if !LKMC_GEM5
|
||||
/* Wake up CPU 1 from initial sleep!
|
||||
* See:https://github.com/cirosantilli/linux-kernel-module-cheat#psci
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#svc */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -57,8 +58,8 @@ int main(void) {
|
||||
printf("daif 0x%" PRIx32 "\n", lkmc_sysreg_daif_read());
|
||||
printf("spsel 0x%" PRIx32 "\n", lkmc_sysreg_spsel_read());
|
||||
printf("vbar_el1 0x%" PRIx64 "\n", lkmc_sysreg_vbar_el1_read());
|
||||
lkmc_assert(myvar == 0);
|
||||
assert(myvar == 0);
|
||||
LKMC_SVC(0x42);
|
||||
lkmc_assert(myvar == 1);
|
||||
assert(myvar == 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
int main(void) {
|
||||
uint32_t cpsr;
|
||||
uint32_t mvfr1;
|
||||
/*uint32_t mvfr1;*/
|
||||
__asm__ ("mrs %0, cpsr" : "=r" (cpsr) : :);
|
||||
/* TODO this is blowing up an exception, how to I read from it? */
|
||||
/*__asm__ ("vmrs %0, mvfr1" : "=r" (mvfr1) : :);*/
|
||||
|
||||
@@ -19,7 +19,7 @@ cpu1_sleep_forever:
|
||||
wfe
|
||||
b cpu1_sleep_forever
|
||||
cpu0_only:
|
||||
#if !defined(GEM5)
|
||||
#if !LKMC_GEM5
|
||||
/* PSCI CPU_ON. */
|
||||
ldr r0, =0x84000003
|
||||
mov r1, #1
|
||||
|
||||
Reference in New Issue
Block a user