Added panic()/dprintf() calls to the x86 bootloader bindings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7057 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
38592e0909
commit
cdae4b7cf1
39
src/kernel/boot/platform/bios_ia32/debug.c
Normal file
39
src/kernel/boot/platform/bios_ia32/debug.c
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <boot/platform.h>
|
||||
#include <boot/stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
/** This works only after console_init() was called.
|
||||
*/
|
||||
|
||||
void
|
||||
panic(const char *format, ...)
|
||||
{
|
||||
va_list list;
|
||||
|
||||
puts("*** PANIC ***");
|
||||
|
||||
va_start(list, format);
|
||||
vprintf(format, list);
|
||||
va_end(list);
|
||||
|
||||
for (;;) ;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
dprintf(const char *format, ...)
|
||||
{
|
||||
va_list list;
|
||||
|
||||
va_start(list, format);
|
||||
vprintf(format, list);
|
||||
va_end(list);
|
||||
}
|
||||
|
24
src/kernel/boot/platform/bios_ia32/mmu.h
Normal file
24
src/kernel/boot/platform/bios_ia32/mmu.h
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
#ifndef MMU_H
|
||||
#define MMU_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void mmu_init(void);
|
||||
extern void *mmu_allocate(void *virtualAddress, size_t size);
|
||||
extern void mmu_free(void *virtualAddress, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMU_H */
|
Loading…
Reference in New Issue
Block a user