summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-03-20 11:31:36 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:36 +0200
commitec9defc2912e86a7e682ec6e37aac102fa69d94d (patch)
treed8ef07ee8146566139505f5236b3fb0eb273ab2f
parentb80e893edaa066af2a0c5c725c0c394e7c7c20e0 (diff)
2006-03-20 Thomas Schwinge <tschwinge@gnu.org>
* DEVELOPMENT: Document the NORMA removal. 2006-03-20 Leonardo Lopes Pereira <leonardolopespereira@gmail.com> Remove unused and unsupported code. Consult the file `DEVELOPMENT' for details. [patch #4982] * bogus/norma_device.h: Remove file. * bogus/norma_ether.h: Likewise. * bogus/norma_ipc.h: Likewise. * bogus/norma_task.h: Likewise. * bogus/norma_vm.h: Likewise. * include/mach/mach_norma.defs: Likewise. * include/mach/norma_task.defs: Likewise. * include/mach/norma_special_ports.h: Likewise. * Makefile.in (bogus-files): Remove `norma_device.h', `norma_ether.h', `norma_ipc.h', `norma_task.h' and `norma_vm.h'. (mach-headers): Remove `mach_norma.defs', `norma_task.defs' and `norma_special_ports.h'. * device/ds_routines.c: Don't include <norma_device.h> anymore and adopt all users of NORMA_DEVICE as if it were always defined to `0'. * device/net_io.c: Likewise for <norma_ether.h>, NORMA_ETHER. * kern/machine.c: Likewise. * ddb/db_command.c: Likevise for <norma_ipc.h>, NORMA_IPC. * ipc/ipc_init.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_port.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/mach_msg.c: Likewise. * kern/ast.c: Likewise. * kern/debug.c: Likewise. * kern/exception.c: Likewise. * kern/startup.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_map.c: Likewise. * kern/ipc_kobject.c: Likewise for <norma_task.h>, NORMA_TASK. * kern/task.c: Likewise. * kern/task.h: Likewise. * ddb/db_command.c: Likewise for <norma_vm.h>, NORMA_VM. * device/dev_pager.c: Likewise. * include/mach/mach_types.defs: Likewise. * include/mach/mach_types.h: Likewise. * include/mach/memory_object_default.defs: Likewise. * include/mach/memory_object.defs: Likewise. * ipc/ipc_kmsg.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/startup.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise.
-rw-r--r--ChangeLog66
-rw-r--r--DEVELOPMENT5
-rw-r--r--Makefile.in9
-rw-r--r--bogus/norma_device.h1
-rw-r--r--bogus/norma_ether.h1
-rw-r--r--bogus/norma_ipc.h1
-rw-r--r--bogus/norma_task.h1
-rw-r--r--bogus/norma_vm.h1
-rw-r--r--ddb/db_command.c30
-rw-r--r--device/dev_pager.c5
-rw-r--r--device/ds_routines.c38
-rw-r--r--device/net_io.c11
-rw-r--r--include/mach/mach_norma.defs120
-rw-r--r--include/mach/mach_types.defs5
-rw-r--r--include/mach/mach_types.h5
-rw-r--r--include/mach/memory_object.defs7
-rw-r--r--include/mach/memory_object_default.defs7
-rw-r--r--include/mach/norma_special_ports.h84
-rw-r--r--include/mach/norma_task.defs43
-rw-r--r--ipc/ipc_init.c5
-rw-r--r--ipc/ipc_kmsg.c75
-rw-r--r--ipc/ipc_kmsg.h10
-rw-r--r--ipc/ipc_mqueue.c65
-rw-r--r--ipc/ipc_notify.c7
-rw-r--r--ipc/ipc_port.c61
-rw-r--r--ipc/ipc_port.h37
-rw-r--r--ipc/ipc_space.c4
-rw-r--r--ipc/ipc_space.h4
-rw-r--r--ipc/mach_msg.c44
-rw-r--r--kern/ast.c6
-rw-r--r--kern/debug.c7
-rw-r--r--kern/exception.c4
-rw-r--r--kern/ipc_kobject.c30
-rw-r--r--kern/ipc_mig.c118
-rw-r--r--kern/machine.c7
-rw-r--r--kern/startup.c17
-rw-r--r--kern/task.c17
-rw-r--r--kern/task.h5
-rw-r--r--vm/memory_object.c12
-rw-r--r--vm/vm_map.c422
-rw-r--r--vm/vm_object.c64
-rw-r--r--vm/vm_object.h5
-rw-r--r--vm/vm_pageout.c9
43 files changed, 73 insertions, 1402 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a087d6..ac5bd2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,74 @@
+2006-03-20 Thomas Schwinge <tschwinge@gnu.org>
+
+ * DEVELOPMENT: Document the NORMA removal.
+
+2006-03-20 Leonardo Lopes Pereira <leonardolopespereira@gmail.com>
+
+ Remove unused and unsupported code. Consult the file `DEVELOPMENT'
+ for details.
+
+ [patch #4982]
+ * bogus/norma_device.h: Remove file.
+ * bogus/norma_ether.h: Likewise.
+ * bogus/norma_ipc.h: Likewise.
+ * bogus/norma_task.h: Likewise.
+ * bogus/norma_vm.h: Likewise.
+ * include/mach/mach_norma.defs: Likewise.
+ * include/mach/norma_task.defs: Likewise.
+ * include/mach/norma_special_ports.h: Likewise.
+ * Makefile.in (bogus-files): Remove `norma_device.h', `norma_ether.h',
+ `norma_ipc.h', `norma_task.h' and `norma_vm.h'.
+ (mach-headers): Remove `mach_norma.defs', `norma_task.defs' and
+ `norma_special_ports.h'.
+ * device/ds_routines.c: Don't include <norma_device.h> anymore and
+ adopt all users of NORMA_DEVICE as if it were always defined to `0'.
+ * device/net_io.c: Likewise for <norma_ether.h>, NORMA_ETHER.
+ * kern/machine.c: Likewise.
+ * ddb/db_command.c: Likevise for <norma_ipc.h>, NORMA_IPC.
+ * ipc/ipc_init.c: Likewise.
+ * ipc/ipc_kmsg.c: Likewise.
+ * ipc/ipc_kmsg.h: Likewise.
+ * ipc/ipc_mqueue.c: Likewise.
+ * ipc/ipc_notify.c: Likewise.
+ * ipc/ipc_port.c: Likewise.
+ * ipc/ipc_port.h: Likewise.
+ * ipc/ipc_space.c: Likewise.
+ * ipc/ipc_space.h: Likewise.
+ * ipc/mach_msg.c: Likewise.
+ * kern/ast.c: Likewise.
+ * kern/debug.c: Likewise.
+ * kern/exception.c: Likewise.
+ * kern/startup.c: Likewise.
+ * vm/memory_object.c: Likewise.
+ * vm/vm_map.c: Likewise.
+ * kern/ipc_kobject.c: Likewise for <norma_task.h>, NORMA_TASK.
+ * kern/task.c: Likewise.
+ * kern/task.h: Likewise.
+ * ddb/db_command.c: Likewise for <norma_vm.h>, NORMA_VM.
+ * device/dev_pager.c: Likewise.
+ * include/mach/mach_types.defs: Likewise.
+ * include/mach/mach_types.h: Likewise.
+ * include/mach/memory_object_default.defs: Likewise.
+ * include/mach/memory_object.defs: Likewise.
+ * ipc/ipc_kmsg.c: Likewise.
+ * kern/ipc_kobject.c: Likewise.
+ * kern/ipc_mig.c: Likewise.
+ * kern/startup.c: Likewise.
+ * vm/memory_object.c: Likewise.
+ * vm/vm_object.c: Likewise.
+ * vm/vm_object.h: Likewise.
+ * vm/vm_pageout.c: Likewise.
+
2006-03-19 Thomas Schwinge <tschwinge@gnu.org>
* DEVELOPMENT: Document the FIPC removal.
2006-03-19 Leonardo Lopes Pereira <leonardolopespereira@gmail.com>
- Remove unused and unsuported code. Consult the file `DEVELOPMENT'
+ Remove unused and unsupported code. Consult the file `DEVELOPMENT'
for details.
+ [patch #4982]
* ipc/fipc.c: Remove file.
* ipc/fipc.h: Likewise.
* Makefile.in (ipc-cfiles): Remove `fipc.c'.
@@ -29,7 +91,7 @@
2006-03-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
- [ patch #4737 ]
+ [patch #4737]
* i386/i386/iopb.c: Include "vm_param.h".
(io_tss_init): Fix address and limit of user TSS.
diff --git a/DEVELOPMENT b/DEVELOPMENT
index ddebfda..9a13217 100644
--- a/DEVELOPMENT
+++ b/DEVELOPMENT
@@ -8,6 +8,11 @@ unused and unsupported code was removed.
On 2006-03-19, support was removed for FIPC, which only ever was used
within the native Mach NE2000 NIC device driver, see
<URL:http://www.cs.utah.edu/flux/mach4-i386/html/mach4-UK22.html#FIPC>.
+<URL:http://lists.gnu.org/archive/html/bug-hurd/2006-01/msg00162.html>.
+
+Support for NORMA was removed on 2006-03-20.
+<URL:http://lists.gnu.org/archive/html/bug-hurd/2006-03/msg00007.html>.
+
Be sure to check the ChangeLog and have a look at the repository at that
tag's state if you want to work on those parts of GNU Mach.
diff --git a/Makefile.in b/Makefile.in
index fbe1679..aac5c74 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -81,8 +81,7 @@ bogus-files = bootstrap_symbols.h cpus.h fast_tas.h hw_footprint.h \
power_save.h simple_clock.h stat_time.h xpr_debug.h \
$(patsubst %,mach_%.h,assert counters debug fixpri host ipc_compat \
ipc_debug ipc_test kdb ldebug lock_mon machine_routines mp_debug \
- pagemap pcsample ttd vm_debug) \
- $(patsubst %,norma_%.h,device ether ipc task vm)
+ pagemap pcsample ttd vm_debug)
# Generic code for various hardware drivers
chips-files = busses.c busses.h
@@ -184,14 +183,14 @@ device-headers= $(addprefix device/,audio_status.h bpf.h device.defs \
tty_status.h)
mach-headers= $(addprefix mach/, bootstrap.defs default_pager.defs \
default_pager_helper.defs default_pager_types.defs \
- exc.defs mach.defs mach4.defs mach_host.defs mach_norma.defs \
+ exc.defs mach.defs mach4.defs mach_host.defs \
mach_port.defs mach_types.defs memory_object.defs \
- memory_object_default.defs norma_task.defs notify.defs \
+ memory_object_default.defs notify.defs \
std_types.defs \
alert.h boolean.h boot.h default_pager_types.h exception.h \
host_info.h kern_return.h mach_param.h mach_types.h \
machine.h macro_help.h memory_object.h message.h mig_errors.h \
- msg_type.h multiboot.h norma_special_ports.h notify.h \
+ msg_type.h multiboot.h notify.h \
pc_sample.h policy.h port.h processor_info.h \
profil.h profilparam.h rpc.h std_types.h syscall_sw.h \
task_info.h task_special_ports.h thread_info.h \
diff --git a/bogus/norma_device.h b/bogus/norma_device.h
deleted file mode 100644
index c0c948c..0000000
--- a/bogus/norma_device.h
+++ /dev/null
@@ -1 +0,0 @@
-#define NORMA_DEVICE 0
diff --git a/bogus/norma_ether.h b/bogus/norma_ether.h
deleted file mode 100644
index 2d282d4..0000000
--- a/bogus/norma_ether.h
+++ /dev/null
@@ -1 +0,0 @@
-#define NORMA_ETHER 0
diff --git a/bogus/norma_ipc.h b/bogus/norma_ipc.h
deleted file mode 100644
index 54803de..0000000
--- a/bogus/norma_ipc.h
+++ /dev/null
@@ -1 +0,0 @@
-#define NORMA_IPC 0 /* can no longer be turned on */
diff --git a/bogus/norma_task.h b/bogus/norma_task.h
deleted file mode 100644
index 9b453ca..0000000
--- a/bogus/norma_task.h
+++ /dev/null
@@ -1 +0,0 @@
-#define NORMA_TASK 0
diff --git a/bogus/norma_vm.h b/bogus/norma_vm.h
deleted file mode 100644
index 2074cd6..0000000
--- a/bogus/norma_vm.h
+++ /dev/null
@@ -1 +0,0 @@
-#define NORMA_VM 0
diff --git a/ddb/db_command.c b/ddb/db_command.c
index e29e5ff..6a42bc4 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -35,8 +35,6 @@
* Command dispatcher.
*/
#include <cpus.h>
-#include <norma_ipc.h>
-#include <norma_vm.h>
#include <mach/boolean.h>
#include <kern/strings.h>
@@ -310,24 +308,10 @@ extern void ipc_port_print(), ipc_pset_print(), db_show_all_slocks();
extern void ipc_kmsg_print(), ipc_msg_print();
extern void db_show_port_id();
void db_show_help();
-#if NORMA_IPC
-extern void netipc_packet_print(), netipc_pcs_print(), db_show_all_uids();
-extern void db_show_all_proxies(), db_show_all_principals();
-extern void db_show_all_uids_verbose();
-#endif /* NORMA_IPC */
-#if NORMA_VM
-extern void xmm_obj_print(), xmm_reply_print();
-#endif /* NORMA_VM */
struct db_command db_show_all_cmds[] = {
{ "threads", db_show_all_threads, 0, 0 },
{ "slocks", db_show_all_slocks, 0, 0 },
-#if NORMA_IPC
- { "uids", db_show_all_uids, 0, 0 },
- { "proxies", db_show_all_proxies, 0, 0 },
- { "principals", db_show_all_principals, 0, 0 },
- { "vuids", db_show_all_uids_verbose, 0, 0 },
-#endif /* NORMA_IPC */
{ (char *)0 }
};
@@ -348,14 +332,6 @@ struct db_command db_show_cmds[] = {
{ "kmsg", ipc_kmsg_print, 0, 0 },
{ "msg", ipc_msg_print, 0, 0 },
{ "ipc_port", db_show_port_id, 0, 0 },
-#if NORMA_IPC
- { "packet", netipc_packet_print, 0, 0 },
- { "pcs", netipc_pcs_print, 0, 0 },
-#endif /* NORMA_IPC */
-#if NORMA_VM
- { "xmm_obj", xmm_obj_print, 0, 0 },
- { "xmm_reply", xmm_reply_print, 0, 0 },
-#endif /* NORMA_VM */
{ (char *)0, }
};
@@ -447,9 +423,6 @@ db_command_loop()
jmp_buf_t *prev = db_recover;
extern int db_output_line;
extern int db_macro_level;
-#if NORMA_IPC
- extern int _node_self; /* node_self() may not be callable yet */
-#endif /* NORMA_IPC */
/*
* Initialize 'prev' and 'next' to dot.
@@ -468,9 +441,6 @@ db_command_loop()
db_printf("\n");
db_output_line = 0;
db_printf("db%s", (db_default_thread)? "t": "");
-#if NORMA_IPC
- db_printf("%d", _node_self);
-#endif
#if NCPUS > 1
db_printf("{%d}", cpu_number());
#endif
diff --git a/device/dev_pager.c b/device/dev_pager.c
index d37c57b..60e9f95 100644
--- a/device/dev_pager.c
+++ b/device/dev_pager.c
@@ -29,7 +29,6 @@
*
* Device pager.
*/
-#include <norma_vm.h>
#include <mach/boolean.h>
#include <mach/port.h>
@@ -350,11 +349,7 @@ kern_return_t device_pager_data_request(
register vm_object_t object;
vm_offset_t device_map_page(void *,vm_offset_t);
-#if NORMA_VM
- object = vm_object_lookup(pager);
-#else /* NORMA_VM */
object = vm_object_lookup(pager_request);
-#endif /* NORMA_VM */
if (object == VM_OBJECT_NULL) {
(void) r_memory_object_data_error(pager_request,
offset, length,
diff --git a/device/ds_routines.c b/device/ds_routines.c
index 101dd32..1286001 100644
--- a/device/ds_routines.c
+++ b/device/ds_routines.c
@@ -28,8 +28,6 @@
* Date: 3/89
*/
-#include <norma_device.h>
-
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/mig_errors.h>
@@ -128,42 +126,6 @@ ds_device_open(open_port, reply_port, reply_port_type,
return (MIG_NO_REPLY); /* no sense in doing anything */
}
-#if NORMA_DEVICE
- /*
- * Map global device name to <node> + local device name.
- */
- if (name[0] != '<') {
- extern char *dev_forward_name();
-
- name = dev_forward_name(name, namebuf, sizeof(namebuf));
- }
- /*
- * Look for explicit node specifier, e.g., <2>sd0a.
- * If found, then forward request to correct device server.
- * If not found, then remove '<n>' and process locally.
- *
- * XXX should handle send-right reply_port as well as send-once XXX
- */
- if (name[0] == '<') {
- char *n;
- int node = 0;
-
- for (n = &name[1]; *n != '>'; n++) {
- if (*n >= '0' && *n <= '9') {
- node = 10 * node + (*n - '0');
- } else {
- return (D_NO_SUCH_DEVICE);
- }
- }
- if (node == node_self()) {
- name = &n[1]; /* skip trailing '>' */
- } else {
- forward_device_open_send(remote_device(node),
- reply_port, mode, name);
- return (MIG_NO_REPLY);
- }
- }
-#endif /* NORMA_DEVICE */
#endif /* ! i386 */
/*
diff --git a/device/net_io.c b/device/net_io.c
index a98523b..e17c679 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -38,7 +38,6 @@
* It may change a lot real soon. -cmaeda 11 June 1993
*/
-#include <norma_ether.h>
#include <mach_ttd.h>
#include <sys/types.h>
@@ -62,10 +61,6 @@
#include <kern/sched_prim.h>
#include <kern/thread.h>
-#if NORMA_ETHER
-#include <norma/ipc_ether.h>
-#endif /*NORMA_ETHER*/
-
#include <machine/machspl.h>
#if MACH_TTD
@@ -647,12 +642,6 @@ net_packet(ifp, kmsg, count, priority)
{
boolean_t awake;
-#if NORMA_ETHER
- if (netipc_net_packet(kmsg, count)) {
- return;
- }
-#endif /* NORMA_ETHER */
-
#if MACH_TTD
/*
* Do a quick check to see if it is a kernel TTD packet.
diff --git a/include/mach/mach_norma.defs b/include/mach/mach_norma.defs
deleted file mode 100644
index 01b3872..0000000
--- a/include/mach/mach_norma.defs
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-subsystem
-#if KERNEL_USER
- KernelUser
-#endif
-#if KERNEL_SERVER
- KernelServer
-#endif
- mach_norma 555000;
-#ifdef KERNEL_USER
-userprefix r_;
-#endif
-
-#include <mach/std_types.defs>
-#include <mach/mach_types.defs>
-
-skip;
-
-/*
- * Specify a node upon which children tasks will be created.
- * This call exists only to allow testing with unmodified servers.
- * Server developers should use norma_task_create instead.
- */
-routine task_set_child_node(
- target_task : task_t;
- child_node : int);
-
-/*
- * THIS CALL WILL BE ELIMINATED.
- * Use norma_port_location_hint(,mach_task_self(),) instead.
- */
-routine norma_node_self(
- host : host_t;
- out node : int);
-
-skip;
-
-skip;
-
-skip;
-
-/*
- * (Used to be called task_create_remote.)
- * Create a task on the given node, possibly inheriting memory.
- * Same inheritance semantics as task_create, including inheritance
- * of initial ports and emulation library.
- * Setting child_node to node_self forces local task creation.
- */
-routine norma_task_create(
- target_task : task_t;
- inherit_memory : boolean_t;
- child_node : int;
- out child_task : task_t);
-
-/*
- * Get a given special port for a given node.
- * Norma special ports are defined in norma_special_ports.h;
- * examples include the master device port.
- * There are a limited number of slots available for system servers.
- *
- * XXX MAX_SPECIAL_ID should be defined in norma_special_ports.h,
- * XXX not just in norma/ipc_special.c!
- * (MAX_SPECIAL_ID specifies total number of slots available)
- */
-routine norma_get_special_port(
- host_priv : host_priv_t;
- node : int;
- which : int;
- out port : mach_port_t);
-
-/*
- * Set a given special port for a given node.
- * See norma_get_special_port.
- */
-routine norma_set_special_port(
- host_priv : host_priv_t;
- which : int;
- port : mach_port_t);
-
-skip;
-
-skip;
-
-skip;
-
-/*
- * Return best guess of port's current location.
- * Guaranteed to be a node where the port once was.
- * Guaranteed to be accurate if port has never moved.
- * Can be used to determine residence node for hosts, tasks, threads, etc.
- */
-routine norma_port_location_hint(
- task : task_t;
- port : mach_port_t;
- out node : int);
diff --git a/include/mach/mach_types.defs b/include/mach/mach_types.defs
index 6952272..53c2529 100644
--- a/include/mach/mach_types.defs
+++ b/include/mach/mach_types.defs
@@ -48,7 +48,6 @@
#include <mach/std_types.defs>
#if KERNEL_SERVER
-#include <norma_vm.h>
#endif /* KERNEL_SERVER */
type mach_port_status_t = struct[9] of integer_t;
@@ -134,11 +133,7 @@ type memory_object_t = mach_port_t
type memory_object_control_t = mach_port_t
ctype: mach_port_t
#if KERNEL_SERVER
-#if NORMA_VM
- intran: mach_xmm_obj_t xmm_kobj_lookup(mach_port_t)
-#else /* NORMA_VM */
intran: vm_object_t vm_object_lookup(mach_port_t)
-#endif /* NORMA_VM */
#endif /* KERNEL_SERVER */
;
diff --git a/include/mach/mach_types.h b/include/mach/mach_types.h
index 1fa3292..f6ceac3 100644
--- a/include/mach/mach_types.h
+++ b/include/mach/mach_types.h
@@ -61,11 +61,6 @@
processor_set_name_array_t */
#include <kern/syscall_emulation.h>
/* for emulation_vector_t */
-#include <norma_vm.h>
-#if NORMA_VM
-typedef struct xmm_obj *mach_xmm_obj_t;
-extern mach_xmm_obj_t xmm_kobj_lookup();
-#endif /* NORMA_VM */
#else /* MACH_KERNEL */
typedef mach_port_t task_t;
typedef task_t *task_array_t;
diff --git a/include/mach/memory_object.defs b/include/mach/memory_object.defs
index 198b70c..ea7989a 100644
--- a/include/mach/memory_object.defs
+++ b/include/mach/memory_object.defs
@@ -39,13 +39,6 @@ subsystem
#endif /* KERNEL_SERVER */
memory_object 2200;
-#ifdef KERNEL
-#include <norma_vm.h>
-#if NORMA_VM
-userprefix k_;
-#endif /* NORMA_VM */
-#endif /* KERNEL */
-
#include <mach/std_types.defs>
#include <mach/mach_types.defs>
diff --git a/include/mach/memory_object_default.defs b/include/mach/memory_object_default.defs
index d39fa9a..0eac271 100644
--- a/include/mach/memory_object_default.defs
+++ b/include/mach/memory_object_default.defs
@@ -37,13 +37,6 @@ subsystem
#endif /* KERNEL_USER */
memory_object_default 2250;
-#ifdef MACH_KERNEL
-#include <norma_vm.h>
-#if NORMA_VM
-userprefix k_;
-#endif /* NORMA_VM */
-#endif /* MACH_KERNEL */
-
#include <mach/std_types.defs>
#include <mach/mach_types.defs>
diff --git a/include/mach/norma_special_ports.h b/include/mach/norma_special_ports.h
deleted file mode 100644
index e911467..0000000
--- a/include/mach/norma_special_ports.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-/*
- * File: mach/norma_special_ports.h
- *
- * Defines codes for remote access to special ports. These are NOT
- * port identifiers - they are only used for the norma_get_special_port
- * and norma_set_special_port routines.
- */
-
-#ifndef _MACH_NORMA_SPECIAL_PORTS_H_
-#define _MACH_NORMA_SPECIAL_PORTS_H_
-
-#define MAX_SPECIAL_KERNEL_ID 3
-#define MAX_SPECIAL_ID 32
-
-/*
- * Provided by kernel
- */
-#define NORMA_DEVICE_PORT 1
-#define NORMA_HOST_PORT 2
-#define NORMA_HOST_PRIV_PORT 3
-
-/*
- * Not provided by kernel
- */
-#define NORMA_NAMESERVER_PORT (1 + MAX_SPECIAL_KERNEL_ID)
-
-/*
- * Definitions for ease of use.
- *
- * In the get call, the host parameter can be any host, but will generally
- * be the local node host port. In the set call, the host must the per-node
- * host port for the node being affected.
- */
-
-#define norma_get_device_port(host, node, port) \
- (norma_get_special_port((host), (node), NORMA_DEVICE_PORT, (port)))
-
-#define norma_set_device_port(host, port) \
- (norma_set_special_port((host), NORMA_DEVICE_PORT, (port)))
-
-#define norma_get_host_port(host, node, port) \
- (norma_get_special_port((host), (node), NORMA_HOST_PORT, (port)))
-
-#define norma_set_host_port(host, port) \
- (norma_set_special_port((host), NORMA_HOST_PORT, (port)))
-
-#define norma_get_host_priv_port(host, node, port) \
- (norma_get_special_port((host), (node), NORMA_HOST_PRIV_PORT, (port)))
-
-#define norma_set_host_priv_port(host, port) \
- (norma_set_special_port((host), NORMA_HOST_PRIV_PORT, (port)))
-
-#define norma_get_nameserver_port(host, node, port) \
- (norma_get_special_port((host), (node), NORMA_NAMESERVER_PORT, (port)))
-
-#define norma_set_nameserver_port(host, port) \
- (norma_set_special_port((host), NORMA_NAMESERVER_PORT, (port)))
-
-#endif /* _MACH_NORMA_SPECIAL_PORTS_H_ */
diff --git a/include/mach/norma_task.defs b/include/mach/norma_task.defs
deleted file mode 100644
index 1ae5972..0000000
--- a/include/mach/norma_task.defs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-subsystem
-#if KERNEL_USER
- KernelUser
-#endif KERNEL_USER
-#if KERNEL_SERVER
- KernelServer
-#endif KERNEL_SERVER
- norma_task 666000;
-
-#include <mach/std_types.defs>
-#include <mach/mach_types.defs>
-
-routine norma_task_create(
- norma_task_server : mach_port_t;
- target_task : mach_port_t;
- inherit_memory : boolean_t;
- out child_task : mach_port_t);
diff --git a/ipc/ipc_init.c b/ipc/ipc_init.c
index e94705c..561e3a9 100644
--- a/ipc/ipc_init.c
+++ b/ipc/ipc_init.c
@@ -108,11 +108,6 @@ ipc_bootstrap(void)
kr = ipc_space_create_special(&ipc_space_reply);
assert(kr == KERN_SUCCESS);
-#if NORMA_IPC
- kr = ipc_space_create_special(&ipc_space_remote);
- assert(kr == KERN_SUCCESS);
-#endif /* NORMA_IPC */
-
/* initialize modules with hidden data structures */
ipc_table_init();
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
index 21a3ecf..44b5d82 100644
--- a/ipc/ipc_kmsg.c
+++ b/ipc/ipc_kmsg.c
@@ -36,8 +36,6 @@
#include <cpus.h>
#include <mach_ipc_compat.h>
-#include <norma_ipc.h>
-#include <norma_vm.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
@@ -468,12 +466,6 @@ ipc_kmsg_free(kmsg)
vm_size_t size = kmsg->ikm_size;
switch (size) {
-#if NORMA_IPC
- case IKM_SIZE_NORMA:
- /* return it to the norma ipc code */
- norma_kmsg_put(kmsg);
- break;
-#endif /* NORMA_IPC */
case IKM_SIZE_NETWORK:
/* return it to the network code */
@@ -1393,13 +1385,6 @@ ipc_kmsg_copyin_body(kmsg, space, map)
use_page_lists = ipc_kobject_vm_page_list(ip_kotype((ipc_port_t)dest));
steal_pages = ipc_kobject_vm_page_steal(ip_kotype((ipc_port_t)dest));
-#if NORMA_IPC
- if (IP_NORMA_IS_PROXY((ipc_port_t) dest)) {
- use_page_lists = TRUE;
- steal_pages = TRUE;
- }
-#endif /* NORMA_IPC */
-
saddr = (vm_offset_t) (&kmsg->ikm_header + 1);
eaddr = (vm_offset_t) &kmsg->ikm_header + kmsg->ikm_header.msgh_size;
@@ -2701,53 +2686,6 @@ ipc_kmsg_copyout_dest(kmsg, space)
}
}
-#if NORMA_IPC || NORMA_VM
-/*
- * Routine: ipc_kmsg_copyout_to_kernel
- * Purpose:
- * Copies out the destination and reply ports in the message.
- * Leaves all other rights and memory in the message alone.
- * Conditions:
- * Nothing locked.
- *
- * Derived from ipc_kmsg_copyout_dest.
- * Use by mach_msg_rpc_from_kernel (which used to use copyout_dest).
- * We really do want to save rights and memory.
- */
-
-void
-ipc_kmsg_copyout_to_kernel(kmsg, space)
- ipc_kmsg_t kmsg;
- ipc_space_t space;
-{
- mach_msg_bits_t mbits = kmsg->ikm_header.msgh_bits;
- ipc_object_t dest = (ipc_object_t) kmsg->ikm_header.msgh_remote_port;
- ipc_object_t reply = (ipc_object_t) kmsg->ikm_header.msgh_local_port;
- mach_msg_type_name_t dest_type = MACH_MSGH_BITS_REMOTE(mbits);
- mach_msg_type_name_t reply_type = MACH_MSGH_BITS_LOCAL(mbits);
- mach_port_t dest_name, reply_name;
-
- assert(IO_VALID(dest));
-
- io_lock(dest);
- if (io_active(dest)) {
- ipc_object_copyout_dest(space, dest, dest_type, &dest_name);
- /* dest is unlocked */
- } else {
- io_release(dest);
- io_check_unlock(dest);
- dest_name = MACH_PORT_DEAD;
- }
-
- reply_name = (mach_port_t) reply;
-
- kmsg->ikm_header.msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) |
- MACH_MSGH_BITS(reply_type, dest_type));
- kmsg->ikm_header.msgh_local_port = dest_name;
- kmsg->ikm_header.msgh_remote_port = reply_name;
-}
-#endif /* NORMA_IPC || NORMA_VM */
-
#if MACH_IPC_COMPAT
/*
@@ -2824,13 +2762,6 @@ ipc_kmsg_copyin_compat(kmsg, space, map)
use_page_lists = ipc_kobject_vm_page_list(ip_kotype((ipc_port_t)dest));
steal_pages = ipc_kobject_vm_page_steal(ip_kotype((ipc_port_t)dest));
-#if NORMA_IPC
- if (IP_NORMA_IS_PROXY((ipc_port_t) dest)) {
- use_page_lists = TRUE;
- steal_pages = TRUE;
- }
-#endif /* NORMA_IPC */
-
saddr = (vm_offset_t) (&kmsg->ikm_header + 1);
eaddr = (vm_offset_t) &kmsg->ikm_header + kmsg->ikm_header.msgh_size;
@@ -3309,13 +3240,7 @@ ipc_kmsg_print(kmsg)
kmsg->ikm_prev,
kmsg->ikm_size,
kmsg->ikm_marequest);
-#if NORMA_IPC
- db_printf(",page=0x%x,copy=0x%x\n",
- kmsg->ikm_page,
- kmsg->ikm_copy);
-#else /* NORMA_IPC */
db_printf("\n");
-#endif /* NORMA_IPC */
ipc_msg_print(&kmsg->ikm_header);
}
diff --git a/ipc/ipc_kmsg.h b/ipc/ipc_kmsg.h
index 2ec8c58..77e7c28 100644
--- a/ipc/ipc_kmsg.h
+++ b/ipc/ipc_kmsg.h
@@ -36,7 +36,6 @@
#include <cpus.h>
#include <mach_ipc_compat.h>
-#include <norma_ipc.h>
#include <mach/machine/vm_types.h>
#include <mach/message.h>
@@ -45,10 +44,6 @@
#include <kern/macro_help.h>
#include <kern/kalloc.h>
#include <ipc/ipc_marequest.h>
-#if NORMA_IPC
-#include <vm/vm_page.h>
-#include <vm/vm_map.h>
-#endif /* NORMA_IPC */
/*
* This structure is only the header for a kmsg buffer;
@@ -66,11 +61,6 @@ typedef struct ipc_kmsg {
struct ipc_kmsg *ikm_next, *ikm_prev;
vm_size_t ikm_size;
ipc_marequest_t ikm_marequest;
-#if NORMA_IPC
- vm_page_t ikm_page;
- vm_map_copy_t ikm_copy;
- unsigned long ikm_source_node;
-#endif /* NORMA_IPC */
mach_msg_header_t ikm_header;
} *ipc_kmsg_t;
diff --git a/ipc/ipc_mqueue.c b/ipc/ipc_mqueue.c
index 17af1ff..e0ebc86 100644
--- a/ipc/ipc_mqueue.c
+++ b/ipc/ipc_mqueue.c
@@ -34,8 +34,6 @@
* Functions to manipulate IPC message queues.
*/
-#include <norma_ipc.h>
-
#include <mach/port.h>
#include <mach/message.h>
#include <kern/assert.h>
@@ -53,14 +51,6 @@
-#if NORMA_IPC
-extern ipc_mqueue_t norma_ipc_handoff_mqueue;
-extern ipc_kmsg_t norma_ipc_handoff_msg;
-extern mach_msg_size_t norma_ipc_handoff_max_size;
-extern mach_msg_size_t norma_ipc_handoff_msg_size;
-extern ipc_kmsg_t norma_ipc_kmsg_accept();
-#endif /* NORMA_IPC */
-
/*
* Routine: ipc_mqueue_init
* Purpose:
@@ -212,16 +202,6 @@ ipc_mqueue_send(kmsg, option, time_out)
return MACH_MSG_SUCCESS;
}
-#if NORMA_IPC
- if (IP_NORMA_IS_PROXY(port)) {
- mach_msg_return_t mr;
-
- mr = norma_ipc_send(kmsg);
- ip_unlock(port);
- return mr;
- }
-#endif /* NORMA_IPC */
-
for (;;) {
ipc_thread_t self;
@@ -242,10 +222,6 @@ ipc_mqueue_send(kmsg, option, time_out)
ip_release(port);
ip_check_unlock(port);
kmsg->ikm_header.msgh_remote_port = MACH_PORT_NULL;
-#if NORMA_IPC
- /* XXX until ipc_kmsg_destroy is fixed... */
- norma_ipc_finish_receiving(&kmsg);
-#endif /* NORMA_IPC */
ipc_kmsg_destroy(kmsg);
return MACH_MSG_SUCCESS;
}
@@ -329,10 +305,6 @@ ipc_mqueue_send(kmsg, option, time_out)
/* don't allow the creation of a circular loop */
-#if NORMA_IPC
- /* XXX until ipc_kmsg_destroy is fixed... */
- norma_ipc_finish_receiving(&kmsg);
-#endif /* NORMA_IPC */
ipc_kmsg_destroy(kmsg);
return MACH_MSG_SUCCESS;
}
@@ -370,16 +342,6 @@ ipc_mqueue_send(kmsg, option, time_out)
/* check for a receiver for the message */
-#if NORMA_IPC
- if (mqueue == norma_ipc_handoff_mqueue) {
- norma_ipc_handoff_msg = kmsg;
- if (kmsg->ikm_header.msgh_size <= norma_ipc_handoff_max_size) {
- imq_unlock(mqueue);
- return MACH_MSG_SUCCESS;
- }
- norma_ipc_handoff_msg_size = kmsg->ikm_header.msgh_size;
- }
-#endif /* NORMA_IPC */
for (;;) {
receiver = ipc_thread_queue_first(receivers);
if (receiver == ITH_NULL) {
@@ -572,30 +534,6 @@ ipc_mqueue_receive(
for (;;) {
kmsg = ipc_kmsg_queue_first(kmsgs);
-#if NORMA_IPC
- /*
- * It may be possible to make this work even when a timeout
- * is specified.
- *
- * Netipc_replenish should be moved somewhere else.
- */
- if (kmsg == IKM_NULL && ! (option & MACH_RCV_TIMEOUT)) {
- netipc_replenish(FALSE);
- *kmsgp = IKM_NULL;
- kmsg = norma_ipc_kmsg_accept(mqueue, max_size,
- (mach_msg_size_t *)kmsgp);
- if (kmsg != IKM_NULL) {
- port = (ipc_port_t)
- kmsg->ikm_header.msgh_remote_port;
- seqno = port->ip_seqno++;
- break;
- }
- if (*kmsgp) {
- imq_unlock(mqueue);
- return MACH_RCV_TOO_LARGE;
- }
- }
-#endif /* NORMA_IPC */
if (kmsg != IKM_NULL) {
/* check space requirements */
@@ -745,9 +683,6 @@ ipc_mqueue_receive(
ip_unlock(port);
}
-#if NORMA_IPC
- norma_ipc_finish_receiving(&kmsg);
-#endif /* NORMA_IPC */
*kmsgp = kmsg;
*seqnop = seqno;
return MACH_MSG_SUCCESS;
diff --git a/ipc/ipc_notify.c b/ipc/ipc_notify.c
index e789edf..d10ac99 100644
--- a/ipc/ipc_notify.c
+++ b/ipc/ipc_notify.c
@@ -382,13 +382,6 @@ ipc_notify_no_senders(port, mscount)
ipc_kmsg_t kmsg;
mach_no_senders_notification_t *n;
-#if NORMA_IPC
- if (ip_nsproxyp(port)) {
- assert(mscount == 0);
- norma_ipc_notify_no_senders(ip_nsproxy(port));
- return;
- }
-#endif /* NORMA_IPC */
kmsg = ikm_alloc(sizeof *n);
if (kmsg == IKM_NULL) {
printf("dropped no-senders (0x%08x, %u)\n", port, mscount);
diff --git a/ipc/ipc_port.c b/ipc/ipc_port.c
index 73009b1..262ab5e 100644
--- a/ipc/ipc_port.c
+++ b/ipc/ipc_port.c
@@ -49,9 +49,6 @@
#include <ipc/ipc_thread.h>
#include <ipc/ipc_mqueue.h>
#include <ipc/ipc_notify.h>
-#if NORMA_IPC
-#include <norma/ipc_node.h>
-#endif /* NORMA_IPC */
@@ -492,24 +489,6 @@ ipc_port_init(
port->ip_msgcount = 0;
port->ip_qlimit = MACH_PORT_QLIMIT_DEFAULT;
-#if NORMA_IPC
- port->ip_norma_uid = 0;
- port->ip_norma_dest_node = 0;
- port->ip_norma_stransit = 0;
- port->ip_norma_sotransit = 0;
- port->ip_norma_xmm_object_refs = 0;
- port->ip_norma_is_proxy = FALSE;
- port->ip_norma_is_special = FALSE;
- port->ip_norma_atrium = IP_NULL;
- port->ip_norma_queue_next = port;
- port->ip_norma_xmm_object = IP_NULL;
- port->ip_norma_next = port;
- port->ip_norma_spare1 = 0L;
- port->ip_norma_spare2 = 0L;
- port->ip_norma_spare3 = 0L;
- port->ip_norma_spare4 = 0L;
-#endif /* NORMA_IPC */
-
ipc_mqueue_init(&port->ip_messages);
ipc_thread_queue_init(&port->ip_blocked);
}
@@ -725,13 +704,6 @@ ipc_port_destroy(
/* fall through and destroy the port */
}
-#if NORMA_IPC
- /*
- * destroy any NORMA_IPC state associated with port
- */
- norma_ipc_port_destroy(port);
-#endif /* NORMA_IPC */
-
/*
* rouse all blocked senders
*
@@ -1240,14 +1212,6 @@ ipc_port_t
ipc_port_alloc_special(space)
ipc_space_t space;
{
-#if NORMA_IPC
-#if i386
- int ret = (&ret)[2]; /* where we were called from */
-#else
- int ret = (int) ipc_port_alloc_special;
-#endif
- extern int input_msgh_id;
-#endif /* NORMA_IPC */
ipc_port_t port;
port = (ipc_port_t) io_alloc(IOT_PORT);
@@ -1271,10 +1235,6 @@ ipc_port_alloc_special(space)
ipc_port_init(port, space, (mach_port_t)port);
-#if NORMA_IPC
- port->ip_norma_spare1 = ret;
- port->ip_norma_spare2 = input_msgh_id;
-#endif /* NORMA_IPC */
return port;
}
@@ -1518,27 +1478,6 @@ ipc_port_print(port)
printf(", sndrs=0x%x", port->ip_blocked.ithq_base);
printf(", kobj=0x%x\n", port->ip_kobject);
-#if NORMA_IPC
- iprintf("norma_uid=%x", port->ip_norma_uid);
- printf(", dest_node=%d", port->ip_norma_dest_node);
- printf(", stransit=%d", port->ip_norma_stransit);
- printf(", xorefs=%d", port->ip_norma_xmm_object_refs);
- printf(", sotransit=%d\n", port->ip_norma_sotransit);
-
- iprintf("norma_is_proxy=%d", port->ip_norma_is_proxy);
- printf(", is_special=%d\n", port->ip_norma_is_special);
-
- iprintf("norma_atrium=0x%x", port->ip_norma_atrium);
- printf(", queue_next=0x%x", port->ip_norma_queue_next);
- printf(", xmm_object=0x%x", port->ip_norma_xmm_object);
- printf(", next=0x%x\n", port->ip_norma_next);
-
- iprintf("norma_spare1=0x%x", port->ip_norma_spare1);
- printf(", norma_spare2=0x%x", port->ip_norma_spare2);
- printf(", norma_spare3=0x%x", port->ip_norma_spare3);
- printf(", norma_spare4=0x%x\n", port->ip_norma_spare4);
-#endif /* NORMA_IPC */
-
indent -=2;
}
diff --git a/ipc/ipc_port.h b/ipc/ipc_port.h
index 6b6fac0..6707268 100644
--- a/ipc/ipc_port.h
+++ b/ipc/ipc_port.h
@@ -40,7 +40,6 @@
#define _IPC_IPC_PORT_H_
#include <mach_ipc_compat.h>
-#include <norma_ipc.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
@@ -99,24 +98,6 @@ struct ipc_port {
mach_port_msgcount_t ip_msgcount;
mach_port_msgcount_t ip_qlimit;
struct ipc_thread_queue ip_blocked;
-
-#if NORMA_IPC
- unsigned long ip_norma_uid;
- unsigned long ip_norma_dest_node;
- long ip_norma_stransit;
- long ip_norma_sotransit;
- long ip_norma_xmm_object_refs;
- boolean_t ip_norma_is_proxy;
- boolean_t ip_norma_is_special;
- struct ipc_port *ip_norma_atrium;
- struct ipc_port *ip_norma_queue_next;
- struct ipc_port *ip_norma_xmm_object;
- struct ipc_port *ip_norma_next;
- long ip_norma_spare1;
- long ip_norma_spare2;
- long ip_norma_spare3;
- long ip_norma_spare4;
-#endif /* NORMA_IPC */
};
#define ip_object ip_target.ipt_object
@@ -386,22 +367,4 @@ ipc_port_copyout_receiver(/* ipc_port_t, ipc_space_t */);
extern void
ipc_port_print(/* ipc_port_t */);
-#if NORMA_IPC
-
-#define IP_NORMA_IS_PROXY(port) ((port)->ip_norma_is_proxy)
-
-/*
- * A proxy never has a real nsrequest, but is always has a fake
- * nsrequest so that the norma ipc system is notified when there
- * are no send rights for a proxy. A fake nsrequest is indicated by
- * the low bit of the pointer. This works because the zone package
- * guarantees that the two low bits of port pointers are zero.
- */
-
-#define ip_nsproxyp(nsrequest) ((unsigned int)(nsrequest) & 1)
-#define ip_nsproxy(nsrequest) ((ipc_port_t)((unsigned int)(nsrequest) &~ 1))
-#define ip_nsproxym(proxy) ((ipc_port_t)((unsigned int)(proxy) | 1))
-
-#endif /* NORMA_IPC */
-
#endif /* _IPC_IPC_PORT_H_ */
diff --git a/ipc/ipc_space.c b/ipc/ipc_space.c
index cd40b58..bbe8a2f 100644
--- a/ipc/ipc_space.c
+++ b/ipc/ipc_space.c
@@ -37,7 +37,6 @@
*/
#include <mach_ipc_compat.h>
-#include <norma_ipc.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
@@ -59,9 +58,6 @@
zone_t ipc_space_zone;
ipc_space_t ipc_space_kernel;
ipc_space_t ipc_space_reply;
-#if NORMA_IPC
-ipc_space_t ipc_space_remote;
-#endif /* NORMA_IPC */
/*
* Routine: ipc_space_reference
diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h
index e242911..14f2404 100644
--- a/ipc/ipc_space.h
+++ b/ipc/ipc_space.h
@@ -40,7 +40,6 @@
#define _IPC_IPC_SPACE_H_
#include <mach_ipc_compat.h>
-#include <norma_ipc.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
@@ -94,9 +93,6 @@ extern zone_t ipc_space_zone;
extern struct ipc_space *ipc_space_kernel;
extern struct ipc_space *ipc_space_reply;
-#if NORMA_IPC
-extern struct ipc_space *ipc_space_remote;
-#endif /* NORMA_IPC */
#define is_ref_lock_init(is) simple_lock_init(&(is)->is_ref_lock_data)
diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c
index ab132af..2ae250c 100644
--- a/ipc/mach_msg.c
+++ b/ipc/mach_msg.c
@@ -37,7 +37,6 @@
*/
#include <mach_ipc_compat.h>
-#include <norma_ipc.h>
#include <mach/kern_return.h>
#include <mach/port.h>
@@ -635,14 +634,6 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
goto kernel_send;
}
-#if NORMA_IPC
- if (IP_NORMA_IS_PROXY(dest_port)) {
- ip_unlock(dest_port);
- ip_unlock(reply_port);
- goto norma_send;
- }
-#endif /* NORMA_IPC */
-
if (dest_port->ip_msgcount >= dest_port->ip_qlimit)
goto abort_request_send_receive;
@@ -754,13 +745,6 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
/* make sure we can queue to the destination */
assert(dest_port->ip_receiver != ipc_space_kernel);
-#if NORMA_IPC
- if (IP_NORMA_IS_PROXY(dest_port)) {
- is_write_unlock(space);
- ip_unlock(dest_port);
- goto norma_send;
- }
-#endif /* NORMA_IPC */
/* optimized ipc_entry_lookup/ipc_mqueue_copyin */
@@ -859,9 +843,6 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
assert(ip_active(dest_port));
assert(dest_port->ip_receiver != ipc_space_kernel);
-#if NORMA_IPC
- assert(! IP_NORMA_IS_PROXY(dest_port));
-#endif /* NORMA_IPC */
assert((dest_port->ip_msgcount < dest_port->ip_qlimit) ||
(MACH_MSGH_BITS_REMOTE(kmsg->ikm_header.msgh_bits) ==
MACH_MSG_TYPE_PORT_SEND_ONCE));
@@ -1341,9 +1322,6 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
}
if (ip_active(dest_port) &&
-#if NORMA_IPC
- (! IP_NORMA_IS_PROXY(dest_port)) &&
-#endif /* NORMA_IPC */
((dest_port->ip_msgcount < dest_port->ip_qlimit) ||
(MACH_MSGH_BITS_REMOTE(kmsg->ikm_header.msgh_bits) ==
MACH_MSG_TYPE_PORT_SEND_ONCE)))
@@ -1380,28 +1358,6 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
ip_unlock(dest_port);
goto slow_send;
-#if NORMA_IPC
- norma_send:
- /*
- * Nothing is locked. We have acquired kmsg, but
- * we still need to send it and receive a reply.
- */
-
- mr = norma_ipc_send(kmsg);
- if (mr != MACH_MSG_SUCCESS) {
- mr |= ipc_kmsg_copyout_pseudo(kmsg, space,
- current_map());
-
- assert(kmsg->ikm_marequest == IMAR_NULL);
- (void) ipc_kmsg_put(msg, kmsg,
- kmsg->ikm_header.msgh_size);
- thread_syscall_return(mr);
- /*NOTREACHED*/
- }
-
- goto slow_get_rcv_port;
-#endif /* NORMA_IPC */
-
kernel_send:
/*
* Special case: send message to kernel services.
diff --git a/kern/ast.c b/kern/ast.c
index 9b3a9bd..9498ce7 100644
--- a/kern/ast.c
+++ b/kern/ast.c
@@ -37,7 +37,6 @@
#include <cpus.h>
#include <mach_fixpri.h>
-#include <norma_ipc.h>
#include <kern/ast.h>
#include <kern/counters.h>
@@ -90,11 +89,6 @@ ast_taken()
if (reasons & AST_NETWORK)
net_ast();
-#if NORMA_IPC
- if (reasons & AST_NETIPC)
- netipc_ast();
-#endif /* NORMA_IPC */
-
/*
* Make darn sure that we don't call thread_halt_self
* or thread_block from the idle thread.
diff --git a/kern/debug.c b/kern/debug.c
index 2ba15fe..3827e8f 100644
--- a/kern/debug.c
+++ b/kern/debug.c
@@ -27,7 +27,6 @@
#include <stdarg.h>
#include <mach_kdb.h>
-#include <norma_ipc.h>
#include <cpus.h>
#include "cpu_number.h"
@@ -126,9 +125,6 @@ void
panic(const char *s, ...)
{
va_list listp;
-#if NORMA_IPC
- extern int _node_self; /* node_self() may not be callable yet */
-#endif /* NORMA_IPC */
panic_init();
@@ -146,9 +142,6 @@ panic(const char *s, ...)
}
simple_unlock(&panic_lock);
printf("panic");
-#if NORMA_IPC
- printf("(node %U)", _node_self);
-#endif
#if NCPUS > 1
printf("(cpu %U)", paniccpu);
#endif
diff --git a/kern/exception.c b/kern/exception.c
index 6820bbf..e8b9c0e 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -24,7 +24,6 @@
* the rights to redistribute these changes.
*/
-#include <norma_ipc.h>
#include <mach_kdb.h>
#include <mach/boolean.h>
@@ -420,9 +419,6 @@ exception_raise(dest_port, thread_port, task_port,
}
if (!ip_active(dest_port) ||
-#if NORMA_IPC
- IP_NORMA_IS_PROXY(dest_port) ||
-#endif /* NORMA_IPC */
(dest_port->ip_receiver == ipc_space_kernel)) {
imq_unlock(reply_mqueue);
ip_unlock(dest_port);
diff --git a/kern/ipc_kobject.c b/kern/ipc_kobject.c
index 5c6e011..60db89c 100644
--- a/kern/ipc_kobject.c
+++ b/kern/ipc_kobject.c
@@ -36,8 +36,6 @@
#include <mach_debug.h>
#include <mach_ipc_test.h>
#include <mach_machine_routines.h>
-#include <norma_task.h>
-#include <norma_vm.h>
#include <mach/port.h>
#include <mach/kern_return.h>
@@ -156,13 +154,6 @@ ipc_kobject_server(request)
#if MACH_DEBUG
extern mig_routine_t mach_debug_server_routine();
#endif
-#if NORMA_TASK
- extern mig_routine_t mach_norma_server_routine();
- extern mig_routine_t norma_internal_server_routine();
-#endif
-#if NORMA_VM
- extern mig_routine_t proxy_server_routine();
-#endif
#if MACH_MACHINE_ROUTINES
extern mig_routine_t MACHINE_SERVER_ROUTINE();
@@ -177,13 +168,6 @@ ipc_kobject_server(request)
#if MACH_DEBUG
|| (routine = mach_debug_server_routine(&request->ikm_header)) != 0
#endif /* MACH_DEBUG */
-#if NORMA_TASK
- || (routine = mach_norma_server_routine(&request->ikm_header)) != 0
- || (routine = norma_internal_server_routine(&request->ikm_header)) != 0
-#endif /* NORMA_TASK */
-#if NORMA_VM
- || (routine = proxy_server_routine(&request->ikm_header)) != 0
-#endif /* NORMA_VM */
|| (routine = mach4_server_routine(&request->ikm_header)) != 0
#if MACH_MACHINE_ROUTINES
|| (routine = MACHINE_SERVER_ROUTINE(&request->ikm_header)) != 0
@@ -368,20 +352,6 @@ ipc_kobject_notify(request_header, reply_header)
return FALSE;
}
switch (ip_kotype(port)) {
-#if NORMA_VM
- case IKOT_XMM_OBJECT:
- return xmm_object_notify(request_header);
-
- case IKOT_XMM_PAGER:
- return xmm_pager_notify(request_header);
-
- case IKOT_XMM_KERNEL:
- return xmm_kernel_notify(request_header);
-
- case IKOT_XMM_REPLY:
- return xmm_reply_notify(request_header);
-#endif /* NORMA_VM */
-
case IKOT_DEVICE:
return ds_notify(request_header);
diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c
index f90c512..4f45eba 100644
--- a/kern/ipc_mig.c
+++ b/kern/ipc_mig.c
@@ -24,8 +24,6 @@
* the rights to redistribute these changes.
*/
-#include <norma_vm.h>
-
#include <mach/boolean.h>
#include <mach/port.h>
#include <mach/message.h>
@@ -94,122 +92,6 @@ mach_msg_rpc_from_kernel(msg, send_size, reply_size)
panic("mach_msg_rpc_from_kernel"); /*XXX*/
}
-#if NORMA_VM
-/*
- * Routine: mach_msg_rpc_from_kernel
- * Purpose:
- * Send a message from the kernel and receive a reply.
- * Uses ith_rpc_reply for the reply port.
- *
- * This is used by the client side of KernelUser interfaces
- * to implement Routines.
- * Conditions:
- * Nothing locked.
- * Returns:
- * MACH_MSG_SUCCESS Sent the message.
- * MACH_RCV_PORT_DIED The reply port was deallocated.
- */
-
-mach_msg_return_t
-mach_msg_rpc_from_kernel(
- mach_msg_header_t *msg,
- mach_msg_size_t send_size,
- mach_msg_size_t rcv_size)
-{
- ipc_thread_t self = current_thread();
- ipc_port_t reply;
- ipc_kmsg_t kmsg;
- mach_port_seqno_t seqno;
- mach_msg_return_t mr;
-
- assert(MACH_PORT_VALID(msg->msgh_remote_port));
- assert(msg->msgh_local_port == MACH_PORT_NULL);
-
- mr = ipc_kmsg_get_from_kernel(msg, send_size, &kmsg);
- if (mr != MACH_MSG_SUCCESS)
- panic("mach_msg_rpc_from_kernel");
-
- ipc_kmsg_copyin_from_kernel(kmsg);
-
- ith_lock(self);
- assert(self->ith_self != IP_NULL);
-
- reply = self->ith_rpc_reply;
- if (reply == IP_NULL) {
- ith_unlock(self);
- reply = ipc_port_alloc_reply();
- ith_lock(self);
- if ((reply == IP_NULL) ||
- (self->ith_rpc_reply != IP_NULL))
- panic("mach_msg_rpc_from_kernel");
- self->ith_rpc_reply = reply;
- }
-
- /* insert send-once right for the reply port */
- kmsg->ikm_header.msgh_local_port =
- (mach_port_t) ipc_port_make_sonce(reply);
-
- ipc_port_reference(reply);
- ith_unlock(self);
-
- ipc_mqueue_send_always(kmsg);
-
- for (;;) {
- ipc_mqueue_t mqueue;
-
- ip_lock(reply);
- if (!ip_active(reply)) {
- ip_unlock(reply);
- ipc_port_release(reply);
- return MACH_RCV_PORT_DIED;
- }
-
- assert(reply->ip_pset == IPS_NULL);
- mqueue = &reply->ip_messages;
- imq_lock(mqueue);
- ip_unlock(reply);
-
- mr = ipc_mqueue_receive(mqueue, MACH_MSG_OPTION_NONE,
- MACH_MSG_SIZE_MAX,
- MACH_MSG_TIMEOUT_NONE,
- FALSE, IMQ_NULL_CONTINUE,
- &kmsg, &seqno);
- /* mqueue is unlocked */
- if (mr == MACH_MSG_SUCCESS)
- break;
-
- assert((mr == MACH_RCV_INTERRUPTED) ||
- (mr == MACH_RCV_PORT_DIED));
-
- while (thread_should_halt(self)) {
- /* don't terminate while holding a reference */
- if (self->ast & AST_TERMINATE)
- ipc_port_release(reply);
- thread_halt_self();
- }
- }
- ipc_port_release(reply);
-
- kmsg->ikm_header.msgh_seqno = seqno;
-
- if (rcv_size < kmsg->ikm_header.msgh_size) {
- ipc_kmsg_copyout_dest(kmsg, ipc_space_reply);
- ipc_kmsg_put_to_kernel(msg, kmsg, kmsg->ikm_header.msgh_size);
- return MACH_RCV_TOO_LARGE;
- }
-
- /*
- * We want to preserve rights and memory in reply!
- * We don't have to put them anywhere; just leave them
- * as they are.
- */
-
- ipc_kmsg_copyout_to_kernel(kmsg, ipc_space_reply);
- ipc_kmsg_put_to_kernel(msg, kmsg, kmsg->ikm_header.msgh_size);
- return MACH_MSG_SUCCESS;
-}
-#endif /* NORMA_VM */
-
/*
* Routine: mach_msg_abort_rpc
* Purpose:
diff --git a/kern/machine.c b/kern/machine.c
index 67bcbbb..5dba1ae 100644
--- a/kern/machine.c
+++ b/kern/machine.c
@@ -34,7 +34,6 @@
* Support for machine independent machine abstraction.
*/
-#include <norma_ether.h>
#include <cpus.h>
#include <mach_host.h>
@@ -747,12 +746,6 @@ host_get_boot_info(priv_host, boot_info)
return KERN_INVALID_HOST;
}
-#if NORMA_ETHER
-{
- extern char *norma_ether_boot_info();
- src = norma_ether_boot_info();
-}
-#endif /* NORMA_ETHER */
#if defined(iPSC386) || defined(iPSC860)
{
extern char *ipsc_boot_environ();
diff --git a/kern/startup.c b/kern/startup.c
index 5a2171e..86d109a 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -31,8 +31,6 @@
#include <xpr_debug.h>
#include <cpus.h>
#include <mach_host.h>
-#include <norma_ipc.h>
-#include <norma_vm.h>
#include <mach/boolean.h>
#include <mach/machine.h>
@@ -226,21 +224,6 @@ void start_kernel_threads()
device_service_create();
/*
- * Initialize NORMA ipc system.
- */
-#if NORMA_IPC
- norma_ipc_init();
-#endif /* NORMA_IPC */
-
- /*
- * Initialize NORMA vm system.
- */
-#if NORMA_VM
- norma_vm_init();
-#endif /* NORMA_VM */
-
-
- /*
* Initialize kernel task's creation time.
* When we created the kernel task in task_init, the mapped
* time was not yet available. Now, last thing before starting
diff --git a/kern/task.c b/kern/task.c
index 59b11ee..d7e6082 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -33,7 +33,6 @@
#include <mach_host.h>
#include <mach_pcsample.h>
-#include <norma_task.h>
#include <fast_tas.h>
#include <mach/machine/vm_types.h>
@@ -53,10 +52,6 @@
#include <vm/vm_kern.h> /* for kernel_map, ipc_kernel_map */
#include <machine/machspl.h> /* for splsched */
-#if NORMA_TASK
-#define task_create task_create_local
-#endif /* NORMA_TASK */
-
task_t kernel_task = TASK_NULL;
zone_t task_zone;
@@ -200,10 +195,6 @@ kern_return_t task_create(
ipc_task_enable(new_task);
-#if NORMA_TASK
- new_task->child_node = -1;
-#endif /* NORMA_TASK */
-
*child_task = new_task;
return KERN_SUCCESS;
}
@@ -230,14 +221,6 @@ void task_deallocate(
if (c != 0)
return;
-#if NORMA_TASK
- if (task->map == VM_MAP_NULL) {
- /* norma placeholder task */
- zfree(task_zone, (vm_offset_t) task);
- return;
- }
-#endif /* NORMA_TASK */
-
eml_task_deallocate(task);
pset = task->processor_set;
diff --git a/kern/task.h b/kern/task.h
index f4feb7f..a3f4302 100644
--- a/kern/task.h
+++ b/kern/task.h
@@ -34,7 +34,6 @@
#ifndef _KERN_TASK_H_
#define _KERN_TASK_H_
-#include <norma_task.h>
#include <fast_tas.h>
#include <mach/boolean.h>
@@ -96,10 +95,6 @@ struct task {
sample_control_t pc_sample;
-#if NORMA_TASK
- long child_node; /* if != -1, node for new children */
-#endif /* NORMA_TASK */
-
#if FAST_TAS
#define TASK_FAST_TAS_NRAS 8
vm_offset_t fast_tas_base[TASK_FAST_TAS_NRAS];
diff --git a/vm/memory_object.c b/vm/memory_object.c
index c01b740..16e858a 100644
--- a/vm/memory_object.c
+++ b/vm/memory_object.c
@@ -63,11 +63,6 @@
#include <vm/vm_map.h> /* For vm_map_pageable */
#include <ipc/ipc_port.h>
-#include <norma_vm.h>
-#include <norma_ipc.h>
-#if NORMA_VM
-#include <norma/xmm_server_rename.h>
-#endif /* NORMA_VM */
#include <mach_pagemap.h>
#if MACH_PAGEMAP
#include <vm/vm_external.h>
@@ -86,7 +81,6 @@ decl_simple_lock_data(,memory_manager_default_lock)
* argument conversion. Explicit deallocation is necessary.
*/
-#if !NORMA_VM
/*
* If successful, destroys the map copy object.
*/
@@ -102,7 +96,6 @@ kern_return_t memory_object_data_provided(object, offset, data, data_cnt,
data_cnt, lock_value, FALSE, IP_NULL,
0);
}
-#endif /* !NORMA_VM */
kern_return_t memory_object_data_supply(object, offset, data_copy, data_cnt,
@@ -896,7 +889,6 @@ MACRO_END
return (KERN_SUCCESS);
}
-#if !NORMA_VM
/*
* Old version of memory_object_lock_request.
*/
@@ -924,7 +916,6 @@ xxx_memory_object_lock_request(object, offset, size,
should_return, should_flush, prot,
reply_to, reply_to_type));
}
-#endif /* !NORMA_VM */
kern_return_t
memory_object_set_attributes_common(object, object_ready, may_cache,
@@ -989,8 +980,6 @@ memory_object_set_attributes_common(object, object_ready, may_cache,
return(KERN_SUCCESS);
}
-#if !NORMA_VM
-
/*
* XXX rpd claims that reply_to could be obviated in favor of a client
* XXX stub that made change_attributes an RPC. Need investigation.
@@ -1052,7 +1041,6 @@ kern_return_t memory_object_ready(object, may_cache, copy_strategy)
may_cache, copy_strategy,
FALSE);
}
-#endif /* !NORMA_VM */
kern_return_t memory_object_get_attributes(object, object_ready,
may_cache, copy_strategy)
diff --git a/vm/vm_map.c b/vm/vm_map.c
index c060196..fcd6265 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -34,8 +34,6 @@
* Virtual memory mapping module.
*/
-#include <norma_ipc.h>
-
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/vm_attributes.h>
@@ -1657,67 +1655,6 @@ kern_return_t vm_map_delete(map, start, end)
entry = first_entry->vme_next;
else {
entry = first_entry;
-#if NORMA_IPC_xxx
- /*
- * XXX Had to disable this code because:
-
- _vm_map_delete(c0804b78,c2198000,c219a000,0,c219a000)+df
- [vm/vm_map.c:2007]
- _vm_map_remove(c0804b78,c2198000,c219a000,c0817834,
- c081786c)+42 [vm/vm_map.c:2094]
- _kmem_io_map_deallocate(c0804b78,c2198000,2000,c0817834,
- c081786c)+43 [vm/vm_kern.c:818]
- _device_write_dealloc(c081786c)+117 [device/ds_routines.c:814]
- _ds_write_done(c081786c,0)+2e [device/ds_routines.c:848]
- _io_done_thread_continue(c08150c0,c21d4e14,c21d4e30,c08150c0,
- c080c114)+14 [device/ds_routines.c:1350]
-
- */
- if (start > entry->vme_start
- && end == entry->vme_end
- && ! entry->wired_count /* XXX ??? */
- && ! entry->is_shared
- && ! entry->projected_on
- && ! entry->is_sub_map) {
- extern vm_object_t kernel_object;
- register vm_object_t object = entry->object.vm_object;
-
- /*
- * The region to be deleted lives at the end
- * of this entry, and thus all we have to do is
- * truncate the entry.
- *
- * This special case is necessary if we want
- * coalescing to do us any good.
- *
- * XXX Do we have to adjust object size?
- */
- if (object == kernel_object) {
- vm_object_lock(object);
- vm_object_page_remove(object,
- entry->offset + start,
- entry->offset +
- (end - start));
- vm_object_unlock(object);
- } else if (entry->is_shared) {
- vm_object_pmap_remove(object,
- entry->offset + start,
- entry->offset +
- (end - start));
- } else {
- pmap_remove(map->pmap, start, end);
- }
- object->size -= (end - start); /* XXX */
-
- entry->vme_end = start;
- map->size -= (end - start);
-
- if (map->wait_for_space) {
- thread_wakeup((event_t) map);
- }
- return KERN_SUCCESS;
- }
-#endif /* NORMA_IPC */
vm_map_clip_start(map, entry, start);
/*
@@ -2109,11 +2046,7 @@ kern_return_t vm_map_copy_overwrite(dst_map, dst_addr, copy, interruptible)
* support page lists LATER.
*/
-#if NORMA_IPC
- vm_map_convert_from_page_list(copy);
-#else
assert(copy->type == VM_MAP_COPY_ENTRY_LIST);
-#endif
/*
* Currently this routine only handles page-aligned
@@ -4887,358 +4820,3 @@ void vm_map_copy_print(copy)
indent -=2;
}
#endif /* MACH_KDB */
-
-#if NORMA_IPC
-/*
- * This should one day be eliminated;
- * we should always construct the right flavor of copy object
- * the first time. Troublesome areas include vm_read, where vm_map_copyin
- * is called without knowing whom the copy object is for.
- * There are also situations where we do want a lazy data structure
- * even if we are sending to a remote port...
- */
-
-/*
- * Convert a copy to a page list. The copy argument is in/out
- * because we probably have to allocate a new vm_map_copy structure.
- * We take responsibility for discarding the old structure and
- * use a continuation to do so. Postponing this discard ensures
- * that the objects containing the pages we've marked busy will stick
- * around.
- */
-kern_return_t
-vm_map_convert_to_page_list(caller_copy)
- vm_map_copy_t *caller_copy;
-{
- vm_map_entry_t entry, next_entry;
- vm_offset_t va;
- vm_offset_t offset;
- vm_object_t object;
- kern_return_t result;
- vm_map_copy_t copy, new_copy;
- int i, num_pages = 0;
-
- zone_t entry_zone;
-
- copy = *caller_copy;
-
- /*
- * We may not have to do anything,
- * or may not be able to do anything.
- */
- if (copy == VM_MAP_COPY_NULL || copy->type == VM_MAP_COPY_PAGE_LIST) {
- return KERN_SUCCESS;
- }
- if (copy->type == VM_MAP_COPY_OBJECT) {
- return vm_map_convert_to_page_list_from_object(caller_copy);
- }
- if (copy->type != VM_MAP_COPY_ENTRY_LIST) {
- panic("vm_map_convert_to_page_list: copy type %d!\n",
- copy->type);
- }
-
- /*
- * Allocate the new copy. Set its continuation to
- * discard the old one.
- */
- new_copy = (vm_map_copy_t) zalloc(vm_map_copy_zone);
- new_copy->type = VM_MAP_COPY_PAGE_LIST;
- new_copy->cpy_npages = 0;
- new_copy->offset = copy->offset;
- new_copy->size = copy->size;
- new_copy->cpy_cont = vm_map_copy_discard_cont;
- new_copy->cpy_cont_args = (char *) copy;
-
- /*
- * Iterate over entries.
- */
- for (entry = vm_map_copy_first_entry(copy);
- entry != vm_map_copy_to_entry(copy);
- entry = entry->vme_next) {
-
- object = entry->object.vm_object;
- offset = entry->offset;
- /*
- * Iterate over pages.
- */
- for (va = entry->vme_start;
- va < entry->vme_end;
- va += PAGE_SIZE, offset += PAGE_SIZE) {
-
- vm_page_t m;
-
- if (new_copy->cpy_npages == VM_MAP_COPY_PAGE_LIST_MAX) {
- /*
- * What a mess. We need a continuation
- * to do the page list, but also one
- * to discard the old copy. The right
- * thing to do is probably to copy
- * out the old copy into the kernel
- * map (or some temporary task holding
- * map if we're paranoid about large
- * copies), and then copyin the page
- * list that we really wanted with
- * src_destroy. LATER.
- */
- panic("vm_map_convert_to_page_list: num\n");
- }
-
- /*
- * Try to find the page of data.
- */
- vm_object_lock(object);
- vm_object_paging_begin(object);
- if (((m = vm_page_lookup(object, offset)) !=
- VM_PAGE_NULL) && !m->busy && !m->fictitious &&
- !m->absent && !m->error) {
-
- /*
- * This is the page. Mark it busy
- * and keep the paging reference on
- * the object whilst we do our thing.
- */
- m->busy = TRUE;
-
- /*
- * Also write-protect the page, so
- * that the map`s owner cannot change
- * the data. The busy bit will prevent
- * faults on the page from succeeding
- * until the copy is released; after
- * that, the page can be re-entered
- * as writable, since we didn`t alter
- * the map entry. This scheme is a
- * cheap copy-on-write.
- *
- * Don`t forget the protection and
- * the page_lock value!
- */
-
- pmap_page_protect(m->phys_addr,
- entry->protection
- & ~m->page_lock
- & ~VM_PROT_WRITE);
-
- }
- else {
- vm_prot_t result_prot;
- vm_page_t top_page;
- kern_return_t kr;
-
-retry:
- result_prot = VM_PROT_READ;
-
- kr = vm_fault_page(object, offset,
- VM_PROT_READ, FALSE, FALSE,
- &result_prot, &m, &top_page,
- FALSE, (void (*)()) 0);
- if (kr == VM_FAULT_MEMORY_SHORTAGE) {
- VM_PAGE_WAIT((void (*)()) 0);
- vm_object_lock(object);
- vm_object_paging_begin(object);
- goto retry;
- }
- if (kr != VM_FAULT_SUCCESS) {
- /* XXX what about data_error? */
- vm_object_lock(object);
- vm_object_paging_begin(object);
- goto retry;
- }
- if (top_page != VM_PAGE_NULL) {
- vm_object_lock(object);
- VM_PAGE_FREE(top_page);
- vm_object_paging_end(object);
- vm_object_unlock(object);
- }
- }
- assert(m);
- m->busy = TRUE;
- new_copy->cpy_page_list[new_copy->cpy_npages++] = m;
- vm_object_unlock(object);
- }
- }
-
- *caller_copy = new_copy;
- return KERN_SUCCESS;
-}
-
-kern_return_t
-vm_map_convert_to_page_list_from_object(caller_copy)
- vm_map_copy_t *caller_copy;
-{
- vm_object_t object;
- vm_offset_t offset;
- vm_map_copy_t copy, new_copy;
-
- copy = *caller_copy;
- assert(copy->type == VM_MAP_COPY_OBJECT);
- object = copy->cpy_object;
- assert(object->size == round_page(object->size));
-
- /*
- * Allocate the new copy. Set its continuation to
- * discard the old one.
- */
- new_copy = (vm_map_copy_t) zalloc(vm_map_copy_zone);
- new_copy->type = VM_MAP_COPY_PAGE_LIST;
- new_copy->cpy_npages = 0;
- new_copy->offset = copy->offset;
- new_copy->size = copy->size;
- new_copy->cpy_cont = vm_map_copy_discard_cont;
- new_copy->cpy_cont_args = (char *) copy;
-
- /*
- * XXX memory_object_lock_request can probably bust this
- * XXX See continuation comment in previous routine for solution.
- */
- assert(object->size <= VM_MAP_COPY_PAGE_LIST_MAX * PAGE_SIZE);
-
- for (offset = 0; offset < object->size; offset += PAGE_SIZE) {
- vm_page_t m;
-
- /*
- * Try to find the page of data.
- */
- vm_object_lock(object);
- vm_object_paging_begin(object);
- m = vm_page_lookup(object, offset);
- if ((m != VM_PAGE_NULL) && !m->busy && !m->fictitious &&
- !m->absent && !m->error) {
-
- /*
- * This is the page. Mark it busy
- * and keep the paging reference on
- * the object whilst we do our thing.
- */
- m->busy = TRUE;
- }
- else {
- vm_prot_t result_prot;
- vm_page_t top_page;
- kern_return_t kr;
-
-retry:
- result_prot = VM_PROT_READ;
-
- kr = vm_fault_page(object, offset,
- VM_PROT_READ, FALSE, FALSE,
- &result_prot, &m, &top_page,
- FALSE, (void (*)()) 0);
- if (kr == VM_FAULT_MEMORY_SHORTAGE) {
- VM_PAGE_WAIT((void (*)()) 0);
- vm_object_lock(object);
- vm_object_paging_begin(object);
- goto retry;
- }
- if (kr != VM_FAULT_SUCCESS) {
- /* XXX what about data_error? */
- vm_object_lock(object);
- vm_object_paging_begin(object);
- goto retry;
- }
-
- if (top_page != VM_PAGE_NULL) {
- vm_object_lock(object);
- VM_PAGE_FREE(top_page);
- vm_object_paging_end(object);
- vm_object_unlock(object);
- }
- }
- assert(m);
- m->busy = TRUE;
- new_copy->cpy_page_list[new_copy->cpy_npages++] = m;
- vm_object_unlock(object);
- }
-
- *caller_copy = new_copy;
- return (KERN_SUCCESS);
-}
-
-kern_return_t
-vm_map_convert_from_page_list(copy)
- vm_map_copy_t copy;
-{
- vm_object_t object;
- int i;
- vm_map_entry_t new_entry;
- vm_page_t *page_list;
-
- /*
- * Check type of copy object.
- */
- if (copy->type == VM_MAP_COPY_ENTRY_LIST) {
- return KERN_SUCCESS;
- }
- if (copy->type == VM_MAP_COPY_OBJECT) {
- printf("vm_map_convert_from_page_list: COPY_OBJECT?");
- return KERN_SUCCESS;
- }
- if (copy->type != VM_MAP_COPY_PAGE_LIST) {
- panic("vm_map_convert_from_page_list 0x%x %d",
- copy,
- copy->type);
- }
-
- /*
- * Make sure the pages are loose. This may be
- * a "Can't Happen", but just to be safe ...
- */
- page_list = &copy->cpy_page_list[0];
- if ((*page_list)->tabled)
- vm_map_copy_steal_pages(copy);
-
- /*
- * Create object, and stuff pages into it.
- */
- object = vm_object_allocate(copy->cpy_npages);
- for (i = 0; i < copy->cpy_npages; i++) {
- register vm_page_t m = *page_list++;
- vm_page_insert(m, object, i * PAGE_SIZE);
- m->busy = FALSE;
- m->dirty = TRUE;
- vm_page_activate(m);
- }
-
- /*
- * XXX If this page list contained a continuation, then
- * XXX we're screwed. The right thing to do is probably do
- * XXX the copyout, and then copyin the entry list we really
- * XXX wanted.
- */
- if (vm_map_copy_has_cont(copy))
- panic("convert_from_page_list: continuation");
-
- /*
- * Change type of copy object
- */
- vm_map_copy_first_entry(copy) =
- vm_map_copy_last_entry(copy) = vm_map_copy_to_entry(copy);
- copy->type = VM_MAP_COPY_ENTRY_LIST;
- copy->cpy_hdr.nentries = 0;
- copy->cpy_hdr.entries_pageable = TRUE;
-
- /*
- * Allocate and initialize an entry for object
- */
- new_entry = vm_map_copy_entry_create(copy);
- new_entry->vme_start = trunc_page(copy->offset);
- new_entry->vme_end = round_page(copy->offset + copy->size);
- new_entry->object.vm_object = object;
- new_entry->offset = 0;
- new_entry->is_shared = FALSE;
- new_entry->is_sub_map = FALSE;
- new_entry->needs_copy = FALSE;
- new_entry->protection = VM_PROT_DEFAULT;
- new_entry->max_protection = VM_PROT_ALL;
- new_entry->inheritance = VM_INHERIT_DEFAULT;
- new_entry->wired_count = 0;
- new_entry->user_wired_count = 0;
- new_entry->projected_on = 0;
-
- /*
- * Insert entry into copy object, and return.
- */
- vm_map_copy_entry_link(copy, vm_map_copy_last_entry(copy), new_entry);
- return(KERN_SUCCESS);
-}
-#endif /* NORMA_IPC */
diff --git a/vm/vm_object.c b/vm/vm_object.c
index 8b57205..0b57827 100644
--- a/vm/vm_object.c
+++ b/vm/vm_object.c
@@ -33,13 +33,8 @@
* Virtual memory object module.
*/
-#include <norma_vm.h>
#include <mach_pagemap.h>
-#if NORMA_VM
-#include <norma/xmm_server_rename.h>
-#endif /* NORMA_VM */
-
#include <mach/memory_object.h>
#include "memory_object_default.h"
#include "memory_object_user.h"
@@ -231,13 +226,11 @@ vm_object_t vm_object_allocate(
register ipc_port_t port;
object = _vm_object_allocate(size);
-#if !NORMA_VM
port = ipc_port_alloc_kernel();
if (port == IP_NULL)
panic("vm_object_allocate");
object->pager_name = port;
ipc_kobject_set(port, (ipc_kobject_t) object, IKOT_PAGING_NAME);
-#endif /* !NORMA_VM */
return object;
}
@@ -325,7 +318,6 @@ void vm_object_bootstrap(void)
void vm_object_init(void)
{
-#if !NORMA_VM
/*
* Finish initializing the kernel object.
* The submap object doesn't need a name port.
@@ -335,7 +327,6 @@ void vm_object_init(void)
ipc_kobject_set(kernel_object->pager_name,
(ipc_kobject_t) kernel_object,
IKOT_PAGING_NAME);
-#endif /* !NORMA_VM */
}
/*
@@ -656,11 +647,7 @@ void vm_object_terminate(
object->pager_name);
} else if (object->pager_name != IP_NULL) {
/* consumes our right for pager_name */
-#if NORMA_VM
- ipc_port_release_send(object->pager_name);
-#else /* NORMA_VM */
ipc_port_dealloc_kernel(object->pager_name);
-#endif /* NORMA_VM */
}
#if MACH_PAGEMAP
@@ -865,11 +852,7 @@ kern_return_t memory_object_destroy(
old_name);
} else if (old_name != IP_NULL) {
/* consumes our right for name */
-#if NORMA_VM
- ipc_port_release_send(object->pager_name);
-#else /* NORMA_VM */
ipc_port_dealloc_kernel(object->pager_name);
-#endif /* NORMA_VM */
}
/*
@@ -1861,11 +1844,7 @@ vm_object_t vm_object_lookup(
if (IP_VALID(port)) {
ip_lock(port);
if (ip_active(port) &&
-#if NORMA_VM
- (ip_kotype(port) == IKOT_PAGER)) {
-#else /* NORMA_VM */
(ip_kotype(port) == IKOT_PAGING_REQUEST)) {
-#endif /* NORMA_VM */
vm_object_cache_lock();
object = (vm_object_t) port->ip_kobject;
vm_object_lock(object);
@@ -1976,16 +1955,10 @@ void vm_object_destroy(
*/
ipc_port_release_send(pager);
-#if !NORMA_VM
if (old_request != IP_NULL)
ipc_port_dealloc_kernel(old_request);
-#endif /* !NORMA_VM */
if (old_name != IP_NULL)
-#if NORMA_VM
- ipc_port_release_send(old_name);
-#else /* NORMA_VM */
ipc_port_dealloc_kernel(old_name);
-#endif /* NORMA_VM */
/*
* Restart pending page requests
@@ -2138,27 +2111,6 @@ restart:
object->pager_created = TRUE;
object->pager = pager;
-#if NORMA_VM
-
- /*
- * Let the xmm system know that we want to use the pager.
- *
- * Name port will be provided by the xmm system
- * when set_attributes_common is called.
- */
-
- object->internal = internal;
- object->pager_ready = internal;
- if (internal) {
- assert(object->temporary);
- } else {
- object->temporary = FALSE;
- }
- object->pager_name = IP_NULL;
-
- (void) xmm_memory_object_init(object);
-#else /* NORMA_VM */
-
/*
* Allocate request port.
*/
@@ -2207,7 +2159,6 @@ restart:
PAGE_SIZE);
}
-#endif /* NORMA_VM */
vm_object_lock(object);
object->pager_initialized = TRUE;
@@ -2359,7 +2310,6 @@ void vm_object_remove(
else if (ip_kotype(port) != IKOT_NONE)
panic("vm_object_remove: bad object port");
}
-#if !NORMA_VM
if ((port = object->pager_request) != IP_NULL) {
if (ip_kotype(port) == IKOT_PAGING_REQUEST)
ipc_kobject_set(port, IKO_NULL, IKOT_NONE);
@@ -2372,7 +2322,6 @@ void vm_object_remove(
else if (ip_kotype(port) != IKOT_NONE)
panic("vm_object_remove: bad name port");
}
-#endif /* !NORMA_VM */
}
/*
@@ -2611,10 +2560,6 @@ void vm_object_collapse(
object->pager_created = backing_object->pager_created;
object->pager_request = backing_object->pager_request;
-#if NORMA_VM
- old_name_port = object->pager_name;
- object->pager_name = backing_object->pager_name;
-#else /* NORMA_VM */
if (object->pager_request != IP_NULL)
ipc_kobject_set(object->pager_request,
(ipc_kobject_t) object,
@@ -2628,7 +2573,6 @@ void vm_object_collapse(
ipc_kobject_set(object->pager_name,
(ipc_kobject_t) object,
IKOT_PAGING_NAME);
-#endif /* NORMA_VM */
vm_object_cache_unlock();
@@ -2677,11 +2621,7 @@ void vm_object_collapse(
vm_object_unlock(object);
if (old_name_port != IP_NULL)
-#if NORMA_VM
- ipc_port_release_send(old_name_port);
-#else /* NORMA_VM */
ipc_port_dealloc_kernel(old_name_port);
-#endif /* NORMA_VM */
zfree(vm_object_zone, (vm_offset_t) backing_object);
vm_object_lock(object);
@@ -2959,11 +2899,7 @@ ipc_port_t vm_object_name(
p = object->pager_name;
if (p != IP_NULL)
-#if NORMA_VM
- p = ipc_port_copy_send(p);
-#else /* NORMA_VM */
p = ipc_port_make_send(p);
-#endif /* NORMA_VM */
vm_object_unlock(object);
return p;
diff --git a/vm/vm_object.h b/vm/vm_object.h
index d710d99..940168d 100644
--- a/vm/vm_object.h
+++ b/vm/vm_object.h
@@ -35,7 +35,6 @@
#define _VM_VM_OBJECT_H_
#include <mach_pagemap.h>
-#include <norma_vm.h>
#include <mach/kern_return.h>
#include <mach/boolean.h>
@@ -53,11 +52,7 @@
#include <vm/vm_external.h>
#endif /* MACH_PAGEMAP */
-#if NORMA_VM
-typedef struct xmm_obj * pager_request_t;
-#else /* NORMA_VM */
typedef struct ipc_port * pager_request_t;
-#endif /* NORMA_VM */
#define PAGER_REQUEST_NULL ((pager_request_t) 0)
/*
diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c
index f15e508..a8f1b3c 100644
--- a/vm/vm_pageout.c
+++ b/vm/vm_pageout.c
@@ -35,7 +35,6 @@
*/
#include <mach_pagemap.h>
-#include <norma_vm.h>
#include <mach/mach_types.h>
#include <mach/memory_object.h>
@@ -190,14 +189,6 @@ unsigned int vm_pageout_inactive_dirty = 0; /* debugging */
unsigned int vm_pageout_inactive_double = 0; /* debugging */
unsigned int vm_pageout_inactive_cleaned_external = 0;
-#if NORMA_VM
-/*
- * Define them here, since they won't be defined by memory_object_user.h.
- */
-extern kern_return_t memory_object_data_initialize();
-extern kern_return_t memory_object_data_write();
-#endif /* NORMA_VM */
-
/*
* Routine: vm_pageout_setup
* Purpose: