From nobody Mon Jul 13 02:52:32 2026 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 4gz6S006Ccz6lPvc for ; Mon, 13 Jul 2026 02:52:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gz6Rx6DkLz3Q56 for ; Mon, 13 Jul 2026 02:52:45 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4938d5f86f3so19461405e9.1 for ; Sun, 12 Jul 2026 19:52:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783911164; x=1784515964; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Tm6eOf316qgwNmc0Fu0xf3A/8XHqRifFkXED0Bvr4RY=; b=HDspqX016H6eCxltKstmB4THFDPmO5nymfH5K+6hwF3AULbSqu8WJY70WdFzYvEZeT xJ4QMHV8iYvL6ZIiZu0GfuYDIjAkr14v+0K6y/QGVBuH6AM62n93eebJZaf6C/7TqsmE jkxX6vVvt3Y8wloifFdbf3cw88jTLa1Cc9R1KEiROwsAkvHcTZUWiN7JqeUcFsD4IqX6 4WL4xRdbOLdV8eHsv3A9ZW3vyZbTIu2UvzPwBg+XrDzT9T3CCQVRs4R710XQ2eWoCpI6 cv00ioK/9ImWUqEYrTgwoi4aBwonLIXj7TrEbtG1hGdTcZaRmaA1Mnow3X3qGxTwW2MC nN1g== X-Forwarded-Encrypted: i=1; AHgh+Rr8Bc+klpMu6EA7ZvFLvoAhh1aJ9tFmKtsxhP5y1zayrn5xElmjk0Me5FeHCZY8DrlKi14emj67G0+S1sRjZDgEK3El@freebsd.org X-Gm-Message-State: AOJu0Yz6O/JoOQxhjGl1UT56Wci687YrditHGhUAa1CSaPKvsOFi8ly3 c8RvzIRAoCwmH0GOrirdgVvv64S+1KZvCI0ZS6WsWBkdbVNwcofYVqKW3nyp2sg5XgE= X-Gm-Gg: AfdE7clA6LLRIu/jS7hkTgGl3xLxUzBummmOHsYltSQzo8LWnlM1r+mWEkYzoS4YzfZ 0G3f8yuv3QYavxr2KGXr/L2BPZfsknmtLiESF1t9Aos73KsH2eA2ueQGbKWLWvdm8ZAMgJsTrA7 G+hp6f2Glwmxd8Ijee6flsOQt6lFlyWszQIOI0nC5oY9CdlJSvuwE32nMiSdbW6OseDtzSi7hgU 80Dn8HJ1xSObMuRrE8yXcCprg4Q6YSfAz0H4YwsuTvS5SXDu6YyIGrHzkFULMz4ptgOYO2wyPHs NFuzl4uUy1I6T5KQu3UBHAZEhOpx/F/S8dfEnPH+udiST3geFSELeaXxpg2/sUUkIgqcfJRBH+1 W6o/eMTyo1YKDqUWBE1TTbBnE9m3Crwq8jc3eWhSJb+KeVfakU7H8KnKvEIpRHllqmJprRJB9Lo wp+iCTa3rZ9XOObU6FgAfmJRagGq2eFyzdeNOXwY5Pt212XY7bW++3gaz5358= X-Received: by 2002:a05:600c:1c27:b0:492:3fb5:3a17 with SMTP id 5b1f17b1804b1-493f887ab70mr76621345e9.2.1783911163970; Sun, 12 Jul 2026 19:52:43 -0700 (PDT) Received: from smtpclient.apple (nat-184-161.net.cam.ac.uk. [131.111.184.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493f2dd8376sm156023465e9.2.2026.07.12.19.52.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jul 2026 19:52:43 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3893.100.7.1.1\)) Subject: Re: git: 9313f6b01485 - main - acpi: Add a pseudo-bus for APEI devices to manage resources From: Jessica Clarke In-Reply-To: <6a4d50f8.3f168.563a50cc@gitrepo.freebsd.org> Date: Mon, 13 Jul 2026 03:52:32 +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: <5A66BB03-C115-4A59-8236-CAAC127185DA@freebsd.org> References: <6a4d50f8.3f168.563a50cc@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3893.100.7.1.1) X-Spamd-Result: default: False [-2.18 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.78)[-0.775]; 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]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEFALL_USER(0.00)[jrtc27]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.54:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.54:from] X-Rspamd-Queue-Id: 4gz6Rx6DkLz3Q56 X-Spamd-Bar: -- On 7 Jul 2026, at 20:18, John Baldwin wrote: >=20 > The branch main has been updated by jhb: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9313f6b01485ad9a0b7cc59b459f5714= 533587c3 >=20 > commit 9313f6b01485ad9a0b7cc59b459f5714533587c3 > Author: John Baldwin > AuthorDate: 2026-07-07 18:13:51 +0000 > Commit: John Baldwin > CommitDate: 2026-07-07 18:13:51 +0000 >=20 > acpi: Add a pseudo-bus for APEI devices to manage resources >=20 > Different APEI tables can reuse the same registers (and sometimes > different views of the same register, e.g. 32- vs 64-bit mappings = of > the same register). To enable this sharing, apei0 now acts as a = bus > device managing a pool of allocated resources and handing out = mappings > to child devices which handle individual tables. >=20 > Most of the previous apei(4) driver has been moved into a new > hest0 device that is a child of apei0. >=20 > Reviewed by: gallatin > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D58024 > --- > ... > @@ -128,26 +125,6 @@ struct apei_pcie_error { > uint8_t AERInfo[96]; > }; >=20 > -#ifdef __i386__ > -static __inline uint64_t > -apei_bus_read_8(struct resource *res, bus_size_t offset) > -{ > - return (bus_read_4(res, offset) | > - ((uint64_t)bus_read_4(res, offset + 4)) << 32); > -} > -static __inline void > -apei_bus_write_8(struct resource *res, bus_size_t offset, uint64_t = val) > -{ > - bus_write_4(res, offset, val); > - bus_write_4(res, offset + 4, val >> 32); > -} > -#define READ8(r, o) apei_bus_read_8((r), (o)) > -#define WRITE8(r, o, v) apei_bus_write_8((r), (o), (v)) > -#else > -#define READ8(r, o) bus_read_8((r), (o)) > -#define WRITE8(r, o, v) bus_write_8((r), (o), (v)) > -#endif > - > #define GED_SIZE(ged) ((ged)->Revision >=3D 0x300 ? \ > sizeof(ACPI_HEST_GENERIC_DATA_V300) : = sizeof(ACPI_HEST_GENERIC_DATA)) > #define GED_DATA(ged) ((uint8_t *)(ged) + GED_SIZE(ged)) > @@ -431,10 +408,10 @@ apei_ge_handler(struct apei_ge *ge, bool copy) > ... > diff --git a/sys/dev/acpica/apeivar.h b/sys/dev/acpica/apeivar.h > new file mode 100644 > index 000000000000..7820641aef1f > --- /dev/null > +++ b/sys/dev/acpica/apeivar.h > @@ -0,0 +1,54 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2020 Alexander Motin > + * Copyright (c) 2025 Netflix, Inc. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#ifndef __APEIVAR_H__ > +#define __APEIVAR_H__ > + > +#include "apei_if.h" > + > +struct resource_map *apei_map_register(device_t dev, = ACPI_GENERIC_ADDRESS *gas); > +struct resource_map *apei_map_memory(device_t dev, rman_res_t start, > + rman_res_t len); > +int apei_unmap_register(device_t dev, struct resource_map *map); > + > +#ifdef __i386__ > +static __inline uint64_t > +bus_read_8(struct resource_map *res, bus_size_t offset) > +{ > + return (bus_read_4(res, offset) | > + ((uint64_t)bus_read_4(res, offset + 4)) << 32); > +} > +static __inline void > +bus_write_8(struct resource_map *res, bus_size_t offset, uint64_t = val) > +{ > + bus_write_4(res, offset, val); > + bus_write_4(res, offset + 4, val >> 32); > +} > +#endif > + > +#endif /* !__APEIVAR_H__ */ Dropping the indirection / namespacing for these breaks i386; = bus_read/write_8 are macros in sys/sys/bus.h: > In file included from = /local/scratch/jrtc4/cheribuild-root/freebsd/sys/dev/acpica/acpi_apei_bus.= c:39: > = /local/scratch/jrtc4/cheribuild-root/freebsd/sys/dev/acpica/apeivar.h:41:1= 2: error: type specifier missing, defaults to 'int'; ISO C99 and later = do not support implicit int [-Werror,-Wimplicit-int] > 41 | bus_read_8(struct resource_map *res, bus_size_t offset) > | ^ > /local/scratch/jrtc4/cheribuild-root/freebsd/sys/sys/bus.h:1137:20: = note: expanded from macro 'bus_read_8' > 1137 | bus_space_read_8((r)->r_bustag, (r)->r_bushandle, (o)) > | ^ Jessica