Hi
I have been doing some similar work to this, but it does involve a little
bit of extra hardware:
Firstly, the bit of hardware - if you look in the Technical documentation
section of the M-Systems web site for DOC-2000, download the application
note AP-DOC-010. On page 5 you will see a schematic for creating a chip
select in a window in the C or D segment (Just below 1M).
Now as for the boot process - you must bear in mind, there is actually a
fair amount of confusion as to exactly what happens. The first instruction
fetches on all 386 and above processors is actually done from FFFFFFF0 (16
bytes below the top of memory). Most traditional BIOS's then do a FAR jump
to the start of the BIOS code - In all 386 and greater processors, on
execution of the first intersegment JUMP or CALL, memory address lines
A31-A20 are driven low for code-segment relative memory access cycles. (i.e.
instructions are executed in the lowest 1M of physical address space). The
mkrom utility in the build process patches a far jump into the linuxbios
image (in my Makefile the line ./mkrom -s64 -f -o linuxbios.rom
linuxbios.strip does this). In my instance it adds the following to the
binary image EA 00 00 00 F0 (jmp 0xf000:0x0) which is a far jump.
The actual Linuxbios code without the Linux image should be considerably
less than 64k. As a result, you can split it into a portion which resides in
a boot flash in the BIOS socket - from your Linuxbios build directory you
can just load linuxbios.rom into this device. You can then put the Linux
image etc into the DOC-2000. You will have to make some changes to the
fill_inbuf.c to read from DOC-2000 (which is slightly different to the
Millenium) - I can also send you the changes I have made if you want them.
It is probably also an idea to implement detection code for the DOC-2000 to
determine where the device is located in the C or D segment, so that the
address of the DOC-2000 does not have to be hard coded into the boot code.
You will also need to make some changes to the linker script to locate the
code in the right place (change _ROMBASE = 0x80000; to _ROMBASE = 0xf0000;).
Once this is done, you will be booting Linuxbios out of the BIOS socket and
loading the kernel image into RAM from the DOC-2000. Using the MTD drivers,
you can then create a root file system on the DOC-2000 after the Linux
kernel image (A good bet is to reserve the first 1M of the DOC for Kernel
image and any other stuff you may want to throw in there and use the rest of
the device as root file system).
Regards
Hamish
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ronald G Minnich
Sent: Sunday, January 14, 2001 3:22 AM
To: Brian Stephenson
Cc: [EMAIL PROTECTED]
Subject: Re: HELP! flash bios
On Sun, 14 Jan 2001, Brian Stephenson wrote:
> But looking at the romimages and the mkrom program there is a jump
> instruction near the end of the flash to linuxbios code located in the
> last 64k and the kernel located at the start, this I dont understand.
This is really my fault (again, gee this happens a lot). For the docipl
case, the romimage is not used. I need to fix this. Forget the romimage.
Forget mkrom for docipl.
> If I place a 128K flash in the bios socket:
^^^^
Does you no good, too small, but ...
>
> 1: where should the reset vector be, I assumed it would be at FE000 +
> 1FF0 = FFFF0
> which is about 8K from start of flash.
Let's go WRT the base of the 128K. The reset vector is at 1fff0.
>
> 2: as I understand it the processor can only access 1Meg memory, FE000
> to
> FFFFF is 8k, where is the rest located, I had a look at the
> datasheet for SiS
> 950 and there is something about bios segment FFF80000->FFFDFFFF,
> FFFE0000->FFFEFFFF. all pretty confusing to me.
No, the chipsets when it comes up let you get to f0000-fffff, which is
64K. We turn on protected mode right away, and jump to a true 32-bit
address.
> I would be happy just to get linuxbios booted out of flash for now (no
> kernel), anyone with some tips??
Just don't do it. We've left flash behind on the 630, I have not tried it
in months and neither has SiS, and in fact with some of Ollie's changes to
the SiS northbridge Config you can't build flash any more. Just use the
DoC. Obviously as you can see there is some junk left in the Makefile from
the flash days, but I have tried going back and it's not worth it.
I need to clarify this in the HOWTO. But we've tried that HOWTO to death
at this point, it works, so that's how you should start now.
ron