From nobody Mon Oct 24 15:35:55 2022 X-Original-To: dev-commits-src-main@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 4MwzgM2gYcz4g0ZS for ; Mon, 24 Oct 2022 15:35:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 4MwzgL30qdz3V3l for ; Mon, 24 Oct 2022 15:35:58 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f45.google.com with SMTP id v11so6817473wmd.1 for ; Mon, 24 Oct 2022 08:35:58 -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 :subject:date:message-id:reply-to; bh=krZgDSAEghxsbXihMIFQ1H0EfCWpNwWKekBVqazrYz0=; b=Fu/uNIu1Y16MQBKZzIMOvyWxU8EVBwzLd889dBMcE/mXbJ+qX7tx5RTCZNw9sd/BBW /ELN6P5+Y7fsU2Uh8jpa+EIL0WYA8KEtofAOHs0x4QjALPtO0obG3UdlWsaspT+jMUgB OJXC53LSBaZUJngqNm1brpzAfTx1zaus9hoBc9hvpnI+5mgd11YvaEuBongR9Z9cibSO BFf9sDSUvkiOjFaUXXLR2EubrXexL5pHY3cTJXedYwIDQJUcJJQWLeoVKsDvU4yz8wo3 K3yibs/sNoJTowIRUFIK3eRIu9H0KTn7wrdFH+TptPPeCUy4odudPAe+qDG1XW9gf8Bj 2cYQ== X-Gm-Message-State: ACrzQf2FWLO9wHwrUSu52kglAHTZ6CSjd0sco6SwgVP/TyxEQMLbHNAI oIy1i8Yscrir0/UpT4V2qki4hriysqJs+g== X-Google-Smtp-Source: AMsMyM4e2rSXWTyH1gmt1iExIsAtKfZtEBIalNXO04lhjwPtx4BI/T7aChTvmUlf7yfn/T6C389/Bw== X-Received: by 2002:a05:600c:a45:b0:3bc:c676:a573 with SMTP id c5-20020a05600c0a4500b003bcc676a573mr44602272wmq.118.1666625756694; Mon, 24 Oct 2022 08:35:56 -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 i10-20020a1c3b0a000000b003c6d0f8c377sm250493wma.7.2022.10.24.08.35.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2022 08:35:56 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: a9880bfe1181 - main - acpi_ged: New driver to ACPI generic event device From: Jessica Clarke In-Reply-To: <202210241002.29OA26Pk076760@gitrepo.freebsd.org> Date: Mon, 24 Oct 2022 16:35:55 +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: <971E7195-317F-476D-8DAA-AEBE67C1876D@freebsd.org> References: <202210241002.29OA26Pk076760@gitrepo.freebsd.org> To: Takanori Watanabe X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MwzgL30qdz3V3l 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.45 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]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.45:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.45:from] X-ThisMailContainsUnwantedMimeParts: N On 24 Oct 2022, at 11:02, Takanori Watanabe = wrote: >=20 > The branch main has been updated by takawata: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Da9880bfe1181b7a32d026339bae113f2= 4300e5e1 >=20 > commit a9880bfe1181b7a32d026339bae113f24300e5e1 > Author: Takanori Watanabe > AuthorDate: 2022-10-18 05:41:53 +0000 > Commit: Takanori Watanabe > CommitDate: 2022-10-24 09:57:36 +0000 >=20 > acpi_ged: New driver to ACPI generic event device >=20 > New driver to ACPI generic event device, defined in ACPI spec. > Some ACPI power button may not work without this. >=20 > In qemu arm64 with "virt" machine, with ACPI firmware, > enable devd check devd message by > and invoke following command in qemu monitor > (qemu) system_powerdown > and make sure some power button input event appear. > (setting sysctl hw.acpi.power_button_state=3DS5 is not work, > because ACPI tree does not have \_S5 object.) >=20 > Reviewed by: andrew, hrs > Differential Revision: https://reviews.freebsd.org/D37032 > --- > share/man/man4/acpi_ged.4 | 64 +++++++++ > sys/arm64/conf/std.virt | 1 + > sys/conf/files | 1 + > sys/dev/acpica/acpi_ged.c | 267 = +++++++++++++++++++++++++++++++++++++ > sys/modules/acpi/Makefile | 2 +- > sys/modules/acpi/acpi_ged/Makefile | 11 ++ > 6 files changed, 345 insertions(+), 1 deletion(-) >=20 > diff --git a/share/man/man4/acpi_ged.4 b/share/man/man4/acpi_ged.4 > new file mode 100644 > index 000000000000..dd62e172ae8d > --- /dev/null > +++ b/share/man/man4/acpi_ged.4 > @@ -0,0 +1,64 @@ > +.\" Copyright (c) 2022 Takanori Watanabe > +.\" > +.\" 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. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd October 18, 2022 > +.Dt ACPI_GED 4 > +.Os > +.Sh NAME > +.Nm acpi_ged > +.Nd "ACPI Generic Event Device" > +.Sh SYNOPSIS > +To compile this driver into the kernel, > +place the following line in your > +kernel configuration file: > +.Bd -ragged -offset indent > +.Cd "device acpi_ged" > +.Ed > +.Pp > +Alternatively, to load the driver as a > +module at boot time, place the following line in > +.Xr loader.conf 5 : > +.Bd -literal -offset indent > +acpi_ged_load=3D"YES" > +.Ed > +.Sh DESCRIPTION > +The > +.Nm > +driver provides support for generic events interface. > +This handles interrupts and evaluates the specific ACPI method. > +This may generate optionally ACPI notify for another device. > +.Sh SEE ALSO > +.Xr acpi 4 > +.Sh HISTORY > +The > +.Nm > +device driver first appeared in > +.Fx 14.0 . > +.Sh AUTHORS > +.An -nosplit > +The > +.Nm > +driver was written by > +.An Takanori Watanabe Aq Mt takawata@FreeBSD.org > diff --git a/sys/arm64/conf/std.virt b/sys/arm64/conf/std.virt > index 507e1321f3d1..1b7d7ad8ab0a 100644 > --- a/sys/arm64/conf/std.virt > +++ b/sys/arm64/conf/std.virt > @@ -24,3 +24,4 @@ device vtnet # VirtIO = Ethernet device >=20 > options FDT > device acpi > +device acpi_ged > diff --git a/sys/conf/files b/sys/conf/files > index 39e6d4aaf0a8..563054bbac3b 100644 > --- a/sys/conf/files > +++ b/sys/conf/files > @@ -806,6 +806,7 @@ dev/acpica/acpi_button.c optional acpi > dev/acpica/acpi_cmbat.c optional acpi > dev/acpica/acpi_cpu.c optional acpi > dev/acpica/acpi_ec.c optional acpi > +dev/acpica/acpi_ged.c optional acpi_ged acpi > dev/acpica/acpi_isab.c optional acpi isa > dev/acpica/acpi_lid.c optional acpi > dev/acpica/acpi_package.c optional acpi > diff --git a/sys/dev/acpica/acpi_ged.c b/sys/dev/acpica/acpi_ged.c > new file mode 100644 > index 000000000000..9459ccc3525b > --- /dev/null > +++ b/sys/dev/acpica/acpi_ged.c > @@ -0,0 +1,267 @@ > +/*- > + * Copyright (c) 2022 Takanori Watanabe > + * > + * 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. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include "opt_acpi.h" > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +/* Hooks for the ACPI CA debugging infrastructure */ > +#define _COMPONENT ACPI_GED > +ACPI_MODULE_NAME("GED") > + > +static MALLOC_DEFINE(M_ACPIGED, "acpiged", "ACPI Generic event = data"); > + > +struct acpi_ged_event { > + device_t dev; > + struct resource *r; > + int rid; > + void *cookie; > + ACPI_HANDLE ah; > + ACPI_OBJECT_LIST args; > + ACPI_OBJECT arg1; > +}; > + > +struct acpi_ged_softc { > + int numevts; > + struct acpi_ged_event *evts; > +}; > + > +static int acpi_ged_probe(device_t dev); > +static int acpi_ged_attach(device_t dev); > +static int acpi_ged_detach(device_t dev); > + > +static char *ged_ids[] =3D { "ACPI0013", NULL }; > + > +static device_method_t acpi_ged_methods[] =3D { > + /* Device interface */ > + DEVMETHOD(device_probe, acpi_ged_probe), > + DEVMETHOD(device_attach, acpi_ged_attach), > + DEVMETHOD(device_detach, acpi_ged_detach), > + DEVMETHOD_END > +}; > + > +static driver_t acpi_ged_driver =3D { > + "acpi_ged", > + acpi_ged_methods, > + sizeof(struct acpi_ged_softc), > +}; > + > +DRIVER_MODULE(acpi_ged, acpi, acpi_ged_driver, 0, 0); > +MODULE_DEPEND(acpi_ged, acpi, 1, 1, 1); > + > +static void > +acpi_ged_evt(void *arg) > +{ > + struct acpi_ged_event *evt =3D arg; > + > + AcpiEvaluateObject(evt->ah, NULL, &evt->args, NULL); > +} > + > +static void > +acpi_ged_intr(void *arg) > +{ > + AcpiOsExecute(OSL_GPE_HANDLER, acpi_ged_evt, arg); > +} > +static int Missing newline > +acpi_ged_probe(device_t dev) > +{ > + int rv; > + > + if (acpi_disabled("ged")) > + return (ENXIO); > + rv =3D ACPI_ID_PROBE(device_get_parent(dev), dev, ged_ids, = NULL); > + if (rv > 0) > + return (ENXIO); Why not return rv? Or just mirror most other uses and guard device_set_desc with rv <=3D 0. > + > + device_set_desc(dev, "Generic Event Device"); > + return (rv); > +} > + > +/*this should be in acpi_resource.*/ Spaces around the comment, and why not just put it there? > +static int > +acpi_get_trigger(ACPI_RESOURCE *res) > +{ > + int trig; > + > + switch (res->Type) { > + case ACPI_RESOURCE_TYPE_IRQ: > + KASSERT(res->Data.Irq.InterruptCount =3D=3D 1, > + ("%s: multiple interrupts", __func__)); > + trig =3D res->Data.Irq.Triggering; > + break; > + case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: > + KASSERT(res->Data.ExtendedIrq.InterruptCount =3D=3D 1, > + ("%s: multiple interrupts", __func__)); > + trig =3D res->Data.ExtendedIrq.Triggering; > + break; > + default: > + panic("%s: bad resource type %u", __func__, res->Type); > + } > + > + return (trig =3D=3D ACPI_EDGE_SENSITIVE) > + ? INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL; Parentheses should be around the whole expression not the condition. > +} > + > +static int > +acpi_ged_attach(device_t dev) > +{ > + struct acpi_ged_softc *sc =3D device_get_softc(dev); > + struct resource_list *rl; > + struct resource_list_entry *rle; > + ACPI_RESOURCE ares; > + ACPI_HANDLE evt_method; > + int i; > + int rawirq, trig; > + char name[] =3D "_Xnn"; > + > + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); > + > + if (ACPI_FAILURE(AcpiGetHandle(acpi_get_handle(dev), "_EVT", > + &evt_method))) { > + device_printf(dev, "_EVT not found\n"); > + evt_method =3D NULL; > + } > + > + rl =3D BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); > + STAILQ_FOREACH(rle, rl, link) { > + if (rle->type =3D=3D SYS_RES_IRQ) { > + sc->numevts++; > + } > + } > + sc->evts =3D mallocarray(sc->numevts, sizeof(*sc->evts), = M_ACPIGED, > + M_WAITOK | M_ZERO); > + for (i =3D 0; i < sc->numevts; i++) { > + sc->evts[i].dev =3D dev; > + sc->evts[i].rid =3D i; > + sc->evts[i].r =3D bus_alloc_resource_any(dev, = SYS_RES_IRQ, > + &sc->evts[i].rid, RF_ACTIVE | RF_SHAREABLE); > + if (sc->evts[i].r =3D=3D NULL) { > + device_printf(dev, "Cannot alloc %dth irq\n", = i); Not correct for i being 1 or 2 (or 21, 22, etc). Use =E2=80=9Cirq %d=E2=80= =9D instead? > + continue; > + } > +#ifdef INTRNG > + { > + struct intr_map_data_acpi *ima; > + ima =3D rman_get_virtual(sc->evts[i].r); > + if (ima =3D=3D NULL) { > + device_printf(dev, "map not found" > + " non-intrng?\n"); This existing seems dubious, how would it be hit? > + rawirq =3D = rman_get_start(sc->evts[i].r); > + trig =3D INTR_TRIGGER_LEVEL; > + if = (ACPI_SUCCESS(acpi_lookup_irq_resource > + (dev, sc->evts[i].rid, > + sc->evts[i].r, &ares))) { > + trig =3D = acpi_get_trigger(&ares); > + } > + } else if (ima->hdr.type =3D=3D = INTR_MAP_DATA_ACPI) { > + device_printf(dev, "Raw IRQ %d\n", = ima->irq); This is a debug print. > + rawirq =3D ima->irq; > + trig =3D ima->trig; > + } else { > + device_printf(dev, "Not supported intr" > + " type%d\n", = ima->hdr.type); Space after type? > + continue; > + } > + } > +#else > + rawirq =3D rman_get_start(sc->evt[i].r); > + trig =3D INTR_TRIGGER_LEVEL; > + if (ACPI_SUCCESS(acpi_lookup_irq_resource > + (dev, sc->evts[i].rid, > + sc->evts[i].r, &ares))) { > + trig =3D acpi_get_trigger(&ares); > + } > +#endif > + if (rawirq < 0x100) { > + sprintf(name, "_%c%02X", > + ((trig =3D=3D INTR_TRIGGER_EDGE) ? 'E' : = 'L'), Condition parentheses are redundant. > + rawirq); > + if (ACPI_SUCCESS(AcpiGetHandle > + (acpi_get_handle(dev), > + name, &sc->evts[i].ah))) { > + sc->evts[i].args.Count =3D 0; /* ensure = */ These =E2=80=9Censure=E2=80=9D comments seem meaningless? > + } else { > + sc->evts[i].ah =3D NULL; /* ensure */ > + } > + } > + > + if (sc->evts[i].ah =3D=3D NULL) { > + if (evt_method !=3D NULL) { > + sc->evts[i].ah =3D evt_method; > + sc->evts[i].arg1.Type =3D = ACPI_TYPE_INTEGER; > + sc->evts[i].arg1.Integer.Value =3D = rawirq; > + sc->evts[i].args.Count =3D 1; > + sc->evts[i].args.Pointer =3D = &sc->evts[i].arg1; > + } else{ Space before { > + device_printf > + (dev, > + "Cannot find handler method = %d\n", > + i); I don=E2=80=99t think this conforms to style(9). > + continue; > + } > + } > + > + if (bus_setup_intr(dev, sc->evts[i].r, > + INTR_TYPE_MISC | INTR_MPSAFE, NULL, = acpi_ged_intr, > + &sc->evts[i], &sc->evts[i].cookie) !=3D 0) { > + device_printf(dev, "Failed to setup intr %d\n", = i); > + } > + } > + > + return_VALUE(0); Existing uses of return_VALUE put a space like return. > +} > + > +static int > +acpi_ged_detach(device_t dev) > +{ > + struct acpi_ged_softc *sc =3D device_get_softc(dev); > + int i; > + > + for (i =3D 0; i < sc->numevts; i++) { > + if (sc->evts[i].cookie) { !=3D NULL > + bus_teardown_intr(dev, sc->evts[i].r, > + sc->evts[i].cookie); > + } > + if (sc->evts[i].r) { !=3D NULL Jess > + bus_release_resource(dev, SYS_RES_IRQ, = sc->evts[i].rid, > + sc->evts[i].r); > + } > + } > + free(sc->evts, M_ACPIGED); > + > + return (0); > +} > diff --git a/sys/modules/acpi/Makefile b/sys/modules/acpi/Makefile > index 552c4d2cbba0..71e083fef700 100644 > --- a/sys/modules/acpi/Makefile > +++ b/sys/modules/acpi/Makefile > @@ -1,7 +1,7 @@ > # $FreeBSD$ >=20 > SUBDIR=3D acpi_asus acpi_asus_wmi acpi_dock acpi_fujitsu = acpi_hp \ > - acpi_ibm acpi_panasonic acpi_sony acpi_toshiba = \ > + acpi_ged acpi_ibm acpi_panasonic acpi_sony acpi_toshiba = \ > acpi_video acpi_wmi aibs >=20 > .include > diff --git a/sys/modules/acpi/acpi_ged/Makefile = b/sys/modules/acpi/acpi_ged/Makefile > new file mode 100644 > index 000000000000..a937249357f4 > --- /dev/null > +++ b/sys/modules/acpi/acpi_ged/Makefile > @@ -0,0 +1,11 @@ > +# $FreeBSD$ > + > +.PATH: ${SRCTOP}/sys/dev/acpica > +.if ${TARGET_ARCH} =3D=3D aarch64 > +CFLAGS +=3D -DINTRNG > +.endif > +KMOD=3D acpi_ged > +SRCS=3D acpi_ged.c > +SRCS+=3D opt_acpi.h opt_evdev.h acpi_if.h bus_if.h device_if.h > + > +.include