From nobody Sun Nov 16 00:57:37 2025 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=1744252874; cv=none; d=zohomail.com; s=zohoarc; b=F/9r9glD9sh1OE6a/52esSasGQ2hLBKwg+8oVvpWY4BgU1tq0sb2ea3lMmzmZSSvq3UoN8gmIY0R+Py1VpYw8e+2vEH2E5ATcyGjgo8qwtR6D7HHHZCqk5BAmEN3EbB6tYNUSN0bZAMSJEGrdOzxoMlVMn55lOaB58tLKDPfaas= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252874; 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=GWjdo0wNC2DBRF28gJV6lJ/VcRxLfOceJCY45zV70RM=; b=PiESAF9k6KVHsgpGqBaS/4WoaqVVjrPvC4ulhLK966dMjvWdGcxjDaHf/ACa7WBgkWalEvAiI2TGB1EzYjTjU5hZ5oFBT7JLYJOoe7fzpHJLVyuhcH+r+JXiYYFPfZrvTel2t2OiPbW9fNi1O5HYgn4wvtf0gmBEKlxtCCOuxSM= 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 1744252874487308.4374712034801; Wed, 9 Apr 2025 19:41:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hov-0001Yj-90; Wed, 09 Apr 2025 22:39:13 -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 1u2hos-0001Y8-Lw; Wed, 09 Apr 2025 22:39:10 -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 1u2hoq-00033O-J9; Wed, 09 Apr 2025 22:39:10 -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:57 +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:57 +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 v2 01/10] hw/arm/aspeed: Introduced ASPEED_DEV_VBOOTROM in the device enumeration Date: Thu, 10 Apr 2025 10:38:45 +0800 Message-ID: <20250410023856.500258-2-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252875969019000 Content-Type: text/plain; charset="utf-8" Introduced ASPEED_DEV_VBOOTROM into the ASPEED device enumeration to suppor= t a virtual boot ROM. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed_soc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index f069d17d16..37cd7cd793 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -169,6 +169,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, --=20 2.43.0 From nobody Sun Nov 16 00:57:37 2025 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=1744252772; cv=none; d=zohomail.com; s=zohoarc; b=I/xU4aZdMuy66FuCGsmh0y3KTtHx9o7m2ZBJjE6aRyU5BOS7JOb41c3doppRQPQsp3kU7BiBObYwmmMqvzJ7jRe20m9iErjMTGN1GDFtjXsx+q/n/uUYt+gzXMMz0TZ0yAkvq49CRjKg9+sNGD3B21V+6yKg6p9xhsQ3MXyEveE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252772; 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=DeU5IajzPOwR0vaMMjl3nTCpm93r6jegus1pe/jx2Vc=; b=E8zxSP1GR3Mv0znshkU+3MZN4rOhTlE8moEb1xlMGEexxkmPo0RLKAo0hdovB8Ue9dyDhVpDCpPR8uMB5eYhpUEG1wgOlCvTGXYuKz3vqmk6ey8QZBYTrMLFlDMUWIJ9phk1rTxq1kzz5d0+4QdoILgvzp0+XvHPT4ZSQym1brA= 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 1744252772841929.9269299506583; Wed, 9 Apr 2025 19:39:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hox-0001ZJ-AR; Wed, 09 Apr 2025 22:39:15 -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 1u2hov-0001Ym-P6; Wed, 09 Apr 2025 22:39:14 -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 1u2hou-00033O-AW; Wed, 09 Apr 2025 22:39:13 -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:57 +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:57 +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 v2 02/10] hw/arm/aspeed_ast27x0: Add "vbootrom_size" field to AspeedSoCClass Date: Thu, 10 Apr 2025 10:38:46 +0800 Message-ID: <20250410023856.500258-3-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252775802019100 Content-Type: text/plain; charset="utf-8" Introduced a "vbootrom_size" attribute in "AspeedSoCClass" to define virtual boot ROM size. Initialized "vbootrom_size" to "0x20000" for both AST2700 A0 and A1 variant= s. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast27x0.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index 37cd7cd793..432f6178ac 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -152,6 +152,7 @@ struct AspeedSoCClass { const char * const *valid_cpu_types; uint32_t silicon_rev; uint64_t sram_size; + uint64_t vbootrom_size; uint64_t secsram_size; int spis_num; int ehcis_num; diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index dce7255a2c..81dd90ffdd 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -898,6 +898,7 @@ static void aspeed_soc_ast2700a0_class_init(ObjectClass= *oc, void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST2700_A0_SILICON_REV; + sc->vbootrom_size =3D 0x20000; sc->sram_size =3D 0x20000; sc->spis_num =3D 3; sc->wdts_num =3D 8; @@ -925,6 +926,7 @@ static void aspeed_soc_ast2700a1_class_init(ObjectClass= *oc, void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST2700_A1_SILICON_REV; + sc->vbootrom_size =3D 0x20000; sc->sram_size =3D 0x20000; sc->spis_num =3D 3; sc->wdts_num =3D 8; --=20 2.43.0 From nobody Sun Nov 16 00:57:37 2025 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=1744252811; cv=none; d=zohomail.com; s=zohoarc; b=FWx/ihS2mBEXIo2uXX8qZWhBvNulEMstgGGBnXmuZtwyp75kJOk0GhpZHsRrFUmUByM0Y2u7NWK8u5shb1KVc+YMLVB+/WkumaA88WJmcoN9aDg74H6EzkAEcehqS4LL3vYabLnhDDve34JYrhAaQgDPyc9/Rx4hrkDmPhERu84= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252811; 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=w3h7ZrudNt8iWMML682qTEde2gcBy5R43IwugJ5epG0=; b=n3rh+LaQ59XsyaAyLaDrXbRtEn8C53eAy+JPVNgX7zjl39fD9t+3F3RQV3LHS2GZ3Igs+9mncXgdquM376DhpXRu5kN8/DcP/MzJ5Xq1JgQylc07iFoJkFB+no2zwxnt0wmbBIUltnRm+EXkusWHGc4s1YBgRGdcsh5qHr+7r8U= 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 1744252811064314.97508011838477; Wed, 9 Apr 2025 19:40:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hp1-0001aQ-GW; Wed, 09 Apr 2025 22:39:19 -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 1u2hoy-0001ZY-B9; Wed, 09 Apr 2025 22:39:16 -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 1u2how-00033O-Pg; Wed, 09 Apr 2025 22:39:15 -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:57 +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:57 +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 v2 03/10] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize Date: Thu, 10 Apr 2025 10:38:47 +0800 Message-ID: <20250410023856.500258-4-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252811823019000 Content-Type: text/plain; charset="utf-8" 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 --- 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 81dd90ffdd..c7188ae5f1 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 Sun Nov 16 00:57:37 2025 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=1744252797; cv=none; d=zohomail.com; s=zohoarc; b=TqsXqpc+ZzwB0f9u7OjWI6e3EOMO6bXQNVpgAzPcZRe1RAaz/0kjlJaah2qtDIEG0LKGAucn8SYv2dgmi2mHXdEiw5yLMqLFgvCqCWxDk9z4vn23fMphi/sj0JLQefbVCAK+LfnichreSEupGI5rhDFr05iF5PPJ6LDq9+ZrhiI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252797; 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=iuiyeA382qpql8ri4f4K9qX62ldJ6xVrOZBRlakcIq4=; b=FQyxl9GZc1Sb1nF3mNsUXSFEKaz9wGtyxwUVO+nnWTH3qmydsQ+CJQlemhugkSS1+P4SfOgWcJnNRxKl06YgA5j4k138BeGBL+FqPOV/4zlpI95dDj5gichNr80XTqMPlVdRLJaWeYfDZu7ca14UdPwBVG32BuSAwAhe0hOlyvk= 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 174425279749241.283978315345166; Wed, 9 Apr 2025 19:39:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hp5-0001bb-G5; Wed, 09 Apr 2025 22:39: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 1u2hp1-0001aX-3n; Wed, 09 Apr 2025 22:39:19 -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 1u2hoz-00033O-Hs; Wed, 09 Apr 2025 22:39: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.1258.12; Thu, 10 Apr 2025 10:38:58 +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:58 +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 v2 04/10] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region Date: Thu, 10 Apr 2025 10:38:48 +0800 Message-ID: <20250410023856.500258-5-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252799819019000 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 region is initialized as ROM and registered in the SoC's addre= ss space using the ASPEED_DEV_VBOOTROM index. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast27x0.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index 432f6178ac..9af8cfbc3e 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; diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index c7188ae5f1..0982e63639 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,15 @@ 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 */ + name =3D g_strdup_printf("aspeed.vbootrom.%d", CPU(&a->cpu[0])->cpu_in= dex); + if (!memory_region_init_rom(&s->vbootrom, OBJECT(s), name, + sc->vbootrom_size, 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 Sun Nov 16 00:57:37 2025 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=1744252863; cv=none; d=zohomail.com; s=zohoarc; b=PlLZ2bCPSu/n8/VclJQXJ4LcviCwxukQOPISgezbW2PsLyUZlk8++9tBphABrpu2o4kUMJvq0LgjjWP9xJoJoHEQZpNwgzV+rhzuj5mWQlbWcNScIO+PNQATalQbk5Uf4A6HE3hvFzUIhEupC6drxXQ0T6R0VCnkA2tj/llqeHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252863; 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=uub180QPJTmkwEoENx1zMhvdmX3t2SEoJpjuNOM6BzY=; b=EDdQKybEL4M+AdiktKXUwf6+8fGK0a/RcI0qXcXJ2bNBU2eD0l3i6aF1y7x8PVTQ5R0aMh5eYblFoH5Qgumwxi0Khg8o+CW+BlYS7BYFU074Ocj+lBPpwibn8z6duLSCA6sqjLSzVvfxUrX9ETYyjc9ruiPcdExiXxATTaOQRx4= 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 1744252863572388.68192791042827; Wed, 9 Apr 2025 19:41:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hpH-0001dH-JO; Wed, 09 Apr 2025 22:39:37 -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 1u2hp5-0001bU-4O; Wed, 09 Apr 2025 22:39:23 -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 1u2hp2-00033O-4w; Wed, 09 Apr 2025 22:39:21 -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:58 +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:58 +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 v2 05/10] hw/arm/aspeed: Enable vbootrom support by default on AST2700 EVB machines Date: Thu, 10 Apr 2025 10:38:49 +0800 Message-ID: <20250410023856.500258-6-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252863950019000 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 --- 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 Sun Nov 16 00:57:37 2025 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=1744252861; cv=none; d=zohomail.com; s=zohoarc; b=GdRr2js/g/2EuRzTsizZEMqcm3AAxJX8sU/tRFej04j8SwccZQmtL72i97z/Xj1EiP7ZYwYSZ6Wib+yBocQS3T4tukVwbXijN3amhzHrTjns3cxI/LVgfyN0qH6bNE882fraMP5AYuzuTcbisYUWOZqX+dJx2vlPHg/GJtOeXPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252861; 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=CLIFVfL/nitJqiJHHsKGiq0+8hWaRbOQrV4MP7ew1iU=; b=FBCeuHvKmX5HnKdjq5mntTtQXTtGj1mCz9PPvyTmPC34vRdjVxovXRicsqsw1bn0Oz2oCSL5NSWylSDxf+ukE7q0CsxxvDizxSe7G3c665gHMjiRYurpdvMepj8QqtIZFDV5jNPXPheys6ELkZQNVGkR/20VzJvgLGwGfXxrTvQ= 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 1744252861206190.77140971951962; Wed, 9 Apr 2025 19:41:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hpL-0001iU-NG; Wed, 09 Apr 2025 22:39:39 -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 1u2hp6-0001cM-Vp; Wed, 09 Apr 2025 22:39:26 -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 1u2hp5-00033O-8x; Wed, 09 Apr 2025 22:39:24 -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:58 +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:58 +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 v2 06/10] hw/arm/aspeed: Reuse rom_size variable for vbootrom setup Date: Thu, 10 Apr 2025 10:38:50 +0800 Message-ID: <20250410023856.500258-7-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252862026019000 Content-Type: text/plain; charset="utf-8" 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 --- 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 Sun Nov 16 00:57:37 2025 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=1744252848; cv=none; d=zohomail.com; s=zohoarc; b=NkGRbzgkjuTm3am5el0feZPKtphm7Z9jGtNAzDP0Xdt9IXMq7/42OnirGi6LMejruygCtdeVd8XDQLweOi4MxTeJMwDAA7JHwrLJq29TKF6uyKBik8LPbm4Ug0enh6KXeF1YRoq/aOKeZByqZNlO6RywHNOMBRys73h0p65i/ug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252848; 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=hZOaTi1KFurhNfs7Pt//Tt9ZUXJJVTNTCs/9DsiKHF4=; b=hoWAWPmVsS7v1f7QiNWoUDS5+0tjU9Gr1SpTe9IE0LZie4PDQAxIhJEJJcY8i7Qu2arjvGjbJjUnUSnXwJ3Z2T9gPi+VVukGMHWoa3/a+IN4TriQWL5nIgGoP7LqWiKOeOgQx7Ny+VzcC0bLvtk8wwkSJ48p+k9WtBSQy8clc6s= 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 1744252848258488.2435831598084; Wed, 9 Apr 2025 19:40:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hpO-0001md-AZ; Wed, 09 Apr 2025 22:39:42 -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 1u2hpE-0001fU-3J; Wed, 09 Apr 2025 22:39:33 -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 1u2hp7-00033O-UH; Wed, 09 Apr 2025 22:39:30 -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:58 +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:58 +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 v2 07/10] hw/arm/aspeed: Add support for loading vbootrom image via "-bios" Date: Thu, 10 Apr 2025 10:38:51 +0800 Message-ID: <20250410023856.500258-8-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252849734019100 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 Tested-By: Nabih Estefan --- hw/arm/aspeed.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index b70a120e62..2811868c1a 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,32 @@ static void aspeed_install_boot_rom(AspeedMachineState= *bmc, BlockBackend *blk, rom_size, &error_abort); } =20 +/* + * 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) +{ + AspeedMachineState *bmc =3D ASPEED_MACHINE(machine); + const char *bios_name =3D machine->firmware; + 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_report("Could not find vbootrom image '%s'", bios_name); + exit(1); + } + + ret =3D load_image_mr(filename, &soc->vbootrom); + if (ret < 0) { + error_report("Failed to load vbootrom image '%s'", filename); + exit(1); + } +} + void aspeed_board_init_flashes(AspeedSMCState *s, const char *flashtype, unsigned int count, int unit0) { @@ -483,6 +510,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); + } + arm_load_kernel(ARM_CPU(first_cpu), machine, &aspeed_board_binfo); } =20 --=20 2.43.0 From nobody Sun Nov 16 00:57:37 2025 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=1744252857; cv=none; d=zohomail.com; s=zohoarc; b=X+rSwJpAi68ZYWlq45LuvzKgm+Whrfr7LnssMEP6vz81WdQtUvzFXjXkfafMWTAd+xdjUM/G7/0pP0WZz93vJvTVQqck/p/Zf9Jt5kPizZ8VqUsPTy1Y9Uoc+2dKDUKh3IpyZXRHQLmeiSbFb0pxdF3hfvHYgRcDHxuPUKh0f4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252857; 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=vyV+oewOy1MBKbMO0teHDgAw1oqViURpoLDjih1N/rk=; b=eEMMZEeufqKdWUjxfYlLoE2FyOfP6zi01eDHHkbjIQK0g3VGVkUZXTsh+vmcACSZiQE178PV0pugURO0y5RJtbKwn/0a0zzNuD+OScVriE02B7HuM68Se8i1De+RnoeJsnQgJ1kOEKmC7rLGdNcR9jsoCGgzeK/RFUjV3f6yxzI= 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 1744252857972289.2512205727885; Wed, 9 Apr 2025 19:40:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hpP-0001oO-D8; Wed, 09 Apr 2025 22:39:43 -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 1u2hpH-0001hB-LA; Wed, 09 Apr 2025 22:39: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 1u2hpE-00033O-Uv; Wed, 09 Apr 2025 22:39:35 -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:59 +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:59 +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 v2 08/10] pc-bios: Add AST27x0 vBootrom Date: Thu, 10 Apr 2025 10:38:52 +0800 Message-ID: <20250410023856.500258-9-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252859967019000 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 --- MAINTAINERS | 1 + pc-bios/README | 6 ++++++ pc-bios/ast27x0_bootrom.bin | Bin 0 -> 15464 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..e50f56eed9deeea65cbc1dd3789= 7d59b1ff64ddd GIT binary patch literal 15464 zcmdUWeRNdix$m?0o`jG@3gios)$AnDOGgk80*TUQXA&tE+d@pO%a4@_Bs3T#gb9@b zJ(*DNEw}0FVwwp-1QMt{$4ouhoM zc^@#n6~+s%;Om#d7vIM7QBCgjN#9wYCC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33;o!_0Ol!rG6d({NsS1PrIkW`>3D$Ch3Rkz66{{a5&)lI_bQD zu|pV(%agM1e(m;2bWGrw>F`V7ti?U_?B)SLGI>;Hk#03$vPWaF6NI@6fBs2y=3D`TBg zvky4qE{^|j_K_@KS7vysuRCM^l&YTe18Kg8JO>SOm0Bj0{eiz48;{#u{Ddsk-TJL@ z(@@{%0ow%FY8Te66Q2WVCl|9wFe(Yp{~>Mn-wAI4z8diR03VlS>)~lfuJJwWsp`rO zXLV=3DppIX(EabQZ-L+J<88nEQ=3DQpHiZVlQY^8 zV~KbSBKbP^fTdsl9=3DL+T=3D)Ep(LUt85tn$hHDfw~OSqq#yC*!P1$Uh%*Wq^AynRX&K z+|up&N}LtyssXT3z~cYwvUQq(^|6`q^{B2OMOWnI5b#dCJ~_Xt{ssL; zgs*E__!?h#_WrD@p3DPNs~*ZYIOXB=3DLuu^OKGX%0*8`x_hQow2xL0&O>|X~AvYgtc zi3#v?z|FvqRY^zTs(AmrT^le&-xvqX9Kftifl=3D}>=3D-j*>?;R=3Dk0yMg1!1<+%bG4jR z^^mFzzn#PveSb6Xhk*Yb7hm}!Vk>NP>or(4u6~=3DxLx7)y1ED?_ev;o*_2~B|g_w%> zGr-vkoL~x$)3-CWpivR!s literal 0 HcmV?d00001 diff --git a/pc-bios/meson.build b/pc-bios/meson.build index 34d6616c32..83998f6071 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -84,6 +84,7 @@ blobs =3D [ 'npcm8xx_bootrom.bin', 'vof.bin', 'vof-nvram.bin', + 'ast27x0_bootrom.bin', ] =20 dtc =3D find_program('dtc', required: false) --=20 2.43.0 From nobody Sun Nov 16 00:57:37 2025 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=1744252905; cv=none; d=zohomail.com; s=zohoarc; b=fnXQL6yCvk0oJ8Br9W45DoYJMKTkue8sobUaf6vzSYe+BaYRVQalj6n4dHTSo1Yssbcep2gbwt0PRjFRVT7j2K2u7XPjogfip7CmgiXorJRur1mzUcQFY6KsYGV2jYvodRYO+ygA2qOWkkiJdjVsaPa4A6aJ5msgp7TBkJJ2eM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252905; 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=3lHmOyRLMjfeCZ/wWGkjq/KCvdkcG/cXBZO0n4M3k5U=; b=nrnJIWCVdlhSj92xZACqtQIaMrHkNHagGlHhyTZBWyBwSumqOAV86yzgwx6AZlMsH8m+Rc7hnerBKyXK7zlXNHI/KnU3TC6+CCw4AEB1SxIXLAeEVI02+tvCOzctgFyB/7IIJIct7mKMbnpkTprCh68rCsexbBWuJgihGgNbuLw= 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 1744252904828943.8092230793138; Wed, 9 Apr 2025 19:41:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hpP-0001oG-A7; Wed, 09 Apr 2025 22:39:43 -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 1u2hpK-0001id-OW; Wed, 09 Apr 2025 22:39:39 -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 1u2hpI-00033O-Mv; Wed, 09 Apr 2025 22:39:37 -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:59 +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:59 +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 v2 09/10] tests/functional/aspeed: Update AST2700 functional test to use vbootrom Date: Thu, 10 Apr 2025 10:38:53 +0800 Message-ID: <20250410023856.500258-10-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252907787019100 Content-Type: text/plain; charset="utf-8" Refactor 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 --- tests/functional/test_aarch64_aspeed.py | 38 +------------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/tes= t_aarch64_aspeed.py index c25c966278..971f548534 100755 --- a/tests/functional/test_aarch64_aspeed.py +++ b/tests/functional/test_aarch64_aspeed.py @@ -36,43 +36,7 @@ def do_test_aarch64_aspeed_sdk_start(self, image): 'c1f4496aec06743c812a6e9a1a18d032f34d62f3ddb6956e924fef62aa204= 6a5') =20 def start_ast2700_test(self, name): - num_cpu =3D 4 - uboot_size =3D os.path.getsize(self.scratch_file(name, - 'u-boot-nodtb.bin')) - uboot_dtb_load_addr =3D hex(0x400000000 + uboot_size) - - load_images_list =3D [ - { - 'addr': '0x400000000', - 'file': self.scratch_file(name, - 'u-boot-nodtb.bin') - }, - { - 'addr': str(uboot_dtb_load_addr), - 'file': self.scratch_file(name, 'u-boot.dtb') - }, - { - 'addr': '0x430000000', - 'file': self.scratch_file(name, 'bl31.bin') - }, - { - 'addr': '0x430080000', - 'file': self.scratch_file(name, 'optee', - 'tee-raw.bin') - } - ] - - for load_image in load_images_list: - addr =3D load_image['addr'] - file =3D load_image['file'] - self.vm.add_args('-device', - f'loader,force-raw=3Don,addr=3D{addr},file=3D= {file}') - - for i in range(num_cpu): - self.vm.add_args('-device', - f'loader,addr=3D0x430000000,cpu-num=3D{i}') - - self.vm.add_args('-smp', str(num_cpu)) + self.vm.add_args('-bios', 'ast27x0_bootrom.bin') self.vm.add_args('-device', 'tmp105,bus=3Daspeed.i2c.bus.1,address=3D0x4d,id= =3Dtmp-test') self.do_test_aarch64_aspeed_sdk_start( --=20 2.43.0 From nobody Sun Nov 16 00:57:37 2025 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=1744252825; cv=none; d=zohomail.com; s=zohoarc; b=f9+rfbTqkX/1mqKevEBwbEi8iX89k+L32/j5+2q34zD2ga9De8HgIJ5cIcTnAUyYf9qA4gOgXI1J9HnyH3GcR8xZTYQvFl21qqfV7nnxlddhaHxFegb2rI7FKM7BzNj8mhdifX5AbH/L0Clkck9xLgydNZwJ/cyUbuibbSrgGAE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744252825; 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=Dw315Da7d5QI0VoNITXAWjuFYk49Uk2WaLRFs+KXVD4=; b=ELVy0NKUgMoHqxgz1Pn1oKwsyXjaCkyYzl5sCsPvEWElPQnppHXhm4fiSpPkifVCzpkXc09Ti7tSiMcv5jtcwAKZ48ktqoggXb+/oG+VPPJkB56MzfWv5TlHTl+kg3zIYSz0G0yPzTaD2i6aHyVbwYowGGbxJMiOaMH+nUVHOgE= 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 1744252825303570.0423995885833; Wed, 9 Apr 2025 19:40:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2hpT-0001rJ-Gf; Wed, 09 Apr 2025 22:39:47 -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 1u2hpR-0001qY-Gb; Wed, 09 Apr 2025 22:39:45 -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 1u2hpN-0003Ay-0K; Wed, 09 Apr 2025 22:39:45 -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:59 +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:59 +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 v2 10/10] docs/system/arm/aspeed: Support vbootrom for AST2700 Date: Thu, 10 Apr 2025 10:38:54 +0800 Message-ID: <20250410023856.500258-11-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250410023856.500258-1-jamin_lin@aspeedtech.com> References: <20250410023856.500258-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: 1744252825918019000 Content-Type: text/plain; charset="utf-8" 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 --- docs/system/arm/aspeed.rst | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst index 97fd6a0e7f..dfa8e6b4c6 100644 --- a/docs/system/arm/aspeed.rst +++ b/docs/system/arm/aspeed.rst @@ -250,24 +250,14 @@ under Linux), use : Booting the ast2700-evb machine ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ =20 -Boot the AST2700 machine from the flash image, use an MTD drive : +Boot the AST2700 machine using a flash image, with an MTD drive and +the virtual boot ROM : =20 .. code-block:: bash =20 - IMGDIR=3Dast2700-default - UBOOT_SIZE=3D$(stat --format=3D%s -L ${IMGDIR}/u-boot-nodtb.bin) - $ qemu-system-aarch64 -M ast2700-evb \ - -device loader,force-raw=3Don,addr=3D0x400000000,file=3D${IMGDIR}/u= -boot-nodtb.bin \ - -device loader,force-raw=3Don,addr=3D$((0x400000000 + ${UBOOT_SIZE}= )),file=3D${IMGDIR}/u-boot.dtb \ - -device loader,force-raw=3Don,addr=3D0x430000000,file=3D${IMGDIR}/b= l31.bin \ - -device loader,force-raw=3Don,addr=3D0x430080000,file=3D${IMGDIR}/o= ptee/tee-raw.bin \ - -device loader,cpu-num=3D0,addr=3D0x430000000 \ - -device loader,cpu-num=3D1,addr=3D0x430000000 \ - -device loader,cpu-num=3D2,addr=3D0x430000000 \ - -device loader,cpu-num=3D3,addr=3D0x430000000 \ - -smp 4 \ - -drive file=3D${IMGDIR}/image-bmc,format=3Draw,if=3Dmtd \ + -bios ast27x0_bootrom.bin \ + -drive file=3Dimage-bmc,format=3Draw,if=3Dmtd \ -nographic =20 Aspeed minibmc family boards (``ast1030-evb``) --=20 2.43.0