2003-06-24 21:22:11 +04:00
|
|
|
/*
|
|
|
|
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
2004-06-22 04:27:04 +04:00
|
|
|
** Distributed under the terms of the Haiku License.
|
2003-06-24 21:22:11 +04:00
|
|
|
*/
|
|
|
|
#ifndef KERNEL_BOOT_PLATFORM_H
|
|
|
|
#define KERNEL_BOOT_PLATFORM_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <SupportDefs.h>
|
2003-10-14 04:26:04 +04:00
|
|
|
#include <boot/vfs.h>
|
2003-06-24 21:22:11 +04:00
|
|
|
|
|
|
|
|
|
|
|
struct stage2_args;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2003-10-01 05:02:36 +04:00
|
|
|
/* debug functions */
|
2003-06-24 21:22:11 +04:00
|
|
|
extern void panic(const char *format, ...);
|
2003-09-03 21:08:08 +04:00
|
|
|
extern void dprintf(const char *format, ...);
|
|
|
|
|
2003-10-01 05:02:36 +04:00
|
|
|
/* heap functions */
|
2003-10-08 02:10:55 +04:00
|
|
|
extern void platform_release_heap(struct stage2_args *args, void *base);
|
2003-06-24 21:22:11 +04:00
|
|
|
extern status_t platform_init_heap(struct stage2_args *args, void **_base, void **_top);
|
|
|
|
|
2003-10-16 21:55:21 +04:00
|
|
|
/* MMU/memory functions */
|
|
|
|
extern status_t platform_allocate_region(void **_virtualAddress, size_t size, uint8 protection);
|
|
|
|
extern status_t platform_free_region(void *address, size_t size);
|
|
|
|
|
2004-06-18 19:25:32 +04:00
|
|
|
/* boot options */
|
|
|
|
#define BOOT_OPTION_MENU 1
|
|
|
|
#define BOOT_OPTION_DEBUG_OUTPUT 2
|
|
|
|
|
|
|
|
extern uint32 platform_boot_options(void);
|
|
|
|
|
2003-10-01 05:02:36 +04:00
|
|
|
/* misc functions */
|
2004-06-22 04:27:04 +04:00
|
|
|
extern status_t platform_init_video(void);
|
2004-06-16 17:25:37 +04:00
|
|
|
extern void platform_switch_to_logo(void);
|
|
|
|
extern void platform_switch_to_text_mode(void);
|
2004-04-21 03:41:38 +04:00
|
|
|
extern void platform_start_kernel(void);
|
2003-10-01 05:02:36 +04:00
|
|
|
|
2003-06-24 21:22:11 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2003-10-01 05:02:36 +04:00
|
|
|
|
2004-06-21 19:51:59 +04:00
|
|
|
// these functions have to be implemented in C++
|
|
|
|
|
|
|
|
/* device functions */
|
|
|
|
|
2003-10-01 05:02:36 +04:00
|
|
|
class Node;
|
|
|
|
namespace boot {
|
|
|
|
class Partition;
|
|
|
|
}
|
|
|
|
|
|
|
|
extern status_t platform_get_boot_device(struct stage2_args *args, Node **_device);
|
2003-10-14 04:26:04 +04:00
|
|
|
extern status_t platform_add_block_devices(struct stage2_args *args, NodeList *devicesList);
|
2004-04-21 15:10:32 +04:00
|
|
|
extern status_t platform_get_boot_partition(struct stage2_args *args, Node *bootDevice,
|
|
|
|
NodeList *partitions, boot::Partition **_partition);
|
2003-10-01 05:02:36 +04:00
|
|
|
|
2004-06-21 19:51:59 +04:00
|
|
|
/* menu functions */
|
|
|
|
|
|
|
|
class Menu;
|
|
|
|
class MenuItem;
|
|
|
|
|
|
|
|
extern void platform_add_menus(Menu *menu);
|
|
|
|
extern void platform_update_menu_item(Menu *menu, MenuItem *item);
|
|
|
|
extern void platform_run_menu(Menu *menu);
|
|
|
|
|
2003-06-24 21:22:11 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* KERNEL_BOOT_PLATFORM_H */
|