[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FW: BIOS and BARs



My understanding of the 256byte IO limit is that it is to avoid conflict   
with ISA adapters which were designed to use aliases of their assigned   
space. To achieve this, the PCI BIOS must only allocate 256 byte spaces   
which are aliases of the motherboard IO space (0000-00FF), ie. with   
address bits 8&9 set to zero. This does not always happen in practice.

Since a PCI/ISA bridge uses subtractive decode, then if the 256 byte   
restriction was removed (or ignored) then the only cards which would   
suffer would be those ISA cards which deliberately use aliases. :-)

Why not limit PCI/ISA bridges to only respond to addresses below 03FF?
   

Mike.

Anne,

When the PCI spec went from 2.0 to 2.1, the suggestion in 2.0 that only   
256bytes
of I/O Space be requested was quite silently turned into the requirement   
that
no more than 256 bytes of I/O space be requested in a single BAR.   How   
this got
through review is a very good question, since its sole purpose is to help
support
the IBM PC ISA Bus, with old ISA cards, that really no one cares about   
anymore.
None-the-less, it is now in the 2.1 spec that only 256 bytes of I/O space   
can
be requested.   [How, the spec writers chose to deal with the perfectly   
legal
2.0 compliant devices that request more than 256 bytes seems to be a   
complete
mystery.  The empirical evidence suggests that those perfectly compliant   
devices
are no longer supported.....   The BIOS people should really take out the
check, or
at a minimum, but in a BIOS option for turning it on or off....   But   
most
PC BIOS
lack such an option.

The request for memory is perfectly legal.  Unfortunately, on IBM PC
systems, when
you request memory below 1MB for your device, it must come from the
C8000h-E0000h
(or on some very few systems up to F0000h).    This is also the region   
that all
ISA option ROMs must live, and also the region where all PCI BIOS ROM's   
are
shadowed
on IBM PC type systems.   Most IBM PC BIOS refuse to honor a requet for   
memory
below 1MB because it can only be honored with a memory region from this
small range,
and the BIOS needs that range for other stuff.   Basically, BIOS consider   
a
board
that asks for below 1MB memory to be "hoggy - asking for too much of a
precious resource".
Such memory requests are usually not granted, and such a BAR (though   
legal)
is never
satisfied by a IBM PC system BIOS.

So, although your device seems to be a perfectly legal implementation in   
2.0 and
a mostly legal implementation in 2.1, it does not appear that IBM PC BIOS   
will
want to play fair with your device.   Generally, people request low   
memory for
either one of two reasons.  Reason 1, they want to have an Option ROM   
that will
capable of allowing their device to be the boot device, and they wish the   
Option
ROM to be able to access their device using a memory format.  [Good   
reason, but
this never works, because of the aforementioned scarcity of low memory   
space.]
Reason 2, they wish to support MS-DOS without writing a device driver   
that uses
DMPI services...  [Less good of a reason, and again to bad anyway.]

It really is a shame that the 4K of I/O space that you request is not
granted.  On
a Corollary System (which is IBM PC compatible at boot time, your I/O
request would
be granted.   We choose to ignore the absolutely abysmal REQUIREMENT that
devices
only ask for 256 bytes of I/O space in one BAR.   This is an arbitrary
requirement
in the sense of the PCI bus standing alone.  It is only usefull for   
supporting
10-bit decode devices on PCI/ISA systems that wish to do so.   It was a   
poor bit
of specsmenship to allow this suggestion (in 2.0) to become the   
requiremnt
that it
is not (in 2.1).

So, just ship your board in a Corollary machine..... :-)  And rewrite   
your
option
ROM to use your I/O space that we will grant.   [ Even we do not satisfy   
low
memory < 1MB
requests.   Nobody satisfies these requests in IBM PC systems.]

Good Luck,

David O'Shea
daveo@corollary.com

At 09:29 AM 11/28/96 MET, ABIVEN Anne wrote:
>
>I am now testing a PCI board under DOS. Only two base address registers   
are
>set. BAR 0 requires 4kbytes of I/O space and BAR1 requires 4kbytes of
>memory, under 1Mbyte to be seen by dos.
>At boot, the PC (the BIOS) does not give any warning message or error
>massage but when I look at the content of my BAR1 I see that it did not
>implement it below 1 Mbyte but on top of the 4Gbytes, so I cannot access   
my
>board under DOS.
>Is it normal that the BIOS gives no warning message when it does not   
respect
>the requirements given ?
>Is it normal that a PC with nothing else than this board (with 2 BARs   
only)
>is not able to satisfy these requirements (4kbytes of memory)?

Yøè