public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: Dave Airlie <airlied@parthus.com>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] eCos PID ROM/RAM
Date: Mon, 29 Jan 2001 10:01:00 -0000	[thread overview]
Message-ID: <3A75AFF5.BD4B13A2@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0101271243430.16685-100000@platinum.limerick.sslinc.com>

Dave Airlie wrote:
> 
> I created a ROMRAM config for my PID which copies my ROM image down to RAM
> and jumps to it ... it does the copy in PLATFORM_SETUP1 Macro, after
> enabling the RAM, I've also used the PID RAM linker files for the ROMRAM
> setup and added defined(ROMRAM) where I thought was necessary, however
> I've hit a problem with the booting of the ROM, because I've used RAM
> linked scripts (which is correct because it is running out of RAM), the
> reset_vector is incorrect it is at 0x8044, so I am hexediting the produced
> image to make the reset_vector 0x04000044, where the ROM is,
>
> How to other platforms handle this problem? or do they do some MMU pokery
> to get around it?

Include the memory layout .h file (CYGHWR_MEMORY_LAYOUT_H), like the SH HAL
does, and then in vectors.S, change:

#ifdef CYGHWR_HAL_ARM_HAS_MMU
#define UNMAPPED(x) ((x)-__exception_handlers)
#else
#define UNMAPPED(x) (x)
#endif
                                
to also provide for ifdef CYG_HAL_STARTUP_ROMRAM and doing, e.g.

#define UNMAPPED(x) (x-CYGMEM_REGION_ram+CYGMEM_REGION_rom)
                                
> also I have a ldr pc,0x8074 in my code to jump to RAM,
> this is something I don't like anyone got a better way for me to jump to
> the RAM image once it is copied?

b __foo
__foo:

Since __foo will be the address in RAM.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

      reply	other threads:[~2001-01-29 10:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-27  4:47 Dave Airlie
2001-01-29 10:01 ` Jonathan Larmour [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A75AFF5.BD4B13A2@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=airlied@parthus.com \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).