The SIBO-Linux Project
This project attempts to port the Linux Kernel to Psion's SIBO (SIxteen Bit Organiser) architecture. Several problems hinder this effort, notably, the scacity of memory on the platform, the segmented architecture of the Intel processor (real mode, an NEC V30H), and the speed of the platforms. Nevertheless, this kind of problem has not stopped us from attempting the blatantly ridiculous in the past. This page also houses Matt's notes on the SIBO Architecture.
Table Of Contents
1 Change Log18/7/99 Started updating page, replaced PENGUIN/EDISASM, added notes on memory layout, etc.
2 IntroductionPsion's SIBO family of computers includes the Series 3, HC and Workabout range of palmtops.
The SIBO architecture is based on an NEC V30H processor, one or two megabytes of RAM, and some custom chips. The custom chips perform bus control, providing memory write and I/O blocking, timers, LCD control, memory decoding, interrupts control, wathdog timer, serial control, keyboard interface, buzzer control.
A SIBO system typically runs the EPOC-16 (Electronic Piece Of Cheese, allegedly) operating system, which is contained in ROM, along with several invaluable applications.
Psion's marketing department have pulled a cunning stunt, and renamed EPOC-16 SIBO, while EPOC-32 is now called EPOC.
This project is an attempt to port the Linux operating system to this platform, taking over the system completely - SIBO and the applications will not be available on a SIBO-Linux system.
This might sound impossible; perhaps it is, however, Simon Wood has managed to
port ELKS - the Embeddable Linux Kernel Subset - to this architecture...
It has been suggested by several members of the Linux-8086 mailing list that the Psion is far better kept as it is, running SIBO. This is probably true, but we're hackers, dammit :-)
See references for Simon Wood's port of ELKS to SIBO.
3.3 Lack of MMULinux proper requires a MMU to isolate processes from each other - there is a form of MMU in the SIBO architecture, although it might not be necessary to use it. The Linux Microcontroller Project (need ref) has ported Linux to the PalmPilot, and removed the need for an MMU. Hopefully, this work can be used in this port, in some form.
3.4 Support for the different SIBO systemsThere are different custom chips in the different models - and SIBO insulates the programmer against these differences. We'll be exposed to it.
3.5 Development toolsTraditionally, SIBO software is developed using Psion's SIBO C SDK. This comprises Psion's headers and libraries, and builds are performed using the TopSpeed C Compiler.
Linux is built using the GNU C Compiler, gcc.
It would be far too much work to convert Linux to use TopSpeed, so we need a version of gcc which will target the 8086 (V30H). DJ Delorie has made some modifications to gcc 220.127.116.11 which provide this back end. His modifications are not complete, and so one of our goals is to finish them.
Note: There is also another project which I am involved in, the Psion-C project, aiming to provide a free development environment for the EPOC platform. This has been built using bcc, the compiler used by the Linux-8086 team. Several tools used in that project will be added to the gcc we produce, to produce an SIBO gcc.
3.6 Debugging tools: No emulatorSIBO programmers build their software on PCs, and test them on a PC-hosted version of SIBO: the Series 3a, Siena and Workabout emulators. Since our code will hit the hardware directly, it won't be possible to boot Linux on the emulator. It may be possible to write suitably small drivers for the PC hardware, and slot them in, so build a PC (real mode) hosted version of the Linux kernel.
It might be possible to write a SIBO emulator, which would run on Linux, DOS,
etc. This is covered in a separate section.
This kind of low-level access to the hardware is to be investigated. See Inside SIBO.
Simon's ELKS port loads itself as a standard SIBO executable, which takes over. (Need to investigate this)
It may be possible to load the kernel image into normal EPOC memory,
then turn off SIBO, relocate, and run, rather than hitting the hardware
to do the serial port stuff.
You can download the source and binary of Penguin here - there's no version number attached to this yet, it's very alpha. There is no documentation, but the source code might give you some clues. Sorry about this, I haven't had time to do much work on it recently. Also in that archive, you'll find EDisAsm, an attempt at a disassembler/investigative tool for SIBO. Again, it's unfinished, but it's a start. It'll allow you to dump bytes or words of memory, and to view the Interrupt Vector Table. It'll eventually have a V30 disassembler, but that's some way off. It also allows you to transfer sections of memory (ROM / RAM dumps) to your PC for investigation on a large screen ;-)
Penguin has two functions:
4.1 EDisAsm the Memory DumperCurrently, EDisAsm allows you to take a snapshot of your Psion's memory, from address 0x00000 to 0xFFFFF. This will be invaluable for working out what is happening Inside SIBO, and for running the SIBO Emulator.
However, the Psion's memory is bank-switched, like this:
See I/O Ports for details of the ports PSEL0..3, and how to alter them.
EDisAsm requires your Link connection to be active, and will send several files to the current directory on your PC:
RAM-bank switching: This presents a bit of a problem. I use a routine to peek inside the Psion's memory without upsetting the MMU (I disable interrupts while reading). What if I want to read from (say) bank 1 of memory (byte 0x60010, for example) and EDisAsm is loaded into a bank that is currently switched into that bank? When the PSEL0 register is flipped to load bank 1, EDisAsm will disappear!
One solution is to relocate EDisAsm's peek routine in the bottom 384KB of memory. It's only tiny, so we could possibly overwite some of the unused part of the interrupt vector table without causing any problems.
The 'solution' I settled on ('cos I'm lazy!) is to warn you if the EDisAsm code or data is located in the dangerous segment, and forbid the operation. If it's loaded into a safe location (i.e. non bank-switched memory), then allow the dump).
4.2 Penguin the Kernel LoaderThere's no kernel yet, so Penguin can't load one.
5 EDisAsmA misnomer; doesn't yet contain a disassembler, but allows me to fool around with the Psion's memory architecture, and dump ROM/RAM to disk... Look in the source for details, or type 'help'.
EDisAsm is included in the PENGUIN archive.
I'm looking at hacking into some existing 8086-emulators, and adding support for
the SIBO hardware. Nothing available to play with yet...
Disassembling the ROM will be tricky, although there are tools to help with
this, and I've got (somewhere) an 8086 disassembler in Perl, which should be
customisable to do whatever we need. There's also EDisAsm.
THIS IS CURRENTLY UNAVAILABLE - My mail server is not fully reconfigured after an upgrade. (Jan 2000) Since I've stopped working on SIBO code, I won't be reactivating this.
You can subscribe: send a message to majordomo [ at ] gumbley [ dot ] demon [ dot ] co [ dot ] uk, with no subject, and the body containing the phrase
subscribe sibo-linuxand nothing else. Please note that this mailing list runs from a dial-up server, so turn-around will be fairly slow.
9 ReferencesSeveral references to similar projects, etc. (Thanks, Mattias!)