9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Michael Zappe <zapman@zappe.us>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] Small bits of progress on SIMpad, couple of ARM questions
Date: Sun, 10 Apr 2005 11:36:03 -0600	[thread overview]
Message-ID: <42596403.2020508@zappe.us> (raw)
In-Reply-To: <20050410130007.GC97206@smp500.sitetronics.com>

Well, I just did the same thing for OpenBSD on IXP (XScale core), and 
here are some of the issues you may want to look at. 

It seems there's an errata with the XScale core that causes 
self-modifying code (including linkers and loaders) not to work if write 
coalescing is disabled in CP15.  Check to make sure that it is enabled 
in register 0. 

Also, make sure that the cache flush you are calling invalidates the 
I-cache after flushing the D-cache. 

One other thing to try to make sure that it's a cache issue (what it 
sounds like), is to try running it with caches disabled on startup.

If you need any more help, feel free to contact me!

    Mike

Devon H. O'Dell wrote:

>Hey,
>
>I'm hoping there's someone here who knows a bit more about ARM
>than I do. I've grabbed the ARM specification and the docs on the
>SA-1110 from Intel, and these are a real big help with learning
>how the code works.
>
>I've got the decompressor to inflate the kernel, but I'm having
>trouble getting it to jump to the kernel afterwards. From what
>I can tell is happening:
>
> o After compiling, the image I send looks like:
>   +---------+  
>	 | inflate | } 20KB, text of _start at 0xc0200010
>	 +---------+  
>	 |         | )
>	 | kernel  | > ~420KB, text of _start at 0xc0008010
>	 |         | )
>	 +---------+
>
> o I generate a boot header and put it in flash, telling the
>   loader to load this to 0xc0008000 and enter at 0xc0008010.
>
> o Since inflate is in front of the kernel, and it has the
>   kernel magic, the bootloader sees that at 0xc0008010 and
>	 jumps into it.
>
> o inflate knows it's at the wrong place, so it relocates
>   itself to 0xc0200000 and jumps to the relocated address which
>	 calls the main() in imain.c
>
> o this gunzips the kernel from 0xc0200000 + 20*1024 to
>   0xc0008000.
>
> o Kernel's _start is at 0xc0008010 (I'm assuming the extra 16
>   bytes are the a.out header for all these things?). This is
>	 assigned to ``f''
>
> o cache is drained, (*f)() is called.
>
>I've placed various debugging prints around, and it turns out
>that I _cannot_ get the thing to jump there. Reading the docs on
>the processor, there shouldn't be any differences between bitsy
>and my SIMpad at this point. When the jump should occur, the
>unit powers off after a short delay, and I have verified with
>prints that it never actually reaches _start in 
>/sys/src/9/bitsy/l.s
>
>So I'm curious what's happening. Perhaps the MMU is turned on
>somehow and I'm accessing an illegal offset, which causes a
>memory fault to be generated, but since there's no handler, the
>unit powers itself down? This is all I can think of at the
>moment.
>
>I've been reading the Linux source, and Walter Schweizer from
>Siemens has been quite helpful at pointing me to to relevant
>sections of Linux (which are surprisingly similar, when I'm able
>to identify matching code). Are there any bitsy / ARM gurus who
>might be able to give me some tips on what might be going wrong
>at this early stage? If I can get past this, it should be 
>comparatively trivial to get it running further :)
>
>Kind regards,
>
>Devon H. O'Dell
>  
>



  reply	other threads:[~2005-04-10 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-10 13:00 Devon H. O'Dell 
2005-04-10 17:36 ` Michael Zappe [this message]
2005-04-10 20:21   ` Devon H. O'Dell 

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=42596403.2020508@zappe.us \
    --to=zapman@zappe.us \
    --cc=9fans@cse.psu.edu \
    /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 NNTP newsgroup(s).