diff -uNr linux-2.6.10.orig/Makefile linux-2.6.10-bs2d/Makefile
--- linux-2.6.10.orig/Makefile	2005-10-31 12:10:29.000000000 +0100
+++ linux-2.6.10-bs2d/Makefile	2005-10-31 14:08:30.000000000 +0100
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 10
-EXTRAVERSION =
+EXTRAVERSION = -bs2d
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
diff -uNr linux-2.6.10.orig/arch/i386/kernel/Makefile linux-2.6.10-bs2d/arch/i386/kernel/Makefile
--- linux-2.6.10.orig/arch/i386/kernel/Makefile	2005-10-31 12:09:52.000000000 +0100
+++ linux-2.6.10-bs2d/arch/i386/kernel/Makefile	2005-10-31 12:49:57.000000000 +0100
@@ -7,7 +7,7 @@
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
 		pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \
-		doublefault.o quirks.o
+		doublefault.o quirks.o bs2_entry.o  # $$$
 
 obj-y				+= cpu/
 obj-y				+= timers/
diff -uNr linux-2.6.10.orig/arch/i386/kernel/bs2_entry.S linux-2.6.10-bs2d/arch/i386/kernel/bs2_entry.S
--- linux-2.6.10.orig/arch/i386/kernel/bs2_entry.S	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.10-bs2d/arch/i386/kernel/bs2_entry.S	2005-10-31 15:14:05.000000000 +0100
@@ -0,0 +1,187 @@
+/*
+ *  linux/arch/i386/bs2_entry.S
+ *
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ */
+
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/thread_info.h>
+#include <asm/errno.h>
+#include <asm/segment.h>
+#include <asm/smp.h>
+#include <asm/page.h>
+#include "irq_vectors.h"
+
+#define nr_bs2_syscalls ((bs2_syscall_table_size)/4)
+
+EBX		= 0x00
+ECX		= 0x04
+EDX		= 0x08
+ESI		= 0x0C
+EDI		= 0x10
+EBP		= 0x14
+EAX		= 0x18
+DS		= 0x1C
+ES		= 0x20
+ORIG_EAX	= 0x24
+EIP		= 0x28
+CS		= 0x2C
+EFLAGS		= 0x30
+OLDESP		= 0x34
+OLDSS		= 0x38
+
+CF_MASK		= 0x00000001
+TF_MASK		= 0x00000100
+IF_MASK		= 0x00000200
+DF_MASK		= 0x00000400 
+NT_MASK		= 0x00004000
+VM_MASK		= 0x00020000
+
+#ifdef CONFIG_PREEMPT
+#define preempt_stop		cli
+#else
+#define preempt_stop
+#define resume_kernel		restore_all
+#endif
+
+#define SAVE_ALL \
+	cld; \
+	pushl %es; \
+	pushl %ds; \
+	pushl %eax; \
+	pushl %ebp; \
+	pushl %edi; \
+	pushl %esi; \
+	pushl %edx; \
+	pushl %ecx; \
+	pushl %ebx; \
+	movl $(__USER_DS), %edx; \
+	movl %edx, %ds; \
+	movl %edx, %es;
+
+#define RESTORE_INT_REGS \
+	popl %ebx;	\
+	popl %ecx;	\
+	popl %edx;	\
+	popl %esi;	\
+	popl %edi;	\
+	popl %ebp;	\
+	popl %eax
+
+#define RESTORE_REGS	\
+	RESTORE_INT_REGS; \
+1:	popl %ds;	\
+2:	popl %es;	\
+.section .fixup,"ax";	\
+3:	movl $0,(%esp);	\
+	jmp 1b;		\
+4:	movl $0,(%esp);	\
+	jmp 2b;		\
+.previous;		\
+.section __ex_table,"a";\
+	.align 4;	\
+	.long 1b,3b;	\
+	.long 2b,4b;	\
+.previous
+
+
+#define RESTORE_ALL	\
+	RESTORE_REGS	\
+	addl $4, %esp;	\
+1:	iret;		\
+.section .fixup,"ax";   \
+2:	sti;		\
+	movl $(__USER_DS), %edx; \
+	movl %edx, %ds; \
+	movl %edx, %es; \
+	pushl $11;	\
+	call do_exit;	\
+.previous;		\
+.section __ex_table,"a";\
+	.align 4;	\
+	.long 1b,2b;	\
+.previous
+
+
+
+	# system call handler stub
+ENTRY(bs2_system_call)
+	pushl %eax			# save orig_eax
+	SAVE_ALL
+	GET_THREAD_INFO(%ebp)
+	cmpl $(nr_bs2_syscalls), %eax
+	jae syscall_badsys
+syscall_call:
+	call *bs2_sys_call_table(,%eax,4)
+	movl %eax,EAX(%esp)		# store the return value
+syscall_exit:
+	cli				# make sure we don't miss an interrupt
+					# setting need_resched or sigpending
+					# between sampling and the iret
+	movl TI_flags(%ebp), %ecx
+	testw $_TIF_ALLWORK_MASK, %cx	# current->work
+	jne syscall_exit_work
+restore_all:
+	RESTORE_ALL
+
+	# perform work that needs to be done immediately before resumption
+	ALIGN
+work_pending:
+	testb $_TIF_NEED_RESCHED, %cl
+	jz work_notifysig
+work_resched:
+	call schedule
+	cli				# make sure we don't miss an interrupt
+					# setting need_resched or sigpending
+					# between sampling and the iret
+	movl TI_flags(%ebp), %ecx
+	andl $_TIF_WORK_MASK, %ecx	# is there any work to be done other
+					# than syscall tracing?
+	jz restore_all
+	testb $_TIF_NEED_RESCHED, %cl
+	jnz work_resched
+
+work_notifysig:				# deal with pending signals and
+					# notify-resume requests
+	testl $VM_MASK, EFLAGS(%esp)
+	movl %esp, %eax
+	jne work_notifysig_v86		# returning to kernel-space or
+					# vm86-space
+	xorl %edx, %edx
+	call do_notify_resume
+	jmp restore_all
+
+	ALIGN
+work_notifysig_v86:
+	pushl %ecx
+	call save_v86_state
+	popl %ecx
+	movl %eax, %esp
+	xorl %edx, %edx
+	call do_notify_resume
+	jmp restore_all
+
+	# perform syscall exit tracing
+	ALIGN
+syscall_exit_work:
+	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP), %cl
+	jz work_pending
+	sti				# could let do_syscall_trace() call
+					# schedule() instead
+	movl %esp, %eax
+	movl $1, %edx
+	call do_syscall_trace
+	jmp resume_userspace
+
+	ALIGN
+syscall_badsys:
+	movl $-ENOSYS,EAX(%esp)
+	jmp resume_userspace
+
+
+.data
+ENTRY(bs2_sys_call_table)
+  	.long sys_bs2_0           /* 0 */
+
+bs2_syscall_table_size=(.-bs2_sys_call_table)
diff -uNr linux-2.6.10.orig/arch/i386/kernel/i8259.c linux-2.6.10-bs2d/arch/i386/kernel/i8259.c
--- linux-2.6.10.orig/arch/i386/kernel/i8259.c	2005-10-31 12:09:52.000000000 +0100
+++ linux-2.6.10-bs2d/arch/i386/kernel/i8259.c	2005-10-31 12:54:40.000000000 +0100
@@ -404,6 +404,8 @@
 		int vector = FIRST_EXTERNAL_VECTOR + i;
 		if (i >= NR_IRQS)
 			break;
+		if (vector == BS2_SYSCALL_VECTOR)  /* $$$ */
+			continue;
 		if (vector != SYSCALL_VECTOR) 
 			set_intr_gate(vector, interrupt[i]);
 	}
diff -uNr linux-2.6.10.orig/arch/i386/kernel/io_apic.c linux-2.6.10-bs2d/arch/i386/kernel/io_apic.c
--- linux-2.6.10.orig/arch/i386/kernel/io_apic.c	2005-10-31 12:09:52.000000000 +0100
+++ linux-2.6.10-bs2d/arch/i386/kernel/io_apic.c	2005-10-31 12:56:39.000000000 +0100
@@ -1138,6 +1138,9 @@
 	if (current_vector == SYSCALL_VECTOR)
 		goto next;
 
+	if (current_vector == BS2_SYSCALL_VECTOR)  /* $$$ */
+		goto next;
+
 	if (current_vector >= FIRST_SYSTEM_VECTOR) {
 		offset++;
 		if (!(offset%8))
diff -uNr linux-2.6.10.orig/arch/i386/kernel/traps.c linux-2.6.10-bs2d/arch/i386/kernel/traps.c
--- linux-2.6.10.orig/arch/i386/kernel/traps.c	2005-10-31 12:09:52.000000000 +0100
+++ linux-2.6.10-bs2d/arch/i386/kernel/traps.c	2005-10-31 12:50:45.000000000 +0100
@@ -57,6 +57,7 @@
 #include "mach_traps.h"
 
 asmlinkage int system_call(void);
+asmlinkage int bs2_system_call(void); /* $$$ */
 
 struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 },
 		{ 0, 0 }, { 0, 0 } };
@@ -1037,6 +1038,7 @@
 	set_trap_gate(19,&simd_coprocessor_error);
 
 	set_system_gate(SYSCALL_VECTOR,&system_call);
+	set_system_gate(BS2_SYSCALL_VECTOR,&bs2_system_call); /* $$$ */
 
 	/*
 	 * Should be a barrier for any external CPU state.
diff -uNr linux-2.6.10.orig/include/asm-i386/bs2_unistd.h linux-2.6.10-bs2d/include/asm-i386/bs2_unistd.h
--- linux-2.6.10.orig/include/asm-i386/bs2_unistd.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.10-bs2d/include/asm-i386/bs2_unistd.h	2005-10-31 14:07:12.000000000 +0100
@@ -0,0 +1,100 @@
+#ifndef _ASM_I386_BS2_UNISTD_H_
+#define _ASM_I386_BS2_UNISTD_H_
+
+/*
+ * This file contains the BS2 system call numbers.
+ */
+
+#define __NR_bs2_0			0
+
+
+/* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
+
+#define __bs2_syscall_return(type, res) \
+do { \
+	if ((unsigned long)(res) >= (unsigned long)(-125)) { \
+		errno = -(res); \
+		res = -1; \
+	} \
+	return (type) (res); \
+} while (0)
+
+/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
+#define _bs2_syscall0(type,name) \
+type name(void) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x81" \
+	: "=a" (__res) \
+	: "0" (__NR_##name)); \
+__bs2_syscall_return(type,__res); \
+}
+
+#define _bs2_syscall1(type,name,type1,arg1) \
+type name(type1 arg1) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x81" \
+	: "=a" (__res) \
+	: "0" (__NR_##name),"b" ((long)(arg1))); \
+__bs2_syscall_return(type,__res); \
+}
+
+#define _bs2_syscall2(type,name,type1,arg1,type2,arg2) \
+type name(type1 arg1,type2 arg2) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x81" \
+	: "=a" (__res) \
+	: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \
+__bs2_syscall_return(type,__res); \
+}
+
+#define _bs2_syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+type name(type1 arg1,type2 arg2,type3 arg3) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x81" \
+	: "=a" (__res) \
+	: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+		  "d" ((long)(arg3))); \
+__bs2_syscall_return(type,__res); \
+}
+
+#define _bs2_syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x81" \
+	: "=a" (__res) \
+	: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+	  "d" ((long)(arg3)),"S" ((long)(arg4))); \
+__bs2_syscall_return(type,__res); \
+} 
+
+#define _bs2_syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+	  type5,arg5) \
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x81" \
+	: "=a" (__res) \
+	: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+	  "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
+__bs2_syscall_return(type,__res); \
+}
+
+#define _bs2_syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+	  type5,arg5,type6,arg6) \
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
+{ \
+long __res; \
+__asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; int $0x81 ; pop %%ebp" \
+	: "=a" (__res) \
+	: "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+	  "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \
+	  "0" ((long)(arg6))); \
+__bs2_syscall_return(type,__res); \
+}
+
+#endif /* _ASM_I386_BS2_UNISTD_H_ */
diff -uNr linux-2.6.10.orig/include/asm-i386/mach-default/irq_vectors.h linux-2.6.10-bs2d/include/asm-i386/mach-default/irq_vectors.h
--- linux-2.6.10.orig/include/asm-i386/mach-default/irq_vectors.h	2005-10-31 12:10:01.000000000 +0100
+++ linux-2.6.10-bs2d/include/asm-i386/mach-default/irq_vectors.h	2005-10-31 12:52:38.000000000 +0100
@@ -29,6 +29,7 @@
 #define FIRST_EXTERNAL_VECTOR	0x20
 
 #define SYSCALL_VECTOR		0x80
+#define BS2_SYSCALL_VECTOR      0x81  /* $$$ */
 
 /*
  * Vectors 0x20-0x2f are used for ISA interrupts.
diff -uNr linux-2.6.10.orig/kernel/printk.c linux-2.6.10-bs2d/kernel/printk.c
--- linux-2.6.10.orig/kernel/printk.c	2005-10-31 12:10:27.000000000 +0100
+++ linux-2.6.10-bs2d/kernel/printk.c	2005-10-31 15:18:28.000000000 +0100
@@ -910,3 +910,14 @@
 				printk_ratelimit_burst);
 }
 EXPORT_SYMBOL(printk_ratelimit);
+
+
+/* --------------------------------------------- */
+int bs2_0_callno;
+
+asmlinkage long sys_bs2_0(void)
+{
+	printk("bs2_0(): Hello World! call %d\n", bs2_0_callno++);
+	return 0;
+}
+/* --------------------------------------------- */
