Ticket #11067: Moved-entire-memory-to-higher-memory-location.patch

File Moved-entire-memory-to-higher-memory-location.patch, 3.0 KB (added by arvindsraj, 6 years ago)
  • build/jam/board/beagle/BoardSetup

    From 775ea39a1e98b558bfe37c93bd5998a6e32846e2 Mon Sep 17 00:00:00 2001
    From: Arvind S Raj <sraj.arvind@gmail.com>
    Date: Fri, 25 Jul 2014 19:13:26 +0530
    Subject: [PATCH] Moved entire memory to higher memory location to prevent
     overlap when kernel is loaded into memory.
    
    * Changed base and entry points for haiku_loader_nbsd.ub.
    * Changed base address for SDRAM and framebuffer.
    * Use variable defined in BoardSetup instead of hardcoding in Jamfile.
    ---
     build/jam/board/beagle/BoardSetup       | 10 +++++-----
     headers/private/kernel/arch/arm/omap3.h |  4 ++--
     src/system/boot/platform/u-boot/Jamfile |  4 ++--
     3 files changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/build/jam/board/beagle/BoardSetup b/build/jam/board/beagle/BoardSetup
    index 0c54643..2cc6434 100644
    a b HAIKU_BOARD_DESCRIPTION = "BeagleBoard" ;  
    88#
    99
    1010# load address for haiku_loader
    11 HAIKU_BOARD_LOADER_BASE = 0x80008000 ;
     11HAIKU_BOARD_LOADER_BASE = 0x90008000 ;
    1212# entry points (raw binary, and netbsd loader emulation)
    13 HAIKU_BOARD_LOADER_ENTRY_RAW = 0x80008000 ;
    14 HAIKU_BOARD_LOADER_ENTRY_NBSD = 0x80008008 ;
     13HAIKU_BOARD_LOADER_ENTRY_RAW = 0x90008000 ;
     14HAIKU_BOARD_LOADER_ENTRY_NBSD = 0x90008008 ;
    1515
    1616HAIKU_BOARD_LOADER_ENTRY = $(HAIKU_BOARD_LOADER_ENTRY_NBSD) ;
    1717HAIKU_BOARD_LOADER_FAKE_OS = netbsd ;
    1818
    1919# load address for haiku_loader uimage
    2020# (must be different than real load address)
    21 HAIKU_BOARD_LOADER_UIBASE = 0x84000000 ;
     21HAIKU_BOARD_LOADER_UIBASE = 0x92000000 ;
    2222
    23 HAIKU_BOARD_LOADER_STACK_BASE = 0x84000000 ;
     23HAIKU_BOARD_LOADER_STACK_BASE = 0x94000000 ;
    2424
    2525#
    2626# Flash image
  • headers/private/kernel/arch/arm/omap3.h

    diff --git a/headers/private/kernel/arch/arm/omap3.h b/headers/private/kernel/arch/arm/omap3.h
    index c0b7e18..903cf4a 100644
    a b  
    2323#ifndef __PLATFORM_OMAP3_H
    2424#define __PLATFORM_OMAP3_H
    2525
    26 #define SDRAM_BASE 0x80000000
     26#define SDRAM_BASE 0x90000000
    2727
    2828#define VECT_BASE 0x00000000
    2929#define VECT_SIZE 0x1000
     
    3232#define DEVICE_SIZE 0x2000000
    3333
    3434/* framebuffer */
    35 #define FB_BASE 0x88000000
     35#define FB_BASE 0x98000000
    3636#define FB_SIZE 0x200000
    3737
    3838#define L4_BASE     0x48000000
  • src/system/boot/platform/u-boot/Jamfile

    diff --git a/src/system/boot/platform/u-boot/Jamfile b/src/system/boot/platform/u-boot/Jamfile
    index fc61049..6f2cab6 100644
    a b actions BuildUBootSDImage1  
    184184    # We load the uImage 2MB above its final destination, bootm will decode
    185185    # it to the proper location. Our image is smaller than 2MB so this works.
    186186    echo 'uenvcmd=run loadImage; run mmcboot;
    187         loadImage=fatload mmc0 0 0x80200000 haiku_loader_nbsd.ub
    188         mmcboot=bootm 0x80200000' > uEnv.txt
     187        loadImage=fatload mmc0 0 $(HAIKU_BOARD_LOADER_UIBASE) haiku_loader_nbsd.ub
     188        mmcboot=bootm $(HAIKU_BOARD_LOADER_UIBASE)' > uEnv.txt
    189189    # populate
    190190    MTOOLSRC=$(1).mtools mcopy $(2[1-]) i:
    191191    MTOOLSRC=$(1).mtools mcopy uEnv.txt i: