From owner-svn-ports-head@FreeBSD.ORG Fri Aug 22 23:12:00 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DE79A1F; Fri, 22 Aug 2014 23:12:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D3573EEA; Fri, 22 Aug 2014 23:12:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MNC0Ni024005; Fri, 22 Aug 2014 23:12:00 GMT (envelope-from nox@FreeBSD.org) Received: (from nox@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MNC0vT023998; Fri, 22 Aug 2014 23:12:00 GMT (envelope-from nox@FreeBSD.org) Message-Id: <201408222312.s7MNC0vT023998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nox set sender to nox@FreeBSD.org using -f From: Juergen Lock Date: Fri, 22 Aug 2014 23:12:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r365703 - in head/emulators/qemu-devel: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 23:12:00 -0000 Author: nox Date: Fri Aug 22 23:11:59 2014 New Revision: 365703 URL: http://svnweb.freebsd.org/changeset/ports/365703 QAT: https://qat.redports.org/buildarchive/r365703/ Log: - bsd-user: fix sysctl hw.physmem if host bitsize != target's. - Bump PORTREVISION. Reported by: sbruno Added: head/emulators/qemu-devel/files/extra-patch-sysctl-hw-physmem (contents, props changed) Modified: head/emulators/qemu-devel/Makefile Modified: head/emulators/qemu-devel/Makefile ============================================================================== --- head/emulators/qemu-devel/Makefile Fri Aug 22 22:06:37 2014 (r365702) +++ head/emulators/qemu-devel/Makefile Fri Aug 22 23:11:59 2014 (r365703) @@ -3,6 +3,7 @@ PORTNAME= qemu PORTVERSION= 2.0.2 +PORTREVISION= 1 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/:release \ LOCAL/nox:snapshot @@ -76,6 +77,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch- EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-trapsig EXTRA_PATCHES+= ${FILESDIR}/extra-patch-21927cffcc7bcacbb953155f778200846df9f60e EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-freebsd-os-sys.c +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sysctl-hw-physmem .endif CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib Added: head/emulators/qemu-devel/files/extra-patch-sysctl-hw-physmem ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/qemu-devel/files/extra-patch-sysctl-hw-physmem Fri Aug 22 23:11:59 2014 (r365703) @@ -0,0 +1,40 @@ +From nox Mon Sep 17 00:00:00 2001 +From: Juergen Lock +Date: 23 Aug 2014 00:24:00 +0200 +Subject: Fix FreeBSD sysctl hw.physmem + +Fix FreeBSD sysctl hw.physmem if host bitsize != target's. + +Signed-off-by: Juergen Lock + +--- a/bsd-user/freebsd/os-sys.c ++++ b/bsd-user/freebsd/os-sys.c +@@ -338,6 +338,28 @@ abi_long do_freebsd_sysctl(CPUArchState + ret = 0; + goto out; + ++#if TARGET_ABI_BITS != HOST_LONG_BITS ++ case HW_PHYSMEM: ++ holdlen = sizeof(abi_ulong); ++ ret = 0; ++ ++ if (oldlen) { ++ unsigned long lvalue; ++ size_t len = sizeof(lvalue); ++ ++ if (sysctlbyname("hw.physmem", &lvalue, &len, NULL, 0) ++ == -1) { ++ ret = -1; ++ } else { ++ abi_ulong maxmem = -0x100c000; ++ if (((unsigned long)maxmem) < lvalue) ++ lvalue = maxmem; ++ (*(abi_ulong *)holdp) = lvalue; ++ } ++ } ++ goto out; ++#endif ++ + default: + { + static int oid_hw_availpages;