Changeset 119b46e in mainline for kernel/arch/mips32/src/mm/frame.c
- Timestamp:
- 2013-03-22T17:25:04Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 59fb782, 8f9d70b, b183ce0a
- Parents:
- fa33ac4 (diff), 8fe2c9bd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mm/frame.c
rfa33ac4 r119b46e 40 40 #include <mm/asid.h> 41 41 #include <config.h> 42 #ifdef MACHINE_msim 42 43 #include <arch/drivers/msim.h> 44 #endif 45 #include <arch/arch.h> 43 46 #include <print.h> 44 47 … … 84 87 return false; 85 88 #endif 86 87 #if defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul) 88 /* gxemul devices */ 89 if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE, 90 0x10000000, MiB2SIZE(256))) 89 90 #if defined(MACHINE_lmalta) || defined(MACHINE_bmalta) 91 if (frame >= (sdram_size >> ZERO_PAGE_WIDTH)) 91 92 return false; 92 93 #endif … … 225 226 if (ZERO_PAGE_VALUE != 0xdeadbeef) 226 227 avail = false; 227 #if defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul)228 else {229 ZERO_PAGE_VALUE_KSEG1(frame) = 0xaabbccdd;230 if (ZERO_PAGE_VALUE_KSEG1(frame) != 0xaabbccdd)231 avail = false;232 }233 #endif234 228 } 235 229 } … … 247 241 /* Blacklist interrupt vector frame */ 248 242 frame_mark_unavailable(0, 1); 243 244 #if defined(MACHINE_lmalta) || defined(MACHINE_bmalta) 245 /* Blacklist memory regions used by YAMON. 246 * 247 * The YAMON User's Manual vaguely says the following physical addresses 248 * are taken by YAMON: 249 * 250 * 0x1000 YAMON functions 251 * 0x5000 YAMON code 252 * 253 * These addresses overlap with the beginning of the SDRAM so we need to 254 * make sure they cannot be allocated. 255 * 256 * The User's Manual unfortunately does not say where does the SDRAM 257 * portion used by YAMON end. 258 * 259 * Looking into the YAMON 02.21 sources, it looks like the first free 260 * address is computed dynamically and depends on the size of the YAMON 261 * image. From the YAMON binary, it appears to be 0xc0d50 or roughly 262 * 772 KiB for that particular version. 263 * 264 * Linux is linked to 1MiB which seems to be a safe bet and a reasonable 265 * upper bound for memory taken by YAMON. We will use it too. 266 */ 267 frame_mark_unavailable(0, 1024 * 1024 / FRAME_SIZE); 268 #endif 249 269 250 270 /* Cleanup */
Note:
See TracChangeset
for help on using the changeset viewer.