From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: presotto@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] various bitsy questions MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-ifbgwtkwqdyiujznoncuosekkd" Date: Tue, 22 Oct 2002 19:45:43 -0400 Topicbox-Message-UUID: 0a3a047a-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-ifbgwtkwqdyiujznoncuosekkd Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I forgot to explain [ index ]. A pcmcia card can have many configurations in its attribute memory. Normally we pick the default one. However, we can override that by passing the index of the one to use in the configure message. The indices are part of the configuration and don't necessarily (in fact rarely) start at 0 or 1. --upas-ifbgwtkwqdyiujznoncuosekkd Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Tue Oct 22 19:43:24 EDT 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Tue Oct 22 19:43:23 EDT 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7833A19AC4; Tue, 22 Oct 2002 19:43:10 -0400 (EDT) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 2310419AC2 for <9fans@cse.psu.edu>; Tue, 22 Oct 2002 19:42:22 -0400 (EDT) Message-ID: <807ca75a36824f80b754f9e70a50e738@plan9.bell-labs.com> From: presotto@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] various bitsy questions MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-pujxaaprfndrmzumvycnwtixfb" Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Tue, 22 Oct 2002 19:42:20 -0400 This is a multi-part message in MIME format. --upas-pujxaaprfndrmzumvycnwtixfb Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit The way to port pcmciamodem.c it is to get rid of it completely. On the bitsy, a user level program open's /dev/pcm0ctl and writes a string like: configure #xspec arg [ index ] into it. The '#xspec' is a device specifier like you'ld use in bind, e.g., #l0. 'x's configure routine is called as: devtab[].config(int on, char *spec, DevConf *cp) where 'on' == 1 means to configure and enable the card and == 0 means disable and unconfigure it. 'spec' is the same as for bind's, for example, 0 or 1 to indicate ether 0 or ether 1, 'cp->mem' is where the pcmcia chip has configured the memory to be 'cp->port' is where the pcmcia chip has mapped the io ports 'cp->irq' is where the pcmcia chip has mapped the interrupt 'cp->type' is the 'arg' that the user wrote This allows us to flavor the card after the fact rather than at boot time or to disable it so that we can pull it out. Look at the config routine in devether.c. The equivalent to pcmciamodem.c is adding a config routine in port/devuart.c. I did this model after I did the PC and like it a lot more. It means that the drivers don't have to know about all the different names a card can be called by and allows us to pull cards out and insert new ones without rebooting. Its what I should have done in the first place. I'm currently rewriting pc/devpccard.c and pc/devi82365.c to be a single driver with exactly that interface. All the pcmciaxxxx.c files will disappear. boot/bootip.c will configure in the card if it needs to. If you rewrite devuart.c to do this, I'll be happy to pick it up as soon as I finish the pc conversion. If not, I'll do it anyways since I want to try our gprs card on the bitsies. Might make them a bit more useful than the 802.11 card does or at least useful in different situations. Of course, until we can put the suckers to sleep and wake them up successfully, they're only useful for a few hours at most. --upas-pujxaaprfndrmzumvycnwtixfb Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Tue Oct 22 16:38:19 EDT 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Tue Oct 22 16:38:18 EDT 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 831DD19AB6; Tue, 22 Oct 2002 16:38:10 -0400 (EDT) Delivered-To: 9fans@cse.psu.edu Received: from utrhcs.cs.utwente.nl (utrhcs.cs.utwente.nl [130.89.10.247]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id EB98B19995 for <9fans@cse.psu.edu>; Tue, 22 Oct 2002 16:37:05 -0400 (EDT) Received: from zeus.cs.utwente.nl (zeus.cs.utwente.nl [130.89.10.12]) by utrhcs.cs.utwente.nl (8.9.3/8.9.3) with ESMTP id WAA27326 for <9fans@cse.psu.edu>; Tue, 22 Oct 2002 22:37:02 +0200 (MET DST) Received: from zamenhof.cs.utwente.nl by zeus.cs.utwente.nl (8.10.2+Sun/csrelay-Sol1.4/RB) id g9MKawQ01865; Tue, 22 Oct 2002 22:36:58 +0200 (MEST) Received: from localhost (belinfan@localhost) by zamenhof.cs.utwente.nl (8.11.6+Sun/8.10.2) with SMTP id g9MKawZ12108 for <9fans@cse.psu.edu>; Tue, 22 Oct 2002 22:36:58 +0200 (MEST) Message-Id: <200210222036.g9MKawZ12108@zamenhof.cs.utwente.nl> X-Authentication-Warning: zamenhof.cs.utwente.nl: belinfan@localhost didn't use HELO protocol To: 9fans@cse.psu.edu From: Axel Belinfante X-Organisation: University of Twente, Department of Computer Science, Formal Methods and Tools Group, PO Box 217, NL-7500 AE Enschede, The Netherlands X-Phone: +31 53 4893774 X-Telefax: +31 53 4893247 X-Face: 3YGZY^_!}k]>-k'9$LK?8GXbi?vs=2v*ut,/8z,z!(QNBk_>~:~"MJ_%i`sLLqGN,DGbkT@ N\jhX/jNLTz2hO_R"*RF(%bRvk+M,iU7SvVJtC*\B6Ud<7~`MGMp7rCI6LVp=%k=HE?-UCV?[p\$R? mI\n2/!#3/wZZsa[m7d;PKWiuH6'~ Subject: [9fans] various bitsy questions Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Tue, 22 Oct 2002 22:36:57 +0200 Just a few questions (pointers welcome)... What would be needed to `port' pcmciamodem.c to bitsy? It's probably obvious, but I'm confused by irq and ioports on the bitsy -- is there an equivalent to '#P/'*alloc to see what's in use? Bitsy source gives me the impression that both portrait and landscape mode is supported. Is there a way to choose between them, other than setting landscape in screen.c? What do the Scrib and Menu buttons in the scribble keyboard? Do they add `missing' window parts if scriblle started keyboard-only? Thanks, Axel. --upas-pujxaaprfndrmzumvycnwtixfb-- --upas-ifbgwtkwqdyiujznoncuosekkd--