[U-Boot] [PATCH 1/5] ls2080: Exit dpaa only right before exiting U-Boot

Alexander Graf agraf at suse.de
Sun Jun 19 23:58:40 CEST 2016



On 07.06.16 03:28, Prabhakar Kushwaha wrote:
> Hi Alex,
> 
>> -----Original Message-----
>> From: Alexander Graf [mailto:agraf at suse.de]
>> Sent: Friday, May 27, 2016 7:58 PM
>> To: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>; u-
>> boot at lists.denx.de
>> Cc: york sun <york.sun at nxp.com>
>> Subject: Re: [U-Boot] [PATCH 1/5] ls2080: Exit dpaa only right before exiting
>> U-Boot
>>
>> On 05/18/2016 02:29 PM, Prabhakar Kushwaha wrote:
>>>> -----Original Message-----
>>>> From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of
>>>> Alexander Graf
>>>> Sent: Friday, May 13, 2016 5:52 PM
>>>> To: u-boot at lists.denx.de
>>>> Subject: [U-Boot] [PATCH 1/5] ls2080: Exit dpaa only right before
>>>> exiting U- Boot
>>>>
>>>> On ls2080 we have a separate network fabric component which we need
>>>> to shut down before we enter Linux (or any other OS). Along with that
>>>> also comes configuration of the fabric using a description file.
>>>>
>>>> Today we always stop and configure the fabric in the boot script and
>>>> (again) exit it on device tree generation. This works ok for the
>>>> normal booti case, but with bootefi the payload we're running may
>>>> still want to access the network.
>>>>
>>>> So let's add a new fsl_mc command that defers configuration and
>>>> stopping the hardware to when we actually exit U-Boot, so that we can
>>>> still use the fabric from an EFI payload.
>>>>
>>>> For existing boot scripts, nothing should change with this patch.
>>>>
>>>> Signed-off-by: Alexander Graf <agraf at suse.de>
>>> With this patch.
>>>
>>> If I does not apply MC,  I am getting following crash:-
>>>
>>> Starting kernel ...
>>>
>>> "Synchronous Abort" handler, esr 0x96000044
>>
>> So should we consider it a bug fix or regression then? :)
>>
>>
> 
> Are you planning to fix it?
> 
> If not let me know I will try to  work on it. 

The checks that determine whether we really want to exit ldpaa only work
if the argument to the function is non-NULL.

Can you please check if the patch below fixes it for you?


Alex

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 95037c1..233c94f 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -91,7 +91,7 @@ static void announce_and_cleanup(int fake)
 #endif

 #ifdef CONFIG_FSL_MC_ENET
-	if (!fsl_mc_ldpaa_exit(NULL))
+	if (!fsl_mc_ldpaa_exit(gd->bd))
 		mc_apply_dpl(0);
 #endif

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 8d3943f..c1209b0 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -529,7 +529,7 @@ static efi_status_t EFIAPI
efi_exit_boot_services(void *image_handle,
 	EFI_ENTRY("%p, %ld", image_handle, map_key);

 #ifdef CONFIG_FSL_MC_ENET
-	if (!fsl_mc_ldpaa_exit(NULL))
+	if (!fsl_mc_ldpaa_exit(gd->bd))
 		mc_apply_dpl(0);
 #endif


More information about the U-Boot mailing list