* [U-Boot] [PATCH] efi_loader: log EFI return values too
2017-07-24 11:59 [U-Boot] [PATCH] efi_loader: EFI file paths should be DOS style Rob Clark
@ 2017-07-24 11:59 ` Rob Clark
2017-07-24 12:36 ` Alexander Graf
0 siblings, 1 reply; 6+ messages in thread
From: Rob Clark @ 2017-07-24 11:59 UTC (permalink / raw)
To: u-boot
Turns out this is rather useful to tracking down where things fail.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
I've been carrying this around locally for a while.. but I find it
useful and I expect others would too.
include/efi_loader.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 043b29edd3..98d69a6dab 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -20,7 +20,10 @@
debug("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \
} while(0)
-#define EFI_EXIT(ret) efi_exit_func(ret);
+#define EFI_EXIT(ret) ({ \
+ debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & 0xffff)); \
+ efi_exit_func(ret); \
+ })
extern struct efi_runtime_services efi_runtime_services;
extern struct efi_system_table systab;
--
2.13.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] efi_loader: log EFI return values too
2017-07-24 11:59 ` [U-Boot] [PATCH] efi_loader: log EFI return values too Rob Clark
@ 2017-07-24 12:36 ` Alexander Graf
2017-07-24 12:53 ` Rob Clark
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Graf @ 2017-07-24 12:36 UTC (permalink / raw)
To: u-boot
On 24.07.17 13:59, Rob Clark wrote:
> Turns out this is rather useful to tracking down where things fail.
>
> Signed-off-by: Rob Clark <robdclark@gmail.com>
> ---
> I've been carrying this around locally for a while.. but I find it
> useful and I expect others would too.
>
> include/efi_loader.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index 043b29edd3..98d69a6dab 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -20,7 +20,10 @@
> debug("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \
> } while(0)
>
> -#define EFI_EXIT(ret) efi_exit_func(ret);
> +#define EFI_EXIT(ret) ({ \
For consistency, please follow the same construct as in EFI_ENTRY().
> + debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & 0xffff)); \
I guess you just want to mask out EFI_ERROR_MASK?
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] efi_loader: log EFI return values too
2017-07-24 12:36 ` Alexander Graf
@ 2017-07-24 12:53 ` Rob Clark
2017-07-24 13:05 ` Alexander Graf
0 siblings, 1 reply; 6+ messages in thread
From: Rob Clark @ 2017-07-24 12:53 UTC (permalink / raw)
To: u-boot
On Mon, Jul 24, 2017 at 8:36 AM, Alexander Graf <agraf@suse.de> wrote:
>
>
> On 24.07.17 13:59, Rob Clark wrote:
>>
>> Turns out this is rather useful to tracking down where things fail.
>>
>> Signed-off-by: Rob Clark <robdclark@gmail.com>
>> ---
>> I've been carrying this around locally for a while.. but I find it
>> useful and I expect others would too.
>>
>> include/efi_loader.h | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/efi_loader.h b/include/efi_loader.h
>> index 043b29edd3..98d69a6dab 100644
>> --- a/include/efi_loader.h
>> +++ b/include/efi_loader.h
>> @@ -20,7 +20,10 @@
>> debug("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \
>> } while(0)
>> -#define EFI_EXIT(ret) efi_exit_func(ret);
>> +#define EFI_EXIT(ret) ({ \
>
>
> For consistency, please follow the same construct as in EFI_ENTRY().
You mean the do { ... } while (0)? That won't work since EFI_EXIT()
has to evaluate to ret. Or did I misunderstand you.
>> + debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & 0xffff)); \
>
>
> I guess you just want to mask out EFI_ERROR_MASK?
>
Yup.. is there a better way?
BR,
-R
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] efi_loader: log EFI return values too
2017-07-24 12:53 ` Rob Clark
@ 2017-07-24 13:05 ` Alexander Graf
0 siblings, 0 replies; 6+ messages in thread
From: Alexander Graf @ 2017-07-24 13:05 UTC (permalink / raw)
To: u-boot
On 24.07.17 14:53, Rob Clark wrote:
> On Mon, Jul 24, 2017 at 8:36 AM, Alexander Graf <agraf@suse.de> wrote:
>>
>>
>> On 24.07.17 13:59, Rob Clark wrote:
>>>
>>> Turns out this is rather useful to tracking down where things fail.
>>>
>>> Signed-off-by: Rob Clark <robdclark@gmail.com>
>>> ---
>>> I've been carrying this around locally for a while.. but I find it
>>> useful and I expect others would too.
>>>
>>> include/efi_loader.h | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/efi_loader.h b/include/efi_loader.h
>>> index 043b29edd3..98d69a6dab 100644
>>> --- a/include/efi_loader.h
>>> +++ b/include/efi_loader.h
>>> @@ -20,7 +20,10 @@
>>> debug("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \
>>> } while(0)
>>> -#define EFI_EXIT(ret) efi_exit_func(ret);
>>> +#define EFI_EXIT(ret) ({ \
>>
>>
>> For consistency, please follow the same construct as in EFI_ENTRY().
>
> You mean the do { ... } while (0)? That won't work since EFI_EXIT()
> has to evaluate to ret. Or did I misunderstand you.
Ah, right. No, I just misunderstood the reason for the change :).
>
>>> + debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & 0xffff)); \
>>
>>
>> I guess you just want to mask out EFI_ERROR_MASK?
>>
>
> Yup.. is there a better way?
Yeah, & ~EFI_ERROR_MASK :).
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] efi_loader: log EFI return values too
@ 2017-07-24 14:31 Rob Clark
2017-07-28 22:27 ` [U-Boot] " Alexander Graf
0 siblings, 1 reply; 6+ messages in thread
From: Rob Clark @ 2017-07-24 14:31 UTC (permalink / raw)
To: u-boot
Turns out this is rather useful to tracking down where things fail.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
v2: use EFI_ERROR_MASK
include/efi_loader.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 40e0f1dbd7..a8df44fdb6 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -20,7 +20,10 @@
debug("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \
} while(0)
-#define EFI_EXIT(ret) efi_exit_func(ret);
+#define EFI_EXIT(ret) ({ \
+ debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & ~EFI_ERROR_MASK)); \
+ efi_exit_func(ret); \
+ })
extern struct efi_runtime_services efi_runtime_services;
extern struct efi_system_table systab;
--
2.13.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] efi_loader: log EFI return values too
2017-07-24 14:31 [U-Boot] [PATCH] efi_loader: log EFI return values too Rob Clark
@ 2017-07-28 22:27 ` Alexander Graf
0 siblings, 0 replies; 6+ messages in thread
From: Alexander Graf @ 2017-07-28 22:27 UTC (permalink / raw)
To: u-boot
> Turns out this is rather useful to tracking down where things fail.
>
> Signed-off-by: Rob Clark <robdclark@gmail.com>
Thanks, applied to efi-next
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-07-28 22:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 14:31 [U-Boot] [PATCH] efi_loader: log EFI return values too Rob Clark
2017-07-28 22:27 ` [U-Boot] " Alexander Graf
-- strict thread matches above, loose matches on Subject: below --
2017-07-24 11:59 [U-Boot] [PATCH] efi_loader: EFI file paths should be DOS style Rob Clark
2017-07-24 11:59 ` [U-Boot] [PATCH] efi_loader: log EFI return values too Rob Clark
2017-07-24 12:36 ` Alexander Graf
2017-07-24 12:53 ` Rob Clark
2017-07-24 13:05 ` Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox