docs/specs/fw_cfg: Document all architecture register layouts

We implement the fw_cfg device for more architectures and machines
that we let on about in our documentation.  Luckily most of the new
ones (notably riscv and loongarch) have followed the straightforward
layout that the Arm virt board picked.

Restructure the documentation to present this as the "standard"
layout, followed by the other layouts used by various other boards
for historical reasons.  This adds PA-RISC, SPARC, PPC and MIPS.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-id: 20260529174639.451353-2-peter.maydell@linaro.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Peter Maydell
2026-05-29 18:46:35 +01:00
parent da9b86c35f
commit 079466ae92

View File

@@ -84,15 +84,35 @@ increasing address order, similar to memcpy().
Register Locations Register Locations
------------------ ------------------
For a memory-mapped fw_cfg device, the standard register layout is:
* base address : Data Register (64 bit)
* base address + 8 : Selector Register (16 bit)
* base address + 16 : DMA Address Register (64 bit)
Some architectures or machines have a different layout for historical reasons:
x86, x86_64 x86, x86_64
* Selector Register IOport: 0x510 * Selector Register IOport: 0x510
* Data Register IOport: 0x511 * Data Register IOport: 0x511
* DMA Address IOport: 0x514 * DMA Address IOport: 0x514
Arm PA-RISC:
* Selector Register address: Base + 8 (2 bytes) * base address : Selector Register (16 bit)
* Data Register address: Base + 0 (8 bytes) * base address + 4 : Data Register (8 bit)
* DMA Address address: Base + 16 (8 bytes)
32-bit SPARC, PPC ``g3beige``, ``mac99``, ``prep``:
* base address : Selector Register (16 bit)
* base address + 2 : Data Register (8 bit)
64-bit SPARC:
* base address : Selector Register (16 bit)
* base address + 1 : Data Register (8 bit)
MIPS ``loongson3-virt`` machine:
* base address : Selector Register (16 bit)
* base address + 8 : Data Register (64 bit)
ACPI Interface ACPI Interface
-------------- --------------