mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Stefan Kerkmann <s.kerkmann@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 1/2] habv4: correct habv4 rom vector table
Date: Fri, 12 Jan 2024 16:26:40 +0100	[thread overview]
Message-ID: <e7e3a93a-8764-488a-9f03-46656421adbd@pengutronix.de> (raw)
In-Reply-To: <2f94ac17-fb2e-4ebd-ad49-c48f0b06d875@pengutronix.de>

Hello Ahmad,

On 11.01.24 16:57, Ahmad Fatoum wrote:
> Hello Stefan,
> 
>> diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
>> index ed6d4db77c..dfa0207435 100644
>> --- a/drivers/hab/habv4.c
>> +++ b/drivers/hab/habv4.c
>> @@ -144,31 +144,41 @@ struct hab_header {
>>   	uint8_t par;
>>   } __packed;
>>   
>> -typedef enum hab_status hab_loader_callback_fn(void **start, uint32_t *bytes, const void *boot_data);
>> +typedef enum hab_status hab_loader_callback_fn(void **start, size_t *bytes, const void *boot_data);
>> +typedef void (*hab_image_entry_fn)(void);
> 
> While it only matter for forward declaration, perhaps, change this
> to be a non-pointer like hab_loader_callback_fn above?

Done in v2.

>> +	enum hab_status (*run_dcd)(const uint8_t *dcd);
>> +	enum hab_status (*run_csf)(const uint8_t *csf, uint8_t cid, uint32_t srkmask);
>>   	enum hab_status (*assert)(enum hab_assertion assertion, const void *data, uint32_t count);
>> -	enum hab_status (*report_event)(enum hab_status status, uint32_t index, void *event, uint32_t *bytes);
>> +	enum hab_status (*report_event)(enum hab_status status, uint32_t index, uint8_t *event, size_t *bytes);
>>   	enum hab_status (*report_status)(enum hab_config *config, enum habv4_state *state);
>>   	void (*failsafe)(void);
>> +	hab_image_entry_fn(* authenticate_image_no_dcd)(uint8_t cid, ptrdiff_t ivt_offset, void **start, size_t *bytes, hab_loader_callback_fn loader);
> 
> And here you rely on a function pointer being automatically derived.
> While that's ok from a correctness point of view, for symmetry, it
> would be better to stick to one type.

Done in v2.

>> +	uint32_t(* get_version)(void);
> 
> Nitpick: space after uint32_t and not before get_version.
>

Done in v2.

>> +	enum hab_status (*authenticate_container)(uint8_t cid, ptrdiff_t ivt_offset, void **start, size_t *bytes, hab_loader_callback_fn loader, uint32_t srkmask, int skip_dcd);
>>   } __packed;
>>   
>> -#define FSL_SIP_HAB             0xC2000007
> 
> This is removed without replacement?
>

No it is still there, the diff is a bit misleading.

Regards,
Stefan



-- 
Pengutronix e.K.                       | Stefan Kerkmann             |
Steuerwalder Str. 21                   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany              | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686       | Fax:   +49-5121-206917-9    |



  reply	other threads:[~2024-01-12 15:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 15:42 [PATCH 0/2] Use HABv4 report_event implementation for imx8mm and imx8mn Stefan Kerkmann
2024-01-11 15:42 ` [PATCH 1/2] habv4: correct habv4 rom vector table Stefan Kerkmann
2024-01-11 15:57   ` Ahmad Fatoum
2024-01-12 15:26     ` Stefan Kerkmann [this message]
2024-01-12 16:04       ` Ahmad Fatoum
2024-01-12  6:53   ` Marc Kleine-Budde
2024-01-11 15:42 ` [PATCH 2/2] habv4: use hab rom implementation of report_event Stefan Kerkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7e3a93a-8764-488a-9f03-46656421adbd@pengutronix.de \
    --to=s.kerkmann@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox