diff options
Diffstat (limited to 'include/mach')
-rw-r--r-- | include/mach/experimental.defs | 53 | ||||
-rw-r--r-- | include/mach/gnumach.defs | 24 | ||||
-rw-r--r-- | include/mach/xen.h | 4 |
3 files changed, 31 insertions, 50 deletions
diff --git a/include/mach/experimental.defs b/include/mach/experimental.defs index ca1eb922..9a2f28db 100644 --- a/include/mach/experimental.defs +++ b/include/mach/experimental.defs @@ -1,29 +1,3 @@ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 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 @@ -38,6 +12,8 @@ subsystem serverprefix experimental_; +/* This is free for experimenting RPCs, with no backward compatibility guarantees. */ + type notify_port_t = MACH_MSG_TYPE_MOVE_SEND_ONCE ctype: mach_port_t; @@ -67,30 +43,7 @@ routine device_intr_enable( status : char); /* - * This routine is created for allocating DMA buffers. - * We are going to get a contiguous physical memory - * and its physical address in addition to the virtual address. - */ - - /* XXX - This RPC lacks a few additional constraints like boundaries, alignment -and maybe phase. We may not use them now, but they're important for -portability (e.g. if GNU Mach supports PAE, drivers that can't use -physical memory beyond the 4 GiB limit must be able to express it). - -> What do you mean by "phase"? - -Offset from the alignment. But I don't think it's useful at all in this -case. Minimum and maximum addresses and alignment should do. Maybe -boundary crossing but usually, specifying the right alignment and size -is enough. - -For upstream -inclusion, we need to do it properly: the RPC should return a special -memory object (similar to device_map() ), which can then be mapped into -the process address space with vm_map() like any other memory object. - -phys_address_t? + * This routine is for compatibility with old userland drivers. */ routine vm_allocate_contiguous( host_priv : host_priv_t; diff --git a/include/mach/gnumach.defs b/include/mach/gnumach.defs index 97ab573c..d423a10a 100644 --- a/include/mach/gnumach.defs +++ b/include/mach/gnumach.defs @@ -165,3 +165,27 @@ routine vm_msync( address : vm_address_t; size : vm_size_t; sync_flags : vm_sync_t); + +/* + * This routine is created for allocating DMA buffers. + * We are going to get a contiguous physical memory + * and its physical address in addition to the virtual address. + * We can specify physical memory range limits and alignment. + * NB: + * pmax is defined as the byte after the maximum address, + * eg 0x100000000 for 4GiB limit. + */ +/* XXX + * Future work: the RPC should return a special + * memory object (similar to device_map() ), which can then be mapped into + * the process address space with vm_map() like any other memory object. + */ +routine vm_allocate_contiguous( + host_priv : host_priv_t; + target_task : vm_task_t; + out vaddr : vm_address_t; + out paddr : rpc_phys_addr_t; + size : vm_size_t; + pmin : rpc_phys_addr_t; + pmax : rpc_phys_addr_t; + palign : rpc_phys_addr_t); diff --git a/include/mach/xen.h b/include/mach/xen.h index 6fc626f2..44620820 100644 --- a/include/mach/xen.h +++ b/include/mach/xen.h @@ -48,11 +48,15 @@ extern unsigned long la_shift; #define la_to_kv(a) phystokv(la_to_pa(a)) #ifdef MACH_PSEUDO_PHYS +#ifdef __i386__ #if PAE #define PFN_LIST MACH2PHYS_VIRT_START_PAE #else #define PFN_LIST MACH2PHYS_VIRT_START_NONPAE #endif +#else +#define PFN_LIST MACH2PHYS_VIRT_START +#endif #if VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS extern unsigned long *pfn_list; #else |