Commit 3836f5a4db for qemu.org

commit 3836f5a4db858e0b314cbe58114f3319758448c8
Author: Patrick Williams <patrick@stwcx.xyz>
Date:   Wed Dec 17 14:11:35 2025 -0500

    hw/arm/aspeed: catalina: add GB200-IO FRU EEPROM

    Use ipmitool/frugen tool to generate a GB200-IO 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-8-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 4dd72c615d..37f0e1b65e 100644
--- a/hw/arm/aspeed_ast2600_catalina.c
+++ b/hw/arm/aspeed_ast2600_catalina.c
@@ -304,6 +304,43 @@ static const uint8_t gb200_eeprom[] = {
 };
 static const size_t gb200_eeprom_len = sizeof(gb200_eeprom);

+/*
+ * GB200 IO Board FRU data. Generated with frugen.
+ *
+ *    {
+ *        "board": {
+ *            "mfg": "Nvidia",
+ *            "pname": "2x ConnectX-7 Mezz (QEMU)",
+ *            "pn": "000-00000-0000-000",
+ *            "serial": "000000000000",
+ *            "date": "01/12/2025 00:00"
+ *        },
+ *        "product": {
+ *            "mfg": "Nvidia",
+ *            "pname": "2x ConnectX-7 Mezz",
+ *            "pn": "100-00000-0000-001",
+ *            "ver": "A1",
+ *            "serial": "100000000001",
+ *            "atag": "QEMU"
+ *        }
+ *    }
+ */
+static const uint8_t gb200io_eeprom[] = {
+    0x01, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x00, 0xf4, 0x01, 0x09, 0x19, 0x8c,
+    0x19, 0xf0, 0xc6, 0x4e, 0x76, 0x69, 0x64, 0x69, 0x61, 0xd9, 0x32, 0x78,
+    0x20, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x58, 0x2d, 0x37, 0x20,
+    0x4d, 0x65, 0x7a, 0x7a, 0x20, 0x28, 0x51, 0x45, 0x4d, 0x55, 0x29, 0x89,
+    0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x41, 0x8e, 0x10, 0x04,
+    0x35, 0x10, 0x04, 0x41, 0x50, 0x03, 0x41, 0x10, 0xd4, 0x40, 0x10, 0x04,
+    0xc0, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8e, 0x01, 0x08, 0x19, 0xc6,
+    0x4e, 0x76, 0x69, 0x64, 0x69, 0x61, 0xd2, 0x32, 0x78, 0x20, 0x43, 0x6f,
+    0x6e, 0x6e, 0x65, 0x63, 0x74, 0x58, 0x2d, 0x37, 0x20, 0x4d, 0x65, 0x7a,
+    0x7a, 0x8e, 0x11, 0x04, 0x35, 0x10, 0x04, 0x41, 0x50, 0x03, 0x41, 0x10,
+    0xd4, 0x40, 0x50, 0x04, 0x82, 0x61, 0x04, 0x89, 0x11, 0x04, 0x41, 0x10,
+    0x04, 0x41, 0x10, 0x04, 0x45, 0x83, 0x71, 0xd9, 0xd6, 0xc0, 0xc1, 0x04
+};
+static const size_t gb200io_eeprom_len = sizeof(gb200io_eeprom);
+
 static void catalina_bmc_i2c_init(AspeedMachineState *bmc)
 {
     /* Reference from v6.16-rc2 aspeed-bmc-facebook-catalina.dts */
@@ -329,7 +366,8 @@ static void catalina_bmc_i2c_init(AspeedMachineState *bmc)
     i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 1),
                             TYPE_PCA9552, 0x20);
     /* eeprom@50 */
-    at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 1), 0x50, 8 * KiB);
+    at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 1), 0x50, 8 * KiB,
+                          gb200io_eeprom, gb200io_eeprom_len);

     /* i2c-mux@73 (PCA9546) on i2c0 */
     i2c_slave_create_simple(i2c[0], TYPE_PCA9546, 0x73);
@@ -345,7 +383,8 @@ static void catalina_bmc_i2c_init(AspeedMachineState *bmc)
     i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 1),
                             TYPE_PCA9552, 0x21);
     /* eeprom@50 */
-    at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 1), 0x50, 8 * KiB);
+    at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 1), 0x50, 8 * KiB,
+                          gb200io_eeprom, gb200io_eeprom_len);

     /* i2c-mux@77 (PCA9546) on i2c0 */
     i2c_slave_create_simple(i2c[0], TYPE_PCA9546, 0x77);