BIOS and option rom?


     I am using sc1200 that can address upto 4GB physical address). My flash memory is 32Mbit. Generally the ROM chip is mapped in hardware to the high physical address (0xFFFFFFFF - 0xFFC00000). My SDRAM is 32MByte. It is mapped in hardware to CPU address (0x00000000 - 1FFFFFF). My Bios program is kept in the flash memory. After the hardware initialization is done and before going with the int 19h interrupt, my bios program scans for option Rom from location 0xC8000h. So when it starts scanning from location 0xC8000, is any hardware remapping that has to be done.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Can you please formulate your question ?
JohncyAuthor Commented:
My bootloader for Flash (ROLO) is kept as option ROM. I am confused with whether the location 0xC8000 is Flash memory location or is the SDRAM location? When it scans for option ROM, does the Flash memory has to be remapped to a different physical address in hardware?
Thanks in advance.
x86 CPU can access in Real Mode up to 1 MByte or 0x100000 physical address.
However historically the memory map is usually the next:
0x00000 - 0x9FFFF  - "low" RAM
0xA0000 - 0xC7FFF - video adaptor memory
0xC8000 - 0xDFFFF - memory for expansion cards with BIOS expansions
0xE0000 - 0xFFFFF - BIOS ROM area

Now, generally speaking 0xA0000 - 0xFFFFF can be used as RAM. Moreover BIOS usually copies
itself to "shadowed" RAM from 0xE0000 - 0xFFFFF.
It is convenient to consider that memory arbitrator switches your access to PCI and ISA
when you try to access 0xA0000 - 0xDFFFF and to SDRAM if you access 0x00000 - 0x9FFFF.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

JohncyAuthor Commented:
Is my hardware mapping looks right? Should I need a remapping in hardware when it searches for option rom?
It may be not "remapping". It is much simpler to connect to DiskOnChip 2 Chip Selects. One for boot:
range 0xFFF80000-0xFFFFFFFF and one for 0x000C8000-0x000DFFFF.
JohncyAuthor Commented:
I use Flash memory to store my bios program, linux OS, filesystem. My bootloader for flash (ROLO) is kept as option ROM.
Something wrong here... Do you have NOR flash for boot or you have only DiskOnChip
for boot your BIOS ?
JohncyAuthor Commented:
I have NOR flash.
So you DO NOT need to map DiskOnChip to 0xFFFFFFFF. Moreover you can not map both
NOR flash and DiskOnChip to same address.
Can you please describe your system again and now with NOR flash ?
JohncyAuthor Commented:
I have NOR Flash. But if I meet some problem with NOR flash I would like to have diskonchip millennium. I would like to make my software and hardware ready for both purposes. I would use any one and not both at the same time.
JohncyAuthor Commented:
If I have to use Flash or DOCM, how the mapping of each one should be at power-on?
Same as my response for your other (related) question "real and protected mode":

The BIOS co-exists in the "same" address space as the SDRAM, much the same way as the BIOS in a PC. The ROM or the SDRAM will be enabled as appropriate.

I am not 100% clear on the option ROM, but that "should" hold true also, i.e. the device should know to enable the rom chip select in that case.

I think the key that will unlock this all for you is to look at the schematics in the National reference design, and see how those match your situation.

My response to your other question was:
From the National data sheet I found where the core logic module decodes the FFFFFFF0 address (and some others) and passes it to the sub-ISA interface, where the boot ROM needs to physically connect...

------------------------------------------------------------------------------- ROM Interface
The Core Logic module positively decodes memory
addresses 000F0000h-000FFFFFh (64 KB) and
FFFC0000h-FFFFFFFFh (256 KB) at reset. These memory
cycles cause the Core Logic module to claim the cycle, and
generate an ISA bus memory cycle with ROMCS#
asserted. The Core Logic module can also be configured to
respond to memory addresses FF000000h-FFFFFFFFh
(16 MB) and 000E0000h-000FFFFFh (128 KB).
8- or 16-bit wide ROM is supported. BOOT16 strap determines
the width after reset. MCR[14,3] (Offset 34h) in the
General Configuration Block (see Table 3-2 on page 86 for
bit details) allows program control of the width.
Flash ROM is supported in the Core Logic module by
enabling the ROMCS# signal on write accesses to the
ROM region. Normally only read cycles are passed to the
ISA bus, and the ROMCS# signal is suppressed for write
cycles. When the ROM Write Enable bit (F0 Index 52h[1])
is set, a write access to the ROM address region causes a
write cycle to occur with MEMW#, WR# and ROMCS#

I went here:

and downloaded the data sheet:$File/sc1200_ds.pdf

and their reference design:$File/sc1200_ebga_tft_on_parallel.pdf

The boot rom schematic is located on PDF page 9

Also they have an Orcad DSN, if you can make use of it that should shave some time off your project.

Good Luck,
JohncyAuthor Commented:
This means I can have my Flash memory mapped only to the lower address. Is it correct?
>This means I can have my Flash memory mapped only to the lower address. Is it correct?

Yes, that is correct, addresses connected to AD22..AD0 (assuming you have 4MBx8), /CE connected to /ROMCS, Data connected to AD31..AD24
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.