*
* @APPLE_LICENSE_HEADER_START@
*
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License"). You may not use this file except in compliance with the
- * License. Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
#include <string.h>
+#ifdef ppc
+#include <ppc/Firmware.h>
+#include <ppc/low_trace.h>
+#endif
+
+
extern vm_map_t ipc_kernel_copy_map;
extern vm_size_t ipc_kmsg_max_vm_space;
extern vm_size_t msg_ool_size_small;
trailer->msgh_sender = current_thread()->top_act->task->sec_token;
trailer->msgh_trailer_type = MACH_MSG_TRAILER_FORMAT_0;
trailer->msgh_trailer_size = MACH_MSG_TRAILER_MINIMUM_SIZE;
-
+
+#ifdef ppc
+ if(trcWork.traceMask) dbgTrace((unsigned int)kmsg->ikm_header.msgh_id,
+ (unsigned int)kmsg->ikm_header.msgh_remote_port,
+ (unsigned int)kmsg->ikm_header.msgh_local_port, 0);
+#endif
*kmsgp = kmsg;
return MACH_MSG_SUCCESS;
}
* Out-of-line memory descriptor, accumulate kernel
* memory requirements
*/
- space_needed += round_page(sstart->out_of_line.size);
+ space_needed += round_page_32(sstart->out_of_line.size);
if (space_needed > ipc_kmsg_max_vm_space) {
/*
*/
if (!page_aligned(length)) {
(void) memset((void *) (paddr + length), 0,
- round_page(length) - length);
+ round_page_32(length) - length);
}
if (vm_map_copyin(ipc_kernel_copy_map, paddr, length,
TRUE, ©) != KERN_SUCCESS) {
return MACH_MSG_VM_KERNEL;
}
dsc->address = (void *) copy;
- paddr += round_page(length);
- space_needed -= round_page(length);
+ paddr += round_page_32(length);
+ space_needed -= round_page_32(length);
} else {
/*