mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
baremetal: all examples working, all failures accounted for!
SIMD&FP is now enabled in arm from bootloader.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
int main(void) {
|
||||
int main() {
|
||||
uint64_t io = 0;
|
||||
__asm__ (
|
||||
R"(
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define ELEM_SIZE 4
|
||||
|
||||
.data;
|
||||
.align 4
|
||||
my_array_0:
|
||||
.word 0x11111111, 0x22222222, 0x33333333, 0x44444444
|
||||
my_array_1:
|
||||
|
||||
@@ -22,6 +22,7 @@ LKMC_PROLOGUE
|
||||
|
||||
/* Now the same from memory with vldr and vstr. */
|
||||
.data
|
||||
.align 4
|
||||
my_float_0:
|
||||
.float 1.5
|
||||
my_float_1:
|
||||
|
||||
1
userland/c/empty.c
Normal file
1
userland/c/empty.c
Normal file
@@ -0,0 +1 @@
|
||||
int main(void) {}
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int ret;
|
||||
if (argc == 1) {
|
||||
if (argc <= 1) {
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = strtoull(argv[1], NULL, 0);
|
||||
|
||||
4
userland/cpp/empty.cpp
Normal file
4
userland/cpp/empty.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
// Sanity checking low level stuff, initially inspired by baremetal.
|
||||
// https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-cpp
|
||||
|
||||
int main() {}
|
||||
Reference in New Issue
Block a user