From 40cc5e32663cd0350b791b8e54825f564489343f Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 22 Jul 2020 18:26:56 +0200 Subject: Imported some things from master --- src/inc/boot.h | 16 ++++++++++++++++ src/inc/cpu.h | 16 ++++++++++++++++ src/inc/serial.h | 9 +++++++++ src/inc/vesa.h | 7 ++----- 4 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 src/inc/boot.h create mode 100644 src/inc/cpu.h create mode 100644 src/inc/serial.h (limited to 'src/inc') diff --git a/src/inc/boot.h b/src/inc/boot.h new file mode 100644 index 0000000..30ddfb7 --- /dev/null +++ b/src/inc/boot.h @@ -0,0 +1,16 @@ +// MIT License, Copyright (c) 2020 Marvin Borner +// This file specifies the structs passed by the bootloader + +#include +#include + +struct vid_info { + u32 mode; + struct vbe *info; +}; + +struct mem_info { + u64 base; + u64 len; + u64 type; +}; diff --git a/src/inc/cpu.h b/src/inc/cpu.h new file mode 100644 index 0000000..ad83896 --- /dev/null +++ b/src/inc/cpu.h @@ -0,0 +1,16 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + +#ifndef CPU_H +#define CPU_H + +#include + +u8 inb(u16 port); +u16 inw(u16 port); +u32 inl(u16 port); + +void outb(u16 port, u8 data); +void outw(u16 port, u16 data); +void outl(u16 port, u32 data); + +#endif diff --git a/src/inc/serial.h b/src/inc/serial.h new file mode 100644 index 0000000..6511952 --- /dev/null +++ b/src/inc/serial.h @@ -0,0 +1,9 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + +#ifndef SERIAL_H +#define SERIAL_H + +void serial_install(); +void serial_print(const char *data); + +#endif diff --git a/src/inc/vesa.h b/src/inc/vesa.h index e2ac4e5..661ab16 100644 --- a/src/inc/vesa.h +++ b/src/inc/vesa.h @@ -1,3 +1,5 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + #ifndef VBE_H #define VBE_H @@ -41,11 +43,6 @@ struct vbe { u8 reserved1[206]; }; -struct vid_info { - u32 mode; - struct vbe *info; -}; - struct vbe *vbe; void vesa_clear(const u32 color[3]); -- cgit v1.2.3