AROS on Efika status update
I haven't been posting here for a very long time - sorry about that. I hope you still remember me :) The AROS port to Efika progresses nicely. There were some issues with handling of the MMU unit but now they are luckily ironed out.
The kernel.resource which happens to be the core of AROS, has been extended compared to the version which sam440 port uses, and even more extended compared to the x86_64 version. It uses MMU a bit more - protect all regions of memory which shouldn't be accessed, provides supervisor address space starting at 0xff000000 and provides access to a "virtual" SysBase, i.e. reading a 32-bit value (and only 32-bit one!) from address 0x00000004 will give you the pointer to the ExecBase structure.
Kernel resource exposes four new functions to the user space. KrnMapGlobal maps the physical address range of specified size into virtual one, using desired protection and caching settings. KrnUnmapGlobal removes the mapping created above. KrnCreateContext creates a cpu context stored in the area accessible by supervisor only. KrnDeleteContext removes the cpu context and eventually unbinds it from the FPU (kernel.resource in efika will use lazy FPU context switching).
There is also a new system call - SC_REBOOT. It performs a soft reboot of AROS on efika. Don't be afraid about non-intentional syscall which could reboot your efika, it may be done only in kernel.resource and exec.library. A system call which would occur from any other address range would cause no action.
Apart from the low-level stuff I tried to boot AROS with a bit more modules. The result looks like this:
Welcome to SmartFirmware(tm) for bplan EFIKA5K2
Version 1.3 (20070122084838)
SmartFirmware(tm) Copyright 1996-2001 by CodeGen, Inc.
All Rights Reserved.
Pegasos BIOS Extensions Copyright 2001-2007 by bplan GmbH.
All Rights Reserved.
ok boot
Second Level Bootloader for OpenFirmware
Build 242 from Sep 13 2008
Available memory 128MB
Available boot configurations:
1. AROS for Efika 5200
2. AROS for Efika Test 2
Boot? (4.8)>
Loading "AROS for Efika 5200"
boot/aros-efika
boot/modules/expansion.library
boot/modules/utility.library
boot/modules/partition.library
boot/modules/battclock.resource
boot/modules/aros.library
boot/modules/bootloader.resource
boot/modules/mathieeesingbas.library
boot/modules/oop.library
boot/modules/hiddclass.hidd
boot/modules/misc.resource
boot/modules/graphics.hidd
boot/modules/gfx.library
boot/modules/keymap.library
boot/modules/intuition.library
boot/modules/layers.library
boot/modules/input.device
boot/modules/timer.device
boot/modules/gameport.device
boot/modules/keyboard.device
boot/modules/pci.hidd
[KRN] EFika5200B Kernel build on Oct 1 2008
[KRN] BootMsg @ 0x19111e4
[KRN] Copying TagList and data
[KRN] CmdLine: 'command_line_option_1 command line "line option"'
[KRN] Initializing exception handlers
[KRN] Initializing MMU
[KRN] Location of MMU tables: 07000000-070fffff
[KRN] SDR1 = 0700000f
[KRN] Flushing TLB
[KRN] MBAR at f0000000
[KRN] HID0=0000c000 HID1=40000000
[KRN] Entering ictl_init.
[KRN] Stopping all interrupt activities
[KRN] Mapping 00003000-06ffffff range for public use
[KRN] Mapping f0000000-f002fffc range for MBAR
[KRN] Mapping ff100000-ff123fff range for public read-only access
[KRN] Mapping ff124000-ff7f4fff range for supervisor
[KRN] Mapping ff7f5000-ff7fffff range for read-write
[KRN] Mapping ff800000-ff8b6fff range for read-only
[KRN] Mapping ff8b7000-ffffffff range for supervisor
[KRN] Supervisor mem: 6979KB free
[exec] AROS for Efika5200B - The AROS Research OS
[exec] Preparing the ExecBase...
[exec] ExecBase at 00003280
[exec] Clearing ExecBase
[exec] Initializing library...
[exec] Adding memory
[exec] Done. SysBase->ThisTask = 0x004180
[exec] Resident modules (addr: pri version name):
[exec] + 0xff80fd50: 127 2 "kernel.resource"
[exec] + 0xff811070: 126 41 "exec.library"
[exec] + 0xff8142ec: 110 41 "expansion.library"
[exec] + 0xff81b658: 104 1 "partition.library"
[exec] + 0xff816828: 103 41 "utility.library"
[exec] + 0xff81c92c: 102 41 "aros.library"
[exec] + 0xff81f9c0: 101 40 "mathieeesingbas.library"
[exec] + 0xff81d820: 100 41 "bootloader.resource"
[exec] + 0xff823d5c: 94 41 "oop.library"
[exec] + 0xff824fe4: 92 1 "hiddclass.hidd"
[exec] + 0xff8b56a4: 90 1 "pci.hidd"
[exec] + 0xff866a60: 65 41 "graphics.library"
[exec] + 0xff8aaa38: 60 41 "layers.library"
[exec] + 0xff8aded0: 50 41 "timer.device"
[exec] + 0xff81bdf0: 45 41 "battclock.resource"
[exec] + 0xff82582c: 45 41 "misc.resource"
[exec] + 0xff8af5b0: 44 41 "gameport.device"
[exec] + 0xff8b0d2c: 44 41 "keyboard.device"
[exec] + 0xff86b158: 40 41 "keymap.library"
[exec] + 0xff8acc8c: 30 41 "input.device"
[exec] + 0xff8a0afc: 10 50 "intuition.library"
[exec] + 0xff869d30: 8 41 "cybergraphics.library"
[exec] + 0xff83c4d8: 0 1 "graphics.hidd"
[exec] InitCode(RTF_SINGLETASK)
enter InitCode(0x2, 0)
calling InitResident("kernel.resource", NULL)
[KRN] Kernel resource post-exec init.
[KRN] Interrupts enabled
[KRN] Entered user mode
calling InitResident("expansion.library", NULL)
leave InitCode(0x2, 0)
[exec] InitCode(RTF_COLDSTART)
enter InitCode(0x1, 0)
calling InitResident("partition.library", NULL)
calling InitResident("utility.library", NULL)
calling InitResident("aros.library", NULL)
calling InitResident("mathieeesingbas.library", NULL)
calling InitResident("bootloader.resource", NULL)
[BootLdr] Init. msg=0xff7ffc30
[BootLdr] KRN_CmdLine=0xff123ad0
[BootLdr] CmdLine="command_line_option_1 command line "line option""
[BootLdr] Init: Argument command_line_option_1
[BootLdr] Init: Argument command
[BootLdr] Init: Argument line
[BootLdr] Init: Argument "line
[BootLdr] Init: Argument option"
calling InitResident("oop.library", NULL)
calling InitResident("hiddclass.hidd", NULL)
calling InitResident("pci.hidd", NULL)
[PCI] Initializing PCI system
[PCIDriver] Dummy Driver initialization
[PCI] base class initialization
[PCI] Everything OK
calling InitResident("graphics.library", NULL)
calling InitResident("layers.library", NULL)
calling InitResident("timer.device", NULL)
calling InitResident("battclock.resource", NULL)
calling InitResident("misc.resource", NULL)
calling InitResident("gameport.device", NULL)
calling InitResident("keyboard.device", NULL)
calling InitResident("keymap.library", NULL)
calling InitResident("input.device", NULL)
calling InitResident("intuition.library", NULL)
calling InitResident("cybergraphics.library", NULL)
calling InitResident("graphics.hidd", NULL)
leave InitCode(0x1, 0)
[exec] I should never get here...
[KRN] Uhm? Nothing to do?
[KRN] STOPPED
Next module beeing working on is timer.device. Unfortunately, it will have worse resolution than the timer in sam440 - circa 7µs.
Labels: PPC
5 Comments:
Nice to see the progress. And those new kernel functions look very interesting for Mac Emus. Even BasiliskII could take advantage of this using real addressing and getting some speed up compared to BasiliskII running on OS4 or MorphOS :-)
And of course, it would open the door to SheepShaver too. It would probably be more complex to port but now it will be possible :-)
BTW do you plan to add some sweet features like swap memory? It would be useful for platforms that lack a decent amount of ram. I admit that nowadays ram is dirty cheap and that it wouldn't be a problem for modern PPC and x86 machines but on small Efika it may be handy.
Another useful feature would be perhaps using half gfx card ram as normal ram.
Anyway go on with timer.device :-)
Michal, you are doing a great job. I am a PPC supporter and a developer. I like to read your comments about the development.
Keep up the great work ! And have fun !
Hey Michal! Thanks for posting the update on the topic!
I can't wait to see a fresh breath of life on my Efika.
Keep up the good work! Hope to see more frequent updates in the future.
All the best
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
Post a Comment
<< Home