PERFORCE change 135618 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sun Feb 17 19:01:26 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=135618
Change 135618 by marcel at marcel_xcllnt on 2008/02/18 03:00:27
Save the address of the global data structure in
uboot_address. This will be used by the U-Boot
library in the API search algorithm.
Disable interrupts on entry and enable them for
the duration of the syscall.
Affected files ...
.. //depot/projects/e500/sys/boot/powerpc/uboot/start.S#7 edit
Differences ...
==== //depot/projects/e500/sys/boot/powerpc/uboot/start.S#7 (text+ko) ====
@@ -40,11 +40,18 @@
lis %r1, stack at ha
addi %r1, %r1, stack at l
addi %r1, %r1, (STACK_SIZE - 32)
- /* Save U-Boot's r14 and r29 */
+ /* Hint where to look for the API signature */
+ lis %r11, uboot_address at ha
+ addi %r11, %r11, uboot_address at l
+ stw %r2, 0(%r11)
+ /* Save U-Boot's r14 */
lis %r11, saved_regs at ha
addi %r11, %r11, saved_regs at l
stw %r14, 0(%r11)
- stw %r29, 4(%r11)
+ /* Disable interrupts */
+ mfmsr %r11
+ andi. %r11, %r11, ~0x8000 at l
+ mtmsr %r11
b main
/*
@@ -54,25 +61,30 @@
stwu %r1, -16(%r1)
mflr %r0
stw %r14, 8(%r1)
- stw %r29, 12(%r1)
stw %r0, 20(%r1)
/* Restore U-Boot's r14 and r29 */
lis %r11, saved_regs at ha
addi %r11, %r11, saved_regs at l
lwz %r14, 0(%r11)
- lwz %r29, 4(%r11)
+ /* Enable interrupts */
+ mfmsr %r11
+ ori %r11, %r11, 0x8000 at l
+ mtmsr %r11
/* Call into u-Boot */
lis %r11, syscall_ptr at ha
addi %r11, %r11, syscall_ptr at l
lwz %r11, 0(%r11)
mtctr %r11
bctrl
+ /* Disable interrupts */
+ mfmsr %r11
+ andi. %r11, %r11, ~0x8000 at l
+ mtmsr %r11
/* Epilogue */
lwz %r11, 0(%r1)
lwz %r0, 4(%r11)
mtlr %r0
lwz %r14, 8(%r1)
- lwz %r29, 12(%r1)
mr %r1, %r11
blr
@@ -88,5 +100,5 @@
.long 0
GLOBAL(saved_regs)
.long 0 /* R14 */
- .long 0 /* R29 */
-
+GLOBAL(uboot_address)
+ .long 0
More information about the p4-projects
mailing list