Commit d684236c6d for qemu.org
commit d684236c6d93163aa93398f4c20a1a4ea05b76b7
Author: Patrick Williams <patrick@stwcx.xyz>
Date: Wed Dec 17 14:11:29 2025 -0500
hw/arm/aspeed: catalina: add DC-SCM FRU EEPROM
Use ipmitool/frugen tool to generate a DC-SCM image based on a
sanitized set of data from a real device EEPROM.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-2-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
diff --git a/hw/arm/aspeed_ast2600_catalina.c b/hw/arm/aspeed_ast2600_catalina.c
index 0f229f4dc6..6e8f4d39d9 100644
--- a/hw/arm/aspeed_ast2600_catalina.c
+++ b/hw/arm/aspeed_ast2600_catalina.c
@@ -64,6 +64,45 @@ static const uint8_t bsm_eeprom[] = {
};
static const size_t bsm_eeprom_len = sizeof(bsm_eeprom);
+/*
+ * "Secure Control Module" FRU data. Generated with frugen.
+ *
+ * {
+ * "board": {
+ * "mfg": "Quanta",
+ * "pname": "Catalina SCM MP (QEMU)",
+ * "pn": "00000000000",
+ * "serial": "00000000000000",
+ * "date": "01/12/2025 00:00",
+ * "custom": ["19-100325"]
+ * },
+ * "product": {
+ * "mfg": "Quanta",
+ * "pname": "CI-Catalina",
+ * "pn": "10000000001",
+ * "ver": "MP",
+ * "serial": "10000000000000",
+ * "atag": "QEMU"
+ * }
+ * }
+ *
+ */
+static const uint8_t scm_eeprom[] = {
+ 0x01, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x00, 0xf4, 0x01, 0x09, 0x19, 0x8c,
+ 0x19, 0xf0, 0xc6, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xd6, 0x43, 0x61,
+ 0x74, 0x61, 0x6c, 0x69, 0x6e, 0x61, 0x20, 0x53, 0x43, 0x4d, 0x20, 0x4d,
+ 0x50, 0x20, 0x28, 0x51, 0x45, 0x4d, 0x55, 0x29, 0x8b, 0x10, 0x04, 0x41,
+ 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x89, 0x10, 0x04, 0x41,
+ 0x10, 0x04, 0x41, 0x10, 0x04, 0x01, 0xc0, 0x87, 0x51, 0xd6, 0x44, 0x10,
+ 0x34, 0x49, 0x15, 0xc1, 0x00, 0x00, 0x00, 0xc1, 0x01, 0x07, 0x19, 0xc6,
+ 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xcb, 0x43, 0x49, 0x2d, 0x43, 0x61,
+ 0x74, 0x61, 0x6c, 0x69, 0x6e, 0x61, 0x89, 0x11, 0x04, 0x41, 0x10, 0x04,
+ 0x41, 0x10, 0x14, 0x01, 0x82, 0x2d, 0x0c, 0x8b, 0x11, 0x04, 0x41, 0x10,
+ 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x83, 0x71, 0xd9, 0xd6, 0xc0,
+ 0xc1, 0x00, 0x00, 0x37
+};
+static const size_t scm_eeprom_len = sizeof(scm_eeprom);
+
static void catalina_bmc_i2c_init(AspeedMachineState *bmc)
{
/* Reference from v6.16-rc2 aspeed-bmc-facebook-catalina.dts */
@@ -183,7 +222,7 @@ static void catalina_bmc_i2c_init(AspeedMachineState *bmc)
/* temperature-sensor@4b - tpm75 */
i2c_slave_create_simple(i2c[9], TYPE_TMP75, 0x4b);
/* eeprom@50 */
- at24c_eeprom_init(i2c[9], 0x50, 8 * KiB);
+ at24c_eeprom_init_rom(i2c[9], 0x50, 8 * KiB, scm_eeprom, scm_eeprom_len);
/* eeprom@56 */
at24c_eeprom_init_rom(i2c[9], 0x56, 8 * KiB, bsm_eeprom, bsm_eeprom_len);