Received: by 2002:a17:906:da85:b0:8b1:202f:4753 with SMTP id xh5csp1262118ejb; Thu, 16 Feb 2023 23:50:26 -0800 (PST) X-Google-Smtp-Source: AK7set8Aj3IEITe9h2C+20fe0VxZzMx2MFsR6jco5cY/3Pe1fhRNKkxp/lbqNzQoSUK6MA7Tq4Jg X-Received: by 2002:ac8:7f44:0:b0:3bd:14c:c39b with SMTP id g4-20020ac87f44000000b003bd014cc39bmr1408702qtk.25.1676620226265; Thu, 16 Feb 2023 23:50:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676620226; cv=none; d=google.com; s=arc-20160816; b=BT/QKiq5T2ZnuQa6Z2kT0keezXr0+A2OV3L8uiVFeaGNgiLoS++e82xnw/a8nKeUAR 99e+eROWPLelsoMl81ulVoR2ufTsYdS9gT4Rfd+LqDbeIciQRRRRucNhycidILua+a0L RIAxp5qYW5anosGjcbp/PewhNwAwfZd/7dGcQ2HMhFODlJ+IS70v0EBrRCFjZwFYkaVl uNV1eHdLc4Vx/gYBiBcEM+zE5AFGGj0MSegscPDaZbGRGvrbExicxeyzYcL5lK7+bvm1 d9kPc+Xoo800kfgEGUuGMImaWBshBZigVQlbfZNpkMk+X/Qmfmz5WYWXnSSXFCVSsoH2 DHog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id; bh=12hCdUEaSQzgktJHlKrWfwpJ0O1thFnquDfB7BD0H6o=; b=ygFWnxg2Vb8UQSypHyj5yYecw82D/FCGyj2EsYgwshM2lsx36PthFMVHp+8/G9SccO rlt4XCE0MjFjcxBdab6fgmgpgOUvw3CAt5t7Xevwg3uGqt6GDf/ecN+zgxDNl5AEMJEc n+oyRiYYCsUrmn7lRnIg6NzBAum1F+21eAL5xAoLUXr6JrRbRA4qz2vM0TQFoi9Zj3/x jTwmfmSq4ei0MWecN7Ele49yH4rSHDJJjAe1A/XRp5job6WN/zQHpWfjSk5etBZVTGyH 9uAiUwgx+2pHsOJLda4XeazGuU+S8V0yMBTYfJ8N4wxvoJwexcHAY5ERLXdJfMHXxk50 lB3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bp36-20020a05622a1ba400b003b8685d014dsi3230256qtb.229.2023.02.16.23.50.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Feb 2023 23:50:26 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSvVO-0004We-Ld; Fri, 17 Feb 2023 02:50:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSvVM-0004Vx-6g for qemu-devel@nongnu.org; Fri, 17 Feb 2023 02:50:04 -0500 Received: from 3.mo552.mail-out.ovh.net ([178.33.254.192]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSvVJ-00064t-Vj for qemu-devel@nongnu.org; Fri, 17 Feb 2023 02:50:03 -0500 Received: from mxplan5.mail.ovh.net (unknown [10.109.146.147]) by mo552.mail-out.ovh.net (Postfix) with ESMTPS id 786882CE8D; Fri, 17 Feb 2023 07:49:57 +0000 (UTC) Received: from kaod.org (37.59.142.103) by DAG4EX2.mxp5.local (172.16.2.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 17 Feb 2023 08:49:56 +0100 Authentication-Results: garm.ovh; auth=pass (GARM-103G005181a3b93-dec8-42df-aed0-97f1a16319e0, D8AD3BA2C27EEBE7B4560DA8411A9B1E3CFED360) smtp.auth=clg@kaod.org X-OVh-ClientIp: 82.64.250.170 Message-ID: <245aedfe-c5c4-2e99-ac8f-726665f954ce@kaod.org> Date: Fri, 17 Feb 2023 08:49:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH v2] Adding new machine Tiogapass in QEMU Content-Language: en-US To: Karthikeyan Pasupathi , , , , , References: <20230216184342.253868-1-pkarthikeyan1509@gmail.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= In-Reply-To: <20230216184342.253868-1-pkarthikeyan1509@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [37.59.142.103] X-ClientProxiedBy: DAG3EX2.mxp5.local (172.16.2.22) To DAG4EX2.mxp5.local (172.16.2.32) X-Ovh-Tracer-GUID: b9010c55-2c4b-463f-873d-1cb7c8c2511f X-Ovh-Tracer-Id: 3577265482134293286 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudeikedgudduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgihesthekredttdefjeenucfhrhhomhepveorughrihgtucfnvgcuifhorghtvghruceotghlgheskhgrohgurdhorhhgqeenucggtffrrghtthgvrhhnpeetgeehudegieffkeeftdelffdtjeelfeeggeetlefgudejgefgfeeiveeutdffheenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoegtlhhgsehkrghougdrohhrgheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepphhkrghrthhhihhkvgihrghnudehtdelsehgmhgrihhlrdgtohhmpdhpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrghdprghnughrvgifsegrjhdrihgurdgruhdpjhhovghlsehjmhhsrdhiugdrrghupdhqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgpdhqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehhedvpdhmohguvgepshhmthhpohhuth Received-SPF: pass client-ip=178.33.254.192; envelope-from=clg@kaod.org; helo=3.mo552.mail-out.ovh.net X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.351, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: iVlWaHK5or0U Hello Karthikeyan, On 2/16/23 19:43, Karthikeyan Pasupathi wrote: > This patch support Tiogapass in QEMU environment. > and introduced EEPROM BMC FRU data support "add tiogapass_bmc_fruid data" > along with the machine support. > > Signed-off-by: Karthikeyan Pasupathi There are a couple of coding style issues that I will fix. This is minor. (./scripts/checkpatch.pl is a good tool to run before sending.) Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/arm/aspeed.c | 32 ++++++++++++++++++++++++++++++++ > hw/arm/aspeed_eeprom.c | 22 ++++++++++++++++++++++ > 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..d12164420d 100644 > --- a/hw/arm/aspeed.c > +++ b/hw/arm/aspeed.c > @@ -530,6 +530,15 @@ static void romulus_bmc_i2c_init(AspeedMachineState *bmc) > i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 11), "ds1338", 0x32); > } > > +static void tiogapass_bmc_i2c_init(AspeedMachineState *bmc) > +{ > + AspeedSoCState *soc = &bmc->soc; > + > + at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 4), 0x54, 128 * KiB); > + at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 6), 0x54, 128 * KiB, tiogapass_bmc_fruid, > + tiogapass_bmc_fruid_len); > +} > + > static void create_pca9552(AspeedSoCState *soc, int bus_id, int addr) > { > i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, bus_id), > @@ -1191,6 +1200,25 @@ static void aspeed_machine_romulus_class_init(ObjectClass *oc, void *data) > aspeed_soc_num_cpus(amc->soc_name); > }; > > +static void aspeed_machine_tiogapass_class_init(ObjectClass *oc, void *data) > +{ > + MachineClass *mc = MACHINE_CLASS(oc); > + AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc); > + > + mc->desc = "Facebook Tiogapass 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 = tiogapass_bmc_i2c_init; > + mc->default_ram_size = 1 * GiB; > + mc->default_cpus = mc->min_cpus = mc->max_cpus = > + aspeed_soc_num_cpus(amc->soc_name); > + aspeed_soc_num_cpus(amc->soc_name); > +}; > + > static void aspeed_machine_sonorapass_class_init(ObjectClass *oc, void *data) > { > MachineClass *mc = MACHINE_CLASS(oc); > @@ -1566,6 +1594,10 @@ static const TypeInfo aspeed_machine_types[] = { > .name = MACHINE_TYPE_NAME("tacoma-bmc"), > .parent = TYPE_ASPEED_MACHINE, > .class_init = aspeed_machine_tacoma_class_init, > + }, { > + .name = MACHINE_TYPE_NAME("tiogapass-bmc"), > + .parent = TYPE_ASPEED_MACHINE, > + .class_init = aspeed_machine_tiogapass_class_init, > }, { > .name = MACHINE_TYPE_NAME("g220a-bmc"), > .parent = TYPE_ASPEED_MACHINE, > diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c > index 04463acc9d..f937a6ceaa 100644 > --- a/hw/arm/aspeed_eeprom.c > +++ b/hw/arm/aspeed_eeprom.c > @@ -6,6 +6,27 @@ > > #include "aspeed_eeprom.h" > > +/* Tiogapass BMC FRU */ > +const uint8_t tiogapass_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, 0x54, 0x69, 0x6f, 0x67, 0x61, > + 0x20, 0x50, 0x61, 0x73, 0x73, 0x20, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, > + 0x32, 0xce, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, > + 0x58, 0x58, 0x58, 0x58, 0xc4, 0x58, 0x58, 0x58, 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 uint8_t fby35_nic_fruid[] = { > 0x01, 0x00, 0x00, 0x01, 0x0f, 0x20, 0x00, 0xcf, 0x01, 0x0e, 0x19, 0xd7, > 0x5e, 0xcf, 0xc8, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xdd, > @@ -77,6 +98,7 @@ const uint8_t fby35_bmc_fruid[] = { > 0x6e, 0x66, 0x69, 0x67, 0x20, 0x41, 0xc1, 0x45, > }; > > +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); > const size_t fby35_bmc_fruid_len = sizeof(fby35_bmc_fruid); > diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h > index a0f848fa6e..69db103c83 100644 > --- a/hw/arm/aspeed_eeprom.h > +++ b/hw/arm/aspeed_eeprom.h > @@ -9,6 +9,9 @@ > > #include "qemu/osdep.h" > > +extern const uint8_t tiogapass_bmc_fruid[]; > +extern const size_t tiogapass_bmc_fruid_len; > + > extern const uint8_t fby35_nic_fruid[]; > extern const uint8_t fby35_bb_fruid[]; > extern const uint8_t fby35_bmc_fruid[];