From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ywb0G-0006TE-D3 for mharc-grub-devel@gnu.org; Sun, 24 May 2015 14:52:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywb0D-0006QT-IW for grub-devel@gnu.org; Sun, 24 May 2015 14:52:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ywb09-0007Lr-8l for grub-devel@gnu.org; Sun, 24 May 2015 14:52:01 -0400 Received: from mail-la0-x22e.google.com ([2a00:1450:4010:c03::22e]:33532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywb09-0007Jc-08 for grub-devel@gnu.org; Sun, 24 May 2015 14:51:57 -0400 Received: by lami4 with SMTP id i4so38430850lam.0 for ; Sun, 24 May 2015 11:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=PTve+yR9kndUMCRigLBdft7nBLCKD2B7WST4QGXxAgs=; b=bmnS2UqJi6amHHkyezov0Y17WPzUa4JCNY6VvDqdiqfftJplk8S3utYOs55tCcFQO6 VBjS0Qyr/Ty/pD6P/YoK+hotgSYficYfvY3/WLFO6+g1QLLOZU4rtrvjFlmjxyo3PtHc Lm/ZTK6sN9Qj8Oyoxxqt1wUSsXbwkMH4q74bYXrmIfxoBjLC/oyw3n8QwexjdhmrWBsp f8CFQm4Fu04Q/xhjbbjkUUr+rduyAB9zqWf2PvwSC5sk+80M8vz424ah6pNuj+45vjar MxlctfN8NSKpN3BQcEakxsBS66cVPOFXtopkdqzReqZU4EGsiRK/g3JnDikaWCkAINE7 Wecg== X-Received: by 10.152.8.6 with SMTP id n6mr15196864laa.116.1432493515783; Sun, 24 May 2015 11:51:55 -0700 (PDT) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id am7sm1908162lbc.3.2015.05.24.11.51.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 May 2015 11:51:54 -0700 (PDT) Date: Sun, 24 May 2015 21:51:53 +0300 From: Andrei Borzenkov To: Paul Menzel Subject: Re: disk/ahci: Unaligned pointer with old commit as coreboot payload Message-ID: <20150524215153.2d3ec877@opensuse.site> In-Reply-To: <1432492437.3663.2.camel@users.sourceforge.net> References: <1432451020.3711.13.camel@users.sourceforge.net> <20150524131559.5cd2fe94@opensuse.site> <1432470628.2492.1.camel@users.sourceforge.net> <20150524212339.6bb1cac0@opensuse.site> <1432492437.3663.2.camel@users.sourceforge.net> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.27; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/15KnbapdyQZUcQlOfXVR7cv"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22e Cc: grub-devel@gnu.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2015 18:52:02 -0000 --Sig_/15KnbapdyQZUcQlOfXVR7cv Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =D0=92 Sun, 24 May 2015 20:33:57 +0200 Paul Menzel =D0=BF=D0=B8=D1=88=D0=B5=D1= =82: > Dear Andrei, >=20 >=20 > Am Sonntag, den 24.05.2015, 21:23 +0300 schrieb Andrei Borzenkov: > > =D0=92 Sun, 24 May 2015 14:30:28 +0200 Paul Menzel =D0=BF=D0=B8=D1=88= =D0=B5=D1=82: >=20 > > > Am Sonntag, den 24.05.2015, 13:15 +0300 schrieb Andrei Borzenkov: > > > > =D0=92 Sun, 24 May 2015 09:03:40 +0200 Paul Menzel =D0=BF=D0=B8=D1= =88=D0=B5=D1=82: > > > > > > > > > further trying to bisect the AHCI regression on, that the GRUB pa= yload > > > > > does not detect the AHCI drive [1], I tried to build GRUB from co= mmits > > > > > changing `grub-core/disk/ahci.c`, I built commit dc2a6c8b (Improv= e AHCI > > > > > detection and command issuing.), but it it fails to boot with > > > > >=20 > > > > > Unaligned pointer =E2=80=A6 > > > > > Aborted. > > > > >=20 > > > > > The same happens, when I just checkout that revision for `ahci.c`= and > > > > > leave the rest as is. > > > > >=20 > > > > > $ git checkout dc2a6c8b0e3dfe3bce78dbe0febcd9d4d9038411 -= - grub-core/disk/ahci.c > > > > > $ ./autogen.sh > > > > > $ ./configure --with-plattform=3Dcoreboot > > > > > $ make -j > > > > > $ make default_payload.elf > > > > >=20 > > > > > I=E2=80=99ll attach that version of `ahci.c` to this message. Do = you see what > > > > > could be causing that unaligned pointer? > > > > >=20 > > > >=20 > > > > 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? > > >=20 > > > It=E2=80=99s happening whenever `ahci.c` from commit dc2a6c8b is used= (with > > > commit dc2a6c8b and master). > >=20 > > It does not really answer my question - do you get this unaligned access > > with current master? >=20 > Sorry for the misunderstand. I do *not* get this unaligned access with > current master. `ahci.c` was rewritten after commit dc2a6c8b. >=20 In this case my primary suspects would be several PCI accesses that had been removed in subsequent commits: +#ifdef GRUB_MACHINE_QEMU + addr =3D grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND); + grub_pci_write_word (addr, 0x107); +#endif + addr =3D 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. --Sig_/15KnbapdyQZUcQlOfXVR7cv Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEUEARECAAYFAlViHckACgkQR6LMutpd94yXtgCWNbbels6Hde2HbLkvbqSI9W7J ZwCfYlGnrr6bTm3GUz2P032qUt0SDgk= =xqW6 -----END PGP SIGNATURE----- --Sig_/15KnbapdyQZUcQlOfXVR7cv--