Compare commits
No commits in common. "a9ed5947a81d2e1396d3e7210e2b77bea66706b6" and "7b7cc86999c18de84cf30e276aa52b9f566163a3" have entirely different histories.
a9ed5947a8
...
7b7cc86999
@ -4,11 +4,9 @@
|
|||||||
#include "kprintf.h"
|
#include "kprintf.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "string.h"
|
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
|
||||||
extern u32 page_table1[1024];
|
extern u32 page_table1[1024];
|
||||||
extern const char *faults[];
|
|
||||||
|
|
||||||
__attribute__((noreturn)) void kpanic(const char *format, ...)
|
__attribute__((noreturn)) void kpanic(const char *format, ...)
|
||||||
{
|
{
|
||||||
@ -19,12 +17,9 @@ __attribute__((noreturn)) void kpanic(const char *format, ...)
|
|||||||
va_start(va, format);
|
va_start(va, format);
|
||||||
kvprintf(format, &va);
|
kvprintf(format, &va);
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
if (strcmp(format, faults[14]) == 0) {
|
|
||||||
u32 faulting_address;
|
u32 faulting_address;
|
||||||
__asm__ __volatile__("mov %%cr2, %0" : "=r"(faulting_address));
|
__asm__ __volatile__("mov %%cr2, %0" : "=r"(faulting_address));
|
||||||
kprintf("fault at address: %p\n", faulting_address);
|
kprintf("fault at address: %p\n", faulting_address);
|
||||||
}
|
|
||||||
/* for (int i = 16; i < 32; i++) */
|
/* for (int i = 16; i < 32; i++) */
|
||||||
/* kprintf("%p\n", page_table1[i]); */
|
/* kprintf("%p\n", page_table1[i]); */
|
||||||
/* show_valloc_mem(); */
|
/* show_valloc_mem(); */
|
||||||
|
Loading…
Reference in New Issue
Block a user