diff options
author | Ninad Palsule <ninad@linux.ibm.com> | 2024-01-26 04:49:49 -0600 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2024-02-01 08:13:30 +0100 |
commit | 6a2897bb5f28944997a0c8410b6d2ee162b9ae98 (patch) | |
tree | 515edd99577ab66287256f93ed4d12f18e3f6d06 /include/hw | |
parent | f4de3ca160c897ed3157ab8f0ad33ed93fe4bfe0 (diff) | |
download | qemu-6a2897bb5f28944997a0c8410b6d2ee162b9ae98.zip qemu-6a2897bb5f28944997a0c8410b6d2ee162b9ae98.tar.gz qemu-6a2897bb5f28944997a0c8410b6d2ee162b9ae98.tar.bz2 |
hw/fsi: Introduce IBM's fsi-slave model
This is a part of patchset where IBM's Flexible Service Interface is
introduced.
The FSI slave: The slave is the terminal point of the FSI bus for
FSI symbols addressed to it. Slaves can be cascaded off of one
another. The slave's configuration registers appear in address space
of the CFAM to which it is attached.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/fsi/fsi.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/hw/fsi/fsi.h b/include/hw/fsi/fsi.h index 50e8f5c..e00f6ef 100644 --- a/include/hw/fsi/fsi.h +++ b/include/hw/fsi/fsi.h @@ -7,7 +7,13 @@ #ifndef FSI_FSI_H #define FSI_FSI_H +#include "exec/memory.h" #include "hw/qdev-core.h" +#include "hw/fsi/lbus.h" +#include "qemu/bitops.h" + +/* Bitwise operations at the word level. */ +#define BE_GENMASK(hb, lb) MAKE_64BIT_MASK((lb), ((hb) - (lb) + 1)) #define TYPE_FSI_BUS "fsi.bus" OBJECT_DECLARE_SIMPLE_TYPE(FSIBus, FSI_BUS) @@ -16,4 +22,16 @@ typedef struct FSIBus { BusState bus; } FSIBus; +#define TYPE_FSI_SLAVE "fsi.slave" +OBJECT_DECLARE_SIMPLE_TYPE(FSISlaveState, FSI_SLAVE) + +#define FSI_SLAVE_CONTROL_NR_REGS ((0x40 >> 2) + 1) + +typedef struct FSISlaveState { + DeviceState parent; + + MemoryRegion iomem; + uint32_t regs[FSI_SLAVE_CONTROL_NR_REGS]; +} FSISlaveState; + #endif /* FSI_FSI_H */ |