PCI / ACPI interaction

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
thorfdbg
Member
Member
Posts: 33
Joined: Sat May 15, 2021 9:46 am

PCI / ACPI interaction

Post by thorfdbg »

How would/can a PCI device interact with the ACPI tables of the bios? In particular, how can a PCI device inject custom tables into an ACPI table such that the Os ACPI interpreter can pick its functions up.

I'm still scratching my head where my nvidia card gets its VESA bios from as its ROM BAR is completely blank, and I have seen from the linux driver that optionally it can take the VESA bios also from the _ROM function of the ACPI tables which delivers the ROM image in chunks of 4K. My thinking is that somehow somewhat in the boot process the card injects a custom ACPI _ROM handle which provides a function to read out the serial EPROM on the card and places it in the ROM mirror, which is then in turn interpreted by the Bios to start up the graphics card. For this to work, however, some part of the bios needs to pick up the ACPI handle of the card, and I wonder how that works.
sounds
Member
Member
Posts: 136
Joined: Sat Feb 04, 2012 5:03 pm

Re: PCI / ACPI interaction

Post by sounds »

The nvidia card would have an efi driver (option rom for legacy bios) that uses bios code to modify acpi tables
Octocontrabass
Member
Member
Posts: 6249
Joined: Mon Mar 25, 2013 7:01 pm

Re: PCI / ACPI interaction

Post by Octocontrabass »

thorfdbg wrote: Sat Dec 27, 2025 3:20 amHow would/can a PCI device interact with the ACPI tables of the bios?
It would use its option ROM.
thorfdbg wrote: Sat Dec 27, 2025 3:20 amI'm still scratching my head where my nvidia card gets its VESA bios from as its ROM BAR is completely blank,
Are you sure it has a ROM? Can you try installing it in an x86 PC?
thorfdbg
Member
Member
Posts: 33
Joined: Sat May 15, 2021 9:46 am

Re: PCI / ACPI interaction

Post by thorfdbg »

This is a card that predates EFI, it is a PCI card from the NV34 generation, so pretty old. Unfortunately, I do not have a PC with PCI connectors anymore, so I cannot test the card in any other way.

All I wonder how the contents of a serial EPROM move to the VESA extension ROM area at c000:0000 as the EPROM is not directly accessible, but only through a bit-banging interface. Thus, which program or which interface is responsible for implementing the access protocol of the serial EPROM and making it available for direct random access of the x86 CPU. I understand the NVIDIA cards have a ROM mirror, but the contents needs to get there somehow.

Background is that the nouveau driver apparently offers several features to access the ROM: Through the ROM bar, through the ACPI tables, or through a file provided by the user, so I suspect that this related to ACPI that is interpreted by someone.
Octocontrabass
Member
Member
Posts: 6249
Joined: Mon Mar 25, 2013 7:01 pm

Re: PCI / ACPI interaction

Post by Octocontrabass »

thorfdbg wrote: Mon Dec 29, 2025 6:06 amUnfortunately, I do not have a PC with PCI connectors anymore, so I cannot test the card in any other way.
Does the card have any identifying labels that might tell you whether it's meant to work in a PC? Does it even have a ROM at all? You might be able to see the ROM chip if it isn't hidden under a heatsink.
thorfdbg wrote: Mon Dec 29, 2025 6:06 amAll I wonder how the contents of a serial EPROM move to the VESA extension ROM area at c000:0000 as the EPROM is not directly accessible, but only through a bit-banging interface.
Either the EEPROM is directly accessible or it isn't a PC display adapter. According to reverse-engineered documentation, the ROM is directly accessible through the ROM BAR while shadowing is disabled, and shadowing should be disabled directly after power-on reset.
Post Reply