void start(uint32_t* modulep, void* physbase, void* physfree) { struct smap_t { uint64_t base, length; uint32_t type; }__attribute__((packed)) *smap; while(modulep[0] != 0x9001) modulep += modulep[1]+2; int i=0; bitmap_init(physfree); for(smap = (struct smap_t*)(modulep+2); smap < (struct smap_t*)((char*)modulep+modulep[1]+2*4); ++smap) { if (smap->type == 1 /* memory */ && smap->length != 0) { // printf("Available Physical Memory [%x-%x]\n", smap->base, smap->base + smap->length); mem_track_init(smap->base, smap->length, physfree); i++; } } // printf("tarfs in [%p:%p]\n", &_binary_tarfs_start, &_binary_tarfs_end); // printf("Physbase and Physfree is: %p - %p\n", physbase, physfree); // kernel starts here set_kernel_video_page(); kmalloc_bump_ptr += (uint64_t)kern_max; init_tarfs(); init_process(); printf("After init proc\n"); printf("BACK IN MAIN\n"); while(1); }
void start(uint32_t* modulep, void* physbase, void* physfree) { struct smap_t { uint64_t base, length; uint32_t type; }__attribute__((packed)) *smap; while(modulep[0] != 0x9001) modulep += modulep[1]+2; physfree = init_pages(physfree); for(smap = (struct smap_t*)(modulep+2); smap < (struct smap_t*)((char*)modulep+modulep[1]+2*4); ++smap) { if (smap->type == 1 /* memory */ && smap->length != 0) { printf("Available Physical Memory [%x-%x]\n", smap->base, smap->base + smap->length); physfree = make_pages(smap->base, smap->length, physfree); } } printf("KERNEL IN [%p:%p:%x]\n", physbase, physfree, &kernmem); setup_paging(physbase, physfree, 0xb8000, 0xbb200, &kernmem); printf("tarfs in [%p:%p]\n", &_binary_tarfs_start, &_binary_tarfs_end); init_tarfs(&_binary_tarfs_start, &_binary_tarfs_end); idts_setup(); PIC_setup(); process_init(); __asm__ volatile("sti"); init(); }
void start(uint16_t arg) { init_tarfs(); tarfs_dir(); do_exec("bin/shell"); while(TRUE) Yield(); }
void vfs_plugins_init (void) { /* localfs needs to be the first one */ init_localfs (); #ifdef ENABLE_VFS_CPIO init_cpiofs (); #endif /* ENABLE_VFS_CPIO */ #ifdef ENABLE_VFS_TAR init_tarfs (); #endif /* ENABLE_VFS_TAR */ #ifdef ENABLE_VFS_SFS init_sfs (); #endif /* ENABLE_VFS_SFS */ #ifdef ENABLE_VFS_EXTFS init_extfs (); #endif /* ENABLE_VFS_EXTFS */ #ifdef ENABLE_VFS_UNDELFS init_undelfs (); #endif /* ENABLE_VFS_UNDELFS */ #ifdef ENABLE_VFS_FTP init_ftpfs (); #endif /* ENABLE_VFS_FTP */ #ifdef ENABLE_VFS_SFTP init_sftpfs (); #endif /* ENABLE_VFS_SFTP */ #ifdef ENABLE_VFS_FISH init_fish (); #endif /* ENABLE_VFS_FISH */ #ifdef ENABLE_VFS_SMB init_smbfs (); #endif /* ENABLE_VFS_SMB */ }