9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Vmware playground but in qemu.
@ 2006-04-17 19:32 Lluís Batlle i Rossell
  2006-04-17 20:05 ` Gabriel Diaz
  2006-04-18  7:37 ` David Leimbach
  0 siblings, 2 replies; 10+ messages in thread
From: Lluís Batlle i Rossell @ 2006-04-17 19:32 UTC (permalink / raw)
  To: 9fans Mailing list


[-- Attachment #1.1: Type: text/plain, Size: 2172 bytes --]

Hi,
I'm using qemu for the vmware playground described in the wiki
(http://cm.bell-labs.com/wiki/plan9/vmware_playground_for_plan9/index.html).
Although I found some flaws in the wiki page (aux/timesync _-n_ <host>,
for instance, or ip/dhcpd ip/tftpd in the same line), I think I got the
9pccpuf kernel running fine - I explain here some of the problems I had.

I had to change the ether2000.c file for the pxeload loader in order to
get a working pxe boot (qemu has a pnp or pci ne2000). I attach the new
ether2000.c file for /sys/src/boot/pc/ether2000.c. I simply took the 9
kernel's ether2000.c, corrected the locations of the include files,
removed the 'static' of ne2000reset(), and removed the function
ether2000link() (if I recall everything). I really got surprised when
the new 9pxeload worked.

In order to get the "9pccpu" kernel in a second host working, I had to
use a qemu floppy image together with the zero-filled small hd. I
manually created an msdos filesystem there, with a file "plan9.nvr"
(thanks 20h@#9fans) with silly data on it (using mkfs.msdos in Linux).
If I didn't have that floppy, and only had a hard disk WITHOUT a plan9
partition/nvram part, the 9pccpu kernel hanged after asking for the
root. After getting the first boot done, I partitioned the hard disk,
prepared the nvram part, and took off the "floppy" on the next boot.
Although the author says the HD vmware file could be 1KiB long, I needed
at least 512KiB long, because that's the size of a cylinder according to
disk/fdisk (and less than that is not allowed as I experienced).

Among my many unsuccesful tries to get everything done as described in
the wiki, it was dark for me the "Set up the nvram", because I thought I
should write the lines suggested into the nvram partition. And I also
expected that to work, so the rebooting's "error in nvram key" made me mad.

There are other details that I didn't understood at first from the wiki
page, but it would be too a matter of opinion. As an example: what's
"First boot"? Should I reboot? As 'bootes'?

So, here you have comments from a 'newbie'. I hope they help in some sense.

Thanks!

[-- Attachment #1.2: ether2000.c --]
[-- Type: text/plain, Size: 4923 bytes --]

#include "u.h"
#include "lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "io.h"
#include "error.h"

#include "etherif.h"
#include "ether8390.h"

/*
 * Driver written for the 'Notebook Computer Ethernet LAN Adapter',
 * a plug-in to the bus-slot on the rear of the Gateway NOMAD 425DXL
 * laptop. The manual says NE2000 compatible.
 * The interface appears to be pretty well described in the National
 * Semiconductor Local Area Network Databook (1992) as one of the
 * AT evaluation cards.
 *
 * The NE2000 is really just a DP8390[12] plus a data port
 * and a reset port.
 */
enum {
	Data		= 0x10,		/* offset from I/O base of data port */
	Reset		= 0x1F,		/* offset from I/O base of reset port */
};

typedef struct Ctlr Ctlr;
typedef struct Ctlr {
	Pcidev*	pcidev;
	Ctlr*	next;
	int	active;
} Ctlr;

static Ctlr* ctlrhead;
static Ctlr* ctlrtail;

static struct {
	char*	name;
	int	id;
} ne2000pci[] = {
	{ "Realtek 8029",	(0x8029<<16)|0x10EC, },
	{ "Winbond 89C940",	(0x0940<<16)|0x1050, },
	{ nil },
};

static Ctlr*
ne2000match(Ether* edev, int id)
{
	int port;
	Pcidev *p;
	Ctlr *ctlr;

	/*
	 * Any adapter matches if no edev->port is supplied,
	 * otherwise the ports must match.
	 */
	for(ctlr = ctlrhead; ctlr != nil; ctlr = ctlr->next){
		if(ctlr->active)
			continue;
		p = ctlr->pcidev;
		if(((p->did<<16)|p->vid) != id)
			continue;
		port = p->mem[0].bar & ~0x01;
		if(edev->port != 0 && edev->port != port)
			continue;

		/*
		 * It suffices to fill these in,
		 * the rest is gleaned from the card.
		 */
		edev->port = port;
		edev->irq = p->intl;

		ctlr->active = 1;

		return ctlr;
	}

	return nil;
}

static void
ne2000pnp(Ether* edev)
{
	int i, id;
	Pcidev *p;
	Ctlr *ctlr;

	/*
	 * Make a list of all ethernet controllers
	 * if not already done.
	 */
	if(ctlrhead == nil){
		p = nil;
		while(p = pcimatch(p, 0, 0)){
			if(p->ccrb != 0x02 || p->ccru != 0)
				continue;
			ctlr = malloc(sizeof(Ctlr));
			ctlr->pcidev = p;

			if(ctlrhead != nil)
				ctlrtail->next = ctlr;
			else
				ctlrhead = ctlr;
			ctlrtail = ctlr;
		}
	}

	/*
	 * Is it a card with an unrecognised vid+did?
	 * Normally a search is made through all the found controllers
	 * for one which matches any of the known vid+did pairs.
	 * If a vid+did pair is specified a search is made for that
	 * specific controller only.
	 */
	id = 0;
	for(i = 0; i < edev->nopt; i++){
		if(cistrncmp(edev->opt[i], "id=", 3) == 0)
			id = strtol(&edev->opt[i][3], nil, 0);
	}

	if(id != 0)
		ne2000match(edev, id);
	else for(i = 0; ne2000pci[i].name; i++){
		if(ne2000match(edev, ne2000pci[i].id) != nil)
			break;
	}
}

int
ne2000reset(Ether* edev)
{
	static int first;
	ushort buf[16];
	ulong port;
	Dp8390 *dp8390;
	int i;
	uchar ea[Eaddrlen];

	if(edev->port == 0)
		ne2000pnp(edev);

	/*
	 * Set up the software configuration.
	 * Use defaults for irq, mem and size
	 * if not specified.
	 * Must have a port, no more default.
	 */
	if(edev->port == 0)
		return -1;
	if(edev->irq == 0)
		edev->irq = 2;
	if(edev->mem == 0)
		edev->mem = 0x4000;
	if(edev->size == 0)
		edev->size = 16*1024;
	port = edev->port;

	if(ioalloc(edev->port, 0x20, 0, "ne2000") < 0)
		return -1;

	edev->ctlr = malloc(sizeof(Dp8390));
	dp8390 = edev->ctlr;
	dp8390->width = 2;
	dp8390->ram = 0;

	dp8390->port = port;
	dp8390->data = port+Data;

	dp8390->tstart = HOWMANY(edev->mem, Dp8390BufSz);
	dp8390->pstart = dp8390->tstart + HOWMANY(sizeof(Etherpkt), Dp8390BufSz);
	dp8390->pstop = dp8390->tstart + HOWMANY(edev->size, Dp8390BufSz);

	dp8390->dummyrr = 1;
	for(i = 0; i < edev->nopt; i++){
		if(strcmp(edev->opt[i], "nodummyrr"))
			continue;
		dp8390->dummyrr = 0;
		break;
	}

	/*
	 * Reset the board. This is done by doing a read
	 * followed by a write to the Reset address.
	 */
	buf[0] = inb(port+Reset);
	delay(2);
	outb(port+Reset, buf[0]);
	delay(2);

	/*
	 * Init the (possible) chip, then use the (possible)
	 * chip to read the (possible) PROM for ethernet address
	 * and a marker byte.
	 * Could just look at the DP8390 command register after
	 * initialisation has been tried, but that wouldn't be
	 * enough, there are other ethernet boards which could
	 * match.
	 */
	dp8390reset(edev);
	memset(buf, 0, sizeof(buf));
	dp8390read(dp8390, buf, 0, sizeof(buf));
	if((buf[0x0E] & 0xFF) != 0x57 || (buf[0x0F] & 0xFF) != 0x57){
		iofree(edev->port);
		free(edev->ctlr);
		return -1;
	}

	/*
	 * Stupid machine. Shorts were asked for,
	 * shorts were delivered, although the PROM is a byte array.
	 * Set the ethernet address.
	 */
	memset(ea, 0, Eaddrlen);
	if(memcmp(ea, edev->ea, Eaddrlen) == 0){
		for(i = 0; i < sizeof(edev->ea); i++)
			edev->ea[i] = buf[i];
	}
	dp8390setea(edev);

	return 0;
}

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3311 bytes --]

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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-17 19:32 [9fans] Vmware playground but in qemu Lluís Batlle i Rossell
@ 2006-04-17 20:05 ` Gabriel Diaz
  2006-04-17 20:51   ` Lluís Batlle i Rossell
  2006-04-18  7:37 ` David Leimbach
  1 sibling, 1 reply; 10+ messages in thread
From: Gabriel Diaz @ 2006-04-17 20:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

Hello

I made that page, but i think i deleted it. It isn't complete and someone
told me is not useful at all as it describes what i have done to play and
not
something of "general interest".



>
> Although the author says the HD vmware file could be 1KiB long, I needed
> at least 512KiB long, because that's the size of a cylinder according to
> disk/fdisk (and less than that is not allowed as I experienced).


Yes, you're right. That should be corrected.


Among my many unsuccesful tries to get everything done as described in
> the wiki, it was dark for me the "Set up the nvram", because I thought I
> should write the lines suggested into the nvram partition. And I also
> expected that to work, so the rebooting's "error in nvram key" made me
> mad.


i created an nvram partition on each virtual machine that booted from
network.
On the first  boot, nvram will not be found, so, i created an nvram
partition
and boot again, this time, nvram was found, but with no valid contents, so
plan9 asked again about auth domain and authid. But this time, it saved the
information, so the next boot, the third, worked fine.


There are other details that I didn't understood at first from the wiki
> page, but it would be too a matter of opinion. As an example: what's
> "First boot"? Should I reboot? As 'bootes'?


When installing a cpu standalone server you should reboot to use the new
kernel,
that is the "first boot" thing. Pointers to setting up standalone cpu server
should be
included in the page.


So, here you have comments from a 'newbie'. I hope they help in some sense.



If you found that page useful please consider putting your comments and
experiences
with qemu to make the page complete. And fix the erroneous bits.

email me if you can't update it and i will try to fix the page.

thanks

gabi

[-- Attachment #2: Type: text/html, Size: 2626 bytes --]

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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-17 20:05 ` Gabriel Diaz
@ 2006-04-17 20:51   ` Lluís Batlle i Rossell
  0 siblings, 0 replies; 10+ messages in thread
From: Lluís Batlle i Rossell @ 2006-04-17 20:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

Gabriel Diaz wrote:
> Hello
>
> I made that page, but i think i deleted it. It isn't complete and someone
> told me is not useful at all as it describes what i have done to play
> and not
> something of "general interest".
Aha, I understand. Well, I didn't plan to make something of "general
interest", but having a quite-ready handful of plan9 machines, although
virtual, has been quite good for a new 'user' like me.

>     Among my many unsuccesful tries to get everything done as described in
>     the wiki, it was dark for me the "Set up the nvram", because I thought I
>     should write the lines suggested into the nvram partition. And I also
>     expected that to work, so the rebooting's "error in nvram key" made
>     me mad.
> i created an nvram partition on each virtual machine that booted from
> network.
> On the first  boot, nvram will not be found, so, i created an nvram
> partition
> and boot again, this time, nvram was found, but with no valid contents, so
> plan9 asked again about auth domain and authid. But this time, it saved the
> information, so the next boot, the third, worked fine.
I couldn't boot the machine, if I didn't have any nvram partition. It
hanged. And I could not create the plan9 nvram partition, if I could not
boot. That's why I needed the floppy file - a nvram (yes, with incorrect
content at first) for at least booting and creating the partition in the hd.

>     There are other details that I didn't understood at first from the wiki
>     page, but it would be too a matter of opinion. As an example: what's
>     "First boot"? Should I reboot? As 'bootes'?
> When installing a cpu standalone server you should reboot to use the new
> kernel,
> that is the "first boot" thing. Pointers to setting up standalone cpu
> server should be
> included in the page.
Aha. Well, I coped with it, but it wasn't fairly simply for someone who
has never set up a cpu server. :)
> If you found that page useful please consider putting your comments and
> experiences
> with qemu to make the page complete. And fix the erroneous bits.
I'd like to write about 'qemu', but I feel I should have at least tried
the vmware-way for writting something clear to understand. Even more...
what should I say there about the ether2000.c part? "Please update your
ether2000.c with [link to the new ether2000.c in some way] this one to
get 9pxeload working in qemu"? I feel that would be strange. I'll keep
waiting for some comments on the new ether2000.c - maybe someone can put
that into sources (given someone takes a revision), and then it would be
easier to write the wiki page.
>
> email me if you can't update it and i will try to fix the page.
I've tried with acme, and I think I can write to the wiki. Whether I can
fix or not the page, that's another topic. :)

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3311 bytes --]

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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-17 19:32 [9fans] Vmware playground but in qemu Lluís Batlle i Rossell
  2006-04-17 20:05 ` Gabriel Diaz
@ 2006-04-18  7:37 ` David Leimbach
  2006-04-18  7:42   ` geoff
  1 sibling, 1 reply; 10+ messages in thread
From: David Leimbach @ 2006-04-18  7:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

When I use the functions below in my ether2000.c I get

ne2000reset: undefined: ioalloc in ne2000reset
ne2000reset: undefined: iofree in ne2000reset...

Dave

On 4/17/06, Lluís Batlle i Rossell <viriketo@gmail.com> wrote:
> Hi,
> I'm using qemu for the vmware playground described in the wiki
> (http://cm.bell-labs.com/wiki/plan9/vmware_playground_for_plan9/index.html).
> Although I found some flaws in the wiki page (aux/timesync _-n_ <host>,
> for instance, or ip/dhcpd ip/tftpd in the same line), I think I got the
> 9pccpuf kernel running fine - I explain here some of the problems I had.
>
> I had to change the ether2000.c file for the pxeload loader in order to
> get a working pxe boot (qemu has a pnp or pci ne2000). I attach the new
> ether2000.c file for /sys/src/boot/pc/ether2000.c. I simply took the 9
> kernel's ether2000.c, corrected the locations of the include files,
> removed the 'static' of ne2000reset(), and removed the function
> ether2000link() (if I recall everything). I really got surprised when
> the new 9pxeload worked.
>
> In order to get the "9pccpu" kernel in a second host working, I had to
> use a qemu floppy image together with the zero-filled small hd. I
> manually created an msdos filesystem there, with a file "plan9.nvr"
> (thanks 20h@#9fans) with silly data on it (using mkfs.msdos in Linux).
> If I didn't have that floppy, and only had a hard disk WITHOUT a plan9
> partition/nvram part, the 9pccpu kernel hanged after asking for the
> root. After getting the first boot done, I partitioned the hard disk,
> prepared the nvram part, and took off the "floppy" on the next boot.
> Although the author says the HD vmware file could be 1KiB long, I needed
> at least 512KiB long, because that's the size of a cylinder according to
> disk/fdisk (and less than that is not allowed as I experienced).
>
> Among my many unsuccesful tries to get everything done as described in
> the wiki, it was dark for me the "Set up the nvram", because I thought I
> should write the lines suggested into the nvram partition. And I also
> expected that to work, so the rebooting's "error in nvram key" made me mad.
>
> There are other details that I didn't understood at first from the wiki
> page, but it would be too a matter of opinion. As an example: what's
> "First boot"? Should I reboot? As 'bootes'?
>
> So, here you have comments from a 'newbie'. I hope they help in some sense.
>
> Thanks!
>
>
> #include "u.h"
> #include "lib.h"
> #include "mem.h"
> #include "dat.h"
> #include "fns.h"
> #include "io.h"
> #include "error.h"
>
> #include "etherif.h"
> #include "ether8390.h"
>
> /*
>  * Driver written for the 'Notebook Computer Ethernet LAN Adapter',
>  * a plug-in to the bus-slot on the rear of the Gateway NOMAD 425DXL
>  * laptop. The manual says NE2000 compatible.
>  * The interface appears to be pretty well described in the National
>  * Semiconductor Local Area Network Databook (1992) as one of the
>  * AT evaluation cards.
>  *
>  * The NE2000 is really just a DP8390[12] plus a data port
>  * and a reset port.
>  */
> enum {
>         Data            = 0x10,         /* offset from I/O base of data port */
>         Reset           = 0x1F,         /* offset from I/O base of reset port */
> };
>
> typedef struct Ctlr Ctlr;
> typedef struct Ctlr {
>         Pcidev* pcidev;
>         Ctlr*   next;
>         int     active;
> } Ctlr;
>
> static Ctlr* ctlrhead;
> static Ctlr* ctlrtail;
>
> static struct {
>         char*   name;
>         int     id;
> } ne2000pci[] = {
>         { "Realtek 8029",       (0x8029<<16)|0x10EC, },
>         { "Winbond 89C940",     (0x0940<<16)|0x1050, },
>         { nil },
> };
>
> static Ctlr*
> ne2000match(Ether* edev, int id)
> {
>         int port;
>         Pcidev *p;
>         Ctlr *ctlr;
>
>         /*
>          * Any adapter matches if no edev->port is supplied,
>          * otherwise the ports must match.
>          */
>         for(ctlr = ctlrhead; ctlr != nil; ctlr = ctlr->next){
>                 if(ctlr->active)
>                         continue;
>                 p = ctlr->pcidev;
>                 if(((p->did<<16)|p->vid) != id)
>                         continue;
>                 port = p->mem[0].bar & ~0x01;
>                 if(edev->port != 0 && edev->port != port)
>                         continue;
>
>                 /*
>                  * It suffices to fill these in,
>                  * the rest is gleaned from the card.
>                  */
>                 edev->port = port;
>                 edev->irq = p->intl;
>
>                 ctlr->active = 1;
>
>                 return ctlr;
>         }
>
>         return nil;
> }
>
> static void
> ne2000pnp(Ether* edev)
> {
>         int i, id;
>         Pcidev *p;
>         Ctlr *ctlr;
>
>         /*
>          * Make a list of all ethernet controllers
>          * if not already done.
>          */
>         if(ctlrhead == nil){
>                 p = nil;
>                 while(p = pcimatch(p, 0, 0)){
>                         if(p->ccrb != 0x02 || p->ccru != 0)
>                                 continue;
>                         ctlr = malloc(sizeof(Ctlr));
>                         ctlr->pcidev = p;
>
>                         if(ctlrhead != nil)
>                                 ctlrtail->next = ctlr;
>                         else
>                                 ctlrhead = ctlr;
>                         ctlrtail = ctlr;
>                 }
>         }
>
>         /*
>          * Is it a card with an unrecognised vid+did?
>          * Normally a search is made through all the found controllers
>          * for one which matches any of the known vid+did pairs.
>          * If a vid+did pair is specified a search is made for that
>          * specific controller only.
>          */
>         id = 0;
>         for(i = 0; i < edev->nopt; i++){
>                 if(cistrncmp(edev->opt[i], "id=", 3) == 0)
>                         id = strtol(&edev->opt[i][3], nil, 0);
>         }
>
>         if(id != 0)
>                 ne2000match(edev, id);
>         else for(i = 0; ne2000pci[i].name; i++){
>                 if(ne2000match(edev, ne2000pci[i].id) != nil)
>                         break;
>         }
> }
>
> int
> ne2000reset(Ether* edev)
> {
>         static int first;
>         ushort buf[16];
>         ulong port;
>         Dp8390 *dp8390;
>         int i;
>         uchar ea[Eaddrlen];
>
>         if(edev->port == 0)
>                 ne2000pnp(edev);
>
>         /*
>          * Set up the software configuration.
>          * Use defaults for irq, mem and size
>          * if not specified.
>          * Must have a port, no more default.
>          */
>         if(edev->port == 0)
>                 return -1;
>         if(edev->irq == 0)
>                 edev->irq = 2;
>         if(edev->mem == 0)
>                 edev->mem = 0x4000;
>         if(edev->size == 0)
>                 edev->size = 16*1024;
>         port = edev->port;
>
>         if(ioalloc(edev->port, 0x20, 0, "ne2000") < 0)
>                 return -1;
>
>         edev->ctlr = malloc(sizeof(Dp8390));
>         dp8390 = edev->ctlr;
>         dp8390->width = 2;
>         dp8390->ram = 0;
>
>         dp8390->port = port;
>         dp8390->data = port+Data;
>
>         dp8390->tstart = HOWMANY(edev->mem, Dp8390BufSz);
>         dp8390->pstart = dp8390->tstart + HOWMANY(sizeof(Etherpkt), Dp8390BufSz);
>         dp8390->pstop = dp8390->tstart + HOWMANY(edev->size, Dp8390BufSz);
>
>         dp8390->dummyrr = 1;
>         for(i = 0; i < edev->nopt; i++){
>                 if(strcmp(edev->opt[i], "nodummyrr"))
>                         continue;
>                 dp8390->dummyrr = 0;
>                 break;
>         }
>
>         /*
>          * Reset the board. This is done by doing a read
>          * followed by a write to the Reset address.
>          */
>         buf[0] = inb(port+Reset);
>         delay(2);
>         outb(port+Reset, buf[0]);
>         delay(2);
>
>         /*
>          * Init the (possible) chip, then use the (possible)
>          * chip to read the (possible) PROM for ethernet address
>          * and a marker byte.
>          * Could just look at the DP8390 command register after
>          * initialisation has been tried, but that wouldn't be
>          * enough, there are other ethernet boards which could
>          * match.
>          */
>         dp8390reset(edev);
>         memset(buf, 0, sizeof(buf));
>         dp8390read(dp8390, buf, 0, sizeof(buf));
>         if((buf[0x0E] & 0xFF) != 0x57 || (buf[0x0F] & 0xFF) != 0x57){
>                 iofree(edev->port);
>                 free(edev->ctlr);
>                 return -1;
>         }
>
>         /*
>          * Stupid machine. Shorts were asked for,
>          * shorts were delivered, although the PROM is a byte array.
>          * Set the ethernet address.
>          */
>         memset(ea, 0, Eaddrlen);
>         if(memcmp(ea, edev->ea, Eaddrlen) == 0){
>                 for(i = 0; i < sizeof(edev->ea); i++)
>                         edev->ea[i] = buf[i];
>         }
>         dp8390setea(edev);
>
>         return 0;
> }
>
>
>
>


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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-18  7:37 ` David Leimbach
@ 2006-04-18  7:42   ` geoff
  2006-04-18 13:55     ` David Leimbach
  0 siblings, 1 reply; 10+ messages in thread
From: geoff @ 2006-04-18  7:42 UTC (permalink / raw)
  To: 9fans

Perhaps you're not including fns.h in your ether2000.c?

; grep -n 'ioalloc|iofree' *.h
fns.h:57: #define ioalloc(addr, len, align, name)	(addr)
fns.h:58: #define iofree(addr)

(This is in /sys/src/boot/pc, right?)



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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-18  7:42   ` geoff
@ 2006-04-18 13:55     ` David Leimbach
  2006-04-18 14:26       ` jmk
  0 siblings, 1 reply; 10+ messages in thread
From: David Leimbach @ 2006-04-18 13:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 4/18/06, geoff@collyer.net <geoff@collyer.net> wrote:
> Perhaps you're not including fns.h in your ether2000.c?
>
> ; grep -n 'ioalloc|iofree' *.h
> fns.h:57: #define ioalloc(addr, len, align, name)       (addr)
> fns.h:58: #define iofree(addr)
>
> (This is in /sys/src/boot/pc, right?)
>
>
I've got fns.h in my copy.

It's apparently not a macro on my system though, and the definition
appears to be in /sys/src/9/pc/devarch.c

Parallels, so far in beta, doesn't let me middle click anything with
my current trackball, nor does it have a '|' key.  It's really hard to
do any amount of useful searching or editing as a result... especially
without networking support, where I could just drawterm.

Dave


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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-18 13:55     ` David Leimbach
@ 2006-04-18 14:26       ` jmk
  2006-04-18 15:49         ` David Leimbach
  0 siblings, 1 reply; 10+ messages in thread
From: jmk @ 2006-04-18 14:26 UTC (permalink / raw)
  To: 9fans

Those macros are in /sys/src/boot/pc/fns.h, not /sys/src/9/pc/fns.h.

On Tue Apr 18 09:56:18 EDT 2006, leimy2k@gmail.com wrote:
> On 4/18/06, geoff@collyer.net <geoff@collyer.net> wrote:
> > Perhaps you're not including fns.h in your ether2000.c?
> >
> > ; grep -n 'ioalloc|iofree' *.h
> > fns.h:57: #define ioalloc(addr, len, align, name)       (addr)
> > fns.h:58: #define iofree(addr)
> >
> > (This is in /sys/src/boot/pc, right?)
> >
> >
> I've got fns.h in my copy.
>
> It's apparently not a macro on my system though, and the definition
> appears to be in /sys/src/9/pc/devarch.c
>
> Parallels, so far in beta, doesn't let me middle click anything with
> my current trackball, nor does it have a '|' key.  It's really hard to
> do any amount of useful searching or editing as a result... especially
> without networking support, where I could just drawterm.
>
> Dave


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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-18 14:26       ` jmk
@ 2006-04-18 15:49         ` David Leimbach
  2006-04-18 15:50           ` jmk
  0 siblings, 1 reply; 10+ messages in thread
From: David Leimbach @ 2006-04-18 15:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 4/18/06, jmk@plan9.bell-labs.com <jmk@plan9.bell-labs.com> wrote:
> Those macros are in /sys/src/boot/pc/fns.h, not /sys/src/9/pc/fns.h.p

I just opened up /sys/src/boot/pc/fns.h and I see no "ioalloc"
prototype or macro.

ialloc is there... but no ioalloc.

Do I need to get a new CD image of Plan 9?  Has this stuff been
updated recently?


>
> On Tue Apr 18 09:56:18 EDT 2006, leimy2k@gmail.com wrote:
> > On 4/18/06, geoff@collyer.net <geoff@collyer.net> wrote:
> > > Perhaps you're not including fns.h in your ether2000.c?
> > >
> > > ; grep -n 'ioalloc|iofree' *.h
> > > fns.h:57: #define ioalloc(addr, len, align, name)       (addr)
> > > fns.h:58: #define iofree(addr)
> > >
> > > (This is in /sys/src/boot/pc, right?)
> > >
> > >
> > I've got fns.h in my copy.
> >
> > It's apparently not a macro on my system though, and the definition
> > appears to be in /sys/src/9/pc/devarch.c
> >
> > Parallels, so far in beta, doesn't let me middle click anything with
> > my current trackball, nor does it have a '|' key.  It's really hard to
> > do any amount of useful searching or editing as a result... especially
> > without networking support, where I could just drawterm.
> >
> > Dave
>


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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-18 15:49         ` David Leimbach
@ 2006-04-18 15:50           ` jmk
  2006-04-18 15:51             ` David Leimbach
  0 siblings, 1 reply; 10+ messages in thread
From: jmk @ 2006-04-18 15:50 UTC (permalink / raw)
  To: 9fans

	Do I need to get a new CD image of Plan 9?  Has this stuff been
	updated recently?

yes


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

* Re: [9fans] Vmware playground but in qemu.
  2006-04-18 15:50           ` jmk
@ 2006-04-18 15:51             ` David Leimbach
  0 siblings, 0 replies; 10+ messages in thread
From: David Leimbach @ 2006-04-18 15:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 4/18/06, jmk@plan9.bell-labs.com <jmk@plan9.bell-labs.com> wrote:
>         Do I need to get a new CD image of Plan 9?  Has this stuff been
>         updated recently?
>
> yes
>

argh!  Very well then :)


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

end of thread, other threads:[~2006-04-18 15:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-17 19:32 [9fans] Vmware playground but in qemu Lluís Batlle i Rossell
2006-04-17 20:05 ` Gabriel Diaz
2006-04-17 20:51   ` Lluís Batlle i Rossell
2006-04-18  7:37 ` David Leimbach
2006-04-18  7:42   ` geoff
2006-04-18 13:55     ` David Leimbach
2006-04-18 14:26       ` jmk
2006-04-18 15:49         ` David Leimbach
2006-04-18 15:50           ` jmk
2006-04-18 15:51             ` David Leimbach

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).