Added of_exit and of_enter KDL commands.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15782 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ee4bf34dd0
commit
835fb10b16
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
status_t platform_init(struct kernel_args *kernelArgs);
|
||||
status_t platform_init_post_vm(struct kernel_args *kernelArgs);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
|
|
@ -104,6 +104,7 @@ _start(kernel_args *bootKernelArgs, int currentCPU)
|
|||
// the boot loader allocated region is not used anymore
|
||||
|
||||
// now we can use the heap and create areas
|
||||
platform_init_post_vm(&sKernelArgs);
|
||||
TRACE(("init driver_settings\n"));
|
||||
boot_item_init();
|
||||
driver_settings_init(&sKernelArgs);
|
||||
|
|
|
@ -12,3 +12,10 @@ platform_init(struct kernel_args *kernelArgs)
|
|||
{
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
platform_init_post_vm(struct kernel_args *kernelArgs)
|
||||
{
|
||||
return B_OK;
|
||||
}
|
||||
|
|
|
@ -5,12 +5,46 @@
|
|||
|
||||
#include <platform.h>
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <boot/kernel_args.h>
|
||||
#include <platform/openfirmware/openfirmware.h>
|
||||
|
||||
|
||||
static int
|
||||
debug_command_of_exit(int argc, char **argv)
|
||||
{
|
||||
of_exit();
|
||||
kprintf("of_exit() failed!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
debug_command_of_enter(int argc, char **argv)
|
||||
{
|
||||
of_call_client_function("enter", 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
platform_init(struct kernel_args *kernelArgs)
|
||||
{
|
||||
return of_init(
|
||||
(int(*)(void*))kernelArgs->platform_args.openfirmware_entry);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
platform_init_post_vm(struct kernel_args *kernelArgs)
|
||||
{
|
||||
add_debugger_command("of_exit", &debug_command_of_exit,
|
||||
"Exit to the Open Firmware prompt. No way to get back into the OS!");
|
||||
add_debugger_command("of_enter", &debug_command_of_enter,
|
||||
"Enter a subordinate Open Firmware interpreter. Quitting it returns "
|
||||
"to KDL.");
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue