xref: /openbmc/qemu/docs/system/arm/aspeed.rst (revision c7e313ae)
17a1e049aSCédric Le GoaterAspeed family boards (``*-bmc``, ``ast2500-evb``, ``ast2600-evb``)
27a1e049aSCédric Le Goater==================================================================
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
77a1e049aSCédric Le GoaterAST2500 with an ARM1176JZS CPU (800MHz) and more recently the AST2600
8f548f201SPeter Maydellwith 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
170b052414SJoel Stanley- ``supermicrox11-bmc``    Supermicro X11 BMC
187a1e049aSCédric Le Goater
197a1e049aSCédric Le GoaterAST2500 SoC based machines :
207a1e049aSCédric Le Goater
217a1e049aSCédric Le Goater- ``ast2500-evb``          Aspeed AST2500 Evaluation board
227a1e049aSCédric Le Goater- ``romulus-bmc``          OpenPOWER Romulus POWER9 BMC
237a1e049aSCédric Le Goater- ``witherspoon-bmc``      OpenPOWER Witherspoon POWER9 BMC
247a1e049aSCédric Le Goater- ``sonorapass-bmc``       OCP SonoraPass BMC
250b052414SJoel Stanley- ``fp5280g2-bmc``         Inspur FP5280G2 BMC
260b052414SJoel Stanley- ``g220a-bmc``            Bytedance G220A BMC
2734f73a81SKarthikeyan Pasupathi- ``yosemitev2-bmc``       Facebook YosemiteV2 BMC
286c323abaSKarthikeyan Pasupathi- ``tiogapass-bmc``        Facebook Tiogapass BMC
297a1e049aSCédric Le Goater
307a1e049aSCédric Le GoaterAST2600 SoC based machines :
317a1e049aSCédric Le Goater
32f548f201SPeter Maydell- ``ast2600-evb``          Aspeed AST2600 Evaluation board (Cortex-A7)
337a1e049aSCédric Le Goater- ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
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
697a1e049aSCédric Le Goater
707a1e049aSCédric Le Goater
717a1e049aSCédric Le GoaterMissing devices
727a1e049aSCédric Le Goater---------------
737a1e049aSCédric Le Goater
747a1e049aSCédric Le Goater * Coprocessor support
757a1e049aSCédric Le Goater * PWM and Fan Controller
767a1e049aSCédric Le Goater * Slave GPIO Controller
777a1e049aSCédric Le Goater * Super I/O Controller
787a1e049aSCédric Le Goater * PCI-Express 1 Controller
797a1e049aSCédric Le Goater * Graphic Display Controller
807a1e049aSCédric Le Goater * MCTP Controller
817a1e049aSCédric Le Goater * Mailbox Controller
827a1e049aSCédric Le Goater * Virtual UART
837a1e049aSCédric Le Goater * eSPI Controller
847a1e049aSCédric Le Goater
857a1e049aSCédric Le GoaterBoot options
867a1e049aSCédric Le Goater------------
877a1e049aSCédric Le Goater
889d5dcb85SJoel StanleyThe Aspeed machines can be started using the ``-kernel`` and ``-dtb`` options
899d5dcb85SJoel Stanleyto load a Linux kernel or from a firmware. Images can be downloaded from the
909d5dcb85SJoel StanleyOpenBMC jenkins :
917a1e049aSCédric Le Goater
9238b1ed6cSJoel Stanley   https://jenkins.openbmc.org/job/ci-openbmc/lastSuccessfulBuild/
93d029c729SCédric Le Goater
94d029c729SCédric Le Goateror directly from the OpenBMC GitHub release repository :
95d029c729SCédric Le Goater
96d029c729SCédric Le Goater   https://github.com/openbmc/openbmc/releases
977a1e049aSCédric Le Goater
989d5dcb85SJoel StanleyTo boot a kernel directly from a Linux build tree:
999d5dcb85SJoel Stanley
1009d5dcb85SJoel Stanley.. code-block:: bash
1019d5dcb85SJoel Stanley
1029d5dcb85SJoel Stanley  $ qemu-system-arm -M ast2600-evb -nographic \
1039d5dcb85SJoel Stanley        -kernel arch/arm/boot/zImage \
1049d5dcb85SJoel Stanley        -dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \
1059d5dcb85SJoel Stanley        -initrd rootfs.cpio
1069d5dcb85SJoel Stanley
107*c7e313aeSCédric Le GoaterTo boot the machine from the flash image, use an MTD drive :
1087a1e049aSCédric Le Goater
1097a1e049aSCédric Le Goater.. code-block:: bash
1107a1e049aSCédric Le Goater
1117a1e049aSCédric Le Goater  $ qemu-system-arm -M romulus-bmc -nic user \
112d029c729SCédric Le Goater	-drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd -nographic
1139820e52fSCédric Le Goater
1149820e52fSCédric Le GoaterOptions specific to Aspeed machines are :
1159820e52fSCédric Le Goater
1169820e52fSCédric Le Goater * ``execute-in-place`` which emulates the boot from the CE0 flash
1179820e52fSCédric Le Goater   device by using the FMC controller to load the instructions, and
1189820e52fSCédric Le Goater   not simply from RAM. This takes a little longer.
1199820e52fSCédric Le Goater
120*c7e313aeSCédric Le Goater * ``fmc-model`` to change the default FMC Flash model. FW needs
121*c7e313aeSCédric Le Goater   support for the chip model to boot.
1229820e52fSCédric Le Goater
123*c7e313aeSCédric Le Goater * ``spi-model`` to change the default SPI Flash model.
1249820e52fSCédric Le Goater
125f65f6ad5SCédric Le Goater * ``bmc-console`` to change the default console device. Most of the
126f65f6ad5SCédric Le Goater   machines use the ``UART5`` device for a boot console, which is
127f65f6ad5SCédric Le Goater   mapped on ``/dev/ttyS4`` under Linux, but it is not always the
128f65f6ad5SCédric Le Goater   case.
129f65f6ad5SCédric Le Goater
130*c7e313aeSCédric Le GoaterTo use other flash models, for instance a different FMC chip and a
131*c7e313aeSCédric Le Goaterbigger (64M) SPI for the ``ast2500-evb`` machine, run :
1329820e52fSCédric Le Goater
1339820e52fSCédric Le Goater.. code-block:: bash
1349820e52fSCédric Le Goater
1359820e52fSCédric Le Goater  -M ast2500-evb,fmc-model=mx25l25635e,spi-model=mx66u51235f
1363d393bb7SJamin Lin
137*c7e313aeSCédric Le GoaterWhen more flexibility is needed to define the flash devices, to use
138*c7e313aeSCédric Le Goaterdifferent flash models or define all flash devices (up to 8), the
139*c7e313aeSCédric Le Goater``-nodefaults`` QEMU option can be used to avoid creating the default
140*c7e313aeSCédric Le Goaterflash devices.
141*c7e313aeSCédric Le Goater
142*c7e313aeSCédric Le GoaterFlash devices should then be created from the command line and attached
143*c7e313aeSCédric Le Goaterto a block device :
144*c7e313aeSCédric Le Goater
145*c7e313aeSCédric Le Goater.. code-block:: bash
146*c7e313aeSCédric Le Goater
147*c7e313aeSCédric Le Goater  $ qemu-system-arm -M ast2600-evb \
148*c7e313aeSCédric Le Goater        -blockdev node-name=fmc0,driver=file,filename=/path/to/fmc0.img \
149*c7e313aeSCédric Le Goater	-device mx66u51235f,bus=ssi.0,cs=0x0,drive=fmc0 \
150*c7e313aeSCédric Le Goater	-blockdev node-name=fmc1,driver=file,filename=/path/to/fmc1.img \
151*c7e313aeSCédric Le Goater	-device mx66u51235f,bus=ssi.0,cs=0x1,drive=fmc1 \
152*c7e313aeSCédric Le Goater	-blockdev node-name=spi1,driver=file,filename=/path/to/spi1.img \
153*c7e313aeSCédric Le Goater	-device mx66u51235f,cs=0x0,bus=ssi.1,drive=spi1 \
154*c7e313aeSCédric Le Goater	-nographic -nodefaults
155*c7e313aeSCédric Le Goater
156*c7e313aeSCédric Le GoaterIn that case, the machine boots fetching instructions from the FMC0
157*c7e313aeSCédric Le Goaterdevice. It is slower to start but closer to what HW does. Using the
158*c7e313aeSCédric Le Goatermachine option ``execute-in-place`` has a similar effect.
159*c7e313aeSCédric Le Goater
160f65f6ad5SCédric Le GoaterTo change the boot console and use device ``UART3`` (``/dev/ttyS2``
161f65f6ad5SCédric Le Goaterunder Linux), use :
162f65f6ad5SCédric Le Goater
163f65f6ad5SCédric Le Goater.. code-block:: bash
164f65f6ad5SCédric Le Goater
165f65f6ad5SCédric Le Goater  -M ast2500-evb,bmc-console=uart3
1663d393bb7SJamin Lin
1673d393bb7SJamin LinAspeed minibmc family boards (``ast1030-evb``)
1683d393bb7SJamin Lin==================================================================
1693d393bb7SJamin Lin
1703d393bb7SJamin LinThe QEMU Aspeed machines model mini BMCs of various Aspeed evaluation
1713d393bb7SJamin Linboards. They are based on different releases of the
1723d393bb7SJamin LinAspeed SoC : the AST1030 integrating an ARM Cortex M4F CPU (200MHz).
1733d393bb7SJamin Lin
1743d393bb7SJamin LinThe SoC comes with SRAM, SPI, I2C, etc.
1753d393bb7SJamin Lin
1763d393bb7SJamin LinAST1030 SoC based machines :
1773d393bb7SJamin Lin
1783d393bb7SJamin Lin- ``ast1030-evb``          Aspeed AST1030 Evaluation board (Cortex-M4F)
1793d393bb7SJamin Lin
1803d393bb7SJamin LinSupported devices
1813d393bb7SJamin Lin-----------------
1823d393bb7SJamin Lin
1833d393bb7SJamin Lin * SMP (for the AST1030 Cortex-M4F)
1843d393bb7SJamin Lin * Interrupt Controller (VIC)
1853d393bb7SJamin Lin * Timer Controller
1863d393bb7SJamin Lin * I2C Controller
1873d393bb7SJamin Lin * System Control Unit (SCU)
1883d393bb7SJamin Lin * SRAM mapping
1893d393bb7SJamin Lin * Static Memory Controller (SMC or FMC) - Only SPI Flash support
1903d393bb7SJamin Lin * SPI Memory Controller
1913d393bb7SJamin Lin * USB 2.0 Controller
1923d393bb7SJamin Lin * Watchdog Controller
1933d393bb7SJamin Lin * GPIO Controller (Master only)
1943d393bb7SJamin Lin * UART
1953d393bb7SJamin Lin * LPC Peripheral Controller (a subset of subdevices are supported)
1963d393bb7SJamin Lin * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA
1973d393bb7SJamin Lin * ADC
1981d6fb3d0SCédric Le Goater * Secure Boot Controller
1991d6fb3d0SCédric Le Goater * PECI Controller (minimal)
2003d393bb7SJamin Lin
2013d393bb7SJamin Lin
2023d393bb7SJamin LinMissing devices
2033d393bb7SJamin Lin---------------
2043d393bb7SJamin Lin
2053d393bb7SJamin Lin * PWM and Fan Controller
2063d393bb7SJamin Lin * Slave GPIO Controller
2073d393bb7SJamin Lin * Mailbox Controller
2083d393bb7SJamin Lin * Virtual UART
2093d393bb7SJamin Lin * eSPI Controller
2103d393bb7SJamin Lin * I3C Controller
2113d393bb7SJamin Lin
2123d393bb7SJamin LinBoot options
2133d393bb7SJamin Lin------------
2143d393bb7SJamin Lin
2153d393bb7SJamin LinThe Aspeed machines can be started using the ``-kernel`` to load a
2163d393bb7SJamin LinZephyr OS or from a firmware. Images can be downloaded from the
2173d393bb7SJamin LinASPEED GitHub release repository :
2183d393bb7SJamin Lin
2193d393bb7SJamin Lin   https://github.com/AspeedTech-BMC/zephyr/releases
2203d393bb7SJamin Lin
2213d393bb7SJamin LinTo boot a kernel directly from a Zephyr build tree:
2223d393bb7SJamin Lin
2233d393bb7SJamin Lin.. code-block:: bash
2243d393bb7SJamin Lin
2253d393bb7SJamin Lin  $ qemu-system-arm -M ast1030-evb -nographic \
2263d393bb7SJamin Lin        -kernel zephyr.elf
22719d7c0d4SPeter Delevoryas
22819d7c0d4SPeter DelevoryasFacebook Yosemite v3.5 Platform and CraterLake Server (``fby35``)
22919d7c0d4SPeter Delevoryas==================================================================
23019d7c0d4SPeter Delevoryas
23119d7c0d4SPeter DelevoryasFacebook has a series of multi-node compute server designs named
23219d7c0d4SPeter DelevoryasYosemite. The most recent version released was
23319d7c0d4SPeter Delevoryas`Yosemite v3 <https://www.opencompute.org/documents/ocp-yosemite-v3-platform-design-specification-1v16-pdf>`__.
23419d7c0d4SPeter Delevoryas
23519d7c0d4SPeter DelevoryasYosemite v3.5 is an iteration on this design, and is very similar: there's a
23619d7c0d4SPeter Delevoryasbaseboard with a BMC, and 4 server slots. The new server board design termed
23719d7c0d4SPeter Delevoryas"CraterLake" includes a Bridge IC (BIC), with room for expansion boards to
23819d7c0d4SPeter Delevoryasinclude various compute accelerators (video, inferencing, etc). At the moment,
23919d7c0d4SPeter Delevoryasonly the first server slot's BIC is included.
24019d7c0d4SPeter Delevoryas
24119d7c0d4SPeter DelevoryasYosemite v3.5 is itself a sled which fits into a 40U chassis, and 3 sleds
24219d7c0d4SPeter Delevoryascan be fit into a chassis. See `here <https://www.opencompute.org/products/423/wiwynn-yosemite-v3-server>`__
24319d7c0d4SPeter Delevoryasfor an example.
24419d7c0d4SPeter Delevoryas
24519d7c0d4SPeter DelevoryasIn this generation, the BMC is an AST2600 and each BIC is an AST1030. The BMC
24619d7c0d4SPeter Delevoryasruns `OpenBMC <https://github.com/facebook/openbmc>`__, and the BIC runs
24719d7c0d4SPeter Delevoryas`OpenBIC <https://github.com/facebook/openbic>`__.
24819d7c0d4SPeter Delevoryas
24919d7c0d4SPeter DelevoryasFirmware images can be retrieved from the Github releases or built from the
25019d7c0d4SPeter Delevoryassource code, see the README's for instructions on that. This image uses the
25119d7c0d4SPeter Delevoryas"fby35" machine recipe from OpenBMC, and the "yv35-cl" target from OpenBIC.
25219d7c0d4SPeter DelevoryasSome reference images can also be found here:
25319d7c0d4SPeter Delevoryas
25419d7c0d4SPeter Delevoryas.. code-block:: bash
25519d7c0d4SPeter Delevoryas
25619d7c0d4SPeter Delevoryas    $ wget https://github.com/facebook/openbmc/releases/download/openbmc-e2294ff5d31d/fby35.mtd
25719d7c0d4SPeter Delevoryas    $ wget https://github.com/peterdelevoryas/OpenBIC/releases/download/oby35-cl-2022.13.01/Y35BCL.elf
25819d7c0d4SPeter Delevoryas
25919d7c0d4SPeter DelevoryasSince this machine has multiple SoC's, each with their own serial console, the
26019d7c0d4SPeter Delevoryasrecommended way to run it is to allocate a pseudoterminal for each serial
26119d7c0d4SPeter Delevoryasconsole and let the monitor use stdio. Also, starting in a paused state is
26219d7c0d4SPeter Delevoryasuseful because it allows you to attach to the pseudoterminals before the boot
26319d7c0d4SPeter Delevoryasprocess starts.
26419d7c0d4SPeter Delevoryas
26519d7c0d4SPeter Delevoryas.. code-block:: bash
26619d7c0d4SPeter Delevoryas
26719d7c0d4SPeter Delevoryas    $ qemu-system-arm -machine fby35 \
26819d7c0d4SPeter Delevoryas        -drive file=fby35.mtd,format=raw,if=mtd \
26919d7c0d4SPeter Delevoryas        -device loader,file=Y35BCL.elf,addr=0,cpu-num=2 \
27019d7c0d4SPeter Delevoryas        -serial pty -serial pty -serial mon:stdio \
27119d7c0d4SPeter Delevoryas        -display none -S
27219d7c0d4SPeter Delevoryas    $ screen /dev/tty0 # In a separate TMUX pane, terminal window, etc.
27319d7c0d4SPeter Delevoryas    $ screen /dev/tty1
27419d7c0d4SPeter Delevoryas    $ (qemu) c		   # Start the boot process once screen is setup.
275