9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Devon H. O'Dell " <dodell@offmyserver.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] Small bits of progress on SIMpad, couple of ARM questions
Date: Sun, 10 Apr 2005 15:00:07 +0200	[thread overview]
Message-ID: <20050410130007.GC97206@smp500.sitetronics.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2441 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

             reply	other threads:[~2005-04-10 13:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-10 13:00 Devon H. O'Dell  [this message]
2005-04-10 17:36 ` Michael Zappe
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=20050410130007.GC97206@smp500.sitetronics.com \
    --to=dodell@offmyserver.com \
    --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).