From 084b7108638c26b87f8688ef830ddd65ee166865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 16 Jan 2008 04:28:06 +0000 Subject: [PATCH] relax fpu detection, and wow, it goes up to the boot menu ! (but there are lots of remaining stubs, like mmu) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23553 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/atari_m68k/cpu.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/system/boot/platform/atari_m68k/cpu.cpp b/src/system/boot/platform/atari_m68k/cpu.cpp index d15ebc79a3..b667fd47f0 100644 --- a/src/system/boot/platform/atari_m68k/cpu.cpp +++ b/src/system/boot/platform/atari_m68k/cpu.cpp @@ -38,19 +38,22 @@ check_cpu_features() #warning M68K: TODO: probe ourselves, we shouldn't trust the TOS! const tos_cookie *c; + uint16 cpu_type, fpu_type, fpu_emul; c = tos_find_cookie('_CPU'); if (!c) { panic("can't get a cookie (_CPU)! Mum, I'm hungry!"); return EINVAL; } + cpu_type = (uint16) c->ivalue; + dump_tos_cookies(); #warning M68K: check for 020 + mmu - if (c->ivalue < 30/*20*/) + if (cpu_type < 30/*20*/) return EINVAL; - gKernelArgs.arch_args.has_lpstop = (c->ivalue >= 60)?true:false; + gKernelArgs.arch_args.has_lpstop = (cpu_type >= 60)?true:false; #warning M68K: add cpu type to kern args c = tos_find_cookie('_FPU'); @@ -58,9 +61,11 @@ check_cpu_features() panic("can't get a cookie (_FPU)! Mum, I'm hungry!"); return EINVAL; } + fpu_type = (uint16)(c->ivalue >> 16); + fpu_emul = (uint16)(c->ivalue); #warning M68K: check for fpu in detail - if (c->ivalue < 2 || c->ivalue > 7) { + if (fpu_type < 2 || fpu_type > 9) { panic("bad fpu"); return EINVAL; }