[prev in list] [next in list] [prev in thread] [next in thread]
List: openbios
Subject: Re: [OpenBIOS] b?branch
From: Jd Lyons <lyons_dj () yahoo ! com>
Date: 2018-01-02 16:39:54
Message-ID: 22A4A395-0CA3-4E34-ACFF-699CE16F5E95 () yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Jan 1, 2018, at 7:06 AM, Jd Lyons <lyons_dj@yahoo.com> wrote:
>
>
>
> > On Dec 31, 2017, at 1:09 PM, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> \
> > wrote:
> > On 31/12/17 12:59, Jd Lyons wrote:
> >
> > > > On Dec 30, 2017, at 6:04 AM, Segher Boessenkool <segher@kernel.crashing.org \
> > > > <mailto:segher@kernel.crashing.org>> wrote:
> > > > On Sat, Dec 30, 2017 at 05:44:10AM -0500, Jd Lyons wrote:
> > > > > > On Dec 30, 2017, at 4:21 AM, Segher Boessenkool \
> > > > > > <segher@kernel.crashing.org <mailto:segher@kernel.crashing.org>> wrote: \
> > > > > > On Fri, Dec 29, 2017 at 08:27:54PM -0500, Tarl Neustaedter wrote:
> > > > > > > [re-send, copying the list. For whatever reason, it seems messages
> > > > > > > aren't getting the reply-to: header.]
> > > > > > >
> > > > > > > On 2017-Dec-29 03:58 , Jd Lyons wrote:
> > > > > > > > 0 > " /pci/@e" open-dev to my-self ok
> > > > > > > > 0 > my-self . 5fc5ac34 ok
> > > > > > > > 0 > my-parent . 5fc5abfc ok
> > > > > > > > 0 > my-space . 0 ok <<---Seems my-space isn't returning a correct \
> > > > > > > > value? 0 >
> > > > > > > >
> > > > > > > That's the problem. It appears that simply open-dev and assigning
> > > > > > > my-self isn't enough. my-space (and my-address and my-unit) aren't
> > > > > > > getting set up, so all config-space accesses are going to do the wrong
> > > > > > > thing (they'll go to device 0, which may or may not be the root).
> > > > > > >
> > > > > > > In the Sun/Oracle version, select would properly set things up, it
> > > > > > > appears no equivalent is available under openbios.
> > > > > > >
> > > > > > > I think you'll have to further debug this by getting the FCode to be
> > > > > > > pulled in at startup in place of the built-in vga fcode, rather than
> > > > > > > trying to fiddle things this way.
> > > > > >
> > > > > > Or set my-space to return 7000 and keep on fumbling :-)
> > > > >
> > > > > How would I set my-space to 7000?
> > > > >
> > > > > Is that specific to pci/@e?
> > > > >
> > > > > I noticed in SLOF that my-space . returned 1800, however the card was \
> > > > > pci/@3.
> > > >
> > > > And that is correct :-)
> > > >
> > > > It is @dev,fn or if fn is 0, it is written as @dev . In the encoded
> > > > representation, it is 800*dev + 100*fn (dev is 5 bits, fn is 3 bits).
> > > >
> > > > In openbios, it looks like my-space gets its data from >dn.probe-addr in
> > > > the device node... And it is set via set-args... And then I got lost,
> > > > not sure how that is supposed to be called.
> > > >
> > > Looks like we need to change the way openbios handles my-space.
> > > SLOF deals with it in the nodes.fs
> > > > (my-phandle) ( -- phandle )
> > > my-self ?dup IF
> > > ihandle>phandle
> > > ELSE
> > > get-node dup 0= ABORT" no active node"
> > > THEN
> > > ;
> > > > my-space ( -- phys.hi )
> > > (my-phandle) >space
> > > ;
> > > I think we also need the >space word, the phandle word, and the ihandle word, \
> > > I'll have to track that down too. John, do you want to take a crack at fixing \
> > > the >dn.probe-addr, or replacing it with something that returns a correct \
> > > my-space .?
> >
> > After a bit of poking, it appears that the issue is simply that set-args isn't \
> > being called for PCI devices.
> > The attached patch appears to fix the issue for me - can you confirm that it \
> > works for you?
> > 0 > " /pci/QEMU,VGA" open-dev to my-self ok
> > 0 > my-space u. 800 ok
> >
> >
>
> Thanks Mark, that seems to work. my-space . now returns 7000 for /pci/@e.
>
> That seems correct to me?
>
>
> I'm still catching an exception at the same place, but now, at least, I think, we \
> have the correct instance.
> Any insight on what I could/should try next Tarl?
>
> <> ( 0x03d )
> 25619: b?branch ( 0x014 ) 0x0026 ( =dec 38)
> 25620: (unnamed-fcode) [0x9bd]
> 25621: b(lit) ( 0x010 ) 0xff
> 25622: and ( 0x023 )
> 25623: my-space ( 0x103 )
> 25624: + ( 0x01e )
> 25625: (unnamed-fcode) [0xa08]
> 25626: b(lit) ( 0x010 ) 0x6
> 25627: and ( 0x023 )
> 25628: b(lit) ( 0x010 ) 0x4
> 25629: = ( 0x03c )
> 25630: b?branch ( 0x014 ) 0x0009 ()
> 25631: b(') ( 0x011 ) (unnamed-fcode) [0x9c1]
> 25632: b(to) ( 0x0c3 ) (unnamed-fcode) [0x9c0]
> 25633: b(>resolve) ( 0x0b2 )
> 25634: b(>resolve) ( 0x0b2 ) <<<————Still catching the exception here
> 25635: (unnamed-fcode) [0xddf]
>
>
>
> > ATB,
> >
> > Mark.
> > <openbios-pci-set-args.patch>
Seems we're still not getting the correct instance.
https://lists.ozlabs.org/pipermail/slof/2018-January/002023.html
[Attachment #5 (unknown)]
<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote \
type="cite" class=""><div class="">On Jan 1, 2018, at 7:06 AM, Jd Lyons <<a \
href="mailto:lyons_dj@yahoo.com" class="">lyons_dj@yahoo.com</a>> wrote:</div><br \
class="Apple-interchange-newline"><div class=""><br style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: \
auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; \
-webkit-text-stroke-width: 0px;" class="">On Dec 31, 2017, at 1:09 PM, Mark \
Cave-Ayland <<a href="mailto:mark.cave-ayland@ilande.co.uk" \
class="">mark.cave-ayland@ilande.co.uk</a>> wrote:<br class=""><br class="">On \
31/12/17 12:59, Jd Lyons wrote:<br class=""><br class=""><blockquote type="cite" \
class=""><blockquote type="cite" class="">On Dec 30, 2017, at 6:04 AM, Segher \
Boessenkool <<a href="mailto:segher@kernel.crashing.org" \
class="">segher@kernel.crashing.org</a> <<a \
href="mailto:segher@kernel.crashing.org" \
class="">mailto:segher@kernel.crashing.org</a>>> wrote:<br class=""><br \
class="">On Sat, Dec 30, 2017 at 05:44:10AM -0500, Jd Lyons wrote:<br \
class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Dec 30, \
2017, at 4:21 AM, Segher Boessenkool <<a href="mailto:segher@kernel.crashing.org" \
class="">segher@kernel.crashing.org</a> <<a \
href="mailto:segher@kernel.crashing.org" \
class="">mailto:segher@kernel.crashing.org</a>>> wrote:<br class="">On Fri, Dec \
29, 2017 at 08:27:54PM -0500, Tarl Neustaedter wrote:<br class=""><blockquote \
type="cite" class="">[re-send, copying the list. For whatever reason, it seems \
messages<br class="">aren't getting the reply-to: header.]<br class=""><br \
class="">On 2017-Dec-29 03:58 , Jd Lyons wrote:<br class=""><blockquote type="cite" \
class="">0 > " /pci/@e" open-dev to my-self ok<br class="">0 > my-self . \
5fc5ac34 ok<br class="">0 > my-parent . 5fc5abfc ok<br class="">0 > \
my-space . 0 ok <<---Seems my-space isn't returning a correct value?<br \
class="">0 ><br class=""><br class=""></blockquote>That's the problem. It appears \
that simply open-dev and assigning<br class="">my-self isn't enough. my-space (and \
my-address and my-unit) aren't<br class="">getting set up, so all config-space \
accesses are going to do the wrong<br class="">thing (they'll go to device 0, which \
may or may not be the root).<br class=""><br class="">In the Sun/Oracle version, \
select would properly set things up, it<br class="">appears no equivalent is \
available under openbios.<br class=""><br class="">I think you'll have to further \
debug this by getting the FCode to be<br class="">pulled in at startup in place of \
the built-in vga fcode, rather than<br class="">trying to fiddle things this way.<br \
class=""></blockquote><br class="">Or set my-space to return 7000 and keep on \
fumbling :-)<br class=""></blockquote><br class="">How would I set my-space to \
7000?<br class=""><br class="">Is that specific to pci/@e?<br class=""><br class="">I \
noticed in SLOF that my-space . returned 1800, however the card was pci/@3.<br \
class=""></blockquote><br class="">And that is correct :-)<br class=""><br \
class="">It is @dev,fn or if fn is 0, it is written as @dev . In the encoded<br \
class="">representation, it is 800*dev + 100*fn (dev is 5 bits, fn is 3 \
bits).<br class=""><br class="">In openbios, it looks like my-space gets its data \
from >dn.probe-addr in<br class="">the device node... And it is set via \
set-args... And then I got lost,<br class="">not sure how that is supposed to \
be called.<br class=""><br class=""></blockquote>Looks like we need to change the way \
openbios handles my-space.<br class="">SLOF deals with it in the nodes.fs<br \
class="">: (my-phandle) ( -- phandle )<br class=""> my-self ?dup \
IF<br class=""> ihandle>phandle<br \
class=""> ELSE<br class=""> get-node dup 0= \
ABORT" no active node"<br class=""> THEN<br class="">;<br class="">: \
my-space ( -- phys.hi )<br class=""> (my-phandle) >space<br \
class="">;<br class="">I think we also need the >space word, the phandle word, and \
the ihandle word, I'll have to track that down too.<br class="">John, do you \
want to take a crack at fixing the >dn.probe-addr, or replacing it with something \
that returns a correct my-space .?<br class=""></blockquote><br class="">After a bit \
of poking, it appears that the issue is simply that set-args isn't being called for \
PCI devices.<br class=""><br class="">The attached patch appears to fix the issue for \
me - can you confirm that it works for you?<br class=""><br class="">0 > " \
/pci/QEMU,VGA" open-dev to my-self ok<br class="">0 > my-space u. 800 \
ok<br class=""><br class=""><br class=""></blockquote><br style="font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">Thanks Mark, that seems to work. my-space . now \
returns 7000 for /pci/@e.</span><br style="font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">That seems correct to me?</span><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">I'm still catching an exception at the same \
place, but now, at least, I think, we have the correct instance.</span><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" \
class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" \
class="">Any insight on what I could/should try next Tarl?</span><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" \
class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" \
class=""><> ( 0x03d )<span \
class="Apple-converted-space"> </span></span><br style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" \
class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" \
class="">25619: b?branch ( 0x014 ) 0x0026 ( =dec 38)</span><br style="font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">25620: (unnamed-fcode) \
[0x9bd]<span class="Apple-converted-space"> </span></span><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">25621: b(lit) ( 0x010 ) \
0xff</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">25622: and ( 0x023 \
)<span class="Apple-converted-space"> </span></span><br style="font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">25623: my-space ( 0x103 \
)<span class="Apple-converted-space"> </span></span><br style="font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">25624: + ( 0x01e )<span \
class="Apple-converted-space"> </span></span><br style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" \
class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" \
class="">25625: (unnamed-fcode) [0xa08]<span \
class="Apple-converted-space"> </span></span><br style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" \
class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
--
OpenBIOS http://openbios.org/
Mailinglist: http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic