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

Christophe Lombard clombard at linux.ibm.com
Fri Jun 23 23:27:53 AEST 2023


Le 21/06/2023 à 07:01, Nicholas Piggin a écrit :
> 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?

Good catch ! we could actually also clean up this file.

>> 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);

Absolutely, we could do that. Thanks

>
> Thanks,
> Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20230623/31ee572c/attachment.htm>


More information about the Skiboot mailing list