Use ipmitool/frugen tool to generate a HDD image based on a sanitized set of data from a real device EEPROM.
Signed-off-by: Patrick Williams <[email protected]> --- hw/arm/aspeed_ast2600_catalina.c | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/hw/arm/aspeed_ast2600_catalina.c b/hw/arm/aspeed_ast2600_catalina.c index 17db9035bd..4cfde870af 100644 --- a/hw/arm/aspeed_ast2600_catalina.c +++ b/hw/arm/aspeed_ast2600_catalina.c @@ -227,6 +227,44 @@ static const uint8_t fio_eeprom[] = { }; static const size_t fio_eeprom_len = sizeof(fio_eeprom); +/* + * HDD Carrier Board FRU data. Generated with frugen. + * + * { + * "board": { + * "mfg": "Quanta", + * "pname": "Catalina HDD MP (QEMU)", + * "pn": "00000000000", + * "serial": "00000000000000", + * "date": "01/12/2025 00:00", + * "custom": ["19-100319", "", "", "adc-ina"] + * }, + * "product": { + * "mfg": "Quanta", + * "pname": "CI-Catalina", + * "pn": "10000000001", + * "ver": "MP", + * "serial": "10000000000000", + * "atag": "QEMU" + * } + * } + */ +static const uint8_t hdd_eeprom[] = { + 0x01, 0x00, 0x00, 0x01, 0x0b, 0x00, 0x00, 0xf3, 0x01, 0x0a, 0x19, 0x8c, + 0x19, 0xf0, 0xc6, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xd6, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x69, 0x6e, 0x61, 0x20, 0x48, 0x44, 0x44, 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, 0x19, 0xc0, 0xc0, 0xc7, 0x61, 0x64, 0x63, 0x2d, 0x69, 0x6e, + 0x61, 0xc1, 0x00, 0xff, 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 hdd_eeprom_len = sizeof(hdd_eeprom); + static void catalina_bmc_i2c_init(AspeedMachineState *bmc) { /* Reference from v6.16-rc2 aspeed-bmc-facebook-catalina.dts */ @@ -330,7 +368,8 @@ static void catalina_bmc_i2c_init(AspeedMachineState *bmc) i2c_mux = i2c_slave_create_simple(i2c[5], TYPE_PCA9548, 0x70); /* i2c5mux0ch6 */ /* eeprom@52 */ - at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 6), 0x52, 8 * KiB); + at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 6), 0x52, 8 * KiB, + hdd_eeprom, hdd_eeprom_len); /* i2c5mux0ch7 */ /* ina230@40 - no model */ /* ina230@41 - no model */ -- 2.51.2
