Merge pull request #658 from richardg867/master

Move the PIIX4 SMBus interface to its own file
This commit is contained in:
OBattler
2020-04-01 00:13:13 +02:00
committed by GitHub
5 changed files with 304 additions and 178 deletions

View File

@@ -0,0 +1,43 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Definitions for the generic PIIX4-compatible SMBus host controller.
*
*
*
* Authors: RichardG, <richardg867@gmail.com>
*
* Copyright 2020 RichardG.
*/
#ifndef EMU_SMBUS_PIIX4_H
# define EMU_SMBUS_PIIX4_H
#define SMBUS_PIIX4_BLOCK_DATA_SIZE 32
typedef struct
{
uint16_t io_base;
uint8_t stat, next_stat, ctl, cmd, addr,
data0, data1,
index,
data[SMBUS_PIIX4_BLOCK_DATA_SIZE];
pc_timer_t response_timer;
} smbus_piix4_t;
extern void smbus_piix4_remap(smbus_piix4_t *dev, uint16_t new_io_base, uint8_t enable);
#ifdef EMU_DEVICE_H
extern const device_t piix4_smbus_device;
#endif
#endif /*EMU_SMBUS_PIIX4_H*/