A bit of cleanup

This commit is contained in:
Thomas Lovén 2017-10-24 22:25:26 +02:00
parent fef9a11d16
commit d80e87991e
3 changed files with 14 additions and 11 deletions

View File

@ -9,6 +9,7 @@ OBJ := $(patsubst %, %.o, $(basename $(SRC)))
CFLAGS ?= -Wall -Wextra CFLAGS ?= -Wall -Wextra
CFLAGS += -ffreestanding CFLAGS += -ffreestanding
CPPFLAGS += -I include
all: kernel all: kernel

View File

@ -1,14 +1,4 @@
#define MBOOT1_MAGIC 0x1BADB002 #include <multiboot.h>
#define MBOOT1_PALIGN 0x01
#define MBOOT1_MEMINFO 0x02
#define MBOOT1_FLAGS (MBOOT1_PALIGN | MBOOT1_MEMINFO)
#define MBOOT1_CS -(MBOOT1_FLAGS + MBOOT1_MAGIC)
#define MBOOT2_MAGIC 0xE85250D6
#define MBOOT2_ARCH 0
#define MBOOT2_LENGTH (MultiBootHeader2End - MultiBootHeader2)
#define MBOOT2_CHECKSUM -(MBOOT2_MAGIC + MBOOT2_ARCH + MBOOT2_LENGTH)
.intel_syntax noprefix .intel_syntax noprefix
.section .multiboot .section .multiboot

View File

@ -0,0 +1,12 @@
#pragma once
#define MBOOT1_MAGIC 0x1BADB002
#define MBOOT1_PALIGN 0x01
#define MBOOT1_MEMINFO 0x02
#define MBOOT1_FLAGS (MBOOT1_PALIGN | MBOOT1_MEMINFO)
#define MBOOT1_CS -(MBOOT1_FLAGS + MBOOT1_MAGIC)
#define MBOOT2_MAGIC 0xE85250D6
#define MBOOT2_ARCH 0
#define MBOOT2_LENGTH (MultiBootHeader2End - MultiBootHeader2)
#define MBOOT2_CHECKSUM -(MBOOT2_MAGIC + MBOOT2_ARCH + MBOOT2_LENGTH)