mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-09 20:00:40 +00:00
Merge branch 'master' of https://github.com/LabNelson/rpi4-osdev
This commit is contained in:
commit
c71a1cc18a
13 changed files with 24 additions and 25 deletions
|
@ -4,7 +4,7 @@ Writing a "bare metal" operating system for Raspberry Pi 4
|
||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
|
|
||||||
As a tech CEO @RealVNC, I don't write code any more. And I've recently realised just how much I miss it.
|
As a tech CEO, I don't write code any more. And I've recently realised just how much I miss it.
|
||||||
|
|
||||||
Currently in the throes of a nationwide "lockdown" due to Covid-19 (and having been spared my usual commute), I've found myself with more hours in the day. I have taken this time for myself and used it to fulfil a childhood ambition - to write a **bare metal** operating system that runs on commercial hardware.
|
Currently in the throes of a nationwide "lockdown" due to Covid-19 (and having been spared my usual commute), I've found myself with more hours in the day. I have taken this time for myself and used it to fulfil a childhood ambition - to write a **bare metal** operating system that runs on commercial hardware.
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
CFILES = $(wildcard *.c lib/*.c)
|
CFILES = $(wildcard *.c lib/*.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
boot/boot.o: boot/boot.S
|
boot/boot.o: boot/boot.S
|
||||||
|
|
|
@ -19,8 +19,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -19,8 +19,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -19,8 +19,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -19,8 +19,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -17,8 +17,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -18,8 +18,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -18,8 +18,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -18,8 +18,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -18,8 +18,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
|
@ -19,8 +19,8 @@ enum {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Pull_None = 0,
|
Pull_None = 0,
|
||||||
Pull_Down = 1, // Are down and up the right way around?
|
Pull_Down = 2,
|
||||||
Pull_Up = 2
|
Pull_Up = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }
|
||||||
|
|
Loading…
Reference in a new issue