1*8eaea401SSteven LeeAspeed 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``, ``witherspoon-bmc``, ``yosemitev2-bmc``) 2f32ef57fSSteven Lee================================================================================================================================================================================================================================================================================================================================================================================================================================= 37a1e049aSCédric Le Goater 47a1e049aSCédric Le GoaterThe QEMU Aspeed machines model BMCs of various OpenPOWER systems and 57a1e049aSCédric Le GoaterAspeed evaluation boards. They are based on different releases of the 67a1e049aSCédric Le GoaterAspeed SoC : the AST2400 integrating an ARM926EJ-S CPU (400MHz), the 7b3e8223eSJamin LinAST2500 with an ARM1176JZS CPU (800MHz), the AST2600 83eb01cfeSJamin Linwith dual cores ARM Cortex-A7 CPUs (1.2GHz). 97a1e049aSCédric Le Goater 107a1e049aSCédric Le GoaterThe SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C, 117a1e049aSCédric Le Goateretc. 127a1e049aSCédric Le Goater 137a1e049aSCédric Le GoaterAST2400 SoC based machines : 147a1e049aSCédric Le Goater 157a1e049aSCédric Le Goater- ``palmetto-bmc`` OpenPOWER Palmetto POWER8 BMC 1671f5027fSPatrick Venture- ``quanta-q71l-bmc`` OpenBMC Quanta BMC 17d8790eadSPierrick Bouvier- ``supermicrox11-bmc`` Supermicro X11 BMC (ARM926EJ-S) 18d8790eadSPierrick Bouvier- ``supermicrox11spi-bmc`` Supermicro X11 SPI BMC (ARM1176) 197a1e049aSCédric Le Goater 207a1e049aSCédric Le GoaterAST2500 SoC based machines : 217a1e049aSCédric Le Goater 227a1e049aSCédric Le Goater- ``ast2500-evb`` Aspeed AST2500 Evaluation board 237a1e049aSCédric Le Goater- ``romulus-bmc`` OpenPOWER Romulus POWER9 BMC 247a1e049aSCédric Le Goater- ``witherspoon-bmc`` OpenPOWER Witherspoon POWER9 BMC 257a1e049aSCédric Le Goater- ``sonorapass-bmc`` OCP SonoraPass BMC 260b052414SJoel Stanley- ``fp5280g2-bmc`` Inspur FP5280G2 BMC 270b052414SJoel Stanley- ``g220a-bmc`` Bytedance G220A BMC 2834f73a81SKarthikeyan Pasupathi- ``yosemitev2-bmc`` Facebook YosemiteV2 BMC 296c323abaSKarthikeyan Pasupathi- ``tiogapass-bmc`` Facebook Tiogapass BMC 307a1e049aSCédric Le Goater 317a1e049aSCédric Le GoaterAST2600 SoC based machines : 327a1e049aSCédric Le Goater 33f548f201SPeter Maydell- ``ast2600-evb`` Aspeed AST2600 Evaluation board (Cortex-A7) 340b052414SJoel Stanley- ``rainier-bmc`` IBM Rainier POWER10 BMC 350b052414SJoel Stanley- ``fuji-bmc`` Facebook Fuji BMC 361d6fb3d0SCédric Le Goater- ``bletchley-bmc`` Facebook Bletchley BMC 37264a360aSPeter Delevoryas- ``fby35-bmc`` Facebook fby35 BMC 381d6fb3d0SCédric Le Goater- ``qcom-dc-scm-v1-bmc`` Qualcomm DC-SCM V1 BMC 391d6fb3d0SCédric Le Goater- ``qcom-firework-bmc`` Qualcomm Firework BMC 407a1e049aSCédric Le Goater 417a1e049aSCédric Le GoaterSupported devices 427a1e049aSCédric Le Goater----------------- 437a1e049aSCédric Le Goater 447a1e049aSCédric Le Goater * SMP (for the AST2600 Cortex-A7) 457a1e049aSCédric Le Goater * Interrupt Controller (VIC) 467a1e049aSCédric Le Goater * Timer Controller 477a1e049aSCédric Le Goater * RTC Controller 481d6fb3d0SCédric Le Goater * I2C Controller, including the new register interface of the AST2600 497a1e049aSCédric Le Goater * System Control Unit (SCU) 507a1e049aSCédric Le Goater * SRAM mapping 517a1e049aSCédric Le Goater * X-DMA Controller (basic interface) 527a1e049aSCédric Le Goater * Static Memory Controller (SMC or FMC) - Only SPI Flash support 537a1e049aSCédric Le Goater * SPI Memory Controller 547a1e049aSCédric Le Goater * USB 2.0 Controller 557a1e049aSCédric Le Goater * SD/MMC storage controllers 567a1e049aSCédric Le Goater * SDRAM controller (dummy interface for basic settings and training) 577a1e049aSCédric Le Goater * Watchdog Controller 587a1e049aSCédric Le Goater * GPIO Controller (Master only) 597a1e049aSCédric Le Goater * UART 607a1e049aSCédric Le Goater * Ethernet controllers 6112bff81bSPhilippe Mathieu-Daudé * Front LEDs (PCA9552 on I2C bus) 622ecf1726SCédric Le Goater * LPC Peripheral Controller (a subset of subdevices are supported) 63c5475b3fSJoel Stanley * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA 64b662fac6SJoel Stanley * ADC 651d6fb3d0SCédric Le Goater * Secure Boot Controller (AST2600) 661d6fb3d0SCédric Le Goater * eMMC Boot Controller (dummy) 671d6fb3d0SCédric Le Goater * PECI Controller (minimal) 681d6fb3d0SCédric Le Goater * I3C Controller 69b3e8223eSJamin Lin * Internal Bridge Controller (SLI dummy) 707a1e049aSCédric Le Goater 717a1e049aSCédric Le Goater 727a1e049aSCédric Le GoaterMissing devices 737a1e049aSCédric Le Goater--------------- 747a1e049aSCédric Le Goater 757a1e049aSCédric Le Goater * Coprocessor support 767a1e049aSCédric Le Goater * PWM and Fan Controller 777a1e049aSCédric Le Goater * Slave GPIO Controller 787a1e049aSCédric Le Goater * Super I/O Controller 797a1e049aSCédric Le Goater * PCI-Express 1 Controller 807a1e049aSCédric Le Goater * Graphic Display Controller 817a1e049aSCédric Le Goater * MCTP Controller 827a1e049aSCédric Le Goater * Mailbox Controller 837a1e049aSCédric Le Goater * Virtual UART 847a1e049aSCédric Le Goater * eSPI Controller 857a1e049aSCédric Le Goater 867a1e049aSCédric Le GoaterBoot options 877a1e049aSCédric Le Goater------------ 887a1e049aSCédric Le Goater 899d5dcb85SJoel StanleyThe Aspeed machines can be started using the ``-kernel`` and ``-dtb`` options 909d5dcb85SJoel Stanleyto load a Linux kernel or from a firmware. Images can be downloaded from the 919d5dcb85SJoel StanleyOpenBMC jenkins : 927a1e049aSCédric Le Goater 9338b1ed6cSJoel Stanley https://jenkins.openbmc.org/job/ci-openbmc/lastSuccessfulBuild/ 94d029c729SCédric Le Goater 95d029c729SCédric Le Goateror directly from the OpenBMC GitHub release repository : 96d029c729SCédric Le Goater 97d029c729SCédric Le Goater https://github.com/openbmc/openbmc/releases 987a1e049aSCédric Le Goater 99b3e8223eSJamin Linor directly from the ASPEED Forked OpenBMC GitHub release repository : 100b3e8223eSJamin Lin 101b3e8223eSJamin Lin https://github.com/AspeedTech-BMC/openbmc/releases 102b3e8223eSJamin Lin 1039b0a3649SCédric Le GoaterBooting from a kernel image 1049b0a3649SCédric Le Goater^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1059b0a3649SCédric Le Goater 1069d5dcb85SJoel StanleyTo boot a kernel directly from a Linux build tree: 1079d5dcb85SJoel Stanley 1089d5dcb85SJoel Stanley.. code-block:: bash 1099d5dcb85SJoel Stanley 1109d5dcb85SJoel Stanley $ qemu-system-arm -M ast2600-evb -nographic \ 1119d5dcb85SJoel Stanley -kernel arch/arm/boot/zImage \ 1129d5dcb85SJoel Stanley -dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \ 1139d5dcb85SJoel Stanley -initrd rootfs.cpio 1149d5dcb85SJoel Stanley 1159b0a3649SCédric Le GoaterBooting from a flash image 1169b0a3649SCédric Le Goater^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1177a1e049aSCédric Le Goater 1189b0a3649SCédric Le GoaterThe machine options specific to Aspeed to boot from a flash image are : 119056b779eSCédric Le Goater 1209820e52fSCédric Le Goater * ``execute-in-place`` which emulates the boot from the CE0 flash 1219820e52fSCédric Le Goater device by using the FMC controller to load the instructions, and 1229820e52fSCédric Le Goater not simply from RAM. This takes a little longer. 1239820e52fSCédric Le Goater 124c7e313aeSCédric Le Goater * ``fmc-model`` to change the default FMC Flash model. FW needs 125c7e313aeSCédric Le Goater support for the chip model to boot. 1269820e52fSCédric Le Goater 127c7e313aeSCédric Le Goater * ``spi-model`` to change the default SPI Flash model. 1289820e52fSCédric Le Goater 1299b0a3649SCédric Le GoaterTo boot the machine from the flash image, use an MTD drive : 1309b0a3649SCédric Le Goater 1319b0a3649SCédric Le Goater.. code-block:: bash 1329b0a3649SCédric Le Goater 1339b0a3649SCédric Le Goater $ qemu-system-arm -M romulus-bmc -nic user \ 1349b0a3649SCédric Le Goater -drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd -nographic 135f65f6ad5SCédric Le Goater 136c7e313aeSCédric Le GoaterTo use other flash models, for instance a different FMC chip and a 137c7e313aeSCédric Le Goaterbigger (64M) SPI for the ``ast2500-evb`` machine, run : 1389820e52fSCédric Le Goater 1399820e52fSCédric Le Goater.. code-block:: bash 1409820e52fSCédric Le Goater 1419820e52fSCédric Le Goater -M ast2500-evb,fmc-model=mx25l25635e,spi-model=mx66u51235f 1423d393bb7SJamin Lin 143c7e313aeSCédric Le GoaterWhen more flexibility is needed to define the flash devices, to use 144c7e313aeSCédric Le Goaterdifferent flash models or define all flash devices (up to 8), the 145c7e313aeSCédric Le Goater``-nodefaults`` QEMU option can be used to avoid creating the default 146c7e313aeSCédric Le Goaterflash devices. 147c7e313aeSCédric Le Goater 148c7e313aeSCédric Le GoaterFlash devices should then be created from the command line and attached 149c7e313aeSCédric Le Goaterto a block device : 150c7e313aeSCédric Le Goater 151c7e313aeSCédric Le Goater.. code-block:: bash 152c7e313aeSCédric Le Goater 153c7e313aeSCédric Le Goater $ qemu-system-arm -M ast2600-evb \ 154c7e313aeSCédric Le Goater -blockdev node-name=fmc0,driver=file,filename=/path/to/fmc0.img \ 155c7e313aeSCédric Le Goater -device mx66u51235f,bus=ssi.0,cs=0x0,drive=fmc0 \ 156c7e313aeSCédric Le Goater -blockdev node-name=fmc1,driver=file,filename=/path/to/fmc1.img \ 157c7e313aeSCédric Le Goater -device mx66u51235f,bus=ssi.0,cs=0x1,drive=fmc1 \ 158c7e313aeSCédric Le Goater -blockdev node-name=spi1,driver=file,filename=/path/to/spi1.img \ 159c7e313aeSCédric Le Goater -device mx66u51235f,cs=0x0,bus=ssi.1,drive=spi1 \ 160c7e313aeSCédric Le Goater -nographic -nodefaults 161c7e313aeSCédric Le Goater 162c7e313aeSCédric Le GoaterIn that case, the machine boots fetching instructions from the FMC0 163c7e313aeSCédric Le Goaterdevice. It is slower to start but closer to what HW does. Using the 164c7e313aeSCédric Le Goatermachine option ``execute-in-place`` has a similar effect. 165c7e313aeSCédric Le Goater 1669b0a3649SCédric Le GoaterBooting from an eMMC image 1679b0a3649SCédric Le Goater^^^^^^^^^^^^^^^^^^^^^^^^^^ 1689b0a3649SCédric Le Goater 1699b0a3649SCédric Le GoaterThe machine options specific to Aspeed machines to boot from an eMMC 1709b0a3649SCédric Le Goaterimage are : 1719b0a3649SCédric Le Goater 1729b0a3649SCédric Le Goater * ``boot-emmc`` to set or unset boot from eMMC (AST2600). 1739b0a3649SCédric Le Goater 1749b0a3649SCédric Le GoaterOnly the ``ast2600-evb`` and ``rainier-emmc`` machines have support to 1759b0a3649SCédric Le Goaterboot from an eMMC device. In this case, the machine assumes that the 1769b0a3649SCédric Le GoatereMMC image includes special boot partitions. Such an image can be 1779b0a3649SCédric Le Goaterbuilt this way : 1789b0a3649SCédric Le Goater 1799b0a3649SCédric Le Goater.. code-block:: bash 1809b0a3649SCédric Le Goater 1819b0a3649SCédric Le Goater $ dd if=/dev/zero of=mmc-bootarea.img count=2 bs=1M 1829b0a3649SCédric Le Goater $ dd if=u-boot-spl.bin of=mmc-bootarea.img conv=notrunc 1839b0a3649SCédric Le Goater $ dd if=u-boot.bin of=mmc-bootarea.img conv=notrunc count=64 bs=1K 1849b0a3649SCédric Le Goater $ cat mmc-bootarea.img obmc-phosphor-image.wic > mmc.img 1859b0a3649SCédric Le Goater $ truncate --size 16GB mmc.img 1869b0a3649SCédric Le Goater 1879b0a3649SCédric Le GoaterBoot the machine ``rainier-emmc`` with : 1889b0a3649SCédric Le Goater 1899b0a3649SCédric Le Goater.. code-block:: bash 1909b0a3649SCédric Le Goater 1919b0a3649SCédric Le Goater $ qemu-system-arm -M rainier-bmc \ 1929b0a3649SCédric Le Goater -drive file=mmc.img,format=raw,if=sd,index=2 \ 1939b0a3649SCédric Le Goater -nographic 1949b0a3649SCédric Le Goater 1959b0a3649SCédric Le GoaterThe ``boot-emmc`` option can be set or unset, to change the default 1969b0a3649SCédric Le Goaterboot mode of machine: SPI or eMMC. This can be useful to boot the 1979b0a3649SCédric Le Goater``ast2600-evb`` machine from an eMMC device (default being SPI) or to 1989b0a3649SCédric Le Goaterboot the ``rainier-bmc`` machine from a flash device (default being 1999b0a3649SCédric Le GoatereMMC). 2009b0a3649SCédric Le Goater 2019b0a3649SCédric Le GoaterAs an example, here is how to to boot the ``rainier-bmc`` machine from 2029b0a3649SCédric Le Goaterthe flash device with ``boot-emmc=false`` and let the machine use an 2039b0a3649SCédric Le GoatereMMC image : 2049b0a3649SCédric Le Goater 2059b0a3649SCédric Le Goater.. code-block:: bash 2069b0a3649SCédric Le Goater 2079b0a3649SCédric Le Goater $ qemu-system-arm -M rainier-bmc,boot-emmc=false \ 2089b0a3649SCédric Le Goater -drive file=flash.img,format=raw,if=mtd \ 2099b0a3649SCédric Le Goater -drive file=mmc.img,format=raw,if=sd,index=2 \ 2109b0a3649SCédric Le Goater -nographic 2119b0a3649SCédric Le Goater 2129b0a3649SCédric Le GoaterIt should be noted that in this case the eMMC device must not have 2139b0a3649SCédric Le Goaterboot partitions, otherwise the contents will not be accessible to the 2149b0a3649SCédric Le Goatermachine. This limitation is due to the use of the ``-drive`` 2159b0a3649SCédric Le Goaterinterface. 2169b0a3649SCédric Le Goater 2179b0a3649SCédric Le GoaterIdeally, one should be able to define the eMMC device and the 2189b0a3649SCédric Le Goaterassociated backend directly on the command line, such as : 2199b0a3649SCédric Le Goater 2209b0a3649SCédric Le Goater.. code-block:: bash 2219b0a3649SCédric Le Goater 2229b0a3649SCédric Le Goater -blockdev node-name=emmc0,driver=file,filename=mmc.img \ 2239b0a3649SCédric Le Goater -device emmc,bus=sdhci-bus.2,drive=emmc0,boot-partition-size=1048576,boot-config=8 2249b0a3649SCédric Le Goater 2259b0a3649SCédric Le GoaterThis is not yet supported (as of QEMU-10.0). Work is needed to 2269b0a3649SCédric Le Goaterrefactor the sdhci bus model. 2279b0a3649SCédric Le Goater 2289b0a3649SCédric Le GoaterOther booting options 2299b0a3649SCédric Le Goater^^^^^^^^^^^^^^^^^^^^^ 2309b0a3649SCédric Le Goater 2319b0a3649SCédric Le GoaterOther machine options specific to Aspeed machines are : 2329b0a3649SCédric Le Goater 2339b0a3649SCédric Le Goater * ``bmc-console`` to change the default console device. Most of the 2349b0a3649SCédric Le Goater machines use the ``UART5`` device for a boot console, which is 2359b0a3649SCédric Le Goater mapped on ``/dev/ttyS4`` under Linux, but it is not always the 2369b0a3649SCédric Le Goater case. 2379b0a3649SCédric Le Goater 238f65f6ad5SCédric Le GoaterTo change the boot console and use device ``UART3`` (``/dev/ttyS2`` 239f65f6ad5SCédric Le Goaterunder Linux), use : 240f65f6ad5SCédric Le Goater 241f65f6ad5SCédric Le Goater.. code-block:: bash 242f65f6ad5SCédric Le Goater 243f65f6ad5SCédric Le Goater -M ast2500-evb,bmc-console=uart3 2443d393bb7SJamin Lin 2453eb01cfeSJamin LinAspeed 2700 family boards (``ast2700-evb``) 2463eb01cfeSJamin Lin================================================================== 2473eb01cfeSJamin Lin 2483eb01cfeSJamin LinThe QEMU Aspeed machines model BMCs of Aspeed evaluation boards. 2493eb01cfeSJamin LinThey are based on different releases of the Aspeed SoC : 2503eb01cfeSJamin Linthe AST2700 with quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz). 2513eb01cfeSJamin Lin 2523eb01cfeSJamin LinThe SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C, 2533eb01cfeSJamin Linetc. 2543eb01cfeSJamin Lin 2553eb01cfeSJamin LinAST2700 SoC based machines : 2563eb01cfeSJamin Lin 2573eb01cfeSJamin Lin- ``ast2700-evb`` Aspeed AST2700 Evaluation board (Cortex-A35) 258f32ef57fSSteven Lee- ``ast2700fc`` Aspeed AST2700 Evaluation board (Cortex-A35 + Cortex-M4) 2593eb01cfeSJamin Lin 2603eb01cfeSJamin LinSupported devices 2613eb01cfeSJamin Lin----------------- 2623eb01cfeSJamin Lin * Interrupt Controller 2633eb01cfeSJamin Lin * Timer Controller 2643eb01cfeSJamin Lin * RTC Controller 2653eb01cfeSJamin Lin * I2C Controller 2663eb01cfeSJamin Lin * System Control Unit (SCU) 2673eb01cfeSJamin Lin * SRAM mapping 2683eb01cfeSJamin Lin * X-DMA Controller (basic interface) 2693eb01cfeSJamin Lin * Static Memory Controller (SMC or FMC) - Only SPI Flash support 2703eb01cfeSJamin Lin * SPI Memory Controller 2713eb01cfeSJamin Lin * USB 2.0 Controller 2723eb01cfeSJamin Lin * SD/MMC storage controllers 2733eb01cfeSJamin Lin * SDRAM controller (dummy interface for basic settings and training) 2743eb01cfeSJamin Lin * Watchdog Controller 2753eb01cfeSJamin Lin * GPIO Controller (Master only) 2763eb01cfeSJamin Lin * UART 2773eb01cfeSJamin Lin * Ethernet controllers 2783eb01cfeSJamin Lin * Front LEDs (PCA9552 on I2C bus) 2793eb01cfeSJamin Lin * LPC Peripheral Controller (a subset of subdevices are supported) 2803eb01cfeSJamin Lin * Hash/Crypto Engine (HACE) - Hash support only. TODO: Crypto 2813eb01cfeSJamin Lin * ADC 2823eb01cfeSJamin Lin * eMMC Boot Controller (dummy) 2833eb01cfeSJamin Lin * PECI Controller (minimal) 2843eb01cfeSJamin Lin * I3C Controller 2853eb01cfeSJamin Lin * Internal Bridge Controller (SLI dummy) 2863eb01cfeSJamin Lin 2873eb01cfeSJamin LinMissing devices 2883eb01cfeSJamin Lin--------------- 2893eb01cfeSJamin Lin * PWM and Fan Controller 2903eb01cfeSJamin Lin * Slave GPIO Controller 2913eb01cfeSJamin Lin * Super I/O Controller 2923eb01cfeSJamin Lin * PCI-Express 1 Controller 2933eb01cfeSJamin Lin * Graphic Display Controller 2943eb01cfeSJamin Lin * MCTP Controller 2953eb01cfeSJamin Lin * Mailbox Controller 2963eb01cfeSJamin Lin * Virtual UART 2973eb01cfeSJamin Lin * eSPI Controller 2983eb01cfeSJamin Lin 2993eb01cfeSJamin LinBoot options 3003eb01cfeSJamin Lin------------ 3013eb01cfeSJamin Lin 3023eb01cfeSJamin LinImages can be downloaded from the ASPEED Forked OpenBMC GitHub release repository : 3033eb01cfeSJamin Lin 3043eb01cfeSJamin Lin https://github.com/AspeedTech-BMC/openbmc/releases 3053eb01cfeSJamin Lin 3069b0a3649SCédric Le GoaterBooting the ast2700-evb machine 3079b0a3649SCédric Le Goater^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 308b3e8223eSJamin Lin 309d2b857efSJamin LinBoot the AST2700 machine from the flash image. 310d2b857efSJamin Lin 311d2b857efSJamin LinThere are two supported methods for booting the AST2700 machine with a flash image: 312d2b857efSJamin Lin 313d2b857efSJamin LinManual boot using ``-device loader``: 314d2b857efSJamin Lin 315d2b857efSJamin LinIt causes all 4 CPU cores to start execution from address ``0x430000000``, which 316d2b857efSJamin Lincorresponds to the BL31 image load address. 317b3e8223eSJamin Lin 318b3e8223eSJamin Lin.. code-block:: bash 319b3e8223eSJamin Lin 320b3e8223eSJamin Lin IMGDIR=ast2700-default 321b3e8223eSJamin Lin UBOOT_SIZE=$(stat --format=%s -L ${IMGDIR}/u-boot-nodtb.bin) 322b3e8223eSJamin Lin 323b3e8223eSJamin Lin $ qemu-system-aarch64 -M ast2700-evb \ 324b3e8223eSJamin Lin -device loader,force-raw=on,addr=0x400000000,file=${IMGDIR}/u-boot-nodtb.bin \ 325b3e8223eSJamin Lin -device loader,force-raw=on,addr=$((0x400000000 + ${UBOOT_SIZE})),file=${IMGDIR}/u-boot.dtb \ 326b3e8223eSJamin Lin -device loader,force-raw=on,addr=0x430000000,file=${IMGDIR}/bl31.bin \ 327b3e8223eSJamin Lin -device loader,force-raw=on,addr=0x430080000,file=${IMGDIR}/optee/tee-raw.bin \ 328b3e8223eSJamin Lin -device loader,cpu-num=0,addr=0x430000000 \ 329b3e8223eSJamin Lin -device loader,cpu-num=1,addr=0x430000000 \ 330b3e8223eSJamin Lin -device loader,cpu-num=2,addr=0x430000000 \ 331b3e8223eSJamin Lin -device loader,cpu-num=3,addr=0x430000000 \ 332b3e8223eSJamin Lin -smp 4 \ 333b3e8223eSJamin Lin -drive file=${IMGDIR}/image-bmc,format=raw,if=mtd \ 334b3e8223eSJamin Lin -nographic 335b3e8223eSJamin Lin 336d2b857efSJamin LinBoot using a virtual boot ROM (``-bios``): 337d2b857efSJamin Lin 338d2b857efSJamin LinIf users do not specify the ``-bios option``, QEMU will attempt to load the 339d2b857efSJamin Lindefault vbootrom image ``ast27x0_bootrom.bin`` from either the current working 340d2b857efSJamin Lindirectory or the ``pc-bios`` directory within the QEMU source tree. 341d2b857efSJamin Lin 342d2b857efSJamin Lin.. code-block:: bash 343d2b857efSJamin Lin 344d2b857efSJamin Lin $ qemu-system-aarch64 -M ast2700-evb \ 345d2b857efSJamin Lin -drive file=image-bmc,format=raw,if=mtd \ 346d2b857efSJamin Lin -nographic 347d2b857efSJamin Lin 348d2b857efSJamin LinThe ``-bios`` option allows users to specify a custom path for the vbootrom 349d2b857efSJamin Linimage to be loaded during boot. This will load the vbootrom image from the 350d2b857efSJamin Linspecified path in the ${HOME} directory. 351d2b857efSJamin Lin 352d2b857efSJamin Lin.. code-block:: bash 353d2b857efSJamin Lin 354d2b857efSJamin Lin -bios ${HOME}/ast27x0_bootrom.bin 355d2b857efSJamin Lin 356f32ef57fSSteven LeeBooting the ast2700fc machine 357f32ef57fSSteven Lee^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 358f32ef57fSSteven Lee 359f32ef57fSSteven LeeAST2700 features four Cortex-A35 primary processors and two Cortex-M4 coprocessors. 360f32ef57fSSteven Lee**ast2700-evb** machine focuses on emulating the four Cortex-A35 primary processors, 361f32ef57fSSteven Lee**ast2700fc** machine extends **ast2700-evb** by adding support for the two Cortex-M4 coprocessors. 362f32ef57fSSteven Lee 363f32ef57fSSteven LeeSteps to boot the AST2700fc machine: 364f32ef57fSSteven Lee 365f32ef57fSSteven Lee1. Ensure you have the following AST2700A1 binaries available in a directory 366f32ef57fSSteven Lee 367f32ef57fSSteven Lee * u-boot-nodtb.bin 368f32ef57fSSteven Lee * u-boot.dtb 369f32ef57fSSteven Lee * bl31.bin 370f32ef57fSSteven Lee * optee/tee-raw.bin 371f32ef57fSSteven Lee * image-bmc 372f32ef57fSSteven Lee * zephyr-aspeed-ssp.elf (for SSP firmware, CPU 5) 373f32ef57fSSteven Lee * zephyr-aspeed-tsp.elf (for TSP firmware, CPU 6) 374f32ef57fSSteven Lee 375f32ef57fSSteven Lee2. Execute the following command to start ``ast2700fc`` machine: 376f32ef57fSSteven Lee 377f32ef57fSSteven Lee.. code-block:: bash 378f32ef57fSSteven Lee 379f32ef57fSSteven Lee IMGDIR=ast2700-default 380f32ef57fSSteven Lee UBOOT_SIZE=$(stat --format=%s -L ${IMGDIR}/u-boot-nodtb.bin) 381f32ef57fSSteven Lee 382f32ef57fSSteven Lee $ qemu-system-aarch64 -M ast2700fc \ 383f32ef57fSSteven Lee -device loader,force-raw=on,addr=0x400000000,file=${IMGDIR}/u-boot-nodtb.bin \ 384f32ef57fSSteven Lee -device loader,force-raw=on,addr=$((0x400000000 + ${UBOOT_SIZE})),file=${IMGDIR}/u-boot.dtb \ 385f32ef57fSSteven Lee -device loader,force-raw=on,addr=0x430000000,file=${IMGDIR}/bl31.bin \ 386f32ef57fSSteven Lee -device loader,force-raw=on,addr=0x430080000,file=${IMGDIR}/optee/tee-raw.bin \ 387f32ef57fSSteven Lee -device loader,cpu-num=0,addr=0x430000000 \ 388f32ef57fSSteven Lee -device loader,cpu-num=1,addr=0x430000000 \ 389f32ef57fSSteven Lee -device loader,cpu-num=2,addr=0x430000000 \ 390f32ef57fSSteven Lee -device loader,cpu-num=3,addr=0x430000000 \ 391f32ef57fSSteven Lee -drive file=${IMGDIR}/image-bmc,if=mtd,format=raw \ 392f32ef57fSSteven Lee -device loader,file=${IMGDIR}/zephyr-aspeed-ssp.elf,cpu-num=4 \ 393f32ef57fSSteven Lee -device loader,file=${IMGDIR}/zephyr-aspeed-tsp.elf,cpu-num=5 \ 394f32ef57fSSteven Lee -serial pty -serial pty -serial pty \ 395f32ef57fSSteven Lee -snapshot \ 396f32ef57fSSteven Lee -S -nographic 397f32ef57fSSteven Lee 398f32ef57fSSteven LeeAfter launching QEMU, serial devices will be automatically redirected. 399f32ef57fSSteven LeeExample output: 400f32ef57fSSteven Lee 401f32ef57fSSteven Lee.. code-block:: bash 402f32ef57fSSteven Lee 403f32ef57fSSteven Lee char device redirected to /dev/pts/55 (label serial0) 404f32ef57fSSteven Lee char device redirected to /dev/pts/56 (label serial1) 405f32ef57fSSteven Lee char device redirected to /dev/pts/57 (label serial2) 406f32ef57fSSteven Lee 407f32ef57fSSteven Lee- serial0: Console for the four Cortex-A35 primary processors. 408f32ef57fSSteven Lee- serial1 and serial2: Consoles for the two Cortex-M4 coprocessors. 409f32ef57fSSteven Lee 410f32ef57fSSteven LeeUse ``tio`` or another terminal emulator to connect to the consoles: 411f32ef57fSSteven Lee 412f32ef57fSSteven Lee.. code-block:: bash 413f32ef57fSSteven Lee 414f32ef57fSSteven Lee $ tio /dev/pts/55 415f32ef57fSSteven Lee $ tio /dev/pts/56 416f32ef57fSSteven Lee $ tio /dev/pts/57 417f32ef57fSSteven Lee 418f32ef57fSSteven Lee 4193d393bb7SJamin LinAspeed minibmc family boards (``ast1030-evb``) 4203d393bb7SJamin Lin================================================================== 4213d393bb7SJamin Lin 4223d393bb7SJamin LinThe QEMU Aspeed machines model mini BMCs of various Aspeed evaluation 4233d393bb7SJamin Linboards. They are based on different releases of the 4243d393bb7SJamin LinAspeed SoC : the AST1030 integrating an ARM Cortex M4F CPU (200MHz). 4253d393bb7SJamin Lin 4263d393bb7SJamin LinThe SoC comes with SRAM, SPI, I2C, etc. 4273d393bb7SJamin Lin 4283d393bb7SJamin LinAST1030 SoC based machines : 4293d393bb7SJamin Lin 4303d393bb7SJamin Lin- ``ast1030-evb`` Aspeed AST1030 Evaluation board (Cortex-M4F) 4313d393bb7SJamin Lin 4323d393bb7SJamin LinSupported devices 4333d393bb7SJamin Lin----------------- 4343d393bb7SJamin Lin 4353d393bb7SJamin Lin * SMP (for the AST1030 Cortex-M4F) 4363d393bb7SJamin Lin * Interrupt Controller (VIC) 4373d393bb7SJamin Lin * Timer Controller 4383d393bb7SJamin Lin * I2C Controller 4393d393bb7SJamin Lin * System Control Unit (SCU) 4403d393bb7SJamin Lin * SRAM mapping 4413d393bb7SJamin Lin * Static Memory Controller (SMC or FMC) - Only SPI Flash support 4423d393bb7SJamin Lin * SPI Memory Controller 4433d393bb7SJamin Lin * USB 2.0 Controller 4443d393bb7SJamin Lin * Watchdog Controller 4453d393bb7SJamin Lin * GPIO Controller (Master only) 4463d393bb7SJamin Lin * UART 4473d393bb7SJamin Lin * LPC Peripheral Controller (a subset of subdevices are supported) 4483d393bb7SJamin Lin * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA 4493d393bb7SJamin Lin * ADC 4501d6fb3d0SCédric Le Goater * Secure Boot Controller 4511d6fb3d0SCédric Le Goater * PECI Controller (minimal) 4523d393bb7SJamin Lin 4533d393bb7SJamin Lin 4543d393bb7SJamin LinMissing devices 4553d393bb7SJamin Lin--------------- 4563d393bb7SJamin Lin 4573d393bb7SJamin Lin * PWM and Fan Controller 4583d393bb7SJamin Lin * Slave GPIO Controller 4593d393bb7SJamin Lin * Mailbox Controller 4603d393bb7SJamin Lin * Virtual UART 4613d393bb7SJamin Lin * eSPI Controller 4623d393bb7SJamin Lin * I3C Controller 4633d393bb7SJamin Lin 4643d393bb7SJamin LinBoot options 4653d393bb7SJamin Lin------------ 4663d393bb7SJamin Lin 4673d393bb7SJamin LinThe Aspeed machines can be started using the ``-kernel`` to load a 4683d393bb7SJamin LinZephyr OS or from a firmware. Images can be downloaded from the 4693d393bb7SJamin LinASPEED GitHub release repository : 4703d393bb7SJamin Lin 4713d393bb7SJamin Lin https://github.com/AspeedTech-BMC/zephyr/releases 4723d393bb7SJamin Lin 4733d393bb7SJamin LinTo boot a kernel directly from a Zephyr build tree: 4743d393bb7SJamin Lin 4753d393bb7SJamin Lin.. code-block:: bash 4763d393bb7SJamin Lin 4773d393bb7SJamin Lin $ qemu-system-arm -M ast1030-evb -nographic \ 4783d393bb7SJamin Lin -kernel zephyr.elf 479