mirror of
https://github.com/vivier/EMILE.git
synced 2025-02-26 15:29:12 +00:00
move Gestalt('ram '...) from bootinfo.c to arch.c
This commit is contained in:
parent
75dff171a3
commit
7f07eaca6b
@ -19,6 +19,7 @@ unsigned long mmu_type;
|
||||
unsigned long fpu_type;
|
||||
unsigned long machine_id;
|
||||
unsigned long arch_type;
|
||||
unsigned long ram_size;
|
||||
#ifdef ARCH_PPC
|
||||
unsigned long bus_type;
|
||||
#endif
|
||||
@ -61,12 +62,17 @@ void arch_init()
|
||||
fpu_type = older_macintosh[i].fpu_type;
|
||||
machine_id = older_macintosh[i].machine_id;
|
||||
arch_type = older_macintosh[i].arch_type;
|
||||
ram_size = MemTop;
|
||||
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
/* get RAM size */
|
||||
|
||||
Gestalt('ram ', &ram_size);
|
||||
|
||||
/* get processor type */
|
||||
|
||||
Gestalt(gestaltProcessorType, &cpu_type);
|
||||
|
@ -180,5 +180,6 @@ extern unsigned long mmu_type;
|
||||
extern unsigned long fpu_type;
|
||||
extern unsigned long machine_id;
|
||||
extern unsigned long arch_type;
|
||||
extern unsigned long ram_size;
|
||||
|
||||
extern void arch_init();
|
||||
|
@ -115,7 +115,6 @@ static void extractBanks(struct bootinfo *bi, memory_map_t *map)
|
||||
void bootinfo_init(char* command_line,
|
||||
char* ramdisk_start, unsigned long ramdisk_size)
|
||||
{
|
||||
long ram;
|
||||
unsigned long gmt_bias;
|
||||
MachineLocation where;
|
||||
|
||||
@ -127,14 +126,9 @@ void bootinfo_init(char* command_line,
|
||||
|
||||
boot_info.bi_mac.id = machine_id;
|
||||
|
||||
/* check ram size */
|
||||
/* set ram size */
|
||||
|
||||
if (machine_id == gestaltMacSE030) {
|
||||
ram = MemTop;
|
||||
} else {
|
||||
Gestalt('ram ', &ram);
|
||||
}
|
||||
boot_info.bi_mac.memsize = ram >> 20; /* in mega-bytes */
|
||||
boot_info.bi_mac.memsize = ram_size >> 20; /* in mega-bytes */
|
||||
|
||||
/* set processor type */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user