From owner-cvs-all Tue Jan 21 10:22:28 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7864537B401; Tue, 21 Jan 2003 10:22:27 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27F0B43F5B; Tue, 21 Jan 2003 10:22:27 -0800 (PST) (envelope-from tmm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h0LIMQbv010084; Tue, 21 Jan 2003 10:22:26 -0800 (PST) (envelope-from tmm@repoman.freebsd.org) Received: (from tmm@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h0LIMQu4010083; Tue, 21 Jan 2003 10:22:26 -0800 (PST) Message-Id: <200301211822.h0LIMQu4010083@repoman.freebsd.org> From: Thomas Moestl Date: Tue, 21 Jan 2003 10:22:26 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sparc64/include bus_private.h src/sys/sparc64/sparc64 iommu.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG tmm 2003/01/21 10:22:26 PST Modified files: sys/sparc64/include bus_private.h sys/sparc64/sparc64 iommu.c Log: Fixes for a number of problems in the IOMMU code: 1.) Fix an off-by-one in the DVMA space handling, which would make it possible to allocate one page beyond the end of the DVMA area. This page was aliased to the first page. Apparently, this bug was responsible for the trashed nvram/eeprom some people were reporting, in conjunction with a number of unfortunate coincidences. 2.) Fix broken boundary and and lowaddr calculations. 3.) Fix a memory leak on an error path. 4.) Update a outdated comment to reflect the introduction of IOMMU_MAX_PRE, make the usage of IOMMU_MAX_PRE more consistent and KASSERT that the preallocation size is not 0. 5.) Fix a case where an error return was lost. 6.) When signalling an error to the caller by invoking the callback, do not use a segment pointer of NULL for compatability with existing drivers. Also, increase the maximum segment number to 64; it is rather arbitrary, with the exception of the of the stack space consumed by the segment array. Special thanks go to Harti Brandt for spotting 4 and 5, and testing many iterations of patches. Pointy hats to: tmm Revision Changes Path 1.4 +6 -1 src/sys/sparc64/include/bus_private.h 1.17 +17 -15 src/sys/sparc64/sparc64/iommu.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message