From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web09.1563.1626855451469563422 for ; Wed, 21 Jul 2021 01:17:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=lMtlSVn4; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=08365481fa=daniel.schaefer@hpe.com) Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16L8D9tg020522; Wed, 21 Jul 2021 08:17:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=9TPwegXSbRCLNBSztaR4YLlAuM++Hfvh+MTfcqxFGlk=; b=lMtlSVn49ppV7sS8/VKl0UlMVVFIi/P1PvbDGSjPWwRtaF5Ky6MLoTErt16rw4/hP260 DLq4HFAGND0JL4pxqaJRt8MpT8wn8i8pOStMJRbXP3idPdUyGaqqtZ8vi9Ska6Ciz+mb juK+7ELa7DP9hN2FoTbg6qXfvwyz008TQpLSJFBOH5uCdC3jvt7oEWbmwaFAjCmBzww6 p102/hq9LDZTqHfZtXvUYHqW2AcCe8aaGXSHULxQfRYbeG2DkGJjWxeCHa4bu461wspF cVzQMOSFZYnw+Tu4ZcG+lqtjP2+GhkhD7fYgCBarabYw4Jpn2w6etNHW+M/EnDeyXhFR Kg== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 39wmabcxug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 08:17:06 +0000 Received: from G2W6311.americas.hpqcorp.net (g2w6311.austin.hp.com [16.197.64.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3425.houston.hpe.com (Postfix) with ESMTPS id 293E9EC; Wed, 21 Jul 2021 08:17:05 +0000 (UTC) Received: from G4W9334.americas.hpqcorp.net (16.208.32.120) by G2W6311.americas.hpqcorp.net (16.197.64.53) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 21 Jul 2021 08:17:05 +0000 Received: from G9W9210.americas.hpqcorp.net (2002:10dc:429b::10dc:429b) by G4W9334.americas.hpqcorp.net (2002:10d0:2078::10d0:2078) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 21 Jul 2021 08:17:03 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.241.52.10) by G9W9210.americas.hpqcorp.net (16.220.66.155) with Microsoft SMTP Server (TLS) id 15.0.1497.18 via Frontend Transport; Wed, 21 Jul 2021 08:17:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gm8FuGQc35stVvCGuDmtMHRzkCXxMmglh/eIM0EmurH9l3+LHA8DBMEGzYRSyRcB0OZ7HhxnTLBBU95cDc+ijv98StHdnH6i1dByxpUrfdaFBNrJkhqWV7S5RUS4u9494u/pu7ttyeDmq0DJClYFiRoxLQcKNvQMAbFMKAWff97u14kjM3g8eIjiN4xZqo/en0d7LIi9CSDj0t71tvPiVXqcCY0xrhTrKQbSgHa6LTKFSDggXzhTkKyBkeZr7JcyqhpCsGomG5+Xd4uVUSAj2OKqYg/2txxRWE2sgCv5tCsdPdJX+fu8znKM0y+t6R+i8GCU0yjA5EPLOOKGeplFxA== 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=9TPwegXSbRCLNBSztaR4YLlAuM++Hfvh+MTfcqxFGlk=; b=Ir1gkHw0UktI2Vldo/eo5Hz/7a4k4kCUyVb4TzQpCT/7qKWr1yjb5KJXHmBTkhTHofDkfM+HsWyYMF9IpVf9fwS5Hwa1saaZZUdAh1JmD/yf0KrwP++F0+JoblQiWf0PVj/yhXQRj5bn+5OvrCCuoQHzkSI1dFobpxEz4QAR7/5AIzLh28ggfcIQZpGLBygUfcCucM7Ma/fEFgo0RVqHEQln+RrscRfdcU78ePks1svA8p7zlpMIL80LcNZuSYzuSpUcqaVazV3ybdsjYLuQS9mdEJ5LXg3ZDGid54JaUdoRBMBaJ4RFE/j7Pd2BCRy/dp7GytAZ8nYdSK8BlX/bMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Authentication-Results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=hpe.com; Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) by DF4PR8401MB0395.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7612::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.26; Wed, 21 Jul 2021 08:17:02 +0000 Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c804:b24:831b:272a]) by DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c804:b24:831b:272a%5]) with mapi id 15.20.4331.034; Wed, 21 Jul 2021 08:17:02 +0000 Subject: Re: [edk2-devel] [PATCH 1/1] MdePkg: add definition of LINUX_EFI_INITRD_MEDIA_GUID To: , , "Kinney, Michael D" CC: Jeff Brasen , "ardb+tianocore@kernel.org" , "Justen, Jordan L" , "gaoliming@byosoft.com.cn" , "Liu, Zhiguang" , Samer El-Haj-Mahmoud , Abner Chang References: From: "Daniel Schaefer" Message-ID: <31237e1d-e07d-4ba5-4197-050e631c1116@hpe.com> Date: Wed, 21 Jul 2021 16:16:47 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 In-Reply-To: X-ClientProxiedBy: HK2PR06CA0008.apcprd06.prod.outlook.com (2603:1096:202:2e::20) To DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.19] (123.193.59.220) by HK2PR06CA0008.apcprd06.prod.outlook.com (2603:1096:202:2e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Wed, 21 Jul 2021 08:16:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 04c4ef57-f298-4050-5f29-08d94c1feaf1 X-MS-TrafficTypeDiagnostic: DF4PR8401MB0395: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5qB1slbP44500uJYE82BuJ5iURLBvHXNZw7Rt53Gf/tx/qFhrAD6EBGLcwneQn9uudQsztb7PBnTx2xwp8zO2KLHTsuwzr2I+Da3pW5w2ojuCuA0GEHR2lP+x+WrRhhW31RIN3rA5VwKYcabV7jeGNDEiLNx5yKs62/zQavaYIRbQkns8jMkfZXEyfk/PcLUZjx+3YqdAOe3R/YMly+MxESt0MBsv0+Yc3FQXMa24Tov1e5hZgVKIWKxfddwXHW90HT97bw20Igbfd+gmYmrQ1/UX6oSCWKuasQji1vWePowtCKt5/CWvE/eiONhuzZ9n8b2ZeFiOUcthJzw5p/tLaCynIXvBbL3YC4LLAJaunUPSq/oq3ssj8tOrGD3zjKpBXBA6+SB3rJgr5df7micJ62OUHEa7toiCK/P4VBMkCfqwF4ycb8cLhErjpb1GmbOXTm/R6fyDpNiI9OyMS/9Qzzk+m7BAm+x56mfT4+G7Er6C+yvUQ2r+IHZtvT7Pb8T5XJtw8uJjnHIF6AqEHUnmIRvpB0gIlvxP39mE/Zn9pKGb2Klg0rtVPalTJPEjO0e6w4mSxKLE1sruV/Qm5fPEw6dZzwite9VsRFmxexdG3GsI+OmD+65uGyytjA+qiFJV/B5TLHeI6x2TwK/AQL1aj68Ci5CVFea8iPZuxB8w/sGsdeqr0DIQi68sJ2YjAKQUrTQ17xXVuZvl0hB0STykRm/P9/FiI2YyKalsJox01Lb5xnkaFWLyx5jL7EYwEhgHVB1sa9iorLecbLjkKRuTUWHRk9WwZaVw05iSikH0N+sl0EVFuQ5qbs7Bjw6ZoC9l4EkqPVvoze6tQWJW+NBTLAsgBnPeC54z99uEVbTu1s= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(39860400002)(376002)(346002)(366004)(396003)(136003)(6666004)(31686004)(66556008)(5660300002)(38100700002)(66946007)(186003)(8676002)(31696002)(53546011)(16576012)(2906002)(4326008)(316002)(6486002)(66476007)(966005)(86362001)(36756003)(44832011)(956004)(478600001)(26005)(54906003)(2616005)(6916009)(8936002)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?L1ByWGJsN0NHbkhWZEQ0OVZtMzRuZTFndmRPRGJ6ZWFCQjhFbzF2K1F5N3A3?= =?utf-8?B?UWVqV2w5VCs0OGMvRXRJQm4xREVkamIvVlJDMFZENytYWHpFN2hmSTdCTlN4?= =?utf-8?B?cVNwdWR6WjhLSUt5dnJyYWxSMlZV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XeEdnZG9jd0xFNWMwWVU3VGtOM0lvaHVhOHk2NW1lWWp1?= =?utf-8?B?T1F6Ly9oTjBmRGR2RHQrRHpLdlBFVm04VUhkTkVMbFVpMHl0N2loQkt5Ukgx?= =?utf-8?B?ZGVUK3ZoWFBTK0lJeEVYVUhua2pkSkpEdElMV2hNeVA0VlZFNFdKN21jVDI4?= =?utf-8?B?MllFN1NlNDdUazhLclc0ZkVoanNvZmhMSWpQS2dXWVI5WnhJaDkrMXd1TjAv?= =?utf-8?B?T2RUSENaMzV6V0UvSkVGMnFsQlVsVTBCYWhvdko3ajVvakFXaWxjeGM1dTVx?= =?utf-8?B?S3lqU2hxNklTM2xHWXYybDhQTTE3dXJUaHk3dE5QSXZ5TDkwZFJKa00xZjdk?= =?utf-8?B?WWx1WkhjVkVzWUtGTnZlQVFCbGo2UzY0aWJYMk80MEZ0dHJsY2txVW4vM1JP?= =?utf-8?B?S1FpY0lFNHRNRVE0MEtiR1IzMU5WdHJJT0w5VEZZaVBxOHY3VkcrWHdmaHhU?= =?utf-8?B?SjZIclFBWWtGblVFV3ZHdzBhdHI5dVFBdERhdVN1STV2N1E0bXp4T2RJa1Q0?= =?utf-8?B?MmxEdjFWeHhuOHcvN0poSWp2SDQwcVB5Wnl0QjVNK3A4SDArRXVob2Zid0Ju?= =?utf-8?B?S1cvaTlVVXV5R0lPbFBFTmFVa0IySTNwSEphVjdlT0JWeDRSQlNuU2RIK2tS?= =?utf-8?B?YlNYL2F6UlQrR2o4YlYveitCTHp5THVZQmdYK0l2NURPTXJobTRuV2c5b2hm?= =?utf-8?Q?bvfy12ioDZ7YkcFVZqKk0PXHCybhS3luSmRq7lf?= X-MS-Exchange-CrossTenant-Network-Message-Id: 04c4ef57-f298-4050-5f29-08d94c1feaf1 X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2021 08:17:02.3258 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LC0WXbBL/fda+FMehCRJyLM17b6T4nXSZKg2wiPPp6mlRQuxlKuYzat89w3/OHfqdg4BadAz7MCLOGdJQBFWIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0395 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: omMoBfgekLEjhPYQUvpTNxzEIrPQ9Ao5 X-Proofpoint-ORIG-GUID: omMoBfgekLEjhPYQUvpTNxzEIrPQ9Ao5 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-21_04:2021-07-21,2021-07-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 spamscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107210045 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 7/16/21 11:56 PM, Ard Biesheuvel wrote: > On Fri, 16 Jul 2021 at 17:00, Kinney, Michael D > wrote: >> >> Hi Ard, >> >> I see you were involved in the OS side changes. >> >> Can you explain what is required for the FW <-> OS interface with respect to Load File Protocol and this media device path node. >> >> What happens if this media device path node is not present? What breaks? >> >> Trying to figure out if this is a required interop feature (MdePkg candidate) or an EDK II specific extension (MdeModulePkg candidate). >> > > Let me give some context first: > > Linux distro boot generally relies on an initial ramdisk (initrd) > which is provided by the loader, and which contains additional kernel > modules (for storage and netwerk, for instance), and the initial user > space startup code, ie., the code which brings up the user space side > of the entire OS. > > Before we introduced this media path, the only way for a EFI pre-OS > loader (such as GRUB) to provide this initrd was to copy it into DRAM > somewhere, and use a arch-specific method of passing the DRAM address > and size to the OS (x86 uses struct bootparam, whereas ARM uses device > tree). It also requires knowledge on the part of GRUB regarding which > parts of DRAM are suitable for holding an initrd image. For measured > boot scenarios, it may be an advantage not to have the initrd linger > in DRAM for longer that necessary, and we actually intend to measure > the initrd loaded via the new method right after it has been loaded > this way. > > To avoid extending this to other architectures such as RISC-V, I > decided to introduce a special vendor media path for Linux initrd > images, which GRUB et al can implement, which provides the initrd > image when the OS loader that consumes it asks for it. > > So for Linux on x86 or ARM, this is optional, given that support for > the old method is not going away any time soon. For RISC-V, I > suggested that only the new method be implemented, but I am not sure > what the status is there. It's a good idea. We followed your advice and added your initrd command to our development branch of RISC-V EDK2: https://github.com/riscv/riscv-edk2-platforms/commit/534eeba0ac9b984eedc58ba1e8a2d28e2827ba40 And we're using it in our CI to test whether Linux boots: https://github.com/riscv/riscv-edk2-platforms/blob/riscv-virt-gh-actions/.github/workflows/riscv-edk2.yml#L314 > Note that many embedded style systems don't > use GRUB, and may not use initrds to begin with. OTOH, U-Boot also > implements support for the Linux initrd vendor media path, and work is > ongoing to add measured boot support as well. > > In any case, I don't have a strong preference where this should live, > as long as it is in a generic place where all architectures can use > it. >