Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/tls-maxphys]: src/sys/rump/kern/lib/libsys_linux i386 has a special way ...
details: https://anonhg.NetBSD.org/src/rev/345d1f135c85
branches: tls-maxphys
changeset: 852971:345d1f135c85
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 03 23:51:21 2013 +0000
description:
i386 has a special way to handle uname. We don't really care about
satisfying uname in a rump kernel, but attempt to return something
sane anyway.
diffstat:
sys/rump/kern/lib/libsys_linux/component.c | 94 ++++++++++++++++++++++++++++++
1 files changed, 94 insertions(+), 0 deletions(-)
diffs (98 lines):
diff -r 1ffdbca0f4ef -r 345d1f135c85 sys/rump/kern/lib/libsys_linux/component.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/kern/lib/libsys_linux/component.c Wed Apr 03 23:51:21 2013 +0000
@@ -0,0 +1,94 @@
+/* $NetBSD: component.c,v 1.8.4.2 2013/04/03 23:51:21 pooka Exp $ */
+
+#include <sys/param.h>
+#include <sys/proc.h>
+
+#include <uvm/uvm_extern.h>
+
+#include "rump_private.h"
+
+#include "rump_linux_syscall.h"
+
+extern struct sysent rump_linux_sysent[];
+
+struct emul emul_rump_sys_linux = {
+ .e_name = "linux-rump",
+ .e_sysent = rump_linux_sysent,
+#ifndef __HAVE_MINIMAL_EMUL
+ .e_nsysent = RUMP_LINUX_SYS_NSYSENT,
+#endif
+ .e_vm_default_addr = uvm_default_mapaddr,
+#ifdef __HAVE_SYSCALL_INTERN
+ .e_syscall_intern = syscall_intern,
+#endif
+};
+
+RUMP_COMPONENT(RUMP_COMPONENT_KERN)
+{
+ extern struct emul *emul_default;
+
+ emul_default = &emul_rump_sys_linux;
+}
+
+#include <compat/linux/common/linux_machdep.h>
+
+dev_t
+linux_fakedev(dev_t in, int raw)
+{
+
+ /* I don't really think it matters what we return here */
+ return in;
+}
+
+/*
+ * XXX: the linux emulation code is not split into factions
+ */
+void rumplinux__stub(void);
+void rumplinux__stub(void) {panic("unavailable");}
+
+/* timing */
+__weak_alias(clock_gettime1,rumplinux__stub);
+__weak_alias(clock_settime1,rumplinux__stub);
+__weak_alias(clock_getres1,rumplinux__stub);
+__weak_alias(compat_50_sys_gettimeofday,rumplinux__stub);
+__weak_alias(compat_50_sys_settimeofday,rumplinux__stub);
+__weak_alias(nanosleep1,rumplinux__stub);
+
+/* vm-related */
+__weak_alias(sys_mmap,rumplinux__stub);
+__weak_alias(vm_map_unlock,rumplinux__stub);
+__weak_alias(uvm_map_lookup_entry,rumplinux__stub);
+__weak_alias(sys_obreak,rumplinux__stub);
+__weak_alias(sys_swapctl,rumplinux__stub);
+__weak_alias(vm_map_lock,rumplinux__stub);
+__weak_alias(uvm_mremap,rumplinux__stub);
+
+/* signal.c */
+__weak_alias(sigaction1,rumplinux__stub);
+__weak_alias(kpsignal2,rumplinux__stub);
+__weak_alias(sys_kill,rumplinux__stub);
+__weak_alias(sigsuspend1,rumplinux__stub);
+__weak_alias(sigtimedwait1,rumplinux__stub);
+__weak_alias(lwp_find,rumplinux__stub);
+
+/* misc */
+__weak_alias(linux_machdepioctl,rumplinux__stub);
+__weak_alias(linux_ioctl_sg,rumplinux__stub);
+__weak_alias(oss_ioctl_mixer,rumplinux__stub);
+__weak_alias(oss_ioctl_sequencer,rumplinux__stub);
+__weak_alias(oss_ioctl_audio,rumplinux__stub);
+__weak_alias(rusage_to_rusage50,rumplinux__stub);
+__weak_alias(do_sys_wait,rumplinux__stub);
+
+/* arch-specific */
+__weak_alias(compat_offseterr,rumplinux__stub);
+__weak_alias(linux_sys_ptrace_arch,rumplinux__stub);
+
+#ifdef __i386__
+const char *
+linux_get_uname_arch(void)
+{
+
+ return MACHINE_ARCH;
+}
+#endif /* __i386__ */
Home |
Main Index |
Thread Index |
Old Index