Add platform specific kernel args, use them to pass nat_feat info so at least the kernel can print something from the emulator...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26596 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -39,6 +39,19 @@ typedef struct {
|
|||||||
// to the Open Firmware.
|
// to the Open Firmware.
|
||||||
// uint32 num_virtual_ranges_to_keep;
|
// uint32 num_virtual_ranges_to_keep;
|
||||||
// addr_range virtual_ranges_to_keep[MAX_VIRTUAL_RANGES_TO_KEEP];
|
// addr_range virtual_ranges_to_keep[MAX_VIRTUAL_RANGES_TO_KEEP];
|
||||||
|
|
||||||
|
// platform specific
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
struct {
|
||||||
|
//XXX: are those meant to be used by physical
|
||||||
|
// or virtual address ?
|
||||||
|
int32 (*nf_get_id)(const char *);
|
||||||
|
int32 (*nf_call)(int32, ...);
|
||||||
|
int32 nf_dprintf_id;
|
||||||
|
} nat_feat;
|
||||||
|
} atari;
|
||||||
|
} plat_args;
|
||||||
} arch_kernel_args;
|
} arch_kernel_args;
|
||||||
|
|
||||||
#endif /* KERNEL_ARCH_M68K_KERNEL_ARGS_H */
|
#endif /* KERNEL_ARCH_M68K_KERNEL_ARGS_H */
|
||||||
|
|||||||
@@ -4,14 +4,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "toscalls.h"
|
|
||||||
|
|
||||||
#include <boot/platform.h>
|
#include <boot/platform.h>
|
||||||
|
#include <boot/stage2.h>
|
||||||
#include <boot/stdio.h>
|
#include <boot/stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include <Errors.h>
|
#include <Errors.h>
|
||||||
|
|
||||||
|
#include "toscalls.h"
|
||||||
|
|
||||||
void *gXHDIEntryPoint = NULL;
|
void *gXHDIEntryPoint = NULL;
|
||||||
uint32 gXHDIVersion = 0;
|
uint32 gXHDIVersion = 0;
|
||||||
|
|
||||||
@@ -203,10 +204,19 @@ init_xhdi(void)
|
|||||||
status_t
|
status_t
|
||||||
init_nat_features(void)
|
init_nat_features(void)
|
||||||
{
|
{
|
||||||
|
gKernelArgs.arch_args.plat_args.atari.nat_feat.nf_get_id = NULL;
|
||||||
|
gKernelArgs.arch_args.plat_args.atari.nat_feat.nf_call = NULL;
|
||||||
|
gKernelArgs.arch_args.plat_args.atari.nat_feat.nf_dprintf_id = 0;
|
||||||
if (nat_features()) {
|
if (nat_features()) {
|
||||||
// find debugprintf id
|
// find debugprintf id
|
||||||
gDebugPrintfNatFeatID = nat_feat_getid("DEBUGPRINTF");
|
gDebugPrintfNatFeatID = nat_feat_getid("DEBUGPRINTF");
|
||||||
//
|
// pass native features infos to the kernel
|
||||||
|
gKernelArgs.arch_args.plat_args.atari.nat_feat.nf_get_id =
|
||||||
|
nat_features()->nfGetID;
|
||||||
|
gKernelArgs.arch_args.plat_args.atari.nat_feat.nf_call =
|
||||||
|
nat_features()->nfCall;
|
||||||
|
gKernelArgs.arch_args.plat_args.atari.nat_feat.nf_dprintf_id =
|
||||||
|
gDebugPrintfNatFeatID;
|
||||||
}
|
}
|
||||||
return nat_features() ? B_OK : ENOENT;
|
return nat_features() ? B_OK : ENOENT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user