From patchwork Thu Apr 10 02:38:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamin Lin X-Patchwork-Id: 14045791 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 lists.gnu.org (lists.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 A24EAC369A1 for ; Thu, 10 Apr 2025 02:39:32 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hos-0001Xh-99; Wed, 09 Apr 2025 22:39:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u2hop-0001XQ-Fn; Wed, 09 Apr 2025 22:39:07 -0400 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u2hom-00033O-Pu; Wed, 09 Apr 2025 22:39:07 -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.1258.12; Thu, 10 Apr 2025 10:38:56 +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.1258.12 via Frontend Transport; Thu, 10 Apr 2025 10:38:56 +0800 To: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v2 00/10] Support vbootrom for AST2700 Date: Thu, 10 Apr 2025 10:38:44 +0800 Message-ID: <20250410023856.500258-1-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=211.20.114.72; envelope-from=jamin_lin@aspeedtech.com; helo=TWMBX01.aspeed.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_FAIL=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Jamin Lin X-Patchwork-Original-From: Jamin Lin via From: Jamin Lin Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currently implements the bare minimum to load, parse, initialize and run boot images stored in SPI flash, but may grow more features over time as needed. The source code is available at: https://github.com/google/vbootrom v2: Add "Introduced ASPEED_DEV_VBOOTROM in the device enumeration" patch to fix build failed. Jamin Lin (10): hw/arm/aspeed: Introduced ASPEED_DEV_VBOOTROM in the device enumeration hw/arm/aspeed_ast27x0: Add "vbootrom_size" field to AspeedSoCClass hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize hw/arm/aspeed_ast27x0 Introduce vbootrom memory region hw/arm/aspeed: Enable vbootrom support by default on AST2700 EVB machines hw/arm/aspeed: Reuse rom_size variable for vbootrom setup hw/arm/aspeed: Add support for loading vbootrom image via "-bios" pc-bios: Add AST27x0 vBootrom tests/functional/aspeed: Update AST2700 functional test to use vbootrom docs/system/arm/aspeed: Support vbootrom for AST2700 MAINTAINERS | 1 + docs/system/arm/aspeed.rst | 18 +++-------- include/hw/arm/aspeed.h | 1 + include/hw/arm/aspeed_soc.h | 3 ++ hw/arm/aspeed.c | 37 ++++++++++++++++++++++- hw/arm/aspeed_ast27x0.c | 20 ++++++++++--- pc-bios/README | 6 ++++ pc-bios/ast27x0_bootrom.bin | Bin 0 -> 15464 bytes pc-bios/meson.build | 1 + tests/functional/test_aarch64_aspeed.py | 38 +----------------------- 10 files changed, 69 insertions(+), 56 deletions(-) create mode 100644 pc-bios/ast27x0_bootrom.bin