Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8EF41CD5BD1 for ; Mon, 1 Jun 2026 02:32:38 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wTsRw-0007O2-Si; Sun, 31 May 2026 22:32:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wTsRu-0007N9-Il; Sun, 31 May 2026 22:32:18 -0400 Received: from mail.aspeedtech.com ([211.20.114.72] helo=twmbx01.aspeedtech.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wTsRt-0004V7-5d; Sun, 31 May 2026 22:32:18 -0400 Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Mon, 1 Jun 2026 10:31:51 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Mon, 1 Jun 2026 10:31:51 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Troy Lee , Jamin Lin , Kane Chen , "Andrew Jeffery" , Joel Stanley , Pierrick Bouvier , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , , Subject: [PATCH 6/6] docs/system/arm: Document AST1040 Caliptra mailbox Date: Mon, 1 Jun 2026 10:31:47 +0800 Message-ID: <20260601023149.2309299-7-steven_lee@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260601023149.2309299-1-steven_lee@aspeedtech.com> References: <20260601023149.2309299-1-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Received-SPF: pass client-ip=211.20.114.72; envelope-from=steven_lee@aspeedtech.com; helo=twmbx01.aspeedtech.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Steven Lee From: Steven Lee via Errors-To: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Document the AST1040 Caliptra MCI mailbox windows, the SCU-controlled remap aperture, and how to connect the external mailbox peer through a chardev backend. Signed-off-by: Steven Lee --- docs/system/arm/aspeed.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst index 2d51ceeb84..1ffa88c2ae 100644 --- a/docs/system/arm/aspeed.rst +++ b/docs/system/arm/aspeed.rst @@ -483,6 +483,7 @@ Supported devices * ADC * Secure Boot Controller * PECI Controller (minimal) + * Caliptra MCI mailbox (AST1040 only) Missing devices @@ -512,3 +513,34 @@ To boot a kernel directly from a Zephyr build tree: $ qemu-system-arm -M ast1030-evb -nographic \ -kernel zephyr.bin + +Caliptra MCI mailbox (ast1040-evb) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The AST1040 chip provides a mechanism to map the Caliptra MCI mailbox +register space into the Cortex-M4F address space. The Caliptra MCI mailbox +SRAM and CSR are accessible at fixed addresses: + +- Mailbox SRAM at ``0x21400000`` (2 MiB, command/response payload) +- Mailbox CSR at ``0x21600000`` (4 KiB, LOCK/CMD/DLEN/EXECUTE/STATUS) + +The SCU ``CPTRA_PAGE_REG0`` register (at ``0x74C02120``) selects which +Caliptra MCI page (SRAM or CSR) is exposed through the 4 KiB aperture at +``0x74200000``, allowing firmware to access either window through a single +address. + +By default the mailbox has no Caliptra peer, so writing ``EXECUTE`` reports +``CMD_FAILURE``. To service commands with an external Caliptra simulator (for +example caliptra-server) over a UNIX socket, start the simulator first, then +create an external peer device and link it with the machine's ``cptra-peer`` +option: + +.. code-block:: bash + + $ qemu-system-arm -M ast1040-evb,cptra-peer=peer0 -nographic \ + -chardev socket,id=cptra0,path=/tmp/mcu_mbox.sock \ + -device cptra-mbox-peer-extern,id=peer0,chardev=cptra0 \ + -kernel zephyr.elf + +Writing ``EXECUTE`` bridges the command and the mailbox SRAM payload to the +peer over the socket, and writes the response back into the mailbox SRAM. -- 2.43.0