@samitouri / QOSamiQemu / commits / 079466ae92

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>

Peter Maydell committed May 29, 2026 at 18:46 UTC 079466ae92ccf3206f6a7a939ff40aef04d8424e
1 file changed +24 -4
docs/specs/fw_cfg.rst
+24 -4
@@ -84,15 +84,35 @@ increasing address order, similar to memcpy().
84 Register Locations
85 ------------------
86
87 +For a memory-mapped fw_cfg device, the standard register layout is:
88 +
89 + * base address : Data Register (64 bit)
90 + * base address + 8 : Selector Register (16 bit)
91 + * base address + 16 : DMA Address Register (64 bit)
92 +
93 +Some architectures or machines have a different layout for historical reasons:
94 +
95 x86, x86_64
96 * Selector Register IOport: 0x510
97 * Data Register IOport: 0x511
98 * DMA Address IOport: 0x514
99
92 -Arm
93 - * Selector Register address: Base + 8 (2 bytes)
94 - * Data Register address: Base + 0 (8 bytes)
95 - * DMA Address address: Base + 16 (8 bytes)
100 +PA-RISC:
101 + * base address : Selector Register (16 bit)
102 + * base address + 4 : Data Register (8 bit)
103 +
104 +32-bit SPARC, PPC ``g3beige``, ``mac99``, ``prep``:
105 + * base address : Selector Register (16 bit)
106 + * base address + 2 : Data Register (8 bit)
107 +
108 +64-bit SPARC:
109 + * base address : Selector Register (16 bit)
110 + * base address + 1 : Data Register (8 bit)
111 +
112 +MIPS ``loongson3-virt`` machine:
113 + * base address : Selector Register (16 bit)
114 + * base address + 8 : Data Register (64 bit)
115 +
116
117 ACPI Interface
118 --------------