Re: [9fans] sdkw - SATA drive detection broken (was ARM and u-boot)

2014-03-11 Thread Alex Ivanov
09 марта 2014 г., в 18:11, erik quanstrom  написал(а):

Erik, thanks for the quick answer!

> this is fun.  i wrote this driver a long time ago.  but all the little
> quirks (even of the documentation) come back quickly.  i put
> the kernel i'm running up on 9atom  you can download them
> @
>   http://ftp.9atom.org/other/9plug
>   http://ftp.9atom.org/other/s9plug
> or
>   9fs atom; fcp /n/atom/ftp/*9plug /some/where
> 
> please try that kernel and let me know.  since the driver
> does hotplugging, it might be after you've connected to the file
> server that you get a connection.

Are these ones differ from those built from source after unrolling of 
9atom.iso.bz2?
Sry, but i’m a total Plan 9 noob and can’t set a working file+auth server. Any 
guides i was followed were either misleading or wrong at some step.
Anyway, since i’m never getting Spresent bit in Sstatus (no matter how much 
time passed after the boot), status change will not ever come.

> 
> also try unplugging the usb devices.  

Have them unplugged all the time.
BTW, anyone plans to work on USB flash storage support, so we can just use some 
USB drives to boot from?

> the host bridge error is
> omnious.  often a host bridge error will screw up multiple devices.

So it may be a culprit?

> 
> here's the results i get
> 
>   kw# cat /dev/kmesg
>   127 holes free
>   009a9000 03be5000 52674560
>   52674560 bytes free
>   l1 D: 16384 bytes, 4 ways 128 sets 32 bytes/line; write-through only
>   l1 I: 16384 bytes, 4 ways 128 sets 32 bytes/line; write-back type `reg 
> 7 ops, format C' (016) possible
>   l2 cache: 256K or 512K: 4 ways, 32-byte lines, write-back, sdram only
>   cpu0: 1200MHz ARM Marvell 88F6281 A0; arm926ej-s arch v5te rev 2.1 part 
> 131
>   #S/sd0: sata ii 2 ports
>   #F0: kwnand: Hy27UF084G2M 536,870,912 bytes pagesize 2048 erasesize 
> 131,072 spares per page 64
>   #l0: 88e1116: 1000Mbps port 0xf1072000 irq 11 tu 1514: 00504301db37
>   #l1: 88e1116: 1000Mbps port 0xf1076000 irq 15 tu 1514: 00504301db38
>   #u/usb/ep1.0: ehci: port 0xf1050100 irq 19
>   preallocate 16384 x 4096 KB 0x03be5000-0x07be5000
>   504M memory: 52M kernel data, 452M user, 0M swap
>   usb/hub... version...time...
>   
>   init: starting /bin/rc
>   kw# sd01: status: 000 -> 123: new
>   sd01: llba 78,165,360 sectors
> INTEL SSDSA2M040G2GC 2CV102HD CVGB03800093040NGN [newdrive]
> 
> 
>   kw# cat /dev/sd00/ctl
>   inquiry 
>   state   null
>   sig 
>   linkdown
>   sstatus 
>   serror  
>   sctl0300
>   isr 00804000
>   icfg009b7095
>   ifccr   
>   geometry 0 0
> 
> 
>   kw# cat /dev/sd01/ctl
>   inquiry INTEL SSDSA2M040G2GC
>   state   ready
>   sig 01010101
>   model   INTEL SSDSA2M040G2GC
>   serial  CVGB03800093040NGN
>   firm2CV102HD
>   wwn 50015179593f82f0
>   tler5000
>   linkup
>   sstatus 0123
>   serror  1401
>   sctl0300
>   isr 00404034
>   icfg009b7095
>   ifccr   
>   geometry 78165360 512
>   part data 0 78165360
> 
> you mention that the first thing you do is this
> 
>   d->reg[Sctl] = 3*Aipm | 0*Aspd | Adet; (I’m omitting | 3*Aspm as it 
> done in NetBSD, though the results are bad even with it).
> 
> this doesn't jive with the sata spec (the ahci spec, which for the S registers
> mirrors it, is more accessible).  it may be beneficial to read the spec.
> the actions that need to be done are
>   1.  clear the Serror register (sdkw:1228)
>   2.  set the Icfg register (sdkw:1229)
>   (the setting of emphasis was a guess and could be wrong for
>   your device.  it may also vary by device.)
>   3.  reset the phy.  this is a 3 step process in linkrst()
>   a) turn on device detection
>   b) wait 1ms  (unsure of this timing,  it could be longer)
>   c) turn off device detection
> 
> 3*Aspm requests transition to active state.  if you get bad results
> by turning the device on, then something else is wrong.  :-)
> 
> in fact you mention that Sctl = 300, which means that the device
> is asleep. (Iactive|Isleepy if you follow pc/ahci.h)
> 
>> Not changed at all… WTF?
> 
> you must clear the error register first.

You’re absolutely right, but i’m in the same situation (status = 0) even with 
the whole init routine, which your driver does.

>   (the setting of emphasis was a guess and could be wrong for
>   your device.  it may also vary by device.)

I will check it.

>   b) wait 1ms  (unsure of this timing,  it could be longer)

Not my case. Already tried to bump this delay.

Ok… I will trace everything when using proper initialization, but i doubt it 
will clear anything, since i was not followed SATA spec, and did ju

[9fans] GSoC proposal: Ventilator or Access to host's devices

2014-03-11 Thread tuchalia
Hi everyone!

I'm trying to get to work on the Ventilator project during the GSoC, and in
order to have a good proposal I'm asking for some information here.
Where should I start looking?


Also, I have just seen this:
http://www.vitanuova.com/inferno/man/2/venti.html
Is it still possible to get to work on this as a SoC project?

If it isn't, I may still be interested on working on "Access to host's
devices*"*, so where can I start looking with that?

-- 
Daniel


Re: [9fans] first questions from a lurker

2014-03-11 Thread Peter Hull
On Mon, Mar 10, 2014 at 4:55 PM, Bakul Shah  wrote:
> Others have answered what to do within plan9. On the
> virtualbox side you need to attach to 'bridged adapter'
> instead of NAT.  Pick the right "name" (which is really the
> interface name on the host) -- wi-fi (airport) for instacnce
> if you are on a MBP.  I think the default adapter type should
> work (Intel pro/1000 MT desktop). You may also have to tell
> the dhcp server about mac address  etc. depending on how it is
> set up.
In my experience*, only the Intel Pro/1000 MT Server works. What did
you want to do with your Plan 9 installation? If you just want a
standalone system that can make outgoing connections, then NAT mode
works fine - in that case DHCP is provided by VirtualBox itself and it
passes through the ip addresses of the DNS servers from the host. If
you want external systems to make connections to Plan 9 servers then
you'll need Bridged mode as Bakul says.



Pete
* The Bell Labs distribution in VirtualBox 4.3.8 on Windows host.



Re: [9fans] How to access CD drive?

2014-03-11 Thread Steve Foster
A bit of an update.
Well I decided not to abandon the idea after all and give it another go.
Along with the info in your replies (thanks again) and some other stuff I found 
on the net I now have:
Drawterm working on the host and my laptop.
Networking is now working and I can access the internet using abaco.
I can work completely in plan 9 if I want to and move files around between it 
and the host using drawterm.
I'm still trying to figure out how to get cifs working so am still working on 
that.
I have figured out how to access the CD drive. However, guestadditions won't 
install, but I didn't think they would, just wanted to make sure.
The whole 'everything is a file' thing is starting to become a little more 
clear now.
What has surprised me is how much I like working in plan 9, particularly acme. 
I've even grown to like the way it looks including the colours. It doesn't get 
in the way. I'm fortunate that most of what I do is text based so I only need 
to dive into Windows or Linux for graphics stuff etc.
Does anyone work exclusively in plan 9 or is that not feasible so you think?
Thanks for your help again.
> Date: Sun, 9 Mar 2014 20:57:39 +0100
> From: beg...@gmail.com
> To: 9fans@9fans.net
> Subject: Re: [9fans] How to access CD drive?
> 
> Cifs on windows 7 worked for me after doing the registry workaround
> mentioned in the README of cifs
> 
> 2014-03-09 18:02 GMT+01:00, Skip Tavakkolian :
> > unfortunately virtualbox "shared folders" would require a special driver
> > [1] on the guest (i.e. Plan 9) os. the easier route is to figure out the
> > network and then use cifs (SMB client on plan9) or sftpfs to import the
> > host windows folders into plan 9. this is the recommended method [2] in
> > virtualbox documentation.
> >
> > [1] https://www.virtualbox.org/manual/ch04.html#sharedfolders
> > [2] https://www.virtualbox.org/wiki/Sharing_files_on_OSE
> >
> >
> >
> > On Sun, Mar 9, 2014 at 1:28 AM, Steve Foster  wrote:
> >
> >> Hi all.
> >>
> >> I'm new here and to plan 9.
> >>
> >> I'm the kind of person who doesn't always pick things up straight away,
> >> I'm a bit slow like that :-) The light bulb usually goes on - eventually.
> >> Sometimes I just need someone to flick the switch a few times. So if my
> >> questions come across as a bit dumb you'll know why.
> >>
> >> OK, so I'm new to Plan 9. I've managed to install it in virtualbox
> >> (Windows 7 host) and can log in and use it. I've also installed plan9port
> >> onto Lubuntu, also running in a virtual machine.
> >>
> >> Acme has become my main work environment now, I was an emacs user. I like
> >> acme a lot and spend most of my time in there (I'm writing this post in
> >> it). I use two screens; one with acme (plan9port) and the other with
> >> everything else. This set up is working well for me and I'm happy to
> >> carry
> >> on working like this.
> >>
> >> However, I would love to try working with acme in plan 9 itself. Well, I
> >> can use it with no problems (so far anyway), but I can't get networking
> >> or
> >> shared folders (virtualbox shared folders) working. This means,
> >> obviously,
> >> that plan 9 is isolated from the outside world so any work I do is stuck
> >> in
> >> there. Now, I'm trying ot get my head around the whole plan 9 thing and
> >> how
> >> it works. I admit I'm struggling with it, but don't want to give up just
> >> yet.
> >>
> >> So for starters, does anyone know how to get shared folders (virtualbox
> >> shared folders) working in plan 9, I have them working OK in Lubuntu so
> >> no
> >> problem there.? I know you have to install the virtualbox guest additions
> >> and  this is easy to do, but...
> >>
> >> This shows how much of a doofus I am. I don't know how to access the CD
> >> drive in plan 9 which is where the guest additions would be installed
> >> from.
> >> How do I do this please? I have searched, but have not managed to find
> >> the
> >> answer, or maybe I have found it and didn't understand it.
> >>
> >> I've been reading the 9fan archives and realise that technically all you
> >> chaps are way above me (as you can tell from my question) so please be
> >> patient with me :-)
> >>
> >> I also can't get networking to work which may or may not be related to
> >> the
> >> above, I'm not sure. I have tried the different suggestions I've found,
> >> but
> >> nothing seems to work. If I could just get shared folders working that
> >> would be great to start with.
> >>
> >> Thanks,
> >> Steve.
> >>
> >
> 
  

Re: [9fans] How to access CD drive?

2014-03-11 Thread andrey mirtchovski
> What has surprised me is how much I like working in plan 9, particularly
> acme. I've even grown to like the way it looks including the colours.

the colour palette has been specifically chosen to be easy on the eyes.



Re: [9fans] How to access CD drive?

2014-03-11 Thread erik quanstrom
> Does anyone work exclusively in plan 9 or is that not feasible so you think?

i do.  and many of the folks at the labs did.

since the subject is cd drive access, one of the things that i found much
easier with plan 9 is cd access.  not only is it dead simple, and utterly
seamless with the rest of the system, it's so much better than the author of
cdparanoia whining to you about choices the designers of $unixsystem
made.

- erik



Re: [9fans] How to access CD drive?

2014-03-11 Thread Steve Foster


> From: quans...@quanstro.net
> Date: Tue, 11 Mar 2014 10:55:32 -0400
> To: 9fans@9fans.net
> Subject: Re: [9fans] How to access CD drive?
> 
> > Does anyone work exclusively in plan 9 or is that not feasible so you think?
> 
> i do.  and many of the folks at the labs did.
> 
> since the subject is cd drive access, one of the things that i found much
> easier with plan 9 is cd access.  not only is it dead simple, and utterly
> seamless with the rest of the system, it's so much better than the author of
> cdparanoia whining to you about choices the designers of $unixsystem
> made.
> 
> - erik
> 

Thanks erik. I agree that cd access is easy, now that I know how. I'm going to 
try working in plan 9 as much as I can and continue learning about it.
If I could ask you another couple of questions.
I do use linux. I've started learning C programming. I have been using linux as 
the platform to learn on. I was thinking of changing over to plan 9 for this as 
well. Would you recommend doing this? I'm not thinking of it from a work 
viewpoint so that's not an issue, but I like the idea of being able to 
(hopefully, eventually) understand something as a whole and not just bits and 
bobs. As I understand it this is possible with plan 9?
Do you run plan 9 in a virtual machine or on native hardware?
Cheers,Steve. 

Re: [9fans] How to access CD drive?

2014-03-11 Thread Steve Foster


> Date: Tue, 11 Mar 2014 08:50:45 -0600
> From: mirtchov...@gmail.com
> To: 9fans@9fans.net
> Subject: Re: [9fans] How to access CD drive?
> 
> > What has surprised me is how much I like working in plan 9, particularly
> > acme. I've even grown to like the way it looks including the colours.
> 
> the colour palette has been specifically chosen to be easy on the eyes.
> 

And it is! I used to spend ages fiddling with different colour schemes in emacs 
and sublime text (basically it's a distraction for me) and it's a relief not to 
have that option any more. I believe you can change it at code level, but I see 
no need too.  

Re: [9fans] How to access CD drive?

2014-03-11 Thread erik quanstrom
> learning about it.  If I could ask you another couple of questions.  I
> do use linux.  I've started learning C programming.  I have been using
> linux as the platform to learn on.  I was thinking of changing over to
> plan 9 for this as well.  Would you recommend doing this?  I'm not

heck, ya!

learning c is easier when the system doesn't add a layer of difficulty.
i've found it to be a great help to be able to read the header files, and
dive into the libraries without finding a maze of twisty passages.

learning the standard way of doing things is a bit of trivia that can
be done later.

> this is possible with plan 9?  Do you run plan 9 in a virtual machine
> or on native hardware?

native.  sadly, i have not made much time for virtual machines.
i currently run amd64, mips (routerboard), arm (openrd and rpi).

- erik



Re: [9fans] How to access CD drive?

2014-03-11 Thread Patrick Kelly
>From: 9fans-boun...@9fans.net [mailto:9fans-boun...@9fans.net] On Behalf Of
Steve Foster
>Sent: Tuesday, March 11, 2014 12:02 PM
>To: Fans of the OS Plan 9 from Bell Labs
>Subject: Re: [9fans] How to access CD drive?
>
>
>> Date: Tue, 11 Mar 2014 08:50:45 -0600
>> From: mirtchov...@gmail.com
>> To: 9fans@9fans.net
>> Subject: Re: [9fans] How to access CD drive?
>> 
>> > What has surprised me is how much I like working in plan 9,
particularly
>> > acme. I've even grown to like the way it looks including the colours.
>> 
>> the colour palette has been specifically chosen to be easy on the eyes.
>> 
>
>And it is! I used to spend ages fiddling with different colour schemes in
emacs and sublime text (basically it's a distraction for me) and it's a
relief not to have that option any more. I believe you can change it at code
level, but I see no need too.

Research is nearly always neglected, unless the research shows higher
profits. Pretty sells machines, but is hard on the eyes when actually
working. Plan 9 is gorgeous, in a different, but easily arguable, way than
OS X or recent UNIX GUI's.



Re: [9fans] How to access CD drive?

2014-03-11 Thread Steve Simon
> Does anyone work exclusively in plan 9 or is that not feasible so you think?

I work almost exclusively on plan9, I have it on my desktop at work
and a server and Raspberry Pi at home. Having said this I also have
a Windows VM at work (via remote desktop), and an ipad at home to 
give me a modern web browser when I need one.
 
Whether its feasible is a personal decision. What tools do you need
and what do you want to do? I enjoy plan9, its code hygiene, the
simplicity of admin, trying new (file server based) ways of solving
old problems etc.

> I'm still trying to figure out how to get cifs working so am still working on 
> that.

Which way round, cifs server or client on plan9?

The plan9 client was one of mine so if you have problems
I will attempt to help.

-Steve



Re: [9fans] How to access CD drive?

2014-03-11 Thread Steve Foster
> From: st...@quintile.net
> Date: Tue, 11 Mar 2014 16:46:00 +
> To: 9fans@9fans.net
> Subject: Re: [9fans] How to access CD drive?
> 
>> Does anyone work exclusively in plan 9 or is that not feasible so you think?
> 
> I work almost exclusively on plan9, I have it on my desktop at work
> and a server and Raspberry Pi at home. Having said this I also have
> a Windows VM at work (via remote desktop), and an ipad at home to 
> give me a modern web browser when I need one.
> 
> Whether its feasible is a personal decision. What tools do you need
> and what do you want to do? I enjoy plan9, its code hygiene, the
> simplicity of admin, trying new (file server based) ways of solving
> old problems etc.
> 

I should be able to do most of what I need to in plan9. I would say about 90% 
of what I do is text based so I spend a lot of time in acme.

>> I'm still trying to figure out how to get cifs working so am still working 
>> on that.
> 
> Which way round, cifs server or client on plan9?
> 
> The plan9 client was one of mine so if you have problems
> I will attempt to help.

I have Windows 7 as host with plan9 in a virtual machine. I want to be able to 
access directories on the host directly from plan9. So I think it would be the 
client on plan9. I did find some instructions on how to set this up which I've 
lost and am trying find again.

It involved installing two things. The first one seemed to go OK, but the 
second (your client I think) failed with an error message that said something 
along the lines of "no replica" and mentioned your name.

Hope that helps.

Cheers,
Steve.

> 
> -Steve
> 


Re: [9fans] How to access CD drive?

2014-03-11 Thread Steve Simon
Mmm, not sure what the two things might have been.

There is a registry tweek for Vista, and Win7 you need to support
the raw/simple NTLMV2 auth:

http://support.microsoft.com/kb/957441.

I haven't tried Win8 yet, I have no win8 machines I need access to,
but I wouldn't be surprised if it is the same.

Alternatively the -a option can be used to force cifs to use one
of the less secure authentication mechnisms, e.g.

cifs -a ntlm hostname

also, check the cifs manpage, it generates a top level directory of
virtual files, mixed with the top level share names (often 'c'),
a bad design choice with hindsight, they should have been selected
with an atatch specifier but I wrote this a long time ago.

email me off-list if you still have problems.

-Steve



Re: [9fans] sdkw - SATA drive detection broken (was ARM and u-boot)

2014-03-11 Thread Steve Simon
I am in no position to help, sorry, however I would love to
have access to a plan9 port to the HP t5325.

-Steve



Re: [9fans] GSOC 2014 proposal for Plan 9

2014-03-11 Thread yan cui
Dear All,

  My proposal "Plan9 Kernel MCS lock with a Compatible Calling
Interface"
for GSoC 2014 has been submitted. It is currently visible to all
organization members.
Please give comments on this proposal if you are interested in it. There
are several days
before the deadline. So, take the time and enjoy the proposal!


Best Wishes!
Yan


2014-03-09 16:42 GMT-04:00 yan cui :

> Erik, thanks for your reply! I will read the document carefully and submit
> an application.
>
>
>
> Best Wishes!
> Yan
>
>
> 2014-03-09 16:30 GMT-04:00 erik quanstrom :
>
> On Sun Mar  9 15:32:48 EDT 2014, ccuiy...@gmail.com wrote:
>>
>> > Dear All,
>> >
>> > I am a student of Columbia university(Yan Cui) and want to
>> > contribute to
>> > plan 9 in google summer code.  I am interested in one idea posted on
>> > the idea list, which is titled "MCS locks (i.e.  queueing locks) for
>> > the kernel with a compatable calling interface to
>> > *lock*(9)".
>> > Actually, my research direction is operating system scalability on
>> > multicore systems and knows kinds of synchronization methods very well
>> > including Linux kernel ticket lock, MCS lock, CLH lock, etc.  For MCS
>> > lock, I have done many experiments (such as replacing the Linux kernel
>> > spin lock with MCS lock) and made improvements to it.  I think I have
>> > all backgrounds and experiences required.  I believe I can complete
>> > the task in time.  Wonder to know can I join you in the Plan 9
>> > development?
>>
>> excellent!  i think you will find that plan 9 lends itself to this
>> sort of work.  you are certainly welcome at any time to join plan 9
>> development.
>>
>> the key here is to work out how to keep the existing lock api.
>> this is described here: http://www.9atom.org/magic/man2html/9/lock
>> i've prototyped this in user space, but did not get any further.
>>
>> as for gsoc, please do submit an application.  there does happen to
>> be another student interested in MCS locks.  so we may need to
>> work out something to avoid having to pick between two good
>> applications.  but i am confident that we can figure this out as
>> things move forward.
>>
>> if you have any more questsion, please ask the list, or contact
>> me off list via email or g+.
>>
>> cheers!
>>
>> - erik
>>
>>
>
>
> --
> Think big; Dream impossible; Make it happen.
>



-- 
Think big; Dream impossible; Make it happen.