qemu/include/hw
Peter Delevoryas 55c57023b7 hw/misc/aspeed: Add PECI controller
This introduces a really basic PECI controller that responses to
commands by always setting the response code to success and then raising
an interrupt to indicate the command is done. This helps avoid getting
hit with constant errors if the driver continuously attempts to send a
command and keeps timing out.

The AST2400 and AST2500 only included registers up to 0x5C, not 0xFC.
They supported PECI 1.1, 2.0, and 3.0. The AST2600 and AST1030 support
PECI 4.0, which includes more read/write buffer registers from 0x80 to
0xFC to support 64-byte mode.

This patch doesn't attempt to handle that, or to create a different
version of the controller for the different generations, since it's only
implementing functionality that is common to all generations.

The basic sequence of events is that the firmware will read and write to
various registers and then trigger a command by setting the FIRE bit in
the command register (similar to the I2C controller).

Then the firmware waits for an interrupt from the PECI controller,
expecting the interrupt status register to be filled in with info on
what happened. If the command was transmitted and received successfully,
then response codes from the host CPU will be found in the data buffer
registers.

Signed-off-by: Peter Delevoryas <pdel@fb.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220630045133.32251-12-me@pjd.dev>
[ clg: s/sysbus_mmio_map/aspeed_mmio_map/ ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-06-30 09:21:14 +02:00
..
acpi hw/acpi/piix4: move PIIX4PMState into separate piix4.h header 2022-06-11 11:44:15 +02:00
adc hw/adc/zynq-xadc: Use qemu_irq typedef 2022-05-19 16:19:02 +01:00
arm hw/misc/aspeed: Add PECI controller 2022-06-30 09:21:14 +02:00
audio introduce -audio as a replacement for -soundhw 2022-05-14 12:33:44 +02:00
block hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA 2022-06-11 11:36:14 +02:00
char hw/riscv: spike: Allow using binary firmware as bios 2022-01-21 15:52:56 +10:00
core hw/core: Move the ARM sysbus-fdt to core 2022-04-29 10:48:26 +10:00
cpu Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
cris hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
cxl pci-bridge/cxl_upstream: Add a CXL switch upstream port 2022-06-16 12:54:57 -04:00
display xlnx_dp: Introduce a vblank signal 2022-06-08 19:38:47 +01:00
dma hw/dma/xlnx_csu_dma: Support starting a read transfer through a class method 2022-01-28 14:29:46 +00:00
firmware hw/smbios: Use qapi for SmbiosEntryPointType 2022-01-07 05:19:55 -05:00
gpio hw/gpio: replace HWADDR_PRIx with PRIx64 2022-05-25 10:31:33 +02:00
hyperv hw/hyperv/vmbus: Remove unused vmbus_load/save_req() 2022-05-30 19:49:42 +02:00
i2c hw/i2c/aspeed: Add new-registers DMA slave mode RX support 2022-06-30 09:21:14 +02:00
i386 hw/i386/pc: Remove orphan declarations 2022-06-11 11:44:50 +02:00
ide ide: Rename ide_bus_new() to ide_bus_init() 2021-09-30 13:44:13 +01:00
input ps2: remove update_irq() function and update_arg parameter 2022-06-26 18:40:12 +01:00
intc hw/intc: Add LoongArch extioi interrupt controller(EIOINTC) 2022-06-06 18:12:30 +00:00
ipack ipack: Rename ipack_bus_new_inplace() to ipack_bus_init() 2021-09-30 13:42:10 +01:00
ipmi Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
isa hw/southbridge/piix: Aggregate all PIIX southbridge type names 2022-06-11 11:44:50 +02:00
kvm target/i386: always create kvmclock device 2020-09-30 19:11:36 +02:00
loongarch hw/loongarch: Add LoongArch ipi interrupt support(IPI) 2022-06-06 18:10:46 +00:00
m68k hw/m68k/mcf: Add missing 'exec/hwaddr.h' header 2022-02-21 10:35:13 +01:00
mem nvdimm: Add realize, unrealize callbacks to NVDIMMDevice class 2022-02-18 08:34:13 +01:00
mips Replace TARGET_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
misc hw/misc/aspeed: Add PECI controller 2022-06-30 09:21:14 +02:00
net Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
nubus Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
nvram hw/nvram: Introduce Xilinx battery-backed ram 2021-09-30 13:42:10 +01:00
pci hw/nvme: Add support for SR-IOV 2022-06-23 23:24:28 +02:00
pci-bridge pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup. 2022-06-09 19:32:49 -04:00
pci-host hw/pci-host/i440fx: Remove unused parameter from i440fx_init() 2022-06-28 11:10:33 +02:00
ppc pseries: allow setting stdout-path even on machines with a VGA 2022-05-26 17:11:32 -03:00
rdma qapi: introduce x-query-rdma QMP command 2021-11-02 15:55:14 +00:00
remote vfio-user: handle device interrupts 2022-06-15 16:43:42 +01:00
riscv Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
rtc hw/rtc/mc146818rtc: QOM'ify io_base offset 2022-06-11 11:44:50 +02:00
rx Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
s390x Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
scsi esp: convert ESPState pdma_cb from a function pointer to an integer 2022-03-09 09:29:10 +00:00
sd hw/sd: add nuvoton MMC 2021-11-02 14:14:55 -04:00
sensor Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
sh4 hw/intc/sh_intc: Inline and drop sh_intc_source() function 2021-10-30 18:39:37 +02:00
southbridge hw/isa/piix3: Inline and remove piix3_create() 2022-06-11 11:44:50 +02:00
sparc hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
ssi Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
timer Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tricore Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
usb Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
vfio vfio/common: Rename VFIOGuestIOMMU::iommu into ::iommu_mr 2022-05-06 09:06:51 -06:00
virtio include/hw/virtio: document vhost_ack_features 2022-06-27 18:53:18 -04:00
watchdog Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
xen hw/i386/xen/xen-hvm: Inline xen_piix_pci_write_config_client() and remove it 2022-06-29 00:24:59 +02:00
xtensa Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
boards.h hw/machine: Drop cxl_supported flag as no longer useful 2022-06-09 19:32:49 -04:00
clock.h host-utils: add 128-bit quotient support to divu128/divs128 2021-10-27 17:10:00 -07:00
elf_ops.h hw/elf_ops: clear uninitialized segment space 2022-01-20 09:09:37 +01:00
fw-path-provider.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
hotplug.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
hw.h compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
ide.h include/hw/ide: Unexport pci_piix3_xen_ide_unplug() 2022-06-09 14:47:42 +01:00
irq.h hw/core/irq: remove unused 'qemu_irq_split' function 2022-04-21 11:37:04 +01:00
loader-fit.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
loader.h hw/core/loader: return image sizes as ssize_t 2022-06-10 09:31:42 +10:00
nmi.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
or-irq.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pcmcia.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
platform-bus.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
ptimer.h ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
qdev-clock.h clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
qdev-core.h qdev: unplug blocker for devices 2022-06-15 14:50:41 +01:00
qdev-dma.h Supply missing header guards 2019-06-12 13:20:21 +02:00
qdev-properties-system.h qdev: Reuse DEFINE_PROP in all DEFINE_PROP_* macros 2020-12-18 15:20:17 -05:00
qdev-properties.h qdev-properties: Add a new macro with bitmask check for uint64_t property 2022-05-14 12:32:41 +02:00
register.h hw/core/register: Add more 64-bit utilities 2021-09-01 11:59:12 +10:00
registerfields.h hw/registerfields: Add shared fields macros 2022-06-22 09:49:34 +02:00
resettable.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
stream.h hw/core/stream: Rename StreamSlave as StreamSink 2020-12-10 12:15:04 -05:00
sysbus.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
usb.h usb: drop usb_host_dev_is_scsi_storage hook 2021-07-09 18:21:33 +02:00
vmstate-if.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00