Manage special case for Mac SE/30

This commit is contained in:
Laurent Vivier
2004-07-10 01:28:27 +00:00
parent e671e2cdda
commit 0dfa8d7a35
2 changed files with 36 additions and 7 deletions
+21
View File
@@ -9,6 +9,7 @@
#include "misc.h"
#include "glue.h"
#include "arch.h"
#include "lowmem.h"
unsigned long cpu_type;
unsigned long mmu_type;
@@ -19,6 +20,26 @@ unsigned long bus_type;
void arch_init()
{
/* System prior to 6.0.4 doesn't support Gestalt() */
if (ROMBase[4] == 0x0178) {
/* Macintosh SE/30 */
/* Doesn't support Gestalt(), nor SysEnvirons() (why ?) */
/* http://docs.info.apple.com/article.html?artnum=112170 */
cpu_type = gestalt68030;
mmu_type = gestalt68030MMU;
fpu_type = gestalt68882;
machine_id = gestaltMacSE030;
arch_type = gestalt68k;
bus_type = busNUBUS;
return;
}
/* get processor type */
Gestalt(gestaltProcessorType, &cpu_type);
+15 -7
View File
@@ -129,7 +129,11 @@ void bootinfo_init(char* command_line,
/* check ram size */
Gestalt('ram ', &ram);
if (machine_id == gestaltMacSE030) {
ram = MemTop;
} else {
Gestalt('ram ', &ram);
}
boot_info.bi_mac.memsize = ram / (1024L * 1024L);
/* set processor type */
@@ -170,7 +174,7 @@ void bootinfo_init(char* command_line,
break;
case gestalt68882:
boot_info.cputype |= FPU_68882; break;
boot_info.cputype |= FPU_68882;
break;
case gestalt68040FPU:
@@ -232,7 +236,7 @@ void bootinfo_init(char* command_line,
/* ROM base */
boot_info.bi_mac.rombase = ROMBase;
boot_info.bi_mac.rombase = (unsigned long)ROMBase;
#if defined(EXTENDED_HW_MAP)
/* hardware information */
@@ -340,11 +344,15 @@ void bootinfo_init(char* command_line,
/* nubus */
if (Gestalt('sltc', &boot_info.bi_mac.NubusMap) == noErr)
{
if (boot_info.bi_mac.NubusMap != 0)
if (machine_id == gestaltMacSE030) {
boot_info.bi_mac.HwMap |= HW_MAP_NUBUS;
} else {
if (Gestalt('sltc', &boot_info.bi_mac.NubusMap) == noErr)
{
boot_info.bi_mac.HwMap |= HW_MAP_NUBUS;
if (boot_info.bi_mac.NubusMap != 0)
{
boot_info.bi_mac.HwMap |= HW_MAP_NUBUS;
}
}
}