* [PATCH v3] Adding new machine Yosemitev2 in QEMU
@ 2023-02-16 13:33 Karthikeyan Pasupathi
2023-02-16 13:50 ` Cédric Le Goater
2023-02-16 14:27 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 4+ messages in thread
From: Karthikeyan Pasupathi @ 2023-02-16 13:33 UTC (permalink / raw)
To: clg, peter.maydell, andrew, joel, qemu-arm, qemu-devel
Cc: Karthikeyan Pasupathi
This patch support Yosemitev2 in QEMU environment.
and introduced EEPROM BMC FRU data support "add fbyv2_bmc_fruid data"
along with the machine support.
Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
---
hw/arm/aspeed.c | 31 +++++++++++++++++++++++++++++++
hw/arm/aspeed_eeprom.c | 23 +++++++++++++++++++++++
hw/arm/aspeed_eeprom.h | 3 +++
3 files changed, 57 insertions(+)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 27dda58338..3f992fea46 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -521,6 +521,15 @@ static void ast2600_evb_i2c_init(AspeedMachineState *bmc)
TYPE_TMP105, 0x4d);
}
+static void yosemitev2_bmc_i2c_init(AspeedMachineState *bmc)
+{
+ AspeedSoCState *soc = &bmc->soc;
+
+ at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 4), 0x51, 128 * KiB);
+ at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 8), 0x51, 128 * KiB,
+ yosemitev2_bmc_fruid, yosemitev2_bmc_fruid_len);
+}
+
static void romulus_bmc_i2c_init(AspeedMachineState *bmc)
{
AspeedSoCState *soc = &bmc->soc;
@@ -1174,6 +1183,24 @@ static void aspeed_machine_ast2500_evb_class_init(ObjectClass *oc, void *data)
aspeed_soc_num_cpus(amc->soc_name);
};
+static void aspeed_machine_yosemitev2_class_init(ObjectClass *oc, void *data)
+{
+ MachineClass *mc = MACHINE_CLASS(oc);
+ AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+ mc->desc = "Facebook YosemiteV2 BMC (ARM1176)";
+ amc->soc_name = "ast2500-a1";
+ amc->hw_strap1 = AST2500_EVB_HW_STRAP1;
+ amc->hw_strap2 = 0;
+ amc->fmc_model = "n25q256a";
+ amc->spi_model = "mx25l25635e";
+ amc->num_cs = 2;
+ amc->i2c_init = yosemitev2_bmc_i2c_init;
+ mc->default_ram_size = 512 * MiB;
+ mc->default_cpus = mc->min_cpus = mc->max_cpus =
+ aspeed_soc_num_cpus(amc->soc_name);
+};
+
static void aspeed_machine_romulus_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
@@ -1562,6 +1589,10 @@ static const TypeInfo aspeed_machine_types[] = {
.name = MACHINE_TYPE_NAME("ast2600-evb"),
.parent = TYPE_ASPEED_MACHINE,
.class_init = aspeed_machine_ast2600_evb_class_init,
+ }, {
+ .name = MACHINE_TYPE_NAME("yosemitev2-bmc"),
+ .parent = TYPE_ASPEED_MACHINE,
+ .class_init = aspeed_machine_yosemitev2_class_init,
}, {
.name = MACHINE_TYPE_NAME("tacoma-bmc"),
.parent = TYPE_ASPEED_MACHINE,
diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
index 04463acc9d..7006794654 100644
--- a/hw/arm/aspeed_eeprom.c
+++ b/hw/arm/aspeed_eeprom.c
@@ -77,6 +77,29 @@ const uint8_t fby35_bmc_fruid[] = {
0x6e, 0x66, 0x69, 0x67, 0x20, 0x41, 0xc1, 0x45,
};
+/* Yosemite V2 BMC FRU */
+const uint8_t yosemitev2_bmc_fruid[] = {
+ 0x01, 0x00, 0x00, 0x01, 0x0d, 0x00, 0x00, 0xf1, 0x01, 0x0c, 0x00, 0x36,
+ 0xe6, 0xd0, 0xc6, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xd2, 0x42, 0x4d,
+ 0x43, 0x20, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0xcd, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+ 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xce, 0x58, 0x58, 0x58, 0x58, 0x58,
+ 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc3, 0x31, 0x2e,
+ 0x30, 0xc9, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xd2,
+ 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+ 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc1, 0x39, 0x01, 0x0c, 0x00, 0xc6,
+ 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xd2, 0x59, 0x6f, 0x73, 0x65, 0x6d,
+ 0x69, 0x74, 0x65, 0x20, 0x56, 0x32, 0x2e, 0x30, 0x20, 0x45, 0x56, 0x54,
+ 0x32, 0xce, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+ 0x58, 0x58, 0x58, 0x58, 0xc4, 0x45, 0x56, 0x54, 0x32, 0xcd, 0x58, 0x58,
+ 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc7,
+ 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc3, 0x31, 0x2e, 0x30, 0xc9,
+ 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc8, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x20, 0x41, 0xc1, 0x45,
+};
+
const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
const size_t fby35_bmc_fruid_len = sizeof(fby35_bmc_fruid);
+
+const size_t yosemitev2_bmc_fruid_len = sizeof(yosemitev2_bmc_fruid);
diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
index a0f848fa6e..edf18e9685 100644
--- a/hw/arm/aspeed_eeprom.h
+++ b/hw/arm/aspeed_eeprom.h
@@ -16,4 +16,7 @@ extern const size_t fby35_nic_fruid_len;
extern const size_t fby35_bb_fruid_len;
extern const size_t fby35_bmc_fruid_len;
+extern const uint8_t yosemitev2_bmc_fruid[];
+extern const size_t yosemitev2_bmc_fruid_len;
+
#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] Adding new machine Yosemitev2 in QEMU
2023-02-16 13:33 [PATCH v3] Adding new machine Yosemitev2 in QEMU Karthikeyan Pasupathi
@ 2023-02-16 13:50 ` Cédric Le Goater
2023-02-16 14:27 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2023-02-16 13:50 UTC (permalink / raw)
To: Karthikeyan Pasupathi, peter.maydell, andrew, joel, qemu-arm,
qemu-devel
On 2/16/23 14:33, Karthikeyan Pasupathi wrote:
> This patch support Yosemitev2 in QEMU environment.
> and introduced EEPROM BMC FRU data support "add fbyv2_bmc_fruid data"
> along with the machine support.
>
>
> Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Thanks,
C.
> ---
> hw/arm/aspeed.c | 31 +++++++++++++++++++++++++++++++
> hw/arm/aspeed_eeprom.c | 23 +++++++++++++++++++++++
> hw/arm/aspeed_eeprom.h | 3 +++
> 3 files changed, 57 insertions(+)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 27dda58338..3f992fea46 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -521,6 +521,15 @@ static void ast2600_evb_i2c_init(AspeedMachineState *bmc)
> TYPE_TMP105, 0x4d);
> }
>
> +static void yosemitev2_bmc_i2c_init(AspeedMachineState *bmc)
> +{
> + AspeedSoCState *soc = &bmc->soc;
> +
> + at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 4), 0x51, 128 * KiB);
> + at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 8), 0x51, 128 * KiB,
> + yosemitev2_bmc_fruid, yosemitev2_bmc_fruid_len);
> +}
> +
> static void romulus_bmc_i2c_init(AspeedMachineState *bmc)
> {
> AspeedSoCState *soc = &bmc->soc;
> @@ -1174,6 +1183,24 @@ static void aspeed_machine_ast2500_evb_class_init(ObjectClass *oc, void *data)
> aspeed_soc_num_cpus(amc->soc_name);
> };
>
> +static void aspeed_machine_yosemitev2_class_init(ObjectClass *oc, void *data)
> +{
> + MachineClass *mc = MACHINE_CLASS(oc);
> + AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
> +
> + mc->desc = "Facebook YosemiteV2 BMC (ARM1176)";
> + amc->soc_name = "ast2500-a1";
> + amc->hw_strap1 = AST2500_EVB_HW_STRAP1;
> + amc->hw_strap2 = 0;
> + amc->fmc_model = "n25q256a";
> + amc->spi_model = "mx25l25635e";
> + amc->num_cs = 2;
> + amc->i2c_init = yosemitev2_bmc_i2c_init;
> + mc->default_ram_size = 512 * MiB;
> + mc->default_cpus = mc->min_cpus = mc->max_cpus =
> + aspeed_soc_num_cpus(amc->soc_name);
> +};
> +
> static void aspeed_machine_romulus_class_init(ObjectClass *oc, void *data)
> {
> MachineClass *mc = MACHINE_CLASS(oc);
> @@ -1562,6 +1589,10 @@ static const TypeInfo aspeed_machine_types[] = {
> .name = MACHINE_TYPE_NAME("ast2600-evb"),
> .parent = TYPE_ASPEED_MACHINE,
> .class_init = aspeed_machine_ast2600_evb_class_init,
> + }, {
> + .name = MACHINE_TYPE_NAME("yosemitev2-bmc"),
> + .parent = TYPE_ASPEED_MACHINE,
> + .class_init = aspeed_machine_yosemitev2_class_init,
> }, {
> .name = MACHINE_TYPE_NAME("tacoma-bmc"),
> .parent = TYPE_ASPEED_MACHINE,
> diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
> index 04463acc9d..7006794654 100644
> --- a/hw/arm/aspeed_eeprom.c
> +++ b/hw/arm/aspeed_eeprom.c
> @@ -77,6 +77,29 @@ const uint8_t fby35_bmc_fruid[] = {
> 0x6e, 0x66, 0x69, 0x67, 0x20, 0x41, 0xc1, 0x45,
> };
>
> +/* Yosemite V2 BMC FRU */
> +const uint8_t yosemitev2_bmc_fruid[] = {
> + 0x01, 0x00, 0x00, 0x01, 0x0d, 0x00, 0x00, 0xf1, 0x01, 0x0c, 0x00, 0x36,
> + 0xe6, 0xd0, 0xc6, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xd2, 0x42, 0x4d,
> + 0x43, 0x20, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x6f,
> + 0x64, 0x75, 0x6c, 0x65, 0xcd, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
> + 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xce, 0x58, 0x58, 0x58, 0x58, 0x58,
> + 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc3, 0x31, 0x2e,
> + 0x30, 0xc9, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xd2,
> + 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
> + 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc1, 0x39, 0x01, 0x0c, 0x00, 0xc6,
> + 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xd2, 0x59, 0x6f, 0x73, 0x65, 0x6d,
> + 0x69, 0x74, 0x65, 0x20, 0x56, 0x32, 0x2e, 0x30, 0x20, 0x45, 0x56, 0x54,
> + 0x32, 0xce, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
> + 0x58, 0x58, 0x58, 0x58, 0xc4, 0x45, 0x56, 0x54, 0x32, 0xcd, 0x58, 0x58,
> + 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc7,
> + 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc3, 0x31, 0x2e, 0x30, 0xc9,
> + 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xc8, 0x43, 0x6f,
> + 0x6e, 0x66, 0x69, 0x67, 0x20, 0x41, 0xc1, 0x45,
> +};
> +
> const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
> const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
> const size_t fby35_bmc_fruid_len = sizeof(fby35_bmc_fruid);
> +
> +const size_t yosemitev2_bmc_fruid_len = sizeof(yosemitev2_bmc_fruid);
> diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
> index a0f848fa6e..edf18e9685 100644
> --- a/hw/arm/aspeed_eeprom.h
> +++ b/hw/arm/aspeed_eeprom.h
> @@ -16,4 +16,7 @@ extern const size_t fby35_nic_fruid_len;
> extern const size_t fby35_bb_fruid_len;
> extern const size_t fby35_bmc_fruid_len;
>
> +extern const uint8_t yosemitev2_bmc_fruid[];
> +extern const size_t yosemitev2_bmc_fruid_len;
> +
> #endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] Adding new machine Yosemitev2 in QEMU
2023-02-16 13:33 [PATCH v3] Adding new machine Yosemitev2 in QEMU Karthikeyan Pasupathi
2023-02-16 13:50 ` Cédric Le Goater
@ 2023-02-16 14:27 ` Philippe Mathieu-Daudé
2023-02-16 15:04 ` karthikeyan Pasupathi
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-16 14:27 UTC (permalink / raw)
To: Karthikeyan Pasupathi, clg, peter.maydell, andrew, joel, qemu-arm,
qemu-devel
On 16/2/23 14:33, Karthikeyan Pasupathi wrote:
> This patch support Yosemitev2 in QEMU environment.
> and introduced EEPROM BMC FRU data support "add fbyv2_bmc_fruid data"
> along with the machine support.
>
>
> Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
> ---
> hw/arm/aspeed.c | 31 +++++++++++++++++++++++++++++++
> hw/arm/aspeed_eeprom.c | 23 +++++++++++++++++++++++
> hw/arm/aspeed_eeprom.h | 3 +++
> 3 files changed, 57 insertions(+)
> +static void aspeed_machine_yosemitev2_class_init(ObjectClass *oc, void *data)
> +{
> + MachineClass *mc = MACHINE_CLASS(oc);
> + AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
> +
> + mc->desc = "Facebook YosemiteV2 BMC (ARM1176)";
> + amc->soc_name = "ast2500-a1";
> + amc->hw_strap1 = AST2500_EVB_HW_STRAP1;
> + amc->hw_strap2 = 0;
> + amc->fmc_model = "n25q256a";
> + amc->spi_model = "mx25l25635e";
> + amc->num_cs = 2;
> + amc->i2c_init = yosemitev2_bmc_i2c_init;
> + mc->default_ram_size = 512 * MiB;
Odd indentation
> + mc->default_cpus = mc->min_cpus = mc->max_cpus =
> + aspeed_soc_num_cpus(amc->soc_name);
Here too. What about:
mc->default_cpus = mc->min_cpus = mc->max_cpus
= aspeed_soc_num_cpus(amc->soc_name);
I suppose Cédric can fix when applying, no need for v4.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] Adding new machine Yosemitev2 in QEMU
2023-02-16 14:27 ` Philippe Mathieu-Daudé
@ 2023-02-16 15:04 ` karthikeyan Pasupathi
0 siblings, 0 replies; 4+ messages in thread
From: karthikeyan Pasupathi @ 2023-02-16 15:04 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: clg, peter.maydell, andrew, joel, qemu-arm, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1587 bytes --]
Ok, thanks.
On Thu, Feb 16, 2023 at 7:57 PM Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:
> On 16/2/23 14:33, Karthikeyan Pasupathi wrote:
> > This patch support Yosemitev2 in QEMU environment.
> > and introduced EEPROM BMC FRU data support "add fbyv2_bmc_fruid data"
> > along with the machine support.
> >
> >
> > Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
> > ---
> > hw/arm/aspeed.c | 31 +++++++++++++++++++++++++++++++
> > hw/arm/aspeed_eeprom.c | 23 +++++++++++++++++++++++
> > hw/arm/aspeed_eeprom.h | 3 +++
> > 3 files changed, 57 insertions(+)
>
> > +static void aspeed_machine_yosemitev2_class_init(ObjectClass *oc, void
> *data)
> > +{
> > + MachineClass *mc = MACHINE_CLASS(oc);
> > + AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
> > +
> > + mc->desc = "Facebook YosemiteV2 BMC (ARM1176)";
> > + amc->soc_name = "ast2500-a1";
> > + amc->hw_strap1 = AST2500_EVB_HW_STRAP1;
> > + amc->hw_strap2 = 0;
> > + amc->fmc_model = "n25q256a";
> > + amc->spi_model = "mx25l25635e";
> > + amc->num_cs = 2;
> > + amc->i2c_init = yosemitev2_bmc_i2c_init;
> > + mc->default_ram_size = 512 * MiB;
>
> Odd indentation
>
> > + mc->default_cpus = mc->min_cpus = mc->max_cpus =
> > + aspeed_soc_num_cpus(amc->soc_name);
>
> Here too. What about:
>
> mc->default_cpus = mc->min_cpus = mc->max_cpus
> = aspeed_soc_num_cpus(amc->soc_name);
>
> I suppose Cédric can fix when applying, no need for v4.
>
>
[-- Attachment #2: Type: text/html, Size: 2269 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-16 15:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-16 13:33 [PATCH v3] Adding new machine Yosemitev2 in QEMU Karthikeyan Pasupathi
2023-02-16 13:50 ` Cédric Le Goater
2023-02-16 14:27 ` Philippe Mathieu-Daudé
2023-02-16 15:04 ` karthikeyan Pasupathi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).