Re: [iPAQ] Welly Bootloader v0.0

From: Dirk van Hennekeler <hennekel.a.t.ozy.dec.com>
Date: Mon Sep 04 2000 - 04:57:36 EDT

Hello Mark,

MARK A CRICHTON wrote:
>
> Hello,
>
> I've gotten some work done on my iPAQ bootloader that doesn't need to flash
> the ROM. You can get it at:
>
> http://people.ne.mediaone.net/crichtma/welly.tar.gz

I had a very brief look at your Windows CE code and thought I should
clarify a few things. In the osloader code I choose the 0xc0022000
memory address because I knew that it wasn't being used by other drivers
and that it wasn't being used by the Windows CE kernel. By arbitrarily
choosing another piece of physical memory (say, 0xc0008000) that hasn't
been locked via a Win32 call there is a very real possibility of
creaming some important page that is needed by the operating system.
Some thoughts that I've had while looking at this:

(a) Make the test code relocatable. The would allow you to use a Win32
function call to allocate memory and you can copy the code any given
virtual address. Figure out the physical address and jump to it. The
test code can then copy itself to the physical address you really want
and everything should fall out.

(b) Link the test code to use address 0xc0022000. Problem is you can
only use the first 56K after that you are heading into the same danger
that you have already found. You could use this as a bootstrap though.
(Copy the real code to a virtual address give via a Win32 call, get the
physical address, pass the physical address to the test code, have the
test code jump to it.)

(c) Copy code to virtual memory, init a page table, jump to test code
passing it the page table physical address as parameter. Have test code
setup mmu and it can then execute the code you have copied into memory.
[This idea is actually Volkmar's which I have shamelessly added here.]

(d) Link your test code to use physical address 0xc008000 but in Windows
CE copy it to 0xc0022000. Jump to 0xc0022000 and in the test code have
it copy itself to the address it is linked for, which in this case is
0xc0008000.

Just some thoughts...

Regards,
Dirk
Received on Mon Sep 4 01:52:49 2000

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:43:41 EDT