Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void pmm_init(tboot_info_t* info) {
- /*
- * NOTE: we assume the bootloader set the range of the kernel
- * stuff as reserved
- */
- TRACE("Preparing pmm");
- // go over the entries
- for(int i = 0; i < info->mmap.count; i++) {
- tboot_mmap_entry_t* entry = &info->mmap.entries[i];
- TRACE("\t%lx-%lx: (%lx) %s", entry->addr, entry->addr + entry->len, entry->len, tboot_mmap_names[entry->type]);
- // add useable entries
- if(entry->type == TBOOT_MEMORY_TYPE_USABLE) {
- // set the memory top
- if(mem_memory_top < entry->addr + entry->len) {
- mem_memory_top = entry->addr + entry->len;
- }
- // add the range of addresses
- add_range(false, entry->addr, entry->addr + entry->len);
- move_temp_entries();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement