[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PC INT13 and the BAR
- To: Mailing List Recipients <pci-sig-request@znyx.com>
- Subject: Re: PC INT13 and the BAR
- From: "David O'Shea" <daveo@corollary.com>
- Date: Wed, 7 Aug 1996 18:31:08 -0700
- Resent-Date: Wed, 7 Aug 1996 18:31:08 -0700
- Resent-From: pci-sig-request@znyx.com
- Resent-Message-Id: <"sk3KA1.0.Db4.FGK2o"@dart>
- Resent-Sender: pci-sig-request@znyx.com
My editorials are sprinkled throughout... -David O'Shea
At 03:42 PM 8/7/96 PDT, w_wong@emulex.com wrote:
>
>Hello everyone,
>
>Thank you for the responses to my previous mails. The reason I
>mentioned about the gap between BAR registers is that I want to
>have flexibility for the BAR to be either 32 bits or 64 bits. If the type
>bits are set to 32- bit address under 1M by the hardware; the high
>address of 64 bits BAR has to be forced to un-used (all zero's).
>The system BIOS should be able to scan all the BAR and skip
>the un-used gap BAR registers.
>
>If someone can answer my following questions, I do not have to
>implement as the above.
>
>ASSUMPTION:
>(1) Architecture: Intel PC and PCI boot device.
>(2) O.S: Window NT, Window95 or SCO UNIX (no DOS).
>(3) BAR: The memory map address only (No I/O mapped because
>ISA Alisaing limitation).
>
>The system BIOS allocated the memory resources to the BAR close to
>4 Gagbytes. PC INT13 Expansion ROM BIOS is used to boot the O.S.
>Before O.S. switches to proctected mode in the boot , I have to switch
>to Protected mode from the Real mode INT13 in order to access PCI
>Base Address Registers above 1M space. After finishing the access,
>I switched back to the Real mode from the Proctected mode.
General NOTE: The assumption about no DOS is almost always invalid.
Although your target market may not include DOS, any "configuration"
utility for the adapter/controller that you are designing is almost
always written in DOS. You may say that the "programmers said... NO DOS".
They are lying. Take it from a programmer.
>The questions are:
>(1) Can I implement INT13 in the Proctected mode as mentioned above?
No. You cannot go into protected mode and return the machine to exactly
the state that it was in. The BIOS (your code) can be called when the
system is in v86 (virtual 8086) mode. You cannot try to enter protected
mode in this case without a fault. It is generally a very bad idea to try
and take the system into protected mode in an INT 13 handler since you
cannot make any assumptions. The only assumption that you are really
allowed to make is that you can't make any assumptions.
>(2) If O.S. is already in the proctected mode, can I access the BAR
>above 1M without switching to Proctected mode.
Yes. However, the mechanism for getting a valid memory selector varies per
the OS. Usually your device driver will get a descriptor at initialization
time and use it for all run-time. You cannot get a descriptor from the
OS from within the BIOS its got to be a device driver in pratice.
>(3) Does anyone implement as above before.
People have tried. They usually either give up on the boot ROM, or
have lots of compatibility issues.
>(4) How else can it be implemented?
You need to have an I/O H/W interface as well. It can be totally slow.
It just has to work. Your INT 13 BIOS code uses the I/O interface.
You still implement your way cool, fancy, high speed memory interface.
All of your NT, Win95, UNIX, and Novell drivers use the memory interface.
Since you don't care about DOS, it just uses the really slow INT 13
BIOS interface using the really slow, uncool, simple I/O hardware function.
The I/O space is still fully accesible in REAL mode which is how your
INT 13 BIOS should be implemented. You never know what environment your
customer is going to try and make your card work. No customer in the
planet is going to accept the answer "but we said DOS was not supported...".
David O'Shea
daveo@corollary.com
¬ š