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::22c; helo=mail-ot0-x22c.google.com; envelope-from=sigmaepsilon92@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-ot0-x22c.google.com (mail-ot0-x22c.google.com [IPv6:2607:f8b0:4003:c0f::22c]) (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 1C51221F6A6E1 for ; Wed, 28 Feb 2018 02:04:48 -0800 (PST) Received: by mail-ot0-x22c.google.com with SMTP id f11so1699820otj.12 for ; Wed, 28 Feb 2018 02:10:56 -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=mv7FudHNiUF+E67WaXQ5O6I2bix/HY7jVO+8pJDXct4=; b=uvz0ZVKRJXRRq/lcS9BABVUHFHeg66kWY6thb3VaIMM8iuSdMwovVcShWOdQsttQsy qYKrpuPg+5a6sOw+CSPqN1ETluIX2ykHJxgKtElTq89pn+9J6f5eBERX/nZwvb2pojD/ 9JkaGbfqoCPXeLa2zMF0FSB+9fYj+E4ssPovUq7rKPDh83nROlW8HY3Zx9sae5On31fc JhYdgrhSOc2fxnnuPOK3qcwwvPfuto/+nn41XgMA5fJSAoB0UkdbCrk9cBpj242dumJ9 wlyOfepGxe4WE0C917nuL6AauEMHicxqqETKpaqhQnzAVVpwhHXMrhV4Cp5gJOhSxdHd VFwg== 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=mv7FudHNiUF+E67WaXQ5O6I2bix/HY7jVO+8pJDXct4=; b=pOFD0+tmR2SPZQ30y6phx+ZaoCAs87a5HeB4Z1lO4ez1xmcaV7jRMDKjuYgw99oTXq L4mrpQCixYsYZb0DmcCkPrqJAz6mf7+Q+uirfGImQS8VFdK1/nUjTQH9hf2vSI6mGtyQ M2R90wrmYkA6IihjhTdiv/+hBtLkh4yxGYF9NJbZTniqgu3DkhPM96b20DK3c0Hjo64u eqYOs20Qo4te4enF9FV5MlknPFAyvVjo1ComiNZx4JR2uK6RsG0PXE1tQx7SLAQJIoqY CEw3DDlQELpHY3jpm8dgBZuEaVNA1mCbb9vtrg7xzSMfax9YTpgkLHYTcFUdN/Q0ZQZR 4bVA== X-Gm-Message-State: APf1xPDZSUG9WYpXFBecGL8ZXV7+ELpoCu3inQXe/kPKirv8c4e+pdLn 0+y095xIDElXSNqDPdnJ46Wk/M4zZckrGBkaGXM= X-Google-Smtp-Source: AG47ELujZio8UfD36Th8VKPIAEFVwWUMX7/X3d0Yjm6Xr1UXiExuxiIfhhIDdAMrflNO1Fx/zrtrSQNX1zzAEhyPNYQ= X-Received: by 10.157.87.99 with SMTP id x32mr11804174oti.175.1519812655360; Wed, 28 Feb 2018 02:10:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.31.116 with HTTP; Wed, 28 Feb 2018 02:10:54 -0800 (PST) Received: by 10.157.31.116 with HTTP; Wed, 28 Feb 2018 02:10:54 -0800 (PST) In-Reply-To: References: <26da6afd-102b-0006-c6b7-a10d8e13f96e@Intel.com> From: Michael Zimmermann Date: Wed, 28 Feb 2018 11:10:54 +0100 Message-ID: To: Ard Biesheuvel Cc: Andrew Fish , "Ni, Ruiyu" , edk2-devel-01 , Leif Lindholm X-Content-Filtered-By: Mailman/MimeDel 2.1.23 Subject: Re: 'fastboot boot' TPL X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 10:04:49 -0000 Content-Type: text/plain; charset="UTF-8" Well since the fastboot implementation already is an application (and not a driver) all we need to do is to use WaitEvent instead of a notify callback. Once that's fixed I'd add ASSERTs on the current tpl to the relevant API functions so you know immediately when you try to violate the spec. On Feb 28, 2018 9:19 AM, "Ard Biesheuvel" wrote: > On 28 February 2018 at 08:15, Michael Zimmermann > wrote: > >> I agree. Did you run into any issues due to this? > > Surprisingly no. I was just trying to understand the fastboot > implementation > > before I use it on my platform > > and was surprised that this works at all. I can imagine that's because > this > > is supposed to load linux's efistub which probably doesn't do anything > but > > calling SetVirtualMemoryMap and ExitBootServices. > > The ARM/Linux EFI stub does quite a bit more than that, actually. It > uses the various memory allocation and protocol handling services, to > carve out an allocation for the kernel, initrd and device tree, and to > access the command line, the EFI_RNG_PROTOCOL (if available) and to > interrogate the protocol database for GOP instances. > > > I can imagine that more complex loaders like the one used for Windows > > wouldn't work this way. > > > > No, and this is indeed something that should be fixed. Any clue as to how? >