aboutsummaryrefslogtreecommitdiff
path: root/i686
diff options
context:
space:
mode:
Diffstat (limited to 'i686')
-rw-r--r--i686/sys/io.h10
-rw-r--r--i686/sys/io.hpp33
-rw-r--r--i686/toolchain.mk7
3 files changed, 0 insertions, 50 deletions
diff --git a/i686/sys/io.h b/i686/sys/io.h
index b6c24c5..da586b9 100644
--- a/i686/sys/io.h
+++ b/i686/sys/io.h
@@ -11,16 +11,6 @@ enum UART {
COM7 = 0x5e8,
COM8 = 0x4e8,
};
-enum UARTPortOffset {
- Data = 0, // read from receive buffer / write to transmit buffer | BaudDiv_l
- InterruptControl = 1, // interrupt enable | BaudDiv_h
- FifoControl = 2, // interrupt ID and FIFO control
- LineControl = 3, // most significant bit is the DLAB
- ModemControl = 4,
- LineStatus = 5,
- ModemStatus = 6,
- Scratch = 7,
-};
static inline void
outb(unsigned char val, unsigned short port)
diff --git a/i686/sys/io.hpp b/i686/sys/io.hpp
deleted file mode 100644
index 9759a3a..0000000
--- a/i686/sys/io.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#pragma once
-
-/**
- * Ports provide communication with devices on the x86 IO bus.
- */
-template <typename T, unsigned short port> struct Port {
- /**
- * Read value from port
- */
- static T
- in(unsigned short offset = 0)
- {
- if constexpr (sizeof(T) == sizeof(unsigned char)) return inb(port + offset);
- else if constexpr (sizeof(T) == sizeof(unsigned short))
- return inw(port + offset);
- else if constexpr (sizeof(T) == sizeof(unsigned int))
- return inl(port + offset);
- }
-
- /**
- * Write value to port
- */
- static void
- out(T val, unsigned short offset = 0)
- {
- if constexpr (sizeof(T) == sizeof(unsigned char)) outb(val, port + offset);
- else if constexpr (sizeof(T) == sizeof(unsigned short))
- outw(val, port + offset);
- else if constexpr (sizeof(T) == sizeof(unsigned int))
- outl(val, port + offset);
- }
-
-};
diff --git a/i686/toolchain.mk b/i686/toolchain.mk
index 1205c28..f3f4732 100644
--- a/i686/toolchain.mk
+++ b/i686/toolchain.mk
@@ -1,7 +1,6 @@
ARCH=i686
# define compiler, linker, archiver and strip and their flags
-# FIXME: cpp threadsafe statics
${ARCH}_AS := i686-elf-as
${ARCH}_CC := i686-elf-gcc
@@ -10,12 +9,6 @@ ${ARCH}_CFLAGS := -Wall -Wextra -Wpedantic -Werror=shadow -Wconversion -fanaly
-D__ARCH__="${ARCH}" -ffreestanding -std=gnu11 -mgeneral-regs-only \
$(shell echo ${CONFIG_CFLAGS})
-${ARCH}_CXX := i686-elf-g++
-${ARCH}_CXXID := $(shell ${${ARCH}_CXX} --version | head -n1)
-${ARCH}_CXXFLAGS := -Wall -Wextra -Wpedantic -Werror=shadow -Wconversion -ffreestanding -std=c++17 \
- -mgeneral-regs-only -fno-use-cxa-atexit -fno-threadsafe-statics -fno-exceptions -fno-rtti \
- $(shell echo ${CONFIG_CXXFLAGS})
-
${ARCH}_LD := i686-elf-ld
${ARCH}_LDID := $(shell ${${ARCH}_LD} --version | head -n1)
${ARCH}_LDFLAGS := -static -nostdlib \