LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Scott Furman <sfurman@r...>
    Date: Sun, 20 Apr 2003 21:29:59 -0700
    Subject: Re: [openrisc] eCos & gcc bug
    Top

    Title:
    Damjan Lampret wrote:
    mid200304201820.h3KIKfAp013068@w...">
    Yes that's what I was thinking. So how did you do it?
    
      
    The immediate jump range is roughly +-0x7FFFFFF bytes, so linking the ROM starting at 0xF0000000 and the RAM at 0x00000000 wouldn't allow immediate jumps between the two memory regions. 

    Here's what I did instead:  The ROM image is linked starting at 0xFF000000 and RAM begins at 0x00000000.  I rely on aliasing of the ROM image to place code at the reset vector, i.e. since decoded ROM space is larger than ROM size.  The memory map looks like this:

    ROM
    'hFxxxxxxx
    0xFF001000 - 0xFFFFFFFF
    • ROM-resident text and read-only data sections, executed in-place
    • Code and data to be copied to RAM at boot

    0xFF000100 - 0xFF000FFF
    • Reset-handling and exception vector code, copied to RAM on boot

    0xF0000100 - 0xF0001000
    • Alias of reset and exception vectors.  On reset, jump to reset vector at 0xF0000100 which, in turn, jumps to startup code at 0xFF??????
    RAM
    'h0xxxxxxx
    0x00001000
    • Code and data copied to here from ROM during boot
    0x00000100 - 0x00000FFF
    • Exception-handling code copied here from ROM during boot

    I did have to add an option to sim.cfg to allow aliasing of the ROM image to be simulated in or1ksim.  I can send a trivial patch for this if you think others will use it.

    -Scott

    ReferenceAuthor
    Re: [openrisc] eCos & gcc bugDamjan Lampret

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.