Changeset 4bb31f7 in mainline for kernel/arch/ia32/src/mm/frame.c
- Timestamp:
- 2008-01-25T12:03:54Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a7df23c
- Parents:
- ae78b53
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/mm/frame.c
rae78b53 r4bb31f7 1 1 /* 2 * Copyright (c) 200 1-2004Jakub Jermar2 * Copyright (c) 2008 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 62 62 for (i = 0; i < e820counter; i++) { 63 63 if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) { 64 start = ADDR2PFN(ALIGN_UP(e820table[i].base_address, FRAME_SIZE)); 65 size = SIZE2FRAMES(ALIGN_DOWN(e820table[i].size, FRAME_SIZE)); 64 start = ADDR2PFN(ALIGN_UP(e820table[i].base_address, 65 FRAME_SIZE)); 66 size = SIZE2FRAMES(ALIGN_DOWN(e820table[i].size, 67 FRAME_SIZE)); 66 68 if ((minconf < start) || (minconf >= start + size)) 67 69 conf = start; … … 69 71 conf = minconf; 70 72 zone_create(start, size, conf, 0); 71 if (last_frame < ALIGN_UP(e820table[i].base_address + e820table[i].size, FRAME_SIZE)) 72 last_frame = ALIGN_UP(e820table[i].base_address + e820table[i].size, FRAME_SIZE); 73 if (last_frame < ALIGN_UP(e820table[i].base_address + 74 e820table[i].size, FRAME_SIZE)) 75 last_frame = 76 ALIGN_UP(e820table[i].base_address + 77 e820table[i].size, FRAME_SIZE); 73 78 } 74 79 } … … 83 88 }; 84 89 85 static char *e820names[] = { "invalid", "available", "reserved", 86 "acpi", "nvs","unusable" };90 static char *e820names[] = { "invalid", "available", "reserved", "acpi", "nvs", 91 "unusable" }; 87 92 88 93 … … 97 102 else 98 103 name = "invalid"; 99 printf("%.*p %#.16llXB %s\n", 100 sizeof(unative_t) * 2, 101 (unative_t) e820table[i].base_address, 102 (uint64_t) e820table[i].size, 103 name); 104 printf("%.*p %#.16llXB %s\n", sizeof(unative_t) * 2, 105 (unative_t) e820table[i].base_address, 106 (uint64_t) e820table[i].size, name); 104 107 } 105 108 return 0; … … 118 121 #ifdef CONFIG_SMP 119 122 minconf = max(minconf, 120 ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size)); 123 ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size + 124 hardcoded_unmapped_kdata_size)); 121 125 #endif 122 126 #ifdef CONFIG_SIMICS_FIX … … 131 135 /* Reserve AP real mode bootstrap memory */ 132 136 frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, 133 (hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size) >> FRAME_WIDTH); 137 (hardcoded_unmapped_ktext_size + 138 hardcoded_unmapped_kdata_size) >> FRAME_WIDTH); 134 139 135 140 #ifdef CONFIG_SIMICS_FIX
Note:
See TracChangeset
for help on using the changeset viewer.