1Aspeed family boards (``ast2500-evb``, ``ast2600-evb``, ``ast2700-evb``, ``bletchley-bmc``, ``fuji-bmc``, ``fby35-bmc``, ``fp5280g2-bmc``, ``g220a-bmc``, ``palmetto-bmc``, ``qcom-dc-scm-v1-bmc``, ``qcom-firework-bmc``, ``quanta-q71l-bmc``, ``rainier-bmc``, ``romulus-bmc``, ``sonorapass-bmc``, ``supermicrox11-bmc``, ``supermicrox11spi-bmc``, ``tiogapass-bmc``, ``tacoma-bmc``, ``witherspoon-bmc``, ``yosemitev2-bmc``) 2================================================================================================================================================================================================================================================================================================================================================================================================================================== 3 4The QEMU Aspeed machines model BMCs of various OpenPOWER systems and 5Aspeed evaluation boards. They are based on different releases of the 6Aspeed SoC : the AST2400 integrating an ARM926EJ-S CPU (400MHz), the 7AST2500 with an ARM1176JZS CPU (800MHz), the AST2600 8with dual cores ARM Cortex-A7 CPUs (1.2GHz) and more recently the AST2700 9with quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz) 10 11The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C, 12etc. 13 14AST2400 SoC based machines : 15 16- ``palmetto-bmc`` OpenPOWER Palmetto POWER8 BMC 17- ``quanta-q71l-bmc`` OpenBMC Quanta BMC 18- ``supermicrox11-bmc`` Supermicro X11 BMC (ARM926EJ-S) 19- ``supermicrox11spi-bmc`` Supermicro X11 SPI BMC (ARM1176) 20 21AST2500 SoC based machines : 22 23- ``ast2500-evb`` Aspeed AST2500 Evaluation board 24- ``romulus-bmc`` OpenPOWER Romulus POWER9 BMC 25- ``witherspoon-bmc`` OpenPOWER Witherspoon POWER9 BMC 26- ``sonorapass-bmc`` OCP SonoraPass BMC 27- ``fp5280g2-bmc`` Inspur FP5280G2 BMC 28- ``g220a-bmc`` Bytedance G220A BMC 29- ``yosemitev2-bmc`` Facebook YosemiteV2 BMC 30- ``tiogapass-bmc`` Facebook Tiogapass BMC 31 32AST2600 SoC based machines : 33 34- ``ast2600-evb`` Aspeed AST2600 Evaluation board (Cortex-A7) 35- ``tacoma-bmc`` OpenPOWER Witherspoon POWER9 AST2600 BMC 36- ``rainier-bmc`` IBM Rainier POWER10 BMC 37- ``fuji-bmc`` Facebook Fuji BMC 38- ``bletchley-bmc`` Facebook Bletchley BMC 39- ``fby35-bmc`` Facebook fby35 BMC 40- ``qcom-dc-scm-v1-bmc`` Qualcomm DC-SCM V1 BMC 41- ``qcom-firework-bmc`` Qualcomm Firework BMC 42 43AST2700 SoC based machines : 44 45- ``ast2700-evb`` Aspeed AST2700 Evaluation board (Cortex-A35) 46 47Supported devices 48----------------- 49 50 * SMP (for the AST2600 Cortex-A7) 51 * Interrupt Controller (VIC) 52 * Timer Controller 53 * RTC Controller 54 * I2C Controller, including the new register interface of the AST2600 55 * System Control Unit (SCU) 56 * SRAM mapping 57 * X-DMA Controller (basic interface) 58 * Static Memory Controller (SMC or FMC) - Only SPI Flash support 59 * SPI Memory Controller 60 * USB 2.0 Controller 61 * SD/MMC storage controllers 62 * SDRAM controller (dummy interface for basic settings and training) 63 * Watchdog Controller 64 * GPIO Controller (Master only) 65 * UART 66 * Ethernet controllers 67 * Front LEDs (PCA9552 on I2C bus) 68 * LPC Peripheral Controller (a subset of subdevices are supported) 69 * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA 70 * ADC 71 * Secure Boot Controller (AST2600) 72 * eMMC Boot Controller (dummy) 73 * PECI Controller (minimal) 74 * I3C Controller 75 * Internal Bridge Controller (SLI dummy) 76 77 78Missing devices 79--------------- 80 81 * Coprocessor support 82 * PWM and Fan Controller 83 * Slave GPIO Controller 84 * Super I/O Controller 85 * PCI-Express 1 Controller 86 * Graphic Display Controller 87 * MCTP Controller 88 * Mailbox Controller 89 * Virtual UART 90 * eSPI Controller 91 92Boot options 93------------ 94 95The Aspeed machines can be started using the ``-kernel`` and ``-dtb`` options 96to load a Linux kernel or from a firmware. Images can be downloaded from the 97OpenBMC jenkins : 98 99 https://jenkins.openbmc.org/job/ci-openbmc/lastSuccessfulBuild/ 100 101or directly from the OpenBMC GitHub release repository : 102 103 https://github.com/openbmc/openbmc/releases 104 105or directly from the ASPEED Forked OpenBMC GitHub release repository : 106 107 https://github.com/AspeedTech-BMC/openbmc/releases 108 109Booting from a kernel image 110^^^^^^^^^^^^^^^^^^^^^^^^^^^ 111 112To boot a kernel directly from a Linux build tree: 113 114.. code-block:: bash 115 116 $ qemu-system-arm -M ast2600-evb -nographic \ 117 -kernel arch/arm/boot/zImage \ 118 -dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \ 119 -initrd rootfs.cpio 120 121Booting from a flash image 122^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123 124The machine options specific to Aspeed to boot from a flash image are : 125 126 * ``execute-in-place`` which emulates the boot from the CE0 flash 127 device by using the FMC controller to load the instructions, and 128 not simply from RAM. This takes a little longer. 129 130 * ``fmc-model`` to change the default FMC Flash model. FW needs 131 support for the chip model to boot. 132 133 * ``spi-model`` to change the default SPI Flash model. 134 135To boot the machine from the flash image, use an MTD drive : 136 137.. code-block:: bash 138 139 $ qemu-system-arm -M romulus-bmc -nic user \ 140 -drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd -nographic 141 142To use other flash models, for instance a different FMC chip and a 143bigger (64M) SPI for the ``ast2500-evb`` machine, run : 144 145.. code-block:: bash 146 147 -M ast2500-evb,fmc-model=mx25l25635e,spi-model=mx66u51235f 148 149When more flexibility is needed to define the flash devices, to use 150different flash models or define all flash devices (up to 8), the 151``-nodefaults`` QEMU option can be used to avoid creating the default 152flash devices. 153 154Flash devices should then be created from the command line and attached 155to a block device : 156 157.. code-block:: bash 158 159 $ qemu-system-arm -M ast2600-evb \ 160 -blockdev node-name=fmc0,driver=file,filename=/path/to/fmc0.img \ 161 -device mx66u51235f,bus=ssi.0,cs=0x0,drive=fmc0 \ 162 -blockdev node-name=fmc1,driver=file,filename=/path/to/fmc1.img \ 163 -device mx66u51235f,bus=ssi.0,cs=0x1,drive=fmc1 \ 164 -blockdev node-name=spi1,driver=file,filename=/path/to/spi1.img \ 165 -device mx66u51235f,cs=0x0,bus=ssi.1,drive=spi1 \ 166 -nographic -nodefaults 167 168In that case, the machine boots fetching instructions from the FMC0 169device. It is slower to start but closer to what HW does. Using the 170machine option ``execute-in-place`` has a similar effect. 171 172Booting from an eMMC image 173^^^^^^^^^^^^^^^^^^^^^^^^^^ 174 175The machine options specific to Aspeed machines to boot from an eMMC 176image are : 177 178 * ``boot-emmc`` to set or unset boot from eMMC (AST2600). 179 180Only the ``ast2600-evb`` and ``rainier-emmc`` machines have support to 181boot from an eMMC device. In this case, the machine assumes that the 182eMMC image includes special boot partitions. Such an image can be 183built this way : 184 185.. code-block:: bash 186 187 $ dd if=/dev/zero of=mmc-bootarea.img count=2 bs=1M 188 $ dd if=u-boot-spl.bin of=mmc-bootarea.img conv=notrunc 189 $ dd if=u-boot.bin of=mmc-bootarea.img conv=notrunc count=64 bs=1K 190 $ cat mmc-bootarea.img obmc-phosphor-image.wic > mmc.img 191 $ truncate --size 16GB mmc.img 192 193Boot the machine ``rainier-emmc`` with : 194 195.. code-block:: bash 196 197 $ qemu-system-arm -M rainier-bmc \ 198 -drive file=mmc.img,format=raw,if=sd,index=2 \ 199 -nographic 200 201The ``boot-emmc`` option can be set or unset, to change the default 202boot mode of machine: SPI or eMMC. This can be useful to boot the 203``ast2600-evb`` machine from an eMMC device (default being SPI) or to 204boot the ``rainier-bmc`` machine from a flash device (default being 205eMMC). 206 207As an example, here is how to to boot the ``rainier-bmc`` machine from 208the flash device with ``boot-emmc=false`` and let the machine use an 209eMMC image : 210 211.. code-block:: bash 212 213 $ qemu-system-arm -M rainier-bmc,boot-emmc=false \ 214 -drive file=flash.img,format=raw,if=mtd \ 215 -drive file=mmc.img,format=raw,if=sd,index=2 \ 216 -nographic 217 218It should be noted that in this case the eMMC device must not have 219boot partitions, otherwise the contents will not be accessible to the 220machine. This limitation is due to the use of the ``-drive`` 221interface. 222 223Ideally, one should be able to define the eMMC device and the 224associated backend directly on the command line, such as : 225 226.. code-block:: bash 227 228 -blockdev node-name=emmc0,driver=file,filename=mmc.img \ 229 -device emmc,bus=sdhci-bus.2,drive=emmc0,boot-partition-size=1048576,boot-config=8 230 231This is not yet supported (as of QEMU-10.0). Work is needed to 232refactor the sdhci bus model. 233 234Other booting options 235^^^^^^^^^^^^^^^^^^^^^ 236 237Other machine options specific to Aspeed machines are : 238 239 * ``bmc-console`` to change the default console device. Most of the 240 machines use the ``UART5`` device for a boot console, which is 241 mapped on ``/dev/ttyS4`` under Linux, but it is not always the 242 case. 243 244To change the boot console and use device ``UART3`` (``/dev/ttyS2`` 245under Linux), use : 246 247.. code-block:: bash 248 249 -M ast2500-evb,bmc-console=uart3 250 251Booting the ast2700-evb machine 252^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 253 254Boot the AST2700 machine from the flash image, use an MTD drive : 255 256.. code-block:: bash 257 258 IMGDIR=ast2700-default 259 UBOOT_SIZE=$(stat --format=%s -L ${IMGDIR}/u-boot-nodtb.bin) 260 261 $ qemu-system-aarch64 -M ast2700-evb \ 262 -device loader,force-raw=on,addr=0x400000000,file=${IMGDIR}/u-boot-nodtb.bin \ 263 -device loader,force-raw=on,addr=$((0x400000000 + ${UBOOT_SIZE})),file=${IMGDIR}/u-boot.dtb \ 264 -device loader,force-raw=on,addr=0x430000000,file=${IMGDIR}/bl31.bin \ 265 -device loader,force-raw=on,addr=0x430080000,file=${IMGDIR}/optee/tee-raw.bin \ 266 -device loader,cpu-num=0,addr=0x430000000 \ 267 -device loader,cpu-num=1,addr=0x430000000 \ 268 -device loader,cpu-num=2,addr=0x430000000 \ 269 -device loader,cpu-num=3,addr=0x430000000 \ 270 -smp 4 \ 271 -drive file=${IMGDIR}/image-bmc,format=raw,if=mtd \ 272 -nographic 273 274Aspeed minibmc family boards (``ast1030-evb``) 275================================================================== 276 277The QEMU Aspeed machines model mini BMCs of various Aspeed evaluation 278boards. They are based on different releases of the 279Aspeed SoC : the AST1030 integrating an ARM Cortex M4F CPU (200MHz). 280 281The SoC comes with SRAM, SPI, I2C, etc. 282 283AST1030 SoC based machines : 284 285- ``ast1030-evb`` Aspeed AST1030 Evaluation board (Cortex-M4F) 286 287Supported devices 288----------------- 289 290 * SMP (for the AST1030 Cortex-M4F) 291 * Interrupt Controller (VIC) 292 * Timer Controller 293 * I2C Controller 294 * System Control Unit (SCU) 295 * SRAM mapping 296 * Static Memory Controller (SMC or FMC) - Only SPI Flash support 297 * SPI Memory Controller 298 * USB 2.0 Controller 299 * Watchdog Controller 300 * GPIO Controller (Master only) 301 * UART 302 * LPC Peripheral Controller (a subset of subdevices are supported) 303 * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA 304 * ADC 305 * Secure Boot Controller 306 * PECI Controller (minimal) 307 308 309Missing devices 310--------------- 311 312 * PWM and Fan Controller 313 * Slave GPIO Controller 314 * Mailbox Controller 315 * Virtual UART 316 * eSPI Controller 317 * I3C Controller 318 319Boot options 320------------ 321 322The Aspeed machines can be started using the ``-kernel`` to load a 323Zephyr OS or from a firmware. Images can be downloaded from the 324ASPEED GitHub release repository : 325 326 https://github.com/AspeedTech-BMC/zephyr/releases 327 328To boot a kernel directly from a Zephyr build tree: 329 330.. code-block:: bash 331 332 $ qemu-system-arm -M ast1030-evb -nographic \ 333 -kernel zephyr.elf 334