From 5319aab544d34e5d710fcbfcb25c523c2f0018c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Sun, 10 Jan 2021 12:52:07 +0100 Subject: [PATCH] make sure PCI cards can become bus masters --- pci/pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pci/pci.c b/pci/pci.c index bd486f6..d492d65 100644 --- a/pci/pci.c +++ b/pci/pci.c @@ -952,7 +952,8 @@ static void pci_device_config(uint16_t bus, uint16_t device, uint16_t function) /* disable interrupt on PCI device */ - cr |= PCICR_INT_DISABLE; + cr &= ~PCICR_INT_DISABLE; + cr |= PCICR_MASTER; /* * enable device memory or I/O access @@ -974,7 +975,7 @@ static void pci_bridge_config(uint16_t bus, uint16_t device, uint16_t function) pci_write_config_longword(handle, PCIBISTR, MCF_PCI_PCICR1_CACHELINESIZE(8) | MCF_PCI_PCICR1_LATTIMER(0x20)); - pci_write_config_longword(handle, PCIBAR0, swpl(0x00000000)); + pci_write_config_longword(handle, PCIBAR0, swpl(0x40000000)); pci_write_config_longword(handle, PCIBAR1, 0x0); pci_write_config_word(handle, PCI_LANESWAP_W(PCICR), swpw( (1 << 1) /* memory space */