Date: Fri, 27 Jun 2014 18:31:19 +0000 (UTC) From: Juergen Lock <nox@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r359593 - in head/emulators/qemu-devel: . files Message-ID: <201406271831.s5RIVJ5n033753@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nox Date: Fri Jun 27 18:31:19 2014 New Revision: 359593 URL: http://svnweb.freebsd.org/changeset/ports/359593 QAT: https://qat.redports.org/buildarchive/r359593/ Log: - bsd-user: add posix-openpt syscall and TIOCPTMASTER/TIOCPKT ioctl handling. (this fixes sysutils/screen) [1] - arm-bsd-user: fix sigreturn frame handling. [2] - Bump PORTREVISION. Submitted by: kan [1], sson [2] Added: head/emulators/qemu-devel/files/extra-patch-bsd-user-arm-signal (contents, props changed) Modified: head/emulators/qemu-devel/Makefile head/emulators/qemu-devel/files/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776 Modified: head/emulators/qemu-devel/Makefile ============================================================================== --- head/emulators/qemu-devel/Makefile Fri Jun 27 18:05:10 2014 (r359592) +++ head/emulators/qemu-devel/Makefile Fri Jun 27 18:31:19 2014 (r359593) @@ -3,7 +3,7 @@ PORTNAME= qemu PORTVERSION= 2.0.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/:release \ LOCAL/nox:snapshot @@ -69,6 +69,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch- EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sysctl-hw-pagesizes EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-x86_64-target_arch_vmparam.h EXTRA_PATCHES+= ${FILESDIR}/extra-patch-target_siginfo +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-arm-signal .endif CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib Modified: head/emulators/qemu-devel/files/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776 ============================================================================== --- head/emulators/qemu-devel/files/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776 Fri Jun 27 18:05:10 2014 (r359592) +++ head/emulators/qemu-devel/files/extra-patch-790d0ef625d22ff3f1a895d266a48e2bacd63776 Fri Jun 27 18:31:19 2014 (r359593) @@ -7299,7 +7299,7 @@ new file mode 100644 index 0000000..85d3c41 --- /dev/null +++ b/bsd-user/freebsd/os-ioctl-cmds.h -@@ -0,0 +1,47 @@ +@@ -0,0 +1,49 @@ + +/* sys/ttycom.h tty(4) */ +IOCTL(TIOCSETD, IOC_W, MK_PTR(TYPE_INT)) @@ -7314,11 +7314,13 @@ index 0000000..85d3c41 +IOCTL(TIOCSETA, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios))) +IOCTL(TIOCSETAW, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios))) +IOCTL(TIOCSETAF, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios))) ++IOCTL(TIOCPTMASTER, IOC_, TYPE_NULL) +IOCTL(TIOCOUTQ, IOC_R, MK_PTR(TYPE_INT)) +IOCTL(TIOCSTI, IOC_W, MK_PTR(TYPE_CHAR)) +IOCTL(TIOCNOTTY, IOC_, TYPE_NULL) +IOCTL(TIOCSTOP, IOC_, TYPE_NULL) +IOCTL(TIOCSTART, IOC_, TYPE_NULL) ++IOCTL(TIOCPKT, IOC_W, MK_PTR(TYPE_INT)) +IOCTL(TIOCSCTTY, IOC_, TYPE_NULL) +IOCTL(TIOCDRAIN, IOC_, TYPE_NULL) +IOCTL(TIOCEXCL, IOC_, TYPE_NULL) @@ -7739,7 +7741,7 @@ new file mode 100644 index 0000000..07e60fe --- /dev/null +++ b/bsd-user/freebsd/os-misc.h -@@ -0,0 +1,442 @@ +@@ -0,0 +1,441 @@ +/* + * miscellaneous FreeBSD system call shims + * @@ -8167,8 +8169,7 @@ index 0000000..07e60fe +static inline abi_long do_freebsd_posix_openpt(abi_long flags) +{ + -+ qemu_log("qemu: Unsupported syscall posix_openpt()\n"); -+ return -TARGET_ENOSYS; ++ return get_errno(posix_openpt(flags)); +} + +/* posix_fadvise(2) */ @@ -13325,6 +13326,11 @@ index 1edf412..ae2a4a3 100644 { TARGET_FREEBSD_NR_truncate, "truncate", NULL, NULL, NULL }, { TARGET_FREEBSD_NR_umask, "umask", "%s(%#o)", NULL, NULL }, { TARGET_FREEBSD_NR_unlink, "unlink", "%s(\"%s\")", NULL, NULL }, +@@ -169,3 +231,4 @@ + { TARGET_FREEBSD_NR_wait4, "wait4", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_write, "write", "%s(%d,%#x,%d)", NULL, NULL }, + { TARGET_FREEBSD_NR_writev, "writev", "%s(%d,%p,%#x)", NULL, NULL }, ++{ TARGET_FREEBSD_NR_posix_openpt, "posix_openpt", "%s(%d)", NULL, NULL }, diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h index 36336ab..d849024 100644 --- a/bsd-user/freebsd/syscall_nr.h @@ -28235,7 +28241,7 @@ index a4d1583..35bf394 100644 + ret = do_freebsd_posix_fallocate(arg1, arg2, arg3); + break; + -+ case TARGET_FREEBSD_NR_posix_openpt: /* posix_fallocate(2) */ ++ case TARGET_FREEBSD_NR_posix_openpt: /* posix_openpt(2) */ + ret = do_freebsd_posix_openpt(arg1); + break; + Added: head/emulators/qemu-devel/files/extra-patch-bsd-user-arm-signal ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/qemu-devel/files/extra-patch-bsd-user-arm-signal Fri Jun 27 18:31:19 2014 (r359593) @@ -0,0 +1,51 @@ +diff --git a/bsd-user/arm/target_arch_signal.h b/bsd-user/arm/target_arch_signal.h +index 048bd4f..0b14b0b 100644 +--- a/bsd-user/arm/target_arch_signal.h ++++ b/bsd-user/arm/target_arch_signal.h +@@ -47,7 +47,7 @@ + #define TARGET_INSN_SIZE 4 /* arm instruction size */ + + /* Size of the signal trampolin code. See _sigtramp(). */ +-#define TARGET_SZSIGCODE ((abi_ulong)(8 * TARGET_INSN_SIZE)) ++#define TARGET_SZSIGCODE ((abi_ulong)(9 * TARGET_INSN_SIZE)) + + /* compare to arm/include/_limits.h */ + #define TARGET_MINSIGSTKSZ (1024 * 4) /* min sig stack size */ +@@ -248,7 +248,7 @@ static inline abi_long get_ucontext_sigreturn(CPUARMState *regs, + return -TARGET_EINVAL; + } + +- *target_uc = target_sf + offsetof(struct target_sigframe, sf_uc); ++ *target_uc = target_sf; + + return 0; + } +diff --git a/bsd-user/arm/target_arch_sigtramp.h b/bsd-user/arm/target_arch_sigtramp.h +index 98dc313..5b7424c 100644 +--- a/bsd-user/arm/target_arch_sigtramp.h ++++ b/bsd-user/arm/target_arch_sigtramp.h +@@ -15,16 +15,17 @@ static inline abi_long setup_sigtramp(abi_ulong offset, unsigned sigf_uc, + */ + uint32_t sigtramp_code[] = { + /* 1 */ 0xE1A0000D, /* mov r0, sp */ +- /* 2 */ 0xE59F700C, /* ldr r7, [pc, #12] */ +- /* 3 */ 0xEF000000 + sys_sigreturn, /* swi (SYS_sigreturn) */ +- /* 4 */ 0xE59F7008, /* ldr r7, [pc, #8] */ +- /* 5 */ 0xEF000000 + sys_exit, /* swi (SYS_exit)*/ +- /* 6 */ 0xEAFFFFFA, /* b . -16 */ +- /* 7 */ sys_sigreturn, +- /* 8 */ sys_exit ++ /* 2 */ 0xE2800000 + sigf_uc, /* add r0, r0, #SIGF_UC */ ++ /* 3 */ 0xE59F700C, /* ldr r7, [pc, #12] */ ++ /* 4 */ 0xEF000000 + sys_sigreturn, /* swi (SYS_sigreturn) */ ++ /* 5 */ 0xE59F7008, /* ldr r7, [pc, #8] */ ++ /* 6 */ 0xEF000000 + sys_exit, /* swi (SYS_exit)*/ ++ /* 7 */ 0xEAFFFFFA, /* b . -16 */ ++ /* 8 */ sys_sigreturn, ++ /* 9 */ sys_exit + }; + +- for (i = 0; i < 8; i++) { ++ for (i = 0; i < 9; i++) { + tswap32s(&sigtramp_code[i]); + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406271831.s5RIVJ5n033753>