Found dos.library!

Well, the kernel consists of many more modules now, one of them beeing dos.library. It gots bored right after start, unfortunately, saying:

No bootable disk was found.
Please insert a bootable disk in any drive.
Retrying in 5 seconds…

Now, I only need some filesystem and keyboard/mouse drivers to let 64-bit AROS really boot 🙂
PS. The current list of modules of 64-bit AROS:

[exec] Resident modules (addr: pri version name):
[exec] + 0x000002012000:  127   1 “kernel.resource”
[exec] + 0x000002012c80:  126  41 “exec.library”
[exec] + 0x000002014de0:  110  41 “expansion.library”
[exec] + 0x00000205d2a0:  104   1 “partition.library”
[exec] + 0x000002014b40:  103  41 “utility.library”
[exec] + 0x0000020a6500:  102  41 “aros.library”
[exec] + 0x000002018ea0:  101  40 “mathieeesingbas.library”
[exec] + 0x0000020581e0:  100  41 “bootloader.resource”
[exec] + 0x0000020151c0:   94  41 “oop.library”
[exec] + 0x000002015420:   92   1 “hiddclass.hidd”
[exec] + 0x000002015640:   90   1 “irq.hidd”
[exec] + 0x000002060c00:   90   1 “pci.hidd”
[exec] + 0x00000204c4c0:   89   1 “pcipc.hidd”
[exec] + 0x000002087500:   65  41 “graphics.library”
[exec] + 0x0000020a5820:   60  41 “layers.library”
[exec] + 0x00000204d740:   50  41 “timer.device”
[exec] + 0x00000204b2e0:   45  41 “battclock.resource”
[exec] + 0x00000209c080:   45  41 “misc.resource”
[exec] + 0x0000020180a0:   44  41 “keyboard.device”
[exec] + 0x00000209edc0:   44  41 “gameport.device”
[exec] + 0x0000020acf40:   40  41 “keymap.library”
[exec] + 0x00000209d980:   30  41 “input.device”
[exec] + 0x0000020481c0:   10  50 “intuition.library”
[exec] + 0x0000020572e0:    9   1 “vgah.hidd”
[exec] + 0x0000020ab540:    4  41 “ata.device”
[exec] + 0x000002097f00:    0  41 “arosc.library”
[exec] + 0x000002059a80:  -50  41 “Boot Strap”
[exec] + 0x0000020c0800: -120  41 “dos.library”
[exec] + 0x0000020c19c0: -125  41 “LDDemon”

Nice, isn’t it?

Hey! Where is my dos.library??

I have been fighting with 64-bit world and our build system again 🙂 Cannot tell which of them is better or worse in terms of debugging and hunting for undefined behavior 😉

I have provided you another log (well, call this debug output a screenshot if you like). What you may see here is a list of modules present in kernel (remember, some of them have been loaded separately, by GRUB) and a very early startup process of whole AROS. The new and interesting things are timer.device, irq.hidd and ata.device.

The timer.device is a straight recompilation of x86 version. It still does not use the local APIC driven by at least 66MHz source, but uses an ancient 1193180Hz timer. It will change very soon since the new APIC timer has been proven to work properly on AROS. I need some spare time to implement it in timer.device now. There were two more “cosmetic” changes – the timer.device checks the SysBase->Elapsed field and reports forced reschedule if needed. Additionally, timer.device uses kernel resource to add/remove it’s interrupt handlers.

The irq.hidd is a simple wrapper for kernel.resource. Used to add and remove IRQ handlers. Nothing less and nothing more. Boring, huh?

The ata.device compiled with some minor issues. First of all, the MakeDosNode function of expansion.library has been changed. The input packet is an array of IPTSs now (it was array of ULONGs previously, which are not suitable for 64-bit system). The other change was the way ata’s internal tasks were initialized. I have sent them some parameters through the stack, which is not valid on x86_64 system anymore. Therefore, I have had to change the AddTask calls to the NewAddTask variants, with parameters passed through a TagList. You may see the result on screenshot – two internal tasks of ata.device are added and started. They do something and then wait for input…

Yes, you’re right. 64-bit AROS multitask already 🙂

PS. You may ask about this nasty GURU down the screen. Well, it puzzled me a bit until I’ve found it. It’s a BootStrap which cries loud that it could not open the dos.library 🙂 So, where’s my dos.library, dude???

AROS64 – report

Hello there!

It has been a very very long time since I wrote anything last time. I Hope you still visit this site 🙂

Since I was very busy with my work at Uni, I have abandoned idea of writing new kernel by myself, only. Sure it would be nice to do something like that alone, but I’m afraid I would end up with a half-ready kernel, a patchwork which would be big enough to let exec.library work. Nothing less, nothing more.

The plans have changed. I will make a quicker amd64 port – a slightly modified x86 version for amd64 cpu. The old concept reborn. The huge disadvantage is (yes, you will be disappointed now) that the new kernel will offer almost nothing more than the x86 one. That means – all applications will still run in one huge address space common to all processes. It’s still the fastest possible approach on x86_64 architecture – some 2 MiB pages covering the very first 4 GiB address space – all of them in translation look-aside buffer (TLB) of the CPU. The SysBase pointer is still at absolute address 4, but it’s use is deprecated. One should access the CPU-local SysBase variable at address %GS:8.

What are the advantages, will you ask? Well, have a look at the screenshot. The core libraries are already there. The scheduler should work, at least in theory :). Many libraries and modules may be already compiled thanks to the enormous effort of Henning Kiel, who fights with badly written sources and let them compile. Once irq.hidd and timer.device are done, I should have AROS working on amd64. Neato, huh? Apart from that, I have avoided assembler code as much as possible. Even interrupt and exception handlers are pure C called by very small context-saving asm stub.

As soon as the x86_64 port of AROS will be ready (and bounty will be satisfied), I will start project aiming at creation of new kernel for our OS. I promise.

Stay tuned. Some interesting news are coming….