Changes in kernel/arch/mips32/src/mm/frame.c [3c50cddc:32817cc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mm/frame.c
r3c50cddc r32817cc 40 40 #include <mm/asid.h> 41 41 #include <config.h> 42 #ifdef MACHINE_msim43 42 #include <arch/drivers/msim.h> 44 #endif45 #include <arch/arch.h>46 43 #include <print.h> 47 44 … … 87 84 return false; 88 85 #endif 89 90 #if defined(MACHINE_lmalta) || defined(MACHINE_bmalta) 91 if (frame >= (sdram_size >> ZERO_PAGE_WIDTH)) 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))) 92 91 return false; 93 92 #endif … … 226 225 if (ZERO_PAGE_VALUE != 0xdeadbeef) 227 226 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 #endif 228 234 } 229 235 } … … 241 247 /* Blacklist interrupt vector frame */ 242 248 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 addresses248 * are taken by YAMON:249 *250 * 0x1000 YAMON functions251 * 0x5000 YAMON code252 *253 * These addresses overlap with the beginning of the SDRAM so we need to254 * make sure they cannot be allocated.255 *256 * The User's Manual unfortunately does not say where does the SDRAM257 * portion used by YAMON end.258 *259 * Looking into the YAMON 02.21 sources, it looks like the first free260 * address is computed dynamically and depends on the size of the YAMON261 * image. From the YAMON binary, it appears to be 0xc0d50 or roughly262 * 772 KiB for that particular version.263 *264 * Linux is linked to 1MiB which seems to be a safe bet and a reasonable265 * upper bound for memory taken by YAMON. We will use it too.266 */267 frame_mark_unavailable(0, 1024 * 1024 / FRAME_SIZE);268 #endif269 249 270 250 /* Cleanup */
Note:
See TracChangeset
for help on using the changeset viewer.