Date: Tue, 4 Sep 2018 20:23:21 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Conrad Meyer <cem@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338437 - in head/sys: amd64/amd64 amd64/include arm64/arm64 arm64/include conf dev/efidev modules/efirt sys Message-ID: <20180904172321.GE2340@kib.kiev.ua> In-Reply-To: <CAG6CVpWOUkdc4jUFZFBU53tEG=UG4Q0EEhbUcgJUgBPXwEpGRQ@mail.gmail.com> References: <201809022137.w82Lb5FK046191@repo.freebsd.org> <CAG6CVpWOUkdc4jUFZFBU53tEG=UG4Q0EEhbUcgJUgBPXwEpGRQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 04, 2018 at 08:48:15AM -0700, Conrad Meyer wrote: > Hi Konstantin, > > On Sun, Sep 2, 2018 at 2:37 PM, Konstantin Belousov <kib@freebsd.org> wrote: > > Author: kib > > Date: Sun Sep 2 21:37:05 2018 > > New Revision: 338437 > > URL: https://svnweb.freebsd.org/changeset/base/338437 > > > > Log: > > Catch exceptions during EFI RT calls on amd64. > > > > This appeared to be required to have EFI RT support and EFI RTC > > enabled by default, because there are too many reports of faulting > > calls on many different machines. The knob is added to leave the > > exceptions unhandled to allow to debug the actual bugs. > > ... > > > > Modified: head/sys/dev/efidev/efirt.c > > ============================================================================== > > --- head/sys/dev/efidev/efirt.c Sun Sep 2 21:16:43 2018 (r338436) > > +++ head/sys/dev/efidev/efirt.c Sun Sep 2 21:37:05 2018 (r338437) > > ... > > @@ -346,30 +413,35 @@ efi_get_time_capabilities(struct efi_tmcap *tmcap) > > int > > efi_reset_system(void) > > { > > - int error; > > + struct efirt_callinfo ec; > > > > - error = efi_enter(); > > - if (error != 0) > > - return (error); > > - efi_runtime->rt_reset(EFI_RESET_WARM, 0, 0, NULL); > > - efi_leave(); > > - return (EIO); > > + if (efi_runtime == NULL) > > + return (ENXIO); > > + bzero(&ec, sizeof(ec)); > > + ec.ec_name = "rt_reset"; > > + ec.ec_argcnt = 4; > > + ec.ec_arg1 = (uintptr_t)EFI_RESET_WARM; > > + ec.ec_arg1 = (uintptr_t)0; > > + ec.ec_arg1 = (uintptr_t)0; > > + ec.ec_arg1 = (uintptr_t)NULL; > > Coverity warns about ec_arg1 being overwritten before use ??? should > these be ec_arg2, 3, 4? CID 1395456. Indeed, thank you for reporting. Amusingly it is innocent.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180904172321.GE2340>