diff options
author | Justus Winter <justus@gnupg.org> | 2016-02-25 18:46:32 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-02-25 18:46:32 +0100 |
commit | 9ad7eb46b65b7324dd5f2c6f5568b6a0e033a5f4 (patch) | |
tree | aab92d03e843bcc7423124b2ec069ccb6be8e7e4 /include | |
parent | e7e91cc329b6a064d9703829911e940d7395d0a3 (diff) |
70_dde.patch
Diffstat (limited to 'include')
-rw-r--r-- | include/device/intr.h | 17 | ||||
-rw-r--r-- | include/mach/experimental.defs | 100 |
2 files changed, 117 insertions, 0 deletions
diff --git a/include/device/intr.h b/include/device/intr.h new file mode 100644 index 0000000..a02b64c --- /dev/null +++ b/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 + +#endif diff --git a/include/mach/experimental.defs b/include/mach/experimental.defs new file mode 100644 index 0000000..ca1eb92 --- /dev/null +++ b/include/mach/experimental.defs @@ -0,0 +1,100 @@ +/* + * 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 +#endif /* KERNEL_USER */ +#if KERNEL_SERVER + KernelServer +#endif /* KERNEL_SERVER */ + experimental 424242; + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> + +serverprefix experimental_; + +type notify_port_t = MACH_MSG_TYPE_MOVE_SEND_ONCE + ctype: mach_port_t; + +skip; /*simpleroutine mach_intr_notify( + notify : notify_port_t; + name : int);*/ + +routine device_intr_register( + master_port : mach_port_t; + in line : int; + in id : int; + in flags : int; + in receive_port : mach_port_send_t + ); + +/* + * enable/disable the specified line. + */ +/* XXX: Naming a function taht can disable something "xxx_enable" is confusing. */ +/* Is the disable part actually used at all? AIUI, the kernel IRQ handler +should always disable the line; and the userspace driver only has to +reenable it, after acknowledging and handling the interrupt... +*/ +routine device_intr_enable( + master_port : mach_port_t; + line : int; + 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? + */ +routine vm_allocate_contiguous( + host_priv : host_priv_t; + target_task : vm_task_t; + out vaddr : vm_address_t; + out paddr : vm_address_t; + size : vm_size_t); |