summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2016-01-24 12:39:32 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2016-01-24 12:39:32 +0100
commit534e394a2eb228c8780a1cb8d1740eaf2d8d81b7 (patch)
tree848e29c24dc9b5db6e8c924a94cc5d3a80cde596
parent88eed7f9949df9a892c426af9810aa43469dcbe6 (diff)
update dde patch
-rw-r--r--debian/patches/70_dde.patch289
1 files changed, 144 insertions, 145 deletions
diff --git a/debian/patches/70_dde.patch b/debian/patches/70_dde.patch
index 95f26df..9868d85 100644
--- a/debian/patches/70_dde.patch
+++ b/debian/patches/70_dde.patch
@@ -1,7 +1,13 @@
-Index: gnumach/Makefrag.am
-===================================================================
---- gnumach.orig/Makefrag.am
-+++ gnumach/Makefrag.am
+commit 5cddfa824bde4ff8c235bf3adb1952ba99293941
+Author: Richard Braun <rbraun@sceen.net>
+Date: Sun Jan 24 00:05:30 2016 +0100
+
+ 70_dde
+
+diff --git a/Makefrag.am b/Makefrag.am
+index bb600e0..cfbef2c 100644
+--- a/Makefrag.am
++++ b/Makefrag.am
@@ -220,6 +220,7 @@ EXTRA_DIST += \
kern/mach.srv \
kern/mach4.srv \
@@ -10,7 +16,7 @@ Index: gnumach/Makefrag.am
kern/mach_debug.srv \
kern/mach_host.srv \
kern/task_notify.cli
-@@ -303,6 +304,7 @@ libkernel_a_SOURCES += \
+@@ -304,6 +305,7 @@ libkernel_a_SOURCES += \
device/device_types_kernel.h \
device/ds_routines.c \
device/ds_routines.h \
@@ -18,7 +24,7 @@ Index: gnumach/Makefrag.am
device/if_ether.h \
device/if_hdr.h \
device/io_req.h \
-@@ -353,6 +355,7 @@ include_device_HEADERS = \
+@@ -352,6 +354,7 @@ include_device_HEADERS = \
include/device/device_types.defs \
include/device/device_types.h \
include/device/disk_status.h \
@@ -26,7 +32,7 @@ Index: gnumach/Makefrag.am
include/device/net_status.h \
include/device/tape_status.h \
include/device/tty_status.h
-@@ -375,6 +378,7 @@ include_mach_HEADERS = \
+@@ -374,6 +377,7 @@ include_mach_HEADERS = \
include/mach/memory_object_default.defs \
include/mach/notify.defs \
include/mach/std_types.defs \
@@ -34,7 +40,7 @@ Index: gnumach/Makefrag.am
include/mach/alert.h \
include/mach/boolean.h \
include/mach/boot.h \
-@@ -523,6 +527,7 @@ nodist_lib_dep_tr_for_defs_a_SOURCES +=
+@@ -522,6 +526,7 @@ nodist_lib_dep_tr_for_defs_a_SOURCES += \
kern/mach.server.defs.c \
kern/mach4.server.defs.c \
kern/gnumach.server.defs.c \
@@ -42,7 +48,7 @@ Index: gnumach/Makefrag.am
kern/mach_debug.server.defs.c \
kern/mach_host.server.defs.c
nodist_libkernel_a_SOURCES += \
-@@ -535,6 +540,9 @@ nodist_libkernel_a_SOURCES += \
+@@ -534,6 +539,9 @@ nodist_libkernel_a_SOURCES += \
kern/gnumach.server.h \
kern/gnumach.server.c \
kern/gnumach.server.msgids \
@@ -52,7 +58,7 @@ Index: gnumach/Makefrag.am
kern/mach_debug.server.h \
kern/mach_debug.server.c \
kern/mach_debug.server.msgids \
-@@ -544,6 +552,7 @@ nodist_libkernel_a_SOURCES += \
+@@ -543,6 +551,7 @@ nodist_libkernel_a_SOURCES += \
# kern/mach.server.defs
# kern/mach4.server.defs
# kern/gnumach.server.defs
@@ -60,11 +66,11 @@ Index: gnumach/Makefrag.am
# kern/mach_debug.server.defs
# kern/mach_host.server.defs
-Index: gnumach/device/ds_routines.c
-===================================================================
---- gnumach.orig/device/ds_routines.c
-+++ gnumach/device/ds_routines.c
-@@ -318,6 +318,43 @@ ds_device_map (device_t dev, vm_prot_t p
+diff --git a/device/ds_routines.c b/device/ds_routines.c
+index 43ed5b5..7921520 100644
+--- a/device/ds_routines.c
++++ b/device/ds_routines.c
+@@ -318,6 +318,43 @@ ds_device_map (device_t dev, vm_prot_t prot, vm_offset_t offset,
offset, size, pager, unmap);
}
@@ -108,7 +114,7 @@ Index: gnumach/device/ds_routines.c
boolean_t
ds_notify (mach_msg_header_t *msg)
{
-@@ -1798,6 +1835,24 @@ device_writev_trap (mach_device_t device
+@@ -1798,6 +1835,24 @@ device_writev_trap (mach_device_t device, dev_mode_t mode,
return (result);
}
@@ -133,10 +139,10 @@ Index: gnumach/device/ds_routines.c
struct device_emulation_ops mach_device_emulation_ops =
{
(void*) mach_device_reference,
-Index: gnumach/device/ds_routines.h
-===================================================================
---- gnumach.orig/device/ds_routines.h
-+++ gnumach/device/ds_routines.h
+diff --git a/device/ds_routines.h b/device/ds_routines.h
+index c0543cb..e9f115f 100644
+--- a/device/ds_routines.h
++++ b/device/ds_routines.h
@@ -83,4 +83,7 @@ io_return_t ds_device_writev_trap(
io_buf_vec_t *iovec,
vm_size_t count);
@@ -145,10 +151,11 @@ Index: gnumach/device/ds_routines.h
+extern ipc_port_t intr_rcv_ports[16];
+
#endif /* DS_ROUTINES_H */
-Index: gnumach/device/intr.c
-===================================================================
+diff --git a/device/intr.c b/device/intr.c
+new file mode 100644
+index 0000000..6fca328
--- /dev/null
-+++ gnumach/device/intr.c
++++ b/device/intr.c
@@ -0,0 +1,198 @@
+#include <device/intr.h>
+#include <device/ds_routines.h>
@@ -348,18 +355,34 @@ Index: gnumach/device/intr.c
+ return TRUE;
+}
+#endif /* MACH_XEN */
-Index: gnumach/kern/experimental.srv
-===================================================================
+diff --git a/include/device/intr.h b/include/device/intr.h
+new file mode 100644
+index 0000000..a02b64c
--- /dev/null
-+++ gnumach/kern/experimental.srv
-@@ -0,0 +1,3 @@
-+#define KERNEL_SERVER 1
++++ b/include/device/intr.h
+@@ -0,0 +1,17 @@
++#ifndef __INTR_H__
+
-+#include <mach/experimental.defs>
-Index: gnumach/include/mach/experimental.defs
-===================================================================
++#define __INTR_H__
++
++#include <device/device_types.h>
++
++typedef struct
++{
++ mach_msg_header_t intr_header;
++ mach_msg_type_t intr_type;
++ int line;
++} mach_intr_notification_t;
++
++#define INTR_NOTIFY_MSGH_SEQNO 0
++#define MACH_INTR_NOTIFY 424242
++
++#endif
+diff --git a/include/mach/experimental.defs b/include/mach/experimental.defs
+new file mode 100644
+index 0000000..ca1eb92
--- /dev/null
-+++ gnumach/include/mach/experimental.defs
++++ b/include/mach/experimental.defs
@@ -0,0 +1,100 @@
+/*
+ * Mach Operating System
@@ -461,32 +484,47 @@ Index: gnumach/include/mach/experimental.defs
+ out vaddr : vm_address_t;
+ out paddr : vm_address_t;
+ size : vm_size_t);
-Index: gnumach/include/device/intr.h
-===================================================================
+diff --git a/kern/experimental.srv b/kern/experimental.srv
+new file mode 100644
+index 0000000..2ccfd78
--- /dev/null
-+++ gnumach/include/device/intr.h
-@@ -0,0 +1,17 @@
-+#ifndef __INTR_H__
-+
-+#define __INTR_H__
-+
-+#include <device/device_types.h>
-+
-+typedef struct
-+{
-+ mach_msg_header_t intr_header;
-+ mach_msg_type_t intr_type;
-+ int line;
-+} mach_intr_notification_t;
-+
-+#define INTR_NOTIFY_MSGH_SEQNO 0
-+#define MACH_INTR_NOTIFY 424242
++++ b/kern/experimental.srv
+@@ -0,0 +1,3 @@
++#define KERNEL_SERVER 1
+
-+#endif
-Index: gnumach/kern/startup.c
-===================================================================
---- gnumach.orig/kern/startup.c
-+++ gnumach/kern/startup.c
++#include <mach/experimental.defs>
+diff --git a/kern/ipc_kobject.c b/kern/ipc_kobject.c
+index 709ec9e..c65458b 100644
+--- a/kern/ipc_kobject.c
++++ b/kern/ipc_kobject.c
+@@ -56,6 +56,7 @@
+ #include <device/device_pager.server.h>
+ #include <kern/mach4.server.h>
+ #include <kern/gnumach.server.h>
++#include <kern/experimental.server.h>
+
+ #if MACH_DEBUG
+ #include <kern/mach_debug.server.h>
+@@ -159,6 +160,7 @@ ipc_kobject_server(request)
+ * to perform the kernel function
+ */
+ {
++ extern mig_routine_t experimental_server_routine();
+ check_simple_locks();
+ if ((routine = mach_server_routine(&request->ikm_header)) != 0
+ || (routine = mach_port_server_routine(&request->ikm_header)) != 0
+@@ -170,6 +172,7 @@ ipc_kobject_server(request)
+ #endif /* MACH_DEBUG */
+ || (routine = mach4_server_routine(&request->ikm_header)) != 0
+ || (routine = gnumach_server_routine(&request->ikm_header)) != 0
++ || (routine = experimental_server_routine(&request->ikm_header)) != 0
+ #if MACH_MACHINE_ROUTINES
+ || (routine = MACHINE_SERVER_ROUTINE(&request->ikm_header)) != 0
+ #endif /* MACH_MACHINE_ROUTINES */
+diff --git a/kern/startup.c b/kern/startup.c
+index bd29694..05de5e6 100644
+--- a/kern/startup.c
++++ b/kern/startup.c
@@ -79,6 +79,7 @@ boolean_t reboot_on_panic = TRUE;
/* XX */
extern vm_offset_t phys_first_addr, phys_last_addr;
@@ -505,10 +543,10 @@ Index: gnumach/kern/startup.c
#if NCPUS > 1
/*
-Index: gnumach/linux/dev/arch/i386/kernel/irq.c
-===================================================================
---- gnumach.orig/linux/dev/arch/i386/kernel/irq.c
-+++ gnumach/linux/dev/arch/i386/kernel/irq.c
+diff --git a/linux/dev/arch/i386/kernel/irq.c b/linux/dev/arch/i386/kernel/irq.c
+index 7753814..b7dfa1a 100644
+--- a/linux/dev/arch/i386/kernel/irq.c
++++ b/linux/dev/arch/i386/kernel/irq.c
@@ -83,6 +83,7 @@ struct linux_action
void *dev_id;
struct linux_action *next;
@@ -564,7 +602,7 @@ Index: gnumach/linux/dev/arch/i386/kernel/irq.c
action = action->next;
}
-@@ -233,6 +265,7 @@ setup_x86_irq (int irq, struct linux_act
+@@ -233,6 +265,7 @@ setup_x86_irq (int irq, struct linux_action *new)
}
while (old);
shared = 1;
@@ -572,7 +610,7 @@ Index: gnumach/linux/dev/arch/i386/kernel/irq.c
}
save_flags (flags);
-@@ -250,6 +283,51 @@ setup_x86_irq (int irq, struct linux_act
+@@ -250,6 +283,51 @@ setup_x86_irq (int irq, struct linux_action *new)
return 0;
}
@@ -624,7 +662,7 @@ Index: gnumach/linux/dev/arch/i386/kernel/irq.c
/*
* Attach a handler to an IRQ.
*/
-@@ -278,6 +356,7 @@ request_irq (unsigned int irq, void (*ha
+@@ -278,6 +356,7 @@ request_irq (unsigned int irq, void (*handler) (int, void *, struct pt_regs *),
action->next = NULL;
action->dev_id = dev_id;
action->flags = flags;
@@ -632,28 +670,30 @@ Index: gnumach/linux/dev/arch/i386/kernel/irq.c
retval = setup_x86_irq (irq, action);
if (retval)
-Index: gnumach/vm/vm_user.c
-===================================================================
---- gnumach.orig/vm/vm_user.c
-+++ gnumach/vm/vm_user.c
-@@ -449,3 +449,117 @@ kern_return_t vm_wire(port, map, start,
+diff --git a/linux/dev/drivers/block/genhd.c b/linux/dev/drivers/block/genhd.c
+index 3a86138..4a36f7f 100644
+--- a/linux/dev/drivers/block/genhd.c
++++ b/linux/dev/drivers/block/genhd.c
+@@ -812,7 +812,9 @@ void device_setup(void)
+ #ifdef MACH
+ linux_intr_pri = SPL6;
+ #endif
+- net_dev_init();
++ extern char *kernel_cmdline;
++ if (!strstr(kernel_cmdline, " nonetdev"))
++ net_dev_init();
+ #endif
+ #ifndef MACH
+ console_map_init();
+diff --git a/vm/vm_user.c b/vm/vm_user.c
+index c71e9f5..f466b1d 100644
+--- a/vm/vm_user.c
++++ b/vm/vm_user.c
+@@ -449,3 +449,106 @@ kern_return_t vm_wire(port, map, start, size, access)
round_page(start+size),
access);
}
+
-+void vm_pages_release(npages, pages, external)
-+ int npages;
-+ vm_page_t *pages;
-+ boolean_t external;
-+{
-+ int i;
-+
-+ for (i = 0; i < npages; i++)
-+ {
-+ vm_page_release (pages[i], external);
-+ }
-+}
-+
+kern_return_t experimental_vm_allocate_contiguous(host_priv, map, result_vaddr, result_paddr, size)
+ host_t host_priv;
+ vm_map_t map;
@@ -661,13 +701,10 @@ Index: gnumach/vm/vm_user.c
+ vm_address_t *result_paddr;
+ vm_size_t size;
+{
-+ extern vm_size_t vm_page_big_pagenum;
-+ extern vm_offset_t phys_first_addr;
-+ extern vm_offset_t phys_last_addr;
-+
-+ int npages;
-+ int i;
-+ vm_page_t *pages;
++ unsigned int npages;
++ unsigned int i;
++ unsigned int order;
++ vm_page_t pages;
+ vm_object_t object;
+ vm_map_entry_t entry;
+ kern_return_t kr;
@@ -680,26 +717,33 @@ Index: gnumach/vm/vm_user.c
+ if (map == VM_MAP_NULL)
+ return KERN_INVALID_TASK;
+
-+ size = round_page(size);
++ /*
++ * XXX The page allocator returns blocks with a power-of-two size.
++ * The requested size may not be a power-of-two, causing the pages
++ * at the end of a block to be unused. In order to keep track of
++ * those pages, they must all be inserted in the VM object created
++ * by this function.
++ */
++ order = vm_page_order(size);
++ size = (1 << (order + PAGE_SHIFT));
+
+ /* We allocate the contiguous physical pages for the buffer. */
+
+ npages = size / PAGE_SIZE;
-+ pages = (vm_page_t) kalloc (npages * sizeof (vm_page_t));
++ pages = vm_page_grab_contig(size, VM_PAGE_SEL_DIRECTMAP);
+ if (pages == NULL)
+ {
+ return KERN_RESOURCE_SHORTAGE;
+ }
+
-+ if (vm_page_big_pagenum == 0)
-+ vm_page_big_pagenum = atop(phys_last_addr - phys_first_addr);
-+
-+ kr = vm_page_grab_contiguous_pages(npages, pages, NULL, TRUE);
++#if 0
++ kr = vm_page_grab_contig(npages, pages, NULL, TRUE);
+ if (kr)
+ {
+ kfree (pages, npages * sizeof (vm_page_t));
+ return kr;
+ }
++#endif
+
+ /* Allocate the object
+ * and find the virtual address for the DMA buffer */
@@ -713,8 +757,7 @@ Index: gnumach/vm/vm_user.c
+ {
+ vm_map_unlock(map);
+ vm_object_deallocate(object);
-+ kfree (pages, npages * sizeof (vm_page_t));
-+ vm_pages_release (npages, pages, TRUE);
++ vm_page_free_contig(pages, size);
+ return kr;
+ }
+
@@ -729,71 +772,27 @@ Index: gnumach/vm/vm_user.c
+ pmap_pageable (map->pmap, vaddr, vaddr + size, FALSE);
+
+ *result_vaddr = vaddr;
-+ *result_paddr = pages[0]->phys_addr;
++ *result_paddr = pages->phys_addr;
+
+ for (i = 0; i < npages; i++)
+ {
+ vm_object_lock(object);
+ vm_page_lock_queues();
-+ vm_page_insert(pages[i], object, offset);
-+ vm_page_wire(pages[i]);
++ vm_page_insert(&pages[i], object, offset);
++ vm_page_wire(&pages[i]);
+ vm_page_unlock_queues();
+ vm_object_unlock(object);
+
+ /* Enter it in the kernel pmap */
-+ PMAP_ENTER(map->pmap, vaddr, pages[i], VM_PROT_DEFAULT, TRUE);
++ PMAP_ENTER(map->pmap, vaddr, &pages[i], VM_PROT_DEFAULT, TRUE);
+
+ vm_object_lock(object);
-+ PAGE_WAKEUP_DONE(pages[i]);
++ PAGE_WAKEUP_DONE(&pages[i]);
+ vm_object_unlock(object);
+
+ vaddr += PAGE_SIZE;
+ offset += PAGE_SIZE;
+ }
+
-+ kfree ((vm_offset_t) pages, npages * sizeof (vm_page_t));
+ return KERN_SUCCESS;
+}
-Index: gnumach/linux/dev/drivers/block/genhd.c
-===================================================================
---- gnumach.orig/linux/dev/drivers/block/genhd.c
-+++ gnumach/linux/dev/drivers/block/genhd.c
-@@ -812,7 +812,9 @@ void device_setup(void)
- #ifdef MACH
- linux_intr_pri = SPL6;
- #endif
-- net_dev_init();
-+ extern char *kernel_cmdline;
-+ if (!strstr(kernel_cmdline, " nonetdev"))
-+ net_dev_init();
- #endif
- #ifndef MACH
- console_map_init();
-Index: gnumach/kern/ipc_kobject.c
-===================================================================
---- gnumach.orig/kern/ipc_kobject.c
-+++ gnumach/kern/ipc_kobject.c
-@@ -56,6 +56,7 @@
- #include <device/device_pager.server.h>
- #include <kern/mach4.server.h>
- #include <kern/gnumach.server.h>
-+#include <kern/experimental.server.h>
-
- #if MACH_DEBUG
- #include <kern/mach_debug.server.h>
-@@ -159,6 +160,7 @@ ipc_kobject_server(request)
- * to perform the kernel function
- */
- {
-+ extern mig_routine_t experimental_server_routine();
- check_simple_locks();
- if ((routine = mach_server_routine(&request->ikm_header)) != 0
- || (routine = mach_port_server_routine(&request->ikm_header)) != 0
-@@ -170,6 +172,7 @@ ipc_kobject_server(request)
- #endif /* MACH_DEBUG */
- || (routine = mach4_server_routine(&request->ikm_header)) != 0
- || (routine = gnumach_server_routine(&request->ikm_header)) != 0
-+ || (routine = experimental_server_routine(&request->ikm_header)) != 0
- #if MACH_MACHINE_ROUTINES
- || (routine = MACHINE_SERVER_ROUTINE(&request->ikm_header)) != 0
- #endif /* MACH_MACHINE_ROUTINES */