Happy new year to you too!
On Fri, 5 Jan 2024 at 09:58, Nico Huber nico.h@gmx.de wrote:
Hi again, and a happy new year!
With this code below I did just enough to enable subtractive decode in the root port and legacy PCI bridge (datasheet does call for doing both for legacy PCI mode) and nothing else. That ASM1083 just worked, and I finally got POST codes on PCI slot.
However, I lost integrated graphics completely. A boot log is attached. Can you see why this is happening?
Thanks Keith
----8<----
void bootblock_mainboard_early_init(void) { nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
if (CONFIG(POST_DEVICE_PCI_PCIE)) { u32 rpfn = RCBA32(RPFN); /* Unhide root port 7. */ rpfn &= ~(1 << 27); RCBA32(RPFN) = rpfn; /* Get root port 7 function number. */ unsigned int rpfunc = (rpfn >> 24) & 0x7;
pci_devfn_t bridge = PCH_PCIE_DEV(rpfunc);
/* Enable subtractive decode (PECR3[SDE]). */ pci_or_config8(bridge, 0xec, 0x01);
/* Enable I/O but don't set a window. */ pci_s_write_config16(bridge, PCI_IO_BASE, 0x00ff); pci_or_config16(bridge, PCI_COMMAND, PCI_COMMAND_IO);
/* Datasheet p.129: Have to enable subtractive decode in D30F0 too, * even though Z77 doesn't natively do PCI. */ pci_or_config32(PCI_DEV(0, 30, 0), 0x4c, (1 << 28));
/* POST card in the PCI slot should now receive POST codes. */ } }