tiny68k: clean up and add cache hooks
authorAlan Cox <alan@linux.intel.com>
Mon, 4 Feb 2019 18:54:59 +0000 (18:54 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 4 Feb 2019 18:54:59 +0000 (18:54 +0000)
Nobody has put a 68020 in one but it's a handy emulator test!

Kernel/platform-tiny68k/main.c

index aeb51d0..fe7efeb 100644 (file)
@@ -47,14 +47,14 @@ void pagemap_init(void)
        /* TODO: create a discard area at the end of the image and start
           there */
        extern uint8_t _end;
+       uint32_t e = (uint32_t)&_end;
+       /* Allocate the rest of memory to the userspace */
+       kmemaddblk((void *)e, 0xFF8000 - e);
 
        sysinfo.cpu[0] = cpu_type();
        kprintf("Motorola 680%s%d processor detected.\n",
                sysinfo.cpu[0]?"":"0",sysinfo.cpu[0]);
-
-       uint32_t e = (uint32_t)&_end;
-       /* Allocate the rest of memory to the userspace */
-       kmemaddblk((void *)e, 0xFF8000 - e);
+       enable_icache();
 }
 
 /* Udata and kernel stacks */