Changeset 14febed9 in mainline for kernel/arch/mips32/src/mm/frame.c


Ignore:
Timestamp:
2012-12-13T21:13:08Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a4f959b
Parents:
cf538e7
Message:

Do not damage the YAMON image in SDRAM.

  • Change loader and kernel link addresses so that we do not overwrite the YAMON image in SDRAM.
  • Ban the YAMON SDRAM range of physical memory from allocations.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mm/frame.c

    rcf538e7 r14febed9  
    239239        /* Blacklist interrupt vector frame */
    240240        frame_mark_unavailable(0, 1);
     241
     242#if defined(MACHINE_lmalta) || defined(MACHINE_bmalta)
     243        /* Blacklist memory regions used by YAMON.
     244         *
     245         * The YAMON User's Manual vaguely says the following physical addresses
     246         * are taken by YAMON:
     247         *
     248         * 0x1000       YAMON functions
     249         * 0x5000       YAMON code
     250         *
     251         * These addresses overlap with the beginning of the SDRAM so we need to
     252         * make sure they cannot be allocated.
     253         *
     254         * The User's Manual unfortunately does not say where does the SDRAM
     255         * portion used by YAMON end.
     256         *
     257         * Looking into the YAMON 02.21 sources, it looks like the first free
     258         * address is computed dynamically and depends on the size of the YAMON
     259         * image. From the YAMON binary, it appears to be 0xc0d50 or roughly
     260         * 772 KiB for that particular version.
     261         *
     262         * Linux is linked to 1MiB which seems to be a safe bet and a reasonable
     263         * upper bound for memory taken by YAMON. We will use it too.
     264         */
     265        frame_mark_unavailable(0, 1024 * 1024 / FRAME_SIZE);
     266#endif
    241267       
    242268        /* Cleanup */
Note: See TracChangeset for help on using the changeset viewer.