37 #define DBG(fmt...) printf(fmt)
53 static void prep_cmdline(
void *chosen)
58 setprop_str(chosen,
"bootargs",
cmdline);
63 static void ps3_console_write(
const char *
buf,
int len)
67 static void ps3_exit(
void)
77 static int ps3_repository_read_rm_size(
u64 *rm_size)
102 0x7075000000000000ULL, ppe_id, 0x726d5f73697a6500ULL, rm_size,
105 printf(
"%s:%d: ppe_id %lu \n", __func__, __LINE__,
106 (
unsigned long)ppe_id);
107 printf(
"%s:%d: lpar_id %lu \n", __func__, __LINE__,
108 (
unsigned long)lpar_id);
109 printf(
"%s:%d: rm_size %llxh \n", __func__, __LINE__, *rm_size);
111 return result ? -1 : 0;
116 extern char __system_reset_kernel[];
118 memcpy((
void *)0x100, __system_reset_kernel, 512);
126 unsigned long ft_addr;
133 printf(
"\n-- PS3 bootwrapper --\n");
138 chosen = finddevice(
"/chosen");
140 ps3_repository_read_rm_size(&rm_size);
148 prep_cmdline(chosen);
154 printf(
" flat tree at 0x%lx\n\r", ft_addr);
156 val = *(
unsigned long *)0;
158 if (val != null_check)
159 printf(
"null check failed: %lx != %lx\n\r", val, null_check);