From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heinrich Schuchardt Date: Wed, 1 May 2019 20:56:16 +0200 Subject: [U-Boot] [PATCH v2 28/50] x86: sysreset: Separate out the EFI code In-Reply-To: References: <20190426035922.20596-1-sjg@chromium.org> <20190426035922.20596-29-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 5/1/19 3:42 PM, Bin Meng wrote: > +Heinrich, > > On Fri, Apr 26, 2019 at 12:00 PM Simon Glass wrote: >> >> The EFI implementation of reset sits inside the driver and is called >> directly from outside the driver, breaking the normal driver-model >> conventions. Worse, it passed NULL as the device pointer, hoping that >> the called function won't use it, which breaks as soon as code is added >> to use it. >> >> Separate out the implementation to improve the situation enough to allow >> a future patch to add new sysreset features. >> >> Signed-off-by: Simon Glass >> --- >> >> Changes in v2: >> - Add new patch to separate out the EFI code in sysreset >> >> drivers/sysreset/sysreset_x86.c | 16 +++++++++++----- >> 1 file changed, 11 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c >> index 009f3766027..d484ec5de49 100644 >> --- a/drivers/sysreset/sysreset_x86.c >> +++ b/drivers/sysreset/sysreset_x86.c >> @@ -12,8 +12,7 @@ >> #include >> #include >> >> -static __efi_runtime int x86_sysreset_request(struct udevice *dev, >> - enum sysreset_t type) > > I remember last time I tried when booting Linux from EFI loader on > U-Boot, calling from kernel into the EFI runtime was broken. Not sure > what the latest status is. I have no x86 system using U-Boot. On ARM I am not aware of problems. Last year I had no success booting up qemu-x86_defconfig with Linux via EFI. Maybe I should retry. Best regards Heinrich