genode/base-okl4/patches
Alexandre Bique a6f0067e7f Hard-wire OKL4 elfweaver to python2
On executing "make prepare", patch elfweaver to specify python2 instead
of python, fix 
2012-02-14 16:44:43 +01:00
..
char_bit.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
eabi_build.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
elfweaver-python2.patch Hard-wire OKL4 elfweaver to python2 2012-02-14 16:44:43 +01:00
elfweaver.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
gcc_4.4.5.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
gdt_init.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
invalid_opcode_exception_ipc.patch Send 'invalid opcode' exception IPC on OKL4 2012-02-01 10:25:36 +01:00
kdb_reboot.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
README Send 'invalid opcode' exception IPC on OKL4 2012-02-01 10:25:36 +01:00
reply_tid.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
suspend_resume.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
syscall_pic.patch Imported Genode release 11.11 2011-12-22 16:19:25 +01:00

This directory contains patches for the OKL4 kernel version 2.1.1-patch.9.

:'syscall_pic.patch':

  The original distribution of the OKL4 kernel comes with x86 syscall bindings
  that use absolute addressing modes. Therefore, code using L4 syscalls
  cannot be compiled as position-independent code (gcc option '-fPIC').
  Unfortunately, shared libraries must be compiled as position independent
  because the location of such a library's text segment is not known at
  compile time. Consequently, L4 syscalls cannot be issued by shared
  libraries, which is a severe limitation. The patch fixes the problem
  by changing all L4 syscall bindings by removing PIC-incompatible
  addressing modes. It does not affect the functionality of the kernel.

:'eabi_build.patch':

  The build system of the orignal OKL4 distribution is not prepared to
  compile ARM EABI binaries as generated by modern tool chains such as the
  Codesourcery GCC. The patch applies the needed changes to the OKL4 build
  infrastructure.

:'reply_tid.patch':

  The original OKL4 kernel does not report the global thread ID of the
  sender to the receiver of an IPC. Instead, the so called "threadhandle"
  of the sender thread is provided. This value is the KTCB index of the
  thread. It can be used as IPC destination when sending the reply but
  is otherwise meaningless to the userland. However, this becomes a
  problem when handing page faults because the page-fault handler is not
  able to identify the faulting thread - only the faulting space. There
  is no way for the pager to lookup the thread context of the faulting
  thread with the information of the page-fault message. The patch changes
  OKL4 such that the global thread ID of the sender is provided to the
  receiver.

:'kdb_reboot.patch':

  This patch enables machine reboot from the kernel debugger.

:'char_bit.patch':

  This patch resolves the conflict of definitions of 'CHAR_BIT' between
  libc and the OKL4 headers. 'CHAR_BIT' is normally defined by the libc
  ('limits.h') but it also appears in OKL4's 'types.h'. The patch relaxes
  the conflict by making 'CHAR_BIT' an enum value rather then a '#define'.
  This way, OKL4's headers included into a dedicated 'Okl4' C++ namespace
  (as done by Genode) will result in a 'Okl4::CHAR_BIT' name, not causing
  trouble with libc headers included by the same compilation unit.

:'gdt_init.patch':

  This patch fixes a off-by-one bug that prevents OKL4 from running on
  VirtualBox with VT-x disabled. The original kernel calculates the
  last segment address in a wrong way, causing a conflict between
  GDT and TSS. As a result, VirtualBox stops with a 'GURU_MEDITATION'
  error.

:'invalid_opcode_exception_ipc.patch':

  When an invalid opcode gets executed, OKL4 switches to the kernel debugger
  console instead of sending an exception IPC to the userland. This patch
  fixes the problem by removing the code that invokes the debugger console.

Applying the patches
--------------------

To apply a patch to the OKL4 kernel, use the 'patch' command. First check
the directory given at the header of the patch. It may contain a directory
prefix (such as 'a/'), which does not actually exist. This prefix is usually
generated by the tool used to create the patch. In this case, use the '-p'
option of the patch command. To apply the patch with the first part of the
path stripped, issue the following command (make sure that you changed to
the base directory of the OKL4 kernel):

! patch -p1 < /path/to/syscall_pic.patch