68000: Set memory bank from KERNEL_LOADADDR to ScrnBase - 0x8000

This commit is contained in:
Laurent Vivier 2005-06-30 08:55:28 +00:00
parent a9c5d929c8
commit 221fbfb12a
4 changed files with 12 additions and 9 deletions

View File

@ -17,6 +17,7 @@
#include "MMU040.h"
#endif
#include "bank.h"
#include "vga.h"
/* MacOS nanokernel data structures (nubus powerPC only)
* found in Boot/X, thank you Ben ;-)
@ -102,7 +103,14 @@ void m68k_init_memory_map()
memory_map.bank_number = 0;
if (mmu_type == gestaltNoMMU)
{
bank_add_mem(0, 0, MemTop);
if (cpu_type == gestalt68000)
{
unsigned long start = KERNEL_BASEADDR;
unsigned long end = ScrnBase - 0x8000;
bank_add_mem(start, start, end - start);
}
else
bank_add_mem(0, 0, MemTop);
}
else if (mmu_type == gestalt68040MMU)
{

View File

@ -9,6 +9,7 @@
/* physical memory information */
#define MAX_MEM_MAP_SIZE 26
#define KERNEL_BASEADDR 0x3000
typedef struct memory_bank {
unsigned long physAddr;

View File

@ -7,6 +7,7 @@
#define VIA1Base (*(unsigned long*)0x01D4)
#define SCCRd (*(unsigned long*)0x01d8)
#define SCCWr (*(unsigned long*)0x01dc)
#define ScrnBase (*(unsigned long*)0x0824)
#define ROMBase (*(short**)0x02ae)
#define HWCfgFlags (*(unsigned long*)0x0B22)
#define SCSIBase (*(unsigned long*)0x0C00)

View File

@ -263,13 +263,6 @@ int start(emile_l2_header_t* info)
/* set bootinfo at end of kernel image */
if (mmu_type == gestaltNoMMU)
{
#define KERNEL_LOADADDR 0x3000
boot_info.memory[0].addr += KERNEL_LOADADDR;
boot_info.memory[0].size -= KERNEL_LOADADDR;
}
set_kernel_bootinfo(kernel + info->kernel_size);
/* compute final address of kernel */
@ -279,7 +272,7 @@ int start(emile_l2_header_t* info)
unsigned long size = end_enter_kernel - enter_kernel;
physImage = (unsigned long)kernel;
start_mem = KERNEL_LOADADDR + 0x1000;
start_mem = KERNEL_BASEADDR + 0x1000;
entry = (entry_t)(start_mem - size);
printf("\n");