From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4003:c0f::230; helo=mail-ot0-x230.google.com; envelope-from=sigmaepsilon92@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-ot0-x230.google.com (mail-ot0-x230.google.com [IPv6:2607:f8b0:4003:c0f::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7F3932214E326 for ; Sun, 10 Dec 2017 13:54:00 -0800 (PST) Received: by mail-ot0-x230.google.com with SMTP id q3so13250639oth.2 for ; Sun, 10 Dec 2017 13:58:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=cMAcXfxeaBMHGPctbEEhVDAuZdntRD2p2YbGR9omSdo=; b=J/3sdd5YIp1CDZNRQfgTJHEqxTaje0VZvu1hiFm2clsgF3pQfY91dB2Sxc3rbPOj+k fZLLY+baFZx5GFkgKOvirvozJ8rR/gnkc9jxJI3kJ7xvFXSKcIjTnX9WCb9ZGh2oFseE YdtQmph+uIHczCA/ijjSoeY47CIAq6UOgURlSC+mN6M2XP/g2HiHwSjE9I73XIEexYw2 0TauXegXojj+Fg4FbYruhd0+uZO1S1dj8VeGEb7thhMcpmIGYTAWzTJNiRykxVclTehL DBTKG5LNw+Xjdsh0+gVezZqTcjFPq7IkC6gHInj8b6e+EjS3EJRHSmzTcaefayIWzXrG JuNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=cMAcXfxeaBMHGPctbEEhVDAuZdntRD2p2YbGR9omSdo=; b=Q4HJKMEI7+RDjml7Et6V0E/ZL+qbVklx+PB3v/CFDq7uaLqqGr4Z2PY6/MPIclTPKr cGZxcs0Yf/Qsh7ysMHC6RHSrYKPzWoNgFaYuO5AaC6dWgmX8+FtIl7hXVQl7QFuFtagU 448P0Ve6hnQOzc9ye5zHQEj6/onPoS+1TyVIWzfNSSv0NCv87KPWMRugnXfVTFIjcF4k hB4a1cfIKbLEPxjHB2AXlTbsozNGEVnjydi4aYOdSNjg1gUG296YprMsBPOxds9S8S0A BooDAceAxl0+rIUa+MAX6459f1LeQiKELkQw2ChtynTNPLR/g9zu2+pgKJP2+uDrxfvf Gt4w== X-Gm-Message-State: AJaThX5SkyJioweQCBYTKs3IdMFqAw776A6+s3byWPh95yMayAhSE8uM aSeYp65oyJmluN52o+ZzkNRqciosaNcb1iZFZx8= X-Google-Smtp-Source: AGs4zMYGVvO7QPEa0x2eFU0QjbXtMQO0+OUptARa29+zE9U0MX9I3VeM1jJSg3OTnJCr8JbYDfoUGPWsYknzOdiFB/U= X-Received: by 10.157.63.11 with SMTP id m11mr32188905otc.179.1512943116730; Sun, 10 Dec 2017 13:58:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.1.204 with HTTP; Sun, 10 Dec 2017 13:58:36 -0800 (PST) In-Reply-To: References: From: Michael Zimmermann Date: Sun, 10 Dec 2017 22:58:36 +0100 Message-ID: To: Ard Biesheuvel Cc: "Gao, Liming" , "Zhu, Yonghong" , edk2-devel-01 , Leif Lindholm Subject: Re: PrePiLib's FwVol.c can't handle padding before volume header X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 21:54:00 -0000 Content-Type: text/plain; charset="UTF-8" VolInfo doesn't seem to complain about FVMAIN_COMPACT.Fv: https://pastebin.com/ueUnepXF Does VolInfo support Fs's as well? because it fails on mine(even on a working one). On Sun, Dec 10, 2017 at 10:49 PM, Ard Biesheuvel wrote: > On 10 December 2017 at 21:45, Michael Zimmermann > wrote: >> The layout is basically the same as in ArmVirtQemuKernel.fdf but I've >> changed the size to 8MB and these are the usage stats: >> FV Space Information >> FVMAINDEVICE [99%Full] 57856 total, 57800 used, 56 free >> FVMAINMSM8960 [99%Full] 222336 total, 222312 used, 24 free >> FVMAIN_COMPACT [63%Full] 8380416 total, 5305944 used, 3074472 free >> FVMAIN [99%Full] 17026304 total, 17026264 used, 40 free >> FVMAINQCOM [99%Full] 37184 total, 37152 used, 32 free >> >> and here's an uefitool report: >> https://pastebin.com/pnHNSFz4 >> The padding in line 13 is the one causing trouble. The interesting >> part is that it's not zero. it's value is '08 CD 03 01'. >> >> PrePiLib fails in this line: >> https://github.com/tianocore/edk2/blob/5a44a766b597e4c9960ac1936e6d18001c5e7ce2/EmbeddedPkg/Library/PrePiLib/FwVol.c#L682 >> The reason is simply that VolumeHandle is offset by 4 bytes. >> > > That code is identical to PeiFfsFvPpiGetVolumeInfo() in PEI core so > this does not look specific to PrePiLib. > > Does VolInfo complain as well?