Skip to contentSkip to conversation

aspeed add montblanc bmc reference from fuji

PATCH In review ~ssinprem 5 participants 8 messages Jul 4, 2023 – Jul 6, 2023 Arm/Aspeed machine support

lore
Share & tools
lore

~ssinprem

author
#0 lore raw

PATCH v5 1/1 aspeed add montblanc bmc reference from fuji

From: Sittisak Sinprem <[email protected]>

- I2C list follow I2C Tree v1.6 20230320
- fru eeprom data use FB FRU format version 4

---
 docs/system/arm/aspeed.rst |  1 +
 hw/arm/aspeed.c            | 65 ++++++++++++++++++++++++++++++++++++++
 hw/arm/aspeed_eeprom.c     | 50 +++++++++++++++++++++++++++++
 hw/arm/aspeed_eeprom.h     |  7 ++++
 4 files changed, 123 insertions(+)
docs/system/arm/aspeed.rst +1 -0
index 80538422a1..5e0824f48b 100644
@@ -33,6 +33,7 @@ AST2600 SoC based machines :
 - ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
 - ``rainier-bmc``          IBM Rainier POWER10 BMC
 - ``fuji-bmc``             Facebook Fuji BMC
+- ``montblanc-bmc``        Facebook Montblanc BMC
 - ``bletchley-bmc``        Facebook Bletchley BMC
 - ``fby35-bmc``            Facebook fby35 BMC
 - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
hw/arm/aspeed.c +65 -0

89 lines not on this page · raw message

hw/arm/aspeed_eeprom.c +50 -0

59 lines not on this page · raw message

hw/arm/aspeed_eeprom.h +7 -0
index bbf9e54365..b8fbdd0734 100644
@@ -27,4 +27,11 @@ extern const size_t rainier_bb_fruid_len;
 extern const uint8_t rainier_bmc_fruid[];
 extern const size_t rainier_bmc_fruid_len;
 
+extern const uint8_t montblanc_scm_fruid[];
+extern const uint8_t montblanc_fcm_fruid[];
+extern const uint8_t montblanc_bmc_fruid[];
+extern const size_t montblanc_scm_fruid_len;
+extern const size_t montblanc_fcm_fruid_len;
+extern const size_t montblanc_bmc_fruid_len;
+
 #endif
Signature · 1 line
2.38.5
#1 lore raw
Quoted 6 lines · ~ssinprem

From: Sittisak Sinprem <[email protected]>

- I2C list follow I2C Tree v1.6 20230320
- fru eeprom data use FB FRU format version 4

You shoot too fast :) Please add some description for the EEPROM contents. What they enable when the OS/FW boots is good to know for QEMU.

Thanks,

C.

Quoted 197 lines
---
  docs/system/arm/aspeed.rst |  1 +
  hw/arm/aspeed.c            | 65 ++++++++++++++++++++++++++++++++++++++
  hw/arm/aspeed_eeprom.c     | 50 +++++++++++++++++++++++++++++
  hw/arm/aspeed_eeprom.h     |  7 ++++
  4 files changed, 123 insertions(+)
docs/system/arm/aspeed.rst +1 -0
index 80538422a1..5e0824f48b 100644
@@ -33,6 +33,7 @@ AST2600 SoC based machines :
  - ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
  - ``rainier-bmc``          IBM Rainier POWER10 BMC
  - ``fuji-bmc``             Facebook Fuji BMC
+- ``montblanc-bmc``        Facebook Montblanc BMC
  - ``bletchley-bmc``        Facebook Bletchley BMC
  - ``fby35-bmc``            Facebook fby35 BMC
  - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
hw/arm/aspeed.c +65 -0
index 9fca644d92..bbb7a3392c 100644
@@ -189,6 +189,10 @@ struct AspeedMachineState {
  #define FUJI_BMC_HW_STRAP1    0x00000000
  #define FUJI_BMC_HW_STRAP2    0x00000000
 
+/* Montblanc hardware value */
+#define MONTBLANC_BMC_HW_STRAP1    0x00000000
+#define MONTBLANC_BMC_HW_STRAP2    0x00000000
+
  /* Bletchley hardware value */
  /* TODO: Leave same as EVB for now. */
  #define BLETCHLEY_BMC_HW_STRAP1 AST2600_EVB_HW_STRAP1
@@ -925,6 +929,41 @@ static void fuji_bmc_i2c_init(AspeedMachineState *bmc)
      }
  }
 
+static void montblanc_bmc_i2c_init(AspeedMachineState *bmc)
+{
+    AspeedSoCState *soc = &bmc->soc;
+    I2CBus *i2c[16] = {};
+
+    for (int i = 0; i < 16; i++) {
+        i2c[i] = aspeed_i2c_get_bus(&soc->i2c, i);
+    }
+
+    /* Ref from Minipack3_I2C_Tree_V1.6 20230320 */
+    at24c_eeprom_init_rom(i2c[3], 0x56, 8192, montblanc_scm_fruid,
+                          montblanc_scm_fruid_len);
+    at24c_eeprom_init_rom(i2c[6], 0x53, 8192, montblanc_fcm_fruid,
+                          montblanc_fcm_fruid_len);
+
+    /* CPLD and FPGA */
+    at24c_eeprom_init(i2c[1], 0x35, 256);  /* SCM CPLD */
+    at24c_eeprom_init(i2c[5], 0x35, 256);  /* COMe CPLD TODO: need to update */
+    at24c_eeprom_init(i2c[12], 0x60, 256); /* MCB PWR CPLD */
+    at24c_eeprom_init(i2c[13], 0x35, 256); /* IOB FPGA */
+
+    /* on BMC board */
+    at24c_eeprom_init_rom(i2c[8], 0x51, 8192, montblanc_bmc_fruid,
+                          montblanc_bmc_fruid_len); /* BMC EEPROM */
+    i2c_slave_create_simple(i2c[8], TYPE_LM75, 0x48); /* Thermal Sensor */
+
+    /* COMe Sensor/EEPROM */
+    at24c_eeprom_init(i2c[0], 0x56, 16384);          /* FRU EEPROM */
+    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x48); /* INLET Sensor */
+    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x4A); /* OUTLET Sensor */
+
+    /* It expects a pca9555 but a pca9552 is compatible */
+    create_pca9552(soc, 4, 0x27);
+}
+
  #define TYPE_TMP421 "tmp421"
 
  static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
@@ -1452,6 +1491,28 @@ static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
          aspeed_soc_num_cpus(amc->soc_name);
  };
 
+#define MONTBLANC_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
+
+static void aspeed_machine_montblanc_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+    mc->desc = "Facebook Montblanc BMC (Cortex-A7)";
+    amc->soc_name = "ast2600-a3";
+    amc->hw_strap1 = MONTBLANC_BMC_HW_STRAP1;
+    amc->hw_strap2 = MONTBLANC_BMC_HW_STRAP2;
+    amc->fmc_model = "mx66l1g45g";
+    amc->spi_model = "mx66l1g45g";
+    amc->num_cs = 2;
+    amc->macs_mask = ASPEED_MAC3_ON;
+    amc->i2c_init = montblanc_bmc_i2c_init;
+    amc->uart_default = ASPEED_DEV_UART1;
+    mc->default_ram_size = MONTBLANC_BMC_RAM_SIZE;
+    mc->default_cpus = mc->min_cpus = mc->max_cpus =
+        aspeed_soc_num_cpus(amc->soc_name);
+};
+
  #define BLETCHLEY_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
 
  static void aspeed_machine_bletchley_class_init(ObjectClass *oc, void *data)
@@ -1703,6 +1764,10 @@ static const TypeInfo aspeed_machine_types[] = {
          .name          = MACHINE_TYPE_NAME("fuji-bmc"),
          .parent        = TYPE_ASPEED_MACHINE,
          .class_init    = aspeed_machine_fuji_class_init,
+    }, {
+        .name          = MACHINE_TYPE_NAME("montblanc-bmc"),
+        .parent        = TYPE_ASPEED_MACHINE,
+        .class_init    = aspeed_machine_montblanc_class_init,
      }, {
          .name          = MACHINE_TYPE_NAME("bletchley-bmc"),
          .parent        = TYPE_ASPEED_MACHINE,
hw/arm/aspeed_eeprom.c +50 -0
index ace5266cec..8cc73f83dc 100644
@@ -161,6 +161,53 @@ const uint8_t rainier_bmc_fruid[] = {
      0x31, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
  };
 
+/* Montblanc BMC FRU */
+const uint8_t montblanc_scm_fruid[] = {
+    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
+    0x43, 0x4b, 0x33, 0x5f, 0x53, 0x43, 0x4d, 0x02, 0x08, 0x32, 0x30, 0x30,
+    0x30, 0x32, 0x39, 0x34, 0x35, 0x04, 0x0c, 0x31, 0x33, 0x32, 0x30, 0x30,
+    0x30, 0x31, 0x36, 0x34, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31, 0x33, 0x31,
+    0x30, 0x30, 0x30, 0x31, 0x32, 0x37, 0x30, 0x31, 0x20, 0x06, 0x0c, 0x52,
+    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x30, 0x33, 0x30, 0x31, 0x07,
+    0x0d, 0x41, 0x30, 0x33, 0x31, 0x33, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01, 0x00, 0x0b,
+    0x0d, 0x4d, 0x32, 0x32, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37, 0x30, 0x30,
+    0x30, 0x32, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32,
+    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03,
+    0x43, 0x54, 0x48, 0x10, 0x06, 0x01, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x13,
+    0x03, 0x53, 0x43, 0x4d, 0xfa, 0x02, 0x02, 0x61,
+};
+
+const uint8_t montblanc_fcm_fruid[] = {
+    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
+    0x43, 0x4b, 0x33, 0x5f, 0x46, 0x43, 0x42, 0x02, 0x08, 0x33, 0x30, 0x30,
+    0x30, 0x30, 0x31, 0x36, 0x31, 0x04, 0x0c, 0x31, 0x33, 0x32, 0x30, 0x30,
+    0x30, 0x31, 0x36, 0x33, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31, 0x33, 0x31,
+    0x30, 0x30, 0x30, 0x31, 0x33, 0x30, 0x30, 0x31, 0x20, 0x06, 0x0c, 0x52,
+    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x31, 0x32, 0x30, 0x31, 0x07,
+    0x0d, 0x41, 0x31, 0x32, 0x31, 0x32, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01, 0x00, 0x0b,
+    0x0d, 0x46, 0x35, 0x30, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37, 0x30, 0x30,
+    0x30, 0x35, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32,
+    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03,
+    0x43, 0x54, 0x48, 0x10, 0x06, 0x02, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x11,
+    0x06, 0x03, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x12, 0x02, 0x8a, 0x00, 0x13,
+    0x03, 0x46, 0x43, 0x42, 0xfa, 0x02, 0x50, 0x47,
+};
+
+const uint8_t montblanc_bmc_fruid[] = {
+    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
+    0x43, 0x4b, 0x33, 0x5f, 0x42, 0x4d, 0x43, 0x04, 0x0c, 0x31, 0x33, 0x32,
+    0x30, 0x30, 0x30, 0x31, 0x33, 0x36, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31,
+    0x33, 0x31, 0x30, 0x30, 0x30, 0x30, 0x38, 0x36, 0x30, 0x35, 0x20, 0x06,
+    0x0c, 0x52, 0x33, 0x30, 0x39, 0x37, 0x47, 0x30, 0x30, 0x30, 0x32, 0x30,
+    0x37, 0x07, 0x0d, 0x42, 0x30, 0x32, 0x37, 0x34, 0x58, 0x58, 0x58, 0x58,
+    0x58, 0x58, 0x58, 0x58, 0x08, 0x01, 0x04, 0x09, 0x01, 0x00, 0x0a, 0x01,
+    0x00, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32, 0x33,
+    0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03, 0x43,
+    0x54, 0x48, 0x13, 0x03, 0x42, 0x4d, 0x43, 0xfa, 0x02, 0xef, 0xba,
+};
+
  const size_t tiogapass_bmc_fruid_len = sizeof(tiogapass_bmc_fruid);
  const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
  const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
@@ -168,3 +215,6 @@ const size_t fby35_bmc_fruid_len = sizeof(fby35_bmc_fruid);
  const size_t yosemitev2_bmc_fruid_len = sizeof(yosemitev2_bmc_fruid);
  const size_t rainier_bb_fruid_len = sizeof(rainier_bb_fruid);
  const size_t rainier_bmc_fruid_len = sizeof(rainier_bmc_fruid);
+const size_t montblanc_scm_fruid_len = sizeof(montblanc_scm_fruid);
+const size_t montblanc_fcm_fruid_len = sizeof(montblanc_fcm_fruid);
+const size_t montblanc_bmc_fruid_len = sizeof(montblanc_bmc_fruid);
hw/arm/aspeed_eeprom.h +7 -0
index bbf9e54365..b8fbdd0734 100644
@@ -27,4 +27,11 @@ extern const size_t rainier_bb_fruid_len;
  extern const uint8_t rainier_bmc_fruid[];
  extern const size_t rainier_bmc_fruid_len;
 
+extern const uint8_t montblanc_scm_fruid[];
+extern const uint8_t montblanc_fcm_fruid[];
+extern const uint8_t montblanc_bmc_fruid[];
+extern const size_t montblanc_scm_fruid_len;
+extern const size_t montblanc_fcm_fruid_len;
+extern const size_t montblanc_bmc_fruid_len;
+
  #endif
#2 lore raw

Hi Meta Team,

the FRU EEPROM content, I think for now detail still be confidential, Please confirm, Can we add the description in Qemu upstream following Cedric's request?

Quoted 257 lines · Cédric Le Goater
Quoted 6 lines · ~ssinprem

From: Sittisak Sinprem <[email protected]>

- I2C list follow I2C Tree v1.6 20230320
- fru eeprom data use FB FRU format version 4

You shoot too fast :) Please add some description for the EEPROM contents. What they enable when the OS/FW boots is good to know for QEMU.

Thanks,

C.

hw/arm/aspeed.c static void fuji_bmc_i2c_init(AspeedMachineState

Quoted 35 lines
---
  docs/system/arm/aspeed.rst |  1 +
  hw/arm/aspeed.c            | 65 ++++++++++++++++++++++++++++++++++++++
  hw/arm/aspeed_eeprom.c     | 50 +++++++++++++++++++++++++++++
  hw/arm/aspeed_eeprom.h     |  7 ++++
  4 files changed, 123 insertions(+)
docs/system/arm/aspeed.rst +1 -0
index 80538422a1..5e0824f48b 100644
@@ -33,6 +33,7 @@ AST2600 SoC based machines :
  - ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
  - ``rainier-bmc``          IBM Rainier POWER10 BMC
  - ``fuji-bmc``             Facebook Fuji BMC
+- ``montblanc-bmc``        Facebook Montblanc BMC
  - ``bletchley-bmc``        Facebook Bletchley BMC
  - ``fby35-bmc``            Facebook fby35 BMC
  - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
hw/arm/aspeed.c +4 -0
index 9fca644d92..bbb7a3392c 100644
@@ -189,6 +189,10 @@ struct AspeedMachineState {
  #define FUJI_BMC_HW_STRAP1    0x00000000
  #define FUJI_BMC_HW_STRAP2    0x00000000
 
+/* Montblanc hardware value */
+#define MONTBLANC_BMC_HW_STRAP1    0x00000000
+#define MONTBLANC_BMC_HW_STRAP2    0x00000000
+
  /* Bletchley hardware value */
  /* TODO: Leave same as EVB for now. */
  #define BLETCHLEY_BMC_HW_STRAP1 AST2600_EVB_HW_STRAP1
@@ -925,6 +929,41 @@ static void fuji_bmc_i2c_init(AspeedMachineState

*bmc)

Quoted 11 lines
hw/arm/aspeed.c +8 -0
      }
  }
 
+static void montblanc_bmc_i2c_init(AspeedMachineState *bmc)
+{
+    AspeedSoCState *soc = &bmc->soc;
+    I2CBus *i2c[16] = {};
+
+    for (int i = 0; i < 16; i++) {
+        i2c[i] = aspeed_i2c_get_bus(&soc->i2c, i);
+    }

hw/arm/aspeed.c static void fuji_bmc_i2c_init(AspeedMachineState *bmc)

Quoted 10 lines
hw/arm/aspeed.c +10 -0
+
+    /* Ref from Minipack3_I2C_Tree_V1.6 20230320 */
+    at24c_eeprom_init_rom(i2c[3], 0x56, 8192, montblanc_scm_fruid,
+                          montblanc_scm_fruid_len);
+    at24c_eeprom_init_rom(i2c[6], 0x53, 8192, montblanc_fcm_fruid,
+                          montblanc_fcm_fruid_len);
+
+    /* CPLD and FPGA */
+    at24c_eeprom_init(i2c[1], 0x35, 256);  /* SCM CPLD */
+    at24c_eeprom_init(i2c[5], 0x35, 256);  /* COMe CPLD TODO: need to

update */

hw/arm/aspeed.c static void fuji_bmc_i2c_init(AspeedMachineState *bmc)

Quoted 7 lines
hw/arm/aspeed.c +7 -0
+    at24c_eeprom_init(i2c[12], 0x60, 256); /* MCB PWR CPLD */
+    at24c_eeprom_init(i2c[13], 0x35, 256); /* IOB FPGA */
+
+    /* on BMC board */
+    at24c_eeprom_init_rom(i2c[8], 0x51, 8192, montblanc_bmc_fruid,
+                          montblanc_bmc_fruid_len); /* BMC EEPROM */
+    i2c_slave_create_simple(i2c[8], TYPE_LM75, 0x48); /* Thermal Sensor

*/

hw/arm/aspeed.c static void fuji_bmc_i2c_init(AspeedMachineState *bmc)

Quoted 5 lines
hw/arm/aspeed.c +5 -0
+
+    /* COMe Sensor/EEPROM */
+    at24c_eeprom_init(i2c[0], 0x56, 16384);          /* FRU EEPROM */
+    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x48); /* INLET Sensor */
+    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x4A); /* OUTLET Sensor

*/

hw/arm/aspeed.c static void

Quoted 9 lines
hw/arm/aspeed.c +5 -0
+
+    /* It expects a pca9555 but a pca9552 is compatible */
+    create_pca9552(soc, 4, 0x27);
+}
+
  #define TYPE_TMP421 "tmp421"
 
  static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
@@ -1452,6 +1491,28 @@ static void

aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)

hw/arm/aspeed.c static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)

Quoted 6 lines
hw/arm/aspeed.c +3 -0
          aspeed_soc_num_cpus(amc->soc_name);
  };
 
+#define MONTBLANC_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
+
+static void aspeed_machine_montblanc_class_init(ObjectClass *oc, void

*data)

Quoted 12 lines
hw/arm/aspeed.c +12 -0
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+    mc->desc = "Facebook Montblanc BMC (Cortex-A7)";
+    amc->soc_name = "ast2600-a3";
+    amc->hw_strap1 = MONTBLANC_BMC_HW_STRAP1;
+    amc->hw_strap2 = MONTBLANC_BMC_HW_STRAP2;
+    amc->fmc_model = "mx66l1g45g";
+    amc->spi_model = "mx66l1g45g";
+    amc->num_cs = 2;
+    amc->macs_mask = ASPEED_MAC3_ON;

hw/arm/aspeed.c static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)

Quoted 10 lines
hw/arm/aspeed.c +7 -0
+    amc->i2c_init = montblanc_bmc_i2c_init;
+    amc->uart_default = ASPEED_DEV_UART1;
+    mc->default_ram_size = MONTBLANC_BMC_RAM_SIZE;
+    mc->default_cpus = mc->min_cpus = mc->max_cpus =
+        aspeed_soc_num_cpus(amc->soc_name);
+};
+
  #define BLETCHLEY_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
 
  static void aspeed_machine_bletchley_class_init(ObjectClass *oc, void

*data)

Quoted 16 lines
hw/arm/aspeed.c +4 -0
@@ -1703,6 +1764,10 @@ static const TypeInfo aspeed_machine_types[] = {
          .name          = MACHINE_TYPE_NAME("fuji-bmc"),
          .parent        = TYPE_ASPEED_MACHINE,
          .class_init    = aspeed_machine_fuji_class_init,
+    }, {
+        .name          = MACHINE_TYPE_NAME("montblanc-bmc"),
+        .parent        = TYPE_ASPEED_MACHINE,
+        .class_init    = aspeed_machine_montblanc_class_init,
      }, {
          .name          = MACHINE_TYPE_NAME("bletchley-bmc"),
          .parent        = TYPE_ASPEED_MACHINE,
hw/arm/aspeed_eeprom.c +0 -0
index ace5266cec..8cc73f83dc 100644

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 166

Quoted 6 lines
hw/arm/aspeed_eeprom.c +3 -0
@@ -161,6 +161,53 @@ const uint8_t rainier_bmc_fruid[] = {
      0x31, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
  };
 
+/* Montblanc BMC FRU */
+const uint8_t montblanc_scm_fruid[] = {
+    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50,

0x41,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 167

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x43, 0x4b, 0x33, 0x5f, 0x53, 0x43, 0x4d, 0x02, 0x08, 0x32, 0x30,

0x30,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 168

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x32, 0x39, 0x34, 0x35, 0x04, 0x0c, 0x31, 0x33, 0x32, 0x30,

0x30,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 169

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x31, 0x36, 0x34, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31, 0x33,

0x31,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 170

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x30, 0x30, 0x31, 0x32, 0x37, 0x30, 0x31, 0x20, 0x06, 0x0c,

0x52,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 171

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x30, 0x33, 0x30, 0x31,

0x07,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 172

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x0d, 0x41, 0x30, 0x33, 0x31, 0x33, 0x58, 0x58, 0x58, 0x58, 0x58,

0x58,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 173

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01, 0x00,

0x0b,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 174

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x0d, 0x4d, 0x32, 0x32, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37, 0x30,

0x30,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 175

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x32, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30,

0x32,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 176

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f,

0x03,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 177

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x43, 0x54, 0x48, 0x10, 0x06, 0x01, 0x00, 0x00, 0x91, 0xdb, 0xb4,

0x13,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = {

Quoted 5 lines
hw/arm/aspeed_eeprom.c +5 -0
+    0x03, 0x53, 0x43, 0x4d, 0xfa, 0x02, 0x02, 0x61,
+};
+
+const uint8_t montblanc_fcm_fruid[] = {
+    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50,

0x41,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 183

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x43, 0x4b, 0x33, 0x5f, 0x46, 0x43, 0x42, 0x02, 0x08, 0x33, 0x30,

0x30,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 184

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x30, 0x31, 0x36, 0x31, 0x04, 0x0c, 0x31, 0x33, 0x32, 0x30,

0x30,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 185

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x31, 0x36, 0x33, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31, 0x33,

0x31,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 186

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x30, 0x30, 0x31, 0x33, 0x30, 0x30, 0x31, 0x20, 0x06, 0x0c,

0x52,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 187

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x31, 0x32, 0x30, 0x31,

0x07,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 188

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x0d, 0x41, 0x31, 0x32, 0x31, 0x32, 0x58, 0x58, 0x58, 0x58, 0x58,

0x58,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 189

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01, 0x00,

0x0b,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 190

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x0d, 0x46, 0x35, 0x30, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37, 0x30,

0x30,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 191

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x35, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30,

0x32,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 192

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f,

0x03,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 193

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x43, 0x54, 0x48, 0x10, 0x06, 0x02, 0x00, 0x00, 0x91, 0xdb, 0xb4,

0x11,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 194

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x06, 0x03, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x12, 0x02, 0x8a, 0x00,

0x13,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = {

Quoted 5 lines
hw/arm/aspeed_eeprom.c +5 -0
+    0x03, 0x46, 0x43, 0x42, 0xfa, 0x02, 0x50, 0x47,
+};
+
+const uint8_t montblanc_bmc_fruid[] = {
+    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50,

0x41,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 200

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x43, 0x4b, 0x33, 0x5f, 0x42, 0x4d, 0x43, 0x04, 0x0c, 0x31, 0x33,

0x32,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 201

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x30, 0x30, 0x31, 0x33, 0x36, 0x30, 0x31, 0x20, 0x05, 0x0c,

0x31,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 202

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x33, 0x31, 0x30, 0x30, 0x30, 0x30, 0x38, 0x36, 0x30, 0x35, 0x20,

0x06,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 203

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x0c, 0x52, 0x33, 0x30, 0x39, 0x37, 0x47, 0x30, 0x30, 0x30, 0x32,

0x30,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 204

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x37, 0x07, 0x0d, 0x42, 0x30, 0x32, 0x37, 0x34, 0x58, 0x58, 0x58,

0x58,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 205

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x58, 0x58, 0x58, 0x58, 0x08, 0x01, 0x04, 0x09, 0x01, 0x00, 0x0a,

0x01,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 206

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x00, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32,

0x33,

hw/arm/aspeed_eeprom.c const uint8_t rainier_bmc_fruid[] = { · line 207

Quoted 1 line
hw/arm/aspeed_eeprom.c +1 -0
+    0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03,

0x43,

hw/arm/aspeed_eeprom.c const size_t fby35_bmc_fruid_len =

Quoted 7 lines
hw/arm/aspeed_eeprom.c +3 -0
+    0x54, 0x48, 0x13, 0x03, 0x42, 0x4d, 0x43, 0xfa, 0x02, 0xef, 0xba,
+};
+
  const size_t tiogapass_bmc_fruid_len = sizeof(tiogapass_bmc_fruid);
  const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
  const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
@@ -168,3 +215,6 @@ const size_t fby35_bmc_fruid_len =

sizeof(fby35_bmc_fruid);

Quoted 22 lines
hw/arm/aspeed_eeprom.c +3 -0
  const size_t yosemitev2_bmc_fruid_len = sizeof(yosemitev2_bmc_fruid);
  const size_t rainier_bb_fruid_len = sizeof(rainier_bb_fruid);
  const size_t rainier_bmc_fruid_len = sizeof(rainier_bmc_fruid);
+const size_t montblanc_scm_fruid_len = sizeof(montblanc_scm_fruid);
+const size_t montblanc_fcm_fruid_len = sizeof(montblanc_fcm_fruid);
+const size_t montblanc_bmc_fruid_len = sizeof(montblanc_bmc_fruid);
hw/arm/aspeed_eeprom.h +7 -0
index bbf9e54365..b8fbdd0734 100644
@@ -27,4 +27,11 @@ extern const size_t rainier_bb_fruid_len;
  extern const uint8_t rainier_bmc_fruid[];
  extern const size_t rainier_bmc_fruid_len;
 
+extern const uint8_t montblanc_scm_fruid[];
+extern const uint8_t montblanc_fcm_fruid[];
+extern const uint8_t montblanc_bmc_fruid[];
+extern const size_t montblanc_scm_fruid_len;
+extern const size_t montblanc_fcm_fruid_len;
+extern const size_t montblanc_bmc_fruid_len;
+
  #endif
#3 lore raw
Quoted 4 lines · Sittisak Sinprem

Hi Meta Team,

the FRU EEPROM content, I think for now detail still be confidential, Please confirm, Can we add the description in Qemu upstream following Cedric's request?

We don't need all the details, and not the confidential part of course.

C.

Quoted 217 lines · On Tue, Jul 4, 2023 at 6:19 PM Cédric Le Goater <[email protected]…
    On 7/4/23 13:06, ~ssinprem wrote:
     > From: Sittisak Sinprem <[email protected] <mailto:[email protected]>>
     >
     > - I2C list follow I2C Tree v1.6 20230320
     > - fru eeprom data use FB FRU format version 4
     >
     > Signed-off-by: Sittisak Sinprem <[email protected] <mailto:[email protected]>>

    You shoot too fast :) Please add some description for the EEPROM contents.
    What they enable when the OS/FW boots is good to know for QEMU.

    Thanks,

    C.


     > ---
     >   docs/system/arm/aspeed.rst |  1 +
     >   hw/arm/aspeed.c            | 65 ++++++++++++++++++++++++++++++++++++++
     >   hw/arm/aspeed_eeprom.c     | 50 +++++++++++++++++++++++++++++
     >   hw/arm/aspeed_eeprom.h     |  7 ++++
     >   4 files changed, 123 insertions(+)
     >
     > diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst
     > index 80538422a1..5e0824f48b 100644
     > --- a/docs/system/arm/aspeed.rst
     > +++ b/docs/system/arm/aspeed.rst
     > @@ -33,6 +33,7 @@ AST2600 SoC based machines :
     >   - ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
     >   - ``rainier-bmc``          IBM Rainier POWER10 BMC
     >   - ``fuji-bmc``             Facebook Fuji BMC
     > +- ``montblanc-bmc``        Facebook Montblanc BMC
     >   - ``bletchley-bmc``        Facebook Bletchley BMC
     >   - ``fby35-bmc``            Facebook fby35 BMC
     >   - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
     > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
     > index 9fca644d92..bbb7a3392c 100644
     > --- a/hw/arm/aspeed.c
     > +++ b/hw/arm/aspeed.c
     > @@ -189,6 +189,10 @@ struct AspeedMachineState {
     >   #define FUJI_BMC_HW_STRAP1    0x00000000
     >   #define FUJI_BMC_HW_STRAP2    0x00000000
     >
     > +/* Montblanc hardware value */
     > +#define MONTBLANC_BMC_HW_STRAP1    0x00000000
     > +#define MONTBLANC_BMC_HW_STRAP2    0x00000000
     > +
     >   /* Bletchley hardware value */
     >   /* TODO: Leave same as EVB for now. */
     >   #define BLETCHLEY_BMC_HW_STRAP1 AST2600_EVB_HW_STRAP1
     > @@ -925,6 +929,41 @@ static void fuji_bmc_i2c_init(AspeedMachineState *bmc)
     >       }
     >   }
     >
     > +static void montblanc_bmc_i2c_init(AspeedMachineState *bmc)
     > +{
     > +    AspeedSoCState *soc = &bmc->soc;
     > +    I2CBus *i2c[16] = {};
     > +
     > +    for (int i = 0; i < 16; i++) {
     > +        i2c[i] = aspeed_i2c_get_bus(&soc->i2c, i);
     > +    }
     > +
     > +    /* Ref from Minipack3_I2C_Tree_V1.6 20230320 */
     > +    at24c_eeprom_init_rom(i2c[3], 0x56, 8192, montblanc_scm_fruid,
     > +                          montblanc_scm_fruid_len);
     > +    at24c_eeprom_init_rom(i2c[6], 0x53, 8192, montblanc_fcm_fruid,
     > +                          montblanc_fcm_fruid_len);
     > +
     > +    /* CPLD and FPGA */
     > +    at24c_eeprom_init(i2c[1], 0x35, 256);  /* SCM CPLD */
     > +    at24c_eeprom_init(i2c[5], 0x35, 256);  /* COMe CPLD TODO: need to update */
     > +    at24c_eeprom_init(i2c[12], 0x60, 256); /* MCB PWR CPLD */
     > +    at24c_eeprom_init(i2c[13], 0x35, 256); /* IOB FPGA */
     > +
     > +    /* on BMC board */
     > +    at24c_eeprom_init_rom(i2c[8], 0x51, 8192, montblanc_bmc_fruid,
     > +                          montblanc_bmc_fruid_len); /* BMC EEPROM */
     > +    i2c_slave_create_simple(i2c[8], TYPE_LM75, 0x48); /* Thermal Sensor */
     > +
     > +    /* COMe Sensor/EEPROM */
     > +    at24c_eeprom_init(i2c[0], 0x56, 16384);          /* FRU EEPROM */
     > +    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x48); /* INLET Sensor */
     > +    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x4A); /* OUTLET Sensor */
     > +
     > +    /* It expects a pca9555 but a pca9552 is compatible */
     > +    create_pca9552(soc, 4, 0x27);
     > +}
     > +
     >   #define TYPE_TMP421 "tmp421"
     >
     >   static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
     > @@ -1452,6 +1491,28 @@ static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
     >           aspeed_soc_num_cpus(amc->soc_name);
     >   };
     >
     > +#define MONTBLANC_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
     > +
     > +static void aspeed_machine_montblanc_class_init(ObjectClass *oc, void *data)
     > +{
     > +    MachineClass *mc = MACHINE_CLASS(oc);
     > +    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
     > +
     > +    mc->desc = "Facebook Montblanc BMC (Cortex-A7)";
     > +    amc->soc_name = "ast2600-a3";
     > +    amc->hw_strap1 = MONTBLANC_BMC_HW_STRAP1;
     > +    amc->hw_strap2 = MONTBLANC_BMC_HW_STRAP2;
     > +    amc->fmc_model = "mx66l1g45g";
     > +    amc->spi_model = "mx66l1g45g";
     > +    amc->num_cs = 2;
     > +    amc->macs_mask = ASPEED_MAC3_ON;
     > +    amc->i2c_init = montblanc_bmc_i2c_init;
     > +    amc->uart_default = ASPEED_DEV_UART1;
     > +    mc->default_ram_size = MONTBLANC_BMC_RAM_SIZE;
     > +    mc->default_cpus = mc->min_cpus = mc->max_cpus =
     > +        aspeed_soc_num_cpus(amc->soc_name);
     > +};
     > +
     >   #define BLETCHLEY_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
     >
     >   static void aspeed_machine_bletchley_class_init(ObjectClass *oc, void *data)
     > @@ -1703,6 +1764,10 @@ static const TypeInfo aspeed_machine_types[] = {
     >           .name          = MACHINE_TYPE_NAME("fuji-bmc"),
     >           .parent        = TYPE_ASPEED_MACHINE,
     >           .class_init    = aspeed_machine_fuji_class_init,
     > +    }, {
     > +        .name          = MACHINE_TYPE_NAME("montblanc-bmc"),
     > +        .parent        = TYPE_ASPEED_MACHINE,
     > +        .class_init    = aspeed_machine_montblanc_class_init,
     >       }, {
     >           .name          = MACHINE_TYPE_NAME("bletchley-bmc"),
     >           .parent        = TYPE_ASPEED_MACHINE,
     > diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
     > index ace5266cec..8cc73f83dc 100644
     > --- a/hw/arm/aspeed_eeprom.c
     > +++ b/hw/arm/aspeed_eeprom.c
     > @@ -161,6 +161,53 @@ const uint8_t rainier_bmc_fruid[] = {
     >       0x31, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
     >   };
     >
     > +/* Montblanc BMC FRU */
     > +const uint8_t montblanc_scm_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
     > +    0x43, 0x4b, 0x33, 0x5f, 0x53, 0x43, 0x4d, 0x02, 0x08, 0x32, 0x30, 0x30,
     > +    0x30, 0x32, 0x39, 0x34, 0x35, 0x04, 0x0c, 0x31, 0x33, 0x32, 0x30, 0x30,
     > +    0x30, 0x31, 0x36, 0x34, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31, 0x33, 0x31,
     > +    0x30, 0x30, 0x30, 0x31, 0x32, 0x37, 0x30, 0x31, 0x20, 0x06, 0x0c, 0x52,
     > +    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x30, 0x33, 0x30, 0x31, 0x07,
     > +    0x0d, 0x41, 0x30, 0x33, 0x31, 0x33, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
     > +    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01, 0x00, 0x0b,
     > +    0x0d, 0x4d, 0x32, 0x32, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37, 0x30, 0x30,
     > +    0x30, 0x32, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32,
     > +    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03,
     > +    0x43, 0x54, 0x48, 0x10, 0x06, 0x01, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x13,
     > +    0x03, 0x53, 0x43, 0x4d, 0xfa, 0x02, 0x02, 0x61,
     > +};
     > +
     > +const uint8_t montblanc_fcm_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
     > +    0x43, 0x4b, 0x33, 0x5f, 0x46, 0x43, 0x42, 0x02, 0x08, 0x33, 0x30, 0x30,
     > +    0x30, 0x30, 0x31, 0x36, 0x31, 0x04, 0x0c, 0x31, 0x33, 0x32, 0x30, 0x30,
     > +    0x30, 0x31, 0x36, 0x33, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31, 0x33, 0x31,
     > +    0x30, 0x30, 0x30, 0x31, 0x33, 0x30, 0x30, 0x31, 0x20, 0x06, 0x0c, 0x52,
     > +    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x31, 0x32, 0x30, 0x31, 0x07,
     > +    0x0d, 0x41, 0x31, 0x32, 0x31, 0x32, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
     > +    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01, 0x00, 0x0b,
     > +    0x0d, 0x46, 0x35, 0x30, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37, 0x30, 0x30,
     > +    0x30, 0x35, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32,
     > +    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03,
     > +    0x43, 0x54, 0x48, 0x10, 0x06, 0x02, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x11,
     > +    0x06, 0x03, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x12, 0x02, 0x8a, 0x00, 0x13,
     > +    0x03, 0x46, 0x43, 0x42, 0xfa, 0x02, 0x50, 0x47,
     > +};
     > +
     > +const uint8_t montblanc_bmc_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
     > +    0x43, 0x4b, 0x33, 0x5f, 0x42, 0x4d, 0x43, 0x04, 0x0c, 0x31, 0x33, 0x32,
     > +    0x30, 0x30, 0x30, 0x31, 0x33, 0x36, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31,
     > +    0x33, 0x31, 0x30, 0x30, 0x30, 0x30, 0x38, 0x36, 0x30, 0x35, 0x20, 0x06,
     > +    0x0c, 0x52, 0x33, 0x30, 0x39, 0x37, 0x47, 0x30, 0x30, 0x30, 0x32, 0x30,
     > +    0x37, 0x07, 0x0d, 0x42, 0x30, 0x32, 0x37, 0x34, 0x58, 0x58, 0x58, 0x58,
     > +    0x58, 0x58, 0x58, 0x58, 0x08, 0x01, 0x04, 0x09, 0x01, 0x00, 0x0a, 0x01,
     > +    0x00, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32, 0x33,
     > +    0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03, 0x43,
     > +    0x54, 0x48, 0x13, 0x03, 0x42, 0x4d, 0x43, 0xfa, 0x02, 0xef, 0xba,
     > +};
     > +
     >   const size_t tiogapass_bmc_fruid_len = sizeof(tiogapass_bmc_fruid);
     >   const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
     >   const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
     > @@ -168,3 +215,6 @@ const size_t fby35_bmc_fruid_len = sizeof(fby35_bmc_fruid);
     >   const size_t yosemitev2_bmc_fruid_len = sizeof(yosemitev2_bmc_fruid);
     >   const size_t rainier_bb_fruid_len = sizeof(rainier_bb_fruid);
     >   const size_t rainier_bmc_fruid_len = sizeof(rainier_bmc_fruid);
     > +const size_t montblanc_scm_fruid_len = sizeof(montblanc_scm_fruid);
     > +const size_t montblanc_fcm_fruid_len = sizeof(montblanc_fcm_fruid);
     > +const size_t montblanc_bmc_fruid_len = sizeof(montblanc_bmc_fruid);
     > diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
     > index bbf9e54365..b8fbdd0734 100644
     > --- a/hw/arm/aspeed_eeprom.h
     > +++ b/hw/arm/aspeed_eeprom.h
     > @@ -27,4 +27,11 @@ extern const size_t rainier_bb_fruid_len;
     >   extern const uint8_t rainier_bmc_fruid[];
     >   extern const size_t rainier_bmc_fruid_len;
     >
     > +extern const uint8_t montblanc_scm_fruid[];
     > +extern const uint8_t montblanc_fcm_fruid[];
     > +extern const uint8_t montblanc_bmc_fruid[];
     > +extern const size_t montblanc_scm_fruid_len;
     > +extern const size_t montblanc_fcm_fruid_len;
     > +extern const size_t montblanc_bmc_fruid_len;
     > +
     >   #endif
#4 lore raw

Hi Sittisak,

Minipack3 is not open-sourced yet, and we are unlikely to be able to upstream detailed data.

1. What is these FRUID datas for, is it for testing?
2. What other option do we have, since we are not able to upstream FRUID data. (It is still OK to upstream system configuration, but NOT the arrays of _fruid data array)

Thanks,
Mike

From: Cédric Le Goater <[email protected]>
Date: Tuesday, July 4, 2023 at 7:07 AM
To: Sittisak Sinprem <[email protected]>, Bin Huang <[email protected]>, Tao Ren <[email protected]>, Mike Choi <[email protected]>
Cc: [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Joel Stanley <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <ssumet@celefor stica.com>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>
Subject: Re: [PATCH qemu v5] aspeed add montblanc bmc reference from fuji
!-------------------------------------------------------------------|
This Message Is From an External Sender

|-------------------------------------------------------------------!

Quoted 4 lines · Sittisak Sinprem

Hi Meta Team,

the FRU EEPROM content, I think for now detail still be confidential, Please confirm, Can we add the description in Qemu upstream following Cedric's request?

We don't need all the details, and not the confidential part of course.

C.

Quoted 217 lines · On Tue, Jul 4, 2023 at 6:19 PM Cédric Le Goater <[email protected]…
    On 7/4/23 13:06, ~ssinprem wrote:
     > From: Sittisak Sinprem <[email protected] <mailto:[email protected]>>
     >
     > - I2C list follow I2C Tree v1.6 20230320
     > - fru eeprom data use FB FRU format version 4
     >
     > Signed-off-by: Sittisak Sinprem <[email protected] <mailto:[email protected]>>

    You shoot too fast :) Please add some description for the EEPROM contents.
    What they enable when the OS/FW boots is good to know for QEMU.

    Thanks,

    C.


     > ---
     >   docs/system/arm/aspeed.rst |  1 +
     >   hw/arm/aspeed.c            | 65 ++++++++++++++++++++++++++++++++++++++
     >   hw/arm/aspeed_eeprom.c     | 50 +++++++++++++++++++++++++++++
     >   hw/arm/aspeed_eeprom.h     |  7 ++++
     >   4 files changed, 123 insertions(+)
     >
     > diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst
     > index 80538422a1..5e0824f48b 100644
     > --- a/docs/system/arm/aspeed.rst
     > +++ b/docs/system/arm/aspeed.rst
     > @@ -33,6 +33,7 @@ AST2600 SoC based machines :
     >   - ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
     >   - ``rainier-bmc``          IBM Rainier POWER10 BMC
     >   - ``fuji-bmc``             Facebook Fuji BMC
     > +- ``montblanc-bmc``        Facebook Montblanc BMC
     >   - ``bletchley-bmc``        Facebook Bletchley BMC
     >   - ``fby35-bmc``            Facebook fby35 BMC
     >   - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
     > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
     > index 9fca644d92..bbb7a3392c 100644
     > --- a/hw/arm/aspeed.c
     > +++ b/hw/arm/aspeed.c
     > @@ -189,6 +189,10 @@ struct AspeedMachineState {
     >   #define FUJI_BMC_HW_STRAP1    0x00000000
     >   #define FUJI_BMC_HW_STRAP2    0x00000000
     >
     > +/* Montblanc hardware value */
     > +#define MONTBLANC_BMC_HW_STRAP1    0x00000000
     > +#define MONTBLANC_BMC_HW_STRAP2    0x00000000
     > +
     >   /* Bletchley hardware value */
     >   /* TODO: Leave same as EVB for now. */
     >   #define BLETCHLEY_BMC_HW_STRAP1 AST2600_EVB_HW_STRAP1
     > @@ -925,6 +929,41 @@ static void fuji_bmc_i2c_init(AspeedMachineState *bmc)
     >       }
     >   }
     >
     > +static void montblanc_bmc_i2c_init(AspeedMachineState *bmc)
     > +{
     > +    AspeedSoCState *soc = &bmc->soc;
     > +    I2CBus *i2c[16] = {};
     > +
     > +    for (int i = 0; i < 16; i++) {
     > +        i2c[i] = aspeed_i2c_get_bus(&soc->i2c, i);
     > +    }
     > +
     > +    /* Ref from Minipack3_I2C_Tree_V1.6 20230320 */
     > +    at24c_eeprom_init_rom(i2c[3], 0x56, 8192, montblanc_scm_fruid,
     > +                          montblanc_scm_fruid_len);
     > +    at24c_eeprom_init_rom(i2c[6], 0x53, 8192, montblanc_fcm_fruid,
     > +                          montblanc_fcm_fruid_len);
     > +
     > +    /* CPLD and FPGA */
     > +    at24c_eeprom_init(i2c[1], 0x35, 256);  /* SCM CPLD */
     > +    at24c_eeprom_init(i2c[5], 0x35, 256);  /* COMe CPLD TODO: need to update */
     > +    at24c_eeprom_init(i2c[12], 0x60, 256); /* MCB PWR CPLD */
     > +    at24c_eeprom_init(i2c[13], 0x35, 256); /* IOB FPGA */
     > +
     > +    /* on BMC board */
     > +    at24c_eeprom_init_rom(i2c[8], 0x51, 8192, montblanc_bmc_fruid,
     > +                          montblanc_bmc_fruid_len); /* BMC EEPROM */
     > +    i2c_slave_create_simple(i2c[8], TYPE_LM75, 0x48); /* Thermal Sensor */
     > +
     > +    /* COMe Sensor/EEPROM */
     > +    at24c_eeprom_init(i2c[0], 0x56, 16384);          /* FRU EEPROM */
     > +    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x48); /* INLET Sensor */
     > +    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x4A); /* OUTLET Sensor */
     > +
     > +    /* It expects a pca9555 but a pca9552 is compatible */
     > +    create_pca9552(soc, 4, 0x27);
     > +}
     > +
     >   #define TYPE_TMP421 "tmp421"
     >
     >   static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
     > @@ -1452,6 +1491,28 @@ static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
     >           aspeed_soc_num_cpus(amc->soc_name);
     >   };
     >
     > +#define MONTBLANC_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
     > +
     > +static void aspeed_machine_montblanc_class_init(ObjectClass *oc, void *data)
     > +{
     > +    MachineClass *mc = MACHINE_CLASS(oc);
     > +    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
     > +
     > +    mc->desc = "Facebook Montblanc BMC (Cortex-A7)";
     > +    amc->soc_name = "ast2600-a3";
     > +    amc->hw_strap1 = MONTBLANC_BMC_HW_STRAP1;
     > +    amc->hw_strap2 = MONTBLANC_BMC_HW_STRAP2;
     > +    amc->fmc_model = "mx66l1g45g";
     > +    amc->spi_model = "mx66l1g45g";
     > +    amc->num_cs = 2;
     > +    amc->macs_mask = ASPEED_MAC3_ON;
     > +    amc->i2c_init = montblanc_bmc_i2c_init;
     > +    amc->uart_default = ASPEED_DEV_UART1;
     > +    mc->default_ram_size = MONTBLANC_BMC_RAM_SIZE;
     > +    mc->default_cpus = mc->min_cpus = mc->max_cpus =
     > +        aspeed_soc_num_cpus(amc->soc_name);
     > +};
     > +
     >   #define BLETCHLEY_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
     >
     >   static void aspeed_machine_bletchley_class_init(ObjectClass *oc, void *data)
     > @@ -1703,6 +1764,10 @@ static const TypeInfo aspeed_machine_types[] = {
     >           .name          = MACHINE_TYPE_NAME("fuji-bmc"),
     >           .parent        = TYPE_ASPEED_MACHINE,
     >           .class_init    = aspeed_machine_fuji_class_init,
     > +    }, {
     > +        .name          = MACHINE_TYPE_NAME("montblanc-bmc"),
     > +        .parent        = TYPE_ASPEED_MACHINE,
     > +        .class_init    = aspeed_machine_montblanc_class_init,
     >       }, {
     >           .name          = MACHINE_TYPE_NAME("bletchley-bmc"),
     >           .parent        = TYPE_ASPEED_MACHINE,
     > diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
     > index ace5266cec..8cc73f83dc 100644
     > --- a/hw/arm/aspeed_eeprom.c
     > +++ b/hw/arm/aspeed_eeprom.c
     > @@ -161,6 +161,53 @@ const uint8_t rainier_bmc_fruid[] = {
     >       0x31, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
     >   };
     >
     > +/* Montblanc BMC FRU */
     > +const uint8_t montblanc_scm_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
     > +    0x43, 0x4b, 0x33, 0x5f, 0x53, 0x43, 0x4d, 0x02, 0x08, 0x32, 0x30, 0x30,
     > +    0x30, 0x32, 0x39, 0x34, 0x35, 0x04, 0x0c, 0x31, 0x33, 0x32, 0x30, 0x30,
     > +    0x30, 0x31, 0x36, 0x34, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31, 0x33, 0x31,
     > +    0x30, 0x30, 0x30, 0x31, 0x32, 0x37, 0x30, 0x31, 0x20, 0x06, 0x0c, 0x52,
     > +    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x30, 0x33, 0x30, 0x31, 0x07,
     > +    0x0d, 0x41, 0x30, 0x33, 0x31, 0x33, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
     > +    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01, 0x00, 0x0b,
     > +    0x0d, 0x4d, 0x32, 0x32, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37, 0x30, 0x30,
     > +    0x30, 0x32, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32,
     > +    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03,
     > +    0x43, 0x54, 0x48, 0x10, 0x06, 0x01, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x13,
     > +    0x03, 0x53, 0x43, 0x4d, 0xfa, 0x02, 0x02, 0x61,
     > +};
     > +
     > +const uint8_t montblanc_fcm_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
     > +    0x43, 0x4b, 0x33, 0x5f, 0x46, 0x43, 0x42, 0x02, 0x08, 0x33, 0x30, 0x30,
     > +    0x30, 0x30, 0x31, 0x36, 0x31, 0x04, 0x0c, 0x31, 0x33, 0x32, 0x30, 0x30,
     > +    0x30, 0x31, 0x36, 0x33, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31, 0x33, 0x31,
     > +    0x30, 0x30, 0x30, 0x31, 0x33, 0x30, 0x30, 0x31, 0x20, 0x06, 0x0c, 0x52,
     > +    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x31, 0x32, 0x30, 0x31, 0x07,
     > +    0x0d, 0x41, 0x31, 0x32, 0x31, 0x32, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
     > +    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01, 0x00, 0x0b,
     > +    0x0d, 0x46, 0x35, 0x30, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37, 0x30, 0x30,
     > +    0x30, 0x35, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32,
     > +    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03,
     > +    0x43, 0x54, 0x48, 0x10, 0x06, 0x02, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x11,
     > +    0x06, 0x03, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x12, 0x02, 0x8a, 0x00, 0x13,
     > +    0x03, 0x46, 0x43, 0x42, 0xfa, 0x02, 0x50, 0x47,
     > +};
     > +
     > +const uint8_t montblanc_bmc_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49, 0x50, 0x41,
     > +    0x43, 0x4b, 0x33, 0x5f, 0x42, 0x4d, 0x43, 0x04, 0x0c, 0x31, 0x33, 0x32,
     > +    0x30, 0x30, 0x30, 0x31, 0x33, 0x36, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31,
     > +    0x33, 0x31, 0x30, 0x30, 0x30, 0x30, 0x38, 0x36, 0x30, 0x35, 0x20, 0x06,
     > +    0x0c, 0x52, 0x33, 0x30, 0x39, 0x37, 0x47, 0x30, 0x30, 0x30, 0x32, 0x30,
     > +    0x37, 0x07, 0x0d, 0x42, 0x30, 0x32, 0x37, 0x34, 0x58, 0x58, 0x58, 0x58,
     > +    0x58, 0x58, 0x58, 0x58, 0x08, 0x01, 0x04, 0x09, 0x01, 0x00, 0x0a, 0x01,
     > +    0x00, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30, 0x32, 0x33,
     > +    0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f, 0x03, 0x43,
     > +    0x54, 0x48, 0x13, 0x03, 0x42, 0x4d, 0x43, 0xfa, 0x02, 0xef, 0xba,
     > +};
     > +
     >   const size_t tiogapass_bmc_fruid_len = sizeof(tiogapass_bmc_fruid);
     >   const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
     >   const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
     > @@ -168,3 +215,6 @@ const size_t fby35_bmc_fruid_len = sizeof(fby35_bmc_fruid);
     >   const size_t yosemitev2_bmc_fruid_len = sizeof(yosemitev2_bmc_fruid);
     >   const size_t rainier_bb_fruid_len = sizeof(rainier_bb_fruid);
     >   const size_t rainier_bmc_fruid_len = sizeof(rainier_bmc_fruid);
     > +const size_t montblanc_scm_fruid_len = sizeof(montblanc_scm_fruid);
     > +const size_t montblanc_fcm_fruid_len = sizeof(montblanc_fcm_fruid);
     > +const size_t montblanc_bmc_fruid_len = sizeof(montblanc_bmc_fruid);
     > diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
     > index bbf9e54365..b8fbdd0734 100644
     > --- a/hw/arm/aspeed_eeprom.h
     > +++ b/hw/arm/aspeed_eeprom.h
     > @@ -27,4 +27,11 @@ extern const size_t rainier_bb_fruid_len;
     >   extern const uint8_t rainier_bmc_fruid[];
     >   extern const size_t rainier_bmc_fruid_len;
     >
     > +extern const uint8_t montblanc_scm_fruid[];
     > +extern const uint8_t montblanc_fcm_fruid[];
     > +extern const uint8_t montblanc_bmc_fruid[];
     > +extern const size_t montblanc_scm_fruid_len;
     > +extern const size_t montblanc_fcm_fruid_len;
     > +extern const size_t montblanc_bmc_fruid_len;
     > +
     >   #endif
#5 lore raw

Hi Mike,

the FRUID data, it is used to define the BMC Mac address, to able the CIT, test_eeprom, test_bmc_mac on Qemu.

Quoted 333 lines · Mike Choi

Hi Sittisak,

Minipack3 is not open-sourced yet, and we are unlikely to be able to upstream detailed data.

1. What is these FRUID datas for, is it for testing?
2. What other option do we have, since we are not able to upstream FRUID data. (It is still OK to upstream system configuration, but NOT the arrays of _fruid data array)

Thanks,

Mike

*From: *Cédric Le Goater <[email protected]>
*Date: *Tuesday, July 4, 2023 at 7:07 AM
*To: *Sittisak Sinprem <[email protected]>, Bin Huang < [email protected]>, Tao Ren <[email protected]>, Mike Choi < [email protected]>
*Cc: *[email protected] <[email protected]>, [email protected] < [email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Joel Stanley <[email protected]>, [email protected] <[email protected]>, [email protected] < [email protected]>, [email protected] <ssumet@celefor stica.com>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>
*Subject: *Re: [PATCH qemu v5] aspeed add montblanc bmc reference from fuji

Quoted 4 lines · Sittisak Sinprem

Hi Meta Team,

the FRU EEPROM content, I think for now detail still be confidential, Please confirm, Can we add the description in Qemu upstream following

Cedric's request?

We don't need all the details, and not the confidential part of course.

C.

Quoted 2 lines

On Tue, Jul 4, 2023 at 6:19 PM Cédric Le Goater <[email protected] <

Quoted 3 lines · mailto:[email protected] <[email protected]>>> wrote:

On 7/4/23 13:06, ~ssinprem wrote:
> From: Sittisak Sinprem <[email protected] <

mailto:[email protected] <[email protected]>>>

Quoted 5 lines
     >
     > - I2C list follow I2C Tree v1.6 20230320
     > - fru eeprom data use FB FRU format version 4
     >
     > Signed-off-by: Sittisak Sinprem <[email protected] <

mailto:[email protected] <[email protected]>>>

Quoted 2 lines

You shoot too fast :) Please add some description for the EEPROM

contents.

Quoted 10 lines

What they enable when the OS/FW boots is good to know for QEMU.

Thanks,

C.

> ---
> docs/system/arm/aspeed.rst | 1 +
> hw/arm/aspeed.c | 65

++++++++++++++++++++++++++++++++++++++

Quoted 5 lines
     >   hw/arm/aspeed_eeprom.c     | 50 +++++++++++++++++++++++++++++
     >   hw/arm/aspeed_eeprom.h     |  7 ++++
     >   4 files changed, 123 insertions(+)
     >
     > diff --git a/docs/system/arm/aspeed.rst

b/docs/system/arm/aspeed.rst

Quoted 5 lines
     > index 80538422a1..5e0824f48b 100644
     > --- a/docs/system/arm/aspeed.rst
     > +++ b/docs/system/arm/aspeed.rst
     > @@ -33,6 +33,7 @@ AST2600 SoC based machines :
     >   - ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600

BMC

Quoted 14 lines
     >   - ``rainier-bmc``          IBM Rainier POWER10 BMC
     >   - ``fuji-bmc``             Facebook Fuji BMC
     > +- ``montblanc-bmc``        Facebook Montblanc BMC
     >   - ``bletchley-bmc``        Facebook Bletchley BMC
     >   - ``fby35-bmc``            Facebook fby35 BMC
     >   - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
     > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
     > index 9fca644d92..bbb7a3392c 100644
     > --- a/hw/arm/aspeed.c
     > +++ b/hw/arm/aspeed.c
     > @@ -189,6 +189,10 @@ struct AspeedMachineState {
     >   #define FUJI_BMC_HW_STRAP1    0x00000000
     >   #define FUJI_BMC_HW_STRAP2    0x00000000
     >
Quoted 8 lines
     > +/* Montblanc hardware value */
     > +#define MONTBLANC_BMC_HW_STRAP1    0x00000000
     > +#define MONTBLANC_BMC_HW_STRAP2    0x00000000
     > +
     >   /* Bletchley hardware value */
     >   /* TODO: Leave same as EVB for now. */
     >   #define BLETCHLEY_BMC_HW_STRAP1 AST2600_EVB_HW_STRAP1
     > @@ -925,6 +929,41 @@ static void

fuji_bmc_i2c_init(AspeedMachineState *bmc)

Quoted 6 lines
     >       }
     >   }
     >
     > +static void montblanc_bmc_i2c_init(AspeedMachineState *bmc)
     > +{
     > +    AspeedSoCState *soc = &bmc->soc;
Quoted 8 lines
     > +    I2CBus *i2c[16] = {};
     > +
     > +    for (int i = 0; i < 16; i++) {
     > +        i2c[i] = aspeed_i2c_get_bus(&soc->i2c, i);
     > +    }
     > +
     > +    /* Ref from Minipack3_I2C_Tree_V1.6 20230320 */
     > +    at24c_eeprom_init_rom(i2c[3], 0x56, 8192,

montblanc_scm_fruid,

Quoted 2 lines
     > +                          montblanc_scm_fruid_len);
     > +    at24c_eeprom_init_rom(i2c[6], 0x53, 8192,

montblanc_fcm_fruid,

Quoted 5 lines
     > +                          montblanc_fcm_fruid_len);
     > +
     > +    /* CPLD and FPGA */
     > +    at24c_eeprom_init(i2c[1], 0x35, 256);  /* SCM CPLD */
     > +    at24c_eeprom_init(i2c[5], 0x35, 256);  /* COMe CPLD TODO:

need to update */

Quoted 5 lines
     > +    at24c_eeprom_init(i2c[12], 0x60, 256); /* MCB PWR CPLD */
     > +    at24c_eeprom_init(i2c[13], 0x35, 256); /* IOB FPGA */
     > +
     > +    /* on BMC board */
     > +    at24c_eeprom_init_rom(i2c[8], 0x51, 8192,

montblanc_bmc_fruid,

Quoted 1 line

> + montblanc_bmc_fruid_len); /* BMC

EEPROM */

Quoted 1 line
     > +    i2c_slave_create_simple(i2c[8], TYPE_LM75, 0x48); /* Thermal

Sensor */

Quoted 3 lines
     > +
     > +    /* COMe Sensor/EEPROM */
     > +    at24c_eeprom_init(i2c[0], 0x56, 16384);          /* FRU

EEPROM */

Quoted 1 line
     > +    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x48); /* INLET

Sensor */

Quoted 1 line
     > +    i2c_slave_create_simple(i2c[0], TYPE_LM75, 0x4A); /* OUTLET

Sensor */

Quoted 9 lines
     > +
     > +    /* It expects a pca9555 but a pca9552 is compatible */
     > +    create_pca9552(soc, 4, 0x27);
     > +}
     > +
     >   #define TYPE_TMP421 "tmp421"
     >
     >   static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
     > @@ -1452,6 +1491,28 @@ static void

aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)

Quoted 6 lines
     >           aspeed_soc_num_cpus(amc->soc_name);
     >   };
     >
     > +#define MONTBLANC_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
     > +
     > +static void aspeed_machine_montblanc_class_init(ObjectClass *oc,

void *data)

Quoted 14 lines
     > +{
     > +    MachineClass *mc = MACHINE_CLASS(oc);
     > +    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
     > +
     > +    mc->desc = "Facebook Montblanc BMC (Cortex-A7)";
     > +    amc->soc_name = "ast2600-a3";
     > +    amc->hw_strap1 = MONTBLANC_BMC_HW_STRAP1;
     > +    amc->hw_strap2 = MONTBLANC_BMC_HW_STRAP2;
     > +    amc->fmc_model = "mx66l1g45g";
     > +    amc->spi_model = "mx66l1g45g";
     > +    amc->num_cs = 2;
     > +    amc->macs_mask = ASPEED_MAC3_ON;
     > +    amc->i2c_init = montblanc_bmc_i2c_init;
     > +    amc->uart_default = ASPEED_DEV_UART1;
Quoted 8 lines
     > +    mc->default_ram_size = MONTBLANC_BMC_RAM_SIZE;
     > +    mc->default_cpus = mc->min_cpus = mc->max_cpus =
     > +        aspeed_soc_num_cpus(amc->soc_name);
     > +};
     > +
     >   #define BLETCHLEY_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)
     >
     >   static void aspeed_machine_bletchley_class_init(ObjectClass

*oc, void *data)

Quoted 1 line
     > @@ -1703,6 +1764,10 @@ static const TypeInfo

aspeed_machine_types[] = {

Quoted 13 lines
     >           .name          = MACHINE_TYPE_NAME("fuji-bmc"),
     >           .parent        = TYPE_ASPEED_MACHINE,
     >           .class_init    = aspeed_machine_fuji_class_init,
     > +    }, {
     > +        .name          = MACHINE_TYPE_NAME("montblanc-bmc"),
     > +        .parent        = TYPE_ASPEED_MACHINE,
     > +        .class_init    = aspeed_machine_montblanc_class_init,
     >       }, {
     >           .name          = MACHINE_TYPE_NAME("bletchley-bmc"),
     >           .parent        = TYPE_ASPEED_MACHINE,
     > diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
     > index ace5266cec..8cc73f83dc 100644
     > --- a/hw/arm/aspeed_eeprom.c
Quoted 8 lines
     > +++ b/hw/arm/aspeed_eeprom.c
     > @@ -161,6 +161,53 @@ const uint8_t rainier_bmc_fruid[] = {
     >       0x31, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
     >   };
     >
     > +/* Montblanc BMC FRU */
     > +const uint8_t montblanc_scm_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49,

0x50, 0x41,

Quoted 1 line
     > +    0x43, 0x4b, 0x33, 0x5f, 0x53, 0x43, 0x4d, 0x02, 0x08, 0x32,

0x30, 0x30,

Quoted 1 line
     > +    0x30, 0x32, 0x39, 0x34, 0x35, 0x04, 0x0c, 0x31, 0x33, 0x32,

0x30, 0x30,

Quoted 1 line
     > +    0x30, 0x31, 0x36, 0x34, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31,

0x33, 0x31,

Quoted 1 line
     > +    0x30, 0x30, 0x30, 0x31, 0x32, 0x37, 0x30, 0x31, 0x20, 0x06,

0x0c, 0x52,

Quoted 1 line
     > +    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x30, 0x33, 0x30,

0x31, 0x07,

Quoted 1 line
     > +    0x0d, 0x41, 0x30, 0x33, 0x31, 0x33, 0x58, 0x58, 0x58, 0x58,

0x58, 0x58,

Quoted 1 line
     > +    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01,

0x00, 0x0b,

Quoted 1 line
     > +    0x0d, 0x4d, 0x32, 0x32, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37,

0x30, 0x30,

Quoted 1 line
     > +    0x30, 0x32, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32,

0x30, 0x32,

Quoted 1 line
     > +    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53,

0x0f, 0x03,

Quoted 1 line
     > +    0x43, 0x54, 0x48, 0x10, 0x06, 0x01, 0x00, 0x00, 0x91, 0xdb,

0xb4, 0x13,

Quoted 5 lines
     > +    0x03, 0x53, 0x43, 0x4d, 0xfa, 0x02, 0x02, 0x61,
     > +};
     > +
     > +const uint8_t montblanc_fcm_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49,

0x50, 0x41,

Quoted 1 line
     > +    0x43, 0x4b, 0x33, 0x5f, 0x46, 0x43, 0x42, 0x02, 0x08, 0x33,

0x30, 0x30,

Quoted 1 line
     > +    0x30, 0x30, 0x31, 0x36, 0x31, 0x04, 0x0c, 0x31, 0x33, 0x32,

0x30, 0x30,

Quoted 1 line
     > +    0x30, 0x31, 0x36, 0x33, 0x30, 0x31, 0x20, 0x05, 0x0c, 0x31,

0x33, 0x31,

Quoted 1 line
     > +    0x30, 0x30, 0x30, 0x31, 0x33, 0x30, 0x30, 0x31, 0x20, 0x06,

0x0c, 0x52,

Quoted 1 line
     > +    0x33, 0x32, 0x31, 0x34, 0x47, 0x30, 0x30, 0x31, 0x32, 0x30,

0x31, 0x07,

Quoted 1 line
     > +    0x0d, 0x41, 0x31, 0x32, 0x31, 0x32, 0x58, 0x58, 0x58, 0x58,

0x58, 0x58,

Quoted 1 line
     > +    0x58, 0x58, 0x08, 0x01, 0x01, 0x09, 0x01, 0x00, 0x0a, 0x01,

0x00, 0x0b,

Quoted 1 line
     > +    0x0d, 0x46, 0x35, 0x30, 0x31, 0x33, 0x32, 0x33, 0x31, 0x37,

0x30, 0x30,

Quoted 1 line
     > +    0x30, 0x35, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32,

0x30, 0x32,

Quoted 1 line
     > +    0x33, 0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53,

0x0f, 0x03,

Quoted 1 line
     > +    0x43, 0x54, 0x48, 0x10, 0x06, 0x02, 0x00, 0x00, 0x91, 0xdb,

0xb4, 0x11,

Quoted 1 line
     > +    0x06, 0x03, 0x00, 0x00, 0x91, 0xdb, 0xb4, 0x12, 0x02, 0x8a,

0x00, 0x13,

Quoted 5 lines
     > +    0x03, 0x46, 0x43, 0x42, 0xfa, 0x02, 0x50, 0x47,
     > +};
     > +
     > +const uint8_t montblanc_bmc_fruid[] = {
     > +    0xfb, 0xfb, 0x04, 0xff, 0x01, 0x0d, 0x4d, 0x49, 0x4e, 0x49,

0x50, 0x41,

Quoted 1 line
     > +    0x43, 0x4b, 0x33, 0x5f, 0x42, 0x4d, 0x43, 0x04, 0x0c, 0x31,

0x33, 0x32,

Quoted 1 line
     > +    0x30, 0x30, 0x30, 0x31, 0x33, 0x36, 0x30, 0x31, 0x20, 0x05,

0x0c, 0x31,

Quoted 1 line
     > +    0x33, 0x31, 0x30, 0x30, 0x30, 0x30, 0x38, 0x36, 0x30, 0x35,

0x20, 0x06,

Quoted 1 line
     > +    0x0c, 0x52, 0x33, 0x30, 0x39, 0x37, 0x47, 0x30, 0x30, 0x30,

0x32, 0x30,

Quoted 1 line
     > +    0x37, 0x07, 0x0d, 0x42, 0x30, 0x32, 0x37, 0x34, 0x58, 0x58,

0x58, 0x58,

Quoted 1 line
     > +    0x58, 0x58, 0x58, 0x58, 0x08, 0x01, 0x04, 0x09, 0x01, 0x00,

0x0a, 0x01,

Quoted 1 line
     > +    0x00, 0x0c, 0x03, 0x43, 0x4c, 0x53, 0x0d, 0x08, 0x32, 0x30,

0x32, 0x33,

Quoted 1 line
     > +    0x30, 0x35, 0x30, 0x31, 0x0e, 0x03, 0x57, 0x55, 0x53, 0x0f,

0x03, 0x43,

Quoted 1 line
     > +    0x54, 0x48, 0x13, 0x03, 0x42, 0x4d, 0x43, 0xfa, 0x02, 0xef,

0xba,

Quoted 3 lines
     > +};
     > +
     >   const size_t tiogapass_bmc_fruid_len =

sizeof(tiogapass_bmc_fruid);

Quoted 3 lines
     >   const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
     >   const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
     > @@ -168,3 +215,6 @@ const size_t fby35_bmc_fruid_len =

sizeof(fby35_bmc_fruid);

Quoted 1 line

> const size_t yosemitev2_bmc_fruid_len =

sizeof(yosemitev2_bmc_fruid);

Quoted 3 lines
     >   const size_t rainier_bb_fruid_len = sizeof(rainier_bb_fruid);
     >   const size_t rainier_bmc_fruid_len = sizeof(rainier_bmc_fruid);
     > +const size_t montblanc_scm_fruid_len =

sizeof(montblanc_scm_fruid);

Quoted 1 line

> +const size_t montblanc_fcm_fruid_len =

sizeof(montblanc_fcm_fruid);

Quoted 1 line

> +const size_t montblanc_bmc_fruid_len =

sizeof(montblanc_bmc_fruid);

Quoted 17 lines
     > diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
     > index bbf9e54365..b8fbdd0734 100644
     > --- a/hw/arm/aspeed_eeprom.h
     > +++ b/hw/arm/aspeed_eeprom.h
     > @@ -27,4 +27,11 @@ extern const size_t rainier_bb_fruid_len;
     >   extern const uint8_t rainier_bmc_fruid[];
     >   extern const size_t rainier_bmc_fruid_len;
     >
     > +extern const uint8_t montblanc_scm_fruid[];
     > +extern const uint8_t montblanc_fcm_fruid[];
     > +extern const uint8_t montblanc_bmc_fruid[];
     > +extern const size_t montblanc_scm_fruid_len;
     > +extern const size_t montblanc_fcm_fruid_len;
     > +extern const size_t montblanc_bmc_fruid_len;
     > +
     >   #endif
#6 lore raw
Quoted 4 lines · Sittisak Sinprem

Hi Mike,

the FRUID data, it is used to define the BMC Mac address, to able the CIT, test_eeprom, test_bmc_mac on Qemu.

That's enough for the commit log and the comment. Adding the EEPROM contents in QEMU enables more tests to be performed on the FW side and consequently, it exercises more our models.

Thanks,

C.