mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: Shutdown barebox (MMU) before setting ATAGS to avoid page #0 fault.
@ 2012-05-05 21:38 Krzysztof Halasa
  2012-05-11 19:00 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Halasa @ 2012-05-05 21:38 UTC (permalink / raw)
  To: barebox

This doesn't fix the "md" issue.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>

diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index a167036..847fefa 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -260,12 +260,15 @@ void start_linux(void *adr, int swap, unsigned long initrd_address,
 	if (oftree) {
 		printf("booting Linux kernel with devicetree\n");
 		params = oftree;
-	} else {
+	}
+
+	shutdown_barebox();
+
+	if (!oftree) {
 		setup_tags(initrd_address, initrd_size, swap);
 		params = armlinux_bootparams;
 	}
 
-	shutdown_barebox();
 	if (swap) {
 		u32 reg;
 		__asm__ __volatile__("mrc p15, 0, %0, c1, c0" : "=r" (reg));

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: Shutdown barebox (MMU) before setting ATAGS to avoid page #0 fault.
  2012-05-05 21:38 [PATCH] ARM: Shutdown barebox (MMU) before setting ATAGS to avoid page #0 fault Krzysztof Halasa
@ 2012-05-11 19:00 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-05-11 19:00 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: barebox

Hi Krzysztof,

On Sat, May 05, 2012 at 11:38:15PM +0200, Krzysztof Halasa wrote:
> This doesn't fix the "md" issue.
> 
> Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
> 
> diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
> index a167036..847fefa 100644
> --- a/arch/arm/lib/armlinux.c
> +++ b/arch/arm/lib/armlinux.c
> @@ -260,12 +260,15 @@ void start_linux(void *adr, int swap, unsigned long initrd_address,
>  	if (oftree) {
>  		printf("booting Linux kernel with devicetree\n");
>  		params = oftree;
> -	} else {
> +	}
> +
> +	shutdown_barebox();
> +
> +	if (!oftree) {
>  		setup_tags(initrd_address, initrd_size, swap);
>  		params = armlinux_bootparams;
>  	}

I don't like this very much because I think that shutdown_barebox should
be the last thing before jumping to the kernel. Also it makes starting
of the kernel potentially slower as we execute code with caches
disabled.

BTW I don't understand why the zero page is faulting in your case
anyway. You have SDFAM at 0x0, right? So we have

vectors_init() -> sets zero page to faulting
for_each_memory_bank()
	create_sections(); -> should set the zero page accessible again
                              if we have a SDRAM bank at 0x0

Am I getting something wrong here?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-11 19:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-05 21:38 [PATCH] ARM: Shutdown barebox (MMU) before setting ATAGS to avoid page #0 fault Krzysztof Halasa
2012-05-11 19:00 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox