[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Question about the initialization of configuration registers
> I have some questions. I'm going to design a PCI master/target device chip
according to PCI Spec. rev. 2.2. Because this chip can be used in many PCI
application cards, I think subsystem vendor ID and subsystem ID must be
changeable by system vendors and these IDs will be used to identify the
system card in PC Windows system. Therefore, many chips use an EEPROM to put
them in it. But I'd like to implement a PCI device without an EEPROM. Using
the boot-ROM program in the application side(not PCI side), we can assign
the initial values of these configuration registers whenever system reset
(PCI bus reset) is released.
>
> 1) Any problem in this method?
Yes. This is explicitly forbidden design practice. The ID registers
must have valid (correct) contents in them exclusive of an option ROM
running. They have to be valid shortly after RESET# deasserts. Your
device is expected to issue RETRY responses until the ID is set.
The boot-ROM is not guaranteed to run in many situations.
Most common, and of most interest to you, would be when a system
is restoring from a lower-power state, say S3 and your device is
coming back from an off state. (As if all the PCI devices and its
associated
PCI bus was powered down). The BIOS will not run the option ROM
again. The opROm's handy work is still preserved in memory in terms of
system state, and there isn't supposed to be any "device state"
that is dependent on an option ROM running. (i.e. your ID setting
idea here). (i.e., the system keep memory on standby voltage. It is
good. You device went off, then on again. The system will reassign
the old BAR values that it saved before device power-down. Your option
ROM will not be run on power-up....)
This is a no-no. It is a no no that everyone is tempted to do, to save
the cost of an serial EEPROM.... The only devices allowed to cheat and
actually do what you propose are devices used on the motherboard. Its
still
illegal, but the system BIOS always does get to run on an ACPI power-state
change, so it can always restore the values as you suggest. But add-in
cards
don't get this luxury, nor do PCI devices used on such adapter boards.
-David O'Shea