April 21, 2008

Small status update

Hello there.

If you were wondering where the hell am I, here's the answer. My son, Oliver, was in a hospital recently. Twice within a month, once with nephritis, once with pneumonia. I have shared all my time between work, taking care of my daughters and visiting Oliver. There was very few time for AROS.

It does not mean that I did nothing, though. First of all I have been trying to make our ata.device work with Sam440's SiL3114 SATA chip. With a significant help of Tomasz Wiszkowski I made it work on Sam! There were few issues which were not ever seen on x86 architecture. I have had to implement cache flushing in exec.library (finally! I should have done it before ;)), I have added some endian swapping code and had to flush data cache after the setup of PRD entries for DMA transfer.

The next step was radeon.hidd. It simply wasn't working as expected. Initialization of any screen mode put my monitor into sleep mode. Not good. I had to add proper timing function to the driver (previously it used busy loops for all kinds of delays), then I have embedded a real BIOS into the sam440 variant of this driver - still no luck with displaying. I have added i2c support to the driver and now it even uses DDC bus and EDID information of the connected monitor. Still no luck. Finally, I have synced the video mode restore in my driver with xorg repository. That helped. It seems that the PLL setting on radeon is awfully fragile.

Having SATA and Radeon chips working, I have decided to give AROS a try. I have burned it on CD and booted on SAM. Ouch. Program exception. It turned out that I have had an outdated version of ELF LoadSeg, which was not flushing any caches. Another try brought me a bit further, but AROS hung on the following lines in startup-sequence:

    List ENV:SYS/Packages NOHEAD FILES TO T:P LFORMAT="If EXISTS $SYS/Packages/%s*NCD $SYS/Packages/%s*NIf EXISTS S/Package-Startup*NExecute S/Package-Startup*NEndif*NEndif*N"
    Execute T:P
    Delete T:P QUIET
    CD SYS:

Out of curiosity, I have deleted the SYS:Prefs/env-archive/SYS/Packages directory and tried once more. Moooo! Success. The wanderer screen showed up as you may see on the screenshot. BTW. Photographing display sucks. :-) I will investigate the issue with startup-sequence a bit later. Right now it's a bit to early for it.

Now I gave the OHCI driver a look. The code assumed to some degree that it works on little endian machines. Moreover, it did assumed, that the processor uses very nice feature called cache snooping, which is the case on x86 family of CPU's. Cache snooping means, that the CPU watches all transactions on the bus, and thus keeps it's all caches up to date. Since it is not the case on sam440, the OHCI code needs to be reorganized a bit - it requires tons of CacheClearE() calls and few CachePreDMA/CachePostDMA pairs. At the moment all caches on Sam440 are working in write-through modus and will stay so until I fix all cache-irrelevant issues in the USB stack. I hope to have the whole stack working within few weeks.

In the mean time, I have helped Kalamatee with ACPI code a bit. Together we have made all CPU's in x86_64 SMP system booting. At the very moment all Application Processors are switched into 64bit mode of operation and then put to sleep.


Blogger Kalamatee said...

Another great achievement! grazt michal!

11:40 AM  
Anonymous Anonymous said...


I feel that I should by a SAM440 just for AROS!

Keep the good work!

1:49 PM  
Anonymous Anonymous said...

Truly a great milestone! Thank you for your great work and all the best for your little son!

4:02 PM  
Blogger Sleepless said...

Take care of your child!

And... thank you for the update! it's impressive how efficient you are :-)

7:38 PM  
Anonymous Anonymous said...

Great work!

I have an old dell laptop with a 32 mb ATI 7500 under the hood. I wounder if your SAM 440 tweaks would make my ATI work? The current x86 ATI driver hangs at the CLI screen.

Any plans to backport the changes you made, back to x86?

Thank you for all your work with AROS! :-)

5:16 PM  
Blogger Michal Schulz said...


Yes, all changes will go back to AROS tree and as such will be available for all systems, including x86.

8:30 PM  
Anonymous Anonymous said...

I've done a lot of SW development over the last 20 years, incl. writing device drivers and entire embedded designs from scratch.

But I've never ported a personal computer OS though. How did it feel when you first saw the Workbench, oops Wanderer come up?

I bet you it must have felt absolutely great? Do you have any computer geek friends that you could share it with locally?

Anyway, to me what you are doing is totally impressive and your screenshot is like the ultimate "Hello World" ;-)

All the Best,

11:38 PM  

Post a Comment

<< Home