aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/ps3.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/ps3.c')
-rw-r--r--arch/powerpc/boot/ps3.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
index 3b0ac4d006ec..9954d98871d0 100644
--- a/arch/powerpc/boot/ps3.c
+++ b/arch/powerpc/boot/ps3.c
@@ -27,10 +27,10 @@
27#include "page.h" 27#include "page.h"
28#include "ops.h" 28#include "ops.h"
29 29
30extern s64 lv1_panic(u64 in_1); 30extern int lv1_panic(u64 in_1);
31extern s64 lv1_get_logical_partition_id(u64 *out_1); 31extern int lv1_get_logical_partition_id(u64 *out_1);
32extern s64 lv1_get_logical_ppe_id(u64 *out_1); 32extern int lv1_get_logical_ppe_id(u64 *out_1);
33extern s64 lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3, 33extern int lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3,
34 u64 in_4, u64 in_5, u64 *out_1, u64 *out_2); 34 u64 in_4, u64 in_5, u64 *out_1, u64 *out_2);
35 35
36#ifdef DEBUG 36#ifdef DEBUG
@@ -46,6 +46,7 @@ BSS_STACK(4096);
46 * edit the command line passed to vmlinux (by setting /chosen/bootargs). 46 * edit the command line passed to vmlinux (by setting /chosen/bootargs).
47 * The buffer is put in it's own section so that tools may locate it easier. 47 * The buffer is put in it's own section so that tools may locate it easier.
48 */ 48 */
49
49static char cmdline[COMMAND_LINE_SIZE] 50static char cmdline[COMMAND_LINE_SIZE]
50 __attribute__((__section__("__builtin_cmdline"))); 51 __attribute__((__section__("__builtin_cmdline")));
51 52
@@ -75,7 +76,7 @@ static void ps3_exit(void)
75 76
76static int ps3_repository_read_rm_size(u64 *rm_size) 77static int ps3_repository_read_rm_size(u64 *rm_size)
77{ 78{
78 s64 result; 79 int result;
79 u64 lpar_id; 80 u64 lpar_id;
80 u64 ppe_id; 81 u64 ppe_id;
81 u64 v2; 82 u64 v2;
@@ -114,16 +115,17 @@ void ps3_copy_vectors(void)
114{ 115{
115 extern char __system_reset_kernel[]; 116 extern char __system_reset_kernel[];
116 117
117 memcpy((void *)0x100, __system_reset_kernel, 0x100); 118 memcpy((void *)0x100, __system_reset_kernel, 512);
118 flush_cache((void *)0x100, 0x100); 119 flush_cache((void *)0x100, 512);
119} 120}
120 121
121void platform_init(void) 122void platform_init(unsigned long null_check)
122{ 123{
123 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ 124 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
124 void *chosen; 125 void *chosen;
125 unsigned long ft_addr; 126 unsigned long ft_addr;
126 u64 rm_size; 127 u64 rm_size;
128 unsigned long val;
127 129
128 console_ops.write = ps3_console_write; 130 console_ops.write = ps3_console_write;
129 platform_ops.exit = ps3_exit; 131 platform_ops.exit = ps3_exit;
@@ -151,6 +153,11 @@ void platform_init(void)
151 153
152 printf(" flat tree at 0x%lx\n\r", ft_addr); 154 printf(" flat tree at 0x%lx\n\r", ft_addr);
153 155
156 val = *(unsigned long *)0;
157
158 if (val != null_check)
159 printf("null check failed: %lx != %lx\n\r", val, null_check);
160
154 ((kernel_entry_t)0)(ft_addr, 0, NULL); 161 ((kernel_entry_t)0)(ft_addr, 0, NULL);
155 162
156 ps3_exit(); 163 ps3_exit();