aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--docs/links8
-rw-r--r--global.h1
-rw-r--r--kernel.c3
-rw-r--r--uart.h1
5 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7632283..67aa3e0 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ boot.o : boot.S
arm-none-eabi-as -mcpu=cortex-a7 $^ -o $@
kernel.elf : boot.o kernel.o uart.o
- arm-none-eabi-gcc -T linker.ld -o $@ -ffreestanding -O2 -nostdlib boot.o kernel.o uart.o -lgcc -I.
+ arm-none-eabi-gcc -T linker.ld -o $@ -ffreestanding -O2 -nostdlib $^ -lgcc -I.
kernel7.img : kernel.elf
arm-none-eabi-objcopy $^ -O binary $@
diff --git a/docs/links b/docs/links
new file mode 100644
index 0000000..be61639
--- /dev/null
+++ b/docs/links
@@ -0,0 +1,8 @@
+CORTEX7-A
+https://developer.arm.com/docs/ddi0464/latest/preface
+ARMv7 ARM
+https://static.docs.arm.com/ddi0406/c/DDI0406C_C_arm_architecture_reference_manual.pdf
+MRC
+https://developer.arm.com/ja/docs/dui0489/latest/arm-and-thumb-instructions/mrc-and-mrc2
+MMU (armv8 mostly)
+https://static.docs.arm.com/100940/0100/armv8_a_address%20translation_100940_0100_en.pdf
diff --git a/global.h b/global.h
index 6dd2e48..02fdedc 100644
--- a/global.h
+++ b/global.h
@@ -1,5 +1,6 @@
// board type, raspi2
#define RASPI 2
+
#if RASPI == 4
#define GPIO_BASE 0xFE200000
#else
diff --git a/kernel.c b/kernel.c
index 5960b15..f5a2b2e 100644
--- a/kernel.c
+++ b/kernel.c
@@ -1,7 +1,4 @@
-#include <stddef.h>
-#include <stdint.h>
#include <uart.h>
-#include <global.h>
void kernel_main(uint32_t r0, uint32_t r1, uint32_t atags)
{
diff --git a/uart.h b/uart.h
index 5872484..6430cb1 100644
--- a/uart.h
+++ b/uart.h
@@ -1,7 +1,6 @@
#include <stddef.h>
#include <stdint.h>
#include <global.h>
-// board type, raspi2
enum
{
// The offsets for reach register.