mirror of
https://github.com/vivier/EMILE.git
synced 2025-08-07 15:25:04 +00:00
Correct KERNEL PANIC on IIci: move bootinfo() and set_kernel_bootinfo() after disable_cache()
This commit is contained in:
@@ -269,21 +269,22 @@ int start(emile_l2_header_t* info)
|
|||||||
#ifdef ARCH_M68K
|
#ifdef ARCH_M68K
|
||||||
if (arch_type == gestalt68k)
|
if (arch_type == gestalt68k)
|
||||||
{
|
{
|
||||||
/* initialize bootinfo structure */
|
|
||||||
|
|
||||||
bootinfo_init(info->command_line,
|
|
||||||
(char*)ramdisk_start, info->ramdisk_size);
|
|
||||||
|
|
||||||
/* set bootinfo at end of kernel image */
|
|
||||||
|
|
||||||
set_kernel_bootinfo(kernel + info->kernel_size);
|
|
||||||
|
|
||||||
/* compute final address of kernel */
|
/* compute final address of kernel */
|
||||||
|
|
||||||
if (mmu_type == gestaltNoMMU)
|
if (mmu_type == gestaltNoMMU)
|
||||||
{
|
{
|
||||||
unsigned long size = end_enter_kernel - enter_kernel;
|
unsigned long size = end_enter_kernel - enter_kernel;
|
||||||
|
|
||||||
|
/* initialize bootinfo structure */
|
||||||
|
|
||||||
|
bootinfo_init(info->command_line,
|
||||||
|
(char*)ramdisk_start, info->ramdisk_size);
|
||||||
|
|
||||||
|
/* set bootinfo at end of kernel image */
|
||||||
|
|
||||||
|
set_kernel_bootinfo(kernel + info->kernel_size);
|
||||||
|
|
||||||
|
|
||||||
physImage = (unsigned long)kernel;
|
physImage = (unsigned long)kernel;
|
||||||
start_mem = KERNEL_BASEADDR + 0x1000;
|
start_mem = KERNEL_BASEADDR + 0x1000;
|
||||||
entry = (entry_t)(start_mem - size);
|
entry = (entry_t)(start_mem - size);
|
||||||
@@ -298,11 +299,17 @@ int start(emile_l2_header_t* info)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret = logical2physical((unsigned long)kernel, &physImage);
|
ret = logical2physical((unsigned long)kernel, &physImage);
|
||||||
|
|
||||||
/* disable and flush cache */
|
/* disable and flush cache */
|
||||||
|
|
||||||
disable_cache();
|
disable_cache();
|
||||||
|
|
||||||
|
/* initialize bootinfo structure */
|
||||||
|
|
||||||
|
bootinfo_init(info->command_line,
|
||||||
|
(char*)ramdisk_start, info->ramdisk_size);
|
||||||
|
|
||||||
|
|
||||||
/* add KERNEL_ALIGN if we have to align */
|
/* add KERNEL_ALIGN if we have to align */
|
||||||
|
|
||||||
aligned_size = boot_info.memory[0].addr & (KERNEL_ALIGN - 1);
|
aligned_size = boot_info.memory[0].addr & (KERNEL_ALIGN - 1);
|
||||||
@@ -315,6 +322,10 @@ int start(emile_l2_header_t* info)
|
|||||||
boot_info.memory[0].size = aligned_size;
|
boot_info.memory[0].size = aligned_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set bootinfo at end of kernel image */
|
||||||
|
|
||||||
|
set_kernel_bootinfo(kernel + info->kernel_size);
|
||||||
|
|
||||||
start_mem = boot_info.memory[0].addr + PAGE_SIZE;
|
start_mem = boot_info.memory[0].addr + PAGE_SIZE;
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
Reference in New Issue
Block a user