OSDN Git Service

hw/cxl/device: Implement basic mailbox (8.2.8.4)
authorBen Widawsky <ben.widawsky@intel.com>
Fri, 29 Apr 2022 14:40:31 +0000 (15:40 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 13 May 2022 10:13:36 +0000 (06:13 -0400)
commit464e14ac438e21c532889d78caf54a1dc837012a
tree50bf6a90ef8f69d988dd4092602e3ed6460fc32f
parent6364adacdfa6a24e3f5b08f6b5ffa789a5d828a7
hw/cxl/device: Implement basic mailbox (8.2.8.4)

This is the beginning of implementing mailbox support for CXL 2.0
devices. The implementation recognizes when the doorbell is rung,
handles the command/payload, clears the doorbell while returning error
codes and data.

Generally the mailbox mechanism is designed to permit communication
between the host OS and the firmware running on the device. For our
purposes, we emulate both the firmware, implemented primarily in
cxl-mailbox-utils.c, and the hardware.

No commands are implemented yet.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220429144110.25167-7-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-device-utils.c
hw/cxl/cxl-mailbox-utils.c [new file with mode: 0644]
hw/cxl/meson.build
include/hw/cxl/cxl.h
include/hw/cxl/cxl_device.h