Received: by 2002:a17:907:c68a:b0:84d:2074:29bb with SMTP id ue10csp2632869ejc; Tue, 17 Jan 2023 10:34:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXvEWNDMOrtTKJ5B+TBV+/CHCkGUCO2DsYNh3An/72+RdSy+o39xWRaVSXIPvqcDP6UVL1jZ X-Received: by 2002:a05:6214:5c84:b0:534:b991:26ce with SMTP id lj4-20020a0562145c8400b00534b99126cemr5659724qvb.38.1673980478549; Tue, 17 Jan 2023 10:34:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673980478; cv=none; d=google.com; s=arc-20160816; b=L14e2NmBPgGTXce0Ty8L8KG5tjELPFNgjaaYCqL5wXCLf3Y8zB3NTrH2ZX8hHEjGuB zNm2GF1U1GcWoPRh38h+Ab6QXlcHDAdwy8EoW31xybfYzChPz1+LXPm0jlqW9j1r1O5h luJGsNmBg309cy8qCPPM3c9/2t2BBWxLp6njUgs8ph3DbrX4XFfUtV+JYE/fgTcYiTjj zqkd/oaZ2nMgta6Xo+aj9Hm6c/GsWkSIV6mxQ/ZvWNB0MW/DVuQPqFiGumD4Jzp9zHi3 ykl1DzRs3JrAH69XLi6a2D4kfPzzCOt29TLAbQOwZARODG6Yq0HDo5Jb3XsPGwn4d9CF XdjQ== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=l4Hh/ODTUo1ZSOLfpCsXpdmf8t/R1i5uvfMX7S3UTI4=; b=MXdoDMdLAG9UEBPV6Cd17DP2+bbMYTJQvJUKpik9kEYWjBkH6D7WSAd5/StLGHQ28Z 6TfS3sTiVTLjGaj64NG2v9gefzUtjUBz+ogzT+wv9eV0PaqwbNMcDmB86DIvg8875SjW 8gVfXW9t5o7z4zFUejGAHMh+VOyu+swjBDm6ArGQvQ9F8dggrItgDY0TN+Y460uCDtAC dTwA5p9YP4n65RJhRYmqriCACJXrJAm8m4HwGJY1iFq4MTNQ9RhZIkrkFhw6GDiiz0CW 0qB1XhWKRtuJiz1EG4joVbtObNOEroDF3q79MBu2f/leyFvsVS4qduNr2eeknSnHIaod Aosw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pjd.dev header.s=fm1 header.b=bOgfYb4y; dkim=fail header.i=@messagingengine.com header.s=fm3 header.b=L2fRcfBl; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-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 p10-20020a05621421ea00b00534e3dca3b8si4547327qvj.398.2023.01.17.10.34.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jan 2023 10:34:38 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-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; dkim=fail header.i=@pjd.dev header.s=fm1 header.b=bOgfYb4y; dkim=fail header.i=@messagingengine.com header.s=fm3 header.b=L2fRcfBl; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-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 1pHqn4-000311-TV; Tue, 17 Jan 2023 13:34:34 -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 1pHqmo-0002wY-C2; Tue, 17 Jan 2023 13:34:30 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHqmm-0007iR-M9; Tue, 17 Jan 2023 13:34:17 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id D0AB65C0132; Tue, 17 Jan 2023 13:34:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 17 Jan 2023 13:34:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pjd.dev; h=cc:cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1673980455; x= 1674066855; bh=l4Hh/ODTUo1ZSOLfpCsXpdmf8t/R1i5uvfMX7S3UTI4=; b=b OgfYb4y1em8B5sE5V0hXP4cMVRrDxQjiBnGuyYzivPr4DAgZZPnkcQOc9eSreOAz AYuxPJ0IAOCqVjXKL7RkKS0j6iq28252vb1RQSjvepgrq6+1ZumV+0Xb5eF8lxUH DU+IIUpQebTNDUtBBL9SKA892SYhdbf2P8FLdueYIcawgrEsGZWkkcoLVepAtH80 /DCTtZHBtKKWQxmpXECEmjsuBfUyf76g0tOAj2v602nZWeBJkQ5hb7rLDIYVhYaN /gAuTQXwPmD1IHKm4u708aIOfDrWpvS+/HWYMLMvvtg1NAnNBEda3fKDeqqKa4q6 du6rfLOapdSebQjnqvY3A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1673980455; x= 1674066855; bh=l4Hh/ODTUo1ZSOLfpCsXpdmf8t/R1i5uvfMX7S3UTI4=; b=L 2fRcfBl9GCALYvXnB9WRkFnU+0WwSDQZLut9Zm1fNbB4/DqEf4BN+XZ5AZah5ZfV pAa3/iIyzefyqCtWU0DPowb+NsyuZwGnZxbY+8sEbT89l9wg6Y6ceCTFq1Mjq9J3 O+k0KIp+nTyqjLibIEknnEn8/FCV9B5mCguRhVZHDaErcPNkrTXz4IL9xYY6OWq+ D72311OOQWtBYguvDiNbW6ZP0nsTTNSOrhAVbtUQf5uD9KC/7Iqjvx0kKML0w/hx xcJdSzSs+zEvbhn2zjQSVL29p62AHLBS1XnJ4Kmn1jUDZ55eDHwlMcMhAr0G6smH D30/n9+kltMPyvHDkgHuQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtiedguddugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtudenucfhrhhomheprfgv thgvrhcuffgvlhgvvhhorhihrghsuceophgvthgvrhesphhjugdruggvvheqnecuggftrf grthhtvghrnhephfegffevudefveetgeekteeijefhhfduueejvdegvdehffehjeevtefh hffffeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epphgvthgvrhesphhjugdruggvvh X-ME-Proxy: Feedback-ID: i9e814621:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Jan 2023 13:34:14 -0500 (EST) Date: Tue, 17 Jan 2023 10:34:12 -0800 From: Peter Delevoryas To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Cc: =?iso-8859-1?Q?C=E9dric?= Le Goater , peter.maydell@linaro.org, andrew@aj.id.au, joel@jms.id.au, hskinnemoen@google.com, kfting@nuvoton.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: Re: [PATCH v2 4/5] hw/arm/aspeed: Add aspeed_eeprom.c Message-ID: References: <20230116235604.55099-1-peter@pjd.dev> <20230116235604.55099-5-peter@pjd.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: pass client-ip=66.111.4.27; envelope-from=peter@pjd.dev; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@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-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: e6IBae97UcX1 On Tue, Jan 17, 2023 at 09:08:57AM +0100, Philippe Mathieu-Daudé wrote: > On 17/1/23 08:39, Cédric Le Goater wrote: > > On 1/17/23 00:56, Peter Delevoryas wrote: > > > - Create aspeed_eeprom.c and aspeed_eeprom.h > > > - Include aspeed_eeprom.c in CONFIG_ASPEED meson source files > > > - Include aspeed_eeprom.h in aspeed.c > > > - Add fby35_bmc_fruid data > > > - Use new at24c_eeprom_init_rom helper to initialize BMC FRUID > > > EEPROM with data > > >    from aspeed_eeprom.c > [...] > > > > diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h > > > new file mode 100644 > > > index 000000000000..89860e37d007 > > > --- /dev/null > > > +++ b/hw/arm/aspeed_eeprom.h > > > @@ -0,0 +1,11 @@ > > > +/* Copyright (c) Meta Platforms, Inc. and affiliates. */ > > Missing license. +1, will fix > > > > +#ifndef ASPEED_EEPROM_H > > > +#define ASPEED_EEPROM_H > > > + > > > +#include "qemu/osdep.h" > > > + > > > +extern const uint8_t fby35_bmc_fruid[]; > > > > > > may be define the array with an explicit size to avoid the size variable ? > > I don't see any good solution. > /* Return rom_size and set rombufptr, or return 0 */ > size_t aspeed_get_default_rom_content(const char *machine_typename, > const void **rombufptr); > > ? Hmmm I don't think this would work, cause actually there are more FRUID EEPROM's than just this one. I only added this one in this commit, but there's also FRUID EEPROM's from the network card and baseboard. I'll include those 2 EEPROM's in the next version to illustrate.