disable forced bluescreen
This commit is contained in:
17
c_os/main.cc
17
c_os/main.cc
@ -52,23 +52,22 @@ int main() {
|
|||||||
|
|
||||||
// Activate paging
|
// Activate paging
|
||||||
// This has to happen after the allocator is initialized but before the scheduler is started
|
// This has to happen after the allocator is initialized but before the scheduler is started
|
||||||
// TODO: Scheduler triggers bluescreen?
|
|
||||||
pg_init();
|
pg_init();
|
||||||
|
|
||||||
// Trigger Bluescreen
|
// Trigger Bluescreen
|
||||||
kout << "Trigger Bluescreen, if you can read this it didn't work" << endl;
|
// kout << "Trigger Bluescreen, if you can read this it didn't work" << endl;
|
||||||
|
|
||||||
// BlueScreen 1
|
// BlueScreen 1
|
||||||
// asm("int $3");
|
// asm("int $3");
|
||||||
|
|
||||||
// BlueScreen 2
|
// BlueScreen 2
|
||||||
unsigned int* page = pg_alloc_page();
|
// unsigned int* page = pg_alloc_page();
|
||||||
*page = 42;
|
// *page = 42;
|
||||||
pg_write_protect_page(page);
|
// pg_write_protect_page(page);
|
||||||
invalidate_tlb_entry(page); // If we don't invalidate after first access the write protection
|
// invalidate_tlb_entry(page); // If we don't invalidate after first access the write protection
|
||||||
// won't work as no lookup is performed (address in tlb)
|
// // won't work as no lookup is performed (address in tlb)
|
||||||
*page = 42; // We map logical to physical 1:1 so no need to do any lookup
|
// *page = 42; // We map logical to physical 1:1 so no need to do any lookup
|
||||||
// If tlb is invalidated this access produces a pagefault
|
// // If tlb is invalidated this access produces a pagefault
|
||||||
|
|
||||||
// Demo threads anlegen
|
// Demo threads anlegen
|
||||||
// scheduler.ready(new HelloWorldThread());
|
// scheduler.ready(new HelloWorldThread());
|
||||||
|
|||||||
Reference in New Issue
Block a user