Commit b7016ea66f for qemu.org
commit b7016ea66f5d846419cdfda9aae6a469749aa1c8
Author: Patrick Williams <patrick@stwcx.xyz>
Date: Wed Dec 17 14:11:31 2025 -0500
hw/arm/aspeed: catalina: add OSFP FRU EEPROM
Use ipmitool/frugen tool to generate an OSFP 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-4-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 2ba2c5c088..c8e62afdfe 100644
--- a/hw/arm/aspeed_ast2600_catalina.c
+++ b/hw/arm/aspeed_ast2600_catalina.c
@@ -151,6 +151,44 @@ static const uint8_t pdb_eeprom[] = {
};
static const size_t pdb_eeprom_len = sizeof(pdb_eeprom);
+/*
+ * OSFP Carrier Board FRU data. Generated with frugen.
+ *
+ * {
+ * "board": {
+ * "mfg": "Quanta",
+ * "pname": "Catalina OSFP MP (QEMU)",
+ * "pn": "00000000000",
+ * "serial": "00000000000000",
+ * "date": "01/12/2025 00:00",
+ * "custom": ["19-100316"]
+ * },
+ * "product": {
+ * "mfg": "Quanta",
+ * "pname": "CI-Catalina",
+ * "pn": "10000000001",
+ * "ver": "MP",
+ * "serial": "10000000000000",
+ * "atag": "QEMU"
+ * }
+ * }
+ */
+static const uint8_t osfp_eeprom[] = {
+ 0x01, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x00, 0xf4, 0x01, 0x09, 0x19, 0x8c,
+ 0x19, 0xf0, 0xc6, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xd7, 0x43, 0x61,
+ 0x74, 0x61, 0x6c, 0x69, 0x6e, 0x61, 0x20, 0x4f, 0x53, 0x46, 0x50, 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, 0x45, 0x16, 0xc1, 0x00, 0x00, 0x6e, 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 osfp_eeprom_len = sizeof(osfp_eeprom);
+
static void catalina_bmc_i2c_init(AspeedMachineState *bmc)
{
/* Reference from v6.16-rc2 aspeed-bmc-facebook-catalina.dts */
@@ -227,7 +265,8 @@ static void catalina_bmc_i2c_init(AspeedMachineState *bmc)
i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 6),
TYPE_PCA9552, 0x25);
/* eeprom@51 */
- at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 6), 0x51, 8 * KiB);
+ at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 6), 0x51, 8 * KiB,
+ osfp_eeprom, osfp_eeprom_len);
/* i2c1mux0ch7 */
/* eeprom@53 */