[OpenBIOS] [PATCH 3/6] escc: Fix legacy addresses

Alyssa Milburn fuzzie at fuzzie.org
Tue Aug 2 10:51:50 CEST 2016


On Tue, Aug 02, 2016 at 09:39:15AM +0100, Mark Cave-Ayland wrote:
> On 02/08/16 06:35, Benjamin Herrenschmidt wrote:
> 
> > The legacy addresses were incorrect for both ports, fix them.
> > 
> > Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> > ---
> >  drivers/escc.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/escc.c b/drivers/escc.c
> > index 1990e79..6515475 100644
> > --- a/drivers/escc.c
> > +++ b/drivers/escc.c
> > @@ -405,9 +405,9 @@ escc_add_channel(const char *path, const char *node, phys_addr_t addr,
> >              { 0x20, 0x30, 0x50 }
> >          },{
> >              /* legacy ch-b */
> > -            { 0x0, 0x2, 0x8 },
> > +            { 0x0, 0x4, 0x8 },
> >              /* legacy ch-a */
> > -            { 0x4, 0x6, 0xa }
> > +            { 0x2, 0x6, 0xa }
> >          }
> >      };
> >      
> > 
> 
> I remember going through these a while back and thinking that while the
> current values didn't match real hardware, they did match what was in
> QEMU's hw/misc/macio/macio.c's macio_escc_legacy_setup().
> 
> From memory someone (Alyssa?) picked up on this and posted a patch to
> update the mappings in macio_escc_legacy_setup() to match, but I never
> got around to digging deeper.

The attached patch is probably the one you mean. I never posted it to the
qemu list, I think, but in any case it deliberately doesn't change these
values because I think I worked out it wasn't necessary.. it's been too long
for me to remember.

>From memory, the current mappings match *some* hardware, and this new patch
matches other hardware. So they're both "right". I kind of gave up trying to
work out what on earth Apple was thinking (see also the errata mentioned in
the patch).

- Alyssa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-macio.c-Fix-mapping-for-legacy-ESCC-registers.patch
Type: text/x-diff
Size: 1455 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/openbios/attachments/20160802/43687d32/attachment.bin>


More information about the OpenBIOS mailing list