Skip to content
Snippets Groups Projects
Commit 376b8519 authored by Helge Deller's avatar Helge Deller Committed by Richard Henderson
Browse files

hppa: Add support for LASI chip with i82596 NIC


LASI is a built-in multi-I/O chip which supports serial, parallel,
network (Intel i82596 Apricot), sound and other functionalities.
LASI has been used in many HP PARISC machines.
This patch adds the necessary parts to allow Linux and HP-UX to detect
LASI and the network card.

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
Message-Id: <20191220211512.3289-3-svens@stackframe.org>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent 18092598
No related branches found
No related tags found
No related merge requests found
......@@ -178,6 +178,8 @@ S: Maintained
F: target/hppa/
F: hw/hppa/
F: disas/hppa.c
F: hw/net/*i82596*
F: include/hw/net/lasi_82596.h
LM32 TCG CPUs
M: Michael Walle <michael@walle.cc>
......
......@@ -10,3 +10,4 @@ config DINO
select IDE_CMD646
select MC146818RTC
select LSI_SCSI_PCI
select LASI_82596
obj-$(CONFIG_DINO) += pci.o machine.o dino.o
obj-$(CONFIG_DINO) += pci.o machine.o dino.o lasi.o
......@@ -12,6 +12,8 @@
#include "hppa_hardware.h"
PCIBus *dino_init(MemoryRegion *, qemu_irq *, qemu_irq *);
DeviceState *lasi_init(MemoryRegion *);
#define enable_lasi_lan() 0
#define TYPE_DINO_PCI_HOST_BRIDGE "dino-pcihost"
......
/*
* HP-PARISC Lasi chipset emulation.
*
* (C) 2019 by Helge Deller <deller@gmx.de>
*
* This work is licensed under the GNU GPL license version 2 or later.
*
* Documentation available at:
* https://parisc.wiki.kernel.org/images-parisc/7/79/Lasi_ers.pdf
*/
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "qapi/error.h"
#include "cpu.h"
#include "trace.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hppa_sys.h"
#include "hw/net/lasi_82596.h"
#include "hw/char/parallel.h"
#include "hw/char/serial.h"
#include "exec/address-spaces.h"
#include "migration/vmstate.h"
#define TYPE_LASI_CHIP "lasi-chip"
#define LASI_IRR 0x00 /* RO */
#define LASI_IMR 0x04
#define LASI_IPR 0x08
#define LASI_ICR 0x0c
#define LASI_IAR 0x10
#define LASI_PCR 0x0C000 /* LASI Power Control register */
#define LASI_ERRLOG 0x0C004 /* LASI Error Logging register */
#define LASI_VER 0x0C008 /* LASI Version Control register */
#define LASI_IORESET 0x0C00C /* LASI I/O Reset register */
#define LASI_AMR 0x0C010 /* LASI Arbitration Mask register */
#define LASI_IO_CONF 0x7FFFE /* LASI primary configuration register */
#define LASI_IO_CONF2 0x7FFFF /* LASI secondary configuration register */
#define LASI_BIT(x) (1ul << (x))
#define LASI_IRQ_BITS (LASI_BIT(5) | LASI_BIT(7) | LASI_BIT(8) | LASI_BIT(9) \
| LASI_BIT(13) | LASI_BIT(14) | LASI_BIT(16) | LASI_BIT(17) \
| LASI_BIT(18) | LASI_BIT(19) | LASI_BIT(20) | LASI_BIT(21) \
| LASI_BIT(26))
#define ICR_BUS_ERROR_BIT LASI_BIT(8) /* bit 8 in ICR */
#define ICR_TOC_BIT LASI_BIT(1) /* bit 1 in ICR */
#define LASI_CHIP(obj) \
OBJECT_CHECK(LasiState, (obj), TYPE_LASI_CHIP)
#define LASI_RTC_HPA (LASI_HPA + 0x9000)
typedef struct LasiState {
PCIHostState parent_obj;
uint32_t irr;
uint32_t imr;
uint32_t ipr;
uint32_t icr;
uint32_t iar;
uint32_t errlog;
uint32_t amr;
uint32_t rtc;
time_t rtc_ref;
MemoryRegion this_mem;
} LasiState;
static bool lasi_chip_mem_valid(void *opaque, hwaddr addr,
unsigned size, bool is_write,
MemTxAttrs attrs)
{
bool ret = false;
switch (addr) {
case LASI_IRR:
case LASI_IMR:
case LASI_IPR:
case LASI_ICR:
case LASI_IAR:
case (LASI_LAN_HPA - LASI_HPA):
case (LASI_LPT_HPA - LASI_HPA):
case (LASI_UART_HPA - LASI_HPA):
case (LASI_RTC_HPA - LASI_HPA):
case LASI_PCR ... LASI_AMR:
ret = true;
}
trace_lasi_chip_mem_valid(addr, ret);
return ret;
}
static MemTxResult lasi_chip_read_with_attrs(void *opaque, hwaddr addr,
uint64_t *data, unsigned size,
MemTxAttrs attrs)
{
LasiState *s = opaque;
MemTxResult ret = MEMTX_OK;
uint32_t val;
switch (addr) {
case LASI_IRR:
val = s->irr;
break;
case LASI_IMR:
val = s->imr;
break;
case LASI_IPR:
val = s->ipr;
/* Any read to IPR clears the register. */
s->ipr = 0;
break;
case LASI_ICR:
val = s->icr & ICR_BUS_ERROR_BIT; /* bus_error */
break;
case LASI_IAR:
val = s->iar;
break;
case (LASI_LAN_HPA - LASI_HPA):
case (LASI_LPT_HPA - LASI_HPA):
case (LASI_UART_HPA - LASI_HPA):
val = 0;
break;
case (LASI_RTC_HPA - LASI_HPA):
val = time(NULL);
val += s->rtc_ref;
break;
case LASI_PCR:
case LASI_VER: /* only version 0 existed. */
case LASI_IORESET:
val = 0;
break;
case LASI_ERRLOG:
val = s->errlog;
break;
case LASI_AMR:
val = s->amr;
break;
default:
/* Controlled by lasi_chip_mem_valid above. */
g_assert_not_reached();
}
trace_lasi_chip_read(addr, val);
*data = val;
return ret;
}
static MemTxResult lasi_chip_write_with_attrs(void *opaque, hwaddr addr,
uint64_t val, unsigned size,
MemTxAttrs attrs)
{
LasiState *s = opaque;
trace_lasi_chip_write(addr, val);
switch (addr) {
case LASI_IRR:
/* read-only. */
break;
case LASI_IMR:
s->imr = val; /* 0x20 ?? */
assert((val & LASI_IRQ_BITS) == val);
break;
case LASI_IPR:
/* Any write to IPR clears the register. */
s->ipr = 0;
break;
case LASI_ICR:
s->icr = val;
/* if (val & ICR_TOC_BIT) issue_toc(); */
break;
case LASI_IAR:
s->iar = val;
break;
case (LASI_LAN_HPA - LASI_HPA):
/* XXX: reset LAN card */
break;
case (LASI_LPT_HPA - LASI_HPA):
/* XXX: reset parallel port */
break;
case (LASI_UART_HPA - LASI_HPA):
/* XXX: reset serial port */
break;
case (LASI_RTC_HPA - LASI_HPA):
s->rtc_ref = val - time(NULL);
break;
case LASI_PCR:
if (val == 0x02) /* immediately power off */
qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
break;
case LASI_ERRLOG:
s->errlog = val;
break;
case LASI_VER:
/* read-only. */
break;
case LASI_IORESET:
break; /* XXX: TODO: Reset various devices. */
case LASI_AMR:
s->amr = val;
break;
default:
/* Controlled by lasi_chip_mem_valid above. */
g_assert_not_reached();
}
return MEMTX_OK;
}
static const MemoryRegionOps lasi_chip_ops = {
.read_with_attrs = lasi_chip_read_with_attrs,
.write_with_attrs = lasi_chip_write_with_attrs,
.endianness = DEVICE_BIG_ENDIAN,
.valid = {
.min_access_size = 1,
.max_access_size = 4,
.accepts = lasi_chip_mem_valid,
},
.impl = {
.min_access_size = 1,
.max_access_size = 4,
},
};
static const VMStateDescription vmstate_lasi = {
.name = "Lasi",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(irr, LasiState),
VMSTATE_UINT32(imr, LasiState),
VMSTATE_UINT32(ipr, LasiState),
VMSTATE_UINT32(icr, LasiState),
VMSTATE_UINT32(iar, LasiState),
VMSTATE_UINT32(errlog, LasiState),
VMSTATE_UINT32(amr, LasiState),
VMSTATE_END_OF_LIST()
}
};
static void lasi_set_irq(void *opaque, int irq, int level)
{
LasiState *s = opaque;
uint32_t bit = 1u << irq;
if (level) {
s->ipr |= bit;
if (bit & s->imr) {
uint32_t iar = s->iar;
s->irr |= bit;
if ((s->icr & ICR_BUS_ERROR_BIT) == 0) {
stl_be_phys(&address_space_memory, iar & -32, iar & 31);
}
}
}
}
static int lasi_get_irq(unsigned long hpa)
{
switch (hpa) {
case LASI_HPA:
return 14;
case LASI_UART_HPA:
return 5;
case LASI_LPT_HPA:
return 7;
case LASI_LAN_HPA:
return 8;
case LASI_SCSI_HPA:
return 9;
case LASI_AUDIO_HPA:
return 13;
case LASI_PS2KBD_HPA:
case LASI_PS2MOU_HPA:
return 26;
default:
g_assert_not_reached();
}
}
DeviceState *lasi_init(MemoryRegion *address_space)
{
DeviceState *dev;
LasiState *s;
dev = qdev_create(NULL, TYPE_LASI_CHIP);
s = LASI_CHIP(dev);
s->iar = CPU_HPA + 3;
/* Lasi access from main memory. */
memory_region_init_io(&s->this_mem, OBJECT(s), &lasi_chip_ops,
s, "lasi", 0x100000);
memory_region_add_subregion(address_space, LASI_HPA, &s->this_mem);
qdev_init_nofail(dev);
/* LAN */
if (enable_lasi_lan()) {
qemu_irq lan_irq = qemu_allocate_irq(lasi_set_irq, s,
lasi_get_irq(LASI_LAN_HPA));
lasi_82596_init(address_space, LASI_LAN_HPA, lan_irq);
}
/* Parallel port */
qemu_irq lpt_irq = qemu_allocate_irq(lasi_set_irq, s,
lasi_get_irq(LASI_LPT_HPA));
parallel_mm_init(address_space, LASI_LPT_HPA + 0x800, 0,
lpt_irq, parallel_hds[0]);
/* Real time clock (RTC), it's only one 32-bit counter @9000 */
s->rtc = time(NULL);
s->rtc_ref = 0;
if (serial_hd(1)) {
/* Serial port */
qemu_irq serial_irq = qemu_allocate_irq(lasi_set_irq, s,
lasi_get_irq(LASI_UART_HPA));
serial_mm_init(address_space, LASI_UART_HPA + 0x800, 0,
serial_irq, 8000000 / 16,
serial_hd(1), DEVICE_NATIVE_ENDIAN);
}
return dev;
}
static void lasi_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_lasi;
}
static const TypeInfo lasi_pcihost_info = {
.name = TYPE_LASI_CHIP,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(LasiState),
.class_init = lasi_class_init,
};
static void lasi_register_types(void)
{
type_register_static(&lasi_pcihost_info);
}
type_init(lasi_register_types)
......@@ -16,6 +16,7 @@
#include "hw/ide.h"
#include "hw/timer/i8254.h"
#include "hw/char/serial.h"
#include "hw/net/lasi_82596.h"
#include "hppa_sys.h"
#include "qemu/units.h"
#include "qapi/error.h"
......@@ -101,6 +102,9 @@ static void machine_hppa_init(MachineState *machine)
"ram", ram_size);
memory_region_add_subregion(addr_space, 0, ram_region);
/* Init Lasi chip */
lasi_init(addr_space);
/* Init Dino (PCI host bus chip). */
pci_bus = dino_init(addr_space, &rtc_irq, &serial_irq);
assert(pci_bus);
......@@ -125,7 +129,9 @@ static void machine_hppa_init(MachineState *machine)
/* Network setup. e1000 is good enough, failing Tulip support. */
for (i = 0; i < nb_nics; i++) {
pci_nic_init_nofail(&nd_table[i], pci_bus, "e1000", NULL);
if (!enable_lasi_lan()) {
pci_nic_init_nofail(&nd_table[i], pci_bus, "e1000", NULL);
}
}
/* Load firmware. Given that this is not "real" firmware,
......
......@@ -7,3 +7,8 @@ hppa_pci_iack_write(void) ""
dino_chip_mem_valid(uint64_t addr, uint32_t val) "access to addr 0x%"PRIx64" is %d"
dino_chip_read(uint64_t addr, uint32_t val) "addr 0x%"PRIx64" val 0x%08x"
dino_chip_write(uint64_t addr, uint32_t val) "addr 0x%"PRIx64" val 0x%08x"
# lasi.c
lasi_chip_mem_valid(uint64_t addr, uint32_t val) "access to addr 0x%"PRIx64" is %d"
lasi_chip_read(uint64_t addr, uint32_t val) "addr 0x%"PRIx64" val 0x%08x"
lasi_chip_write(uint64_t addr, uint32_t val) "addr 0x%"PRIx64" val 0x%08x"
......@@ -31,6 +31,9 @@ config TULIP
depends on PCI
select NMC93XX_EEPROM
config I82596_COMMON
bool
config E1000_PCI
bool
default y if PCI_DEVICES
......@@ -89,6 +92,10 @@ config LANCE
bool
select PCNET_COMMON
config LASI_82596
bool
select I82596_COMMON
config SUNHME
bool
......
......@@ -28,6 +28,8 @@ common-obj-$(CONFIG_IMX_FEC) += imx_fec.o
common-obj-$(CONFIG_CADENCE) += cadence_gem.o
common-obj-$(CONFIG_STELLARIS_ENET) += stellaris_enet.o
common-obj-$(CONFIG_LANCE) += lance.o
common-obj-$(CONFIG_LASI_82596) += lasi_i82596.o
common-obj-$(CONFIG_I82596_COMMON) += i82596.o
common-obj-$(CONFIG_SUNHME) += sunhme.o
common-obj-$(CONFIG_FTGMAC100) += ftgmac100.o
common-obj-$(CONFIG_SUNGEM) += sungem.o
......
This diff is collapsed.
#ifndef HW_I82596_H
#define HW_I82596_H
#define I82596_IOPORT_SIZE 0x20
#include "exec/memory.h"
#include "exec/address-spaces.h"
#define PORT_RESET 0x00 /* reset 82596 */
#define PORT_SELFTEST 0x01 /* selftest */
#define PORT_ALTSCP 0x02 /* alternate SCB address */
#define PORT_ALTDUMP 0x03 /* Alternate DUMP address */
#define PORT_CA 0x10 /* QEMU-internal CA signal */
typedef struct I82596State_st I82596State;
struct I82596State_st {
MemoryRegion mmio;
MemoryRegion *as;
qemu_irq irq;
NICState *nic;
NICConf conf;
QEMUTimer *flush_queue_timer;
hwaddr scp; /* pointer to SCP */
uint8_t sysbus;
uint32_t scb; /* SCB */
uint16_t scb_status;
uint8_t cu_status, rx_status;
uint16_t lnkst;
uint32_t cmd_p; /* addr of current command */
int ca;
int ca_active;
int send_irq;
/* Hash register (multicast mask array, multiple individual addresses). */
uint8_t mult[8];
uint8_t config[14]; /* config bytes from CONFIGURE command */
uint8_t tx_buffer[0x4000];
};
void i82596_h_reset(void *opaque);
void i82596_ioport_writew(void *opaque, uint32_t addr, uint32_t val);
uint32_t i82596_ioport_readw(void *opaque, uint32_t addr);
void i82596_ioport_writel(void *opaque, uint32_t addr, uint32_t val);
uint32_t i82596_ioport_readl(void *opaque, uint32_t addr);
uint32_t i82596_bcr_readw(I82596State *s, uint32_t rap);
ssize_t i82596_receive(NetClientState *nc, const uint8_t *buf, size_t size_);
int i82596_can_receive(NetClientState *nc);
void i82596_set_link_status(NetClientState *nc);
void i82596_common_init(DeviceState *dev, I82596State *s, NetClientInfo *info);
extern const VMStateDescription vmstate_i82596;
#endif
/*
* QEMU LASI NIC i82596 emulation
*
* Copyright (c) 2019 Helge Deller <deller@gmx.de>
* This work is licensed under the GNU GPL license version 2 or later.
*
*
* On PA-RISC, this is the Network part of LASI chip.
* See:
* https://parisc.wiki.kernel.org/images-parisc/7/79/Lasi_ers.pdf
*/
#include "qemu/osdep.h"
#include "qemu/timer.h"
#include "hw/sysbus.h"
#include "net/eth.h"
#include "hw/net/lasi_82596.h"
#include "hw/net/i82596.h"
#include "trace.h"
#include "sysemu/sysemu.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#define PA_I82596_RESET 0 /* Offsets relative to LASI-LAN-Addr.*/
#define PA_CPU_PORT_L_ACCESS 4
#define PA_CHANNEL_ATTENTION 8
#define PA_GET_MACADDR 12
#define SWAP32(x) (((uint32_t)(x) << 16) | ((((uint32_t)(x))) >> 16))
static void lasi_82596_mem_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
SysBusI82596State *d = opaque;
trace_lasi_82596_mem_writew(addr, val);
switch (addr) {
case PA_I82596_RESET:
i82596_h_reset(&d->state);
break;
case PA_CPU_PORT_L_ACCESS:
d->val_index++;
if (d->val_index == 0) {
uint32_t v = d->last_val | (val << 16);
v = v & ~0xff;
i82596_ioport_writew(&d->state, d->last_val & 0xff, v);
}
d->last_val = val;
break;
case PA_CHANNEL_ATTENTION:
i82596_ioport_writew(&d->state, PORT_CA, val);
break;
case PA_GET_MACADDR:
/*
* Provided for SeaBIOS only. Write MAC of Network card to addr @val.
* Needed for the PDC_LAN_STATION_ID_READ PDC call.
*/
address_space_rw(&address_space_memory, val,
MEMTXATTRS_UNSPECIFIED, d->state.conf.macaddr.a, ETH_ALEN, 1);
break;
}
}
static uint64_t lasi_82596_mem_read(void *opaque, hwaddr addr,
unsigned size)
{
SysBusI82596State *d = opaque;
uint32_t val;
if (addr == PA_GET_MACADDR) {
val = 0xBEEFBABE;
} else {
val = i82596_ioport_readw(&d->state, addr);
}
trace_lasi_82596_mem_readw(addr, val);
return val;
}
static const MemoryRegionOps lasi_82596_mem_ops = {
.read = lasi_82596_mem_read,
.write = lasi_82596_mem_write,
.endianness = DEVICE_BIG_ENDIAN,
.valid = {
.min_access_size = 4,
.max_access_size = 4,
},
};
static NetClientInfo net_lasi_82596_info = {
.type = NET_CLIENT_DRIVER_NIC,
.size = sizeof(NICState),
.can_receive = i82596_can_receive,
.receive = i82596_receive,
.link_status_changed = i82596_set_link_status,
};
static const VMStateDescription vmstate_lasi_82596 = {
.name = "i82596",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
VMSTATE_STRUCT(state, SysBusI82596State, 0, vmstate_i82596,
I82596State),
VMSTATE_END_OF_LIST()
}
};
static void lasi_82596_realize(DeviceState *dev, Error **errp)
{
SysBusI82596State *d = SYSBUS_I82596(dev);
I82596State *s = &d->state;
memory_region_init_io(&s->mmio, OBJECT(d), &lasi_82596_mem_ops, d,
"lasi_82596-mmio", PA_GET_MACADDR + 4);
i82596_common_init(dev, s, &net_lasi_82596_info);
}
SysBusI82596State *lasi_82596_init(MemoryRegion *addr_space,
hwaddr hpa, qemu_irq lan_irq)
{
DeviceState *dev;
SysBusI82596State *s;
static const MACAddr HP_MAC = {
.a = { 0x08, 0x00, 0x09, 0xef, 0x34, 0xf6 } };
qemu_check_nic_model(&nd_table[0], TYPE_LASI_82596);
dev = qdev_create(NULL, TYPE_LASI_82596);
s = SYSBUS_I82596(dev);
s->state.irq = lan_irq;
qdev_set_nic_properties(dev, &nd_table[0]);
qdev_init_nofail(dev);
s->state.conf.macaddr = HP_MAC; /* set HP MAC prefix */
/* LASI 82596 ports in main memory. */
memory_region_add_subregion(addr_space, hpa, &s->state.mmio);
return s;
}
static void lasi_82596_reset(DeviceState *dev)
{
SysBusI82596State *d = SYSBUS_I82596(dev);
i82596_h_reset(&d->state);
}
static void lasi_82596_instance_init(Object *obj)
{
SysBusI82596State *d = SYSBUS_I82596(obj);
I82596State *s = &d->state;
device_add_bootindex_property(obj, &s->conf.bootindex,
"bootindex", "/ethernet-phy@0",
DEVICE(obj), NULL);
}
static Property lasi_82596_properties[] = {
DEFINE_NIC_PROPERTIES(SysBusI82596State, state.conf),
DEFINE_PROP_END_OF_LIST(),
};
static void lasi_82596_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = lasi_82596_realize;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->fw_name = "ethernet";
dc->reset = lasi_82596_reset;
dc->vmsd = &vmstate_lasi_82596;
dc->user_creatable = false;
device_class_set_props(dc, lasi_82596_properties);
}
static const TypeInfo lasi_82596_info = {
.name = TYPE_LASI_82596,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(SysBusI82596State),
.class_init = lasi_82596_class_init,
.instance_init = lasi_82596_instance_init,
};
static void lasi_82596_register_types(void)
{
type_register_static(&lasi_82596_info);
}
type_init(lasi_82596_register_types)
......@@ -381,3 +381,16 @@ tulip_mii_read(int phy, int reg, uint16_t data) "phy 0x%x, reg 0x%x data 0x%04x"
tulip_reset(void) ""
tulip_setup_frame(void) ""
tulip_setup_filter(int n, uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t e, uint8_t f) "%d: %02x:%02x:%02x:%02x:%02x:%02x"
# lasi_i82596.c
lasi_82596_mem_readw(uint64_t addr, uint32_t ret) "addr=0x%"PRIx64" val=0x%04x"
lasi_82596_mem_writew(uint64_t addr, uint32_t val) "addr=0x%"PRIx64" val=0x%04x"
# i82596.c
i82596_s_reset(void *s) "%p Reset chip"
i82596_transmit(uint32_t size, uint32_t addr) "size %u from addr 0x%04x"
i82596_receive_analysis(const char *s) "%s"
i82596_receive_packet(size_t sz) "len=%zu"
i82596_new_mac(const char *id_with_mac) "New MAC for: %s"
i82596_set_multicast(uint16_t count) "Added %d multicast entries"
i82596_channel_attention(void *s) "%p: Received CHANNEL ATTENTION"
/*
* QEMU LASI i82596 device emulation
*
* Copyright (c) 201 Helge Deller <deller@gmx.de>
*
*/
#ifndef LASI_82596_H
#define LASI_82596_H
#include "net/net.h"
#include "hw/net/i82596.h"
#define TYPE_LASI_82596 "lasi_82596"
#define SYSBUS_I82596(obj) \
OBJECT_CHECK(SysBusI82596State, (obj), TYPE_LASI_82596)
typedef struct {
SysBusDevice parent_obj;
I82596State state;
uint16_t last_val;
int val_index:1;
} SysBusI82596State;
SysBusI82596State *lasi_82596_init(MemoryRegion *addr_space,
hwaddr hpa, qemu_irq irq);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment