From nobody Fri Aug 26 17:44:56 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MDnKR6Z8jz4ZZfk for ; Fri, 26 Aug 2022 17:44:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MDnKR16nYz3Y12 for ; Fri, 26 Aug 2022 17:44:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f48.google.com with SMTP id h204-20020a1c21d5000000b003a5b467c3abso4781638wmh.5 for ; Fri, 26 Aug 2022 10:44:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc; bh=jiE56uDaioM/vopdQEKRsEkLXEW80wR00QamRKOcBcA=; b=GAz+Sl3Iu4o3Sz4CC5uWVYtYg8dQPqr+wOfzscz7qvV4Ih+ozmVj5z3MH3oOO5ngbT 0nO5KxaC91BR3LGww//vbyV1w7zd1bXJbRgVgae69Jkelp6kgJWx5HvPHclhvAefejp2 WcB1lvct+fEo9ZP38g4bU8glJlf3kR9ikxTE4boVLGEhpGuN2Uln8czbcEKi7B/t7Fj8 pRbXHNjn0RXD79H9J6qv5Lr5AK8tFBtHDPzSEy4UfE2O5FxQppdVwp2JhIfhpdQNKr9C SlWHQjh6qTfnjM1MLUWwZnYeDsajACXXSBvnRdqJ3WTWbad3R+lTA55zd5bAwZBjouoh F/ng== X-Gm-Message-State: ACgBeo2cMvUuX+lCBb2yWT9BSGw5m8RErrX+t33exZ84NUDuj4FMrSb1 lyGhz1qOqqbpA/CGf3+/aOQ/qQ== X-Google-Smtp-Source: AA6agR6nMTaKr3VEKO4mbdJMnpLrLU1ebKeYy02qi2cDJQegpPzst88eTLegsvwLYGStaTAZBeVX/A== X-Received: by 2002:a1c:4c18:0:b0:3a5:3ddd:2f29 with SMTP id z24-20020a1c4c18000000b003a53ddd2f29mr368457wmf.91.1661535897698; Fri, 26 Aug 2022 10:44:57 -0700 (PDT) Received: from smtpclient.apple (global-5-141.n-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id v20-20020a05600c15d400b003a331c6bffdsm175139wmf.47.2022.08.26.10.44.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Aug 2022 10:44:56 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: git: 74704a26bc2c - main - efi: Create a define for memory descriptor version From: Jessica Clarke In-Reply-To: <202208261741.27QHfVse092900@gitrepo.freebsd.org> Date: Fri, 26 Aug 2022 18:44:56 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <563EB46C-FEA6-4E1D-B9D5-9EFCF3427FCF@freebsd.org> References: <202208261741.27QHfVse092900@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Rspamd-Queue-Id: 4MDnKR16nYz3Y12 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.48 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.48:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.48:from] X-ThisMailContainsUnwantedMimeParts: N On 26 Aug 2022, at 18:41, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D74704a26bc2cfc72de6821d29a1f53b9= d8c65f55 >=20 > commit 74704a26bc2cfc72de6821d29a1f53b9d8c65f55 > Author: Warner Losh > AuthorDate: 2022-08-26 17:39:37 +0000 > Commit: Warner Losh > CommitDate: 2022-08-26 17:40:42 +0000 >=20 > efi: Create a define for memory descriptor version >=20 > For true EFI platforms, the EFI BIOS will return version 1 (since = no > other version is defined as of this commit). However, for = environments > that wish to create an EFI memory mapping table that aren't = actually > EFI, we need to know this. Add EFI_MEMORY_DESCRIPTOR_VERSION for = this > constant. Should such environments not be hard-coding version 1? Otherwise you risk starting to silently create version 2 structures in the future if this is bumped, but initialised as if they were version 1, which could mean leaving some new fields uninitialised. Jess > Sponsored by: Netflix > --- > sys/sys/efi.h | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/sys/sys/efi.h b/sys/sys/efi.h > index 6ace7dd6e523..f5dc15ae418f 100644 > --- a/sys/sys/efi.h > +++ b/sys/sys/efi.h > @@ -59,6 +59,8 @@ struct efi_cfgtbl { > void *ct_data; > }; >=20 > +#define EFI_MEMORY_DESCRIPTOR_VERSION 1 > + > struct efi_md { > uint32_t md_type; > #define EFI_MD_TYPE_NULL 0