From owner-freebsd-acpi@FreeBSD.ORG Mon Jun 22 12:25:46 2015 Return-Path: Delivered-To: freebsd-acpi@nevdull.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EC5C54B for ; Mon, 22 Jun 2015 12:25:46 +0000 (UTC) (envelope-from komiteinternazionalistak.org@lilith.nodo50.org) Received: from lilith.nodo50.org (lilith.nodo50.org [91.226.177.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65C3A78A for ; Mon, 22 Jun 2015 12:25:45 +0000 (UTC) (envelope-from komiteinternazionalistak.org@lilith.nodo50.org) Received: by lilith.nodo50.org (Postfix, from userid 1365) id 11303DEC9BB; Mon, 22 Jun 2015 14:25:43 +0200 (CEST) To: freebsd-acpi@freebsd.org Subject: From John Mckendrick. X-PHP-Originating-Script: 1365:mail.php From: John Mckendrick MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Message-Id: <20150622122543.11303DEC9BB@lilith.nodo50.org> Date: Mon, 22 Jun 2015 14:25:43 +0200 (CEST) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2015 12:25:46 -0000 Good day, I am John Mckendrick, Managing Director, and Head of UK Retail at Golden Power international investment LTD; a business developer, stock broking and portfolio Management Company based in the United Kingdom. I went through your profile and will like to develop a business partnership with you; a client of my portfolio will be interested in investing Eight figure British currencies. The reason why have contacted you is because the investor/my client is specially interested to invest in your country and after checking the world business directory I decided to contact you, I will like to keep the details short for now. If you are interested and have a project worth investing on, kindly get back to me through my email address or call me. Do not forget to include your direct cell phone number and the best time to call you in your reply; I will ring you to discuss the modality and other details once I get a reply from you. I am looking forward to your response and working with you on this Investment project. Yours Faithfully John Mckendrick From owner-freebsd-acpi@freebsd.org Fri Jun 26 01:14:58 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3367898D6A2 for ; Fri, 26 Jun 2015 01:14:58 +0000 (UTC) (envelope-from Anthony.B.Jenkins@att.net) Received: from nm16-vm2.bullet.mail.ne1.yahoo.com (nm16-vm2.bullet.mail.ne1.yahoo.com [98.138.91.92]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E76B110B1 for ; Fri, 26 Jun 2015 01:14:57 +0000 (UTC) (envelope-from Anthony.B.Jenkins@att.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1435281290; bh=SCzFeP68M3Xbzkywxb8RgObaxwWVtEOBg+ewAqgok8Y=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=k0pRYuIKvs9dqPqDIlNr7+GYa6Q0Au20l2radymYbC5e4jjwJSqD4nZOIuq6AvEgOYNFSZKigkurtqI8qT8FfFufJlbKnXmUQtQA1isgI+ZQ0BsPO9RTwimUEfJNcmiFaMyj+HCGiGGW9cIYKj3yTckoyQ+gB60xE57QoRlzcU0= Received: from [98.138.101.130] by nm16.bullet.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 01:14:50 -0000 Received: from [98.138.226.128] by tm18.bullet.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 01:14:50 -0000 Received: from [127.0.0.1] by smtp215.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 01:14:47 -0000 X-Yahoo-Newman-Id: 889955.43466.bm@smtp215.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: pt5Qj8gVM1lmLdlGmYoPd7wkGdsNDwLKbFnq4e50.qlBB90 Q66sCYWAsqVZLjEttPc.fvL7yAoVcbbcj7JW7JKIAQDjSp41gCV9urqr6Cz1 8tzK.KSW2F04mzLQ0Xt8JaPD34dPnpIw7BW4Vzu0E8B8890.nhutWRMk5YhE leCWPRZdLXdY2RoqApMgm4UK044ZE6x5G_4l1Fn09r.bKKHKH2XO2jFR3OaG DNNVWHWHJW2EgjZzdgv9dd7mt.py7cWar6NapDvArHipY7uOKpg0IXDWkn8z C61.W6FcFUW_CDBK4ZXkFqoo4zRNgzT0pAyU_D04s7u7kiztMm1.SyjhwIJZ eBN3CcEjEcM88mR2Ojkcghk1YUknmV2hIl2gj30ZQ9bx37nqcDYysNXxq55l 20vEem2dDzHy7m6ipjLC1jYAf8.nUeowNE9B4GSc.sUhl0YZXHW6Y5Idfa0e UJEuTABgPZTYeEc1zRVoT1PUenw719uakH9yc7Y26UHkUSkirz_El5Jhjlkn MWQfR30n4QiP3dRBGiWih6.GhdsLFiXNuWbDzksdrDogsruDvH68- X-Yahoo-SMTP: OKD1keCswBBTAmAF1s00hLyKW3wE3YfSK0Eazl6b4VZG4LTqJxg- Message-ID: <558CA785.1050904@att.net> Date: Thu, 25 Jun 2015 21:14:45 -0400 From: Anthony Jenkins User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ian Smith , Warner Losh CC: freebsd-acpi@freebsd.org Subject: [PATCH] ACPI CMOS region support rev. 6 References: <20150222180817.GD27984@strugglingcoder.info> <54EB8C21.2080600@att.net> <2401337.2oUs7iAbtB@ralph.baldwin.cx> <54EF3D5D.4010106@att.net> <20150227222203.P38620@sola.nimnet.asn.au> <20150228125857.D1277@besplex.bde.org> <54F14368.4020807@att.net> <20150302002647.W42658@sola.nimnet.asn.au> <54F5E53D.1090601@att.net> <20150306025800.U46361@sola.nimnet.asn.au> <54F9D7E6.4050807@att.net> <5504FF32.3020202@att.net> <20150317001401.X22641@sola.nimnet.asn.au> <5506F00A.3030708@att.net> <5506FBE3.1000009@att.net> <20150317041624.K22641@sola.nimnet.asn.au> <55073442.5060005@att.net> <20150317222704.K22641@sola.nimnet.asn.au> <550825DE.7030406@att.net> <56B494A3-2058-4B7B-8183-646A46753A53@bsdimp.com> <5509A282.6070207@att.net> <20150319184348.X22641@sola.nimnet.asn.au> <550ACAEC.3060808@att.net> <20150320002950.T22641@sola.nimnet.asn.au> <550AD9B7.4090508@att.net> In-Reply-To: <550AD9B7.4090508@att.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2015 01:14:58 -0000 Sooo here's the new and improved rev. 6, "new and improved" because it increases the diff line count by 332%. > [ajenkins@ajenkins-hplaptop /usr/src]$ wc -l atrtc_c_rev5.diff > atrtc_rev6.diff > 220 atrtc_c_rev5.diff > 731 atrtc_rev6.diff This is to satisfy the request to split the atrtc.c driver into a "core" part and "bus" parts: > Looking at patch 5: > > You need to rework this so there=92s an atrtc_acpi.c. Put all the ACPI = attachment in there. You should also split off the little bit that=92s IS= A-specific into atrtc_isa. Once you do that, we can talk. > > Warner I actually finished this patch a couple months ago and have been running it on my laptop, I just don't see the point...maybe Warner could elaborate on the rationale for his request? At the very least, this should be two commits - the functional change and the refactorization request. I may have also added Ian's request for verbosity tweaks, but it's been a while... I don't see any CMOS logging noise FWIW. Thanks, Anthony From owner-freebsd-acpi@freebsd.org Fri Jun 26 01:16:03 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B718698D6CD for ; Fri, 26 Jun 2015 01:16:03 +0000 (UTC) (envelope-from Anthony.B.Jenkins@att.net) Received: from nm11.bullet.mail.ne1.yahoo.com (nm11.bullet.mail.ne1.yahoo.com [98.138.90.74]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C40010E9 for ; Fri, 26 Jun 2015 01:16:02 +0000 (UTC) (envelope-from Anthony.B.Jenkins@att.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1435281356; bh=ZCVNjSf/Fwx7fYgMuSgukOM0lZryaQ40RHoURN0dn48=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=fRTmLWJoVwRtSac6ZYenCgUPi42cO6UEEaFHG9UhTk4JTGz1NnR0UZOfLGwWrubiHqWCm5HSToOo5AdJRQY/OSc2DOi6/gPUWDhm15G7dvqrZV2ZLQ/01DSSaBRyQw/jPzwC32q9yzlTmert2W48dsmjXhFZF3Agkw4IDBFUo2g= Received: from [98.138.100.116] by nm11.bullet.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 01:15:56 -0000 Received: from [98.138.226.63] by tm107.bullet.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 01:15:55 -0000 Received: from [127.0.0.1] by smtp214.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 01:15:55 -0000 X-Yahoo-Newman-Id: 937143.52111.bm@smtp214.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: MdYaGPsVM1kS0tb0q3DNogtxocwBZRDtguAqe8fIJXYXqez cuqjiKGgc3iPz6osDZ1vxN.tWuOAXSPY.6XqqctQmrzOhgTEDOXCL_4Kv02I USCiKqbP4d1wYXbDuw8vcFjw7aYHpG8C6lZW6X96W.NihL66jTqFuCRcgy5P amEra8BGRaBKwon8IY.iCKeAVuMT5KouD.dfeNGBavASLyF_YB5hbogKCvES TkHfQD7upDj96eZCnzQ_6ouxCO5xYIxIq6aqshBsq9Ybv8a6TaNEzdDUHzud iJGC4Nv3Re.nrqtSyr3isVbjybBSjk1SWdX_h2mMRWAc7UU0r9Lul7K53Y0s 8BmhacKId177fUJQ1ycBVqdfA6HL8w9Kc0t0hVe0ce_NAR1MbquF054DZkcG Yi9PvJmPxzlTecYUSTYnTnCRrD8uYBciuUBhbSSTEdXiCwqL4byYbWgHhrhw 83mQUXiSpBiCtN.OfGd5fBnnjns8H0D5Gu5mvIU6dJxhzNZKULxTDSrtHJFN zgw1dG1gce5HW4.9tEQoTzefzedp8wSkTpmBKt62Qp5.r0zkr5NtCyHzV X-Yahoo-SMTP: OKD1keCswBBTAmAF1s00hLyKW3wE3YfSK0Eazl6b4VZG4LTqJxg- Message-ID: <558CA7C9.9000304@att.net> Date: Thu, 25 Jun 2015 21:15:53 -0400 From: Anthony Jenkins User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ian Smith , Warner Losh CC: freebsd-acpi@freebsd.org Subject: Re: [PATCH] ACPI CMOS region support rev. 6 References: <20150222180817.GD27984@strugglingcoder.info> <54EB8C21.2080600@att.net> <2401337.2oUs7iAbtB@ralph.baldwin.cx> <54EF3D5D.4010106@att.net> <20150227222203.P38620@sola.nimnet.asn.au> <20150228125857.D1277@besplex.bde.org> <54F14368.4020807@att.net> <20150302002647.W42658@sola.nimnet.asn.au> <54F5E53D.1090601@att.net> <20150306025800.U46361@sola.nimnet.asn.au> <54F9D7E6.4050807@att.net> <5504FF32.3020202@att.net> <20150317001401.X22641@sola.nimnet.asn.au> <5506F00A.3030708@att.net> <5506FBE3.1000009@att.net> <20150317041624.K22641@sola.nimnet.asn.au> <55073442.5060005@att.net> <20150317222704.K22641@sola.nimnet.asn.au> <550825DE.7030406@att.net> <56B494A3-2058-4B7B-8183-646A46753A53@bsdimp.com> <5509A282.6070207@att.net> <20150319184348.X22641@sola.nimnet.asn.au> <550ACAEC.3060808@att.net> <20150320002950.T22641@sola.nimnet.asn.au> <550AD9B7.4090508@att.net> <558CA785.1050904@att.net> In-Reply-To: <558CA785.1050904@att.net> Content-Type: multipart/mixed; boundary="------------050805090500090807050701" X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2015 01:16:03 -0000 This is a multi-part message in MIME format. --------------050805090500090807050701 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit ...and of course I forget the attachment... On 06/25/15 21:14, Anthony Jenkins wrote: > Sooo here's the new and improved rev. 6, "new and improved" because it > increases the diff line count by 332%. >> [ajenkins@ajenkins-hplaptop /usr/src]$ wc -l atrtc_c_rev5.diff >> atrtc_rev6.diff >> 220 atrtc_c_rev5.diff >> 731 atrtc_rev6.diff > This is to satisfy the request to split the atrtc.c driver into a "core" > part and "bus" parts: >> Looking at patch 5: >> >> You need to rework this so there’s an atrtc_acpi.c. Put all the ACPI attachment in there. You should also split off the little bit that’s ISA-specific into atrtc_isa. Once you do that, we can talk. >> >> Warner > I actually finished this patch a couple months ago and have been running > it on my laptop, I just don't see the point...maybe Warner could > elaborate on the rationale for his request? At the very least, this > should be two commits - the functional change and the refactorization > request. > > I may have also added Ian's request for verbosity tweaks, but it's been > a while... I don't see any CMOS logging noise FWIW. > > Thanks, > Anthony > > --------------050805090500090807050701 Content-Type: text/x-patch; name="atrtc_rev6.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="atrtc_rev6.diff" Index: sys/conf/files.i386 =================================================================== --- sys/conf/files.i386 (revision 284815) +++ sys/conf/files.i386 (working copy) @@ -577,8 +577,10 @@ x86/iommu/intel_quirks.c optional acpi acpi_dmar pci x86/iommu/intel_utils.c optional acpi acpi_dmar pci x86/isa/atpic.c optional atpic -x86/isa/atrtc.c standard -x86/isa/clock.c standard +x86/isa/atrtc.c standard native +x86/isa/atrtc_isa.c standard isa atrtc +#x86/isa/atrtc_acpi.c optional atrtc acpi +x86/isa/clock.c optional native x86/isa/elcr.c optional atpic | apic x86/isa/isa.c optional isa x86/isa/isa_dma.c optional isa Index: sys/conf/files.amd64 =================================================================== --- sys/conf/files.amd64 (revision 284815) +++ sys/conf/files.amd64 (working copy) @@ -583,6 +583,8 @@ x86/iommu/intel_utils.c optional acpi acpi_dmar pci x86/isa/atpic.c optional atpic isa x86/isa/atrtc.c standard +x86/isa/atrtc_isa.c standard +x86/isa/atrtc_acpi.c standard x86/isa/clock.c standard x86/isa/elcr.c optional atpic isa | mptable x86/isa/isa.c standard Index: sys/x86/isa/atrtc.c =================================================================== --- sys/x86/isa/atrtc.c (revision 284815) +++ sys/x86/isa/atrtc.c (working copy) @@ -42,21 +42,24 @@ #include #include #include -#include #include #include +#include +#include "clock_if.h" +#include "atrtcvar.h" + #ifdef DEV_ISA #include #include #endif -#include -#include "clock_if.h" #define RTC_LOCK do { if (!kdb_active) mtx_lock_spin(&clock_lock); } while (0) #define RTC_UNLOCK do { if (!kdb_active) mtx_unlock_spin(&clock_lock); } while (0) -int atrtcclock_disable = 0; +#define IO_DELAY() (void)inb(0x84) +#define IO_RTC_ADDR (IO_RTC + 0) +#define IO_RTC_DATA (IO_RTC + 1) static int rtc_reg = -1; static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; @@ -73,10 +76,10 @@ RTC_LOCK; if (rtc_reg != reg) { - inb(0x84); + IO_DELAY(); outb(IO_RTC, reg); rtc_reg = reg; - inb(0x84); + IO_DELAY(); } val = inb(IO_RTC + 1); RTC_UNLOCK; @@ -89,13 +92,13 @@ RTC_LOCK; if (rtc_reg != reg) { - inb(0x84); + IO_DELAY(); outb(IO_RTC, reg); rtc_reg = reg; - inb(0x84); + IO_DELAY(); } outb(IO_RTC + 1, val); - inb(0x84); + IO_DELAY(); RTC_UNLOCK; } @@ -105,7 +108,7 @@ return(bcd2bin(rtcin(port))); } -static void +void atrtc_start(void) { @@ -155,15 +158,7 @@ * RTC driver for subr_rtc */ -struct atrtc_softc { - int port_rid, intr_rid; - struct resource *port_res; - struct resource *intr_res; - void *intr_handler; - struct eventtimer et; -}; - -static int +int rtc_start(struct eventtimer *et, sbintime_t first, sbintime_t period) { @@ -172,7 +167,7 @@ return (0); } -static int +int rtc_stop(struct eventtimer *et) { @@ -201,7 +196,7 @@ * Stat clock ticks can still be lost, causing minor loss of accuracy * in the statistics, but the stat clock will no longer stop. */ -static int +int rtc_intr(void *arg) { struct atrtc_softc *sc = (struct atrtc_softc *)arg; @@ -215,86 +210,7 @@ return(flag ? FILTER_HANDLED : FILTER_STRAY); } -/* - * Attach to the ISA PnP descriptors for the timer and realtime clock. - */ -static struct isa_pnp_id atrtc_ids[] = { - { 0x000bd041 /* PNP0B00 */, "AT realtime clock" }, - { 0 } -}; - -static int -atrtc_probe(device_t dev) -{ - int result; - - result = ISA_PNP_PROBE(device_get_parent(dev), dev, atrtc_ids); - /* ENOENT means no PnP-ID, device is hinted. */ - if (result == ENOENT) { - device_set_desc(dev, "AT realtime clock"); - return (BUS_PROBE_LOW_PRIORITY); - } - return (result); -} - -static int -atrtc_attach(device_t dev) -{ - struct atrtc_softc *sc; - u_long s; - int i; - - sc = device_get_softc(dev); - sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->port_rid, - IO_RTC, IO_RTC + 1, 2, RF_ACTIVE); - if (sc->port_res == NULL) - device_printf(dev, "Warning: Couldn't map I/O.\n"); - atrtc_start(); - clock_register(dev, 1000000); - bzero(&sc->et, sizeof(struct eventtimer)); - if (!atrtcclock_disable && - (resource_int_value(device_get_name(dev), device_get_unit(dev), - "clock", &i) != 0 || i != 0)) { - sc->intr_rid = 0; - while (bus_get_resource(dev, SYS_RES_IRQ, sc->intr_rid, - &s, NULL) == 0 && s != 8) - sc->intr_rid++; - sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, - &sc->intr_rid, 8, 8, 1, RF_ACTIVE); - if (sc->intr_res == NULL) { - device_printf(dev, "Can't map interrupt.\n"); - return (0); - } else if ((bus_setup_intr(dev, sc->intr_res, INTR_TYPE_CLK, - rtc_intr, NULL, sc, &sc->intr_handler))) { - device_printf(dev, "Can't setup interrupt.\n"); - return (0); - } else { - /* Bind IRQ to BSP to avoid live migration. */ - bus_bind_intr(dev, sc->intr_res, 0); - } - sc->et.et_name = "RTC"; - sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_POW2DIV; - sc->et.et_quality = 0; - sc->et.et_frequency = 32768; - sc->et.et_min_period = 0x00080000; - sc->et.et_max_period = 0x80000000; - sc->et.et_start = rtc_start; - sc->et.et_stop = rtc_stop; - sc->et.et_priv = dev; - et_register(&sc->et); - } - return(0); -} - -static int -atrtc_resume(device_t dev) -{ - - atrtc_restore(); - return(0); -} - -static int +int atrtc_settime(device_t dev __unused, struct timespec *ts) { struct clocktime ct; @@ -322,7 +238,7 @@ return (0); } -static int +int atrtc_gettime(device_t dev, struct timespec *ts) { struct clocktime ct; @@ -362,34 +278,6 @@ return (clock_ct_to_ts(&ct, ts)); } -static device_method_t atrtc_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, atrtc_probe), - DEVMETHOD(device_attach, atrtc_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - /* XXX stop statclock? */ - DEVMETHOD(device_resume, atrtc_resume), - - /* clock interface */ - DEVMETHOD(clock_gettime, atrtc_gettime), - DEVMETHOD(clock_settime, atrtc_settime), - - { 0, 0 } -}; - -static driver_t atrtc_driver = { - "atrtc", - atrtc_methods, - sizeof(struct atrtc_softc), -}; - -static devclass_t atrtc_devclass; - -DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_devclass, 0, 0); -DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_devclass, 0, 0); - #include "opt_ddb.h" #ifdef DDB #include Index: sys/x86/isa/atrtc_acpi.c =================================================================== --- sys/x86/isa/atrtc_acpi.c (revision 0) +++ sys/x86/isa/atrtc_acpi.c (working copy) @@ -0,0 +1,131 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "atrtc_acpi.h" +#include "opt_acpi.h" + +struct atrtc_acpi_stuff { + ACPI_HANDLE acpi_handle; /* Handle of the PNP0B00 node */ + int acpi_handle_registered; /* 0 = acpi_handle not registered */ +}; + +static void +acpi_cmos_read(ACPI_PHYSICAL_ADDRESS address, UINT8 *buf, UINT32 buflen) +{ + UINT32 offset; + + for (offset = 0; offset < buflen; ++offset) { + buf[offset] = rtcin(address + offset) & 0xff; + } +} + +static void +acpi_cmos_write(ACPI_PHYSICAL_ADDRESS address, const UINT8 *buf, UINT32 buflen) +{ + UINT32 offset; + + for (offset = 0; offset < buflen; ++offset) { + writertc(address + offset, buf[offset]); + } +} + +static int +acpi_check_rtc_access(int is_read, u_long addr, u_long len) +{ + int retval = 1; /* Success */ + + if (is_read) { + /* Reading 0x0C will muck with interrupts */ + if (addr + len - 1 >= 0x0C && addr <= 0x0c) + retval = 0; + } else { + /* Allow single-byte writes to alarm registers and + * addr >= 0x30, else deny. + */ + if (!((len == 1 && (addr <= 5 && (addr & 1))) || addr >= 0x30)) + retval = 0; + } + return retval; +} + +static ACPI_STATUS +acpi_rtc_cmos_handler(UINT32 func, ACPI_PHYSICAL_ADDRESS addr, + UINT32 bitwidth, UINT64 *value, void *context, void *region_context) +{ + device_t dev; + struct atrtc_softc *sc; + UINT32 bytewidth = bitwidth >> 3; + + dev = (device_t)context; + sc = device_get_softc(dev); + if (!value || !sc) { + printf("NULL parameter.\n"); + return AE_BAD_PARAMETER; + } + if (bitwidth == 0 || bitwidth > 32 || (bitwidth & 0x07) || + addr + bytewidth - 1 > 63) { + printf("Invalid bitwidth (%u) or addr (0x%08lx).\n", bitwidth, + addr); + return AE_BAD_PARAMETER; + } + if (!acpi_check_rtc_access(func == ACPI_READ, addr, bytewidth)) { + printf("Bad CMOS %s access at addr 0x%08lx.\n", + func == ACPI_READ ? "read" : "write", addr); + return AE_BAD_PARAMETER; + } + + switch (func) { + case ACPI_READ: + acpi_cmos_read(addr, (UINT8 *)value, bytewidth); + break; + case ACPI_WRITE: + acpi_cmos_write(addr, (const UINT8 *)value, bytewidth); + break; + default: + printf("Invalid function: %d.\n", func); + return AE_BAD_PARAMETER; + } + if (bootverbose) + printf("%-5s%02u addr=%04lx val=%08x\n", + func == ACPI_READ ? "READ" : "WRITE", bytewidth, + addr, *((UINT32 *)value)); + return AE_OK; +} + +static devclass_t atrtc_acpi_devclass; +static ACPI_HANDLE acpi_handle = NULL; + +DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_acpi_devclass, 0, 0); + +int atrtc_acpi_register(device_t dev) +{ + ACPI_HANDLE acpi_handle = acpi_get_handle(dev); + int retval; + + if ((retval = ACPI_FAILURE(AcpiInstallAddressSpaceHandler(acpi_handle, + ACPI_ADR_SPACE_CMOS, + acpi_rtc_cmos_handler, NULL, dev)))) + { + device_printf(dev, "Warning: Couldn't register ACPI CMOS address space handler.\n"); + } + return retval ? -1 : 0; +} + +int atrtc_acpi_unregister(device_t dev) +{ + if (acpi_handle) + AcpiRemoveAddressSpaceHandler(acpi_handle, + ACPI_ADR_SPACE_CMOS, acpi_rtc_cmos_handler); + return 0; +} Property changes on: sys/x86/isa/atrtc_acpi.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sys/x86/isa/atrtc_acpi.h =================================================================== --- sys/x86/isa/atrtc_acpi.h (revision 0) +++ sys/x86/isa/atrtc_acpi.h (working copy) @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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$ + */ + + +#ifndef _X86_ISA_ATRTC_ACPI_H_ +#define _X86_ISA_ATRTC_ACPI_H_ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + + +int atrtc_acpi_register(device_t dev); +int atrtc_acpi_unregister(device_t dev); + +driver_t atrtc_driver; + +#endif /* !_X86_ISA_ATRTC_ACPI_H_ */ Property changes on: sys/x86/isa/atrtc_acpi.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sys/x86/isa/atrtc_isa.c =================================================================== --- sys/x86/isa/atrtc_isa.c (revision 0) +++ sys/x86/isa/atrtc_isa.c (working copy) @@ -0,0 +1,178 @@ +/*- + * Copyright (c) 2008 Poul-Henning Kamp + * Copyright (c) 2010 Alexander Motin + * All rights reserved. + * + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "clock_if.h" +#include "atrtcvar.h" +#include "atrtc_acpi.h" + + +int atrtcclock_disable = 0; + +static int atrtc_isa_probe(device_t dev); + +/* + * Attach to the ISA PnP descriptors for the timer and realtime clock. + */ +static struct isa_pnp_id atrtc_ids[] = { + { 0x000bd041 /* PNP0B00 */, "AT realtime clock" }, + { 0 } +}; + +static int +atrtc_isa_probe(device_t dev) +{ + int result; + + result = ISA_PNP_PROBE(device_get_parent(dev), dev, atrtc_ids); + /* ENOENT means no PnP-ID, device is hinted. */ + if (result == ENOENT) { + device_set_desc(dev, "AT realtime clock"); + return (BUS_PROBE_LOW_PRIORITY); + } + return (result); +} + +static int +atrtc_isa_attach(device_t dev) +{ + struct atrtc_softc *sc; + u_long s; + int i; + + sc = device_get_softc(dev); + sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->port_rid, + IO_RTC, IO_RTC + 1, 2, RF_ACTIVE); + if (sc->port_res == NULL) + device_printf(dev, "Warning: Couldn't map I/O.\n"); + atrtc_start(); + clock_register(dev, 1000000); + bzero(&sc->et, sizeof(struct eventtimer)); + if (!atrtcclock_disable && + (resource_int_value(device_get_name(dev), device_get_unit(dev), + "clock", &i) != 0 || i != 0)) { + sc->intr_rid = 0; + while (bus_get_resource(dev, SYS_RES_IRQ, sc->intr_rid, + &s, NULL) == 0 && s != 8) + sc->intr_rid++; + sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, + &sc->intr_rid, 8, 8, 1, RF_ACTIVE); + if (sc->intr_res == NULL) { + device_printf(dev, "Can't map interrupt.\n"); + return (0); + } else if ((bus_setup_intr(dev, sc->intr_res, INTR_TYPE_CLK, + rtc_intr, NULL, sc, &sc->intr_handler))) { + device_printf(dev, "Can't setup interrupt.\n"); + return (0); + } else { + /* Bind IRQ to BSP to avoid live migration. */ + bus_bind_intr(dev, sc->intr_res, 0); + } + (void)atrtc_acpi_register(dev); + sc->et.et_name = "RTC"; + sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_POW2DIV; + sc->et.et_quality = 0; + sc->et.et_frequency = 32768; + sc->et.et_min_period = 0x00080000; + sc->et.et_max_period = 0x80000000; + sc->et.et_start = rtc_start; + sc->et.et_stop = rtc_stop; + sc->et.et_priv = dev; + et_register(&sc->et); + } + return(0); +} + +static int atrtc_isa_detach(device_t dev) +{ + struct atrtc_softc *sc; + + sc = device_get_softc(dev); + (void)atrtc_acpi_unregister(dev); + return bus_generic_detach(dev); +} + +static int +atrtc_resume(device_t dev) +{ + + atrtc_restore(); + return(0); +} + +static device_method_t atrtc_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, atrtc_isa_probe), + DEVMETHOD(device_attach, atrtc_isa_attach), + DEVMETHOD(device_detach, atrtc_isa_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + /* XXX stop statclock? */ + DEVMETHOD(device_resume, atrtc_resume), + + /* clock interface */ + DEVMETHOD(clock_gettime, atrtc_gettime), + DEVMETHOD(clock_settime, atrtc_settime), + + { 0, 0 } +}; + +driver_t atrtc_driver = { + "atrtc", + atrtc_methods, + sizeof(struct atrtc_softc), +}; + +static devclass_t atrtc_isa_devclass; + +DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_isa_devclass, 0, 0); + Property changes on: sys/x86/isa/atrtc_isa.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sys/x86/isa/atrtcvar.h =================================================================== --- sys/x86/isa/atrtcvar.h (revision 0) +++ sys/x86/isa/atrtcvar.h (working copy) @@ -0,0 +1,23 @@ +#ifndef ATRTCVAR_H +#define ATRTCVAR_H + +#include +#include + +struct atrtc_softc { + int port_rid, intr_rid; + struct resource *port_res; + struct resource *intr_res; + void *intr_handler; + struct eventtimer et; +}; + +int atrtc_gettime(device_t dev, struct timespec *ts); +int atrtc_settime(device_t dev __unused, struct timespec *ts); +void atrtc_start(void); +void atrtc_restore(void); +int rtc_start(struct eventtimer *et, sbintime_t first, sbintime_t period); +int rtc_stop(struct eventtimer *et); +int rtc_intr(void *arg); + +#endif /* ATRTCVAR_H */ Property changes on: sys/x86/isa/atrtcvar.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property --------------050805090500090807050701-- From owner-freebsd-acpi@freebsd.org Fri Jun 26 02:33:51 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DB8898C083 for ; Fri, 26 Jun 2015 02:33:51 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx1.freebsd.org (Postfix) with ESMTP id 15BCA1DEE for ; Fri, 26 Jun 2015 02:33:50 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 25 Jun 2015 19:33:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,681,1427785200"; d="scan'208";a="734928296" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by fmsmga001.fm.intel.com with ESMTP; 25 Jun 2015 19:33:50 -0700 Received: from orsmsx112.amr.corp.intel.com ([169.254.12.27]) by ORSMSX102.amr.corp.intel.com ([169.254.1.15]) with mapi id 14.03.0224.002; Thu, 25 Jun 2015 19:33:48 -0700 From: "Moore, Robert" To: Anthony Jenkins , Ian Smith , Warner Losh CC: "freebsd-acpi@freebsd.org" Subject: RE: [PATCH] ACPI CMOS region support rev. 6 Thread-Topic: [PATCH] ACPI CMOS region support rev. 6 Thread-Index: AQHQr62JbDTC/+JPd0KWbYZiTeAdwJ2+cUiA//+gMOA= Date: Fri, 26 Jun 2015 02:33:48 +0000 Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E37D30820A@ORSMSX112.amr.corp.intel.com> References: <20150222180817.GD27984@strugglingcoder.info> <54EB8C21.2080600@att.net> <2401337.2oUs7iAbtB@ralph.baldwin.cx> <54EF3D5D.4010106@att.net> <20150227222203.P38620@sola.nimnet.asn.au> <20150228125857.D1277@besplex.bde.org> <54F14368.4020807@att.net> <20150302002647.W42658@sola.nimnet.asn.au> <54F5E53D.1090601@att.net> <20150306025800.U46361@sola.nimnet.asn.au> <54F9D7E6.4050807@att.net> <5504FF32.3020202@att.net> <20150317001401.X22641@sola.nimnet.asn.au> <5506F00A.3030708@att.net> <5506FBE3.1000009@att.net> <20150317041624.K22641@sola.nimnet.asn.au> <55073442.5060005@att.net> <20150317222704.K22641@sola.nimnet.asn.au> <550825DE.7030406@att.net> <56B494A3-2058-4B7B-8183-646A46753A53@bsdimp.com> <5509A282.6070207@att.net> <20150319184348.X22641@sola.nimnet.asn.au> <550ACAEC.3060808@att.net> <20150320002950.T22641@sola.nimnet.asn.au> <550AD9B7.4090508@att.net> <558CA785.1050904@att.net> <558CA7C9.9000304@att.net> In-Reply-To: <558CA7C9.9000304@att.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2015 02:33:51 -0000 How do you handle the fact that there are three different CMOS/RTC devices = defined in the ACPI specification? (There are three different _HIDs). > -----Original Message----- > From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- > acpi@freebsd.org] On Behalf Of Anthony Jenkins > Sent: Thursday, June 25, 2015 6:16 PM > To: Ian Smith; Warner Losh > Cc: freebsd-acpi@freebsd.org > Subject: Re: [PATCH] ACPI CMOS region support rev. 6 >=20 > ...and of course I forget the attachment... >=20 > On 06/25/15 21:14, Anthony Jenkins wrote: > > Sooo here's the new and improved rev. 6, "new and improved" because it > > increases the diff line count by 332%. > >> [ajenkins@ajenkins-hplaptop /usr/src]$ wc -l atrtc_c_rev5.diff > >> atrtc_rev6.diff > >> 220 atrtc_c_rev5.diff > >> 731 atrtc_rev6.diff > > This is to satisfy the request to split the atrtc.c driver into a "core= " > > part and "bus" parts: > >> Looking at patch 5: > >> > >> You need to rework this so there's an atrtc_acpi.c. Put all the ACPI > attachment in there. You should also split off the little bit that's ISA- > specific into atrtc_isa. Once you do that, we can talk. > >> > >> Warner > > I actually finished this patch a couple months ago and have been > > running it on my laptop, I just don't see the point...maybe Warner > > could elaborate on the rationale for his request? At the very least, > > this should be two commits - the functional change and the > > refactorization request. > > > > I may have also added Ian's request for verbosity tweaks, but it's > > been a while... I don't see any CMOS logging noise FWIW. > > > > Thanks, > > Anthony > > > > From owner-freebsd-acpi@freebsd.org Fri Jun 26 14:47:07 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A24B098C642 for ; Fri, 26 Jun 2015 14:47:07 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx1.freebsd.org (Postfix) with ESMTP id 7425810CA for ; Fri, 26 Jun 2015 14:47:06 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 26 Jun 2015 07:47:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,685,1427785200"; d="scan'208";a="718189284" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by orsmga001.jf.intel.com with ESMTP; 26 Jun 2015 07:47:00 -0700 Received: from orsmsx112.amr.corp.intel.com ([169.254.12.27]) by ORSMSX101.amr.corp.intel.com ([169.254.8.76]) with mapi id 14.03.0224.002; Fri, 26 Jun 2015 07:46:59 -0700 From: "Moore, Robert" To: Anthony Jenkins , Ian Smith , Warner Losh CC: "freebsd-acpi@freebsd.org" Subject: RE: [PATCH] ACPI CMOS region support rev. 6 Thread-Topic: [PATCH] ACPI CMOS region support rev. 6 Thread-Index: AQHQr62JbDTC/+JPd0KWbYZiTeAdwJ2+cUiA//+gMOCAAUIEAP//itxw Date: Fri, 26 Jun 2015 14:46:59 +0000 Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E37D3084BD@ORSMSX112.amr.corp.intel.com> References: <20150222180817.GD27984@strugglingcoder.info> <54EF3D5D.4010106@att.net> <20150227222203.P38620@sola.nimnet.asn.au> <20150228125857.D1277@besplex.bde.org> <54F14368.4020807@att.net> <20150302002647.W42658@sola.nimnet.asn.au> <54F5E53D.1090601@att.net> <20150306025800.U46361@sola.nimnet.asn.au> <54F9D7E6.4050807@att.net> <5504FF32.3020202@att.net> <20150317001401.X22641@sola.nimnet.asn.au> <5506F00A.3030708@att.net> <5506FBE3.1000009@att.net> <20150317041624.K22641@sola.nimnet.asn.au> <55073442.5060005@att.net> <20150317222704.K22641@sola.nimnet.asn.au> <550825DE.7030406@att.net> <56B494A3-2058-4B7B-8183-646A46753A53@bsdimp.com> <5509A282.6070207@att.net> <20150319184348.X22641@sola.nimnet.asn.au> <550ACAEC.3060808@att.net> <20150320002950.T22641@sola.nimnet.asn.au> <550AD9B7.4090508@att.net> <558CA785.1050904@att.net> <558CA7C9.9000304@att.net> <94F2FBAB4432B54E8AACC7DFDE6C92E37D30820A@ORSMSX112.amr.corp.intel.com> <558D658A.2080807@att.net> In-Reply-To: <558D658A.2080807@att.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2015 14:47:07 -0000 Ok, thanks. Just thought I should mention it. > -----Original Message----- > From: Anthony Jenkins [mailto:Anthony.B.Jenkins@att.net] > Sent: Friday, June 26, 2015 7:46 AM > To: Moore, Robert; Ian Smith; Warner Losh > Cc: freebsd-acpi@freebsd.org > Subject: Re: [PATCH] ACPI CMOS region support rev. 6 >=20 > On 06/25/2015 10:33 PM, Moore, Robert wrote: > > How do you handle the fact that there are three different CMOS/RTC > devices defined in the ACPI specification? (There are three different > _HIDs). > Right, each of the three CMOS/RTC devices in the ACPI spec has a differen= t > ACPI ID (PNP0B00, PNP0B01, PNP0B02). FreeBSD's CMOS RTC driver only > attaches to PNP0B00; if a different CMOS device is present, there will be > no CMOS/RTC driver (since we don't know how to talk to it). Should be a > no-op, like for any unsupported device. >=20 > If I had the specs for each of those devices, I could probably cobble > together support for the other two, but that wasn't my original mission..= . >=20 > Anthony >=20 > > > >> -----Original Message----- > >> From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- > >> acpi@freebsd.org] On Behalf Of Anthony Jenkins > >> Sent: Thursday, June 25, 2015 6:16 PM > >> To: Ian Smith; Warner Losh > >> Cc: freebsd-acpi@freebsd.org > >> Subject: Re: [PATCH] ACPI CMOS region support rev. 6 > >> > >> ...and of course I forget the attachment... > >> > >> On 06/25/15 21:14, Anthony Jenkins wrote: > >>> Sooo here's the new and improved rev. 6, "new and improved" because > >>> it increases the diff line count by 332%. > >>>> [ajenkins@ajenkins-hplaptop /usr/src]$ wc -l atrtc_c_rev5.diff > >>>> atrtc_rev6.diff > >>>> 220 atrtc_c_rev5.diff > >>>> 731 atrtc_rev6.diff > >>> This is to satisfy the request to split the atrtc.c driver into a > "core" > >>> part and "bus" parts: > >>>> Looking at patch 5: > >>>> > >>>> You need to rework this so there's an atrtc_acpi.c. Put all the > >>>> ACPI > >> attachment in there. You should also split off the little bit that's > >> ISA- specific into atrtc_isa. Once you do that, we can talk. > >>>> Warner > >>> I actually finished this patch a couple months ago and have been > >>> running it on my laptop, I just don't see the point...maybe Warner > >>> could elaborate on the rationale for his request? At the very > >>> least, this should be two commits - the functional change and the > >>> refactorization request. > >>> > >>> I may have also added Ian's request for verbosity tweaks, but it's > >>> been a while... I don't see any CMOS logging noise FWIW. > >>> > >>> Thanks, > >>> Anthony > >>> > >>> > > _______________________________________________ > > freebsd-acpi@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" From owner-freebsd-acpi@freebsd.org Fri Jun 26 14:47:40 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0DD498C66E for ; Fri, 26 Jun 2015 14:47:40 +0000 (UTC) (envelope-from Anthony.B.Jenkins@att.net) Received: from nm4-vm1.bullet.mail.ne1.yahoo.com (nm4-vm1.bullet.mail.ne1.yahoo.com [98.138.91.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B76EC10F9 for ; Fri, 26 Jun 2015 14:47:40 +0000 (UTC) (envelope-from Anthony.B.Jenkins@att.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1435329931; bh=8ziWJPJoNbOI+Sny0skZLM7XCwKbbXA+tufdT4W7lQ0=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=u9waclbDSI+XF7NeCUaa3UxN2RZ42NPb771BCUn3kwNWQnYCH1ZcBOa/gDfoNraOqNT2gsp7zgCK6S2OuvuK35QSH29A2GUtVKhTTPjbFyE42vGHV0mSNKVxYA0YrvJ8uiP2V2FBIPwgsgXVZLNJKlmSK5I0hBYIXQLReJkmlYM= Received: from [98.138.226.178] by nm4.bullet.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 14:45:31 -0000 Received: from [98.138.84.39] by tm13.bullet.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 14:45:31 -0000 Received: from [127.0.0.1] by smtp107.mail.ne1.yahoo.com with NNFMP; 26 Jun 2015 14:45:31 -0000 X-Yahoo-Newman-Id: 503766.89149.bm@smtp107.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: WHDG74YVM1kXhWwNJlQK0DKdGFoz7E_L6iWLuDnahU.WIyr 7DIdl_NyOOzC9DtNQ8sVaeAsS.lu2gsjmNzUOU4LWQGlqYUle41mRI7yML.X 9s0HQnfrqlE996Hiqebm6b4FsfdbSqub2epIiX8nUg87ZrEWz8XY1fgihqY5 wqLlSmOLT7wo.6iC.iTxhPfQEOK2KKon334YOLe2ifMLaFgcXETyiSE1_jEq 3JKinfnwYvqLnIig4c6v3fOLGOSqlQP8RAThPCPhOv624fJj9moh7mXLYqR3 1mYLlg3wLEmdV3rVjqQyMd0y3X1dE_5z3uFepFOJbbZDbc.B02X0uUG3c0zO b5F8Wg_5zlGFlLjKtpHtr69RkVl98DZbNDIoIoCKgSNx9DcinZsH4V8hRzf2 qa5m7uF.W9FBEH1inL1_a5_he_hAD7gof3_Bd6IbtdCHwnhvQfrMqqWARYTH prWp1hMtByTwmnxoAPVQbiBJcZSl.fNg77Xi49nnUx9MN5aQB66mw5eqlnKP gDXzt02aHD5Gnd_gHSHaCvkt6QuFWKkKzIyMCEtXIzTKYpfhMQwHVpg-- X-Yahoo-SMTP: OKD1keCswBBTAmAF1s00hLyKW3wE3YfSK0Eazl6b4VZG4LTqJxg- Message-ID: <558D658A.2080807@att.net> Date: Fri, 26 Jun 2015 10:45:30 -0400 From: Anthony Jenkins User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Moore, Robert" , Ian Smith , Warner Losh CC: "freebsd-acpi@freebsd.org" Subject: Re: [PATCH] ACPI CMOS region support rev. 6 References: <20150222180817.GD27984@strugglingcoder.info> <54EF3D5D.4010106@att.net> <20150227222203.P38620@sola.nimnet.asn.au> <20150228125857.D1277@besplex.bde.org> <54F14368.4020807@att.net> <20150302002647.W42658@sola.nimnet.asn.au> <54F5E53D.1090601@att.net> <20150306025800.U46361@sola.nimnet.asn.au> <54F9D7E6.4050807@att.net> <5504FF32.3020202@att.net> <20150317001401.X22641@sola.nimnet.asn.au> <5506F00A.3030708@att.net> <5506FBE3.1000009@att.net> <20150317041624.K22641@sola.nimnet.asn.au> <55073442.5060005@att.net> <20150317222704.K22641@sola.nimnet.asn.au> <550825DE.7030406@att.net> <56B494A3-2058-4B7B-8183-646A46753A53@bsdimp.com> <5509A282.6070207@att.net> <20150319184348.X22641@sola.nimnet.asn.au> <550ACAEC.3060808@att.net> <20150320002950.T22641@sola.nimnet.asn.au> <550AD9B7.4090508@att.net> <558CA785.1050904@att.net> <558CA7C9.9000304@att.net> <94F2FBAB4432B54E8AACC7DFDE6C92E37D30820A@ORSMSX112.amr.corp.intel.com> In-Reply-To: <94F2FBAB4432B54E8AACC7DFDE6C92E37D30820A@ORSMSX112.amr.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2015 14:47:41 -0000 On 06/25/2015 10:33 PM, Moore, Robert wrote: > How do you handle the fact that there are three different CMOS/RTC devices defined in the ACPI specification? (There are three different _HIDs). Right, each of the three CMOS/RTC devices in the ACPI spec has a different ACPI ID (PNP0B00, PNP0B01, PNP0B02). FreeBSD's CMOS RTC driver only attaches to PNP0B00; if a different CMOS device is present, there will be no CMOS/RTC driver (since we don't know how to talk to it). Should be a no-op, like for any unsupported device. If I had the specs for each of those devices, I could probably cobble together support for the other two, but that wasn't my original mission... Anthony > >> -----Original Message----- >> From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >> acpi@freebsd.org] On Behalf Of Anthony Jenkins >> Sent: Thursday, June 25, 2015 6:16 PM >> To: Ian Smith; Warner Losh >> Cc: freebsd-acpi@freebsd.org >> Subject: Re: [PATCH] ACPI CMOS region support rev. 6 >> >> ...and of course I forget the attachment... >> >> On 06/25/15 21:14, Anthony Jenkins wrote: >>> Sooo here's the new and improved rev. 6, "new and improved" because it >>> increases the diff line count by 332%. >>>> [ajenkins@ajenkins-hplaptop /usr/src]$ wc -l atrtc_c_rev5.diff >>>> atrtc_rev6.diff >>>> 220 atrtc_c_rev5.diff >>>> 731 atrtc_rev6.diff >>> This is to satisfy the request to split the atrtc.c driver into a "core" >>> part and "bus" parts: >>>> Looking at patch 5: >>>> >>>> You need to rework this so there's an atrtc_acpi.c. Put all the ACPI >> attachment in there. You should also split off the little bit that's ISA- >> specific into atrtc_isa. Once you do that, we can talk. >>>> Warner >>> I actually finished this patch a couple months ago and have been >>> running it on my laptop, I just don't see the point...maybe Warner >>> could elaborate on the rationale for his request? At the very least, >>> this should be two commits - the functional change and the >>> refactorization request. >>> >>> I may have also added Ian's request for verbosity tweaks, but it's >>> been a while... I don't see any CMOS logging noise FWIW. >>> >>> Thanks, >>> Anthony >>> >>> > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" From owner-freebsd-acpi@freebsd.org Fri Jun 26 15:25:53 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 460B998CD5A for ; Fri, 26 Jun 2015 15:25:53 +0000 (UTC) (envelope-from apache@ns149.altervista.org) Received: from ns149.altervista.org (ns149.altervista.org [176.9.43.243]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2C351A80 for ; Fri, 26 Jun 2015 15:25:52 +0000 (UTC) (envelope-from apache@ns149.altervista.org) Received: from ns149.altervista.org (localhost.localdomain [127.0.0.1]) by ns149.altervista.org (8.13.8/8.13.8) with ESMTP id t5QDcTRA001165 for ; Fri, 26 Jun 2015 15:38:30 +0200 Received: (from apache@localhost) by ns149.altervista.org (8.13.8/8.13.8/Submit) id t5QDcTse001164; Fri, 26 Jun 2015 15:38:29 +0200 X-WEBSITE: duoperdue.altervista.org X-Originating-IP: [173.245.49.167] To: freebsd-acpi@freebsd.org Subject: Payment for driving on toll road, invoice #0000243388 Date: Fri, 26 Jun 2015 15:38:29 +0200 From: "E-ZPass Agent" Reply-To: "E-ZPass Agent" Message-ID: X-Priority: 3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2015 15:25:53 -0000 Notice to Appear, You have not paid for driving on a toll road. You are kindly asked to pay your debt as soon as possible. You can review the invoice in the attachment. Yours faithfully, Clifford Whitehead, E-ZPass Support. From owner-freebsd-acpi@freebsd.org Fri Jun 26 17:36:45 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD51D98C3C9 for ; Fri, 26 Jun 2015 17:36:45 +0000 (UTC) (envelope-from james_rash@msn.com) Received: from BLU004-OMC2S4.hotmail.com (blu004-omc2s4.hotmail.com [65.55.111.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E2D215E9 for ; Fri, 26 Jun 2015 17:36:44 +0000 (UTC) (envelope-from james_rash@msn.com) Received: from BLU406-EAS235 ([65.55.111.72]) by BLU004-OMC2S4.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Fri, 26 Jun 2015 10:36:38 -0700 X-TMN: [+5O6MKcwa55J3Kus20Gbg1nX0zg5C1p2] X-Originating-Email: [james_rash@msn.com] Message-ID: Date: Fri, 26 Jun 2015 13:36:35 -0400 Subject: Toll road fone Importance: normal From: Bob To: freebsd-acpi@freebsd.org MIME-Version: 1.0 X-OriginalArrivalTime: 26 Jun 2015 17:36:38.0143 (UTC) FILETIME=[A7AA68F0:01D0B036] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2015 17:36:45 -0000 CiAgICAKVGhlIGF0dGFjaG1lbnQgZGlkbid0IHZvbWUgdGhydSBvbiB5b3UgZW1haWwuIMKgSSBo YXZlIG5vIGlkZWEgd2hhdCB0b2xsIHJvYWQgeW91IGFyZSByZWZlcnJpbmcgdG8uIMKgUGxlYXNl IHJlLXNlbmQgd2l0aCBhdHRhY2htZW50c8KgCgoKSGFwcHkgQ29ubmVjdGluZy4gU2VudCBmcm9t IG15IFNwcmludCBTYW1zdW5nIEdhbGF4eSBTwq4gNQ== From owner-freebsd-acpi@freebsd.org Sat Jun 27 18:31:17 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE61898CC8E for ; Sat, 27 Jun 2015 18:31:17 +0000 (UTC) (envelope-from finplaneru@vh195.sweb.ru) Received: from vh195.sweb.ru (vh195.sweb.ru [77.222.40.173]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71FB01433 for ; Sat, 27 Jun 2015 18:31:13 +0000 (UTC) (envelope-from finplaneru@vh195.sweb.ru) Received: from finplaneru by vh195.sweb.ru with local (Exim 4.84) (envelope-from ) id 1Z8uPJ-003ndK-4p for freebsd-acpi@freebsd.org; Sat, 27 Jun 2015 21:00:49 +0300 To: freebsd-acpi@freebsd.org Subject: Problem with parcel shipping, ID:00000465573 X-PHP-Originating-Script: 10762:post.php(13) : eval()'d code Date: Sat, 27 Jun 2015 21:00:49 +0300 From: "FedEx International Economy" Reply-To: "FedEx International Economy" Message-ID: X-Priority: 3 MIME-Version: 1.0 X-Sender-Uid: 10762 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2015 18:31:17 -0000 Dear Customer, This is to confirm that one or more of your parcels has been shipped. Please, download Delivery Label attached to this email. Kind regards, Gordon Williams, Sr. Support Agent.