From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9268C47094 for ; Thu, 10 Jun 2021 10:04:43 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B8C6A61184 for ; Thu, 10 Jun 2021 10:04:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8C6A61184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1EEE782CBE; Thu, 10 Jun 2021 12:04:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="c/0YXWnZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B4AFD82D3C; Thu, 10 Jun 2021 12:04:38 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20631.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::631]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9FDB180C67 for ; Thu, 10 Jun 2021 12:04:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michals@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MiKn1n7DmVtWVYzgjeZuUNsevm2SsBTH2qHhABYGIf+ab8IVMmC9xe5BswmDeiSwVkIlRGRZ2KukNlMAHBIKmxoW6cgIshv8yyd98+c5Jk0Oyv1cVFLJslz4I/vNPveRClOx611TZdeuvESQpv11sE+IMDjpu2mkD5gIgkRMSLPs7sTqhCajXniWvgtRrnN4t6VxMlFuakWmPyr+X4MtKDYZH3G+7jivzoiuTnqQn9+5vPs2FgyG5GrPRmrymu21ddccGCB/Z64ZxA322V88dXimWRPO+bjrztuWhkwXghP1QM1MDQbvp04C/AoqbG1I9ZD1nFmhtevFmorYkwRMSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cxKyEyROf495Sllnbjpr8hQa/NXF+KbU1wGV8tGMUMU=; b=BZEHCKxB66N97V1BNiHIhR+oO0vrIYidHQbNUnVABPvIlyY1kdqqLG1SEGUqU5LaKDhjPLVKALg2WayhGWRwYtT/4fjypPZ+4+yNmIIcgslnvrs3xQ0Rcn/uzofDNJmEKIYZ1MrgvKmH+k43nmoFuKkSEmOHmwnleZGvRMuua9jSnWhVqouFBlPxnFgQuAiBprYIx++1I1uzrFCVG9/Iecpm7dSMAFu3+qgEFDywwKEvsYWhpzKSOvZiiBFVv0ipJDGwTmZhMmS4HGSL84XBRefbZ2UOiTkPDJzs+k2xNGorY+xXWqcNtZIlj1qZsXc5KF7d7uF0JF6Gefjs/7n8Jw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=linaro.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cxKyEyROf495Sllnbjpr8hQa/NXF+KbU1wGV8tGMUMU=; b=c/0YXWnZSm2ks58LSHWVoJzV/X/ORystb/vrXOcvfcUbDmAhHjlnrytl7q/8hCKspu8CGppzk4pwV9RPRoWRGH7ei2oWhxB4yOd3qv055AgCmpS+kYwiFNmCIz6x5NR4wsVmvtNSpD18ktljT51EanONEMiYaSKjFl0rU17VDok= Received: from SA0PR11CA0141.namprd11.prod.outlook.com (2603:10b6:806:131::26) by BL0PR02MB5412.namprd02.prod.outlook.com (2603:10b6:208:87::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.26; Thu, 10 Jun 2021 10:04:28 +0000 Received: from SN1NAM02FT0038.eop-nam02.prod.protection.outlook.com (2603:10b6:806:131:cafe::d8) by SA0PR11CA0141.outlook.office365.com (2603:10b6:806:131::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Thu, 10 Jun 2021 10:04:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0038.mail.protection.outlook.com (10.97.5.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Thu, 10 Jun 2021 10:04:28 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 10 Jun 2021 03:04:27 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Thu, 10 Jun 2021 03:04:27 -0700 Envelope-to: ilias.apalodimas@linaro.org, u-boot@lists.denx.de, xypron.glpk@gmx.de Received: from [172.30.17.109] (port=40678) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lrHY2-0000x6-Qc; Thu, 10 Jun 2021 03:04:27 -0700 Subject: Re: EFI from usb HDD To: Heinrich Schuchardt , Michal Simek CC: U-Boot Mailing List , Ilias Apalodimas References: From: Michal Simek Message-ID: <9c57a3c7-e609-91e8-cf33-5637ce4f9340@xilinx.com> Date: Thu, 10 Jun 2021 12:04:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0a04bbfe-57d3-4e53-2272-08d92bf7225e X-MS-TrafficTypeDiagnostic: BL0PR02MB5412: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:2150; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jhWgDZmfeXTqO5iIgxxeHUC0ZFNsil3ax9L7Icz0/wcH+gjaekAQtTfAC5/eL/3Eyrx9oohYYzDu9kz25Opou6G2DSgEhQqCRbU/mnf49nGzsdaPIhDu3L+HQEYFx5+LH/yklUGe/P2A1k+wwBNskPfR/Ex4YI/+Xc7AGD47S/P7PnNbstONcPRvDFvXOnqf94JhJjN0X0oZFs+ppCSBhrzdWOnjdRyZDRnE2cDsDJvd3iIX0YxOBi/HWFHwCIJPCKgTfm0oZb2qFUau+KlGzo4aNM/ogmgdl7qqpn2JId0YY0u0zF24dADCoEr0ZE+xbt8Lfl2Z8ARany8tTzwpdMHx/lRQNhhLv+ldwYTRCxfM5RyxTcTOtV/qJ9TStSYGG1S+uFz1GnsWfXSlCpXtUzuepm3C0093X+2EuEiqKTh2zyOYF2Xv1Am9f/QqYQy5XzzgjZIhnpJYSCvSBJnXGumRo3+5w3hanDK2giCKX75yVCy/L4gsStOUYAcq6zv+vRX0ySKn53dpFZrRqackTC6dZDDmuQ6NURZ24WAwcMYDFn3VO17dviDGFx37Tx9uxDsV5nNadbiE9ztUvvoL+SbROHwV6bu50nGEfz7ea+jeRkdXMliXr/ZhjpchVFBNzINe47fx40ll1MtoWrTFlIdSxnStEHRfyVF1/xoipiyTDTjDCxwuLj2sI+4N7rFQGEANijzPjlwaRZhN/WJv35S3v9p2sHifxpzvLJvtzd78XBi6zuWzbVDc2XoFdrwkkiKMG0PZEglNclPF06vSR7m/Lv7zmvI1u6GzNbTxw6Ag9spz8NMc4/whU7fyS7I4HEe2A6Dga9HHWjcAOKySkg== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(346002)(39850400004)(136003)(396003)(376002)(46966006)(36840700001)(966005)(478600001)(45080400002)(47076005)(316002)(2616005)(36860700001)(31696002)(7636003)(356005)(426003)(36756003)(53546011)(110136005)(5660300002)(4326008)(9786002)(2906002)(8936002)(8676002)(83380400001)(54906003)(82310400003)(44832011)(3480700007)(82740400003)(70206006)(186003)(26005)(31686004)(336012)(70586007)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2021 10:04:28.2347 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0a04bbfe-57d3-4e53-2272-08d92bf7225e X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0038.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB5412 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Hi, On 6/10/21 11:47 AM, Heinrich Schuchardt wrote: > On 6/10/21 10:44 AM, Michal Simek wrote: >> Hi, >> >> I am playing with booting from USB via EFI. And I see very weird >> behavior. I have burnt image with grub to USB flashdisk and I have >> tested it on 3 zynqmp boards. zcu102, zcu104 and SOM Kria board. >> On zcu102 grub is going to boot menu and everything is working fine as >> expected. >> On zcu104 and SOM Kria I am able to get grub not to menu. When I list >> partitions in grub I see that only SDs are listed: >> grub> ls >> (hd0) (hd0,msdos1) (hd1) (hd1,msdos1) > > Hello Michal, > > thanks for sharing your observations. > > What devices do hd0 and hd1 relate to? > >> >> On zcu102(working board) I also see usb(gpt) partitions and SD. >> grub> ls >> (hd0) (hd0,gpt2) (hd0,gpt1) (hd1) (hd1,msdos1) >> > > GPT and MBR partitioning are independent of the device type. > >> >> On zcu104 I see one more error message >> "PE image measurement failed" > > This is related to CONFIG_EFI_TCG2_PROTOCOL=y. Do you have a TPMv2? This > will not stop disk enumeration. > >> But I can't see it on SOM. >> >> U-Boot image is just the same for all boards. I am using generic >> xilinx_zynqmp_virt_defconfig. >> >> When I compare DT description for USB between zcu102 and zcu104 they are >> the same. SOM doesn't have usb enabled by default (but I enabled it) but >> grub starts which means that communication with USB is fine. >> >> It is based on my latest patches available here. >> u-boot/custodians/u-boot-microblaze.git (usb-efi-issue branch) >> >> Also when I list usb I see all partitions just fine. >> ZynqMP> part list usb 0 >> >> Partition Map for USB device 0  --   Partition Type: EFI >> >> Part    Start LBA       End LBA         Name >>          Attributes >>          Type GUID >>          Partition GUID >>    1     0x00000800      0x001007fe      "Microsoft basic data" >>          attrs:  0x0000000000000000 >>          type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 >>          type:   data >>          guid:   0e7f8b3d-296b-4720-be9d-c4687d3c4a77 >>    2     0x00100800      0x001197fe      "Microsoft basic data" >>          attrs:  0x0000000000000000 >>          type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 >>          type:   data >>          guid:   8892eddc-231a-4e6e-a5e1-c310f4482fb7 >> >> >> Do you have any idea why on one system is working fine to get to menu >> and on others there is an issue to get all partitions even u-boot is >> able to see them and can work with them. >> >> Thanks, >> Michal >> > > Where is the GRUB binary? - If it is in EFI/boot/bootaa64.efi, it could > be that the USB sub-system is simply not initialized yet when the boot > manager is called by distroboot. > > For testing partition detection in the UEFI sub-system it is enough to run > >     efidebug devices > > Until yesterday we had a problem with partition numbers >= 10, cf. > > efi_loader: partition numbers are hexadecimal > https://source.denx.de/u-boot/u-boot/-/commit/3dca77b1dc1b6dbf9c8b51572fe4b0553cef009f > > > Block devices are enumerated in efi_disk_register(). Please, try to add > debug output there to elucidate the problem. I found where the problem is. First of all zcu102 didn't use the same image as others (it wasn't updated properly). When you have CONFIG_EFI_CAPSULE_ON_DISK_EARLY that efi_disk_register() is called before usb block devices are detected and registered that's why grub doesn't see them. I was looking at adding usb start in preboot but preboot is called later. How this should be solved? Any idea? Thanks, Michal