Return something from CFE entry point
Return something in case of mismatched signature. Added some test code, the entry point didn't seem to be called at all during last tests.
This commit is contained in:
parent
1a6b60e613
commit
8f5e824baa
|
@ -23,7 +23,7 @@
|
||||||
#define HEAP_SIZE 65536
|
#define HEAP_SIZE 65536
|
||||||
|
|
||||||
|
|
||||||
extern "C" void _start(uint64 handle, uint64 entry, uint32 _unused,
|
extern "C" uint32 _start(uint64 handle, uint64 entry, uint32 _unused,
|
||||||
uint32 signature);
|
uint32 signature);
|
||||||
extern "C" void start(uint64 cfeHandle, uint64 cfeEntry);
|
extern "C" void start(uint64 cfeHandle, uint64 cfeEntry);
|
||||||
|
|
||||||
|
@ -93,16 +93,17 @@ platform_boot_options(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern "C" void
|
extern "C" uint32
|
||||||
_start(uint64 handle, uint64 entry, uint32 _unused, uint32 signature)
|
_start(uint64 handle, uint64 entry, uint32 _unused, uint32 signature)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (signature != CFE_EPTSEAL)
|
if (signature != CFE_EPTSEAL)
|
||||||
return;//XXX:something?
|
return 123;//XXX:something?
|
||||||
|
|
||||||
clear_bss();
|
clear_bss();
|
||||||
call_ctors();
|
call_ctors();
|
||||||
// call C++ constructors before doing anything else
|
// call C++ constructors before doing anything else
|
||||||
|
//return 456;
|
||||||
|
|
||||||
start(handle, entry);
|
start(handle, entry);
|
||||||
}
|
}
|
||||||
|
@ -135,6 +136,10 @@ start(uint64 cfeHandle, uint64 cfeEntry)
|
||||||
#endif
|
#endif
|
||||||
console_init();
|
console_init();
|
||||||
|
|
||||||
|
// XXX:FIXME: doesn't even land here.
|
||||||
|
dprintf("testing...\n");
|
||||||
|
while (true);
|
||||||
|
|
||||||
#if 0//OF
|
#if 0//OF
|
||||||
if ((gMachine & MACHINE_QEMU) != 0)
|
if ((gMachine & MACHINE_QEMU) != 0)
|
||||||
dprintf("OpenBIOS (QEMU?) OpenFirmware machine detected\n");
|
dprintf("OpenBIOS (QEMU?) OpenFirmware machine detected\n");
|
||||||
|
|
Loading…
Reference in New Issue