9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Porting plan 9 to the Simpad / extending Bitsy
@ 2005-03-23 19:30 Devon H. O'Dell 
  2005-03-23 20:28 ` Sape Mullender
  0 siblings, 1 reply; 13+ messages in thread
From: Devon H. O'Dell  @ 2005-03-23 19:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 2235 bytes --]

Hey List,

I've got a really nifty device, a Siemens SIMpad SL4. It can do
serial, PCMCIA, sound, has an 8.4" screen that does 800x600x16
and reads smart cards too.

I want to put Plan 9 on this thing.

Issues I have:

I'm not familiar with the SA1110 architecture nor the Bitsy
code, and I have a few questions about it.

The SIMpad has an MQ200 video thing. There are a couple of
drivers for it (in Linux and in NetBSD), but I'm not really sure
what they need to replace. My question is: is screen.c the only
part of bitsy that does graphics stuff?

If so, what would be the best way to handle the addition of the
SIMpad code? Since it's based on the same architecture, it seems
silly to make an entirely new directory with half the same files
(if that can even be done).

The SIMpad has a UCB1300 controller for the touchscreen, sound
and keyboard. As far as I know, there is no keyboard that you
can get to put on the SIMpad. Might anybody have a clue where
the code for this would go (and what the opensimpad people are
referring to by keyboard)?

Speaking of keyboards, it should theoretically be possible to
write a driver for a self-powered KB connecting via serial, no?
I have a DB9 serial dongle for this thing, and I would REALLY
like to not have to use the on-screen thing as it's a huge PITA.
If anybody has suggestions on projects that have implemented
this out of a regular PS/2, SUN, old Apple (from a Performa 630)
or AT keyboard, I'd appreciate that as well :).

For the rest, I'm not sure what all I need to port. There's a
good list of the internals of the SIMpad at:

http://www.opensimpad.org/internals.0.html

Which parts will I need to write drivers for that aren't the
UCB1300, MQ200, the smart card reader and the PCMCIA controller?
I don't plan on using the IrDa. Datasheets for any of these
parts are elusive / nonexistent..

Any tips on doing any / all of this would be really appreciated.
To clarify, I don't need details on how the drivers should be
written, per se; I'm interested in learning how I can extend the
Bitsy source (or at least reuse large portions of the code) for
the SIMpad (and if this is even possible).

Thanks,

Devon H. O'Dell

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-23 19:30 [9fans] Porting plan 9 to the Simpad / extending Bitsy Devon H. O'Dell 
@ 2005-03-23 20:28 ` Sape Mullender
  2005-03-23 20:40   ` Devon H. O'Dell 
  0 siblings, 1 reply; 13+ messages in thread
From: Sape Mullender @ 2005-03-23 20:28 UTC (permalink / raw)
  To: 9fans

> I'm not familiar with the SA1110 architecture nor the Bitsy
> code, and I have a few questions about it.

The Bitsy is an SA1100, if I'm not mistaken.  There's not a great
deal of difference between ARM processors.  The bitsy has no
floating point, but there is a floating poiunt emulator in Plan 9.

> The SIMpad has an MQ200 video thing. There are a couple of
> drivers for it (in Linux and in NetBSD), but I'm not really sure
> what they need to replace. My question is: is screen.c the only
> part of bitsy that does graphics stuff?

Yes, screen.c is where we do the graphics on the bitsy.
xgscreen is the data structure representing the physical screen.
You paint a pixel by writing the video memory.

> If so, what would be the best way to handle the addition of the
> SIMpad code? Since it's based on the same architecture, it seems
> silly to make an entirely new directory with half the same files
> (if that can even be done).

You can start in the bitsy directory (renaming it `arm', perhaps).
There's a file called `bitsy' in that directory that describes what makes
a bitsy kernel.  You should copy it into `simpad' and then modify
simpad as necessary, also copying and modifying other source
files.  I'd first keep two versions of all files that are different and,
once everything works, see what can be done to reintegrate things
that are the same.

> The SIMpad has a UCB1300 controller for the touchscreen, sound
> and keyboard. As far as I know, there is no keyboard that you
> can get to put on the SIMpad. Might anybody have a clue where
> the code for this would go (and what the opensimpad people are
> referring to by keyboard)?

You can use the keyboard application on the bitsy to have a touchscreen
keyboard.  /dev/kbdin gives you an interface to move characters
typed from user space back into the kernel.

> Speaking of keyboards, it should theoretically be possible to
> write a driver for a self-powered KB connecting via serial, no?
> I have a DB9 serial dongle for this thing, and I would REALLY
> like to not have to use the on-screen thing as it's a huge PITA.
> If anybody has suggestions on projects that have implemented
> this out of a regular PS/2, SUN, old Apple (from a Performa 630)
> or AT keyboard, I'd appreciate that as well :).

If there's a serial line, that's what you use for a keyboard initially.
You'll also use it for diagnostic output initially.

Good luck.

	Sape



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-23 20:28 ` Sape Mullender
@ 2005-03-23 20:40   ` Devon H. O'Dell 
  2005-03-23 21:11     ` Charles Forsyth
  2005-03-23 22:46     ` Ronald G. Minnich
  0 siblings, 2 replies; 13+ messages in thread
From: Devon H. O'Dell  @ 2005-03-23 20:40 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 3596 bytes --]

On Wed, Mar 23, 2005 at 03:28:58PM -0500, Sape Mullender wrote:
> > I'm not familiar with the SA1110 architecture nor the Bitsy
> > code, and I have a few questions about it.
> 
> The Bitsy is an SA1100, if I'm not mistaken.  There's not a great
> deal of difference between ARM processors.  The bitsy has no
> floating point, but there is a floating poiunt emulator in Plan 9.

Yeah, it's a SA1100. Don't know where I kept getting that extra 1
from. Too much binary perhaps :).

> > The SIMpad has an MQ200 video thing. There are a couple of
> > drivers for it (in Linux and in NetBSD), but I'm not really sure
> > what they need to replace. My question is: is screen.c the only
> > part of bitsy that does graphics stuff?
> 
> Yes, screen.c is where we do the graphics on the bitsy.
> xgscreen is the data structure representing the physical screen.
> You paint a pixel by writing the video memory.

Ok. I'll have to figure out the bare-minimum for implementing
the MQ200 then -- there appears to be a lot more code for this
than the on-chip video that I guess the SA1100 has.

> > If so, what would be the best way to handle the addition of the
> > SIMpad code? Since it's based on the same architecture, it seems
> > silly to make an entirely new directory with half the same files
> > (if that can even be done).
> 
> You can start in the bitsy directory (renaming it `arm', perhaps).
> There's a file called `bitsy' in that directory that describes what makes
> a bitsy kernel.  You should copy it into `simpad' and then modify
> simpad as necessary, also copying and modifying other source
> files.  I'd first keep two versions of all files that are different and,
> once everything works, see what can be done to reintegrate things
> that are the same.

Ok.

> > The SIMpad has a UCB1300 controller for the touchscreen, sound
> > and keyboard. As far as I know, there is no keyboard that you
> > can get to put on the SIMpad. Might anybody have a clue where
> > the code for this would go (and what the opensimpad people are
> > referring to by keyboard)?
> 
> You can use the keyboard application on the bitsy to have a touchscreen
> keyboard.  /dev/kbdin gives you an interface to move characters
> typed from user space back into the kernel.

Right, OK. I'll use this initially. I ask because the
touchscreen keyboard on this is awefully slow (perhaps due to the
large size of the screen) to type on, so I'm looking for other
possibilities as well.

> > Speaking of keyboards, it should theoretically be possible to
> > write a driver for a self-powered KB connecting via serial, no?
> > I have a DB9 serial dongle for this thing, and I would REALLY
> > like to not have to use the on-screen thing as it's a huge PITA.
> > If anybody has suggestions on projects that have implemented
> > this out of a regular PS/2, SUN, old Apple (from a Performa 630)
> > or AT keyboard, I'd appreciate that as well :).
> 
> If there's a serial line, that's what you use for a keyboard initially.
> You'll also use it for diagnostic output initially.

I sense lots of debugging coming up ;-D. I'll see what I can
figure out about the serial line. 

> Good luck.
> 
> 	Sape

Thanks!

As a post-note; I've found that there are a slew of IRDA
keyboards. Does anybody have one of these? Do they simply send
scancodes via the IR transmitter? If so, I guess I could add
support for the IRDA thing and use a keyboard with that.

Too bad the platform is dead. The SIMpad would make a pretty
cool replacement laptop.

--Devon

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-23 20:40   ` Devon H. O'Dell 
@ 2005-03-23 21:11     ` Charles Forsyth
  2005-03-24  8:43       ` Martin C. Atkins
  2005-03-23 22:46     ` Ronald G. Minnich
  1 sibling, 1 reply; 13+ messages in thread
From: Charles Forsyth @ 2005-03-23 21:11 UTC (permalink / raw)
  To: 9fans

the original bitsy might have been SA1100--
i can't remember-- but
9/bitsy despite the name drives
an ipaq (now old) and that was SA1110.
mine is, anyhow.  subsequent ones were Xscale.
i don't know what they use now.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-23 20:40   ` Devon H. O'Dell 
  2005-03-23 21:11     ` Charles Forsyth
@ 2005-03-23 22:46     ` Ronald G. Minnich
  2005-03-24  6:51       ` Devon H. O'Dell 
  1 sibling, 1 reply; 13+ messages in thread
From: Ronald G. Minnich @ 2005-03-23 22:46 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

you're going to have some fun if physical memory is not at 0xc000000 and
up -- i.e. starts at 0 -- so work out your phys memory map before you
start.

ron



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-23 22:46     ` Ronald G. Minnich
@ 2005-03-24  6:51       ` Devon H. O'Dell 
  2005-03-24 15:00         ` Ronald G. Minnich
  0 siblings, 1 reply; 13+ messages in thread
From: Devon H. O'Dell  @ 2005-03-24  6:51 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

On Wed, Mar 23, 2005 at 03:46:05PM -0700, Ronald G. Minnich wrote:
> you're going to have some fun if physical memory is not at 0xc000000 and 
> up -- i.e. starts at 0 -- so work out your phys memory map before you 
> start.
> 
> ron

Thankfully, it appears to do so. From the Linux source:

SET_BANK( 0, 0xc0000000, 64*1024*1024 );

Might that simply be a property of the processor? I don't know 
much about physical / virtual memory mapping.

--Devon

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-23 21:11     ` Charles Forsyth
@ 2005-03-24  8:43       ` Martin C. Atkins
  0 siblings, 0 replies; 13+ messages in thread
From: Martin C. Atkins @ 2005-03-24  8:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi all,

Regarding keyboards, I was also going to suggest an IR keyboard,
as a simple, "zero interfacing" solution.

I don't know about the others, but the Pocketop keyboard just
transmits scancodes as asynchronous 8-bit bytes at 9600 baud, no
parity, so there is no IRDA stack to worry about, and you just need
to be able to open the IR port as a UART. The protocol is pretty
simple, and I can help with an example, should you need it.

Martin

--
Martin C. Atkins			martin_ml@parvat.com
Parvat Infotech Private Limited		http://www.parvat.com{/,/martin}


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-24  6:51       ` Devon H. O'Dell 
@ 2005-03-24 15:00         ` Ronald G. Minnich
  2005-03-24 15:12           ` Devon H. O'Dell 
  2005-03-24 15:16           ` Charles Forsyth
  0 siblings, 2 replies; 13+ messages in thread
From: Ronald G. Minnich @ 2005-03-24 15:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs



On Thu, 24 Mar 2005, Devon H. O'Dell  wrote:

> Thankfully, it appears to do so. From the Linux source:
>
> SET_BANK( 0, 0xc0000000, 64*1024*1024 );
>
> Might that simply be a property of the processor? I don't know
> much about physical / virtual memory mapping.
>

that would be neat if so, it would show high clue level on the part of
sa11xx designers, along with the 'read all zeros' memory.

said clue appears not to have made it to ep93xx.

ron


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-24 15:00         ` Ronald G. Minnich
@ 2005-03-24 15:12           ` Devon H. O'Dell 
  2005-03-24 15:51             ` Ronald G. Minnich
  2005-03-24 15:53             ` Ronald G. Minnich
  2005-03-24 15:16           ` Charles Forsyth
  1 sibling, 2 replies; 13+ messages in thread
From: Devon H. O'Dell  @ 2005-03-24 15:12 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2657 bytes --]

On Thu, Mar 24, 2005 at 08:00:35AM -0700, Ronald G. Minnich wrote:
> 
> 
> On Thu, 24 Mar 2005, Devon H. O'Dell  wrote:
> 
> > Thankfully, it appears to do so. From the Linux source:
> > 
> > SET_BANK( 0, 0xc0000000, 64*1024*1024 );
> > 
> > Might that simply be a property of the processor? I don't know 
> > much about physical / virtual memory mapping.
> > 
> 
> that would be neat if so, it would show high clue level on the part of 
> sa11xx designers, along with the 'read all zeros' memory. 
> 
> said clue appears not to have made it to ep93xx.
> 

Well, the first roadblock will be getting Plan 9 to boot from
the thing. It appears to support netbooting, but I'm waiting for
information on the PC card devices that it supports doing that
over. This would make it MUCH easier for me (assuming it has
some similarity to PXE) as writing the 64MB image to the thing
over serial takes a good 30 minutes or more.

I've got a good bit of generic information about the SIMpad boot
loader, but need to figure out where to put the kernel and such
in an image.

                                               PBL V2.4 20.07.2001
	 Booting...
	 ================================================
	 Siemens Switzerland Bootloader V2.5.3 10.06.2003
	 Running @206Mhz Processor ID 0x6901b118
	 Press ESC for monitor
	 Occupied Memory: [0x00004000-0x00008000],[0x00008014-0x0007500c]
	 Flash Id 0x00000018 at virt adr 0x05000000 Size 0x01000000
	 No 32Bit Flash detected 0x00000000
	 FlashImage Checksum 0x05040014-0x05059f11=0x8912ac03 Bootloader Image OK
	 Fabdata Flash @0x05059f18 Ram @0x00021f18 FABDATA: S842-KKFNX
	 MQ200 - Revision ID=2 ...
	 Initialise PCMCIA Interface... done.
	 Codec UCB1200 ID:0x1005 Ver.5 Dev.0 Suppl.1 IO 0x00000000
	 No PCMCIA Card Attached
	 NO PCMCIA CARD!  -- Use serial IO
	 Sysinit done
	 \x02No serial download request
	 Boothdr at 0x05080000 -> 0x31415926
	 Loading executable with header 0x0000
	 [*********************|] 0kB/sec
	 Done

On another note, is there a better developer's list to take
this thread to? I'm not sure it's entirely on-topic.

Hm. Interesting. I just chose the `Boot from Net' option in the
serial loader menu. I get:

=====================
Monitor:
=====================
Boot from Flash   'f'
Boot from Net     'n'
Power Off         'o'
Erase PSM+Registry'p'
Exit              'q'
Erase Registry    'r'
Erase Flash       'y'
Soft  Reset       's'
Print Fab-String  'w'
-> n
Probing for any NE2K Card.....

Quite cool. Too bad I don't have an NE2K PC card. I'll have to
see what such a thing costs and go from here.

--Devon

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-24 15:00         ` Ronald G. Minnich
  2005-03-24 15:12           ` Devon H. O'Dell 
@ 2005-03-24 15:16           ` Charles Forsyth
  2005-03-24 15:49             ` Ronald G. Minnich
  1 sibling, 1 reply; 13+ messages in thread
From: Charles Forsyth @ 2005-03-24 15:16 UTC (permalink / raw)
  To: 9fans

putting dram at non-zero physical addresses is fairly common on ARMs,
particularly on chips where there is no MMU (and some applications won't
use it if it's there).
that way accesses to 0 can be trapped, if the hardware does its bit.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-24 15:16           ` Charles Forsyth
@ 2005-03-24 15:49             ` Ronald G. Minnich
  0 siblings, 0 replies; 13+ messages in thread
From: Ronald G. Minnich @ 2005-03-24 15:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs



On Thu, 24 Mar 2005, Charles Forsyth wrote:

> putting dram at non-zero physical addresses is fairly common on ARMs,
> particularly on chips where there is no MMU (and some applications won't
> use it if it's there). that way accesses to 0 can be trapped, if the
> hardware does its bit.

neat, arm did do a few good things, eh?

ron


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-24 15:12           ` Devon H. O'Dell 
@ 2005-03-24 15:51             ` Ronald G. Minnich
  2005-03-24 15:53             ` Ronald G. Minnich
  1 sibling, 0 replies; 13+ messages in thread
From: Ronald G. Minnich @ 2005-03-24 15:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs



On Thu, 24 Mar 2005, Devon H. O'Dell  wrote:

> Well, the first roadblock will be getting Plan 9 to boot from the thing.
> It appears to support netbooting, but I'm waiting for information on the
> PC card devices that it supports doing that over. This would make it
> MUCH easier for me (assuming it has some similarity to PXE) as writing
> the 64MB image to the thing over serial takes a good 30 minutes or more.

I'm booting my ts7200 just fine. You might want to develop on that to
start.

ron

>
> I've got a good bit of generic information about the SIMpad boot
> loader, but need to figure out where to put the kernel and such
> in an image.
>
>                                                PBL V2.4 20.07.2001
> 	 Booting...
> 	 ================================================
> 	 Siemens Switzerland Bootloader V2.5.3 10.06.2003
> 	 Running @206Mhz Processor ID 0x6901b118
> 	 Press ESC for monitor
> 	 Occupied Memory: [0x00004000-0x00008000],[0x00008014-0x0007500c]
> 	 Flash Id 0x00000018 at virt adr 0x05000000 Size 0x01000000
> 	 No 32Bit Flash detected 0x00000000
> 	 FlashImage Checksum 0x05040014-0x05059f11=0x8912ac03 Bootloader Image OK
> 	 Fabdata Flash @0x05059f18 Ram @0x00021f18 FABDATA: S842-KKFNX
> 	 MQ200 - Revision ID=2 ...
> 	 Initialise PCMCIA Interface... done.
> 	 Codec UCB1200 ID:0x1005 Ver.5 Dev.0 Suppl.1 IO 0x00000000
> 	 No PCMCIA Card Attached
> 	 NO PCMCIA CARD!  -- Use serial IO
> 	 Sysinit done
> 	 \x02No serial download request
> 	 Boothdr at 0x05080000 -> 0x31415926
> 	 Loading executable with header 0x0000
> 	 [*********************|] 0kB/sec
> 	 Done
>
> On another note, is there a better developer's list to take
> this thread to? I'm not sure it's entirely on-topic.
>
> Hm. Interesting. I just chose the `Boot from Net' option in the
> serial loader menu. I get:
>
> =====================
> Monitor:
> =====================
> Boot from Flash   'f'
> Boot from Net     'n'
> Power Off         'o'
> Erase PSM+Registry'p'
> Exit              'q'
> Erase Registry    'r'
> Erase Flash       'y'
> Soft  Reset       's'
> Print Fab-String  'w'
> -> n
> Probing for any NE2K Card.....
>
> Quite cool. Too bad I don't have an NE2K PC card. I'll have to
> see what such a thing costs and go from here.
>
> --Devon
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] Porting plan 9 to the Simpad / extending Bitsy
  2005-03-24 15:12           ` Devon H. O'Dell 
  2005-03-24 15:51             ` Ronald G. Minnich
@ 2005-03-24 15:53             ` Ronald G. Minnich
  1 sibling, 0 replies; 13+ messages in thread
From: Ronald G. Minnich @ 2005-03-24 15:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

sorry for that last email, I'm finding that I'm making odd errors nowadays
as I move back and forth from acme to pine to emacs to ...

interesting.

1. I selected the text to delete with ^^^V^V^V,
2. hit space to nuke it,
3. sent it with ^X.

So step 2 was for acme, steps 1 and 3 for pine!

mixing of metaphors, I guess.

ron



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-03-24 15:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-23 19:30 [9fans] Porting plan 9 to the Simpad / extending Bitsy Devon H. O'Dell 
2005-03-23 20:28 ` Sape Mullender
2005-03-23 20:40   ` Devon H. O'Dell 
2005-03-23 21:11     ` Charles Forsyth
2005-03-24  8:43       ` Martin C. Atkins
2005-03-23 22:46     ` Ronald G. Minnich
2005-03-24  6:51       ` Devon H. O'Dell 
2005-03-24 15:00         ` Ronald G. Minnich
2005-03-24 15:12           ` Devon H. O'Dell 
2005-03-24 15:51             ` Ronald G. Minnich
2005-03-24 15:53             ` Ronald G. Minnich
2005-03-24 15:16           ` Charles Forsyth
2005-03-24 15:49             ` Ronald G. Minnich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).