Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: UNS: Re: netbsd-5.1 cpu probe/attach for 11/7xx?

On 2011-06-28 02:12, Brad Parker wrote:
Johnny Billquist wrote:

I'm proposing a simple fix to make that code (which once worked) work

Ok. I had to check things through a little more to refresh my memory.
Yes, there is a cpu_attach function for all cpus. But as far as I can
tell, it is also called for all CPUs.
yes, good. But that function is never called on a 7xx. Those lines of
code never execute, which is the point
of my original bug report. cpu_mainbus_attach is only called if the
config is set up correctly.

Ok. I must start by saying that I have not tested anything in the last five months, so things might have become broken since then. But I have been peeking around some, and I can't see any commits of relevance to the various files under VAX being done this spring/summer, so I would think that it still works as well(?) as it did this winter.

First question is what config file you use to build your kernel?

Second: How do you know that they are not called?

It will take some setting up for me to try this with simh, so I'm a bit reluctant to do that. I'm normally trying on real hardware, and don't have any 11/780. :-)

However, I've run NetBSD-current about 5 months ago on a 8650, and the ka86_attach_cpu() function was called there, which is absolutely through the same mechanism as for the 11/780.
So I find it a bit surprising that you claim that it is not called.

If you build 5.1 and run it on a 7xx you'll find that cpu probe
functions are never called because of two
reasons (outlined in my original email).

I never said that any probe function is called. There is no need to, since we already know exactly what CPU exists, so the attach function is called directly without any probing. The "probing" that is done, is in locore.c.

In fact, I can't even find any cpu probe function for the VAX-11/780.

It's done in autoconf.c at line 186:

if (dep_call->cpu_attach_cpu != NULL)
that code never executes on an 11/7xx. I propose to fix that.

Sos it's not really called through the normal autoconf paths using the
config file.
well, yes and no. In fact, it is, as that code will not get executed
unless you "fix" the
config file and the cpu match code (see my original email).

Reading through your original mail again, I'm a bit confused. You say that you added "cpu* at mainbus0" to the config file. But such a line already exists in the GENERIC config. Where did you add it? (In GENERIC, it is at line 177)

Second, the patch you posted to autoconf.c is for revision 1.90, which is dated 11-Mar-2008. The current version is 1.92. While it's NetBSD 5, it is not current. Might be better to work against current, when you do work (just a suggestion).

True. locore sets up the CPU information. autoconf then calls the
actual attach function. Not through some probing, but directly, as the
CPU is already known to exist, and we already know which type.
Sort of true, but that cpu_attach_cpu code is only called if the config
is set up correctly.
So yes, not as the result of probing, but not directly.

build for a 780 and try it on simh and you'll see.

I might have to do that, but it will take some time and work, which I'm short on right now.

I'd rather talk about the proper fix, to be honest.

I'm still not convinced it isn't working.


Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol

Home | Main Index | Thread Index | Old Index