[Skiboot] [PATCH V8 01/21] hw: Move lpc firmware space helpers

Nicholas Piggin npiggin at gmail.com
Wed Jun 21 15:01:28 AEST 2023


On Wed Jun 21, 2023 at 12:59 AM AEST, Christophe Lombard wrote:
> Add new lpc helpers for doing a bulk io to firmware space.
>
> Reviewed-by: Abhishek Singh Tomar <abhishek at linux.ibm.com>
> Signed-off-by: Christophe Lombard <clombard at linux.ibm.com>
> ---
>  hw/lpc.c                         | 74 ++++++++++++++++++++++++++++++++
>  include/lpc.h                    |  6 +++
>  libflash/ipmi-hiomap.c           | 66 +---------------------------
>  libflash/mbox-flash.c            | 64 +--------------------------

Good cleanup. How close are you to also getting
hw/ast-bmc/ast-sf-ctrl.c?

> diff --git a/libflash/test/mbox-server.c b/libflash/test/mbox-server.c
> index 8a68cfff..053be989 100644
> --- a/libflash/test/mbox-server.c
> +++ b/libflash/test/mbox-server.c
> @@ -142,6 +142,74 @@ int64_t lpc_write(enum OpalLPCAddressType __unused addr_type, uint32_t addr,
>  	return 0;
>  }
>  
> +int64_t lpc_fw_read(uint32_t off, void *buf, uint32_t len);
> +int64_t lpc_fw_read(uint32_t off, void *buf, uint32_t len)

Could you just make these really simple? I thind read should
just memset(buf, 0xaa, len); and write should just do nothing
(or maybe assert(len != 0);

Thanks,
Nick


More information about the Skiboot mailing list