Changeset 14febed9 in mainline


Ignore:
Timestamp:
2012-12-13T21:13:08Z (11 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.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/mips32/_link.ld.in

    rcf538e7 r14febed9  
    55        . = 0xbfc00000;
    66#elif defined(MACHINE_lmalta) || defined(MACHINE_bmalta)
    7         . = 0x80004000;
     7        . = 0x80103000;
    88#endif
    99        .text : {
  • boot/arch/mips32/include/arch.h

    rcf538e7 r14febed9  
    3333#define PAGE_SIZE   (1 << PAGE_WIDTH)
    3434
     35#if defined(MACHINE_msim)
    3536#define CPUMAP_OFFSET    0x00001000
    3637#define STACK_OFFSET     0x00002000
    3738#define BOOTINFO_OFFSET  0x00003000
    3839#define BOOT_OFFSET      0x00100000
     40#define LOADER_OFFSET    0x1fc00000
    3941
    40 #if defined(MACHINE_msim)
    41 #define LOADER_OFFSET    0x1fc00000
    42 #elif defined(MACHINE_lmalta) || defined(MACHINE_bmalta)
    43 #define LOADER_OFFSET    0x00004000
    44 #endif
    45 
    46 #if defined(MACHINE_msim)
    4742#define MSIM_VIDEORAM_ADDRESS  0xb0000000
    4843#define MSIM_DORDER_ADDRESS    0xb0000100
     
    5045
    5146#if defined(MACHINE_lmalta) || defined(MACHINE_bmalta)
     47#define CPUMAP_OFFSET    0x00100000
     48#define STACK_OFFSET     0x00101000
     49#define BOOTINFO_OFFSET  0x00102000
     50#define BOOT_OFFSET      0x00200000
     51#define LOADER_OFFSET    0x00103000
     52
    5253#define MALTA_SERIAL     0xb80003f8
    5354#endif
  • kernel/arch/mips32/_link.ld.in

    rcf538e7 r14febed9  
    1010#define mips mips
    1111
     12#if defined(MACHINE_msim)
    1213#define KERNEL_LOAD_ADDRESS 0x80100000
     14#endif
     15
     16#if defined(MACHINE_lmalta) || defined(MACHINE_bmalta)
     17#define KERNEL_LOAD_ADDRESS 0x80200000
     18#endif
    1319
    1420OUTPUT_ARCH(mips)
  • 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.