We're working to port LinuxBIOS to a via 133 platform with a 512KB boot flash. We believe that the flash is wired such that on reset, 0xFFFF0 is mapped to 0x7FFF0 on the flash, which is slightly below 512KB on the flash.
We have been trying various config file settings (ROMTOP, ROMSIZE, PAYLOAD_SIZE) to position ROMTOP and reset_vector accordingly without much success. Simply getting a larger flash wont help since the board will only recognize the first 512KB. Has anyone solved this problem?
-- HT htran@viosoft.com
On Tue, 8 Oct 2002, Hieu T. Tran wrote:
We're working to port LinuxBIOS to a via 133 platform with a 512KB boot flash. We believe that the flash is wired such that on reset, 0xFFFF0 is mapped to 0x7FFF0 on the flash, which is slightly below 512KB on the flash.
I am missing the problem. That's what should happen, right? So that physical ffff0 maps to 7fff0 on the flash, and the 8086 reset vector is visible to the processor at 0xf000:fff0, and the correct instructions are fetched.
I don't think there is a problem here.
ron
"Hieu T. Tran" htran@viosoft.com writes:
We're working to port LinuxBIOS to a via 133 platform with a 512KB boot flash. We believe that the flash is wired such that on reset, 0xFFFF0 is mapped to 0x7FFF0 on the flash, which is slightly below 512KB on the flash.
That sounds correct. Though I would normally use the mapping at: 0xFFFFFFF0 and not even mess with the legacy stuff.
We have been trying various config file settings (ROMTOP, ROMSIZE, PAYLOAD_SIZE) to position ROMTOP and reset_vector accordingly without much success. Simply getting a larger flash wont help since the board will only recognize the first 512KB. Has anyone solved this problem?
What exact problem are you having? When you build romimage it always places the entry point at the end of the rom.
Eric
Ron and Eric,
Thank you for the response.
The problem that we're having is that the generated romimage positions reset_vector / ROMTOP at 0xFFFF0, resulting in an image size of ~ 1MB. Put another way, reset_vector is at offset 1MB on the flash device. At boot, the system fetches the address at 0xFFFF0, and executes the code there. As this address is truncated to 0x7FFF0 on our platform, or offset 512KB of flash, which is more or less random junk rather than the intended reset_vector.
To work around this problem, we're trying various methods to force reset_vector / ROMTOP to 0x7FFF0. It appears that there are several ways to do this, ranging from adorning the build config file with various ROMTOP, ROMSIZE, and PAYLOAD_SIZE settings, to providing a customized ldscript.ld file for the mainboard.
What I'd like to know is if there is a simple way to accomplish this. Also, I would be much oblidged for pointer to any document, if exists, that prescribes how to construct Config file for a given platform. I suspect other developers would enjoy this as well.
-- HT
-----Original Message----- From: linuxbios-admin@clustermatic.org [mailto:linuxbios-admin@clustermatic.org]On Behalf Of Eric W Biederman Sent: Tuesday, October 08, 2002 5:41 PM To: Hieu T. Tran Cc: linuxbios@clustermatic.org Subject: Re: LinuxBIOS in 512KB flash
"Hieu T. Tran" htran@viosoft.com writes:
We're working to port LinuxBIOS to a via 133 platform with a 512KB boot flash. We believe that the flash is wired such that on reset, 0xFFFF0 is mapped to 0x7FFF0 on the flash, which is slightly below 512KB on the flash.
That sounds correct. Though I would normally use the mapping at: 0xFFFFFFF0 and not even mess with the legacy stuff.
We have been trying various config file settings (ROMTOP, ROMSIZE, PAYLOAD_SIZE) to position ROMTOP and reset_vector accordingly without much success. Simply getting a larger flash wont help since the board will only recognize the first 512KB. Has anyone solved this problem?
What exact problem are you having? When you build romimage it always places the entry point at the end of the rom.
Eric _______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
"Hieu T. Tran" htran@viosoft.com writes:
Ron and Eric,
Thank you for the response.
The problem that we're having is that the generated romimage positions reset_vector / ROMTOP at 0xFFFF0, resulting in an image size of ~ 1MB. Put another way, reset_vector is at offset 1MB on the flash device. At boot, the system fetches the address at 0xFFFF0, and executes the code there. As this address is truncated to 0x7FFF0 on our platform, or offset 512KB of flash, which is more or less random junk rather than the intended reset_vector.
To work around this problem, we're trying various methods to force reset_vector / ROMTOP to 0x7FFF0. It appears that there are several ways to do this, ranging from adorning the build config file with various ROMTOP, ROMSIZE, and PAYLOAD_SIZE settings, to providing a customized ldscript.ld file for the mainboard.
What I'd like to know is if there is a simple way to accomplish this. Also, I would be much oblidged for pointer to any document, if exists, that prescribes how to construct Config file for a given platform. I suspect other developers would enjoy this as well.
For the linuxbios part of the rom: PAYLOAD_SIZE+ROM_IMAGE_SIZE == bytes in romimage PAYLOAD_SIZE is the amount of space reserved for your bootloader. _ROMBASE is the start address (of the ROM) ROM_IMAGE_SIZE is far long you go after that, often 64K.
So something like: option PAYLOAD_SIZE=458752 option ROM_IMAGE_SIZE=65536 option _ROMBASE=0xf0000
Should achieve what you are trying to do...
Eric