[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] arm: Zero the BSS at start of day.


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Fri, 12 Oct 2012 00:11:07 +0000
  • Delivery-date: Fri, 12 Oct 2012 00:11:16 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1349967416 -3600
# Node ID 5840770f81ba00775f714b210eb589cd9331012c
# Parent  b91f57f54f478dd9849e55f3de3fc3bab7f33b46
arm: Zero the BSS at start of day.

Avoids surprises e.g. when loading via the boot-wrapper.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r b91f57f54f47 -r 5840770f81ba xen/arch/arm/head.S
--- a/xen/arch/arm/head.S       Thu Oct 11 11:52:10 2012 +0100
+++ b/xen/arch/arm/head.S       Thu Oct 11 15:56:56 2012 +0100
@@ -127,8 +127,26 @@ 1:
        add   pc, r0, r10            /* Call PA of function */
 
 hyp:
+
+       /* Zero BSS On the boot CPU to avoid nasty surprises */
+       teq   r12, #0
+       bne   skip_bss
+
+       PRINT("- Zero BSS -\r\n")
+       ldr   r0, =__bss_start       /* Load start & end of bss */
+       ldr   r1, =__bss_end
+       add   r0, r0, r10            /* Apply physical offset */
+       add   r1, r1, r10
+       
+       mov   r2, #0
+1:     str   r2, [r0], #4
+       cmp   r0, r1
+       blo   1b
+
+skip_bss:      
+
        PRINT("- Setting up control registers -\r\n")
-
+       
        /* Set up memory attribute type tables */
        ldr   r0, =MAIR0VAL
        ldr   r1, =MAIR1VAL
diff -r b91f57f54f47 -r 5840770f81ba xen/arch/arm/xen.lds.S
--- a/xen/arch/arm/xen.lds.S    Thu Oct 11 11:52:10 2012 +0100
+++ b/xen/arch/arm/xen.lds.S    Thu Oct 11 15:56:56 2012 +0100
@@ -119,6 +119,7 @@ SECTIONS
        *(.bss.percpu.read_mostly)
        . = ALIGN(SMP_CACHE_BYTES);
        __per_cpu_data_end = .;
+       __bss_end = .;
   } :text
   _end = . ;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.