From owner-svn-src-all@freebsd.org Tue Sep 4 16:53:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3AF2FF5146; Tue, 4 Sep 2018 16:53:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 767CB77390; Tue, 4 Sep 2018 16:53:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f174.google.com with SMTP id r196-v6so3597018iod.0; Tue, 04 Sep 2018 09:53:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=A0oQw45QlYd8IJ3/3QlHnCPDByJ98sXPikPIhRsQP6U=; b=OzoXci1H+kf1ASD0ZBCp9useIZuT0GGZsu6mpo6ArSll75gqsLQr9lsf9xe5cLCzAW nBs+9+5114RAHQ8jjZzNsaDNCpB9rSBYUgkm8QZfa3IJIdnZ2Y2PqU3CFS8AlOW7fanl 51zRj5G7eFhZFlqJr1t8UOyiyKyK1kU0rbofFOWWXUQEiuwqCyq53bj8oQTn6mY+x+1J M+3bPrTFP1nH3mlg+LywcgNuYvvwUyiaGIOvNfoX76m2fKPV0Xnz2DKZR/vDt/yIx/kB CmZ6t8fmZAsxdwYabYUE7IPv0iO70pEmssu+Z3/JirYg9dPblR0fsW81YkYZnXVgsuNy +jPw== X-Gm-Message-State: APzg51CUVMDzNto7tQpMrXtJhEGKBzHsSbxfQqyrnOtB2Vi3FVwEijkh v/CbnEfxRhIaE5Dytjqg7f2V15s3 X-Google-Smtp-Source: ANB0VdYkYYBzJmFxwAt+q5fGjvYFR95Y3xmN23SX/SF0uZhRBCPqvNpSPmaubu82pJOgfLdLLuKd0A== X-Received: by 2002:a6b:2b51:: with SMTP id r78-v6mr21722619ior.279.1536076096440; Tue, 04 Sep 2018 08:48:16 -0700 (PDT) Received: from mail-it0-f49.google.com (mail-it0-f49.google.com. [209.85.214.49]) by smtp.gmail.com with ESMTPSA id g129-v6sm7120936itg.16.2018.09.04.08.48.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Sep 2018 08:48:16 -0700 (PDT) Received: by mail-it0-f49.google.com with SMTP id e14-v6so5646560itf.1; Tue, 04 Sep 2018 08:48:16 -0700 (PDT) X-Received: by 2002:a24:44d7:: with SMTP id o206-v6mr715569ita.66.1536076096192; Tue, 04 Sep 2018 08:48:16 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:4f1b:0:0:0:0:0 with HTTP; Tue, 4 Sep 2018 08:48:15 -0700 (PDT) In-Reply-To: <201809022137.w82Lb5FK046191@repo.freebsd.org> References: <201809022137.w82Lb5FK046191@repo.freebsd.org> From: Conrad Meyer Date: Tue, 4 Sep 2018 08:48:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338437 - in head/sys: amd64/amd64 amd64/include arm64/arm64 arm64/include conf dev/efidev modules/efirt sys To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 16:53:33 -0000 Hi Konstantin, On Sun, Sep 2, 2018 at 2:37 PM, Konstantin Belousov 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- 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 =3D efi_enter(); > - if (error !=3D 0) > - return (error); > - efi_runtime->rt_reset(EFI_RESET_WARM, 0, 0, NULL); > - efi_leave(); > - return (EIO); > + if (efi_runtime =3D=3D NULL) > + return (ENXIO); > + bzero(&ec, sizeof(ec)); > + ec.ec_name =3D "rt_reset"; > + ec.ec_argcnt =3D 4; > + ec.ec_arg1 =3D (uintptr_t)EFI_RESET_WARM; > + ec.ec_arg1 =3D (uintptr_t)0; > + ec.ec_arg1 =3D (uintptr_t)0; > + ec.ec_arg1 =3D (uintptr_t)NULL; Coverity warns about ec_arg1 being overwritten before use =E2=80=94 should these be ec_arg2, 3, 4? CID 1395456. > + ec.ec_fptr =3D EFI_RT_METHOD_PA(rt_reset); > + return (efi_call(&ec)); > } Best, Conrad