diff --git a/headers/private/kernel/arch/m68k/arch_kernel_args.h b/headers/private/kernel/arch/m68k/arch_kernel_args.h index dd1af17228..1e8699b261 100644 --- a/headers/private/kernel/arch/m68k/arch_kernel_args.h +++ b/headers/private/kernel/arch/m68k/arch_kernel_args.h @@ -39,6 +39,19 @@ typedef struct { // to the Open Firmware. // uint32 num_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; #endif /* KERNEL_ARCH_M68K_KERNEL_ARGS_H */ diff --git a/src/system/boot/platform/atari_m68k/toscalls.c b/src/system/boot/platform/atari_m68k/toscalls.c index d69c143707..25ff67ba95 100644 --- a/src/system/boot/platform/atari_m68k/toscalls.c +++ b/src/system/boot/platform/atari_m68k/toscalls.c @@ -4,14 +4,15 @@ */ -#include "toscalls.h" - #include +#include #include #include #include +#include "toscalls.h" + void *gXHDIEntryPoint = NULL; uint32 gXHDIVersion = 0; @@ -203,10 +204,19 @@ init_xhdi(void) status_t 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()) { // find debugprintf id 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; }