* Re: PC164 SRM problem
2001-10-15 18:05 ` Jay Estabrook
@ 2001-10-15 18:55 ` Matthew Jacob
2001-10-16 9:33 ` Ivan Kokshaysky
2001-10-16 11:43 ` Maciej W. Rozycki
2 siblings, 0 replies; 14+ messages in thread
From: Matthew Jacob @ 2001-10-15 18:55 UTC (permalink / raw)
To: axp-list
I'm kinda curious- why didn't the restore code come back? I mean, if
alphalinux dorks with machine state, surely it should restore it to what the
bootrom requires...
On Mon, 15 Oct 2001, Jay Estabrook wrote:
> On Mon, Oct 15, 2001 at 12:07:22PM -0400, Uncle George wrote:
> > Jay Estabrook wrote:
> >
> > > Alpha Linux does its own setting up of PCI bus resources; in the 2.2
> > > kernels, if booted from SRM, we saved away the original PCI bus
> > > settings, and restored them during shutdown. This doesn't happen under
> > > the 2.4 kernels, and some SRM consoles are more sensitive to the
> > > changed settings than others.
> >
> > Gee, isnt this dangerous. I would presume that u save the settings
> > because you want to change the settings. It would seem that if u
> > pulled the plug on the kernel ( turn off power, hit the reset switch
> > ) your SRM is ( about to be ) confused ? Or is the SRM confused when
> > transfer of control happens from the kernel to the SRM, and the SRM
> > does not recognize the environment that it once knew.
>
> Well, SRM doesn't save it's settings, or get them from NVRAM; ie it's
> not like ISA/EISA configuration info. It rebuilds PCI settings every
> time it powers on. So "pulling the plug" won't confuse it.
>
> However, once it *is* running, it doesn't expect the settings to
> change out from underneath it (T64 and VMS don't do it :-). Linux
> does, and when exiting from kernel to SRM during shutdown, then it
> really *does* get confused. I believe the mchecks or PCI errors and
> such are caused when SRM tries to use either its own registers or its
> data from memory that now no longer accurately reflect the PCI
> configuration.
>
> --Jay++
>
> -----------------------------------------------------------------------------
> Jay A Estabrook Alpha Engineering - LINUX Project
> Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
> 200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
> -----------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-15 18:05 ` Jay Estabrook
2001-10-15 18:55 ` Matthew Jacob
@ 2001-10-16 9:33 ` Ivan Kokshaysky
2001-10-16 11:55 ` Jay Estabrook
2001-10-16 11:43 ` Maciej W. Rozycki
2 siblings, 1 reply; 14+ messages in thread
From: Ivan Kokshaysky @ 2001-10-16 9:33 UTC (permalink / raw)
To: axp-list
On Mon, Oct 15, 2001 at 02:05:23PM -0400, Jay Estabrook wrote:
> Well, SRM doesn't save it's settings, or get them from NVRAM; ie it's
> not like ISA/EISA configuration info. It rebuilds PCI settings every
> time it powers on. So "pulling the plug" won't confuse it.
>
> However, once it *is* running, it doesn't expect the settings to
> change out from underneath it (T64 and VMS don't do it :-). Linux
> does, and when exiting from kernel to SRM during shutdown, then it
> really *does* get confused. I believe the mchecks or PCI errors and
> such are caused when SRM tries to use either its own registers or its
> data from memory that now no longer accurately reflect the PCI
> configuration.
Isn't there some environment variable (boot_reset = ON ?) that causes
SRM to re-initialize the buses on halt/reboot?
Resurrecting 2.2 code wouldn't be too hard, and I thought about that
a while back, but it looked to me just as a waste of kernel memory then...
Another possible reason of those machine checks: we change PCI windows
mapping, and save/restore it for tsunami machines, but not for older
systems. This might confuse SRM as well, isn't it?
Ivan.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-16 9:33 ` Ivan Kokshaysky
@ 2001-10-16 11:55 ` Jay Estabrook
0 siblings, 0 replies; 14+ messages in thread
From: Jay Estabrook @ 2001-10-16 11:55 UTC (permalink / raw)
To: axp-list
On Tue, Oct 16, 2001 at 01:33:24PM +0400, Ivan Kokshaysky wrote:
>
> Isn't there some environment variable (boot_reset = ON ?) that causes
> SRM to re-initialize the buses on halt/reboot?
I think it only does it when you start to boot, rather than when
you re-enter SRM from the Linux kernel. Unfortunately, the problems
show up upon the re-entry, rather than at the boot... :-\
> Resurrecting 2.2 code wouldn't be too hard, and I thought about that
> a while back, but it looked to me just as a waste of kernel memory then...
Yes, it shouldn't be too hard to port forward. I believe the reason it
wasn't done as part of the 2.4 development was that a *lot* of changes
were taking place *generically* in that area (PCI bus probing), and
rather than confuse the issue on Alpha, the save-restore code was left
out.
> Another possible reason of those machine checks: we change PCI windows
> mapping, and save/restore it for tsunami machines, but not for older
> systems. This might confuse SRM as well, isn't it?
Yes, the window settings could certainly be a factor, if not the main
problem...
BTW, we (COMPAQ) have done some testing on the latest boxes (ES45 and
beyond) with NOT changing the SRM settings. It seems to work quite
well, though the reasons may be more related to the fact that these
later boxes have more "standards-conformant" hardware/console than
the earlier ones, making it less difficult to translate the settings
into something that Alpha Linux can use. The issue here is mainly in
the IRQ settings and interrupt delivery rather than in DMA windows or
resource addresses.
--Jay++
-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-15 18:05 ` Jay Estabrook
2001-10-15 18:55 ` Matthew Jacob
2001-10-16 9:33 ` Ivan Kokshaysky
@ 2001-10-16 11:43 ` Maciej W. Rozycki
2001-10-16 13:07 ` Ivan Kokshaysky
2 siblings, 1 reply; 14+ messages in thread
From: Maciej W. Rozycki @ 2001-10-16 11:43 UTC (permalink / raw)
To: axp-list
On Mon, 15 Oct 2001, Jay Estabrook wrote:
> However, once it *is* running, it doesn't expect the settings to
> change out from underneath it (T64 and VMS don't do it :-). Linux
> does, and when exiting from kernel to SRM during shutdown, then it
> really *does* get confused. I believe the mchecks or PCI errors and
I always wondered why the resource reassignment is required at all.
Wouldn't the settings as left by SRM work for us (since they work for the
others)? I recall concerns about PCI-PCI bridges, but no details...
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-16 11:43 ` Maciej W. Rozycki
@ 2001-10-16 13:07 ` Ivan Kokshaysky
2001-10-16 13:50 ` Maciej W. Rozycki
0 siblings, 1 reply; 14+ messages in thread
From: Ivan Kokshaysky @ 2001-10-16 13:07 UTC (permalink / raw)
To: axp-list
On Tue, Oct 16, 2001 at 01:43:01PM +0200, Maciej W. Rozycki wrote:
> I always wondered why the resource reassignment is required at all.
> Wouldn't the settings as left by SRM work for us (since they work for the
> others)? I recall concerns about PCI-PCI bridges, but no details...
Yes, it was the main issue. Some [old] consoles leave the bridges completely
or partially uninitialized, hence devices behind those bridges were unusable.
Ivan.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-16 13:07 ` Ivan Kokshaysky
@ 2001-10-16 13:50 ` Maciej W. Rozycki
2001-10-16 15:13 ` Ivan Kokshaysky
0 siblings, 1 reply; 14+ messages in thread
From: Maciej W. Rozycki @ 2001-10-16 13:50 UTC (permalink / raw)
To: axp-list
On Tue, 16 Oct 2001, Ivan Kokshaysky wrote:
> > I always wondered why the resource reassignment is required at all.
> > Wouldn't the settings as left by SRM work for us (since they work for the
> > others)? I recall concerns about PCI-PCI bridges, but no details...
>
> Yes, it was the main issue. Some [old] consoles leave the bridges completely
> or partially uninitialized, hence devices behind those bridges were unusable.
OK, then (re)assigning resources to these bridges and devices behind them
should not affect SRM operation since it doesn't case anyway. But why to
reassign the remaining initialized resources then?
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-16 13:50 ` Maciej W. Rozycki
@ 2001-10-16 15:13 ` Ivan Kokshaysky
2001-10-17 10:47 ` Maciej W. Rozycki
0 siblings, 1 reply; 14+ messages in thread
From: Ivan Kokshaysky @ 2001-10-16 15:13 UTC (permalink / raw)
To: axp-list
On Tue, Oct 16, 2001 at 03:50:34PM +0200, Maciej W. Rozycki wrote:
> OK, then (re)assigning resources to these bridges and devices behind them
> should not affect SRM operation since it doesn't case anyway. But why to
Newer SRMs do handle bridges properly, and this might affect them as well
(in theory).
> reassign the remaining initialized resources then?
Main reason is to keep the code clean and avoid endless list of special
cases. Save/restore of the PCI setup is the only viable option, IMHO.
Ivan.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-16 15:13 ` Ivan Kokshaysky
@ 2001-10-17 10:47 ` Maciej W. Rozycki
2001-10-17 14:18 ` Ivan Kokshaysky
0 siblings, 1 reply; 14+ messages in thread
From: Maciej W. Rozycki @ 2001-10-17 10:47 UTC (permalink / raw)
To: axp-list
On Tue, 16 Oct 2001, Ivan Kokshaysky wrote:
> > OK, then (re)assigning resources to these bridges and devices behind them
> > should not affect SRM operation since it doesn't case anyway. But why to
>
> Newer SRMs do handle bridges properly, and this might affect them as well
> (in theory).
Only if we change their configuration, which we don't have to.
> > reassign the remaining initialized resources then?
>
> Main reason is to keep the code clean and avoid endless list of special
What about a set of rules instead of special cases? It seems to work for
i386, where PCI setups are notoriously broken, yet only conflicting
resources get reassigned.
> cases. Save/restore of the PCI setup is the only viable option, IMHO.
But it doesn't work well, either. If you get dumped back to SRM due to
an exception, the whole configuration remains messed up.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-17 10:47 ` Maciej W. Rozycki
@ 2001-10-17 14:18 ` Ivan Kokshaysky
2001-10-17 15:10 ` Maciej W. Rozycki
0 siblings, 1 reply; 14+ messages in thread
From: Ivan Kokshaysky @ 2001-10-17 14:18 UTC (permalink / raw)
To: axp-list
On Wed, Oct 17, 2001 at 12:47:09PM +0200, Maciej W. Rozycki wrote:
> What about a set of rules instead of special cases? It seems to work for
> i386, where PCI setups are notoriously broken, yet only conflicting
> resources get reassigned.
And what if one of these resources is critical for console operation, and
other isn't, how can you determine which one to reassign?
Besides, i386 code can't handle uninitialized PCI-PCI bridges. At all.
I believe the main reason why i386 port doesn't use "setup PCI yourself"
approach is that there are lots and lots of various x86 host-to-pci bridges,
and very few of them are documented.
> > cases. Save/restore of the PCI setup is the only viable option, IMHO.
>
> But it doesn't work well, either. If you get dumped back to SRM due to
> an exception, the whole configuration remains messed up.
Good point. That was one of the reasons why I thought that save/restore
code isn't very useful. However, most likely such an exception would mean
that something is screwed up anyway...
Ivan.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PC164 SRM problem
2001-10-17 14:18 ` Ivan Kokshaysky
@ 2001-10-17 15:10 ` Maciej W. Rozycki
0 siblings, 0 replies; 14+ messages in thread
From: Maciej W. Rozycki @ 2001-10-17 15:10 UTC (permalink / raw)
To: axp-list
On Wed, 17 Oct 2001, Ivan Kokshaysky wrote:
> And what if one of these resources is critical for console operation, and
> other isn't, how can you determine which one to reassign?
If one of the resources is critical then it already got initialized.
That is it does not conflict (overlap) with any other or the system
wouldn't function (couldn't use the device). Thus it need not be
changed. If certain resources conflict with one another (likely due to
power-on defaults) they are all unusable and may certainly be
reinitialized anyhow.
> Besides, i386 code can't handle uninitialized PCI-PCI bridges. At all.
> I believe the main reason why i386 port doesn't use "setup PCI yourself"
> approach is that there are lots and lots of various x86 host-to-pci bridges,
> and very few of them are documented.
Actually classic PCI-PCI bridges (e.g. DEC's 21x5x) are very rare in i386
systems, although it might be worth checking how often they get properly
initialized by firmware (I don't have a card with a bridge to test,
unfortunately).
More frequent are peer host bridges, such as the one included in the
i450KX/GX chipset or all AGP chipsets. Most if not all Intel chipsets are
documented sufficiently, others might not. But there is usually no need
to configure them -- they are not standard PCI devices with explicit
resources. They usually hardwire the address range they decode to devices
that are directly attached to them (mainly the host's memory).
Other devices need resource allocation as usual and that happens either
directly using PCI configuration space accesses or via firmware calls,
which also use configuration accesses but may be needed if a host bridge
is not documented sufficiently enough. It's even quite likely to see PCI
devices left completely uninitialized by i386 firmware due to the infamous
PnP standard.
In short the absence of handling of PCI-PCI bridges for i386 systems is
likely due to the lack of interest.
> > But it doesn't work well, either. If you get dumped back to SRM due to
> > an exception, the whole configuration remains messed up.
>
> Good point. That was one of the reasons why I thought that save/restore
> code isn't very useful. However, most likely such an exception would mean
> that something is screwed up anyway...
Of course, and you may wish to do additional diagnostics within SRM
before you reset the system losing the ability to recover system's state
at the time of the fault completely. Or you may want the system to reboot
automatically (I'm not sure it was possible to be set up, though).
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 14+ messages in thread