aboutsummaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2011-10-10 17:56:32 +0200
committerThomas Huth <thuth@linux.vnet.ibm.com>2011-11-17 12:09:56 +0100
commit9d63b7beb2b87436d3a6042fea9127808954fb1c (patch)
tree071dba5f790606eae7196ebebc8aebc87d86ef9b /clients
parent98f93f2a4457c82f29573f5c3609d2c9dc3807a3 (diff)
downloadSLOF-9d63b7beb2b87436d3a6042fea9127808954fb1c.zip
SLOF-9d63b7beb2b87436d3a6042fea9127808954fb1c.tar.gz
SLOF-9d63b7beb2b87436d3a6042fea9127808954fb1c.tar.bz2
JS2x: Add some additional delays to takeover client.
These delays were needed to get the code running on the PowerStation again. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'clients')
-rw-r--r--clients/takeover/entry.S16
-rw-r--r--clients/takeover/main.c8
2 files changed, 17 insertions, 7 deletions
diff --git a/clients/takeover/entry.S b/clients/takeover/entry.S
index ff52dc6..a1030eb 100644
--- a/clients/takeover/entry.S
+++ b/clients/takeover/entry.S
@@ -19,10 +19,10 @@
_wrapclient:
bcl 20,31,over # branch after pointer table
-base:
+base:
.align 3
.LCgot: .quad _got-base+0x8000
-over:
+over:
mflr r8 # gpr 8 is the base
ld r2, .LCgot-base(r8) # load got pointer
add r2, r2, r8 # add base
@@ -40,7 +40,7 @@ over:
1:
stdu 15,8(14)
bdnz 1b
-
+
bl ._entry
@@ -71,8 +71,8 @@ slaveLoopNoTakeover:
.globl slaveLoop
slaveLoop:
mr 28,3
- li r3, 0x5124
- li r0, -1; .long 0x44000022
+ li r3, 0x5124
+ li r0, -1; .long 0x44000022
li 14,0
oris 14, 14, slaveQuitt@h
@@ -91,3 +91,9 @@ slaveLoop:
mtctr r3
bctr
+
+C_ENTRY(m_sync)
+ isync
+ sync
+ nop
+ blr
diff --git a/clients/takeover/main.c b/clients/takeover/main.c
index 6209dfd..40e630b 100644
--- a/clients/takeover/main.c
+++ b/clients/takeover/main.c
@@ -19,6 +19,7 @@
#include <takeover.h>
extern void call_client_interface(of_arg_t *);
+extern void m_sync(void);
#define boot_rom_bin_start _binary_______boot_rom_bin_start
#define boot_rom_bin_end _binary_______boot_rom_bin_end
@@ -106,7 +107,8 @@ doWait(void)
static const char *wheel = "|/-\\";
static int i = 0;
volatile int dly = 0xf0000;
- while (dly--);
+ while (dly--)
+ asm volatile (" nop ");
printf("\b%c", wheel[i++]);
i &= 0x3;
}
@@ -198,10 +200,12 @@ main(int argc, char *argv[])
index = 0;
while (slaveMask) {
+ m_sync();
unsigned long shifter = 0x1 << index;
if (shifter & slaveMask) {
slaveQuitt = index;
- while (slaveQuitt);
+ while (slaveQuitt)
+ m_sync();
slaveMask &= ~shifter;
}
index++;