From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393296; cv=none; d=zohomail.com; s=zohoarc; b=er+b0iSLev5gGuEgKPX4p/JnRAtpAh8dZMnnngoHZk8hN340T/J9U315X980KNBmeuZxmG6C2/QuagJNE9AX+efXEQwmS3OCvhMyWW/35b+wTFmNVyeLsLzE92kHvXk8MCi/ps/M6ZagkDRSi5xBnBpa1AGFgMDkVy5llPQSH4c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393296; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=V/dhotLayjhs6TECu6ACV1TspD0+QqHhRBAcDl7ZH+k=; b=m/kpoPew577M56Mwabp2iZs5CntI8DtJVTz2ugfcxBcrrYfjKg5CrtOUH9gR7GszX+mS/jVO4aOcsU4rUX8LO/n0drs7/WMRHQiyim1rTREt31j/3exVPMaQxlCQKgAQoyryUCLnpFrm/gxVgg2+u2FeNnwcGON4yA7F7roPlIY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393295971364.53417292657525; Wed, 23 Apr 2025 00:28:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7USm-0002as-2u; Wed, 23 Apr 2025 03:24:08 -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 1u7USj-0002a9-JT; Wed, 23 Apr 2025 03:24:05 -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 1u7USh-0001IR-Sm; Wed, 23 Apr 2025 03:24:05 -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; Wed, 23 Apr 2025 15:23: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; Wed, 23 Apr 2025 15:23:51 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v5 01/11] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize Date: Wed, 23 Apr 2025 15:23:37 +0800 Message-ID: <20250423072350.541742-2-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393297569019100 The variable "sram_name" was only used for naming the SRAM memory region. Rename it to "name" for consistency with similar code and avoid unnecessary new local variable declarations. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Tested-by: Nabih Estefan --- hw/arm/aspeed_ast27x0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index dce7255a2c..b05ed75ff4 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -577,7 +577,7 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev= , Error **errp) AspeedSoCClass *sc =3D ASPEED_SOC_GET_CLASS(s); AspeedINTCClass *ic =3D ASPEED_INTC_GET_CLASS(&a->intc[0]); AspeedINTCClass *icio =3D ASPEED_INTC_GET_CLASS(&a->intc[1]); - g_autofree char *sram_name =3D NULL; + g_autofree char *name =3D NULL; qemu_irq irq; =20 /* Default boot region (SPI memory or ROMs) */ @@ -649,9 +649,9 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev= , Error **errp) } =20 /* SRAM */ - sram_name =3D g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_i= ndex); - if (!memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_s= ize, - errp)) { + name =3D g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_index); + if (!memory_region_init_ram(&s->sram, OBJECT(s), name, sc->sram_size, + errp)) { return; } memory_region_add_subregion(s->memory, --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393112; cv=none; d=zohomail.com; s=zohoarc; b=hw/Do8OBfAjLuRXxm8Bw78WjSg5+lTJlyWfwPwDJvUz+BzpWmGF5zs08CvgF5ubNtZL4TbYSxEEPVj8qqzi0fReusZ56xFPmtLB+EyCRSXXUiN4PIqtRbLELJVlEtgMm0qPNMGre4wuBwhTIxLJQRVWbwA7UUkFdFUzgl+Ld43U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393112; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=Z+4JRriFrdTglSsvy5f+WfdZ44yaCDD3vBpc2cnKSEw=; b=Pk0s5qBIIGjIkAhRYwRMsCdHqc2AIYQHanDrVu9YA5baupEPb5xpwrI8+3v4HS26fgB43AxAeZ9RlfNTXPa+ajEjNT2yG7Rw0YOsmGR1KhuIV1RilJWXjsCFwdnt3YBztqpOrFCpymB1qlKSaGBO+sVujSE0Sj16o0L7VXqlzV0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393111609579.933979258429; Wed, 23 Apr 2025 00:25:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7USo-0002ba-MS; Wed, 23 Apr 2025 03:24: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 1u7USm-0002b5-HO; Wed, 23 Apr 2025 03:24:08 -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 1u7USk-0001IR-Uk; Wed, 23 Apr 2025 03:24:08 -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; Wed, 23 Apr 2025 15:23: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; Wed, 23 Apr 2025 15:23:51 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v5 02/11] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region Date: Wed, 23 Apr 2025 15:23:38 +0800 Message-ID: <20250423072350.541742-3-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393113110019000 Content-Type: text/plain; charset="utf-8" Introduce a new vbootrom memory region. The region is mapped at address "0x00000000" and has a size of 128KB, identical to the SRAM region size. This memory region is intended for loading a vbootrom image file as part of= the boot process. The vbootrom registered in the SoC's address space using the ASPEED_DEV_VBO= OTROM index. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan Reviewed-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 2 ++ hw/arm/aspeed_ast27x0.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index f069d17d16..b4b23d693d 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -59,6 +59,7 @@ struct AspeedSoCState { MemoryRegion sram; MemoryRegion spi_boot_container; MemoryRegion spi_boot; + MemoryRegion vbootrom; AddressSpace dram_as; AspeedRtcState rtc; AspeedTimerCtrlState timerctrl; @@ -169,6 +170,7 @@ struct AspeedSoCClass { const char *aspeed_soc_cpu_type(AspeedSoCClass *sc); =20 enum { + ASPEED_DEV_VBOOTROM, ASPEED_DEV_SPI_BOOT, ASPEED_DEV_IOMEM, ASPEED_DEV_UART0, diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index b05ed75ff4..968dfa5526 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -24,6 +24,7 @@ #include "qemu/log.h" =20 static const hwaddr aspeed_soc_ast2700_memmap[] =3D { + [ASPEED_DEV_VBOOTROM] =3D 0x00000000, [ASPEED_DEV_SRAM] =3D 0x10000000, [ASPEED_DEV_HACE] =3D 0x12070000, [ASPEED_DEV_EMMC] =3D 0x12090000, @@ -657,6 +658,14 @@ static void aspeed_soc_ast2700_realize(DeviceState *de= v, Error **errp) memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM], &s->sram); =20 + /* VBOOTROM */ + if (!memory_region_init_ram(&s->vbootrom, OBJECT(s), "aspeed.vbootrom", + 0x20000, errp)) { + return; + } + memory_region_add_subregion(s->memory, + sc->memmap[ASPEED_DEV_VBOOTROM], &s->vboot= rom); + /* SCU */ if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) { return; --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393153; cv=none; d=zohomail.com; s=zohoarc; b=by/6leCkulgQeQ5npuBB0xF1seguMhQit1V0rlHNOS5b94vsAEeXSkhQ2ZbDK4mHXVrx0WRdjfXIt66qNMKwUld0/GOAbVtNtjfUoAZl67mxI6vuK5Paf73HhSGRfhVjOq0IF0bnKCsD+Xs/97NFm8OsKl9Lz15j4tVywC16J/4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393153; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=gunqLQxrJL45Jak+Dflmnw0MCxQ8S8v4jQeOiO75FKg=; b=HD5mTQiHunfQBw5EuWjuWQvzf30+OuZllf0ODjkkaZ0yY76Pm+i0891gz61TrwpB7UOD+KrmEhHxl7/bJNDm8aqd7G6a5AJo2EbHtDcqYeWE5Vv/gaRyYLhqZvzAhc8vhImGACEGM986TgcYj1z3xIM4lbq7lzt9y+zTGOoXQIE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393153783930.0002160740626; Wed, 23 Apr 2025 00:25:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7USs-0002cB-4i; Wed, 23 Apr 2025 03:24:14 -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 1u7USq-0002by-3v; Wed, 23 Apr 2025 03:24:12 -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 1u7USn-0001IR-Fi; Wed, 23 Apr 2025 03:24:11 -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; Wed, 23 Apr 2025 15:23: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; Wed, 23 Apr 2025 15:23:51 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v5 03/11] hw/arm/aspeed: Add vbootrom support on AST2700 EVB machines Date: Wed, 23 Apr 2025 15:23:39 +0800 Message-ID: <20250423072350.541742-4-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393155255019100 Content-Type: text/plain; charset="utf-8" Introduce a new "vbootrom" field in the AspeedMachineClass to indicate whet= her a machine supports the virtual boot ROM region. Set this field to true by default for the AST2700-A0 and AST2700-A1 EVB machines. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- include/hw/arm/aspeed.h | 1 + hw/arm/aspeed.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h index 9cae45a1c9..973277bea6 100644 --- a/include/hw/arm/aspeed.h +++ b/include/hw/arm/aspeed.h @@ -40,6 +40,7 @@ struct AspeedMachineClass { void (*i2c_init)(AspeedMachineState *bmc); uint32_t uart_default; bool sdhci_wp_inverted; + bool vbootrom; }; =20 =20 diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 82f42582fa..e852bbc4cb 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -1689,6 +1689,7 @@ static void aspeed_machine_ast2700a0_evb_class_init(O= bjectClass *oc, void *data) amc->macs_mask =3D ASPEED_MAC0_ON | ASPEED_MAC1_ON | ASPEED_MAC2_ON; amc->uart_default =3D ASPEED_DEV_UART12; amc->i2c_init =3D ast2700_evb_i2c_init; + amc->vbootrom =3D true; mc->auto_create_sdcard =3D true; mc->default_ram_size =3D 1 * GiB; aspeed_machine_class_init_cpus_defaults(mc); @@ -1709,6 +1710,7 @@ static void aspeed_machine_ast2700a1_evb_class_init(O= bjectClass *oc, void *data) amc->macs_mask =3D ASPEED_MAC0_ON | ASPEED_MAC1_ON | ASPEED_MAC2_ON; amc->uart_default =3D ASPEED_DEV_UART12; amc->i2c_init =3D ast2700_evb_i2c_init; + amc->vbootrom =3D true; mc->auto_create_sdcard =3D true; mc->default_ram_size =3D 1 * GiB; aspeed_machine_class_init_cpus_defaults(mc); --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393205; cv=none; d=zohomail.com; s=zohoarc; b=RpEm7jmiyj3dn+00e9IjBr1IH4cZ2y3zPeBsjrx9vCERXZxsVBgcD1Mj21pGGHONy2nFc0+rfULGTbzAKqekQxgXmSpzwGX9My1c6Ty0FPXepDZAx91KBDB7MzRWvwKTRoz4SAjFL/ZuKHPn8C7JA/ioq1ksZGe2yxZuR49VURs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393205; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=4I0OHooL4f2at72YuHJ9BnmB90xYcNZDrSevD7YEJvE=; b=Nxo6weA070KDhzsCH1BN77DsV31V+dlffQ8h499v56NxHXmcbqzPiXYC+piv3v+OspDPF/cR4cX0L5AB60tNVSzCwEVfTErL0UUnTofebIKDPQB1pCBByxFlqsTg4c/JZ98UJaD4adWj6hpAXM4duQ4Blz7bLTq4R37N2oDJXBU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393205841551.9753781959986; Wed, 23 Apr 2025 00:26:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UT0-0002dF-69; Wed, 23 Apr 2025 03:24:23 -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 1u7USt-0002cg-6i; Wed, 23 Apr 2025 03:24:15 -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 1u7USr-0001IR-Db; Wed, 23 Apr 2025 03:24:14 -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; Wed, 23 Apr 2025 15:23:52 +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; Wed, 23 Apr 2025 15:23:52 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v5 04/11] hw/arm/aspeed: Reuse rom_size variable for vbootrom setup Date: Wed, 23 Apr 2025 15:23:40 +0800 Message-ID: <20250423072350.541742-5-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393207178019000 Move the declaration of "rom_size" to an outer scope in aspeed_machine_init= () so it can be reused for setting up the vbootrom region as well. This avoids introducing a redundant local variable and ensures consistent ROM sizing logic when both SPI boot and vbootrom are used. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Tested-by: Nabih Estefan --- hw/arm/aspeed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index e852bbc4cb..b70a120e62 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -381,6 +381,7 @@ static void aspeed_machine_init(MachineState *machine) AspeedSoCClass *sc; int i; DriveInfo *emmc0 =3D NULL; + uint64_t rom_size; bool boot_emmc; =20 bmc->soc =3D ASPEED_SOC(object_new(amc->soc_name)); @@ -475,7 +476,7 @@ static void aspeed_machine_init(MachineState *machine) BlockBackend *fmc0 =3D dev ? m25p80_get_blk(dev) : NULL; =20 if (fmc0 && !boot_emmc) { - uint64_t rom_size =3D memory_region_size(&bmc->soc->spi_boot); + rom_size =3D memory_region_size(&bmc->soc->spi_boot); aspeed_install_boot_rom(bmc, fmc0, rom_size); } else if (emmc0) { aspeed_install_boot_rom(bmc, blk_by_legacy_dinfo(emmc0), 64 * = KiB); --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393112; cv=none; d=zohomail.com; s=zohoarc; b=b9Onq7Yc8HOgtBa323cBtUEOlVOmzS70B6aA7akeQbU/9aHs9cXJwpBirTm5aJqf1X1vVp4Sv9GGQgTCTXK3E4ViaEu14RaKX6xm+NvC0Zq/M9HIqntsL6UdNox7DPy3SykYqpuFPmizw6fmJimXVmyovcwbSvlOkZ3gIPIVdUQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393112; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=TZq9QkrBF0jeHZT/jlHVBRG+oqYLTJxR6EWTUUqqhbo=; b=cL2bp5BN7GgIhwQLOxXuDtY7/5nGEG4gT0/PJQq32mpr+U1CnRJ5orfNUGnXRhV9rlbflgS90ifsLvGfQWqnLaXVIiqlOfyVPy6151fsYiLsab3D+Zi57F+ucpm8DSAZ3+3dbP5FM2iKqpVbkg2B/nv+dwVgMfwUx/q6VMjjhLs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393111867927.7613355956471; Wed, 23 Apr 2025 00:25:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UTG-0002fg-NL; Wed, 23 Apr 2025 03:24:38 -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 1u7UTC-0002eq-BC; Wed, 23 Apr 2025 03:24:35 -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 1u7USu-0001IR-1A; Wed, 23 Apr 2025 03:24: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; Wed, 23 Apr 2025 15:23:52 +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; Wed, 23 Apr 2025 15:23:52 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v5 05/11] pc-bios: Add AST27x0 vBootrom Date: Wed, 23 Apr 2025 15:23:41 +0800 Message-ID: <20250423072350.541742-6-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393115121019100 Content-Type: text/plain; charset="utf-8" The boot ROM is a minimal implementation designed to load an AST27x0 boot i= mage. Its source code is available at: https://github.com/google/vbootrom Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- MAINTAINERS | 1 + pc-bios/README | 6 ++++++ pc-bios/ast27x0_bootrom.bin | Bin 0 -> 15424 bytes pc-bios/meson.build | 1 + 4 files changed, 8 insertions(+) create mode 100644 pc-bios/ast27x0_bootrom.bin diff --git a/MAINTAINERS b/MAINTAINERS index d54b5578f8..70ab0d0afa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1163,6 +1163,7 @@ F: docs/system/arm/fby35.rst F: tests/*/*aspeed* F: tests/*/*ast2700* F: hw/arm/fby35.c +F: pc-bios/ast27x0_bootrom.bin =20 NRF51 M: Joel Stanley diff --git a/pc-bios/README b/pc-bios/README index f0f13e15f2..d009c37895 100644 --- a/pc-bios/README +++ b/pc-bios/README @@ -89,6 +89,12 @@ more features over time as needed. The source code is available at: https://github.com/google/vbootrom =20 +- 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 + - hppa-firmware.img (32-bit) and hppa-firmware64.img (64-bit) are firmware files for the HP-PARISC (hppa) architecture. They are built form the SeaBIOS-hppa sources, which is a fork of SeaBIOS diff --git a/pc-bios/ast27x0_bootrom.bin b/pc-bios/ast27x0_bootrom.bin new file mode 100644 index 0000000000000000000000000000000000000000..d46403b023c00f989b6facb397d= 57bea7e5c583a GIT binary patch literal 15424 zcmdU0eRNdSwcq#NNeBTckS_|X&P{+W9Ql+0!D6|YM5|(Jh-qb6e3<~D!5|?dR0^~i zD691~zO@(`2&G~IzOHAczAmewkF>Uo)LL8YTY#w4+B!+lVq^PMK$1$B_xqiD?|cM5 z`u=3D>QH}}ptd+)Qq_de$iev#Y}xUz7K#FdRp@Zo(FE>nW17UFK%ge+XTqSb28Zegu)4s%b z>2+KI@xJ^Xz85almiwjSl;4t*O9Dl$j~cT4SzK@6YL|@uh)C6%a_h)U)4J=3D8WMTm(0tEjNI0s?;T(|@O^19T81h8;cfL^H zc?tCzxse_t-xo9TB9lh|PLsn}@r1nQbLMg)D>MmHhv)As1zmsV(AH-kJBl@CZ!I+k1U29^j6qgy4$low$ubl%`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^sj1f-gQ69djU(xprl2eKa->EE3d9^v1Uxi_P%&9l#-hSO89 zim4}n`ye(Qx4XE>^~(3?wsPtup{O2OGes3wO2Mz5txa%nXZ(=3D@B964P_ znHz${d7ixCa5)`EvZ{Ws%Q!*P0Z=3DC+hIsNb`Ie+TeU7hcIz z#(bMdx3>T-HQiEolSiY6!b`g&F5WQS*vbx%sS4m+22OgcLw+vc (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393128895946.8247409466961; Wed, 23 Apr 2025 00:25:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UTI-0002gW-2p; Wed, 23 Apr 2025 03:24:41 -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 1u7UTF-0002fF-5A; Wed, 23 Apr 2025 03:24:37 -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 1u7UTD-0001IR-HM; Wed, 23 Apr 2025 03:24:36 -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; Wed, 23 Apr 2025 15:23:52 +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; Wed, 23 Apr 2025 15:23:52 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v5 06/11] hw/arm/aspeed: Add support for loading vbootrom image via "-bios" Date: Wed, 23 Apr 2025 15:23:42 +0800 Message-ID: <20250423072350.541742-7-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393131145019100 Content-Type: text/plain; charset="utf-8" Introduce "aspeed_load_vbootrom()" to support loading a virtual boot ROM im= age into the vbootrom memory region, using the "-bios" command-line option. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- hw/arm/aspeed.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index b70a120e62..b5831ef4c1 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -27,6 +27,7 @@ #include "system/reset.h" #include "hw/loader.h" #include "qemu/error-report.h" +#include "qemu/datadir.h" #include "qemu/units.h" #include "hw/qdev-clock.h" #include "system/system.h" @@ -305,6 +306,35 @@ static void aspeed_install_boot_rom(AspeedMachineState= *bmc, BlockBackend *blk, rom_size, &error_abort); } =20 +#define VBOOTROM_FILE_NAME "ast27x0_bootrom.bin" + +/* + * This function locates the vbootrom image file specified via the command= line + * using the -bios option. It loads the specified image into the vbootrom + * memory region and handles errors if the file cannot be found or loaded. + */ +static void aspeed_load_vbootrom(MachineState *machine, uint64_t rom_size, + Error **errp) +{ + AspeedMachineState *bmc =3D ASPEED_MACHINE(machine); + const char *bios_name =3D machine->firmware ?: VBOOTROM_FILE_NAME; + g_autofree char *filename =3D NULL; + AspeedSoCState *soc =3D bmc->soc; + int ret; + + filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); + if (!filename) { + error_setg(errp, "Could not find vbootrom image '%s'", bios_name); + return; + } + + ret =3D load_image_mr(filename, &soc->vbootrom); + if (ret < 0) { + error_setg(errp, "Failed to load vbootrom image '%s'", bios_name); + return; + } +} + void aspeed_board_init_flashes(AspeedSMCState *s, const char *flashtype, unsigned int count, int unit0) { @@ -483,6 +513,11 @@ static void aspeed_machine_init(MachineState *machine) } } =20 + if (amc->vbootrom) { + rom_size =3D memory_region_size(&bmc->soc->vbootrom); + aspeed_load_vbootrom(machine, rom_size, &error_abort); + } + arm_load_kernel(ARM_CPU(first_cpu), machine, &aspeed_board_binfo); } =20 --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393211; cv=none; d=zohomail.com; s=zohoarc; b=fcWVZ84E22YBc7g1qV4Y1VW+U4W2ZCWVryB+lP+QR+4p4JIEgi4nxz07rFFJMSx+ncM/Enu00OH6l/CKeykv1my+eRgYBx71jRJLH/HFN5jt0xk513/BPpCEpPj6korvUCxvsXNbb5la0LB3Hj8AhtILgnC33Vw3RK+j9fFXe4U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393211; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=Aw9mOrILWtRnXdvjuGXdd64hvhrK4r7BlUUmDR5pqpY=; b=jhT1cTXNbTK1U59+UpxDk0LnvvjIwR0C9E2yiMsNTJPeuaCWab8oMR23BriZu4lIh87KcRmqWabhK9wZshJAPWmtAPzAcvzon2bynk/i62xbqXGWcm6pOGv9JZJeitQIombAUFCPAYn0l8VlXu3UMU3SV7pwIKkZG2XJ2dONIZY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393211421979.8827796016756; Wed, 23 Apr 2025 00:26:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UTM-0002ky-TM; Wed, 23 Apr 2025 03:24:44 -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 1u7UTH-0002ge-SL; Wed, 23 Apr 2025 03:24:40 -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 1u7UTF-0001IR-WC; Wed, 23 Apr 2025 03:24:39 -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; Wed, 23 Apr 2025 15:23:53 +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; Wed, 23 Apr 2025 15:23:53 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v5 07/11] tests/functional/aspeed: Move I2C test into shared helper for AST2700 reuse Date: Wed, 23 Apr 2025 15:23:43 +0800 Message-ID: <20250423072350.541742-8-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393213319019000 Move the I2C test case into a common helper function (do_ast2700_i2c_test) = so it can be reused across multiple AST2700-based test cases. This reduces duplic= ation and improves maintainability. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Reviewed-by: C=C3=A9dric Le Goater --- tests/functional/test_aarch64_aspeed.py | 28 +++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/tes= t_aarch64_aspeed.py index c25c966278..441f7f3919 100755 --- a/tests/functional/test_aarch64_aspeed.py +++ b/tests/functional/test_aarch64_aspeed.py @@ -18,6 +18,8 @@ class AST2x00MachineSDK(QemuSystemTest): def do_test_aarch64_aspeed_sdk_start(self, image): self.require_netdev('user') self.vm.set_console() + self.vm.add_args('-device', + 'tmp105,bus=3Daspeed.i2c.bus.1,address=3D0x4d,id= =3Dtmp-test') self.vm.add_args('-drive', 'file=3D' + image + ',if=3Dmtd,format= =3Draw', '-net', 'nic', '-net', 'user', '-snapshot') =20 @@ -35,6 +37,17 @@ def do_test_aarch64_aspeed_sdk_start(self, image): 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v= 09.05/ast2700-default-obmc.tar.gz', 'c1f4496aec06743c812a6e9a1a18d032f34d62f3ddb6956e924fef62aa204= 6a5') =20 + def do_ast2700_i2c_test(self): + exec_command_and_wait_for_pattern(self, + 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-1/device/new_device ', + 'i2c i2c-1: new_device: Instantiated device lm75 at 0x4d'); + exec_command_and_wait_for_pattern(self, + 'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '0= ') + self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', + property=3D'temperature', value=3D18000) + exec_command_and_wait_for_pattern(self, + 'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '1= 8000') + def start_ast2700_test(self, name): num_cpu =3D 4 uboot_size =3D os.path.getsize(self.scratch_file(name, @@ -73,8 +86,6 @@ def start_ast2700_test(self, name): f'loader,addr=3D0x430000000,cpu-num=3D{i}') =20 self.vm.add_args('-smp', str(num_cpu)) - self.vm.add_args('-device', - 'tmp105,bus=3Daspeed.i2c.bus.1,address=3D0x4d,id= =3Dtmp-test') self.do_test_aarch64_aspeed_sdk_start( self.scratch_file(name, 'image-bmc')) =20 @@ -83,28 +94,19 @@ def start_ast2700_test(self, name): exec_command_and_wait_for_pattern(self, 'root', 'Password:') exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~= #') =20 - exec_command_and_wait_for_pattern(self, - 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-1/device/new_device ', - 'i2c i2c-1: new_device: Instantiated device lm75 at 0x4d'); - exec_command_and_wait_for_pattern(self, - 'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '0= ') - self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', - property=3D'temperature', value=3D18000) - exec_command_and_wait_for_pattern(self, - 'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '1= 8000') - def test_aarch64_ast2700_evb_sdk_v09_05(self): self.set_machine('ast2700-evb') =20 self.archive_extract(self.ASSET_SDK_V905_AST2700) self.start_ast2700_test('ast2700-a0-default') + self.do_ast2700_i2c_test() =20 def test_aarch64_ast2700a1_evb_sdk_v09_05(self): self.set_machine('ast2700a1-evb') =20 self.archive_extract(self.ASSET_SDK_V905_AST2700A1) self.start_ast2700_test('ast2700-default') - + self.do_ast2700_i2c_test() =20 if __name__ =3D=3D '__main__': QemuSystemTest.main() --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393166; cv=none; d=zohomail.com; s=zohoarc; b=XTHHaS56Ayfi47Gq3jkdIPaufuPsJNo7sQSjGE/GHfAxcQS3gEBwKwDgI8uBb01PX6kRo/sPHPNm2rJfdMD9mpU8h5sszxMfL1XMhJn7wyj4c50r+L2YyJImdK9CnVz/jrsnkwlpc7PwmgcroIAZnhT1TuQPTrzy5ehzoyUXfSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393166; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=UurvZ+3ga7HOUMpCIbLJRGgebjrsoxpcYABVcVgsFFc=; b=nixhaQBJb6+U7jrTj3nG+GlYxjBWzFljhKwzju97wjBd9eVfHtzntz58zqtOD5oixpAKrpWsXdo3XzLBbTCDxMa7P0wvFARJOHVdQWLq9AljYsnPo1YEdDZZYhQP70nPJdKucoSwJ92WUtXyJiaSwvKlCkuKNKz86MKVGS4newk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174539316621639.47735301423802; Wed, 23 Apr 2025 00:26:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UTO-0002nW-PR; Wed, 23 Apr 2025 03:24:46 -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 1u7UTK-0002jZ-Fh; Wed, 23 Apr 2025 03:24:43 -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 1u7UTI-0001IR-NK; Wed, 23 Apr 2025 03:24:42 -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; Wed, 23 Apr 2025 15:23:53 +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; Wed, 23 Apr 2025 15:23:53 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v5 08/11] tests/functional/aspeed: Update test ASPEED SDK v09.06 Date: Wed, 23 Apr 2025 15:23:44 +0800 Message-ID: <20250423072350.541742-9-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393167130019100 Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater --- tests/functional/test_aarch64_aspeed.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/tes= t_aarch64_aspeed.py index 441f7f3919..337d701917 100755 --- a/tests/functional/test_aarch64_aspeed.py +++ b/tests/functional/test_aarch64_aspeed.py @@ -29,13 +29,13 @@ def do_test_aarch64_aspeed_sdk_start(self, image): wait_for_console_pattern(self, '## Loading kernel from FIT Image') wait_for_console_pattern(self, 'Starting kernel ...') =20 - ASSET_SDK_V905_AST2700 =3D Asset( - 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v= 09.05/ast2700-a0-default-obmc.tar.gz', - 'cfbbd1cce72f2a3b73b9080c41eecdadebb7077fba4f7806d72ac99f3e84b= 74a') + ASSET_SDK_V906_AST2700 =3D Asset( + 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v= 09.06/ast2700-a0-default-obmc.tar.gz', + '7247b6f19dbfb700686f8d9f723ac23f3eb229226c0589cb9b06b80d1b61f= 3cb') =20 - ASSET_SDK_V905_AST2700A1 =3D Asset( - 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v= 09.05/ast2700-default-obmc.tar.gz', - 'c1f4496aec06743c812a6e9a1a18d032f34d62f3ddb6956e924fef62aa204= 6a5') + ASSET_SDK_V906_AST2700A1 =3D Asset( + 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v= 09.06/ast2700-default-obmc.tar.gz', + 'f1d53e0be8a404ecce3e105f72bc50fa4e090ad13160ffa91b10a6e0233a9= dc6') =20 def do_ast2700_i2c_test(self): exec_command_and_wait_for_pattern(self, @@ -94,17 +94,17 @@ def start_ast2700_test(self, name): exec_command_and_wait_for_pattern(self, 'root', 'Password:') exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~= #') =20 - def test_aarch64_ast2700_evb_sdk_v09_05(self): + def test_aarch64_ast2700_evb_sdk_v09_06(self): self.set_machine('ast2700-evb') =20 - self.archive_extract(self.ASSET_SDK_V905_AST2700) + self.archive_extract(self.ASSET_SDK_V906_AST2700) self.start_ast2700_test('ast2700-a0-default') self.do_ast2700_i2c_test() =20 - def test_aarch64_ast2700a1_evb_sdk_v09_05(self): + def test_aarch64_ast2700a1_evb_sdk_v09_06(self): self.set_machine('ast2700a1-evb') =20 - self.archive_extract(self.ASSET_SDK_V905_AST2700A1) + self.archive_extract(self.ASSET_SDK_V906_AST2700A1) self.start_ast2700_test('ast2700-default') self.do_ast2700_i2c_test() =20 --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393301; cv=none; d=zohomail.com; s=zohoarc; b=HIuwn7z0I97czIMqQetXs3hOn5qL0Ou/L+GSTu1ihE6O1xuagU18R/5et08QCOYEy83M5g3bamE74qqM8RiTS9g3XuJhIAbpU0vHQ3MnhEdYKJNDiSfrhjtkGWJ9FVtUwrx8KpXyEIPlKcniMZ5RclYryinC/uufhFjVlFCQpBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393301; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=vg1PVUZvkgQ+E8ppw9P+TluQKsYTAIqvkdCryZl7Iyo=; b=jYvH02IrlzTzpSfjBJT0sWlPutXY6NWlcdYNp6dXqa3ZTD8h6dD10PBD5hbUmukGjQGK7h3actWyC43BHA41X/LhaGUOTqd51ofI+G/KjimTuiVe6NZI8fzhfHXCUDBb/ZSqj0z9gCW2yPz2k6vGg6B4P78n1xRE/z3VrH+W08Y= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393301155334.2046541310806; Wed, 23 Apr 2025 00:28:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UTR-0002qr-IK; Wed, 23 Apr 2025 03:24:50 -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 1u7UTN-0002nZ-Em; Wed, 23 Apr 2025 03:24:46 -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 1u7UTL-0001IR-7o; Wed, 23 Apr 2025 03:24:44 -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; Wed, 23 Apr 2025 15:23:53 +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; Wed, 23 Apr 2025 15:23:53 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v5 09/11] tests/functional/aspeed: extract boot and login sequence into helper function Date: Wed, 23 Apr 2025 15:23:45 +0800 Message-ID: <20250423072350.541742-10-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393303416019100 Content-Type: text/plain; charset="utf-8" Extracted repeated boot and login steps into a new helper function. No change in functional behavior. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater --- tests/functional/test_aarch64_aspeed.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/tes= t_aarch64_aspeed.py index 337d701917..2f04655b60 100755 --- a/tests/functional/test_aarch64_aspeed.py +++ b/tests/functional/test_aarch64_aspeed.py @@ -25,10 +25,15 @@ def do_test_aarch64_aspeed_sdk_start(self, image): =20 self.vm.launch() =20 + def verify_openbmc_boot_and_login(self, name): wait_for_console_pattern(self, 'U-Boot 2023.10') wait_for_console_pattern(self, '## Loading kernel from FIT Image') wait_for_console_pattern(self, 'Starting kernel ...') =20 + wait_for_console_pattern(self, f'{name} login:') + exec_command_and_wait_for_pattern(self, 'root', 'Password:') + exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~= #') + ASSET_SDK_V906_AST2700 =3D Asset( 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v= 09.06/ast2700-a0-default-obmc.tar.gz', '7247b6f19dbfb700686f8d9f723ac23f3eb229226c0589cb9b06b80d1b61f= 3cb') @@ -89,16 +94,12 @@ def start_ast2700_test(self, name): self.do_test_aarch64_aspeed_sdk_start( self.scratch_file(name, 'image-bmc')) =20 - wait_for_console_pattern(self, f'{name} login:') - - exec_command_and_wait_for_pattern(self, 'root', 'Password:') - exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~= #') - def test_aarch64_ast2700_evb_sdk_v09_06(self): self.set_machine('ast2700-evb') =20 self.archive_extract(self.ASSET_SDK_V906_AST2700) self.start_ast2700_test('ast2700-a0-default') + self.verify_openbmc_boot_and_login('ast2700-a0-default') self.do_ast2700_i2c_test() =20 def test_aarch64_ast2700a1_evb_sdk_v09_06(self): @@ -106,6 +107,7 @@ def test_aarch64_ast2700a1_evb_sdk_v09_06(self): =20 self.archive_extract(self.ASSET_SDK_V906_AST2700A1) self.start_ast2700_test('ast2700-default') + self.verify_openbmc_boot_and_login('ast2700-default') self.do_ast2700_i2c_test() =20 if __name__ =3D=3D '__main__': --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393153; cv=none; d=zohomail.com; s=zohoarc; b=ZHJdPUuH9VLuP7Y+wyp4Xo5ixOWofhQ08atT7holQ9m++22M572Y6kHbpYFRhtKXbyD84paHk5cFbqM9XT3CWCoV0APBeswgL1Ek4Oz6+6McjbZUnonCgPP2ApQV9KjViHQnT+3JVCigFj6VIzkKAbuD2qim1jWvriGlkmliwLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393153; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=5Vu4UZSKzlzTX5F17MRz9kyTv8OKaXGnric/ehb1dx8=; b=msGHkbbjyARy0ZnfHhieo1gK8RLWFf2vSaKyszoomWc1Le36wzsBwtg2KeCiuzoQIRcHtrujR8qT10y6dWJYcreH13xqnD6sc9t2MLtNgox5V0Hpno3jsXiE0arqgnt4bNf+IUGoryZO+ge0eJvhevR1hC3Vj1DqfI5zi91iR+c= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393153516808.451542357765; Wed, 23 Apr 2025 00:25:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UTX-0002ti-S9; Wed, 23 Apr 2025 03:24:55 -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 1u7UTQ-0002qW-2D; Wed, 23 Apr 2025 03:24:48 -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 1u7UTO-0001IR-F1; Wed, 23 Apr 2025 03:24:47 -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; Wed, 23 Apr 2025 15:23:53 +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; Wed, 23 Apr 2025 15:23:53 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v5 10/11] tests/functional/aspeed: Add to test vbootrom for AST2700 Date: Wed, 23 Apr 2025 15:23:46 +0800 Message-ID: <20250423072350.541742-11-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393155270019100 Content-Type: text/plain; charset="utf-8" Add the AST2700 functional test to boot using the vbootrom image instead of manually loading boot components with -device loader. The boot ROM binary is now passed via the -bios option, using the image located in pc-bios/ast27x0_bootrom.bin. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater --- tests/functional/test_aarch64_aspeed.py | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/tes= t_aarch64_aspeed.py index 2f04655b60..34ddfa852c 100755 --- a/tests/functional/test_aarch64_aspeed.py +++ b/tests/functional/test_aarch64_aspeed.py @@ -25,6 +25,18 @@ def do_test_aarch64_aspeed_sdk_start(self, image): =20 self.vm.launch() =20 + def verify_vbootrom_firmware_flow(self): + wait_for_console_pattern(self, 'Found valid FIT image') + wait_for_console_pattern(self, '[uboot] loading') + wait_for_console_pattern(self, 'done') + wait_for_console_pattern(self, '[fdt] loading') + wait_for_console_pattern(self, 'done') + wait_for_console_pattern(self, '[tee] loading') + wait_for_console_pattern(self, 'done') + wait_for_console_pattern(self, '[atf] loading') + wait_for_console_pattern(self, 'done') + wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-= A)') + def verify_openbmc_boot_and_login(self, name): wait_for_console_pattern(self, 'U-Boot 2023.10') wait_for_console_pattern(self, '## Loading kernel from FIT Image') @@ -94,6 +106,11 @@ def start_ast2700_test(self, name): self.do_test_aarch64_aspeed_sdk_start( self.scratch_file(name, 'image-bmc')) =20 + def start_ast2700_test_vbootrom(self, name): + self.vm.add_args('-bios', 'ast27x0_bootrom.bin') + self.do_test_aarch64_aspeed_sdk_start( + self.scratch_file(name, 'image-bmc')) + def test_aarch64_ast2700_evb_sdk_v09_06(self): self.set_machine('ast2700-evb') =20 @@ -110,5 +127,14 @@ def test_aarch64_ast2700a1_evb_sdk_v09_06(self): self.verify_openbmc_boot_and_login('ast2700-default') self.do_ast2700_i2c_test() =20 + def test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_06(self): + self.set_machine('ast2700a1-evb') + + self.archive_extract(self.ASSET_SDK_V906_AST2700A1) + self.start_ast2700_test_vbootrom('ast2700-default') + self.verify_vbootrom_firmware_flow() + self.verify_openbmc_boot_and_login('ast2700-default') + self.do_ast2700_i2c_test() + if __name__ =3D=3D '__main__': QemuSystemTest.main() --=20 2.43.0 From nobody Sat Feb 7 05:00:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1745393178; cv=none; d=zohomail.com; s=zohoarc; b=bIa+mlSOKzqNgdxawfZTLdjT7H1V9nnISEjrRu00DMSXUsllsaitva+/L18O0N+Fez8fUNNpg3eiJQRpBdPLdGganWx8JK1EPbV1jYvItn2/567mwq2Jlce7hs3D8rMDp3dRdZ1Y+KHG5/n8iL9fQwB3f0iu0jkTDEpIoiUnSQw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393178; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=haOzF8pY/PNnBIkbbdpPg8F4e8uhbqZE92yLoxRVANE=; b=GqNhHP44/b4tE9+llPBjMoF3ZmZpKwPBlJu3rYc4jKU9eBU/jTzsJdyB+cur4Sjsibt3M0kjaRE3edoEsTCP5+4TdvoHQZ/+UtXkd8Ivz+DqK9bGZh3axBiaPShqSJR9bwShPO2XE0e4y/FK++WzYG3uwOF8lMjeqk5H/j0DfTQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393178422926.9787369118095; Wed, 23 Apr 2025 00:26:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UTZ-0002u5-R7; Wed, 23 Apr 2025 03:24:57 -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 1u7UTV-0002si-HX; Wed, 23 Apr 2025 03:24:53 -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 1u7UTS-0001Ov-HW; Wed, 23 Apr 2025 03:24:52 -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; Wed, 23 Apr 2025 15:23:54 +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; Wed, 23 Apr 2025 15:23:54 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v5 11/11] docs/system/arm/aspeed: Support vbootrom for AST2700 Date: Wed, 23 Apr 2025 15:23:47 +0800 Message-ID: <20250423072350.541742-12-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250423072350.541742-1-jamin_lin@aspeedtech.com> References: <20250423072350.541742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1745393179237019100 Content-Type: text/plain; charset="utf-8" Using the vbootrom image support and the boot ROM binary is now passed via the -bios option, using the image located in pc-bios/ast27x0_bootrom.bin. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Reviewed-by: C=C3=A9dric Le Goater --- docs/system/arm/aspeed.rst | 96 +++++++++++++++++++++++++++++++++++--- 1 file changed, 90 insertions(+), 6 deletions(-) diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst index 97fd6a0e7f..e15e276a48 100644 --- a/docs/system/arm/aspeed.rst +++ b/docs/system/arm/aspeed.rst @@ -1,4 +1,4 @@ -Aspeed family boards (``ast2500-evb``, ``ast2600-evb``, ``ast2700-evb``, `= `bletchley-bmc``, ``fuji-bmc``, ``fby35-bmc``, ``fp5280g2-bmc``, ``g220a-bm= c``, ``palmetto-bmc``, ``qcom-dc-scm-v1-bmc``, ``qcom-firework-bmc``, ``qua= nta-q71l-bmc``, ``rainier-bmc``, ``romulus-bmc``, ``sonorapass-bmc``, ``sup= ermicrox11-bmc``, ``supermicrox11spi-bmc``, ``tiogapass-bmc``, ``witherspoo= n-bmc``, ``yosemitev2-bmc``) +Aspeed family boards (``ast2500-evb``, ``ast2600-evb``, ``bletchley-bmc``,= ``fuji-bmc``, ``fby35-bmc``, ``fp5280g2-bmc``, ``g220a-bmc``, ``palmetto-b= mc``, ``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``, ``yosemi= tev2-bmc``) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D =20 The QEMU Aspeed machines model BMCs of various OpenPOWER systems and @@ -39,10 +39,6 @@ AST2600 SoC based machines : - ``qcom-dc-scm-v1-bmc`` Qualcomm DC-SCM V1 BMC - ``qcom-firework-bmc`` Qualcomm Firework BMC =20 -AST2700 SoC based machines : - -- ``ast2700-evb`` Aspeed AST2700 Evaluation board (Cortex-A35) - Supported devices ----------------- =20 @@ -247,10 +243,78 @@ under Linux), use : =20 -M ast2500-evb,bmc-console=3Duart3 =20 +Aspeed 2700 family boards (``ast2700-evb``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The QEMU Aspeed machines model BMCs of Aspeed evaluation boards. +They are based on different releases of the Aspeed SoC : +the AST2700 with quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz) + +The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C, +etc. + +AST2700 SoC based machines : + +- ``ast2700-evb`` Aspeed AST2700 Evaluation board (Cortex-A35) + +Supported devices +----------------- + * Interrupt Controller + * Timer Controller + * RTC Controller + * I2C Controller + * System Control Unit (SCU) + * SRAM mapping + * X-DMA Controller (basic interface) + * Static Memory Controller (SMC or FMC) - Only SPI Flash support + * SPI Memory Controller + * USB 2.0 Controller + * SD/MMC storage controllers + * SDRAM controller (dummy interface for basic settings and training) + * Watchdog Controller + * GPIO Controller (Master only) + * UART + * Ethernet controllers + * Front LEDs (PCA9552 on I2C bus) + * LPC Peripheral Controller (a subset of subdevices are supported) + * Hash/Crypto Engine (HACE) - Hash support only. TODO: Crypto + * ADC + * eMMC Boot Controller (dummy) + * PECI Controller (minimal) + * I3C Controller + * Internal Bridge Controller (SLI dummy) + +Missing devices +--------------- + * Coprocessor support + * PWM and Fan Controller + * Slave GPIO Controller + * Super I/O Controller + * PCI-Express 1 Controller + * Graphic Display Controller + * MCTP Controller + * Mailbox Controller + * Virtual UART + * eSPI Controller + +Boot options +------------ + +Images can be downloaded from the ASPEED Forked OpenBMC GitHub release rep= ository : + + https://github.com/AspeedTech-BMC/openbmc/releases + Booting the ast2700-evb machine ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ =20 -Boot the AST2700 machine from the flash image, use an MTD drive : +Boot the AST2700 machine from the flash image. + +There are two supported methods for booting the AST2700 machine with a fla= sh image: + +Manual boot using ``-device loader``: + +It causes all 4 CPU cores to start execution from address ``0x430000000``,= which +corresponds to the BL31 image load address. =20 .. code-block:: bash =20 @@ -270,6 +334,26 @@ Boot the AST2700 machine from the flash image, use an = MTD drive : -drive file=3D${IMGDIR}/image-bmc,format=3Draw,if=3Dmtd \ -nographic =20 +Boot using a virtual boot ROM (``-bios``): + +If users do not specify the ``-bios option``, QEMU will attempt to load the +default vbootrom image ``ast27x0_bootrom.bin`` from either the current wor= king +directory or the ``pc-bios`` directory within the QEMU source tree. + +.. code-block:: bash + + $ qemu-system-aarch64 -M ast2700-evb \ + -drive file=3Dimage-bmc,format=3Draw,if=3Dmtd \ + -nographic + +The ``-bios`` option allows users to specify a custom path for the vbootrom +image to be loaded during boot. This will load the vbootrom image from the +specified path in the ${HOME} directory. + +.. code-block:: bash + + -bios ${HOME}/ast27x0_bootrom.bin + Aspeed minibmc family boards (``ast1030-evb``) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.43.0