qemu/pc-bios/vof/main.c
Alexey Kardashevskiy 21bde1ecb6 spapr: Fix implementation of Open Firmware client interface
This addresses the comments from v22.

The functional changes are (the VOF ones need retesting with Pegasos2):

(VOF) setprop will start failing if the machine class callback
did not handle it;
(VOF) unit addresses are lowered in path_offset();
(SPAPR) /chosen/bootargs is initialized from kernel_cmdline if
the client did not change it.

Fixes: 5c991e5d4378 ("spapr: Implement Open Firmware client interface")
Cc: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20210708065625.548396-1-aik@ozlabs.ru>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-07-09 10:55:11 +10:00

22 lines
598 B
C

#include "vof.h"
void do_boot(unsigned long addr, unsigned long _r3, unsigned long _r4)
{
register unsigned long r3 __asm__("r3") = _r3;
register unsigned long r4 __asm__("r4") = _r4;
register unsigned long r5 __asm__("r5") = (unsigned long) _prom_entry;
((void (*)(void))(uint32_t)addr)();
}
void entry_c(void)
{
register unsigned long r3 __asm__("r3");
register unsigned long r4 __asm__("r4");
register unsigned long r5 __asm__("r5");
uint64_t initrd = r3, initrdsize = r4;
boot_from_memory(initrd, initrdsize);
ci_panic("*** No boot target ***\n");
}