February 7, 2011

I'm moving

Hello folks!

The last post on this blog is almost one year ago, that feels like eons! Well, as the time passed I lost motivation to post here.

Now I'm going to quit posting here entirely. After a backup of this site I will remove it from blogspot. But no worry, I will not quit blogging at all. Instead, I'm moving to my new site:

and I hope to keep this one more up to date :)

March 14, 2010

Update, again

Hello folks,
Today a short report only. Markus Weiss was working intensively on getting OWB to compile and work on PPC targets. Of course, he succeeded! Thank you, Markus.
In my last post I've told you about some issues with setjmp/longjmp. The unaligned FPU double access, which crossed 16-byte boundary generates an alignment exception on PowerPC machines. My first fix was rather stupid one - alignment enforcement in setjmp and longjmp calls. Now, I wrote a special exception handler which takes care of misaligned data. It helped Markus a bit and make OWB work on Sam440EP.
Thanks to Markus work and his great fixes to the code, DHCP client does not enter an endless loop on Sam440 anymore. Now, setting network up on Samantha is a matter of few mouse clicks.
Stay tuned for more news. New ISO is on the way (I may tell you that its size increased again. Now it has 475 MB approximately).
PS. This blog entry was written on AROS running on Sam440EP in OWB browser :)

March 9, 2010

Any news?

Hello there.

Yup, typical me :) I made some fuzz about things being currently done (or not done) and then disappeared for a while. No information, no updates. Nothing :)I've been asked several times about the status update of AROS for sam440. Well, there are few changes which have happened to the whole AROS recently. We do have a changeable mouse pointers and they do work on Sam440. Since there are few of them delivered on the ISO, you may change the red triangle to something more Amiga-like, if you want to. A red mouse pointer with alpha blending and shadow? No problem. Start preferences, select the correct image and voilà!

Markus Weiss managed to compile OWB for PPC target and, if it works as expected, you will find it on the next ISO. Neil Cafferkey made some important improvements to the installer. Now, it installation on sam440 shall be simpler. Keep in mind the installation will be incomplete, since the AROS' slb (aka Parthenope) is not installed yet.

The changes local to Sam440 port include support for the onboard I²C bus. The RTC is used by the battclock.resource, so now you will see the correct time on AROS, provided your RTC is correctly set up. If not, you may use AROS' time preferences to adjust it. Additionally, few fixes for the setjmp/longjmp are made, so that the functions do not crash in case of unaligned jmp_buf pointer. Anything else? Ah yes, I'm working on the EHCI Poseidon driver for Sam440 AROS. Stay tuned :)

Screenshot? Here you have it. Nothing special in it. Just AROS on Sam440 in a bit higher resolution :)
Greetings from the German Aerospace Center :)

January 31, 2010

Oh, Samantha!

Hi there!

Samantha is back! After long period of hibernation in the AROS repository Sam440 port of AROS is maintained again. Big thanks to Markus Weiss, who has restarted it and to ACube who gave me the kick in the butt :)

Since the kernel.resource in AROS did evolved a bit since last time I was writing it form Sam, it has been updated a tiny bit now. Most of the features from Efika's kernel have been back-ported to Sam440 port, including:

  • Loading and releasing of symbols from every ELF file loaded by AROS, including the kernel itself,
  • System call for cold reboot (accessible only from kernel.resource and exec.library),
  • Crash handler displays detailed information, including the byte offset of crash occurrence, relevant symbol name (if such name exists at all) and the executable name. The log includes also the backtrace (with offsets, symbol and module names) which tries to reach as far as possible.

Yes, I do know, it's not much. But it is at least a good start (eerm.... rather a good re-birth?) :).

The Sam440 port has been not only extended, but also fixed a bit. I have found there an ancient bug in the exception handler. It could have lead to random system crashes. The reason was the exception handler itself. There was a risk that an interrupt will occur during reconstruction of the CPU context.

Since the AMCC440EP CPU does not maintain cache coherency (no, it's not a bug, it's a feature fairly well documented in the manuals!), some portions of the code had to be fixed. Now, more AROS code uses CachePreDMA and CachePostDMA pair of functions. Because of that partitions on harddrive are recognised properly now. AROS on Sam440 boots nicely and coexists with OS4.1 on the same harddrive. Nice, isn't it?

Now, the last but not least, after some sleepless nights the OHCI driver of Poseidon is fixed and operates properly on Sam440ep. Wanna proof? Watch the attached screenshot :)

Stay tuned for more news. I promise to write a bit more now ;)

March 8, 2009

New (small) build


After a long break I present you herewith a new test iso for Efika. It's much much smaller than all previous images, because I have not included the "contrib" build. The reason was instability of some third party MUI classes which either crashed the Zune preferences or did not allowed the prefs program to start.

The most important changes worth mentioning are USB fix, sync with current source tree and extended debug. The first fix repairs an anciend bug in OHCI driver, where the USB ports were powered up upon driver's initialization. It lead to some "zombie" devices on the bus. The Efika source tree has been synced with the SVN repository too, therefore Efika build got all recent changes and updates from the main tree. The most important and Efika specific is extended debug. Until now, if anything on native aros crashed, I have had no clear information about the code that failed. Just some address in memory. Debugging under such conditions was so ineffective, that I've finally decided to improve the crash log a bit.

Now, every single module in the system registers itself at the kernel.resource with name and headers of ELF file. Kernel resource scans the file and remembers all symbols referring executable sections. The same is done with Kernel during the bootup too. Now, if a crash occurs, I become much more verbose information, which eventually helps :) The information includes the location of crash (which byte offset, which function, which module) and the call backtrace up to the birth of the task/process. Have a look at NList crash:

[KRN] Exception 3 (DSI) handler. Context @ 0xff7fb948, SysBase @ 0x32c0, KernelBase @ 0x4bac
[KRN] Process 0xcae00 (Zune)
[KRN] Crash at byte 8 in func strcmp, module muimaster.library
[KRN] SRR0=00ed4428, SRR1=0000f030
[KRN] CTR=ff8066e4 LR=00e94270 XER=00000000 CCR=28004044
[KRN] DAR=00000013 DSISR=40000000
[KRN] HASH1=07000000 HASH2=070fffc0 IMISS=00ed4420 DMISS=00000013
ICMP=80000003 DCMP=80000000
[KRN] SPRG0=ff7fbaf0 SPRG1=00da9598 SPRG2=28004044 SPRG3=00000000
SPRG4=00004bac SPRG5=000032c0
[KRN] GPR00=00e80980 GPR01=002c9950 GPR02=00000000 GPR03=00da9598
[KRN] GPR04=00000013 GPR05=00da50c0 GPR06=002c99b8 GPR07=00da9598
[KRN] GPR08=012ecc00 GPR09=0000004e GPR10=00000120 GPR11=00da50c0
[KRN] GPR12=48004022 GPR13=00000000 GPR14=00000000 GPR15=000d0000
[KRN] GPR16=00f5fed0 GPR17=00000001 GPR18=00f60000 GPR19=011cf4bc
[KRN] GPR20=00000002 GPR21=00000000 GPR22=00000000 GPR23=00f60000
[KRN] GPR24=00db0000 GPR25=00da5120 GPR26=00000000 GPR27=8042ac64
[KRN] GPR28=00da50c0 GPR29=00f19cd0 GPR30=00000013 GPR31=00d87620
[KRN] Hash1 dump:
[KRN] 80000010.04000012 800007a0.f800f03a 80000400.8000803a
[KRN] 80000420.8800803a 00000000.00000000 00000000.00000000
[KRN] Hash2 dump:
[KRN] 8000000f.03fff012 800007bf.07ff0010 8000040f.83ff703a
[KRN] 00000000.00000000 00000000.00000000 00000000.00000000
[KRN] Instruction dump:
[KRN] 00ed4428: 88040000
[KRN] 00ed442c: 7c604851
[KRN] 00ed4430: 4c820020
[KRN] 00ed4434: 2f890000
[KRN] 00ed4438: 4d9e0020
[KRN] 00ed443c: 39000000
[KRN] 00ed4440: 7d674214
[KRN] 00ed4444: 7d444214
[KRN] Backtrace:
[KRN] 00e80980: byte 40 in func MUIMaster_MUI_GetClass, module
[KRN] 00e82070: byte 56 in func MUIMaster_MUI_NewObjectA, module
[KRN] 011049d0: byte 176 in func MUI_NewObject, module NList.mcc
[KRN] 010d9a50: byte 632 in func mNL_New, module NList.mcc
[KRN] 010db7e0: byte 880 in func _Dispatcher, module NList.mcc
[KRN] 00e941cc: byte 28 in func metaDispatcher, module muimaster.library
[KRN] 010d35c0: byte 48 in func DoSuperMethodA, module Mailtext.mcc
[KRN] 010d291c: byte 80 in func Mailtext__OM_NEW, module Mailtext.mcc
[KRN] 010ceac0: byte 204 in func Mailtext_Dispatcher, module Mailtext.mcc
[KRN] 00e941cc: byte 28 in func metaDispatcher, module muimaster.library
[KRN] ff8af35c: byte 40 in func CoerceMethodA, module intuition.library
[KRN] ff8842dc: byte 164 in func Intuition_NewObjectA, module intuition.library
[KRN] 00e82098: byte 96 in func MUIMaster_MUI_NewObjectA, module
[KRN] 0110b27c: byte 176 in func MUI_NewObject, module Mailtext.mcp
[KRN] 01108088: byte 952 in func MailtextP__OM_NEW, module Mailtext.mcp
[KRN] 01105b68: byte 180 in func MailtextP_Dispatcher, module Mailtext.mcp
[KRN] 00e941cc: byte 28 in func metaDispatcher, module muimaster.library
[KRN] ff8af35c: byte 40 in func CoerceMethodA, module intuition.library
[KRN] ff8842dc: byte 164 in func Intuition_NewObjectA, module
[KRN] 00e01110: byte 2476 in func init_gui, module Zune
[KRN] 00e016f8: byte 276 in func main, module Zune
[KRN] 00dffcb4: byte 452 in module Zune
[KRN] ff8c2a38: byte 36 in func DosEntry, module dos.library
[KRN] ff8c5274: byte 13092 in module dos.library
[KRN] **UNHANDLED EXCEPTION** stopping here...

The next release will get rid of the "stopping here..." message. Instead of halting whole aros, the failing task will be moved away, a popup message will appear, and AROS will continute to work. Stay tuned...

February 10, 2009

One tiny fix...

... and suddenly everything goes better :-)

as you may remember, I have released a test pre-alpha iso with AROS for Efika recently. However, there were some issues with using it. Some people tried to boot it from DVD-USB devices, some tried USB Flash Keys. The former succeeded mostly (but not always) whereas the latter failed pathetically. I was scratching my head and found no sane solution. Once, being completely desperate, I have enabled full debug of OHCI driver, in order to see every single transfer description used by all USB devices in the system. There was it! In some cases, OHCI chip was instructed to read 512 bytes starting from physical address 0xffffffff. That cannot be and it couldn't work. At that point the reason of OHCI hanging was known. But why was it like this???

Well, the answer surprised me a bit. The issue was the sign extension during APTR to uint64_t cast. At some moment, AROS wanted to read from all bootable devices the first sector into it's local table in .bss section. Since that piece of code belongs to kernel, the virtual address of this portion of memory was somewhere around 0xff7f0000. Sign extended address, 0xffffffffff7f0000 was of course not found in the MMU hash table and the KrnVirtualToPhysical() call failed. Sign expansion fixed, et voilà! All the issues with mass storage are gone.

For those who do not own an Efika, a tiny screenshot:

here, you can see the PCI Tool (doesn't show much because the most of Efika devices are on MPC5200B SoC), the screenshot tool itself, About AROS window with the mysterious "chrp-ppc Build efika", and shell. I wanted to show you there, where the SYS: assign is pointing to. The volume labeled AROS: is a boot device named UH0. This is the USB flash key. The USB1: device is my DVD drive connected throughout USB bus.

The torrent file is here, if anyone of you is willing to test it. Keep in mind I have toyed with scheduler there. If it does not work smooth for you, let me know. If it works well, let me know too. If the iso fails on your machine, do not hesitate writing me about (in such case try to provide the debug log, if you can).

PS. If the boot starts before the USB key is enumerated, it will not be bootable for AROS. It sucks, but that's the way AROS boots (some people are considering few changes there). In such case, you may add a command line option, eg. bootdelay=5 will introduce additional delay of 5 seconds right before booting. The iso has a bootdelay of 3 seconds by default, because all my USB devices attached to efika (keyboard, mouse, flash key and DVD) are sitting on a hub.

Labels: , ,

January 30, 2009

New efika iso

The last ISO you got was a bit annoying. There were almost forty modules to load by OF. It took long. Moreover, putting these files on FAT-formatted USB stick failed, since OF was unable to find some of the files.

I made few changes to the bootstrap code and AROS itself. AROS sets up interrupts in proper way. It should not lock anymore, as it happened before. The USB mass storage has been fixed a bit and should work a bit better now. Regarding the bootstrap code, following changes have been made:
  • os_image does not need the boot-device setting anymore. Boot it from any place and it will work as expected.
  • os_image honors the command line argument passed from OF. Now, if both menu.lst and OF command line contain parameters for kernel, they will be joined together.
  • os_image supports packages. No need to load 40 boot files through OF anymore. There will be few packages: generic-ppc, efika, usb and few other files to load. It means faster boot time and less risk of OF issues ;)
  • os_image does not support timeout option anymore. If there are more kernel configurations, it will stop and wait for an input.
Although timeout is gone, os_image on this cd will boot aros without waiting. I have removed the second boot option, which was not used anymore. How to boot? Put the CD into drive and type:

boot cd os_image

whereas "cd" corresponds to the boot device you use. You may find this iso here.