fix mark module unavailable
This commit is contained in:
@@ -43,8 +43,8 @@ OutputStream* copyout = ©stream;
|
||||
|
||||
alignas(4096) four_lvl_paging_t paging_tree;
|
||||
|
||||
static const uint32_t NUM_APPS = 9;
|
||||
Application apps[NUM_APPS];
|
||||
//static const uint32_t NUM_APPS = 9;
|
||||
//Application apps[NUM_APPS];
|
||||
|
||||
//static KeyboardApplication kapp;
|
||||
|
||||
@@ -52,14 +52,14 @@ Application apps[NUM_APPS];
|
||||
extern "C" int main() {
|
||||
PageFrameAllocator::stats();
|
||||
|
||||
memset(&paging_tree, 0, sizeof(four_lvl_paging_t));
|
||||
create_basic_page_table(&paging_tree);
|
||||
load_cr3((void*)&paging_tree.l4);
|
||||
|
||||
Multiboot::Module* initrd = Multiboot::getModule(0);
|
||||
DBG << "initrd address: " << hex << initrd->getStartAddress() << endl << "initrd size: " << initrd->getSize() << endl;
|
||||
memcpy((void *)0x4000000, initrd->getStartAddress(), initrd->getSize());
|
||||
|
||||
memset(&paging_tree, 0, sizeof(four_lvl_paging_t));
|
||||
create_basic_page_table(&paging_tree);
|
||||
load_cr3((void*)&paging_tree.l4);
|
||||
|
||||
tout.reset();
|
||||
tout.setPos(33, 0);
|
||||
tout << OS_NAME << " (2.x)" << flush;
|
||||
@@ -82,10 +82,11 @@ extern "C" int main() {
|
||||
// Enter Level 1/2
|
||||
Guarded g = Guard::enter();
|
||||
|
||||
for(void* p=Multiboot::getModule(0)->getStartAddress(); p<Multiboot::getModule(0)->getEndAddress(); p=(void*)((uintptr_t)p+4096)){
|
||||
DBG << "module at: " << hex << p << endl;
|
||||
g.vault().scheduler.ready(new Thread(false, p));
|
||||
}
|
||||
//for(void* p=Multiboot::getModule(0)->getStartAddress(); p<Multiboot::getModule(0)->getEndAddress(); p=(void*)((uintptr_t)p+4096)){
|
||||
// DBG << "module at: " << hex << p << endl;
|
||||
// g.vault().scheduler.ready(new Thread(false, p));
|
||||
//}
|
||||
g.vault().scheduler.ready(new Thread(false, (void*)((uintptr_t)Multiboot::getModule(0)->getStartAddress()+4096)));
|
||||
|
||||
//for (uint32_t i = 0; i < NUM_APPS; ++i) {
|
||||
// g.vault().scheduler.ready(&(apps[i]));
|
||||
|
||||
Reference in New Issue
Block a user