 |
Xyris
0.5
|
Go to the documentation of this file.
32 "Divide-By-Zero",
"Debugging",
"Non-Maskable Interrupt",
"Breakpoint",
33 "Overflow",
"Bound Range Exceeded",
"Invalid Opcode",
"Device Not Available",
34 "Double Fault",
"Coprocessor Overrun",
"Invalid TSS",
"Segment Not Present",
35 "Segmentation Fault",
"Protection Fault",
"Page Fault",
"RESERVED",
36 "Floating Point Exception",
"Alignment Check",
"Machine Check",
"SIMD Floating Point Exception",
37 "Virtualization Exception",
"RESERVED",
"RESERVED",
"RESERVED",
38 "RESERVED",
"RESERVED",
"RESERVED",
"RESERVED",
39 "RESERVED",
"Security Exception",
"RESERVED",
"Triple Fault",
"FPU Error",
55 "\033[31m DS:\033[0m 0x%08X\n"
56 "\033[31mEDI:\033[0m 0x%08X \033[31mESI:\033[0m 0x%08X \033[31mEBP:\033[0m 0x%08X \033[31mESP:\033[0m 0x%08X\n"
57 "\033[31mEAX:\033[0m 0x%08X \033[31mEBX:\033[0m 0x%08X \033[31mECX:\033[0m 0x%08X \033[31mEDX:\033[0m 0x%08X\n"
58 "\033[31mERR:\033[0m 0x%08X \033[31mEIP:\033[0m 0x%08X \033[31m CS:\033[0m 0x%08X\n"
59 "\033[31mFLG:\033[0m 0x%08X \033[31m SS:\033[0m 0x%08X\n\n",
75 Registers::CR2 cr2 = Registers::readCR2();
82 const char* real = (missing ?
"missing" :
"present");
83 const char* rws = (rw ?
"reading" :
"writing");
84 const char* uss = (us ?
"user-mode" :
"kernel");
85 const char* avail = (reserved ?
"reserved" :
"available");
86 log_all(
"Page fault at 0x%08lX [ %s %s %s %s ] (id -> %i)\n", cr2.pageFaultAddr, real, rws, uss, avail,
id);
95 struct Registers::CR0 cr0 = Registers::readCR0();
97 Registers::writeCR0(cr0);
101 struct Registers::CR0 cr0 = Registers::readCR0();
102 cr0.pagingEnable = 0;
103 Registers::writeCR0(cr0);
136 static int model[12];
void pagingEnable()
Enable hardware paging.
void criticalRegion(Function critWork)
int ksprintf(char *buf, const char *fmt,...)
Sends formatted output to a string.
Ports header file. Provides inline functions for getting and setting values at different ports....
void pagingDisable()
Disable hardware paging.
void registersToString(char *buf, struct registers *regs)
Write all register names and values as a string to a buffer. Provided buffer size must also take esca...
void timer_init(uint32_t freq)
Initialize the CPU timer with the given frequency.
i686 architecture implementation of Arch.hpp
A structure definining values for all x86 registers. Cannot be namespaced due to C linkage and ASM in...
i686 control register definitions. C & C++ compatible header.
#define log_all(fmt,...)
Prints a statement to serial debugger and the kernel framebuffer. Max message size is 1024 (including...
A simple, write-only driver for the RS232 serial device standard. Code mostly ported from Panix-Archi...
Architecture control and initialization.
void registersPrintInformation(struct registers *regs)
Print register information to all kernel terminals (serial, framebuffer, etc.). Used for panic and de...
const char exceptionStrings[33][32]
Interrupt Descriptor Table header.
Architecture memory management & paging API.
The Global Descriptor Table (GDT) is specific to the IA32 architecture. It contains entries telling t...
Interrupt Service Routine header.
void init()
Setup and install the GDT onto the system.