Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-17 Thread kokamoto
Ok, now I got the right procedure to run hello.go. and the lists of fail of compile packages ($GOROOT/src/pk) are: asn1, crypto/ocsp, crypto/x509, crypto/tls, debug, expvar, go/printer, http, log, net, os/inotify, rpc, smtp, syslog, tabwriter, testing, testing/iotest, time, websocket ☺ Kenji

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread kokamoto
I'm a bit cinfusing... There is a flag (GPOS=plan9) to ebnable plan9 os in the standard Go dsitribution. How the patches you posted here now and before are related to that flag. I suppose the original plan9 flag is for plan9port. Am I correct? That plan9 flag works for plan9port? Then how I can

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread Pavel Zholkover
On Sat, Jan 15, 2011 at 11:01 AM, kokam...@hera.eonet.ne.jp wrote: I'm a bit cinfusing... There is a flag (GPOS=plan9) to ebnable plan9 os in the standard Go dsitribution. How the patches you posted here now and before are related to that flag. I suppose the original plan9 flag is for

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread lucio
That plan9 flag works for plan9port? Then how I can use it on my linux box with plan9port. I looked at connecting Go and p9p a few months back, before my assignments in Cape Town put a halt to my efforts. My conclusion at the time was that it was a worthwhile objective that could be

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread Pavel Zholkover
On Sat, Jan 15, 2011 at 4:00 AM, Anthony Martin al...@pbrane.org wrote: Pavel Zholkover paulz...@gmail.com once said: I have no idea what is causing it to die, I've tried adding a bunch of INT $3 to see how far in the flow I can get, but all I get this: 9vx panic: unknown trap/intr: 0x203

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread Pavel Zholkover
On Sat, Jan 15, 2011 at 11:30 AM, lu...@proxima.alt.za wrote: In a nutshell, I actually took a very recent release of Go and tried to build a Plan 9 version:        cd $GOROOT/src        GOOS=plan9 ./make.bash I was not surprised that it did not build correctly on my Ubuntu workstation.  

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread lucio
I think that you can produce a C hello world pretty easily if you provide stubs for 8l (like morestack and etc.) and use GOOS=plan9 8l -s to link you stuff together. Thank you, it's my intention to get as many of these poorly connected pieces under my belt so I have a better view of the whole

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread lucio
If you try applying http://codereview.appspot.com/3816043/ you can get pretty far.. Could you provide more detailed instructions, please? Mercurial seems very helpful, but the learning curve can be quite steep. I presume this requires hg to be involved? ++L

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread kokamoto
On Sat, Jan 15, 2011 at 12:40 PM, lu...@proxima.alt.za wrote: If you try applying http://codereview.appspot.com/3816043/ you can get pretty far.. Your new patch here made me success to make patch. Previous one had problem to patch file_posix.go etc. By the way, now I got the real procedure

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread kokamoto
oups! I got hello: exec header invalid Kenji

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread Skip Tavakkolian
Yes. Drawterm is convenient for executing programs exported in /mnt/term On Jan 15, 2011, at 5:51 PM, kokamoto wrote: However, even if I could make a binary for Plan 9, I have to compile it on linux machine, and move the binary to Plan 9. Am I right?

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-15 Thread kokamoto
Ok, now I got the right procedure to run hello.go. 1) do the patch posted here most recently 2) make sure GOOS=plan9 etc 3) at the top of the source tree, that should be $GOROOT/src 4) ./make.bash it stops at src/pkg/exec. Don't mind it 5) 8g hello.go 6) 8l -s -o hello hello.8 7) copy the

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-14 Thread Anthony Martin
Pavel Zholkover paulz...@gmail.com once said: I have no idea what is causing it to die, I've tried adding a bunch of INT $3 to see how far in the flow I can get, but all I get this: 9vx panic: unknown trap/intr: 0x203 aborting, to dump core. for an INT $3 just before CALL SI //

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-12 Thread Skip Tavakkolian
On Tue, Jan 11, 2011 at 8:25 AM, ron minnich rminn...@gmail.com wrote: can you do a ratrace for me? ron i'll have to rebuild using the vx32 branch on your bitbucket. is it up to date with the changes to compile on linux/x86-64? here it is on acid: % acid 8.hell-o 8.hell-o:386 plan 9

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-12 Thread andrey mirtchovski
slightly different on my mac, so i'll post it: 61: page fault 0x10bc MOVLCX,0xdfffefc0 acid: asm(*PC-32) 0x109c 0x109c ADDBAL,0x0(AX) 0x109e 0x109e ADDBAL,0x4489f0e4(BX) 0x10a4 0x10a4 ANDB$0x78,AL 0x10a6 0x10a6 MOVLBX,0x7c(SP) 0x10aa

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-12 Thread Anthony Martin
ron minnich rminn...@gmail.com once said: are you saying change 8l so that it creates code that works on 9vx in the special case that it runs on a 64-bit system? Then we're going to need to make 8l aware of way too much stuff. I'm talking about Go's linker. In the Go runtime, the G and M

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-12 Thread Charles Forsyth
0xd000 (as it is on native Plan 9). of course, that too can change, but i know you know that, and the current go implementation was just to get going.

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-12 Thread Pavel Zholkover
main9.s sets _tos on entry.  why not just use _tos as the c glue code does? - erik I'm already setting _tos on entry: http://code.google.com/p/go/source/browse/src/pkg/runtime/plan9/386/rt0.s TEXT _rt0_386_plan9(SB),7, $0 MOVLAX, _tos(SB) // move arguments down

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-12 Thread ron minnich
On Wed, Jan 12, 2011 at 12:32 AM, Skip Tavakkolian skip.tavakkol...@gmail.com wrote: On Tue, Jan 11, 2011 at 8:25 AM, ron minnich rminn...@gmail.com wrote: can you do a ratrace for me? ron i'll have to rebuild using the vx32 branch on your bitbucket. is it up to date with the changes to

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread erik quanstrom
On Tue Jan 11 02:55:42 EST 2011, skip.tavakkol...@gmail.com wrote: hell-o.go is like hello.go but uses println. 8.hell-o works properly on a plan9 cpu. but it faults when running on 9vx. i built vx32 -- including 9vx -- on a linux/x86-64 from sources in the last couple of days. % 8.hell-o

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread Devon H. O'Dell
2011/1/11 erik quanstrom quans...@quanstro.net: On Tue Jan 11 02:55:42 EST 2011, skip.tavakkol...@gmail.com wrote: hell-o.go is like hello.go but uses println. 8.hell-o works properly on a plan9 cpu. but it faults when running on 9vx. i built vx32 -- including 9vx -- on a linux/x86-64 from

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread ron minnich
can you do a ratrace for me? ron

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread Charles Forsyth
i suspect go is using segment register(s) to implement extern register, and that isn't expected (or perhaps even supported) by 9vx. just a guess.

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread Pavel Zholkover
I'm typing from my phone so I don't have go sources in front of me, but 0xdfffefc0 looks like the address I used for per thread G and M structs - just bellow struct Tos. Andrey and I also tried running on a 32-bit 9vx with the same effect. Is 9vx using a different memory layout than Plan 9? On

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread ron minnich
On Tue, Jan 11, 2011 at 9:03 AM, Charles Forsyth fors...@terzarima.net wrote: i suspect go is using segment register(s) to implement extern register, and that isn't expected (or perhaps even supported) by 9vx. just a guess. I did not realize this was currently supported by Plan 9 ... maybe I

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread Anthony Martin
Pavel Zholkover paulz...@gmail.com once said: I'm typing from my phone so I don't have go sources in front of me, but 0xdfffefc0 looks like the address I used for per thread G and M structs - just bellow struct Tos. Andrey and I also tried running on a 32-bit 9vx with the same effect. Is

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread Anthony Martin
Anthony Martin al...@pbrane.org once said: The Tos structure is bigger on 64-bit 9vx so the references to GS will need a different offset. You'll have to change both src/8l/pass.c:/^patch and the runtime. I forgot to mention that on 9vx, USTKTOP is at 0x1000. Anthony

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread Pavel Zholkover
I did the runtime port a few month ago, now waiting for http://codereview.appspot.com/3816043/ to get reviewed and committed... there are still a bunch of things missing like linking with symbols, os.ForkExec and environment variables at early runtime. time package is also not ready, so I can't

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread ron minnich
On Tue, Jan 11, 2011 at 10:55 AM, Anthony Martin al...@pbrane.org wrote: Pavel Zholkover paulz...@gmail.com once said: I'm typing from my phone so I don't have go sources in front of me, but 0xdfffefc0 looks like the address I used for per thread G and M structs - just bellow struct Tos.

Re: [9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-11 Thread Charles Forsyth
I did not realize this was currently supported by Plan 9 ... maybe I didn't get the memo? go's 8c/8l convert extern register to references off a segment register, although the implementation of extern register isn't general enough for plan 9 kernel use; it's just enough for go. it sounds as

[9fans] plan9 go output faults on 9vx but ok on cpu

2011-01-10 Thread Skip Tavakkolian
hell-o.go is like hello.go but uses println. 8.hell-o works properly on a plan9 cpu. but it faults when running on 9vx. i built vx32 -- including 9vx -- on a linux/x86-64 from sources in the last couple of days. % 8.hell-o 8.hell-o 270: suicide: sys: trap: page fault pc=0x10bc /dev/kprint