From owner-freebsd-acpi@FreeBSD.ORG Mon Mar 16 15:53:00 2015 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BFFC614 for ; Mon, 16 Mar 2015 15:53:00 +0000 (UTC) Received: from nm1-vm6.bullet.mail.ne1.yahoo.com (nm1-vm6.bullet.mail.ne1.yahoo.com [98.138.91.253]) (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 1615980E for ; Mon, 16 Mar 2015 15:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1426521061; bh=fReklZ+q8BPfXzMVwpYPkmdoqBmHLAyVNaTjxUJqD84=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=z07aTJEtzyY0dXswaRhYdypI8/hYypCSLiw/TYaXW8QoRO9pVCUdkMptZ/H3VA386yraRd6F6VtArEUwl8W27sI+od+vn3nlrh1+dN/f1QWD9JHdhVseFE5D5bKxIQxxN9NQ9lGEzkTyzndIUpt6eDc8v2slV+QD7TuTmS4uksM= Received: from [98.138.100.111] by nm1.bullet.mail.ne1.yahoo.com with NNFMP; 16 Mar 2015 15:51:01 -0000 Received: from [98.138.84.39] by tm100.bullet.mail.ne1.yahoo.com with NNFMP; 16 Mar 2015 15:51:01 -0000 Received: from [127.0.0.1] by smtp107.mail.ne1.yahoo.com with NNFMP; 16 Mar 2015 15:51:01 -0000 X-Yahoo-Newman-Id: 897471.32924.bm@smtp107.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 9IkgwB4VM1nL_SeyHpmQvOt4793nR_.dQfBJwBnMcC5v1p7 LqahrPt0G6.uaKhQJR0WqnLdMpFHCnujbmZ1w81HVUtgcWUsGBmomodXUNN_ wMplGuisNou94nwUYG0BWQuOnMjQk_pSdrlFXVaen1q8afYgzDAZXx6W8M_r yW7T0QWzfO7wU3K9Gto0OD9uu.peCLv5kdndS2Ah_SUg.QDVsu3VLGbwAQda hD5tO5XfFyZahzLqcBqx5T_S5Q1VDZSj511GMj89N9gnKJH3ofHk2H._Q2zf eV4fov2HdT8o0AMWwWmZFJNf974EBvhUxxL4Z6VsmZqh2ZO.u9aakdVMcz_o rJmaSmEOPYn5OrCL8_eh9nl.N6CdKwIR.ibXJ4ihcmhj3LwVSnTWsm3oo4PL mB__AmLqnmoGSm.3M3qkS64QkklHlq2nPL0nKX__dAWYsWj3tq9__ANOobTG oCoWpBgbYBh6um9.Ru55VReCbAgAWrpDnMmoKQYUwEeb4W9Sod5bhUNOfHNA RB4jKa3kE8RrIJr0zUqihDbSMd9LJ61OjprOIgXG88g76kYo1 X-Yahoo-SMTP: OKD1keCswBBTAmAF1s00hLyKW3wE3YfSK0Eazl6b4VZG4LTqJxg- Message-ID: <5506FBE3.1000009@att.net> Date: Mon, 16 Mar 2015 11:50:59 -0400 From: Anthony Jenkins User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ian Smith Subject: Re: [PATCH] ACPI CMOS region support rev. 4 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> In-Reply-To: <5506F00A.3030708@att.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2015 15:53:00 -0000 On 03/16/2015 11:00 AM, Anthony Jenkins wrote: > On 03/16/2015 09:59 AM, Ian Smith wrote: >> On Sat, 14 Mar 2015 23:40:34 -0400, Anthony Jenkins wrote: >>> + if (!acpi_check_rtc_byteaccess(function == ACPI_READ, address)) >>> + return AE_BAD_PARAMETER; >> acpi_check_rtc_byteaccess() needs to be called per byte of 1, 2 or 4 >> bytes - or pass it 'bytes' also, and loop over each of them within? >> ======= >> >> Otherwise (for example) a 2 byte read from 0x0b or 4 byte read from >> 0x09-0x0b will read 0x0c (clearing interrupts), or a 2 or 4 byte write >> to (say) 0x01 will also write to 0x02 and 0x04 (clobbering the time). > Right, this is an (incorrect) hybrid of a few attempts, probably from > around the time I lost my SSD and only had a single backup copy of my > work to go from. In one revision I had disallowed all multibyte > accesses (width > 8) since IMHO it was more consistent/correct with the > suggested locking. I wasn't ignoring your suggestion, just making one > or a few changes at a time (generally the simpler ones). Okay now I remember why I was reluctant to do this - suppose ACPIBIOS does a multibyte op on a set of bytes whose last byte fails acpi_check_rtc_byteaccess(). I will have already performed n-1 accesses. At one point I had a revision (acpi_check_rtc_access()?) that permitted/denied the entire request (it took the starting address and byte length), but I guess that got lost too. I'll just recreate it... Anthony > >> cheers, Ian >> >> >> _______________________________________________ >> 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"