Commit
ef3e035c stopped using the firmware stack and thus stopped saving
it's location in p1275buf. However, kexec wants to be using the firmware
stack when launching the new kernel.
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
/* You must call prom_init() before using any of the library services,
* preferably as early as possible. Pass it the romvec pointer.
*/
-void prom_init(void *cif_handler);
+void prom_init(void *cif_handler, void *cif_stack);
void prom_init_report(void);
/* Boot argument acquisition, returns the boot command line string. */
sethi %hi(init_thread_union), %g6
or %g6, %lo(init_thread_union), %g6
ldx [%g6 + TI_TASK], %g4
+ mov %sp, %l6
wr %g0, ASI_P, %asi
mov 1, %g1
nop
#endif
+ mov %l6, %o1
call prom_init
mov %l7, %o0 ! OpenPROM cif handler
* It gets passed the pointer to the PROM vector.
*/
-extern void prom_cif_init(void *);
+extern void prom_cif_init(void *, void *);
-void __init prom_init(void *cif_handler)
+void __init prom_init(void *cif_handler, void *cif_stack)
{
phandle node;
- prom_cif_init(cif_handler);
+ prom_cif_init(cif_handler, cif_stack);
prom_chosen_node = prom_finddevice(prom_chosen_path);
if (!prom_chosen_node || (s32)prom_chosen_node == -1)
struct {
long prom_callback; /* 0x00 */
void (*prom_cif_handler)(long *); /* 0x08 */
+ unsigned long prom_cif_stack; /* 0x10 */
} p1275buf;
extern void prom_world(int);
void prom_cif_init(void *cif_handler, void *cif_stack)
{
p1275buf.prom_cif_handler = (void (*)(long *))cif_handler;
+ p1275buf.prom_cif_stack = (unsigned long)cif_stack;
}