diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-16 12:34:18 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-16 12:34:18 +0200 |
commit | d39920b62e3e0371c5698aae2c316671130b0956 (patch) | |
tree | 7b561a5f53d1d4373fbe30c72d5ef3b9888a5d4a /src | |
parent | Map .text and .rodata as read-only (diff) | |
download | kernel.cpp-d39920b62e3e0371c5698aae2c316671130b0956.tar.xz |
Switch lto to full
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/registers.h | 21 | ||||
-rw-r--r-- | src/makefile | 1 | ||||
-rw-r--r-- | src/memory.cc | 11 |
3 files changed, 15 insertions, 18 deletions
diff --git a/src/cpu/registers.h b/src/cpu/registers.h index edb6b7b..d2f2e74 100644 --- a/src/cpu/registers.h +++ b/src/cpu/registers.h @@ -5,13 +5,22 @@ namespace x86 { struct cpu_state { - /* pusha */ - uint32_t edi, esi; // destination index, source index - uint32_t ebp, esp; // base pointer, stack pointer - uint32_t ebx, edx, ecx, eax; // general registers + /* registers stored by pusha */ + // indexes and pointers + uint32_t edi; // destination index: string, memory copying and setting, far pointer addressing with ES + uint32_t esi; // source index: string and memory copying + uint32_t ebp; // stack base pointer + const uint32_t esp; // stack pointer; this register is not used by popa - uint32_t irq; - uint32_t error; + // general registers + uint32_t ebx; // base register: base pointer for memory access + uint32_t edx; // data register: I/O ports, arithmetic + uint32_t ecx; // counter register: loop counter, for shifts + uint32_t eax; // accumulator register: I/O ports, arithmetic + + /* pushed by interrupt handler macros */ + uint32_t irq; // interrupt number + uint32_t error; // error code /* stack frame, pushed by cpu */ uint32_t eip; diff --git a/src/makefile b/src/makefile index 47e8762..af6c874 100644 --- a/src/makefile +++ b/src/makefile @@ -3,7 +3,6 @@ AS_OBJ += src/boot.o \ CXX_OBJ += src/kernel.o \ src/kernel/dump_gdt.o src/kernel/dump_multiboot.o \ - src/memory.o \ src/gdt.o \ src/gdt/segmentdescriptor.o \ src/idt.o \ diff --git a/src/memory.cc b/src/memory.cc deleted file mode 100644 index 2d440a3..0000000 --- a/src/memory.cc +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdlib.h> - -void operator delete(void*) { - printk("Calling delete\n"); - abort(); -} - -extern "C" void __cxa_pure_virtual() { - printk("__cxa_pure_virtual\n"); - abort(); -} |