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

Re: BIOS behavior on BIOS and memory space enable bit



At 11:24 AM 9/4/96 PDT, you wrote:
>During a logic analyzer test of my pci board, I caught the BIOS fiddling
>with the memory space enable bit before it set the memory BAR.  Apparently
>it is trying to use the writability of the memory space enable bit to
>determine whether the board contain memory space BARS.  Is this something
>that is OK for BIOS to do?   It appears to be quite dangerous as it would
>turn on the board's address decoding mechanism without knowing if doing
>so will create address conflicts.  What fun if you happens to have two
>memory BARs on the same board and both of them are mapped to zero. 
>

I doubt if the system BIOS is testing for memory BARs via the mem enable
bit.  It's simple enough to determine if a board uses any memory BARs.  The
usual sequence is to assign _all_ BAR resources (I/O & MEM), assign an IRQ
if requested, then set the enable bits as required, then copy & init the
expansion ROM via the ROM BAR (that's how my BIOS does it). 

I agree that the enable bits should be OFF until a PCI board is properly set
up, although, technically, any BAR set to 00000000h is disabled. At
power-on, the board's hardware is responsible for clearing mem & I/O enable;
during reset (soft or hard), the system BIOS often has to ensure that all
PCI devices are disabled. This may be what you're seeing as 'fiddling'.



--------- Sometimes you're the windshield, sometimes you're the bug -----------

Tom Warren - Staff Software Engineer  VLSI Technology, Inc.  8375 S. River Pkwy
tom.warren@tempe.vlsi.com             M/S 265                Tempe, AZ  85284
76167.1572@compuserve.com             FON (602) 752-6396     FAX (602) 752-6000
¾(