From nobody Sun Jul 26 11:04:01 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=quarantine dis=none) header.from=free.fr ARC-Seal: i=1; a=rsa-sha256; t=1783010757; cv=none; d=zohomail.com; s=zohoarc; b=l/JQkbliqI5lkqIEs0l1upkwRG9jPbz80/pPn/5vskpOCKWaltDT8BtnuYpGAon8RiY5+lS7a74eBIu1DpILjTT0/tWwzD07G5N/B1lrqZlDFO9dwjy82tQWZEqH+mkShc0XgVSPwI9x1Z+L7gAV9BHY+H0dba2DYxzXxiwYKj0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783010757; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dRa5YspoqpHP3tL4FeOFO33CH5KXGBGtW5pr/u+nYw4=; b=geVGZJ5s+f71URYg16h/vSLBVFeaemuE3tdCqK06QT++fe1qlQrFgm0vygrlv0f9NlJnJ85Rg3H9N1CG3HBmPhD/5eXWVkHnZlmNSfj7sjpDYLH4W7I3RKUCqcvp2s3bHMlP+Zc/6sRtUwv+6et9NIt/sHudepwlRFq8hO6soxU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783010757184680.5109752721656; Thu, 2 Jul 2026 09:45:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfKXT-00031X-Qo; Thu, 02 Jul 2026 12:45:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfKXJ-000306-25; Thu, 02 Jul 2026 12:45:14 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfKXH-0003SB-8T; Thu, 02 Jul 2026 12:45:12 -0400 Received: from localhost (unknown [89.92.102.124]) (Authenticated sender: emmanuel.blot@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id D79B22003D0; Thu, 2 Jul 2026 18:44:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1783010708; bh=KVn3pfojn/SSy3VeER7AZPSblfzzaQRHTzxEQsnS/7w=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DxnD/YkqNMM6rMkYmyY4UiL+4Sk4MCgLcxls9OCVZaQEWhdikgrBWLm30aNAfyZBD estB0pcK/xCR7PXkVHX7DGi+89KTJ0IpmjB4kBz8OcaLKiKpaXcNp4hrg8UaPrCemW 1fkM1qV27n5HQIPZD9lRsP8Byrn9GsFGm5jgi7mdNxQUh3ZXboD5Y2/aUX1PObfopJ CK+s3M3+qRmQxh/gCnX81AJ6PJLV8W8rThv6lMgtt+KrlKe3r6YP8EUstNkkuYsvH/ JayMVn6xxxOFCc8glHOz21nvpbvhIxDo9L61wckkqBhNiRHVbXCIa3ecbGPqYnI+ZF 9JQjstJytM9Sg== From: Emmanuel BLOT Date: Thu, 02 Jul 2026 18:44:28 +0200 Subject: [PATCH 1/4] hw/arm: sanmiguel-bmc: add Facebook SanMiguel BMC machine MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260702-sanmiguel-bmc-v1-1-b176b840aee3@free.fr> References: <20260702-sanmiguel-bmc-v1-0-b176b840aee3@free.fr> In-Reply-To: <20260702-sanmiguel-bmc-v1-0-b176b840aee3@free.fr> To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Kane Chen , Andrew Jeffery , Joel Stanley , qemu-arm@nongnu.org, Emmanuel Blot X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783010682; l=6219; i=emmanuel.blot@free.fr; s=20260602; h=from:subject:message-id; bh=KVn3pfojn/SSy3VeER7AZPSblfzzaQRHTzxEQsnS/7w=; b=phJi9LeMVssplgYEid2lIAk6towy9JbE9wS0rccLwDjZD68eIgLJGOUAaZf/tfecIezLbtQzG eveq0RcJSCnBZikPuzgXM2SbcOsZJjKp7iZFAiv/GSTtUkorigkio0G X-Developer-Key: i=emmanuel.blot@free.fr; a=ed25519; pk=0qFrZ21FAAN8OfVsSoVcCFTk/NMYOWzxJz4paSAVm0g= 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=lists1p.gnu.org; Received-SPF: pass client-ip=212.27.42.2; envelope-from=emmanuel.blot@free.fr; helo=smtp2-g21.free.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @free.fr) X-ZM-MESSAGEID: 1783010759781158500 Add a new AST2600-based QEMU machine for the Facebook SanMiguel BMC platform, derived from the aspeed-bmc-facebook-sanmiguel.dts device tree. I2C topology populates buses 2, 5, 6, 7, 9, 10, 11, 13, 14 with IO expanders (PCA9552 as PCA9555 stand-in, PCA9554 as TCA6408 stand-in), LM75 temperature sensors, AT24C FRU EEPROMs, a PCA9546 I2C mux, and an NCT3018Y RTC (DS1338 stand-in). Machine properties: 2 GiB RAM, dual mx66l1g45g 128 MB FMC flash, MAC0 with RGMII. Signed-off-by: Emmanuel Blot --- hw/arm/aspeed_ast2600_sanmiguel.c | 144 ++++++++++++++++++++++++++++++++++= ++++ hw/arm/meson.build | 1 + 2 files changed, 145 insertions(+) diff --git a/hw/arm/aspeed_ast2600_sanmiguel.c b/hw/arm/aspeed_ast2600_sanm= iguel.c new file mode 100644 index 0000000000..1893d83626 --- /dev/null +++ b/hw/arm/aspeed_ast2600_sanmiguel.c @@ -0,0 +1,144 @@ +/* + * Facebook SanMiguel BMC + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "hw/arm/machines-qom.h" +#include "hw/arm/aspeed.h" +#include "hw/arm/aspeed_soc.h" +#include "hw/i2c/i2c_mux_pca954x.h" +#include "hw/gpio/pca9552.h" +#include "hw/gpio/pca9554.h" +#include "hw/nvram/eeprom_at24c.h" +#include "hw/sensor/tmp105.h" + +/* SanMiguel hardware values */ +#define SANMIGUEL_BMC_HW_STRAP1 0x00002002 +#define SANMIGUEL_BMC_HW_STRAP2 0x00000000 +#define SANMIGUEL_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB) + +#define TYPE_TMP75 TYPE_TMP105 +#define TYPE_DS1338 "ds1338" + +static void sanmiguel_bmc_i2c_init(AspeedMachineState *bmc) +{ + /* Reference: aspeed-bmc-facebook-sanmiguel.dts */ + + AspeedSoCState *soc =3D bmc->soc; + I2CBus *i2c[16] =3D {}; + + for (int idx =3D 0; idx < ARRAY_SIZE(i2c); idx++) { + i2c[idx] =3D aspeed_i2c_get_bus(&soc->i2c, idx); + } + + /* &i2c0 */ + /* ssif-bmc@10 =E2=80=94 no QEMU model */ + + /* &i2c1 =E2=80=94 empty */ + + /* &i2c2 =E2=80=94 HPM0 */ + /* hpm0_ioexp_20: pca9555@20 */ + i2c_slave_create_simple(i2c[2], TYPE_PCA9552, 0x20); + /* hpm0_ioexp_21: pca9555@21 */ + i2c_slave_create_simple(i2c[2], TYPE_PCA9552, 0x21); + + /* &i2c3 =E2=80=94 empty */ + /* &i2c4 =E2=80=94 empty */ + + /* &i2c5 =E2=80=94 SMM */ + /* smm_ioexp_20: pca9555@20 */ + i2c_slave_create_simple(i2c[5], TYPE_PCA9552, 0x20); + /* smm_ioexp_21: pca9555@21 */ + i2c_slave_create_simple(i2c[5], TYPE_PCA9552, 0x21); + /* smm_temp: lm75@48 */ + i2c_slave_create_simple(i2c[5], TYPE_TMP75, 0x48); + /* smm_fru: eeprom@50 (24c128 =3D 16 KiB) */ + at24c_eeprom_init(i2c[5], 0x50, 16 * KiB); + /* rtc@6f =E2=80=94 nct3018y (ds1338 stand-in) */ + i2c_slave_create_simple(i2c[5], TYPE_DS1338, 0x6f); + + /* &i2c6 =E2=80=94 HMC */ + /* hmc_ioexp: tca6408@20 (pca9554 stand-in) */ + i2c_slave_create_simple(i2c[6], TYPE_PCA9554, 0x20); + /* i2c-mux@70 (PCA9546) =E2=80=94 4 channels (imux16-19), all empty */ + i2c_slave_create_simple(i2c[6], TYPE_PCA9546, 0x70); + + /* &i2c7 =E2=80=94 HPM1 */ + /* hpm1_ioexp_20: pca9555@20 */ + i2c_slave_create_simple(i2c[7], TYPE_PCA9552, 0x20); + /* hpm1_ioexp_21: pca9555@21 */ + i2c_slave_create_simple(i2c[7], TYPE_PCA9552, 0x21); + + /* &i2c8 =E2=80=94 empty */ + + /* &i2c9 =E2=80=94 PDB */ + /* mp5926@10-16, lm5066i@11-17 =E2=80=94 no QEMU model (power monitors= ) */ + /* pdb_ioexp_20: pca9555@20 */ + i2c_slave_create_simple(i2c[9], TYPE_PCA9552, 0x20); + /* pdb_temp: lm75@4e */ + i2c_slave_create_simple(i2c[9], TYPE_TMP75, 0x4e); + /* pdb_fru: eeprom@50 (24c128 =3D 16 KiB) */ + at24c_eeprom_init(i2c[9], 0x50, 16 * KiB); + + /* &i2c10 =E2=80=94 SCM */ + /* scm_temp: lm75@48 */ + i2c_slave_create_simple(i2c[10], TYPE_TMP75, 0x48); + /* scm_fru: eeprom@50 (24c128 =3D 16 KiB) */ + at24c_eeprom_init(i2c[10], 0x50, 16 * KiB); + + /* &i2c11 =E2=80=94 Switch Config */ + /* sw_config: eeprom@50 (24c64 =3D 8 KiB) */ + at24c_eeprom_init(i2c[11], 0x50, 8 * KiB); + + /* &i2c12 =E2=80=94 empty */ + + /* &i2c13 =E2=80=94 SMM extension */ + /* mctp@10 =E2=80=94 no QEMU model */ + /* smm_ext_ioexp: pca9554@38 */ + i2c_slave_create_simple(i2c[13], TYPE_PCA9554, 0x38); + /* smm_ext_fru: eeprom@55 (24c128 =3D 16 KiB) */ + at24c_eeprom_init(i2c[13], 0x55, 16 * KiB); + + /* &i2c14 =E2=80=94 FIO */ + /* fio_ioexp: pca9555@20 */ + i2c_slave_create_simple(i2c[14], TYPE_PCA9552, 0x20); + /* fio_fru: eeprom@50 (24c64 =3D 8 KiB) */ + at24c_eeprom_init(i2c[14], 0x50, 8 * KiB); + + /* &i2c15 =E2=80=94 empty */ +} + +static void aspeed_machine_sanmiguel_class_init(ObjectClass *oc, + const void *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + AspeedMachineClass *amc =3D ASPEED_MACHINE_CLASS(oc); + + mc->desc =3D "Facebook SanMiguel BMC (Cortex-A7)"; + amc->soc_name =3D "ast2600-a3"; + amc->hw_strap1 =3D SANMIGUEL_BMC_HW_STRAP1; + amc->hw_strap2 =3D SANMIGUEL_BMC_HW_STRAP2; + amc->fmc_model =3D "mx66l1g45g"; + amc->spi_model =3D "mx66l1g45g"; + amc->num_cs =3D 2; + amc->macs_mask =3D ASPEED_MAC0_ON; + amc->i2c_init =3D sanmiguel_bmc_i2c_init; + mc->default_ram_size =3D SANMIGUEL_BMC_RAM_SIZE; + aspeed_machine_class_init_cpus_defaults(mc); +} + +static const TypeInfo aspeed_ast2600_sanmiguel_types[] =3D { + { + .name =3D MACHINE_TYPE_NAME("sanmiguel-bmc"), + .parent =3D TYPE_ASPEED_MACHINE, + .class_init =3D aspeed_machine_sanmiguel_class_init, + .interfaces =3D arm_machine_interfaces, + } +}; + +DEFINE_TYPES(aspeed_ast2600_sanmiguel_types) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 4233a800be..2d5f4a0fe4 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -65,6 +65,7 @@ arm_common_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: fil= es( 'aspeed_ast2600_fuji.c', 'aspeed_ast2600_gb200nvl.c', 'aspeed_ast2600_rainier.c', + 'aspeed_ast2600_sanmiguel.c', 'aspeed_ast10x0.c', 'aspeed_ast10x0_evb.c', 'aspeed_ast1040.c', --=20 2.50.1 From nobody Sun Jul 26 11:04:01 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=quarantine dis=none) header.from=free.fr ARC-Seal: i=1; a=rsa-sha256; t=1783010804; cv=none; d=zohomail.com; s=zohoarc; b=D82qcfOuN+UF/30fGhDzYBjPEWelcTTitx9KtWdPpUsnUkEwekPgO8h8IVygLzxEv9E0yo0FQFjfbcBf5Kv8Ut52toEePt+tO0aLe2yBmIaDkkUSWinRVvy8E0vSIuuZk7k8FfeMfISIOtaufBFo5ds8n7x/taKk5Wq8eXkLz8c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783010804; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6uQiJA2m8BULHjyDo6c74jXfT3mD0YIJDQSnccIMyqI=; b=H60va2BLwuxXLTn2Q2eH5FA5ETksQyimoOc1olI9T5tWABrWtEbBuX1dapJpDqYHqYbrR/+Bg+D3PLcINTDYIVR414PU1FXujMT7QelgQn/V6OYI/phHGMyfuqAjpMUbrbr0GGZfYFIiPIJTY7vNuslWaEDzLI4hgwi5jEP9LCg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783010804181770.3801444991911; Thu, 2 Jul 2026 09:46:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfKXX-00032w-Ft; Thu, 02 Jul 2026 12:45:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfKXU-00031t-SH; Thu, 02 Jul 2026 12:45:24 -0400 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfKXR-0003T2-Qd; Thu, 02 Jul 2026 12:45:24 -0400 Received: from localhost (unknown [89.92.102.124]) (Authenticated sender: emmanuel.blot@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 3FFD72003ED; Thu, 2 Jul 2026 18:45:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1783010720; bh=IF1ChCZH11mbzoBKRxLkkr0nmaVw9aOB1NfT6/Ed5NQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=SuPTUMtTg8m7Wv1bw8GXaTE7oter8sQrob7FG3GaUPu4tmA6HXRcq68HOAWU9XYnM QUNMzAwe6CRGarg3dtWOMs2uk7yOF/+/YN+vABvorfeP13yr7HfMPUtUuG2wGVoZtv PcQLV1BpmzveqTRok3PNQcLdqYnvkNUZF6EQEq1xbo4Rm0Up888r7gAwpggpRWfbKi RMk6EEuJm/Lb8joAZF0on/88P2aCBoLy2gVNfDI3KmOILUL3QtuUo4OVER6cMFCIaw k6OKPDGn78+Y/k+NvWTTU6iAhEhv6PLcl5mtzfN+TAcL0whOeXF9rEsRon7DUIR017 TnRUZAEHw796Q== From: Emmanuel BLOT Date: Thu, 02 Jul 2026 18:44:29 +0200 Subject: [PATCH 2/4] hw/arm: sanmiguel-bmc: populate EEPROM data MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260702-sanmiguel-bmc-v1-2-b176b840aee3@free.fr> References: <20260702-sanmiguel-bmc-v1-0-b176b840aee3@free.fr> In-Reply-To: <20260702-sanmiguel-bmc-v1-0-b176b840aee3@free.fr> To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Kane Chen , Andrew Jeffery , Joel Stanley , qemu-arm@nongnu.org, Emmanuel Blot X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783010682; l=14848; i=emmanuel.blot@free.fr; s=20260602; h=from:subject:message-id; bh=IF1ChCZH11mbzoBKRxLkkr0nmaVw9aOB1NfT6/Ed5NQ=; b=MNVCcxsWbfyNfuCmDy9QKRTDlbJgicpRfrJWKIlkPwj+SgbpdrhNXg8tvBmlsXW50ja603nDQ 7S1dMPtYqWyCsWt3Z69liriI9aUh6EbF86HRrv5VIhvcOKUmbr3M9bd X-Developer-Key: i=emmanuel.blot@free.fr; a=ed25519; pk=0qFrZ21FAAN8OfVsSoVcCFTk/NMYOWzxJz4paSAVm0g= 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a01:e0c:1:1599::11; envelope-from=emmanuel.blot@free.fr; helo=smtp2-g21.free.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @free.fr) X-ZM-MESSAGEID: 1783010807639158500 Populate AT24C FRU EEPROMs with real data from physical device. Signed-off-by: Emmanuel Blot --- hw/arm/aspeed_ast2600_sanmiguel.c | 275 ++++++++++++++++++++++++++++++++++= +++- 1 file changed, 269 insertions(+), 6 deletions(-) diff --git a/hw/arm/aspeed_ast2600_sanmiguel.c b/hw/arm/aspeed_ast2600_sanm= iguel.c index 1893d83626..146906c372 100644 --- a/hw/arm/aspeed_ast2600_sanmiguel.c +++ b/hw/arm/aspeed_ast2600_sanmiguel.c @@ -25,6 +25,267 @@ #define TYPE_TMP75 TYPE_TMP105 #define TYPE_DS1338 "ds1338" =20 +/* + * "Front IO" FRU data. Generated with frugen. + * + * { + * "board": { + * "mfg": "Quanta", + * "pname": "San Miguel FIO EVT (QEMU)", + * "pn": "00000000000", + * "serial": "0000000000000", + * "date": "03/10/2026 00:00", + * "custom": ["19-101243"] + * }, + * "product": { + * "mfg": "Quanta", + * "pname": "CI-San Miguel", + * "pn": "10000000001", + * "ver": "EVT", + * "serial": "10000000000000001" + * "atag": "QEMU", + * } + * } + */ +static const uint8_t fio_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x00, 0xf4, 0x01, 0x09, 0x19, 0x90, + 0xd2, 0xf6, 0xc6, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xd9, 0x53, 0x61, + 0x6e, 0x20, 0x4d, 0x69, 0x67, 0x75, 0x65, 0x6c, 0x20, 0x46, 0x49, 0x4f, + 0x20, 0x45, 0x56, 0x54, 0x20, 0x28, 0x51, 0x45, 0x4d, 0x55, 0x29, 0x8a, + 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x89, 0x10, + 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x01, 0xc0, 0x87, 0x51, 0xd6, + 0x44, 0x50, 0x24, 0x51, 0x13, 0xc1, 0x00, 0xf5, 0x01, 0x08, 0x19, 0xc6, + 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xcd, 0x43, 0x49, 0x2d, 0x53, 0x61, + 0x6e, 0x20, 0x4d, 0x69, 0x67, 0x75, 0x65, 0x6c, 0x89, 0x11, 0x04, 0x41, + 0x10, 0x04, 0x41, 0x10, 0x14, 0x01, 0x83, 0xa5, 0x4d, 0x03, 0x8d, 0x11, + 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x11, + 0x83, 0x71, 0xd9, 0xd6, 0xc0, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff +}; +static const size_t fio_eeprom_len =3D sizeof(fio_eeprom); + +/* + * "Power Distribution Board" FRU data. Generated with frugen. + * + * { + * "chassis": { + * "type": 23, + * "pn": "", + * "serial": "" + * }, + * "board": { + * "mfg": "Quanta", + * "pname": "San Miguel PDB EVT (QEMU)", + * "pn": "00000000000", + * "serial": "0000000000000", + * "date": "03/10/2026 00:00", + * "custom": ["19-101240"] + * }, + * "product": { + * "mfg": "Quanta", + * "pname": "CI-San Miguel", + * "pn": "10000000001", + * "ver": "EVT", + * "serial": "10000000000000001", + * "atag": "QEMU", + * } + * } + */ +static const uint8_t pdb_eeprom[] =3D { + 0x01, 0x00, 0x01, 0x02, 0x0b, 0x00, 0x00, 0xf1, 0x01, 0x01, 0x17, 0xc0, + 0xc0, 0xc1, 0x00, 0xa6, 0x01, 0x09, 0x19, 0x90, 0xd2, 0xf6, 0xc6, 0x51, + 0x75, 0x61, 0x6e, 0x74, 0x61, 0xd9, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x69, + 0x67, 0x75, 0x65, 0x6c, 0x20, 0x50, 0x44, 0x42, 0x20, 0x45, 0x56, 0x54, + 0x20, 0x28, 0x51, 0x45, 0x4d, 0x55, 0x29, 0x8a, 0x10, 0x04, 0x41, 0x10, + 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x89, 0x10, 0x04, 0x41, 0x10, 0x04, + 0x41, 0x10, 0x04, 0x01, 0xc0, 0x87, 0x51, 0xd6, 0x44, 0x50, 0x24, 0x51, + 0x10, 0xc1, 0x00, 0x00, 0x01, 0x08, 0x19, 0xc6, 0x51, 0x75, 0x61, 0x6e, + 0x74, 0x61, 0xcd, 0x43, 0x49, 0x2d, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x69, + 0x67, 0x75, 0x65, 0x6c, 0x89, 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, + 0x14, 0x01, 0x83, 0xa5, 0x4d, 0x03, 0x8d, 0x11, 0x04, 0x41, 0x10, 0x04, + 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x11, 0x83, 0x71, 0xd9, 0xd6, + 0xc0, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff +}; +static const size_t pdb_eeprom_len =3D sizeof(pdb_eeprom); + +/* + * "Secure Control Module" FRU data. Generated with frugen. + * + * { + * "chassis": { + * "type": 23, + * "pn": "", + * "serial": "", + * "custom": [""] + * }, + * "board": { + * "mfg": "Quanta", + * "pname": "San Miguel SCM EVT (QEMU)", + * "pn": "00000000000", + * "serial": "0000000000000", + * "date": "03/10/2026 00:00", + * "custom": ["19-101242"] + * }, + * "product": { + * "mfg": "Quanta", + * "pname": "CI-San Miguel", + * "pn": "10000000001", + * "ver": "EVT", + * "serial": "10000000000000001", + * "atag": "QEMU", + * } + * } + */ +static const uint8_t scm_eeprom[] =3D { + 0x01, 0x00, 0x01, 0x02, 0x0b, 0x00, 0x00, 0xf1, 0x01, 0x01, 0x17, 0xc0, + 0xc0, 0xc0, 0xc1, 0xe6, 0x01, 0x09, 0x19, 0x90, 0xd2, 0xf6, 0xc6, 0x51, + 0x75, 0x61, 0x6e, 0x74, 0x61, 0xd9, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x69, + 0x67, 0x75, 0x65, 0x6c, 0x20, 0x53, 0x43, 0x4d, 0x20, 0x45, 0x56, 0x54, + 0x20, 0x28, 0x51, 0x45, 0x4d, 0x55, 0x29, 0x8a, 0x10, 0x04, 0x41, 0x10, + 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x89, 0x10, 0x04, 0x41, 0x10, 0x04, + 0x41, 0x10, 0x04, 0x01, 0xc0, 0x87, 0x51, 0xd6, 0x44, 0x50, 0x24, 0x51, + 0x12, 0xc1, 0x00, 0xf1, 0x01, 0x08, 0x19, 0xc6, 0x51, 0x75, 0x61, 0x6e, + 0x74, 0x61, 0xcd, 0x43, 0x49, 0x2d, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x69, + 0x67, 0x75, 0x65, 0x6c, 0x89, 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, + 0x14, 0x01, 0x83, 0xa5, 0x4d, 0x03, 0x8d, 0x11, 0x04, 0x41, 0x10, 0x04, + 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x11, 0x83, 0x71, 0xd9, 0xd6, + 0xc0, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff +}; +static const size_t scm_eeprom_len =3D sizeof(scm_eeprom); + +/* + * "SMM Carrier" FRU data. Generated with frugen. + * + * { + * "chassis": { + * "type": 23, + * "pn": "", + * "serial": "" + * }, + * "board": { + * "mfg": "Quanta", + * "pname": "San Miguel SMM Carrier EVT (QEMU)", + * "pn": "00000000000", + * "serial": "0000000000000", + * "date": "03/11/2026 17:36", + * "custom": ["19-101238"] + * }, + * "product": { + * "mfg": "Quanta", + * "pname": "CI-San Miguel", + * "pn": "10000000001", + * "ver": "EVT", + * "serial": "10000000000000001", + * "atag": "QEMU", + * } + * } + */ +static const uint8_t smm_eeprom[] =3D { + 0x01, 0x00, 0x01, 0x02, 0x0c, 0x00, 0x00, 0xf0, 0x01, 0x01, 0x17, 0xc0, + 0xc0, 0xc1, 0x00, 0xa6, 0x01, 0x0a, 0x19, 0x4c, 0x85, 0xf7, 0xc6, 0x51, + 0x75, 0x61, 0x6e, 0x74, 0x61, 0xe1, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x69, + 0x67, 0x75, 0x65, 0x6c, 0x20, 0x53, 0x4d, 0x4d, 0x20, 0x43, 0x61, 0x72, + 0x72, 0x69, 0x65, 0x72, 0x20, 0x45, 0x56, 0x54, 0x20, 0x28, 0x51, 0x45, + 0x4d, 0x55, 0x29, 0x8a, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, + 0x41, 0x10, 0x89, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x01, + 0xc0, 0x87, 0x51, 0xd6, 0x44, 0x50, 0x24, 0x4d, 0x18, 0xc1, 0x00, 0x84, + 0x01, 0x08, 0x19, 0xc6, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xcd, 0x43, + 0x49, 0x2d, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x69, 0x67, 0x75, 0x65, 0x6c, + 0x89, 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x14, 0x01, 0x83, 0xa5, + 0x4d, 0x03, 0x8d, 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, + 0x10, 0x04, 0x41, 0x11, 0x83, 0x71, 0xd9, 0xd6, 0xc0, 0xc1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x9b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff +}; +static const size_t smm_eeprom_len =3D sizeof(smm_eeprom); + +/* + * "SMM Extender" FRU data. Generated with frugen. + * + * { + * "chassis": { + * "type": 23, + * "pn": "", + * "serial": "" + * }, + * "board": { + * "mfg": "Quanta", + * "pname": "San Miguel SMM Extender EVT (QEMU)", + * "pn": "00000000000", + * "serial": "0000000000000", + * "date": "03/10/2026 00:00", + * "custom": ["19-101239"] + * }, + * "product": { + * "mfg": "Quanta", + * "pname": "CI-San Miguel", + * "pn": "10000000001", + * "ver": "EVT", + * "serial": "10000000000000001", + * "atag": "QEMU", + * } + * } + */ +static const uint8_t smm_ext_eeprom[] =3D { + 0x01, 0x00, 0x01, 0x02, 0x0c, 0x00, 0x00, 0xf0, 0x01, 0x01, 0x17, 0xc0, + 0xc0, 0xc1, 0x00, 0xa6, 0x01, 0x0a, 0x19, 0x90, 0xd2, 0xf6, 0xc6, 0x51, + 0x75, 0x61, 0x6e, 0x74, 0x61, 0xe2, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x69, + 0x67, 0x75, 0x65, 0x6c, 0x20, 0x53, 0x4d, 0x4d, 0x20, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x45, 0x56, 0x54, 0x20, 0x28, 0x51, + 0x45, 0x4d, 0x55, 0x29, 0x8a, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, + 0x04, 0x41, 0x10, 0x89, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, + 0x01, 0xc0, 0x87, 0x51, 0xd6, 0x44, 0x50, 0x24, 0x4d, 0x19, 0xc1, 0x7b, + 0x01, 0x08, 0x19, 0xc6, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xcd, 0x43, + 0x49, 0x2d, 0x53, 0x61, 0x6e, 0x20, 0x4d, 0x69, 0x67, 0x75, 0x65, 0x6c, + 0x89, 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x14, 0x01, 0x83, 0xa5, + 0x4d, 0x03, 0x8d, 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, + 0x10, 0x04, 0x41, 0x11, 0x83, 0x71, 0xd9, 0xd6, 0xc0, 0xc1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x9b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff +}; +static const size_t smm_ext_eeprom_len =3D sizeof(smm_ext_eeprom); + static void sanmiguel_bmc_i2c_init(AspeedMachineState *bmc) { /* Reference: aspeed-bmc-facebook-sanmiguel.dts */ @@ -58,7 +319,8 @@ static void sanmiguel_bmc_i2c_init(AspeedMachineState *b= mc) /* smm_temp: lm75@48 */ i2c_slave_create_simple(i2c[5], TYPE_TMP75, 0x48); /* smm_fru: eeprom@50 (24c128 =3D 16 KiB) */ - at24c_eeprom_init(i2c[5], 0x50, 16 * KiB); + at24c_eeprom_init_rom(i2c[5], 0x50, 16 * KiB, smm_eeprom, smm_eeprom_l= en); + /* rtc@6f =E2=80=94 nct3018y (ds1338 stand-in) */ i2c_slave_create_simple(i2c[5], TYPE_DS1338, 0x6f); =20 @@ -83,16 +345,16 @@ static void sanmiguel_bmc_i2c_init(AspeedMachineState = *bmc) /* pdb_temp: lm75@4e */ i2c_slave_create_simple(i2c[9], TYPE_TMP75, 0x4e); /* pdb_fru: eeprom@50 (24c128 =3D 16 KiB) */ - at24c_eeprom_init(i2c[9], 0x50, 16 * KiB); + at24c_eeprom_init_rom(i2c[9], 0x50, 16 * KiB, pdb_eeprom, pdb_eeprom_l= en); =20 /* &i2c10 =E2=80=94 SCM */ /* scm_temp: lm75@48 */ i2c_slave_create_simple(i2c[10], TYPE_TMP75, 0x48); /* scm_fru: eeprom@50 (24c128 =3D 16 KiB) */ - at24c_eeprom_init(i2c[10], 0x50, 16 * KiB); + at24c_eeprom_init_rom(i2c[10], 0x50, 16 * KiB, scm_eeprom, scm_eeprom_= len); =20 /* &i2c11 =E2=80=94 Switch Config */ - /* sw_config: eeprom@50 (24c64 =3D 8 KiB) */ + /* sw_config: eeprom@50 (24c64 =3D 8 KiB) =E2=80=94 blank (content not= modelled) */ at24c_eeprom_init(i2c[11], 0x50, 8 * KiB); =20 /* &i2c12 =E2=80=94 empty */ @@ -102,13 +364,14 @@ static void sanmiguel_bmc_i2c_init(AspeedMachineState= *bmc) /* smm_ext_ioexp: pca9554@38 */ i2c_slave_create_simple(i2c[13], TYPE_PCA9554, 0x38); /* smm_ext_fru: eeprom@55 (24c128 =3D 16 KiB) */ - at24c_eeprom_init(i2c[13], 0x55, 16 * KiB); + at24c_eeprom_init_rom(i2c[13], 0x55, 16 * KiB, smm_ext_eeprom, + smm_ext_eeprom_len); =20 /* &i2c14 =E2=80=94 FIO */ /* fio_ioexp: pca9555@20 */ i2c_slave_create_simple(i2c[14], TYPE_PCA9552, 0x20); /* fio_fru: eeprom@50 (24c64 =3D 8 KiB) */ - at24c_eeprom_init(i2c[14], 0x50, 8 * KiB); + at24c_eeprom_init_rom(i2c[14], 0x50, 8 * KiB, fio_eeprom, fio_eeprom_l= en); =20 /* &i2c15 =E2=80=94 empty */ } --=20 2.50.1 From nobody Sun Jul 26 11:04:01 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=quarantine dis=none) header.from=free.fr ARC-Seal: i=1; a=rsa-sha256; t=1783010757; cv=none; d=zohomail.com; s=zohoarc; b=AOel1//vjVTRsSVqOkpZ00IXaF5rdvmUZqM1Zb2SZ0lr54lLNUWBB1YuJN06u1bRA/x56tPsU54IxNMtecT58CYS8bIqeI8ybhU6BhJeEl2EUa+OWxl7QAtJE0k7heHiZikTiki4FISX7se8q4rg+TMdDMYJFDtUMF+TNVoVS8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783010757; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9FJh8/wx5lul9uXGYK9hFAe9HSXURKRovxzw2ao448g=; b=VqtZmluGEKqrGNrh/Gw8BX+7cx3IGocNzablFEZ1wmn4pyPJK7Ggr2JFNvm4t5pxMnnC9QEX8XDZUPeIeENteF5BxJe9wpU+EsKq0oZ0i8oOcq2747EtBeC3JJMyWr1pf8XCsVIRH3Ab9/oDcLqabW3ksOsaBfWrEj3IczzgmL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783010757136931.639325135449; Thu, 2 Jul 2026 09:45:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfKXg-000359-Sa; Thu, 02 Jul 2026 12:45:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfKXe-00034M-ST; Thu, 02 Jul 2026 12:45:34 -0400 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfKXc-0003UH-VL; Thu, 02 Jul 2026 12:45:34 -0400 Received: from localhost (unknown [89.92.102.124]) (Authenticated sender: emmanuel.blot@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 9F8212003C6; Thu, 2 Jul 2026 18:45:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1783010731; bh=4MrAaUdT5FZE2wruIVBvwInZwOlQQccL6jwwutryqm0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aesZ4XiKf1lpz0ze95jkO7xVCQOnFAQzbmbGCK0cUugMVnHRzOVPAlF842b482IO6 EzsuJkdDpP+HY6IOKuzteWqy/yuW6oUJ1AUlUynRGUpUO0aHDYK4in/GH6s8Yh1aoV 5OAWgerye5Ksk2DeVUAky4e2gfx9xwaQMth77zPareJllVuXOa5G6xrecU83qUI/4A GpK5vljG47HAsUS1rsykiBrcGZEFbQ+al0fWHwCjS/7g+CjfTk4ZETG7ycs7I4KQWp eRv0us+c9mctCG7qM40B/peGHWpdXIWf0mjTIPqXGH4oQzuU0uvJ7ynWRZa7Wc5pjF 8+lNmQdh/ReGA== From: Emmanuel Blot Date: Thu, 02 Jul 2026 18:44:30 +0200 Subject: [PATCH 3/4] tests/functional: aspeed: optionally check the device tree model on boot MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260702-sanmiguel-bmc-v1-3-b176b840aee3@free.fr> References: <20260702-sanmiguel-bmc-v1-0-b176b840aee3@free.fr> In-Reply-To: <20260702-sanmiguel-bmc-v1-0-b176b840aee3@free.fr> To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Kane Chen , Andrew Jeffery , Joel Stanley , qemu-arm@nongnu.org, Emmanuel Blot X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783010682; l=1675; i=emmanuel.blot@free.fr; s=20260602; h=from:subject:message-id; bh=4MrAaUdT5FZE2wruIVBvwInZwOlQQccL6jwwutryqm0=; b=3EfoCAatETGhtZ/Paog3YuBDCi7smSwrZL8f7xUwheV2XB06NkJhI8gOMb64T2DAzVTJ2ZPf3 HxP3+hGTVAMDpogcuuh32NW2kksYKb/DAbtbasYnCXNZX9WX3s6wOQb X-Developer-Key: i=emmanuel.blot@free.fr; a=ed25519; pk=0qFrZ21FAAN8OfVsSoVcCFTk/NMYOWzxJz4paSAVm0g= 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a01:e0c:1:1599::11; envelope-from=emmanuel.blot@free.fr; helo=smtp2-g21.free.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @free.fr) X-ZM-MESSAGEID: 1783010760181158500 Add an optional 'dt_model' argument to do_test_arm_aspeed_openbmc(). When provided, the helper also waits for the kernel's "Machine model: ..." line, letting a test confirm the booted image actually matches the expected board device tree rather than only the SoC revision. Signed-off-by: Emmanuel Blot --- tests/functional/aspeed.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/functional/aspeed.py b/tests/functional/aspeed.py index 88b6590934..57e224999f 100644 --- a/tests/functional/aspeed.py +++ b/tests/functional/aspeed.py @@ -9,7 +9,7 @@ class AspeedTest(LinuxKernelTest): =20 def do_test_arm_aspeed_openbmc(self, machine, image, uboot=3D'2019.04', cpu_id=3D'0x0', soc=3D'AST2500 rev A1', - image_hostname=3DNone): + image_hostname=3DNone, dt_model=3DNone): # Allow for the image hostname to not end in "-bmc" if image_hostname is not None: hostname =3D image_hostname @@ -26,6 +26,8 @@ def do_test_arm_aspeed_openbmc(self, machine, image, uboo= t=3D'2019.04', self.wait_for_console_pattern('## Loading kernel from FIT Image') self.wait_for_console_pattern('Starting kernel ...') self.wait_for_console_pattern(f'Booting Linux on physical CPU {cpu= _id}') + if dt_model: + self.wait_for_console_pattern(f'Machine model: {dt_model}') self.wait_for_console_pattern(f'ASPEED {soc}') self.wait_for_console_pattern('/init as init process') self.wait_for_boot_complete(hostname) --=20 2.50.1 From nobody Sun Jul 26 11:04:01 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=quarantine dis=none) header.from=free.fr ARC-Seal: i=1; a=rsa-sha256; t=1783010806; cv=none; d=zohomail.com; s=zohoarc; b=bXw3zPbc20KvB/hoNLFjw6eV8Jd4nfikXbNauOdIfrMkBAgbz5mDAix8Zrsqo9GavMRQOvTwqU2pmWAXACEl1sO2HS6JImlKMws3kNYj+ghUaMQRFPreM33p0mgH0RPgr/JV9WkpvoTJun4mNJJBCSHKxbv1GdBaboFqWEc3cAs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783010806; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nJZJsaksc0lNh3F/OeBuKyRWVEHLvusQB2Zdoomk65E=; b=UmbsNn++mDzLB8hrQZecBZF/Ia0Iq2fSBF+WKYSQga2CoklXAl06WP/oYl9CylPgc8FRPVehKWtpywAjkfAxl8Gx5N0HJux9M22IIOJAycL5iZ0k47G9B2jS9KQWfUISt8UCuU73qadeHNxFXBzEk+p7Y2zIF9G9AhTBxhUJEDk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17830108063061021.2030741249364; Thu, 2 Jul 2026 09:46:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wfKXu-00039u-CH; Thu, 02 Jul 2026 12:45:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfKXr-00037N-Cl; Thu, 02 Jul 2026 12:45:48 -0400 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wfKXo-0003VU-AW; Thu, 02 Jul 2026 12:45:45 -0400 Received: from localhost (unknown [89.92.102.124]) (Authenticated sender: emmanuel.blot@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 0BD552003D0; Thu, 2 Jul 2026 18:45:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1783010743; bh=EUeKINjg7CGBQX2Etv44obZlaiZ6I+u6rrG2JIcxyVg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Awi375iBdMzpDIsQSEzxcttctfH9zC6rRUUyjh56CBfvc1X3GksDPCJvPMVAsDw2Y 2b5+Yde3XS/OmPb4DCmXhacSODJIsIf0Tak3auMNrKiNxf+dcGS56ALNYVNYLwgeG4 9+Wd5sGu0agsL/RIotqvjhO21QFlGnyAFv4nLyvZN3hoWnXUtayioONeOMTjC/zwn/ uHxAxAOWLF9Q0yaxy8jbUL5jEpPqh6E2aNAcv5Lx0VVEbMyPtdL9spa0YZPM7kmr6I Kbhrsh6LE8sLtX8CuW/e5DiPPALAwqrh4ji+7hSc5/7hkDMxJeUcBSiEBM+yMzds3g 1MIidGG7eez7A== From: Emmanuel Blot Date: Thu, 02 Jul 2026 18:44:31 +0200 Subject: [PATCH 4/4] tests/functional: arm: add SanMiguel BMC boot test MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260702-sanmiguel-bmc-v1-4-b176b840aee3@free.fr> References: <20260702-sanmiguel-bmc-v1-0-b176b840aee3@free.fr> In-Reply-To: <20260702-sanmiguel-bmc-v1-0-b176b840aee3@free.fr> To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Kane Chen , Andrew Jeffery , Joel Stanley , qemu-arm@nongnu.org, Emmanuel Blot X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783010682; l=2157; i=emmanuel.blot@free.fr; s=20260602; h=from:subject:message-id; bh=EUeKINjg7CGBQX2Etv44obZlaiZ6I+u6rrG2JIcxyVg=; b=aPBadd20+BiCAQGGoXlX/em4teKtc9Ye9THUKI03G/7s6hHqtCSw2uHtJ8tQ8tWe0Ga2rU7at oCIPnN+q0LFCaxBwyHlD+0qtPn3QPI6P2Bs5YHt66bm1Wwu27ebMB29 X-Developer-Key: i=emmanuel.blot@free.fr; a=ed25519; pk=0qFrZ21FAAN8OfVsSoVcCFTk/NMYOWzxJz4paSAVm0g= 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a01:e0c:1:1599::11; envelope-from=emmanuel.blot@free.fr; helo=smtp2-g21.free.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @free.fr) X-ZM-MESSAGEID: 1783010807664158500 Signed-off-by: Emmanuel Blot --- tests/functional/arm/meson.build | 2 ++ tests/functional/arm/test_aspeed_sanmiguel.py | 33 +++++++++++++++++++++++= ++++ 2 files changed, 35 insertions(+) diff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.= build index 61b00932db..68e75b7ea1 100644 --- a/tests/functional/arm/meson.build +++ b/tests/functional/arm/meson.build @@ -17,6 +17,7 @@ test_arm_timeouts =3D { 'aspeed_catalina' : 480, 'aspeed_gb200nvl_bmc' : 480, 'aspeed_rainier' : 480, + 'aspeed_sanmiguel' : 480, 'bpim2u' : 500, 'collie' : 180, 'cubieboard' : 360, @@ -52,6 +53,7 @@ tests_arm_system_thorough =3D [ 'aspeed_catalina', 'aspeed_gb200nvl_bmc', 'aspeed_rainier', + 'aspeed_sanmiguel', 'bpim2u', 'canona1100', 'collie', diff --git a/tests/functional/arm/test_aspeed_sanmiguel.py b/tests/function= al/arm/test_aspeed_sanmiguel.py new file mode 100644 index 0000000000..6409d12341 --- /dev/null +++ b/tests/functional/arm/test_aspeed_sanmiguel.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the SanMiguel BMC machine +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from aspeed import FacebookAspeedTest + + +class SanMiguelMachine(FacebookAspeedTest): + + ASSET_SANMIGUEL_FLASH =3D Asset( + "https://github.com/eblot/qemu-aspeed-boot/raw/refs/heads/sanmigue= l-bmc/images/sanmiguel-bmc/" + "openbmc-20260616025450/obmc-phosphor-image-sanmiguel-20260616= 025450.static.mtd.xz", + "f0b79a09cd861d79919facc16af1dbdc85a3df55b06dd62ba0318a01580d447b", + ) + + def test_arm_ast2600_sanmiguel_openbmc(self): + image_path =3D self.uncompress(self.ASSET_SANMIGUEL_FLASH) + + self.do_test_arm_aspeed_openbmc( + "sanmiguel-bmc", + image=3Dimage_path, + uboot=3D"2019.04", + cpu_id=3D"0xf00", + soc=3D"AST2600 rev A3", + dt_model=3D"Facebook SanMiguel BMC", + ) + + +if __name__ =3D=3D "__main__": + FacebookAspeedTest.main() --=20 2.50.1