qemu/include/hw/fsi/fsi.h
Ninad Palsule 6a2897bb5f 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>
2024-02-01 08:13:30 +01:00

38 lines
812 B
C

/*
* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright (C) 2024 IBM Corp.
*
* IBM Flexible Service Interface
*/
#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)
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 */