[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/5] hw/arm/aspeed: Add aspeed_eeprom.c
From: |
Peter Delevoryas |
Subject: |
Re: [PATCH v2 4/5] hw/arm/aspeed: Add aspeed_eeprom.c |
Date: |
Tue, 17 Jan 2023 10:34:12 -0800 |
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.
- Re: [PATCH v2 1/5] hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton boards, (continued)
[PATCH v2 2/5] hw/arm/aspeed: Replace aspeed_eeprom_init with at24c_eeprom_init, Peter Delevoryas, 2023/01/16
[PATCH v2 3/5] hw/nvram/eeprom_at24c: Add init_rom field and at24c_eeprom_init_rom helper, Peter Delevoryas, 2023/01/16
[PATCH v2 4/5] hw/arm/aspeed: Add aspeed_eeprom.c, Peter Delevoryas, 2023/01/16
[PATCH v2 5/5] hw/nvram/eeprom_at24c: Make reset behavior more like hardware, Peter Delevoryas, 2023/01/16