mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 10:28:19 -07:00
PCI: Make PCI configuration reads and writes length-aware and fix the DC390 PCI device ID AND'ing with EEPROM DO.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <86box/mem.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
@@ -289,7 +290,7 @@ cmd640_vlb_readl(uint16_t addr, void *priv)
|
||||
}
|
||||
|
||||
static void
|
||||
cmd640_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
cmd640_pci_write(int func, int addr, UNUSED(int len), uint8_t val, void *priv)
|
||||
{
|
||||
cmd640_t *dev = (cmd640_t *) priv;
|
||||
|
||||
@@ -367,7 +368,7 @@ cmd640_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
cmd640_pci_read(int func, int addr, void *priv)
|
||||
cmd640_pci_read(int func, int addr, UNUSED(int len), void *priv)
|
||||
{
|
||||
cmd640_t *dev = (cmd640_t *) priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <86box/mem.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
@@ -296,7 +297,7 @@ cmd646_bios_handler(cmd646_t *dev)
|
||||
}
|
||||
|
||||
static void
|
||||
cmd646_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
cmd646_pci_write(int func, int addr, UNUSED(int len), uint8_t val, void *priv)
|
||||
{
|
||||
cmd646_t *dev = (cmd646_t *) priv;
|
||||
int reg50 = dev->regs[0x50];
|
||||
@@ -481,7 +482,7 @@ cmd646_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
cmd646_pci_read(int func, int addr, void *priv)
|
||||
cmd646_pci_read(int func, int addr, UNUSED(int len), void *priv)
|
||||
{
|
||||
cmd646_t *dev = (cmd646_t *) priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <86box/mem.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
@@ -108,7 +109,7 @@ rz1000_ide_handlers(rz1000_t *dev)
|
||||
}
|
||||
|
||||
static void
|
||||
rz1000_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
rz1000_pci_write(int func, int addr, UNUSED(int len), uint8_t val, void *priv)
|
||||
{
|
||||
rz1000_t *dev = (rz1000_t *) priv;
|
||||
|
||||
@@ -138,7 +139,7 @@ rz1000_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
rz1000_pci_read(int func, int addr, void *priv)
|
||||
rz1000_pci_read(int func, int addr, UNUSED(int len), void *priv)
|
||||
{
|
||||
rz1000_t *dev = (rz1000_t *) priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <86box/mem.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
@@ -233,7 +234,7 @@ w83769f_vlb_readl(uint16_t addr, void *priv)
|
||||
}
|
||||
|
||||
static void
|
||||
w83769f_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
w83769f_pci_write(int func, int addr, UNUSED(int len), uint8_t val, void *priv)
|
||||
{
|
||||
w83769f_t *dev = (w83769f_t *) priv;
|
||||
|
||||
@@ -252,7 +253,7 @@ w83769f_pci_write(int func, int addr, uint8_t val, void *priv)
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
w83769f_pci_read(int func, int addr, void *priv)
|
||||
w83769f_pci_read(int func, int addr, UNUSED(int len), void *priv)
|
||||
{
|
||||
w83769f_t *dev = (w83769f_t *) priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
Reference in New Issue
Block a user