grub-devel
[Top][All Lists]
Advanced

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

Re: disk/ahci: Unaligned pointer with old commit as coreboot payload


From: Andrei Borzenkov
Subject: Re: disk/ahci: Unaligned pointer with old commit as coreboot payload
Date: Sun, 24 May 2015 21:51:53 +0300

В Sun, 24 May 2015 20:33:57 +0200
Paul Menzel <address@hidden> пишет:

> Dear Andrei,
> 
> 
> Am Sonntag, den 24.05.2015, 21:23 +0300 schrieb Andrei Borzenkov:
> > В Sun, 24 May 2015 14:30:28 +0200 Paul Menzel пишет:
> 
> > > Am Sonntag, den 24.05.2015, 13:15 +0300 schrieb Andrei Borzenkov:
> > > > В Sun, 24 May 2015 09:03:40 +0200 Paul Menzel пишет:
> > > >
> > > > > further trying to bisect the AHCI regression on, that the GRUB payload
> > > > > does not detect the AHCI drive [1], I tried to build GRUB from commits
> > > > > changing `grub-core/disk/ahci.c`, I built commit dc2a6c8b (Improve 
> > > > > AHCI
> > > > > detection and command issuing.), but it it fails to boot with
> > > > > 
> > > > >         Unaligned pointer …
> > > > >         Aborted.
> > > > > 
> > > > > The same happens, when I just checkout that revision for `ahci.c` and
> > > > > leave the rest as is.
> > > > > 
> > > > >         $ git checkout dc2a6c8b0e3dfe3bce78dbe0febcd9d4d9038411 -- 
> > > > > grub-core/disk/ahci.c
> > > > >         $ ./autogen.sh
> > > > >         $ ./configure --with-plattform=coreboot
> > > > >         $ make -j
> > > > >         $ make default_payload.elf
> > > > > 
> > > > > I’ll attach that version of `ahci.c` to this message. Do you see what
> > > > > could be causing that unaligned pointer?
> > > > > 
> > > > 
> > > > It is not clear - do you mean that this specific revision has this
> > > > problem and others not? Or that this problem happens since this
> > > > revision?
> > > 
> > > It’s happening whenever `ahci.c` from commit dc2a6c8b is used (with
> > > commit dc2a6c8b and master).
> > 
> > It does not really answer my question - do you get this unaligned access
> > with current master?
> 
> Sorry for the misunderstand. I do *not* get this unaligned access with
> current master. `ahci.c` was rewritten after commit dc2a6c8b.
> 

In this case my primary suspects would be several PCI accesses that had
been removed in subsequent commits:

+#ifdef GRUB_MACHINE_QEMU
+  addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
+  grub_pci_write_word (addr, 0x107);
+#endif
+
   addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG5);
+
+#ifdef GRUB_MACHINE_QEMU
+  grub_pci_write (addr, 0xf4000000);
+#endif

Those added lines are not present anymore.

Attachment: pgp1Ks4TCV6I2.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]