diff options
Diffstat (limited to 'emulators/qemu-devel/files/extra-patch-sysctl-hw-physmem')
| -rw-r--r-- | emulators/qemu-devel/files/extra-patch-sysctl-hw-physmem | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/emulators/qemu-devel/files/extra-patch-sysctl-hw-physmem b/emulators/qemu-devel/files/extra-patch-sysctl-hw-physmem deleted file mode 100644 index 304000d093b6..000000000000 --- a/emulators/qemu-devel/files/extra-patch-sysctl-hw-physmem +++ /dev/null @@ -1,40 +0,0 @@ -From nox Mon Sep 17 00:00:00 2001 -From: Juergen Lock <nox@jelal.kn-bremen.de> -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 <nox@jelal.kn-bremen.de> - ---- 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; |
