├── .gitignore ├── =announce-1.0 ├── =announce-1.1 ├── =announce-1.1.1 ├── =announce-1.2 ├── =announce-1.3 ├── AUTHORS ├── COPYING ├── COPYING3 ├── ChangeLog ├── DEVELOPMENT ├── Makefile.am ├── Makefile.in ├── Makefile.in.dep.patch ├── Makefile.in.orig ├── Makefile.in.rej ├── Makefrag.am ├── Makerules.am ├── Makerules.mig.am ├── NEWS ├── README ├── README.md ├── chips ├── busses.c └── busses.h ├── config.status.dep.patch ├── configfrag-first.ac ├── configfrag.ac ├── configure.ac ├── ddb ├── db_access.c ├── db_access.h ├── db_aout.c ├── db_aout.h ├── db_break.c ├── db_break.h ├── db_command.c ├── db_command.h ├── db_cond.c ├── db_cond.h ├── db_elf.c ├── db_elf.h ├── db_examine.c ├── db_examine.h ├── db_expr.c ├── db_expr.h ├── db_ext_symtab.c ├── db_input.c ├── db_input.h ├── db_lex.c ├── db_lex.h ├── db_macro.c ├── db_macro.h ├── db_mp.c ├── db_mp.h ├── db_output.c ├── db_output.h ├── db_print.c ├── db_print.h ├── db_run.c ├── db_run.h ├── db_sym.c ├── db_sym.h ├── db_task_thread.c ├── db_task_thread.h ├── db_trap.c ├── db_trap.h ├── db_variables.c ├── db_variables.h ├── db_watch.c ├── db_watch.h ├── db_write_cmd.c ├── db_write_cmd.h ├── nlist.h ├── stab.h └── tr.h ├── device ├── blkio.c ├── blkio.h ├── buf.h ├── chario.c ├── chario.h ├── cirbuf.c ├── cirbuf.h ├── conf.h ├── cons.c ├── cons.h ├── dev_hdr.h ├── dev_lookup.c ├── dev_master.h ├── dev_name.c ├── dev_pager.c ├── dev_pager.h ├── device.srv ├── device_emul.h ├── device_init.c ├── device_init.h ├── device_pager.srv ├── device_port.h ├── device_reply.cli ├── device_types_kernel.h ├── ds_routines.c ├── ds_routines.h ├── if_ether.h ├── if_hdr.h ├── intr.c ├── intr.h ├── io_req.h ├── kmsg.c ├── kmsg.h ├── memory_object_reply.cli ├── net_io.c ├── net_io.h ├── param.h ├── subrs.c ├── subrs.h └── tty.h ├── doc ├── .gitignore ├── Makefrag.am ├── fdl.texi ├── gpl.texi └── mach.texi ├── gensym.awk ├── gitlog-to-changelog ├── i386 ├── Makefrag.am ├── README-Drivers ├── configfrag.ac ├── i386 │ ├── .gitignore │ ├── _setjmp.S │ ├── ast.h │ ├── ast_check.c │ ├── ast_types.h │ ├── cpu.h │ ├── cpu_number.h │ ├── cpuboot.S │ ├── cswitch.S │ ├── db_disasm.c │ ├── db_interface.c │ ├── db_interface.h │ ├── db_machdep.h │ ├── db_trace.c │ ├── db_trace.h │ ├── debug.h │ ├── debug_i386.c │ ├── debug_trace.S │ ├── eflags.h │ ├── fpu.c │ ├── fpu.h │ ├── gdt.c │ ├── gdt.h │ ├── hardclock.c │ ├── hardclock.h │ ├── i386asm.sym │ ├── idt-gen.h │ ├── idt.c │ ├── idt_inittab.S │ ├── io_map.c │ ├── io_perm.c │ ├── io_perm.h │ ├── ipl.h │ ├── irq.c │ ├── irq.h │ ├── ktss.c │ ├── ktss.h │ ├── kttd_interface.c │ ├── kttd_machdep.h │ ├── ldt.c │ ├── ldt.h │ ├── lock.h │ ├── locore.S │ ├── locore.h │ ├── loose_ends.c │ ├── loose_ends.h │ ├── mach_i386.srv │ ├── mach_param.h │ ├── machine_routines.h │ ├── machine_task.c │ ├── machspl.h │ ├── model_dep.h │ ├── mp_desc.c │ ├── mp_desc.h │ ├── pcb.c │ ├── pcb.h │ ├── phys.c │ ├── pic.c │ ├── pic.h │ ├── pio.h │ ├── pit.c │ ├── pit.h │ ├── pmap.h │ ├── proc_reg.h │ ├── sched_param.h │ ├── seg.c │ ├── seg.h │ ├── setjmp.h │ ├── spl.S │ ├── spl.h │ ├── strings.c │ ├── task.h │ ├── thread.h │ ├── time_stamp.h │ ├── trap.c │ ├── trap.h │ ├── tss.h │ ├── user_ldt.c │ ├── user_ldt.h │ ├── vm_param.h │ ├── xen.h │ └── xpr.h ├── i386at │ ├── acpi_rsdp.c │ ├── acpi_rsdp.h │ ├── autoconf.c │ ├── autoconf.h │ ├── biosmem.c │ ├── biosmem.h │ ├── boothdr.S │ ├── com.c │ ├── com.h │ ├── comreg.h │ ├── conf.c │ ├── cons_conf.c │ ├── cram.h │ ├── disk.h │ ├── elf.h │ ├── i8250.h │ ├── idt.h │ ├── immc.c │ ├── immc.h │ ├── int_init.c │ ├── int_init.h │ ├── interrupt.S │ ├── kd.c │ ├── kd.h │ ├── kd_event.c │ ├── kd_event.h │ ├── kd_mouse.c │ ├── kd_mouse.h │ ├── kd_queue.c │ ├── kd_queue.h │ ├── kdasm.S │ ├── kdsoft.h │ ├── lpr.c │ ├── lpr.h │ ├── mem.c │ ├── mem.h │ ├── model_dep.c │ ├── model_dep.h │ ├── pic_isa.c │ ├── rtc.c │ └── rtc.h ├── include │ └── mach │ │ ├── i386 │ │ ├── asm.h │ │ ├── boolean.h │ │ ├── cthreads.h │ │ ├── eflags.h │ │ ├── exception.h │ │ ├── exec │ │ │ └── elf.h │ │ ├── fp_reg.h │ │ ├── ioccom.h │ │ ├── kern_return.h │ │ ├── mach_i386.defs │ │ ├── mach_i386_types.h │ │ ├── machine_types.defs │ │ ├── multiboot.h │ │ ├── syscall_sw.h │ │ ├── thread_status.h │ │ ├── trap.h │ │ ├── vm_param.h │ │ └── vm_types.h │ │ └── sa │ │ └── stdarg.h ├── intel │ ├── pmap.c │ ├── pmap.h │ ├── read_fault.c │ └── read_fault.h ├── ldscript ├── linux │ ├── Makefrag.am │ └── dev │ │ └── include │ │ └── linux │ │ └── autoconf.h └── xen │ ├── Makefrag.am │ ├── xen.c │ ├── xen_boothdr.S │ └── xen_locore.S ├── imps ├── apic.h └── impsasm.sym ├── include ├── alloca.h ├── cache.h ├── device │ ├── audio_status.h │ ├── bpf.h │ ├── device.defs │ ├── device_reply.defs │ ├── device_request.defs │ ├── device_types.defs │ ├── device_types.h │ ├── disk_status.h │ ├── net_status.h │ ├── notify.defs │ ├── notify.h │ ├── tape_status.h │ └── tty_status.h ├── inttypes.h ├── mach │ ├── alert.h │ ├── boolean.h │ ├── boot.h │ ├── bootstrap.defs │ ├── default_pager.defs │ ├── default_pager_helper.defs │ ├── default_pager_types.defs │ ├── default_pager_types.h │ ├── error.h │ ├── exc.defs │ ├── exception.h │ ├── exec │ │ ├── a.out.h │ │ ├── elf.h │ │ └── exec.h │ ├── experimental.defs │ ├── gnumach.defs │ ├── host_info.h │ ├── inline.h │ ├── kern_return.h │ ├── mach.defs │ ├── mach4.defs │ ├── mach_host.defs │ ├── mach_param.h │ ├── mach_port.defs │ ├── mach_traps.h │ ├── mach_types.defs │ ├── mach_types.h │ ├── machine.h │ ├── macro_help.h │ ├── memory_object.defs │ ├── memory_object.h │ ├── memory_object_default.defs │ ├── message.h │ ├── mig_errors.h │ ├── mig_support.h │ ├── msg_type.h │ ├── multiboot.h │ ├── notify.defs │ ├── notify.h │ ├── pc_sample.h │ ├── policy.h │ ├── port.h │ ├── processor_info.h │ ├── profil.h │ ├── profilparam.h │ ├── rpc.h │ ├── std_types.defs │ ├── std_types.h │ ├── syscall_sw.h │ ├── task_info.h │ ├── task_notify.defs │ ├── task_special_ports.h │ ├── thread_info.h │ ├── thread_special_ports.h │ ├── thread_status.h │ ├── thread_switch.h │ ├── time_value.h │ ├── version.h │ ├── vm_attributes.h │ ├── vm_cache_statistics.h │ ├── vm_inherit.h │ ├── vm_param.h │ ├── vm_prot.h │ ├── vm_statistics.h │ ├── vm_sync.h │ ├── vm_wire.h │ └── xen.h ├── mach_debug │ ├── hash_info.h │ ├── ipc_info.h │ ├── mach_debug.defs │ ├── mach_debug_types.defs │ ├── mach_debug_types.h │ ├── pc_info.h │ ├── slab_info.h │ └── vm_info.h ├── stddef.h ├── stdint.h ├── string.h └── sys │ ├── ioctl.h │ ├── reboot.h │ ├── time.h │ └── types.h ├── ipc ├── ipc_entry.c ├── ipc_entry.h ├── ipc_init.c ├── ipc_init.h ├── ipc_kmsg.c ├── ipc_kmsg.h ├── ipc_kmsg_queue.h ├── ipc_machdep.h ├── ipc_marequest.c ├── ipc_marequest.h ├── ipc_mqueue.c ├── ipc_mqueue.h ├── ipc_notify.c ├── ipc_notify.h ├── ipc_object.c ├── ipc_object.h ├── ipc_port.c ├── ipc_port.h ├── ipc_print.h ├── ipc_pset.c ├── ipc_pset.h ├── ipc_right.c ├── ipc_right.h ├── ipc_space.c ├── ipc_space.h ├── ipc_table.c ├── ipc_table.h ├── ipc_target.c ├── ipc_target.h ├── ipc_thread.c ├── ipc_thread.h ├── ipc_types.h ├── mach_debug.c ├── mach_msg.c ├── mach_msg.h ├── mach_port.c ├── mach_port.h ├── mach_port.srv ├── mach_rpc.c ├── notify.defs └── port.h ├── kern ├── act.c ├── act.h ├── assert.h ├── ast.c ├── ast.h ├── atomic.h ├── boot_script.c ├── boot_script.h ├── bootstrap.c ├── bootstrap.h ├── counters.c ├── counters.h ├── cpu_number.c ├── cpu_number.h ├── debug.c ├── debug.h ├── elf-load.c ├── eventcount.c ├── eventcount.h ├── exc.defs ├── exception.c ├── exception.h ├── experimental.srv ├── gnumach.srv ├── gsync.c ├── gsync.h ├── host.c ├── host.h ├── ipc_host.c ├── ipc_host.h ├── ipc_kobject.c ├── ipc_kobject.h ├── ipc_mig.c ├── ipc_mig.h ├── ipc_sched.c ├── ipc_sched.h ├── ipc_tt.c ├── ipc_tt.h ├── kalloc.h ├── kern_types.h ├── kmutex.c ├── kmutex.h ├── list.h ├── lock.c ├── lock.h ├── lock_mon.c ├── log2.h ├── mach.srv ├── mach4.srv ├── mach_clock.c ├── mach_clock.h ├── mach_debug.srv ├── mach_factor.c ├── mach_factor.h ├── mach_host.srv ├── machine.c ├── machine.h ├── macros.h ├── pc_sample.c ├── pc_sample.h ├── printf.c ├── printf.h ├── priority.c ├── priority.h ├── processor.c ├── processor.h ├── profile.c ├── queue.c ├── queue.h ├── rbtree.c ├── rbtree.h ├── rbtree_i.h ├── rdxtree.c ├── rdxtree.h ├── rdxtree_i.h ├── refcount.h ├── sched.h ├── sched_prim.c ├── sched_prim.h ├── shuttle.h ├── slab.c ├── slab.h ├── startup.c ├── startup.h ├── strings.c ├── syscall_emulation.c ├── syscall_emulation.h ├── syscall_subr.c ├── syscall_subr.h ├── syscall_sw.c ├── syscall_sw.h ├── task.c ├── task.h ├── task_notify.cli ├── thread.c ├── thread.h ├── thread_swap.c ├── thread_swap.h ├── time_stamp.c ├── time_stamp.h ├── timer.c ├── timer.h ├── xpr.c └── xpr.h ├── linux ├── Makefrag.am ├── configfrag.ac ├── dev │ ├── README │ ├── arch │ │ └── i386 │ │ │ └── kernel │ │ │ ├── irq.c │ │ │ └── setup.c │ ├── drivers │ │ ├── block │ │ │ ├── ahci.c │ │ │ ├── floppy.c │ │ │ └── genhd.c │ │ ├── net │ │ │ ├── Space.c │ │ │ ├── auto_irq.c │ │ │ ├── net_init.c │ │ │ └── wavelan.p.h │ │ └── scsi │ │ │ ├── eata_dma.c │ │ │ └── g_NCR5380.c │ ├── glue │ │ ├── block.c │ │ ├── glue.h │ │ ├── kmem.c │ │ ├── misc.c │ │ └── net.c │ ├── include │ │ ├── ahci.h │ │ ├── asm-i386 │ │ │ ├── page.h │ │ │ ├── smp.h │ │ │ ├── string.h │ │ │ ├── system.h │ │ │ └── uaccess.h │ │ └── linux │ │ │ ├── blk.h │ │ │ ├── blkdev.h │ │ │ ├── compile.h │ │ │ ├── etherdevice.h │ │ │ ├── fs.h │ │ │ ├── genhd.h │ │ │ ├── if.h │ │ │ ├── kernel.h │ │ │ ├── locks.h │ │ │ ├── malloc.h │ │ │ ├── mm.h │ │ │ ├── modversions.h │ │ │ ├── netdevice.h │ │ │ ├── notifier.h │ │ │ ├── pagemap.h │ │ │ ├── pm.h │ │ │ ├── proc_fs.h │ │ │ ├── sched.h │ │ │ ├── skbuff.h │ │ │ ├── threads.h │ │ │ └── types.h │ ├── init │ │ ├── main.c │ │ └── version.c │ ├── kernel │ │ ├── dma.c │ │ ├── printk.c │ │ ├── resource.c │ │ ├── sched.c │ │ └── softirq.c │ ├── lib │ │ └── vsprintf.c │ └── net │ │ └── core │ │ └── dev.c ├── pcmcia-cs │ ├── clients │ │ ├── 3c574_cs.c │ │ ├── 3c589_cs.c │ │ ├── ax8390.h │ │ ├── axnet_cs.c │ │ ├── fmvj18x_cs.c │ │ ├── nmclan_cs.c │ │ ├── ositech.h │ │ ├── pcnet_cs.c │ │ ├── smc91c92_cs.c │ │ └── xirc2ps_cs.c │ ├── glue │ │ ├── ds.c │ │ ├── pcmcia.c │ │ ├── pcmcia_glue.h │ │ └── wireless_glue.h │ ├── include │ │ ├── linux │ │ │ ├── crc32.h │ │ │ └── slab.h │ │ └── pcmcia │ │ │ ├── bulkmem.h │ │ │ ├── bus_ops.h │ │ │ ├── ciscode.h │ │ │ ├── cisreg.h │ │ │ ├── cistpl.h │ │ │ ├── cs.h │ │ │ ├── cs_types.h │ │ │ ├── driver_ops.h │ │ │ ├── ds.h │ │ │ ├── mem_op.h │ │ │ ├── ss.h │ │ │ └── version.h │ ├── modules │ │ ├── bulkmem.c │ │ ├── cirrus.h │ │ ├── cistpl.c │ │ ├── cs.c │ │ ├── cs_internal.h │ │ ├── ds.c │ │ ├── ene.h │ │ ├── i82365.c │ │ ├── i82365.h │ │ ├── o2micro.h │ │ ├── pci_fixup.c │ │ ├── ricoh.h │ │ ├── rsrc_mgr.c │ │ ├── smc34c90.h │ │ ├── ti113x.h │ │ ├── topic.h │ │ ├── vg468.h │ │ └── yenta.h │ └── wireless │ │ ├── hermes.c │ │ ├── hermes.h │ │ ├── hermes_rid.h │ │ ├── ieee802_11.h │ │ ├── orinoco.c │ │ ├── orinoco.h │ │ └── orinoco_cs.c └── src │ ├── COPYING │ ├── arch │ └── i386 │ │ ├── kernel │ │ ├── bios32.c │ │ └── irq.c │ │ └── lib │ │ ├── delay.c │ │ └── semaphore.S │ ├── drivers │ ├── block │ │ ├── cmd640.c │ │ ├── floppy.c │ │ ├── genhd.c │ │ ├── ide-cd.c │ │ ├── ide.c │ │ ├── ide.h │ │ ├── ide_modes.h │ │ ├── rz1000.c │ │ └── triton.c │ ├── net │ │ ├── 3c501.c │ │ ├── 3c503.c │ │ ├── 3c503.h │ │ ├── 3c505.c │ │ ├── 3c505.h │ │ ├── 3c507.c │ │ ├── 3c509.c │ │ ├── 3c515.c │ │ ├── 3c59x.c │ │ ├── 8390.c │ │ ├── 8390.h │ │ ├── Space.c │ │ ├── ac3200.c │ │ ├── apricot.c │ │ ├── at1700.c │ │ ├── atp.c │ │ ├── atp.h │ │ ├── auto_irq.c │ │ ├── cb_shim.c │ │ ├── de4x5.c │ │ ├── de4x5.h │ │ ├── de600.c │ │ ├── de620.c │ │ ├── de620.h │ │ ├── depca.c │ │ ├── depca.h │ │ ├── e2100.c │ │ ├── eepro.c │ │ ├── eepro100.c │ │ ├── eexpress.c │ │ ├── epic100.c │ │ ├── eth16i.c │ │ ├── eth82586.h │ │ ├── ewrk3.c │ │ ├── ewrk3.h │ │ ├── fmv18x.c │ │ ├── hamachi.c │ │ ├── hp-plus.c │ │ ├── hp.c │ │ ├── hp100.c │ │ ├── hp100.h │ │ ├── i82586.h │ │ ├── intel-gige.c │ │ ├── iow.h │ │ ├── kern_compat.h │ │ ├── lance.c │ │ ├── myson803.c │ │ ├── natsemi.c │ │ ├── ne.c │ │ ├── ne2k-pci.c │ │ ├── net_init.c │ │ ├── ni52.c │ │ ├── ni52.h │ │ ├── ni65.c │ │ ├── ni65.h │ │ ├── ns820.c │ │ ├── pci-scan.c │ │ ├── pci-scan.h │ │ ├── pcnet32.c │ │ ├── rtl8139.c │ │ ├── seeq8005.c │ │ ├── seeq8005.h │ │ ├── sis900.c │ │ ├── sis900.h │ │ ├── sk_g16.c │ │ ├── sk_g16.h │ │ ├── smc-ultra.c │ │ ├── smc-ultra32.c │ │ ├── smc9194.c │ │ ├── smc9194.h │ │ ├── starfire.c │ │ ├── sundance.c │ │ ├── tlan.c │ │ ├── tlan.h │ │ ├── tulip.c │ │ ├── via-rhine.c │ │ ├── wavelan.c │ │ ├── wavelan.h │ │ ├── wavelan.p.h │ │ ├── wd.c │ │ ├── winbond-840.c │ │ ├── yellowfin.c │ │ └── znet.c │ ├── pci │ │ └── pci.c │ └── scsi │ │ ├── 53c7,8xx.h │ │ ├── 53c78xx.c │ │ ├── 53c8xx_d.h │ │ ├── 53c8xx_u.h │ │ ├── AM53C974.c │ │ ├── AM53C974.h │ │ ├── BusLogic.c │ │ ├── BusLogic.h │ │ ├── FlashPoint.c │ │ ├── NCR5380.c │ │ ├── NCR5380.h │ │ ├── NCR53c406a.c │ │ ├── NCR53c406a.h │ │ ├── advansys.c │ │ ├── advansys.h │ │ ├── aha152x.c │ │ ├── aha152x.h │ │ ├── aha1542.c │ │ ├── aha1542.h │ │ ├── aha1740.c │ │ ├── aha1740.h │ │ ├── aic7xxx.c │ │ ├── aic7xxx.h │ │ ├── aic7xxx │ │ ├── scsi_message.h │ │ └── sequencer.h │ │ ├── aic7xxx_proc.c │ │ ├── aic7xxx_reg.h │ │ ├── aic7xxx_seq.c │ │ ├── constants.c │ │ ├── constants.h │ │ ├── dc390.h │ │ ├── dtc.c │ │ ├── dtc.h │ │ ├── eata.c │ │ ├── eata.h │ │ ├── eata_dma.c │ │ ├── eata_dma.h │ │ ├── eata_dma_proc.c │ │ ├── eata_dma_proc.h │ │ ├── eata_generic.h │ │ ├── eata_pio.c │ │ ├── eata_pio.h │ │ ├── eata_pio_proc.c │ │ ├── fdomain.c │ │ ├── fdomain.h │ │ ├── g_NCR5380.c │ │ ├── g_NCR5380.h │ │ ├── gdth.c │ │ ├── gdth.h │ │ ├── gdth_ioctl.h │ │ ├── gdth_proc.c │ │ ├── gdth_proc.h │ │ ├── hosts.c │ │ ├── hosts.h │ │ ├── in2000.c │ │ ├── in2000.h │ │ ├── ncr53c8xx.c │ │ ├── ncr53c8xx.h │ │ ├── pas16.c │ │ ├── pas16.h │ │ ├── ppa.c │ │ ├── ppa.h │ │ ├── qlogicfas.c │ │ ├── qlogicfas.h │ │ ├── qlogicisp.c │ │ ├── qlogicisp.h │ │ ├── scripts.h │ │ ├── scsi.c │ │ ├── scsi.h │ │ ├── scsi_ioctl.c │ │ ├── scsi_proc.c │ │ ├── scsicam.c │ │ ├── scsiio.c │ │ ├── scsiiom.c │ │ ├── sd.c │ │ ├── sd.h │ │ ├── sd_ioctl.c │ │ ├── seagate.c │ │ ├── seagate.h │ │ ├── sr.c │ │ ├── sr.h │ │ ├── sr_ioctl.c │ │ ├── sym53c8xx.c │ │ ├── sym53c8xx.h │ │ ├── sym53c8xx_comm.h │ │ ├── sym53c8xx_defs.h │ │ ├── t128.c │ │ ├── t128.h │ │ ├── tmscsim.c │ │ ├── tmscsim.h │ │ ├── u14-34f.c │ │ ├── u14-34f.h │ │ ├── ultrastor.c │ │ ├── ultrastor.h │ │ ├── wd7000.c │ │ └── wd7000.h │ ├── include │ ├── asm-i386 │ │ ├── atomic.h │ │ ├── bitops.h │ │ ├── byteorder.h │ │ ├── cache.h │ │ ├── checksum.h │ │ ├── delay.h │ │ ├── dma.h │ │ ├── errno.h │ │ ├── fcntl.h │ │ ├── floppy.h │ │ ├── hardirq.h │ │ ├── io.h │ │ ├── ioctl.h │ │ ├── ioctls.h │ │ ├── irq.h │ │ ├── math_emu.h │ │ ├── page.h │ │ ├── param.h │ │ ├── posix_types.h │ │ ├── processor.h │ │ ├── ptrace.h │ │ ├── resource.h │ │ ├── segment.h │ │ ├── semaphore.h │ │ ├── sigcontext.h │ │ ├── signal.h │ │ ├── socket.h │ │ ├── sockios.h │ │ ├── spinlock.h │ │ ├── stat.h │ │ ├── statfs.h │ │ ├── string.h │ │ ├── system.h │ │ ├── termbits.h │ │ ├── termios.h │ │ ├── types.h │ │ ├── unaligned.h │ │ ├── unistd.h │ │ └── vm86.h │ ├── linux │ │ ├── affs_hardblocks.h │ │ ├── atalk.h │ │ ├── ax25.h │ │ ├── binfmts.h │ │ ├── bios32.h │ │ ├── blk.h │ │ ├── blkdev.h │ │ ├── cdrom.h │ │ ├── compatmac.h │ │ ├── compiler-gcc.h │ │ ├── compiler-gcc3.h │ │ ├── compiler-gcc4.h │ │ ├── compiler-gcc5.h │ │ ├── compiler-gcc9.h │ │ ├── compiler.h │ │ ├── config.h │ │ ├── ctype.h │ │ ├── delay.h │ │ ├── errno.h │ │ ├── etherdevice.h │ │ ├── fcntl.h │ │ ├── fd.h │ │ ├── fddidevice.h │ │ ├── fdreg.h │ │ ├── fs.h │ │ ├── genhd.h │ │ ├── hdreg.h │ │ ├── head.h │ │ ├── icmp.h │ │ ├── if.h │ │ ├── if_arp.h │ │ ├── if_ether.h │ │ ├── if_fddi.h │ │ ├── if_tr.h │ │ ├── igmp.h │ │ ├── in.h │ │ ├── inet.h │ │ ├── init.h │ │ ├── interrupt.h │ │ ├── ioctl.h │ │ ├── ioport.h │ │ ├── ip.h │ │ ├── ipc.h │ │ ├── ipx.h │ │ ├── kcomp.h │ │ ├── kdev_t.h │ │ ├── kernel.h │ │ ├── kernel_stat.h │ │ ├── limits.h │ │ ├── linkage.h │ │ ├── list.h │ │ ├── locks.h │ │ ├── major.h │ │ ├── malloc.h │ │ ├── mc146818rtc.h │ │ ├── md.h │ │ ├── mm.h │ │ ├── module.h │ │ ├── mount.h │ │ ├── net.h │ │ ├── netdevice.h │ │ ├── netrom.h │ │ ├── notifier.h │ │ ├── pagemap.h │ │ ├── param.h │ │ ├── pci.h │ │ ├── personality.h │ │ ├── posix_types.h │ │ ├── proc_fs.h │ │ ├── ptrace.h │ │ ├── quota.h │ │ ├── random.h │ │ ├── resource.h │ │ ├── rose.h │ │ ├── route.h │ │ ├── sched.h │ │ ├── sem.h │ │ ├── signal.h │ │ ├── skbuff.h │ │ ├── smp.h │ │ ├── socket.h │ │ ├── sockios.h │ │ ├── spinlock.h │ │ ├── stat.h │ │ ├── stddef.h │ │ ├── string.h │ │ ├── symtab_begin.h │ │ ├── symtab_end.h │ │ ├── tasks.h │ │ ├── tcp.h │ │ ├── termios.h │ │ ├── time.h │ │ ├── timer.h │ │ ├── tqueue.h │ │ ├── trdevice.h │ │ ├── tty.h │ │ ├── tty_driver.h │ │ ├── tty_ldisc.h │ │ ├── types.h │ │ ├── ucdrom.h │ │ ├── udp.h │ │ ├── uio.h │ │ ├── unistd.h │ │ ├── utsname.h │ │ ├── version.h │ │ ├── vfs.h │ │ ├── wait.h │ │ └── wireless.h │ ├── net │ │ ├── af_unix.h │ │ ├── arp.h │ │ ├── atalkcall.h │ │ ├── ax25.h │ │ ├── ax25call.h │ │ ├── br.h │ │ ├── checksum.h │ │ ├── datalink.h │ │ ├── gc.h │ │ ├── icmp.h │ │ ├── ip.h │ │ ├── ip_alias.h │ │ ├── ip_forward.h │ │ ├── ip_masq.h │ │ ├── ipip.h │ │ ├── ipx.h │ │ ├── ipxcall.h │ │ ├── netlink.h │ │ ├── netrom.h │ │ ├── nrcall.h │ │ ├── p8022.h │ │ ├── p8022call.h │ │ ├── p8022tr.h │ │ ├── p8022trcall.h │ │ ├── protocol.h │ │ ├── psnap.h │ │ ├── psnapcall.h │ │ ├── rarp.h │ │ ├── raw.h │ │ ├── rose.h │ │ ├── rosecall.h │ │ ├── route.h │ │ ├── slhc.h │ │ ├── slhc_vj.h │ │ ├── snmp.h │ │ ├── sock.h │ │ ├── spx.h │ │ ├── tcp.h │ │ └── udp.h │ └── scsi │ │ ├── scsi.h │ │ ├── scsi_ioctl.h │ │ └── scsicam.h │ ├── init │ ├── main.c │ └── version.c │ ├── kernel │ ├── dma.c │ ├── printk.c │ ├── resource.c │ ├── sched.c │ └── softirq.c │ ├── lib │ ├── ctype.c │ └── vsprintf.c │ └── net │ └── core │ └── dev.c ├── tests ├── .gitignore ├── Makefrag.am ├── configfrag.ac └── test-mbchk.in ├── util ├── atoi.c ├── atoi.h ├── putchar.c ├── putchar.h └── puts.c ├── version.c.in ├── version.m4 ├── vm ├── memory_object.c ├── memory_object.h ├── memory_object_default.cli ├── memory_object_proxy.c ├── memory_object_proxy.h ├── memory_object_user.cli ├── pmap.h ├── vm_debug.c ├── vm_external.c ├── vm_external.h ├── vm_fault.c ├── vm_fault.h ├── vm_init.c ├── vm_init.h ├── vm_kern.c ├── vm_kern.h ├── vm_map.c ├── vm_map.h ├── vm_map_physical.c ├── vm_map_physical.h ├── vm_object.c ├── vm_object.h ├── vm_page.c ├── vm_page.h ├── vm_pageout.c ├── vm_pageout.h ├── vm_print.h ├── vm_resident.c ├── vm_resident.h ├── vm_types.h ├── vm_user.c └── vm_user.h ├── x86_64 ├── Makefrag.am ├── _setjmp.S ├── configfrag.ac ├── cswitch.S ├── debug_trace.S ├── idt_inittab.S ├── include │ └── mach │ │ └── x86_64 ├── interrupt.S ├── kdasm.S ├── ldscript ├── locore.S ├── spl.S ├── x86_64 ├── xen_boothdr.S └── xen_locore.S └── xen ├── Makefrag.am ├── block.c ├── block.h ├── configfrag.ac ├── console.c ├── console.h ├── evt.c ├── evt.h ├── grant.c ├── grant.h ├── net.c ├── net.h ├── public ├── COPYING ├── arch-x86 │ ├── xen-mca.h │ ├── xen-x86_32.h │ ├── xen-x86_64.h │ └── xen.h ├── arch-x86_32.h ├── arch-x86_64.h ├── callback.h ├── dom0_ops.h ├── domctl.h ├── elfnote.h ├── elfstructs.h ├── event_channel.h ├── features.h ├── grant_table.h ├── io │ ├── blkif.h │ ├── console.h │ ├── fbif.h │ ├── fsif.h │ ├── kbdif.h │ ├── netif.h │ ├── pciif.h │ ├── protocols.h │ ├── ring.h │ ├── tpmif.h │ ├── xenbus.h │ └── xs_wire.h ├── kexec.h ├── libelf.h ├── memory.h ├── nmi.h ├── physdev.h ├── platform.h ├── sched.h ├── sysctl.h ├── trace.h ├── vcpu.h ├── version.h ├── xen-compat.h ├── xen.h ├── xencomm.h └── xenoprof.h ├── ring.c ├── ring.h ├── store.c ├── store.h ├── time.c ├── time.h ├── xen.c └── xen.h /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | 3 | .deps/ 4 | .dirstamp 5 | *.o 6 | *.a 7 | /gnumach 8 | /gnumach-undef 9 | /gnumach-undef-bad 10 | /gnumach.msgids 11 | 12 | # Makerules.am 13 | *.gz 14 | *.stripped 15 | 16 | # Makerules.mig.am 17 | *.user.* 18 | *.server.* 19 | 20 | autom4te.cache/ 21 | build-aux/ 22 | /INSTALL 23 | /Makefile 24 | /Makefile.in 25 | /aclocal.m4 26 | /config.h 27 | /config.h.in 28 | /config.log 29 | /config.status 30 | /config.status.orig 31 | /configure 32 | /stamp-h1 33 | /version.c 34 | 35 | # Ignore arch symlinks 36 | /machine 37 | /mach/machine 38 | /linux/src/include/asm 39 | /linux/dev/include/asm 40 | 41 | /doc/mach.aux 42 | /doc/mach.cp 43 | /doc/mach.cps 44 | /doc/mach.fn 45 | /doc/mach.fns 46 | /doc/mach.ky 47 | /doc/mach.log 48 | /doc/mach.pdf 49 | /doc/mach.pg 50 | /doc/mach.toc 51 | /doc/mach.tp 52 | /doc/mach.vr 53 | /build 54 | Makefile.am.orig 55 | Makefile.am.rej 56 | -------------------------------------------------------------------------------- /=announce-1.1: -------------------------------------------------------------------------------- 1 | I am pleased to announce version 1.1 of the GNU distribution of the 2 | Mach kernel. It may be found in the file (about 254 MB compressed) 3 | ftp://prep.ai.mit.edu/pub/gnu/gnumach-1.1.tar.gz. 4 | 5 | Diffs from version 1.0 of this distribution are avaiable at 6 | ftp://prep.ai.mit.edu/pub/gnu/gnumach-1.0-1.1.diff (42 KB 7 | uncompressed). 8 | 9 | This is a bug-fixing release; the only new feature over version 1.0 is 10 | the --enable-kdb configure option which has been added to turn on 11 | kernel debugging support. 12 | 13 | Several bugs have been fixed in this distribution, particularly 14 | relating to cross-compilation support. 15 | 16 | This distribution is only for i386, i486, i586 (pentium), and i686 17 | (sexium [pentium pro]) processors on PC-AT compatible machines. 18 | Volunteers interested in ports to other architectures are eagerly 19 | sought. 20 | 21 | Most ethernet cards and disk controllers are supported by this kernel; 22 | ones for which Linux drivers exist can be ported easily. Non-network 23 | devices for which BSD drivers exist can be ported with a little 24 | effort, but not much. 25 | 26 | Bug reports relating to this distribution should be sent to 27 | bug-hurd@prep.ai.mit.edu. Requests for assistance should be made on 28 | help-hurd@prep.ai.mit.edu. 29 | 30 | The md5sum checksums for the files mentioned in this message are: 31 | 32 | 6bb809d81198fd28078c8ac9ccb55965 gnumach-1.1.tar.gz 33 | 089b95de887c69c9f1f28b1b1dcb00f7 gnumach-1.0-1.1.diff 34 | 35 | -------------------------------------------------------------------------------- /=announce-1.2: -------------------------------------------------------------------------------- 1 | I am pleased to announce version 1.2 of the GNU distribution of the 2 | Mach kernel. It may be found in the file (about 3.64 MB compressed) 3 | ftp://ftp.gnu.org/gnu/gnumach/gnumach-1.2.tar.gz. 4 | 5 | Because of extensive source reorganization, it is not profitable to 6 | provide diffs against previous versions. 7 | 8 | Most notably, this release updates the Linux-derived device drivers to 9 | those found in Linux version 2.0.36. 10 | 11 | This distribution is only for i386, i486, i586 (pentium), and i686 12 | (sexium [pentium pro]) processors on PC-AT compatible machines. 13 | Volunteers interested in ports to other architectures are eagerly 14 | sought. 15 | 16 | MiG (the Mach Interface Generator) is no longer in this distribution; 17 | it is now distributed separately. You will need MiG in order to be 18 | able to compile this release. 19 | 20 | Bug reports relating to this distribution should be sent to 21 | bug-hurd@gnu.org. Requests for assistance should be made on 22 | help-hurd@gnu.org. 23 | 24 | The md5sum checksums for this distibution is 25 | 26 | 85e898a1753270e63a1cc69028043c68 gnumach-1.2.tar.gz 27 | 28 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | -*- Text -*- 2 | 3 | The original source of this code is the Mach 3.0 distribution from CMU. 4 | It was subsequently modified by the University of Utah and the GNU Project. 5 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | e227045b06d62ee7d2fbab9d5ade9030ff43170b is the last commit imported from CVS. 2 | All commits after that one have valid author and committer information. 3 | 4 | Use this to examine the change log for earlier changes: 5 | 6 | $ git show e227045b06d62ee7d2fbab9d5ade9030ff43170b:ChangeLog 7 | $ git show e227045b06d62ee7d2fbab9d5ade9030ff43170b:ChangeLog.0 8 | $ git show e227045b06d62ee7d2fbab9d5ade9030ff43170b:ChangeLog.00 9 | -------------------------------------------------------------------------------- /Makefile.in.dep.patch: -------------------------------------------------------------------------------- 1 | --- Makefile.in 2 | +++ Makefile.in 3 | @@ -4785,7 +4785,15 @@ distclean-compile: 4 | 5 | $(am__depfiles_remade): 6 | @$(MKDIR_P) $(@D) 7 | - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ 8 | + # Ugly bootstrap hack to get to-be-generated files created 9 | + # Try to guess what file this dependency file is from... 10 | + @f=$(srcdir)/`dirname "$(@D)"`/`basename "$@" .Po | sed s/lib[^-]\*-//` ; \ 11 | + for f in "$$f"*; do \ 12 | + case $$f in \ 13 | + *.c | *.S) echo "$$f"': $$(filter-out $$(DIST_SOURCES),$$(SOURCES))' ;; \ 14 | + *) echo '# dummy';; \ 15 | + esac ; \ 16 | + done >$@-t && $(am__mv) $@-t $@ 17 | 18 | am--depfiles: $(am__depfiles_remade) 19 | 20 | -------------------------------------------------------------------------------- /Makefile.in.rej: -------------------------------------------------------------------------------- 1 | --- Makefile.in 2 | +++ Makefile.in 3 | @@ -4785,7 +4785,15 @@ distclean-compile: 4 | 5 | $(am__depfiles_remade): 6 | @$(MKDIR_P) $(@D) 7 | - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ 8 | + # Ugly bootstrap hack to get to-be-generated files created 9 | + # Try to guess what file this dependency file is from... 10 | + @f=$(srcdir)/`dirname "$(@D)"`/`basename "$@" .Po | sed s/lib[^-]\*-//` ; \ 11 | + for f in "$$f"*; do \ 12 | + case $$f in \ 13 | + *.c | *.S) echo "$$f"': $$(filter-out $$(DIST_SOURCES),$$(SOURCES))' ;; \ 14 | + *) echo '# dummy';; \ 15 | + esac ; \ 16 | + done >$@-t && $(am__mv) $@-t $@ 17 | 18 | am--depfiles: $(am__depfiles_remade) 19 | 20 | -------------------------------------------------------------------------------- /Makerules.am: -------------------------------------------------------------------------------- 1 | # Makerules: how to do some things. 2 | 3 | # Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. 4 | 5 | # Permission to use, copy, modify and distribute this software and its 6 | # documentation is hereby granted, provided that both the copyright 7 | # notice and this permission notice appear in all copies of the 8 | # software, derivative works or modified versions, and any portions 9 | # thereof, and that both notices appear in supporting documentation. 10 | # 11 | # THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS 12 | # "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY 13 | # LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE 14 | # USE OF THIS SOFTWARE. 15 | 16 | # 17 | # Building foo.h from foo.sym. 18 | # 19 | 20 | EXTRA_DIST += \ 21 | gensym.awk 22 | %.symc: %.sym gensym.awk 23 | $(AWK_V) $(AWK) -f $(word 2,$^) $< > $@ 24 | %.symc.o: %.symc config.h 25 | $(AM_V_CC) $(COMPILE) -S -x c -o $@ $< 26 | %.h: %.symc.o 27 | $(AM_V_GEN) sed < $< > $@ \ 28 | -e 's/^[^*].*$$//' \ 29 | -e 's/^[*]/#define/' \ 30 | -e 's/mAgIc[^-0-9]*//' 31 | 32 | # Makerules.mig: how to do some MIG-related things. 33 | include Makerules.mig.am 34 | 35 | # 36 | # gzip files. 37 | # 38 | 39 | %.gz: % 40 | $(GZIP_V) $(GZIP) -9 < $< > $@ 41 | 42 | # 43 | # strip files. 44 | # 45 | 46 | %.stripped: % 47 | $(STRIP) -o $@ $< 48 | 49 | # 50 | # Echo target. 51 | # 52 | 53 | echo-%: 54 | @echo '$* = `$($*)'\' 55 | -------------------------------------------------------------------------------- /config.status.dep.patch: -------------------------------------------------------------------------------- 1 | --- config.status 2009-10-26 23:57:14.000000000 +0100 2 | +++ config.status.new 2009-10-27 00:04:26.000000000 +0100 3 | @@ -1553,7 +1553,14 @@ 4 | s/.*/./; q'` 5 | as_dir=$dirpart/$fdir; as_fn_mkdir_p 6 | # echo "creating $dirpart/$file" 7 | - echo '# dummy' > "$dirpart/$file" 8 | + # Try to guess what file this dependency file is from... 9 | + f=$srcdir/`dirname "$fdir"`/`basename "$file" .Po | sed s/lib[^-]\*-//` 10 | + for f in "$f"*; do 11 | + case $f in 12 | + *.c | *.S) echo "$f"': $(filter-out $(DIST_SOURCES),$(SOURCES))';; 13 | + *) echo '# dummy';; 14 | + esac 15 | + done > "$dirpart/$file" 16 | done 17 | done 18 | } 19 | -------------------------------------------------------------------------------- /configfrag-first.ac: -------------------------------------------------------------------------------- 1 | dnl Configure fragment for general options. 2 | 3 | dnl Copyright (C) 2020 Free Software Foundation, Inc. 4 | 5 | dnl Permission to use, copy, modify and distribute this software and its 6 | dnl documentation is hereby granted, provided that both the copyright 7 | dnl notice and this permission notice appear in all copies of the 8 | dnl software, derivative works or modified versions, and any portions 9 | dnl thereof, and that both notices appear in supporting documentation. 10 | dnl 11 | dnl THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS 12 | dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY 13 | dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE 14 | dnl USE OF THIS SOFTWARE. 15 | 16 | # 17 | # Common options 18 | # 19 | 20 | ncom=0 21 | nlpr=0 22 | 23 | AC_ARG_ENABLE([pae], 24 | AS_HELP_STRING([--enable-pae], [PAE support (ix86-only); on i386-at disabled 25 | by default, otherwise enabled by default])) 26 | 27 | dnl Local Variables: 28 | dnl mode: autoconf 29 | dnl End: 30 | -------------------------------------------------------------------------------- /ddb/db_aout.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _DDB_DB_AOUT_H_ 20 | #define _DDB_DB_AOUT_H_ 21 | 22 | #include 23 | #include 24 | 25 | extern boolean_t 26 | aout_db_line_at_pc( 27 | db_symtab_t *stab, 28 | db_sym_t sym, 29 | char **file, 30 | int *line, 31 | db_addr_t pc); 32 | 33 | extern db_sym_t 34 | aout_db_lookup( 35 | db_symtab_t *stab, 36 | char * symstr); 37 | 38 | extern db_sym_t 39 | aout_db_search_symbol( 40 | db_symtab_t * symtab, 41 | db_addr_t off, 42 | db_strategy_t strategy, 43 | db_expr_t *diffp); 44 | 45 | extern void 46 | aout_db_symbol_values( 47 | db_symtab_t *stab, 48 | db_sym_t sym, 49 | char **namep, 50 | db_expr_t *valuep); 51 | 52 | #endif /* _DDB_DB_AOUT_H_ */ 53 | -------------------------------------------------------------------------------- /ddb/db_cond.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * Author: Barry deFreese. 19 | */ 20 | 21 | #ifndef _DDB_DB_COND_H_ 22 | #define _DDB_DB_COND_H_ 23 | 24 | #include 25 | #include 26 | 27 | extern void db_cond_free (const db_thread_breakpoint_t bkpt); 28 | 29 | extern boolean_t db_cond_check (db_thread_breakpoint_t bkpt); 30 | 31 | extern void db_cond_print (db_thread_breakpoint_t bkpt); 32 | 33 | extern void db_cond_cmd (void); 34 | 35 | #endif /* _DDB_DB_COND_H_ */ 36 | -------------------------------------------------------------------------------- /ddb/db_elf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _DDB_DB_ELF_H_ 20 | #define _DDB_DB_ELF_H_ 21 | 22 | #include 23 | #include 24 | 25 | extern boolean_t 26 | elf_db_line_at_pc( 27 | db_symtab_t *stab, 28 | db_sym_t sym, 29 | char **file, 30 | int *line, 31 | db_addr_t pc); 32 | 33 | extern db_sym_t 34 | elf_db_lookup( 35 | db_symtab_t *stab, 36 | char * symstr); 37 | 38 | extern db_sym_t 39 | elf_db_search_symbol( 40 | db_symtab_t * symtab, 41 | db_addr_t off, 42 | db_strategy_t strategy, 43 | db_expr_t *diffp); 44 | 45 | extern void 46 | elf_db_symbol_values( 47 | db_symtab_t *stab, 48 | db_sym_t sym, 49 | char **namep, 50 | db_expr_t *valuep); 51 | 52 | #endif /* _DDB_DB_ELF_H_ */ 53 | -------------------------------------------------------------------------------- /ddb/db_expr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) Copyright 1992, 1993, 1994, 1995 OPEN SOFTWARE FOUNDATION, INC. 3 | * ALL RIGHTS RESERVED 4 | */ 5 | /* 6 | * OSF RI nmk19b2 5/2/95 7 | */ 8 | 9 | #ifndef _DDB_DB_EXPR_H_ 10 | #define _DDB_DB_EXPR_H_ 11 | 12 | #include 13 | #include 14 | 15 | 16 | /* Prototypes for functions exported by this module. 17 | */ 18 | 19 | int db_size_option( 20 | const char *modif, 21 | boolean_t *u_option, 22 | boolean_t *t_option); 23 | 24 | int db_expression(db_expr_t *valuep); 25 | 26 | #endif /* !_DDB_DB_EXPR_H_ */ 27 | -------------------------------------------------------------------------------- /ddb/db_input.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * Author: Barry deFreese. 19 | */ 20 | 21 | #ifndef _DDB_DB_INPUT_H_ 22 | #define _DDB_DB_INPUT_H_ 23 | 24 | #include 25 | 26 | extern int db_readline (char *lstart, int lsize); 27 | 28 | extern void db_check_interrupt(void); 29 | 30 | #endif /* _DDB_DB_INPUT_H_ */ 31 | -------------------------------------------------------------------------------- /ddb/db_macro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * Author: Barry deFreese. 19 | */ 20 | 21 | #ifndef _DDB_DB_MACRO_H_ 22 | #define _DDB_DB_MACRO_H_ 23 | 24 | #include 25 | #include 26 | 27 | extern void db_def_macro_cmd (void); 28 | 29 | extern void db_del_macro_cmd (void); 30 | 31 | extern void db_show_macro (void); 32 | 33 | extern int db_exec_macro (const char *name); 34 | 35 | extern void db_arg_variable ( 36 | struct db_variable *vp, 37 | db_expr_t *valuep, 38 | int flag, 39 | db_var_aux_param_t ap); 40 | 41 | #endif /* _DDB_DB_MACRO_H_ */ 42 | -------------------------------------------------------------------------------- /ddb/db_mp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _DDB_DB_MP_H_ 20 | #define _DDB_DB_MP_H_ 21 | 22 | void remote_db(void); 23 | void lock_db(void); 24 | void unlock_db(void); 25 | 26 | #if CONSOLE_ON_MASTER 27 | void db_console(void); 28 | #endif /* CONSOLE_ON_MASTER */ 29 | 30 | #endif /* _DDB_DB_MP_H_ */ 31 | -------------------------------------------------------------------------------- /ddb/db_print.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) Copyright 1992, 1993, 1994, 1995 OPEN SOFTWARE FOUNDATION, INC. 3 | * ALL RIGHTS RESERVED 4 | */ 5 | /* 6 | * OSF RI nmk19b2 5/2/95 7 | */ 8 | 9 | #ifndef _DDB_DB_PRINT_H_ 10 | #define _DDB_DB_PRINT_H_ 11 | 12 | #include 13 | #include 14 | 15 | /* Prototypes for functions exported by this module. 16 | */ 17 | void db_show_regs( 18 | db_expr_t addr, 19 | boolean_t have_addr, 20 | db_expr_t count, 21 | char *modif); 22 | 23 | void db_show_one_task( 24 | db_expr_t addr, 25 | boolean_t have_addr, 26 | db_expr_t count, 27 | const char * modif); 28 | 29 | void db_show_port_id( 30 | db_expr_t addr, 31 | boolean_t have_addr, 32 | db_expr_t count, 33 | const char * modif); 34 | 35 | void db_show_one_thread( 36 | db_expr_t addr, 37 | int have_addr, 38 | db_expr_t count, 39 | const char * modif); 40 | 41 | void db_show_all_tasks( 42 | db_expr_t addr, 43 | int have_addr, 44 | db_expr_t count, 45 | const char * modif); 46 | 47 | void db_show_all_threads( 48 | db_expr_t addr, 49 | int have_addr, 50 | db_expr_t count, 51 | const char * modif); 52 | 53 | db_addr_t db_task_from_space( 54 | ipc_space_t space, 55 | int *task_id); 56 | 57 | #endif /* !_DDB_DB_PRINT_H_ */ 58 | -------------------------------------------------------------------------------- /ddb/db_trap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * Author: Barry deFreese. 19 | */ 20 | 21 | #ifndef _DDB_DB_TRAP_H_ 22 | #define _DDB_DB_TRAP_H_ 23 | 24 | #include 25 | #include 26 | 27 | extern void db_task_trap ( 28 | int type, 29 | int code, 30 | boolean_t user_space); 31 | 32 | extern void db_trap (int type, int code); 33 | 34 | #endif /* _DDB_DB_TRAP_H_ */ 35 | -------------------------------------------------------------------------------- /ddb/db_write_cmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _DDB_DB_WRITE_CMD_H_ 20 | #define _DDB_DB_WRITE_CMD_H_ 21 | 22 | #include 23 | #include 24 | 25 | /* Prototypes for functions exported by this module. 26 | */ 27 | 28 | void db_write_cmd( 29 | db_expr_t address, 30 | boolean_t have_addr, 31 | db_expr_t count, 32 | const char * modif); 33 | 34 | #endif /* !_DDB_DB_WRITE_CMD_H_ */ 35 | -------------------------------------------------------------------------------- /device/blkio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _DEVICE_BLKIO_H_ 20 | #define _DEVICE_BLKIO_H_ 21 | 22 | extern vm_offset_t block_io_mmap(dev_t dev, vm_offset_t off, int prot); 23 | 24 | #endif /* _DEVICE_BLKIO_H_ */ 25 | -------------------------------------------------------------------------------- /device/chario.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _DEVICE_CHARIO_H_ 20 | #define _DEVICE_CHARIO_H_ 21 | 22 | #include 23 | 24 | extern void chario_init(void); 25 | 26 | void queue_delayed_reply( 27 | queue_t qh, 28 | io_req_t ior, 29 | boolean_t (*io_done)(io_req_t)); 30 | 31 | void tty_output(struct tty *tp); 32 | 33 | boolean_t char_open_done(io_req_t); 34 | boolean_t char_read_done(io_req_t); 35 | boolean_t char_write_done(io_req_t); 36 | 37 | #endif /* _DEVICE_CHARIO_H_ */ 38 | -------------------------------------------------------------------------------- /device/dev_pager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _DEVICE_DEV_PAGER_H_ 20 | #define _DEVICE_DEV_PAGER_H_ 21 | 22 | vm_offset_t device_map_page(void *dsp, vm_offset_t offset); 23 | 24 | boolean_t device_pager_data_request_done(io_req_t ior); 25 | 26 | #endif /* _DEVICE_DEV_PAGER_H_ */ 27 | -------------------------------------------------------------------------------- /device/device.srv: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | /* This is a server presentation file. */ 24 | 25 | #define KERNEL_SERVER 1 26 | 27 | #include 28 | -------------------------------------------------------------------------------- /device/device_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _DEVICE_DEVICE_INIT_H_ 20 | #define _DEVICE_DEVICE_INIT_H_ 21 | 22 | extern void device_service_create(void); 23 | 24 | #endif /* _DEVICE_DEVICE_INIT_H_ */ 25 | -------------------------------------------------------------------------------- /device/device_port.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | /* 27 | * Author: David B. Golub, Carnegie Mellon University 28 | * Date: 8/89 29 | */ 30 | 31 | #ifndef _DEVICE_DEVICE_PORT_H_ 32 | #define _DEVICE_DEVICE_PORT_H_ 33 | 34 | #include 35 | 36 | /* 37 | * Master privileged port for this host's device service 38 | */ 39 | extern ipc_port_t master_device_port; 40 | 41 | #endif /* _DEVICE_DEVICE_PORT_H_ */ 42 | -------------------------------------------------------------------------------- /device/device_reply.cli: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | /* This is a client presentation file. */ 24 | 25 | #define KERNEL_USER 1 26 | 27 | #include 28 | -------------------------------------------------------------------------------- /device/kmsg.h: -------------------------------------------------------------------------------- 1 | #ifndef _DEVICE_KMSG_H_ 2 | #define _DEVICE_KMSG_H_ 1 3 | 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | io_return_t kmsgopen (dev_t dev, int flag, io_req_t ior); 11 | void kmsgclose (dev_t dev, int flag); 12 | io_return_t kmsgread (dev_t dev, io_req_t ior); 13 | io_return_t kmsggetstat (dev_t dev, dev_flavor_t flavor, 14 | dev_status_t data, mach_msg_type_number_t *count); 15 | void kmsg_putchar (int c); 16 | 17 | 18 | #endif /* !_DEVICE_KMSG_H_ */ 19 | -------------------------------------------------------------------------------- /device/memory_object_reply.cli: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | /* This is a client presentation file. */ 24 | 25 | #define KERNEL_USER 1 26 | 27 | #include 28 | -------------------------------------------------------------------------------- /device/subrs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Random device functions 3 | * Copyright (C) 2008 Free Software Foundation, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18 | * 19 | * Author: Barry deFreese. 20 | */ 21 | /* 22 | * Random device functions. 23 | * 24 | */ 25 | 26 | #ifndef _SUBRS_H_ 27 | #define _SUBRS_H_ 28 | 29 | #include 30 | #include 31 | 32 | extern void if_init_queues(struct ifnet *ifp); 33 | 34 | extern void sleep (vm_offset_t channel, int priority); 35 | extern void wakeup (vm_offset_t channel); 36 | 37 | #endif /* _SUBRS_H_ */ 38 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | /*.info 2 | /*.info-* 3 | /stamp-vti 4 | /version.texi 5 | -------------------------------------------------------------------------------- /doc/mach.texi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlmuHS/GNUMach_SMP/c49bfa6a2755af9b633995c8c18c5c622717b0f3/doc/mach.texi -------------------------------------------------------------------------------- /i386/i386/.gitignore: -------------------------------------------------------------------------------- 1 | /i386asm.h 2 | -------------------------------------------------------------------------------- /i386/i386/ast_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | #ifndef _I386_AST_TYPES_H_ 28 | #define _I386_AST_TYPES_H_ 29 | 30 | /* 31 | * Data type for remote ast_check() invocation support. Currently 32 | * not implemented. Do this first to avoid include problems. 33 | */ 34 | typedef int ast_check_t; 35 | 36 | #endif /* _I386_AST_TYPES_H_ */ 37 | -------------------------------------------------------------------------------- /i386/i386/db_trace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _I386_DB_TRACE_H_ 20 | #define _I386_DB_TRACE_H_ 21 | 22 | struct i386_frame; 23 | 24 | void 25 | db_i386_stack_trace( 26 | thread_t th, 27 | struct i386_frame *frame, 28 | db_addr_t callpc, 29 | db_expr_t count, 30 | int flags); 31 | 32 | #endif /* _I386_DB_TRACE_H_ */ 33 | -------------------------------------------------------------------------------- /i386/i386/eflags.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | #ifndef _KERNEL_I386_EFLAGS_H_ 27 | #define _KERNEL_I386_EFLAGS_H_ 28 | 29 | #include 30 | 31 | /* Eflags bit combinations used by the Mach kernel. */ 32 | #define EFL_USER_SET (EFL_IF) 33 | #define EFL_USER_CLEAR (EFL_IOPL|EFL_NT|EFL_RF) 34 | 35 | #endif /* _KERNEL_I386_EFLAGS_H_ */ 36 | -------------------------------------------------------------------------------- /i386/i386/hardclock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _I386_HARDCLOCK_H_ 20 | #define _I386_HARDCLOCK_H_ 21 | 22 | void hardclock( 23 | int iunit, 24 | int old_ipl, 25 | int irq, 26 | char *ret_addr, 27 | struct i386_interrupt_state *regs); 28 | 29 | #endif /* _I386_HARDCLOCK_H_ */ 30 | -------------------------------------------------------------------------------- /i386/i386/irq.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 Free Software Foundation, Inc. 3 | * 4 | * Permission to use, copy, modify and distribute this software and its 5 | * documentation is hereby granted, provided that both the copyright 6 | * notice and this permission notice appear in all copies of the 7 | * software, derivative works or modified versions, and any portions 8 | * thereof, and that both notices appear in supporting documentation. 9 | * 10 | * THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 11 | * CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY LIABILITY OF ANY KIND 12 | * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 13 | */ 14 | 15 | #ifndef _I386_IRQ_H 16 | #define _I386_IRQ_H 17 | 18 | #include 19 | 20 | typedef unsigned int irq_t; 21 | 22 | void __enable_irq (irq_t irq); 23 | void __disable_irq (irq_t irq); 24 | 25 | extern struct irqdev irqtab; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /i386/i386/ktss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | #ifndef _I386_KTSS_ 24 | #define _I386_KTSS_ 25 | 26 | #include "tss.h" 27 | 28 | extern struct task_tss ktss; 29 | 30 | extern void ktss_init(void); 31 | 32 | #endif /* _I386_KTSS_ */ 33 | -------------------------------------------------------------------------------- /i386/i386/loose_ends.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Other useful functions? 3 | * Copyright (C) 2008 Free Software Foundation, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18 | * 19 | * Author: Barry deFreese. 20 | */ 21 | /* 22 | * Other useful functions? 23 | * 24 | */ 25 | 26 | #ifndef _LOOSE_ENDS_H_ 27 | #define _LOOSE_ENDS_H_ 28 | 29 | #include 30 | 31 | extern void delay (int n); 32 | 33 | #endif /* _LOOSE_ENDS_H_ */ 34 | -------------------------------------------------------------------------------- /i386/i386/mach_i386.srv: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | /* This is a server presentation file. */ 24 | 25 | #define KERNEL_SERVER 1 26 | 27 | #include 28 | -------------------------------------------------------------------------------- /i386/i386/mach_param.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | /* 27 | * Machine-dependent parameters for i386. 28 | */ 29 | 30 | #define HZ (100) 31 | /* clock tick each 10 ms. */ 32 | -------------------------------------------------------------------------------- /i386/i386/machine_routines.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | #ifndef _I386_MACHINE_ROUTINES_H_ 28 | #define _I386_MACHINE_ROUTINES_H_ 29 | 30 | /* 31 | * The i386 has a set of machine-dependent interfaces. 32 | */ 33 | #define MACHINE_SERVER mach_i386_server 34 | #define MACHINE_SERVER_HEADER "i386/i386/mach_i386.server.h" 35 | #define MACHINE_SERVER_ROUTINE mach_i386_server_routine 36 | 37 | #endif /* _I386_MACHINE_ROUTINES_H_ */ 38 | 39 | -------------------------------------------------------------------------------- /i386/i386/machspl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | /* XXX replaced by... */ 28 | #include 29 | 30 | -------------------------------------------------------------------------------- /i386/i386/pmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | #include 28 | -------------------------------------------------------------------------------- /i386/i386/sched_param.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | /* 27 | * Scheduler parameters. 28 | */ 29 | 30 | #ifndef _I386_SCHED_PARAM_H_ 31 | #define _I386_SCHED_PARAM_H_ 32 | 33 | /* 34 | * Sequent requires a right shift of 17 bits to convert 35 | * microseconds to priorities. 36 | */ 37 | 38 | #define PRI_SHIFT 17 39 | 40 | #endif /* _I386_SCHED_PARAM_H_ */ 41 | -------------------------------------------------------------------------------- /i386/i386/seg.c: -------------------------------------------------------------------------------- 1 | 2 | #define MACH_INLINE 3 | #include "seg.h" 4 | #include "tss.h" 5 | 6 | -------------------------------------------------------------------------------- /i386/i386/time_stamp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | /* 27 | * The i386 timestamp implementation uses the default, so we don't 28 | * need to do anything here. 29 | */ 30 | 31 | -------------------------------------------------------------------------------- /i386/i386/xpr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | /* 27 | * File: xpr.h 28 | * 29 | * Machine dependent module for the XPR tracing facility. 30 | */ 31 | 32 | #define XPR_TIMESTAMP (0) 33 | -------------------------------------------------------------------------------- /i386/i386at/autoconf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * Author: Barry deFreese. 19 | */ 20 | /* 21 | * Device auto configuration. 22 | * 23 | */ 24 | 25 | #ifndef _AUTOCONF_H_ 26 | #define _AUTOCONF_H_ 27 | 28 | #include 29 | #include 30 | 31 | /* 32 | * probeio: 33 | * 34 | * Probe and subsequently attach devices out on the AT bus. 35 | * 36 | * 37 | */ 38 | void probeio(void); 39 | 40 | extern void take_dev_irq ( 41 | struct bus_device *dev); 42 | 43 | #endif /* _AUTOCONF_H_ */ 44 | -------------------------------------------------------------------------------- /i386/i386at/immc.h: -------------------------------------------------------------------------------- 1 | /* Declarations for the immediate console. 2 | 3 | Copyright (C) 2015 Free Software Foundation, Inc. 4 | 5 | This file is part of the GNU Mach. 6 | 7 | The GNU Mach is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License as 9 | published by the Free Software Foundation; either version 2, or (at 10 | your option) any later version. 11 | 12 | The GNU Mach is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with the GNU Mach. If not, see . */ 19 | 20 | #ifndef _IMMC_H_ 21 | #define _IMMC_H_ 22 | 23 | #include 24 | 25 | int immc_cnprobe(struct consdev *cp); 26 | int immc_cninit(struct consdev *cp); 27 | int immc_cngetc(dev_t dev, int wait); 28 | int immc_cnputc(dev_t dev, int c); 29 | void immc_romputc(char c); 30 | 31 | #endif /* _IMMC_H_ */ 32 | -------------------------------------------------------------------------------- /i386/i386at/int_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | 24 | #include 25 | #include 26 | 27 | /* defined in locore.S */ 28 | extern vm_offset_t int_entry_table[]; 29 | 30 | void int_init(void) 31 | { 32 | int i; 33 | 34 | for (i = 0; i < 16; i++) 35 | fill_idt_gate(PIC_INT_BASE + i, 36 | int_entry_table[i], KERNEL_CS, 37 | ACC_PL_K|ACC_INTR_GATE, 0); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /i386/i386at/int_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * Author: Barry deFreese. 19 | */ 20 | /* 21 | * Initialization functions. 22 | * 23 | */ 24 | 25 | #ifndef _INT_INIT_H_ 26 | #define _INT_INIT_H_ 27 | 28 | #include 29 | 30 | #ifndef __ASSEMBLER__ 31 | extern void int_init (void); 32 | #endif /* __ASSEMBLER__ */ 33 | 34 | #endif /* _INT_INIT_H_ */ 35 | -------------------------------------------------------------------------------- /i386/i386at/mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _MEM_H_ 20 | #define _MEM_H_ 21 | 22 | extern vm_offset_t memmmap(dev_t dev, vm_offset_t off, vm_prot_t prot); 23 | 24 | #endif /* _MEM_H_ */ 25 | -------------------------------------------------------------------------------- /i386/i386at/model_dep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _MODEL_DEP_H_ 20 | #define _MODEL_DEP_H_ 21 | 22 | #include 23 | #include 24 | 25 | /* 26 | * Interrupt stack. 27 | */ 28 | extern vm_offset_t int_stack_top, int_stack_base; 29 | extern unsigned kernel_page_dir_addr, pdpbase_addr; 30 | 31 | 32 | /* Check whether P points to the interrupt stack. */ 33 | #define ON_INT_STACK(P) (((P) & ~(KERNEL_STACK_SIZE-1)) == int_stack_base) 34 | 35 | extern vm_offset_t timemmap(dev_t dev, vm_offset_t off, vm_prot_t prot); 36 | 37 | void inittodr(void); 38 | 39 | boolean_t init_alloc_aligned(vm_size_t size, vm_offset_t *addrp); 40 | 41 | #endif /* _MODEL_DEP_H_ */ 42 | -------------------------------------------------------------------------------- /i386/include/mach/i386/boolean.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | /* 27 | * File: boolean.h 28 | * 29 | * Boolean type, for I386. 30 | */ 31 | 32 | #ifndef _MACH_I386_BOOLEAN_H_ 33 | #define _MACH_I386_BOOLEAN_H_ 34 | 35 | typedef int boolean_t; 36 | 37 | #endif /* _MACH_I386_BOOLEAN_H_ */ 38 | -------------------------------------------------------------------------------- /i386/include/mach/i386/ioccom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1982, 1986 Regents of the University of California. 3 | * All rights reserved. The Berkeley software License Agreement 4 | * specifies the terms and conditions for redistribution. 5 | */ 6 | 7 | #ifndef __sys_ioccom_h 8 | #define __sys_ioccom_h 9 | 10 | /* 11 | * Ioctl's have the command encoded in the lower word, 12 | * and the size of any in or out parameters in the upper 13 | * word. The high 2 bits of the upper word are used 14 | * to encode the in/out status of the parameter; for now 15 | * we restrict parameters to at most 255 bytes. 16 | */ 17 | #define _IOCPARM_MASK 0xff /* parameters must be < 256 bytes */ 18 | #define _IOC_VOID 0x20000000 /* no parameters */ 19 | #define _IOC_OUT 0x40000000 /* copy out parameters */ 20 | #define _IOC_IN 0x80000000 /* copy in parameters */ 21 | #define _IOC_INOUT (_IOC_IN|_IOC_OUT) 22 | /* the 0x20000000 is so we can distinguish new ioctl's from old */ 23 | #define _IO(x,y) (_IOC_VOID|('x'<<8)|y) 24 | #define _IOR(x,y,t) (_IOC_OUT|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y) 25 | #define _IORN(x,y,t) (_IOC_OUT|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y) 26 | #define _IOW(x,y,t) (_IOC_IN|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y) 27 | #define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y) 28 | /* this should be _IORW, but stdio got there first */ 29 | #define _IOWR(x,y,t) (_IOC_INOUT|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y) 30 | #define _IOWRN(x,y,t) (_IOC_INOUT|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y) 31 | 32 | #endif /* !__sys_ioccom_h */ 33 | -------------------------------------------------------------------------------- /i386/include/mach/i386/kern_return.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | /* 27 | * File: kern_return.h 28 | * Author: Avadis Tevanian, Jr., Michael Wayne Young 29 | * Date: 1985 30 | * 31 | * Machine-dependent kernel return definitions. 32 | */ 33 | 34 | #ifndef _MACH_I386_KERN_RETURN_H_ 35 | #define _MACH_I386_KERN_RETURN_H_ 36 | 37 | #ifndef __ASSEMBLER__ 38 | typedef int kern_return_t; 39 | #endif /* __ASSEMBLER__ */ 40 | #endif /* _MACH_I386_KERN_RETURN_H_ */ 41 | -------------------------------------------------------------------------------- /i386/intel/read_fault.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Kernel read_fault on i386 functions 3 | * Copyright (C) 2008 Free Software Foundation, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18 | * 19 | * Author: Barry deFreese. 20 | */ 21 | /* 22 | * Kernel read_fault on i386 functions. 23 | * 24 | */ 25 | 26 | #ifndef _READ_FAULT_H_ 27 | #define _READ_FAULT_H_ 28 | 29 | #include 30 | 31 | extern kern_return_t intel_read_fault( 32 | vm_map_t map, 33 | vm_offset_t vaddr); 34 | 35 | #endif /* _READ_FAULT_H_ */ 36 | -------------------------------------------------------------------------------- /i386/linux/Makefrag.am: -------------------------------------------------------------------------------- 1 | # Makefile fragment for i386-specific Linux code. 2 | 3 | # Copyright (C) 2006, 2007 Free Software Foundation, Inc. 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; either version 2, or (at your option) any later 8 | # version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 | # for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program; if not, write to the Free Software Foundation, Inc., 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | # 20 | # Files for device driver support. 21 | # 22 | 23 | liblinux_a_SOURCES += \ 24 | i386/linux/dev/include/linux/autoconf.h \ 25 | linux/src/arch/i386/lib/semaphore.S 26 | -------------------------------------------------------------------------------- /i386/xen/Makefrag.am: -------------------------------------------------------------------------------- 1 | # Makefile fragment for the ix86 specific part of the Xen platform. 2 | 3 | # Copyright (C) 2007 Free Software Foundation, Inc. 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; either version 2, or (at your option) any later 8 | # version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 | # for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program; if not, write to the Free Software Foundation, Inc., 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | # 20 | # Xen support. 21 | # 22 | 23 | libkernel_a_SOURCES += \ 24 | i386/xen/xen.c \ 25 | i386/xen/xen_locore.S \ 26 | i386/xen/xen_boothdr.S 27 | 28 | 29 | if PLATFORM_xen 30 | gnumach_LINKFLAGS += \ 31 | --defsym _START=0xC0000000 \ 32 | --defsym _START_MAP=0xC0000000 \ 33 | -T '$(srcdir)'/i386/ldscript 34 | endif 35 | -------------------------------------------------------------------------------- /imps/impsasm.sym: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | 24 | #include "apic.h" 25 | 26 | expr APIC_LOCAL_VA 27 | 28 | offset ApicLocalUnit apic_local unit_id 29 | 30 | -------------------------------------------------------------------------------- /include/alloca.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory (CSL). All rights reserved. 4 | * 5 | * Permission to use, copy, modify and distribute this software and its 6 | * documentation is hereby granted, provided that both the copyright 7 | * notice and this permission notice appear in all copies of the 8 | * software, derivative works or modified versions, and any portions 9 | * thereof, and that both notices appear in supporting documentation. 10 | * 11 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 12 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 13 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 14 | * 15 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 16 | * improvements that they make and grant CSL redistribution rights. 17 | * 18 | * Author: Bryan Ford, University of Utah CSL 19 | */ 20 | #ifndef _MACH_ALLOCA_H_ 21 | #define _MACH_ALLOCA_H_ 22 | 23 | #define alloca(size) __builtin_alloca(size) 24 | 25 | #endif /* _MACH_ALLOCA_H_ */ 26 | -------------------------------------------------------------------------------- /include/cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #ifndef _MACH_CACHE_H_ 19 | #define _MACH_CACHE_H_ 20 | 21 | /* This macro can be used to align statically allocated objects so 22 | that they start at a cache line. */ 23 | #define __cacheline_aligned __attribute__((aligned(1 << CPU_L1_SHIFT))) 24 | 25 | #endif /* _MACH_CACHE_H_ */ 26 | -------------------------------------------------------------------------------- /include/device/notify.defs: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | subsystem notify 100; 28 | 29 | #include 30 | 31 | serverprefix do_; 32 | serverdemux device_intr_notify_server; 33 | 34 | simpleroutine device_intr_notify( 35 | notify : notify_port_t; 36 | id : int); 37 | -------------------------------------------------------------------------------- /include/device/notify.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Free Software Foundation, Inc. 3 | * 4 | * Permission to use, copy, modify and distribute this software and its 5 | * documentation is hereby granted, provided that both the copyright 6 | * notice and this permission notice appear in all copies of the 7 | * software, derivative works or modified versions, and any portions 8 | * thereof, and that both notices appear in supporting documentation. 9 | * 10 | * THE FREE SOFTWARE FOUNDATIONALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 11 | * CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY LIABILITY OF ANY KIND 12 | * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 13 | */ 14 | 15 | /* 16 | * Device notification definitions. 17 | */ 18 | 19 | #ifndef _MACH_DEVICE_NOTIFY_H_ 20 | #define _MACH_DEVICE_NOTIFY_H_ 21 | 22 | #include 23 | #include 24 | 25 | typedef struct 26 | { 27 | mach_msg_header_t intr_header; 28 | mach_msg_type_t intr_type; 29 | int id; 30 | } device_intr_notification_t; 31 | 32 | #define DEVICE_INTR_NOTIFY 100 33 | 34 | #endif /* _MACH_DEVICE_NOTIFY_H_ */ 35 | -------------------------------------------------------------------------------- /include/mach/alert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993,1994 The University of Utah and 3 | * the Computer Systems Laboratory (CSL). All rights reserved. 4 | * 5 | * Permission to use, copy, modify and distribute this software and its 6 | * documentation is hereby granted, provided that both the copyright 7 | * notice and this permission notice appear in all copies of the 8 | * software, derivative works or modified versions, and any portions 9 | * thereof, and that both notices appear in supporting documentation. 10 | * 11 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 12 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 13 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 14 | * 15 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 16 | * improvements that they make and grant CSL redistribution rights. 17 | * 18 | * Author: Bryan Ford, University of Utah CSL 19 | */ 20 | /* 21 | * File: mach/alert.h 22 | * 23 | * Standard alert definitions 24 | * 25 | */ 26 | 27 | #ifndef _MACH_ALERT_H_ 28 | #define _MACH_ALERT_H_ 29 | 30 | #define ALERT_BITS 32 /* Minimum; more may actually be available */ 31 | 32 | #define ALERT_ABORT_STRONG 0x00000001 /* Request to abort _all_ operations */ 33 | #define ALERT_ABORT_SAFE 0x00000002 /* Request to abort restartable operations */ 34 | 35 | #define ALERT_USER 0xffff0000 /* User-defined alert bits */ 36 | 37 | #endif /* _MACH_ALERT_H_ */ 38 | -------------------------------------------------------------------------------- /include/mach/experimental.defs: -------------------------------------------------------------------------------- 1 | subsystem 2 | #if KERNEL_USER 3 | KernelUser 4 | #endif /* KERNEL_USER */ 5 | #if KERNEL_SERVER 6 | KernelServer 7 | #endif /* KERNEL_SERVER */ 8 | experimental 424242; 9 | 10 | #include 11 | #include 12 | 13 | serverprefix experimental_; 14 | 15 | /* This is free for experimenting RPCs, with no backward compatibility guarantees. */ 16 | -------------------------------------------------------------------------------- /include/mach/inline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Center for Software Science (CSS). All rights reserved. 4 | * 5 | * Permission to use, copy, modify and distribute this software and its 6 | * documentation is hereby granted, provided that both the copyright 7 | * notice and this permission notice appear in all copies of the 8 | * software, derivative works or modified versions, and any portions 9 | * thereof, and that both notices appear in supporting documentation. 10 | * 11 | * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 12 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF 13 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 14 | * 15 | * CSS requests users of this software to return to css-dist@cs.utah.edu any 16 | * improvements that they make and grant CSS redistribution rights. 17 | * 18 | * Author: Bryan Ford, University of Utah CSS 19 | */ 20 | #ifndef _MACH_INLINE_H_ 21 | #define _MACH_INLINE_H_ 22 | 23 | #ifndef MACH_INLINE 24 | #define MACH_INLINE extern __inline 25 | #endif 26 | 27 | #endif /* _MACH_INLINE_H_ */ 28 | -------------------------------------------------------------------------------- /include/mach/mach_param.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | /* 27 | * File: mach/mach_param.h 28 | * Author: Avadis Tevanian, Jr., Michael Wayne Young 29 | * Date: 1986 30 | * 31 | * Mach system sizing parameters 32 | */ 33 | 34 | #ifndef _MACH_MACH_PARAM_H_ 35 | #define _MACH_MACH_PARAM_H_ 36 | 37 | #define TASK_PORT_REGISTER_MAX 4 /* Number of "registered" ports */ 38 | 39 | #endif /* _MACH_MACH_PARAM_H_ */ 40 | -------------------------------------------------------------------------------- /include/mach/macro_help.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1988 Carnegie-Mellon University 4 | * All rights reserved. The CMU software License Agreement specifies 5 | * the terms and conditions for use and redistribution. 6 | */ 7 | 8 | #ifndef _MACRO_HELP_H_ 9 | #define _MACRO_HELP_H_ 1 10 | 11 | #define MACRO_BEGIN do { 12 | #define MACRO_END } while (0) 13 | 14 | #define MACRO_RETURN if (1) return 15 | 16 | #endif /* _MACRO_HELP_H_ */ 17 | 18 | 19 | -------------------------------------------------------------------------------- /include/mach/rpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993,1994 The University of Utah and 3 | * the Computer Systems Laboratory (CSL). All rights reserved. 4 | * 5 | * Permission to use, copy, modify and distribute this software and its 6 | * documentation is hereby granted, provided that both the copyright 7 | * notice and this permission notice appear in all copies of the 8 | * software, derivative works or modified versions, and any portions 9 | * thereof, and that both notices appear in supporting documentation. 10 | * 11 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 12 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 13 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 14 | * 15 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 16 | * improvements that they make and grant CSL redistribution rights. 17 | */ 18 | 19 | #ifndef MACH_RPC_H 20 | #define MACH_RPC_H 21 | 22 | #include 23 | #include 24 | 25 | /* 26 | * Description of a port passed up by the leaky-register RPC path 27 | * when it needs to perform translation. 28 | */ 29 | struct rpc_port_desc { 30 | mach_port_t name; 31 | mach_msg_type_name_t msgt_name; 32 | }; 33 | 34 | #endif /* MACH_RPC_H */ 35 | -------------------------------------------------------------------------------- /include/mach/thread_switch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | #ifndef _MACH_THREAD_SWITCH_H_ 28 | #define _MACH_THREAD_SWITCH_H_ 29 | 30 | /* 31 | * Constant definitions for thread_switch trap. 32 | */ 33 | 34 | #define SWITCH_OPTION_NONE 0 35 | #define SWITCH_OPTION_DEPRESS 1 36 | #define SWITCH_OPTION_WAIT 2 37 | 38 | #define valid_switch_option(opt) ((0 <= (opt)) && ((opt) <= 2)) 39 | 40 | #endif /* _MACH_THREAD_SWITCH_H_ */ 41 | -------------------------------------------------------------------------------- /include/mach/vm_sync.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Free Software Foundation 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * All Rights Reserved. 17 | */ 18 | 19 | #ifndef _MACH_VM_SYNC_H_ 20 | #define _MACH_VM_SYNC_H_ 21 | 22 | /* 23 | * Types defined: 24 | * 25 | * vm_sync_t VM synchronization flags 26 | */ 27 | 28 | typedef int vm_sync_t; 29 | 30 | /* 31 | * Synchronization values 32 | */ 33 | 34 | #define VM_SYNC_ASYNCHRONOUS ((vm_sync_t) 0x01) 35 | #define VM_SYNC_SYNCHRONOUS ((vm_sync_t) 0x02) 36 | #define VM_SYNC_INVALIDATE ((vm_sync_t) 0x04) 37 | #if 0 38 | /* Not supported yet. */ 39 | #define VM_SYNC_KILLPAGES ((vm_sync_t) 0x08) 40 | #define VM_SYNC_DEACTIVATE ((vm_sync_t) 0x10) 41 | #define VM_SYNC_CONTIGUOUS ((vm_sync_t) 0x20) 42 | #define VM_SYNC_REUSABLEPAGES ((vm_sync_t) 0x40) 43 | #endif 44 | 45 | #endif /* _MACH_VM_SYNC_H_ */ 46 | -------------------------------------------------------------------------------- /include/mach/vm_wire.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Free Software Foundation 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _MACH_VM_WIRE_H_ 20 | #define _MACH_VM_WIRE_H_ 21 | 22 | typedef int vm_wire_t; 23 | 24 | #define VM_WIRE_NONE 0 25 | #define VM_WIRE_CURRENT 1 26 | #define VM_WIRE_FUTURE 2 27 | 28 | #define VM_WIRE_ALL (VM_WIRE_CURRENT | VM_WIRE_FUTURE) 29 | 30 | #endif /* _MACH_VM_WIRE_H_ */ 31 | -------------------------------------------------------------------------------- /include/mach_debug/pc_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Permission to use, copy, modify and distribute this software and its 3 | * documentation is hereby granted, provided that both the copyright 4 | * notice and this permission notice appear in all copies of the 5 | * software, derivative works or modified versions, and any portions 6 | * thereof, and that both notices appear in supporting documentation. 7 | * 8 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 9 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 10 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 11 | * 12 | * Carnegie Mellon requests users of this software to return to 13 | * 14 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 15 | * School of Computer Science 16 | * Carnegie Mellon University 17 | * Pittsburgh PA 15213-3890 18 | * 19 | * any improvements or extensions that they make and grant Carnegie Mellon 20 | * the rights to redistribute these changes. 21 | */ 22 | /* 23 | * File: mach_debug/pc_info.h 24 | * Author: Brian Bershad 25 | * Date: January 1992 26 | * 27 | * Definitions for the PC sampling interface. 28 | */ 29 | 30 | #ifndef _MACH_DEBUG_PC_INFO_H_ 31 | #define _MACH_DEBUG_PC_INFO_H_ 32 | 33 | 34 | typedef struct sampled_pc { 35 | task_t task; 36 | thread_t thread; 37 | vm_offset_t pc; 38 | } sampled_pc_t; 39 | 40 | typedef sampled_pc_t *sampled_pc_array_t; 41 | typedef unsigned int sampled_pc_seqno_t; 42 | 43 | #endif /* _MACH_DEBUG_PC_INFO_H_ */ 44 | -------------------------------------------------------------------------------- /include/stddef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Free Software Foundation, Inc. 3 | * 4 | * This file is part of GNU Mach. 5 | * 6 | * GNU Mach is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation; either version 2, or (at your option) any later 9 | * version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef _STDDEF_H_ 22 | #define _STDDEF_H_ 23 | 24 | /* From GCC's `/lib/gcc/X/X/include/stddef.h'. */ 25 | 26 | /* Offset of member MEMBER in a struct of type TYPE. */ 27 | #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER) 28 | 29 | #endif /* _STDDEF_H_ */ 30 | -------------------------------------------------------------------------------- /ipc/ipc_kmsg_queue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1993 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | #ifndef _IPC_KMSG_QUEUE_H_ 27 | #define _IPC_KMSG_QUEUE_H_ 28 | struct ipc_kmsg_queue { 29 | struct ipc_kmsg *ikmq_base; }; 30 | #endif /* _IPC_KMSG_QUEUE_H_ */ 31 | 32 | -------------------------------------------------------------------------------- /ipc/ipc_machdep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | #ifndef _IPC_IPC_MACHDEP_H_ 28 | #define _IPC_IPC_MACHDEP_H_ 29 | 30 | /* 31 | * At times, we need to know the size of a port in bits 32 | */ 33 | 34 | /* 64 bit machines */ 35 | #if defined(__alpha) 36 | #define PORT_T_SIZE_IN_BITS 64 37 | #endif 38 | 39 | /* default, 32 bit machines */ 40 | #if !defined(PORT_T_SIZE_IN_BITS) 41 | #define PORT_T_SIZE_IN_BITS 32 42 | #endif 43 | 44 | #endif /* _IPC_IPC_MACHDEP_H_ */ 45 | -------------------------------------------------------------------------------- /ipc/ipc_print.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _IPC_PRINT_H_ 20 | #define _IPC_PRINT_H_ 21 | 22 | #if MACH_KDB 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | extern void ipc_port_print(const ipc_port_t); 30 | 31 | extern void ipc_pset_print(const ipc_pset_t); 32 | 33 | extern void ipc_kmsg_print(const ipc_kmsg_t); 34 | 35 | extern void ipc_msg_print(mach_msg_header_t*); 36 | 37 | #endif /* MACH_KDB */ 38 | 39 | #endif /* IPC_PRINT_H */ 40 | -------------------------------------------------------------------------------- /ipc/ipc_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995, 1994, 1993, 1992, 1991, 1990 3 | * Open Software Foundation, Inc. 4 | * 5 | * Permission to use, copy, modify, and distribute this software and 6 | * its documentation for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both the copyright notice and this permission notice appear in 9 | * supporting documentation, and that the name of ("OSF") or Open Software 10 | * Foundation not be used in advertising or publicity pertaining to 11 | * distribution of the software without specific, written prior permission. 12 | * 13 | * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 14 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 15 | * FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL OSF BE LIABLE FOR ANY 16 | * SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 18 | * ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING 19 | * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE 20 | */ 21 | /* 22 | * OSF Research Institute MK6.1 (unencumbered) 1/31/1995 23 | */ 24 | 25 | #ifndef _IPC_TYPES_H_ 26 | #define _IPC_TYPES_H_ 27 | 28 | typedef struct ipc_space *ipc_space_t; 29 | typedef struct ipc_port *ipc_port_t; 30 | 31 | #endif /* _IPC_TYPES_H_ */ 32 | -------------------------------------------------------------------------------- /ipc/mach_port.srv: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | /* This is a server presentation file. */ 24 | 25 | #define KERNEL_SERVER 1 26 | 27 | #include 28 | -------------------------------------------------------------------------------- /ipc/notify.defs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | /* We use custom functions to send notifications. These functions can 19 | be found in `ipc_notify.c'. We use this file merely to produce the 20 | list of message ids. */ 21 | 22 | #include 23 | -------------------------------------------------------------------------------- /kern/bootstrap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _KERN_BOOTSTRAP_H_ 20 | #define _KERN_BOOTSTRAP_H_ 21 | 22 | extern void bootstrap_create(void); 23 | 24 | #endif /* _KERN_BOOTSTRAP_H_ */ 25 | -------------------------------------------------------------------------------- /kern/cpu_number.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | //unsigned int master_cpu = 0; /* 'master' processor - keeps time */ 7 | 8 | int 9 | cpu_number() 10 | { 11 | if(lapic == 0 | ncpu == 1) return 0; 12 | else{ 13 | unsigned apic_id = lapic->apic_id.r; 14 | 15 | return apic2kernel[apic_id]; 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kern/exc.defs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | /* We use custom functions to send exceptions. These functions can 19 | be found in `exception.c'. We use this file merely to produce the 20 | list of message ids. */ 21 | 22 | #include 23 | -------------------------------------------------------------------------------- /kern/experimental.srv: -------------------------------------------------------------------------------- 1 | #define KERNEL_SERVER 1 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /kern/gnumach.srv: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | /* This is a server presentation file. */ 20 | 21 | #define KERNEL_SERVER 1 22 | 23 | #include 24 | -------------------------------------------------------------------------------- /kern/gsync.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2016 Free Software Foundation, Inc. 2 | Contributed by Agustina Arzille , 2016. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either 7 | version 2 of the license, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public 15 | License along with this program; if not, see 16 | . 17 | */ 18 | 19 | #ifndef _KERN_GSYNC_H_ 20 | #define _KERN_GSYNC_H_ 1 21 | 22 | #define GSYNC_SHARED 0x01 23 | #define GSYNC_QUAD 0x02 24 | #define GSYNC_TIMED 0x04 25 | #define GSYNC_BROADCAST 0x08 26 | #define GSYNC_MUTATE 0x10 27 | 28 | #include 29 | 30 | void gsync_setup (void); 31 | 32 | kern_return_t gsync_wait (task_t task, vm_offset_t addr, 33 | unsigned int lo, unsigned int hi, natural_t msec, int flags); 34 | 35 | kern_return_t gsync_wake (task_t task, 36 | vm_offset_t addr, unsigned int val, int flags); 37 | 38 | kern_return_t gsync_requeue (task_t task, vm_offset_t src_addr, 39 | vm_offset_t dst_addr, boolean_t wake_one, int flags); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /kern/ipc_sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1992,1991,1990 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | #ifndef _KERN_IPC_SCHED_H_ 28 | #define _KERN_IPC_SCHED_H_ 29 | 30 | #include 31 | 32 | #endif /* _KERN_IPC_SCHED_H_ */ 33 | -------------------------------------------------------------------------------- /kern/kalloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie Mellon 24 | * the rights to redistribute these changes. 25 | */ 26 | 27 | #ifndef _KERN_KALLOC_H_ 28 | #define _KERN_KALLOC_H_ 29 | 30 | #include 31 | #include 32 | 33 | extern vm_offset_t kalloc (vm_size_t size); 34 | extern void kfree (vm_offset_t data, vm_size_t size); 35 | 36 | extern void kalloc_init (void); 37 | 38 | #endif /* _KERN_KALLOC_H_ */ 39 | -------------------------------------------------------------------------------- /kern/log2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Richard Braun. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | * 18 | * Integer base 2 logarithm operations. 19 | */ 20 | 21 | #ifndef _KERN_LOG2_H 22 | #define _KERN_LOG2_H 23 | 24 | #include 25 | 26 | #ifdef __LP64__ 27 | #define LONG_BIT 64 28 | #else /* __LP64__ */ 29 | #define LONG_BIT 32 30 | #endif /* __LP64__ */ 31 | 32 | static inline unsigned int 33 | ilog2(unsigned long x) 34 | { 35 | assert(x != 0); 36 | return LONG_BIT - __builtin_clzl(x) - 1; 37 | } 38 | 39 | static inline unsigned int 40 | iorder2(unsigned long size) 41 | { 42 | assert(size != 0); 43 | 44 | if (size == 1) 45 | return 0; 46 | 47 | return ilog2(size - 1) + 1; 48 | } 49 | 50 | #endif /* _KERN_LOG2_H */ 51 | -------------------------------------------------------------------------------- /kern/mach4.srv: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory (CSL). All rights reserved. 4 | * 5 | * Permission to use, copy, modify and distribute this software is hereby 6 | * granted provided that (1) source code retains these copyright, permission, 7 | * and disclaimer notices, and (2) redistributions including binaries 8 | * reproduce the notices in supporting documentation, and (3) all advertising 9 | * materials mentioning features or use of this software display the following 10 | * acknowledgement: ``This product includes software developed by the 11 | * Computer Systems Laboratory at the University of Utah.'' 12 | * 13 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 14 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 15 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 16 | * 17 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 18 | * improvements that they make and grant CSL redistribution rights. 19 | * 20 | * Author: Bryan Ford, University of Utah CSL 21 | */ 22 | /* This is a server presentation file. */ 23 | 24 | #define KERNEL_SERVER 1 25 | 26 | #ifdef MIGRATING_THREADS 27 | #define thread_enable_pc_sampling act_enable_pc_sampling 28 | #define thread_disable_pc_sampling act_disable_pc_sampling 29 | #define thread_get_sampled_pcs act_get_sampled_pcs 30 | #endif /* MIGRATING_THREADS */ 31 | 32 | #include 33 | -------------------------------------------------------------------------------- /kern/mach_debug.srv: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory (CSL). All rights reserved. 4 | * 5 | * Permission to use, copy, modify and distribute this software is hereby 6 | * granted provided that (1) source code retains these copyright, permission, 7 | * and disclaimer notices, and (2) redistributions including binaries 8 | * reproduce the notices in supporting documentation, and (3) all advertising 9 | * materials mentioning features or use of this software display the following 10 | * acknowledgement: ``This product includes software developed by the 11 | * Computer Systems Laboratory at the University of Utah.'' 12 | * 13 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 14 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 15 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 16 | * 17 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 18 | * improvements that they make and grant CSL redistribution rights. 19 | * 20 | * Author: Bryan Ford, University of Utah CSL 21 | */ 22 | /* This is a server presentation file. */ 23 | 24 | #define KERNEL_SERVER 1 25 | 26 | #include 27 | -------------------------------------------------------------------------------- /kern/mach_factor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006, 2007 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * Author: Barry deFreese. 19 | */ 20 | /* 21 | * 22 | */ 23 | 24 | #ifndef _KERN_MACH_FACTOR_H_ 25 | #define _KERN_MACH_FACTOR_H_ 26 | 27 | #include 28 | 29 | extern void compute_mach_factor(void); 30 | 31 | #endif /* _KERN_MACH_FACTOR_H_ */ 32 | -------------------------------------------------------------------------------- /kern/priority.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _KERN_PRIORITY_H_ 20 | #define _KERN_PRIORITY_H_ 21 | 22 | extern void thread_quantum_update( 23 | int mycpu, 24 | thread_t thread, 25 | int nticks, 26 | int state); 27 | 28 | #endif /* _KERN_PRIORITY_H_ */ 29 | -------------------------------------------------------------------------------- /kern/startup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _KERN_STARTUP_H_ 20 | #define _KERN_STARTUP_H_ 21 | 22 | #include 23 | 24 | extern void setup_main(void); 25 | void cpu_launch_first_thread(thread_t th); 26 | void start_kernel_threads(void); 27 | 28 | #if NCPUS > 1 29 | void slave_main(); 30 | #endif 31 | 32 | #endif /* _KERN_STARTUP_H_ */ 33 | -------------------------------------------------------------------------------- /kern/task_notify.cli: -------------------------------------------------------------------------------- 1 | /* XXX */ 2 | 3 | /* This is a client presentation file. */ 4 | 5 | #define KERNEL_USER 1 6 | 7 | #include 8 | -------------------------------------------------------------------------------- /linux/dev/README: -------------------------------------------------------------------------------- 1 | This hierarchy used to contain modified files, based on files from the 2 | Linux kernel, as opposed to `../src/' containing only files that have not 3 | been modified (or have only been modified marginally). This policy is 4 | NOT adhered to any further, so please don't change (or even add) files 5 | below here, but instead merge the files in here back into `../src/' 6 | (which should really be called `../linux-2.0' or similar) or even better 7 | --- when adding large chunks --- create a more suitable hierarchy like 8 | we've done with `../pcmcia-cs/'. 9 | -------------------------------------------------------------------------------- /linux/dev/arch/i386/kernel/setup.c: -------------------------------------------------------------------------------- 1 | char x86 = 2 | #if defined(CONFIG_M386) 3 | 3; 4 | #elif defined(CONFIG_M486) 5 | 4; 6 | #elif defined(CONFIG_M586) 7 | 5; 8 | #elif defined(CONFIG_M686) 9 | 6; 10 | #else 11 | #error "CPU type is undefined!" 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /linux/dev/include/asm-i386/smp.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_SMP_H 2 | #define _I386_SMP_H 3 | 4 | #include 5 | 6 | #define smp_processor_id() cpu_number() 7 | 8 | #endif /* _I386_SMP_H */ 9 | -------------------------------------------------------------------------------- /linux/dev/include/asm-i386/uaccess.h: -------------------------------------------------------------------------------- 1 | /* Dummy file. */ 2 | -------------------------------------------------------------------------------- /linux/dev/include/linux/compile.h: -------------------------------------------------------------------------------- 1 | #define UTS_VERSION "#11 Fri Apr 24 23:03:10 JST 1998" 2 | #define LINUX_COMPILE_TIME "23:03:10" 3 | #define LINUX_COMPILE_BY "somebody" 4 | #define LINUX_COMPILE_HOST "unknown" 5 | #define LINUX_COMPILE_DOMAIN "somewhere.org" 6 | #define LINUX_COMPILER "gcc version 2.7.2.3" 7 | -------------------------------------------------------------------------------- /linux/dev/include/linux/malloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_MALLOC_H 2 | #define _LINUX_MALLOC_H 3 | 4 | #include 5 | #include 6 | 7 | #ifndef MACH_INCLUDE 8 | #define kmalloc linux_kmalloc 9 | #define kfree linux_kfree 10 | #define kfree_s linux_kfree_s 11 | #endif 12 | 13 | extern void *linux_kmalloc (unsigned int size, int priority); 14 | extern void linux_kfree (void *obj); 15 | 16 | #define linux_kfree_s(a,b) linux_kfree(a) 17 | 18 | #endif /* _LINUX_MALLOC_H */ 19 | -------------------------------------------------------------------------------- /linux/dev/include/linux/modversions.h: -------------------------------------------------------------------------------- 1 | /* Dummy file. */ 2 | -------------------------------------------------------------------------------- /linux/dev/include/linux/pm.h: -------------------------------------------------------------------------------- 1 | /* Dummy file. */ 2 | -------------------------------------------------------------------------------- /linux/dev/include/linux/threads.h: -------------------------------------------------------------------------------- 1 | /* Dummy file. */ 2 | -------------------------------------------------------------------------------- /linux/dev/init/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/version.c 3 | * 4 | * Copyright (C) 1992 Theodore Ts'o 5 | * 6 | * May be freely distributed as part of Linux. 7 | */ 8 | 9 | #define MACH_INCLUDE 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | /* make the "checkconfig" script happy: we really need to include config.h */ 16 | #ifdef CONFIG_BOGUS 17 | #endif 18 | 19 | #define version(a) Version_ ## a 20 | #define version_string(a) version(a) 21 | 22 | int version_string (LINUX_VERSION_CODE) = 0; 23 | 24 | struct new_utsname system_utsname = 25 | { 26 | UTS_SYSNAME, UTS_NODENAME, UTS_RELEASE, UTS_VERSION, 27 | UTS_MACHINE, UTS_DOMAINNAME 28 | }; 29 | 30 | const char *linux_banner = 31 | "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" 32 | LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; 33 | -------------------------------------------------------------------------------- /linux/dev/kernel/softirq.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/kernel/softirq.c 3 | * 4 | * Copyright (C) 1992 Linus Torvalds 5 | * 6 | * do_bottom_half() runs at normal kernel priority: all interrupts 7 | * enabled. do_bottom_half() is atomic with respect to itself: a 8 | * bottom_half handler need not be re-entrant. 9 | */ 10 | 11 | #define MACH_INCLUDE 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | int bh_mask_count[32]; 19 | unsigned int bh_active = 0; 20 | unsigned int bh_mask = 0; 21 | void (*bh_base[32]) (void); 22 | 23 | void 24 | linux_soft_intr (void) 25 | { 26 | unsigned int active; 27 | unsigned int mask, left; 28 | void (**bh) (void); 29 | 30 | sti (); 31 | bh = bh_base; 32 | active = bh_active & bh_mask; 33 | for (mask = 1, left = ~0; left & active; bh++, mask += mask, left += left) 34 | { 35 | if (mask & active) 36 | { 37 | void (*fn) (void); 38 | bh_active &= ~mask; 39 | fn = *bh; 40 | if (!fn) 41 | goto bad_bh; 42 | fn (); 43 | } 44 | } 45 | return; 46 | bad_bh: 47 | printk ("linux_soft_intr:bad interrupt handler entry %08x\n", mask); 48 | } 49 | -------------------------------------------------------------------------------- /linux/pcmcia-cs/include/linux/crc32.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMPAT_CRC32_H 2 | #define _COMPAT_CRC32_H 3 | 4 | #include 5 | 6 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,18)) 7 | 8 | #include_next 9 | 10 | #else 11 | 12 | static inline u_int ether_crc(int length, u_char *data) 13 | { 14 | static const u_int ethernet_polynomial = 0x04c11db7U; 15 | int crc = 0xffffffff; /* Initial value. */ 16 | 17 | while (--length >= 0) { 18 | u_char current_octet = *data++; 19 | int bit; 20 | for (bit = 0; bit < 8; bit++, current_octet >>= 1) { 21 | crc = (crc << 1) ^ 22 | ((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0); 23 | } 24 | } 25 | return crc; 26 | } 27 | 28 | static inline unsigned ether_crc_le(int length, unsigned char *data) 29 | { 30 | static unsigned const ethernet_polynomial_le = 0xedb88320U; 31 | unsigned int crc = 0xffffffff; /* Initial value. */ 32 | while(--length >= 0) { 33 | unsigned char current_octet = *data++; 34 | int bit; 35 | for (bit = 8; --bit >= 0; current_octet >>= 1) { 36 | if ((crc ^ current_octet) & 1) { 37 | crc >>= 1; 38 | crc ^= ethernet_polynomial_le; 39 | } else 40 | crc >>= 1; 41 | } 42 | } 43 | return crc; 44 | } 45 | 46 | #endif 47 | 48 | #endif /* _COMPAT_CRC32_H */ 49 | 50 | -------------------------------------------------------------------------------- /linux/pcmcia-cs/include/linux/slab.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMPAT_SLAB_H 2 | #define _COMPAT_SLAB_H 3 | 4 | #include 5 | 6 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) 7 | #include 8 | #else 9 | #include_next 10 | #endif 11 | 12 | #endif /* _COMPAT_SLAB_H */ 13 | -------------------------------------------------------------------------------- /linux/pcmcia-cs/include/pcmcia/version.h: -------------------------------------------------------------------------------- 1 | /* version.h 1.118 2003/12/20 07:16:36 (David Hinds) */ 2 | 3 | #define CS_PKG_RELEASE "3.2.8" 4 | #define CS_PKG_RELEASE_CODE 0x3208 5 | 6 | #define VERSION(v,p,s) (((v)<<16)+(p<<8)+s) 7 | 8 | #define CS_RELEASE CS_PKG_RELEASE 9 | #define CS_RELEASE_CODE CS_PKG_RELEASE_CODE 10 | -------------------------------------------------------------------------------- /linux/src/arch/i386/lib/delay.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Precise Delay Loops for i386 3 | * 4 | * Copyright (C) 1993 Linus Torvalds 5 | * Copyright (C) 1997 Martin Mares 6 | * 7 | * The __delay function must _NOT_ be inlined as its execution time 8 | * depends wildly on alignment on many x86 processors. The additional 9 | * jump magic is needed to get the timing stable on all the CPU's 10 | * we have to worry about. 11 | */ 12 | 13 | #include 14 | #include 15 | 16 | #ifdef __SMP__ 17 | #include 18 | #endif 19 | 20 | void __delay(unsigned long loops) 21 | { 22 | int d0; 23 | __asm__ __volatile__( 24 | "\tjmp 1f\n" 25 | ".align 16\n" 26 | "1:\tjmp 2f\n" 27 | ".align 16\n" 28 | "2:\tdecl %0\n\tjns 2b" 29 | :"=&a" (d0) 30 | :"0" (loops)); 31 | } 32 | 33 | inline void __const_udelay(unsigned long xloops) 34 | { 35 | int d0; 36 | __asm__("mull %0" 37 | :"=d" (xloops), "=&a" (d0) 38 | :"1" (xloops),"0" (loops_per_sec)); 39 | __delay(xloops); 40 | } 41 | 42 | void __udelay(unsigned long usecs) 43 | { 44 | __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ 45 | } 46 | -------------------------------------------------------------------------------- /linux/src/arch/i386/lib/semaphore.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/i386/lib/semaphore.S 3 | * 4 | * Copyright (C) 1996 Linus Torvalds 5 | */ 6 | 7 | #include 8 | 9 | /* 10 | * "down_failed" is called with the eventual return address 11 | * in %eax, and the address of the semaphore in %ecx. We need 12 | * to increment the number of waiters on the semaphore, 13 | * call "__down()", and then eventually return to try again. 14 | */ 15 | ENTRY(down_failed) 16 | pushl %eax 17 | pushl %ecx 18 | call SYMBOL_NAME(__down) 19 | popl %ecx 20 | ret 21 | 22 | ENTRY(up_wakeup) 23 | pushl %eax 24 | pushl %ecx 25 | call SYMBOL_NAME(__up) 26 | popl %ecx 27 | ret 28 | 29 | ENTRY(down_failed_interruptible) 30 | pushl %eax 31 | pushl %ecx 32 | call SYMBOL_NAME(__down_interruptible) 33 | popl %ecx 34 | ret 35 | 36 | -------------------------------------------------------------------------------- /linux/src/drivers/net/iow.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASM_IOW_H 2 | #define _ASM_IOW_H 3 | 4 | /* no longer used */ 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /linux/src/drivers/scsi/aha152x.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlmuHS/GNUMach_SMP/c49bfa6a2755af9b633995c8c18c5c622717b0f3/linux/src/drivers/scsi/aha152x.c -------------------------------------------------------------------------------- /linux/src/drivers/scsi/constants.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONSTANTS_H 2 | #define _CONSTANTS_H 3 | extern int print_msg(unsigned char *); 4 | extern void print_status(int); 5 | extern void print_Scsi_Cmnd (Scsi_Cmnd *); 6 | #endif /* def _CONSTANTS_H */ 7 | -------------------------------------------------------------------------------- /linux/src/drivers/scsi/gdth_proc.h: -------------------------------------------------------------------------------- 1 | #ifndef _GDTH_PROC_H 2 | #define _GDTH_PROC_H 3 | 4 | /* gdth_proc.h 5 | * $Id: gdth_proc.h,v 1.1 1999/04/26 05:54:39 tb Exp $ 6 | */ 7 | 8 | static int gdth_set_info(char *buffer,int length,int vh,int hanum,int busnum); 9 | static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Cmnd scp); 10 | static int gdth_set_bin_info(char *buffer,int length,int hanum,Scsi_Cmnd scp); 11 | static int gdth_get_info(char *buffer,char **start,off_t offset, 12 | int length,int vh,int hanum,int busnum); 13 | 14 | static int gdth_ioctl_alloc(int hanum, ushort size); 15 | static void gdth_ioctl_free(int hanum, int id); 16 | static void gdth_wait_completion(int hanum, int busnum, int id); 17 | static void gdth_stop_timeout(int hanum, int busnum, int id); 18 | static void gdth_start_timeout(int hanum, int busnum, int id); 19 | static int gdth_update_timeout(int hanum, Scsi_Cmnd *scp, int timeout); 20 | 21 | void gdth_scsi_done(Scsi_Cmnd *scp); 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /linux/src/drivers/scsi/qlogicfas.h: -------------------------------------------------------------------------------- 1 | #ifndef _QLOGICFAS_H 2 | #define _QLOGICFAS_H 3 | 4 | int qlogicfas_detect(Scsi_Host_Template * ); 5 | const char * qlogicfas_info(struct Scsi_Host *); 6 | int qlogicfas_command(Scsi_Cmnd *); 7 | int qlogicfas_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); 8 | int qlogicfas_abort(Scsi_Cmnd *); 9 | int qlogicfas_reset(Scsi_Cmnd *, unsigned int flags); 10 | int qlogicfas_biosparam(Disk *, kdev_t, int[]); 11 | 12 | #ifndef NULL 13 | #define NULL (0) 14 | #endif 15 | 16 | #define QLOGICFAS { \ 17 | NULL, \ 18 | NULL, \ 19 | NULL, \ 20 | NULL, \ 21 | NULL, \ 22 | qlogicfas_detect, \ 23 | NULL, \ 24 | qlogicfas_info, \ 25 | qlogicfas_command, \ 26 | qlogicfas_queuecommand, \ 27 | qlogicfas_abort, \ 28 | qlogicfas_reset, \ 29 | NULL, \ 30 | qlogicfas_biosparam, \ 31 | 0, \ 32 | -1, \ 33 | SG_ALL, \ 34 | 1, \ 35 | 0, \ 36 | 0, \ 37 | DISABLE_CLUSTERING \ 38 | } 39 | 40 | #endif /* _QLOGICFAS_H */ 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /linux/src/drivers/scsi/sr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sr.h by David Giller 3 | * CD-ROM disk driver header file 4 | * 5 | * adapted from: 6 | * sd.h Copyright (C) 1992 Drew Eckhardt 7 | * SCSI disk driver header file by 8 | * Drew Eckhardt 9 | * 10 | * 11 | * 12 | * Modified by Eric Youngdale eric@aib.com to 13 | * add scatter-gather, multiple outstanding request, and other 14 | * enhancements. 15 | */ 16 | 17 | #ifndef _SR_H 18 | #define _SR_H 19 | 20 | #include "scsi.h" 21 | 22 | typedef struct 23 | { 24 | unsigned capacity; /* size in blocks */ 25 | unsigned sector_size; /* size in bytes */ 26 | Scsi_Device *device; 27 | unsigned long mpcd_sector; /* for reading multisession-CD's */ 28 | char xa_flags; /* some flags for handling XA-CD's */ 29 | unsigned char sector_bit_size; /* sector size = 2^sector_bit_size */ 30 | unsigned char sector_bit_shift; /* sectors/FS block = 2^sector_bit_shift*/ 31 | unsigned needs_sector_size:1; /* needs to get sector size */ 32 | unsigned ten:1; /* support ten byte commands */ 33 | unsigned remap:1; /* support remapping */ 34 | unsigned use:1; /* is this device still supportable */ 35 | unsigned auto_eject:1; /* auto-eject medium on last release. */ 36 | } Scsi_CD; 37 | 38 | extern Scsi_CD * scsi_CDs; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /linux/src/drivers/scsi/sym53c8xx.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlmuHS/GNUMach_SMP/c49bfa6a2755af9b633995c8c18c5c622717b0f3/linux/src/drivers/scsi/sym53c8xx.c -------------------------------------------------------------------------------- /linux/src/include/asm-i386/cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-i386/cache.h 3 | */ 4 | #ifndef __ARCH_I386_CACHE_H 5 | #define __ARCH_I386_CACHE_H 6 | 7 | /* bytes per L1 cache line */ 8 | #if CPU==586 || CPU==686 9 | #define L1_CACHE_BYTES 32 10 | #else 11 | #define L1_CACHE_BYTES 16 12 | #endif 13 | 14 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) 15 | 16 | #define SMP_CACHE_BYTES L1_CACHE_BYTES 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_DELAY_H 2 | #define _I386_DELAY_H 3 | 4 | /* 5 | * Copyright (C) 1993 Linus Torvalds 6 | * 7 | * Delay routines calling functions in arch/i386/lib/delay.c 8 | */ 9 | 10 | extern void __udelay(unsigned long usecs); 11 | extern void __const_udelay(unsigned long usecs); 12 | extern void __delay(unsigned long loops); 13 | 14 | #define udelay(n) (__builtin_constant_p(n) ? \ 15 | __const_udelay((n) * 0x10c6ul) : \ 16 | __udelay(n)) 17 | 18 | #endif /* defined(_I386_DELAY_H) */ 19 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/math_emu.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_MATH_EMU_H 2 | #define _I386_MATH_EMU_H 3 | 4 | #include 5 | 6 | void restore_i387_soft(struct _fpstate *buf); 7 | struct _fpstate * save_i387_soft(struct _fpstate * buf); 8 | 9 | struct fpu_reg { 10 | char sign; 11 | char tag; 12 | long exp; 13 | unsigned sigl; 14 | unsigned sigh; 15 | }; 16 | 17 | 18 | /* This structure matches the layout of the data saved to the stack 19 | following a device-not-present interrupt, part of it saved 20 | automatically by the 80386/80486. 21 | */ 22 | struct info { 23 | long ___orig_eip; 24 | long ___ret_from_system_call; 25 | long ___ebx; 26 | long ___ecx; 27 | long ___edx; 28 | long ___esi; 29 | long ___edi; 30 | long ___ebp; 31 | long ___eax; 32 | long ___ds; 33 | long ___es; 34 | long ___fs; 35 | long ___gs; 36 | long ___orig_eax; 37 | long ___eip; 38 | long ___cs; 39 | long ___eflags; 40 | long ___esp; 41 | long ___ss; 42 | long ___vm86_es; /* This and the following only in vm86 mode */ 43 | long ___vm86_ds; 44 | long ___vm86_fs; 45 | long ___vm86_gs; 46 | }; 47 | 48 | /* Interface for converting data between the emulator format 49 | * and the hardware format. Used for core dumping and for 50 | * ptrace(2) */ 51 | void hardreg_to_softreg(const char hardreg[10], 52 | struct fpu_reg *soft_reg); 53 | 54 | void softreg_to_hardreg(const struct fpu_reg *rp, char d[10], 55 | long int control_word); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/param.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMi386_PARAM_H 2 | #define _ASMi386_PARAM_H 3 | 4 | #ifndef HZ 5 | #define HZ 100 6 | #endif 7 | 8 | #define EXEC_PAGESIZE 4096 9 | 10 | #ifndef NGROUPS 11 | #define NGROUPS 32 12 | #endif 13 | 14 | #ifndef NOGROUP 15 | #define NOGROUP (-1) 16 | #endif 17 | 18 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/ptrace.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_PTRACE_H 2 | #define _I386_PTRACE_H 3 | 4 | #define EBX 0 5 | #define ECX 1 6 | #define EDX 2 7 | #define ESI 3 8 | #define EDI 4 9 | #define EBP 5 10 | #define EAX 6 11 | #define DS 7 12 | #define ES 8 13 | #define FS 9 14 | #define GS 10 15 | #define ORIG_EAX 11 16 | #define EIP 12 17 | #define CS 13 18 | #define EFL 14 19 | #define UESP 15 20 | #define SS 16 21 | 22 | 23 | /* this struct defines the way the registers are stored on the 24 | stack during a system call. */ 25 | 26 | struct pt_regs { 27 | long ebx; 28 | long ecx; 29 | long edx; 30 | long esi; 31 | long edi; 32 | long ebp; 33 | long eax; 34 | unsigned short ds, __dsu; 35 | unsigned short es, __esu; 36 | unsigned short fs, __fsu; 37 | unsigned short gs, __gsu; 38 | long orig_eax; 39 | long eip; 40 | unsigned short cs, __csu; 41 | long eflags; 42 | long esp; 43 | unsigned short ss, __ssu; 44 | }; 45 | 46 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ 47 | #define PTRACE_GETREGS 12 48 | #define PTRACE_SETREGS 13 49 | #define PTRACE_GETFPREGS 14 50 | #define PTRACE_SETFPREGS 15 51 | 52 | #ifdef __KERNEL__ 53 | #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->cs)) 54 | #define instruction_pointer(regs) ((regs)->eip) 55 | extern void show_regs(struct pt_regs *); 56 | struct task_struct; 57 | extern void get_pt_regs_for_task(struct pt_regs *, struct task_struct *p); 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/resource.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_RESOURCE_H 2 | #define _I386_RESOURCE_H 3 | 4 | /* 5 | * Resource limits 6 | */ 7 | 8 | #define RLIMIT_CPU 0 /* CPU time in ms */ 9 | #define RLIMIT_FSIZE 1 /* Maximum filesize */ 10 | #define RLIMIT_DATA 2 /* max data size */ 11 | #define RLIMIT_STACK 3 /* max stack size */ 12 | #define RLIMIT_CORE 4 /* max core file size */ 13 | #define RLIMIT_RSS 5 /* max resident set size */ 14 | #define RLIMIT_NPROC 6 /* max number of processes */ 15 | #define RLIMIT_NOFILE 7 /* max number of open files */ 16 | #define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ 17 | #define RLIMIT_AS 9 /* address space limit */ 18 | 19 | #define RLIM_NLIMITS 10 20 | 21 | #ifdef __KERNEL__ 22 | 23 | #define INIT_RLIMITS \ 24 | { \ 25 | { LONG_MAX, LONG_MAX }, \ 26 | { LONG_MAX, LONG_MAX }, \ 27 | { LONG_MAX, LONG_MAX }, \ 28 | { _STK_LIM, _STK_LIM }, \ 29 | { 0, LONG_MAX }, \ 30 | { LONG_MAX, LONG_MAX }, \ 31 | { MAX_TASKS_PER_USER, MAX_TASKS_PER_USER }, \ 32 | { NR_OPEN, NR_OPEN }, \ 33 | { LONG_MAX, LONG_MAX }, \ 34 | { LONG_MAX, LONG_MAX }, \ 35 | } 36 | 37 | #endif /* __KERNEL__ */ 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/sigcontext.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMi386_SIGCONTEXT_H 2 | #define _ASMi386_SIGCONTEXT_H 3 | 4 | /* 5 | * As documented in the iBCS2 standard.. 6 | * 7 | * The first part of "struct _fpstate" is just the 8 | * normal i387 hardware setup, the extra "status" 9 | * word is used to save the coprocessor status word 10 | * before entering the handler. 11 | */ 12 | struct _fpreg { 13 | unsigned short significand[4]; 14 | unsigned short exponent; 15 | }; 16 | 17 | struct _fpstate { 18 | unsigned long cw, 19 | sw, 20 | tag, 21 | ipoff, 22 | cssel, 23 | dataoff, 24 | datasel; 25 | struct _fpreg _st[8]; 26 | unsigned long status; 27 | }; 28 | 29 | struct sigcontext_struct { 30 | unsigned short gs, __gsh; 31 | unsigned short fs, __fsh; 32 | unsigned short es, __esh; 33 | unsigned short ds, __dsh; 34 | unsigned long edi; 35 | unsigned long esi; 36 | unsigned long ebp; 37 | unsigned long esp; 38 | unsigned long ebx; 39 | unsigned long edx; 40 | unsigned long ecx; 41 | unsigned long eax; 42 | unsigned long trapno; 43 | unsigned long err; 44 | unsigned long eip; 45 | unsigned short cs, __csh; 46 | unsigned long eflags; 47 | unsigned long esp_at_signal; 48 | unsigned short ss, __ssh; 49 | struct _fpstate * fpstate; 50 | unsigned long oldmask; 51 | unsigned long cr2; 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/socket.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASM_SOCKET_H 2 | #define _ASM_SOCKET_H 3 | 4 | #include 5 | 6 | /* For setsockoptions(2) */ 7 | #define SOL_SOCKET 1 8 | 9 | #define SO_DEBUG 1 10 | #define SO_REUSEADDR 2 11 | #define SO_TYPE 3 12 | #define SO_ERROR 4 13 | #define SO_DONTROUTE 5 14 | #define SO_BROADCAST 6 15 | #define SO_SNDBUF 7 16 | #define SO_RCVBUF 8 17 | #define SO_KEEPALIVE 9 18 | #define SO_OOBINLINE 10 19 | #define SO_NO_CHECK 11 20 | #define SO_PRIORITY 12 21 | #define SO_LINGER 13 22 | #define SO_BSDCOMPAT 14 23 | /* To add :#define SO_REUSEPORT 15 */ 24 | 25 | #define SO_BINDTODEVICE 25 26 | 27 | #endif /* _ASM_SOCKET_H */ 28 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/sockios.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARCH_I386_SOCKIOS__ 2 | #define __ARCH_I386_SOCKIOS__ 3 | 4 | /* Socket-level I/O control calls. */ 5 | #define FIOSETOWN 0x8901 6 | #define SIOCSPGRP 0x8902 7 | #define FIOGETOWN 0x8903 8 | #define SIOCGPGRP 0x8904 9 | #define SIOCATMARK 0x8905 10 | #define SIOCGSTAMP 0x8906 /* Get stamp */ 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/stat.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_STAT_H 2 | #define _I386_STAT_H 3 | 4 | struct old_stat { 5 | unsigned short st_dev; 6 | unsigned short st_ino; 7 | unsigned short st_mode; 8 | unsigned short st_nlink; 9 | unsigned short st_uid; 10 | unsigned short st_gid; 11 | unsigned short st_rdev; 12 | unsigned long st_size; 13 | unsigned long st_atime; 14 | unsigned long st_mtime; 15 | unsigned long st_ctime; 16 | }; 17 | 18 | struct new_stat { 19 | unsigned short st_dev; 20 | unsigned short __pad1; 21 | unsigned long st_ino; 22 | unsigned short st_mode; 23 | unsigned short st_nlink; 24 | unsigned short st_uid; 25 | unsigned short st_gid; 26 | unsigned short st_rdev; 27 | unsigned short __pad2; 28 | unsigned long st_size; 29 | unsigned long st_blksize; 30 | unsigned long st_blocks; 31 | unsigned long st_atime; 32 | unsigned long __unused1; 33 | unsigned long st_mtime; 34 | unsigned long __unused2; 35 | unsigned long st_ctime; 36 | unsigned long __unused3; 37 | unsigned long __unused4; 38 | unsigned long __unused5; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/statfs.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_STATFS_H 2 | #define _I386_STATFS_H 3 | 4 | #ifndef __KERNEL_STRICT_NAMES 5 | 6 | #include 7 | 8 | typedef __kernel_fsid_t fsid_t; 9 | 10 | #endif 11 | 12 | struct statfs { 13 | long f_type; 14 | long f_bsize; 15 | long f_blocks; 16 | long f_bfree; 17 | long f_bavail; 18 | long f_files; 19 | long f_ffree; 20 | __kernel_fsid_t f_fsid; 21 | long f_namelen; 22 | long f_spare[6]; 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/types.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_TYPES_H 2 | #define _I386_TYPES_H 3 | 4 | typedef unsigned short umode_t; 5 | 6 | /* 7 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 8 | * header files exported to user space 9 | */ 10 | 11 | typedef __signed__ char __s8; 12 | typedef unsigned char __u8; 13 | 14 | typedef __signed__ short __s16; 15 | typedef unsigned short __u16; 16 | 17 | typedef __signed__ int __s32; 18 | typedef unsigned int __u32; 19 | 20 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 21 | typedef __signed__ long long __s64; 22 | typedef unsigned long long __u64; 23 | #endif 24 | 25 | /* 26 | * These aren't exported outside the kernel to avoid name space clashes 27 | */ 28 | #ifdef __KERNEL__ 29 | 30 | typedef signed char s8; 31 | typedef unsigned char u8; 32 | 33 | typedef signed short s16; 34 | typedef unsigned short u16; 35 | 36 | typedef signed int s32; 37 | typedef unsigned int u32; 38 | 39 | typedef signed long long s64; 40 | typedef unsigned long long u64; 41 | 42 | #define BITS_PER_LONG 32 43 | 44 | #endif /* __KERNEL__ */ 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /linux/src/include/asm-i386/unaligned.h: -------------------------------------------------------------------------------- 1 | #ifndef __I386_UNALIGNED_H 2 | #define __I386_UNALIGNED_H 3 | 4 | /* 5 | * The i386 can do unaligned accesses itself. 6 | * 7 | * The strange macros are there to make sure these can't 8 | * be misused in a way that makes them not work on other 9 | * architectures where unaligned accesses aren't as simple. 10 | */ 11 | 12 | #define get_unaligned(ptr) (*(ptr)) 13 | 14 | #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /linux/src/include/linux/compiler-gcc3.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINUX_COMPILER_H 2 | #error "Please don't include directly, include instead." 3 | #endif 4 | 5 | #if __GNUC_MINOR__ < 2 6 | # error Sorry, your compiler is too old - please upgrade it. 7 | #endif 8 | 9 | #if __GNUC_MINOR__ >= 3 10 | # define __used __attribute__((__used__)) 11 | #else 12 | # define __used __attribute__((__unused__)) 13 | #endif 14 | 15 | #if __GNUC_MINOR__ >= 4 16 | #define __must_check __attribute__((warn_unused_result)) 17 | #endif 18 | 19 | #ifdef CONFIG_GCOV_KERNEL 20 | # if __GNUC_MINOR__ < 4 21 | # error "GCOV profiling support for gcc versions below 3.4 not included" 22 | # endif /* __GNUC_MINOR__ */ 23 | #endif /* CONFIG_GCOV_KERNEL */ 24 | -------------------------------------------------------------------------------- /linux/src/include/linux/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_CONFIG_H 2 | #define _LINUX_CONFIG_H 3 | 4 | #include 5 | 6 | /* 7 | * Defines for what uname() should return 8 | */ 9 | #ifndef UTS_SYSNAME 10 | #define UTS_SYSNAME "Linux" 11 | #endif 12 | 13 | #ifndef UTS_MACHINE 14 | #define UTS_MACHINE "unknown" 15 | #endif 16 | 17 | #ifndef UTS_NODENAME 18 | #define UTS_NODENAME "(none)" /* set by sethostname() */ 19 | #endif 20 | 21 | #ifndef UTS_DOMAINNAME 22 | #define UTS_DOMAINNAME "(none)" /* set by setdomainname() */ 23 | #endif 24 | 25 | /* 26 | * The definitions for UTS_RELEASE and UTS_VERSION are now defined 27 | * in linux/version.h, and should only be used by linux/version.c 28 | */ 29 | 30 | /* Shouldn't these be defined somewhere in a i386 definition? */ 31 | 32 | /* Don't touch these, unless you really know what you're doing. */ 33 | #define DEF_INITSEG 0x9000 34 | #define DEF_SYSSEG 0x1000 35 | #define DEF_SETUPSEG 0x9020 36 | #define DEF_SYSSIZE 0x7F00 37 | 38 | /* internal svga startup constants */ 39 | #define NORMAL_VGA 0xffff /* 80x25 mode */ 40 | #define EXTENDED_VGA 0xfffe /* 80x50 mode */ 41 | #define ASK_VGA 0xfffd /* ask for it at bootup */ 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /linux/src/include/linux/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_DELAY_H 2 | #define _LINUX_DELAY_H 3 | 4 | /* 5 | * Copyright (C) 1993 Linus Torvalds 6 | * 7 | * Delay routines, using a pre-computed "loops_per_second" value. 8 | */ 9 | 10 | extern unsigned long loops_per_sec; 11 | 12 | #include 13 | 14 | #endif /* defined(_LINUX_DELAY_H) */ 15 | -------------------------------------------------------------------------------- /linux/src/include/linux/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_ERRNO_H 2 | #define _LINUX_ERRNO_H 3 | 4 | #include 5 | 6 | #ifdef __KERNEL__ 7 | 8 | /* Should never be seen by user programs */ 9 | #define ERESTARTSYS 512 10 | #define ERESTARTNOINTR 513 11 | #define ERESTARTNOHAND 514 /* restart if no handler.. */ 12 | #define ENOIOCTLCMD 515 /* No ioctl command */ 13 | 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /linux/src/include/linux/fcntl.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_FCNTL_H 2 | #define _LINUX_FCNTL_H 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /linux/src/include/linux/fddidevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. INET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the FDDI handlers. 7 | * 8 | * Version: @(#)fddidevice.h 1.0.0 08/12/96 9 | * 10 | * Author: Lawrence V. Stefani, 11 | * 12 | * fddidevice.h is based on previous trdevice.h work by 13 | * Ross Biro, 14 | * Fred N. van Kempen, 15 | * Alan Cox, 16 | * 17 | * This program is free software; you can redistribute it and/or 18 | * modify it under the terms of the GNU General Public License 19 | * as published by the Free Software Foundation; either version 20 | * 2 of the License, or (at your option) any later version. 21 | */ 22 | #ifndef _LINUX_FDDIDEVICE_H 23 | #define _LINUX_FDDIDEVICE_H 24 | 25 | #include 26 | 27 | #ifdef __KERNEL__ 28 | extern int fddi_header(struct sk_buff *skb, 29 | struct device *dev, 30 | unsigned short type, 31 | void *daddr, 32 | void *saddr, 33 | unsigned len); 34 | extern int fddi_rebuild_header(void *buff, 35 | struct device *dev, 36 | unsigned long dest, 37 | struct sk_buff *skb); 38 | extern unsigned short fddi_type_trans(struct sk_buff *skb, 39 | struct device *dev); 40 | #endif 41 | 42 | #endif /* _LINUX_FDDIDEVICE_H */ 43 | -------------------------------------------------------------------------------- /linux/src/include/linux/head.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_HEAD_H 2 | #define _LINUX_HEAD_H 3 | 4 | typedef struct desc_struct { 5 | unsigned long a,b; 6 | } desc_table[256]; 7 | 8 | /* XXX Linux code shouldn't use idt/gdt directly */ 9 | /* extern desc_table idt,gdt; */ 10 | 11 | #define GDT_NUL 0 12 | #define GDT_CODE 1 13 | #define GDT_DATA 2 14 | #define GDT_TMP 3 15 | 16 | #define LDT_NUL 0 17 | #define LDT_CODE 1 18 | #define LDT_DATA 2 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /linux/src/include/linux/init.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMPAT_INIT_H 2 | #define _COMPAT_INIT_H 3 | 4 | #include 5 | 6 | #ifdef MODULE 7 | #define __exitused 8 | #else 9 | #define __exitused __used 10 | #endif 11 | 12 | #define __init 13 | #define __initdata 14 | #define __exit __exitused __cold notrace 15 | #define __exitdata 16 | #define __devinit 17 | #define __devinitdata 18 | #define __devexit 19 | #define __devexitdata 20 | 21 | #ifndef module_init 22 | #define module_init(x) 23 | #define module_exit(x) 24 | #endif 25 | 26 | #ifndef __devexit_p 27 | #define __devexit_p(x) (x) 28 | #endif 29 | 30 | #endif /* _COMPAT_INIT_H */ 31 | -------------------------------------------------------------------------------- /linux/src/include/linux/ioctl.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_IOCTL_H 2 | #define _LINUX_IOCTL_H 3 | 4 | #include 5 | 6 | #endif /* _LINUX_IOCTL_H */ 7 | 8 | -------------------------------------------------------------------------------- /linux/src/include/linux/ioport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * portio.h Definitions of routines for detecting, reserving and 3 | * allocating system resources. 4 | * 5 | * Version: 0.01 8/30/93 6 | * 7 | * Author: Donald Becker (becker@super.org) 8 | */ 9 | 10 | #ifndef _LINUX_PORTIO_H 11 | #define _LINUX_PORTIO_H 12 | 13 | #define HAVE_PORTRESERVE 14 | /* 15 | * Call check_region() before probing for your hardware. 16 | * Once you have found you hardware, register it with request_region(). 17 | * If you unload the driver, use release_region to free ports. 18 | */ 19 | extern void reserve_setup(char *str, int *ints); 20 | extern int check_region(unsigned int from, unsigned int extent); 21 | extern void request_region(unsigned int from, unsigned int extent,const char *name); 22 | extern void release_region(unsigned int from, unsigned int extent); 23 | extern int get_ioport_list(char *); 24 | 25 | 26 | #define HAVE_AUTOIRQ 27 | extern void *irq2dev_map[]; /* Use only if you own the IRQ. */ 28 | extern int autoirq_setup(int waittime); 29 | extern int autoirq_report(int waittime); 30 | 31 | #endif /* _LINUX_PORTIO_H */ 32 | -------------------------------------------------------------------------------- /linux/src/include/linux/kernel_stat.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_KERNEL_STAT_H 2 | #define _LINUX_KERNEL_STAT_H 3 | 4 | #include 5 | 6 | /* 7 | * 'kernel_stat.h' contains the definitions needed for doing 8 | * some kernel statistics (cpu usage, context switches ...), 9 | * used by rstatd/perfmeter 10 | */ 11 | 12 | #define DK_NDRIVE 4 13 | 14 | struct kernel_stat { 15 | unsigned int cpu_user, cpu_nice, cpu_system; 16 | unsigned int dk_drive[DK_NDRIVE]; 17 | unsigned int dk_drive_rio[DK_NDRIVE]; 18 | unsigned int dk_drive_wio[DK_NDRIVE]; 19 | unsigned int dk_drive_rblk[DK_NDRIVE]; 20 | unsigned int dk_drive_wblk[DK_NDRIVE]; 21 | unsigned int pgpgin, pgpgout; 22 | unsigned int pswpin, pswpout; 23 | unsigned int interrupts[NR_IRQS]; 24 | unsigned int ipackets, opackets; 25 | unsigned int ierrors, oerrors; 26 | unsigned int collisions; 27 | unsigned int context_swtch; 28 | }; 29 | 30 | extern struct kernel_stat kstat; 31 | 32 | #endif /* _LINUX_KERNEL_STAT_H */ 33 | -------------------------------------------------------------------------------- /linux/src/include/linux/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_LIMITS_H 2 | #define _LINUX_LIMITS_H 3 | 4 | #define NR_OPEN 256 5 | 6 | #define NGROUPS_MAX 32 /* supplemental group IDs are available */ 7 | #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ 8 | #define CHILD_MAX 999 /* no limit :-) */ 9 | #define OPEN_MAX 256 /* # open files a process may have */ 10 | #define LINK_MAX 127 /* # links a file may have */ 11 | #define MAX_CANON 255 /* size of the canonical input queue */ 12 | #define MAX_INPUT 255 /* size of the type-ahead buffer */ 13 | #define NAME_MAX 255 /* # chars in a file name */ 14 | #define PATH_MAX 1024 /* # chars in a path name */ 15 | #define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */ 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /linux/src/include/linux/linkage.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_LINKAGE_H 2 | #define _LINUX_LINKAGE_H 3 | 4 | #ifdef __cplusplus 5 | #define asmlinkage extern "C" 6 | #else 7 | #define asmlinkage 8 | #endif 9 | 10 | #ifdef __ELF__ 11 | #define SYMBOL_NAME_STR(X) #X 12 | #define SYMBOL_NAME(X) X 13 | #ifdef __STDC__ 14 | #define SYMBOL_NAME_LABEL(X) X##: 15 | #else 16 | #define SYMBOL_NAME_LABEL(X) X/**/: 17 | #endif 18 | #else 19 | #define SYMBOL_NAME_STR(X) "_"#X 20 | #ifdef __STDC__ 21 | #define SYMBOL_NAME(X) _##X 22 | #define SYMBOL_NAME_LABEL(X) _##X##: 23 | #else 24 | #define SYMBOL_NAME(X) _/**/X 25 | #define SYMBOL_NAME_LABEL(X) _/**/X/**/: 26 | #endif 27 | #endif 28 | 29 | #if !defined(__i486__) && !defined(__i586__) 30 | #ifdef __ELF__ 31 | #define __ALIGN .align 4,0x90 32 | #define __ALIGN_STR ".align 4,0x90" 33 | #else /* __ELF__ */ 34 | #define __ALIGN .align 2,0x90 35 | #define __ALIGN_STR ".align 2,0x90" 36 | #endif /* __ELF__ */ 37 | #else /* __i486__/__i586__ */ 38 | #ifdef __ELF__ 39 | #define __ALIGN .align 16,0x90 40 | #define __ALIGN_STR ".align 16,0x90" 41 | #else /* __ELF__ */ 42 | #define __ALIGN .align 4,0x90 43 | #define __ALIGN_STR ".align 4,0x90" 44 | #endif /* __ELF__ */ 45 | #endif /* __i486__/__i586__ */ 46 | 47 | #ifdef __ASSEMBLY__ 48 | 49 | #define ALIGN __ALIGN 50 | #define ALIGN_STRING __ALIGN_STRING 51 | 52 | #define ENTRY(name) \ 53 | .globl SYMBOL_NAME(name); \ 54 | ALIGN; \ 55 | SYMBOL_NAME_LABEL(name) 56 | 57 | #endif 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /linux/src/include/linux/malloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_MALLOC_H 2 | #define _LINUX_MALLOC_H 3 | 4 | #include 5 | 6 | void * kmalloc(unsigned int size, int priority); 7 | void kfree(void * obj); 8 | 9 | #define kfree_s(a,b) kfree(a) 10 | 11 | #endif /* _LINUX_MALLOC_H */ 12 | -------------------------------------------------------------------------------- /linux/src/include/linux/mount.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Definitions for mount interface. This describes the in the kernel build 4 | * linkedlist with mounted filesystems. 5 | * 6 | * Author: Marco van Wieringen 7 | * 8 | * Version: $Id: mount.h,v 1.1 1999/04/26 05:56:47 tb Exp $ 9 | * 10 | */ 11 | #ifndef _LINUX_MOUNT_H 12 | #define _LINUX_MOUNT_H 13 | 14 | struct vfsmount 15 | { 16 | kdev_t mnt_dev; /* Device this applies to */ 17 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ 18 | char *mnt_dirname; /* Name of directory mounted on */ 19 | unsigned int mnt_flags; /* Flags of this device */ 20 | struct semaphore mnt_sem; /* lock device while I/O in progress */ 21 | struct super_block *mnt_sb; /* pointer to superblock */ 22 | struct file *mnt_quotas[MAXQUOTAS]; /* fp's to quotafiles */ 23 | time_t mnt_iexp[MAXQUOTAS]; /* expiretime for inodes */ 24 | time_t mnt_bexp[MAXQUOTAS]; /* expiretime for blocks */ 25 | struct vfsmount *mnt_next; /* pointer to next in linkedlist */ 26 | }; 27 | 28 | struct vfsmount *lookup_vfsmnt(kdev_t dev); 29 | 30 | #endif /* _LINUX_MOUNT_H */ 31 | -------------------------------------------------------------------------------- /linux/src/include/linux/netrom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * These are the public elements of the Linux kernel NET/ROM implementation. 3 | * For kernel AX.25 see the file ax25.h. This file requires ax25.h for the 4 | * definition of the ax25_address structure. 5 | */ 6 | 7 | #ifndef NETROM_KERNEL_H 8 | #define NETROM_KERNEL_H 9 | 10 | #define NETROM_MTU 236 11 | 12 | #define NETROM_T1 1 13 | #define NETROM_T2 2 14 | #define NETROM_N2 3 15 | #define NETROM_T4 6 16 | #define NETROM_IDLE 7 17 | 18 | #define SIOCNRDECOBS (SIOCPROTOPRIVATE+2) 19 | 20 | struct nr_route_struct { 21 | #define NETROM_NEIGH 0 22 | #define NETROM_NODE 1 23 | int type; 24 | ax25_address callsign; 25 | char device[16]; 26 | unsigned int quality; 27 | char mnemonic[7]; 28 | ax25_address neighbour; 29 | unsigned int obs_count; 30 | unsigned int ndigis; 31 | ax25_address digipeaters[AX25_MAX_DIGIS]; 32 | }; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /linux/src/include/linux/param.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_PARAM_H 2 | #define _LINUX_PARAM_H 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /linux/src/include/linux/posix_types.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_POSIX_TYPES_H 2 | #define _LINUX_POSIX_TYPES_H 3 | 4 | /* 5 | * This file is generally used by user-level software, so you need to 6 | * be a little careful about namespace pollution etc. Also, we cannot 7 | * assume GCC is being used. 8 | */ 9 | 10 | #ifndef NULL 11 | # define NULL ((void *) 0) 12 | #endif 13 | 14 | /* 15 | * This allows for 1024 file descriptors: if NR_OPEN is ever grown 16 | * beyond that you'll have to change this too. But 1024 fd's seem to be 17 | * enough even for such "real" unices like OSF/1, so hopefully this is 18 | * one limit that doesn't have to be changed [again]. 19 | * 20 | * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in 21 | * (and thus ) - but this is a more logical 22 | * place for them. Solved by having dummy defines in . 23 | */ 24 | 25 | /* 26 | * Those macros may have been defined in . But we always 27 | * use the ones here. 28 | */ 29 | #undef __NFDBITS 30 | #define __NFDBITS (8 * sizeof(unsigned long)) 31 | 32 | #undef __FD_SETSIZE 33 | #define __FD_SETSIZE 1024 34 | 35 | #undef __FDSET_LONGS 36 | #define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS) 37 | 38 | #undef __FDELT 39 | #define __FDELT(d) ((d) / __NFDBITS) 40 | 41 | #undef __FDMASK 42 | #define __FDMASK(d) (1UL << ((d) % __NFDBITS)) 43 | 44 | typedef struct { 45 | unsigned long fds_bits [__FDSET_LONGS]; 46 | } __kernel_fd_set; 47 | 48 | #include 49 | 50 | #endif /* _LINUX_POSIX_TYPES_H */ 51 | -------------------------------------------------------------------------------- /linux/src/include/linux/ptrace.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_PTRACE_H 2 | #define _LINUX_PTRACE_H 3 | /* ptrace.h */ 4 | /* structs and defines to help the user use the ptrace system call. */ 5 | 6 | /* has the defines to get at the registers. */ 7 | 8 | #define PTRACE_TRACEME 0 9 | #define PTRACE_PEEKTEXT 1 10 | #define PTRACE_PEEKDATA 2 11 | #define PTRACE_PEEKUSR 3 12 | #define PTRACE_POKETEXT 4 13 | #define PTRACE_POKEDATA 5 14 | #define PTRACE_POKEUSR 6 15 | #define PTRACE_CONT 7 16 | #define PTRACE_KILL 8 17 | #define PTRACE_SINGLESTEP 9 18 | 19 | #define PTRACE_ATTACH 0x10 20 | #define PTRACE_DETACH 0x11 21 | 22 | #define PTRACE_SYSCALL 24 23 | 24 | #include 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /linux/src/include/linux/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_SIGNAL_H 2 | #define _LINUX_SIGNAL_H 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /linux/src/include/linux/spinlock.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINUX_SPINLOCK_H 2 | #define __LINUX_SPINLOCK_H 3 | #include 4 | #endif 5 | -------------------------------------------------------------------------------- /linux/src/include/linux/stat.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_STAT_H 2 | #define _LINUX_STAT_H 3 | 4 | #ifdef __KERNEL__ 5 | 6 | #include 7 | 8 | #endif 9 | 10 | #define S_IFMT 00170000 11 | #define S_IFSOCK 0140000 12 | #define S_IFLNK 0120000 13 | #define S_IFREG 0100000 14 | #define S_IFBLK 0060000 15 | #define S_IFDIR 0040000 16 | #define S_IFCHR 0020000 17 | #define S_IFIFO 0010000 18 | #define S_ISUID 0004000 19 | #define S_ISGID 0002000 20 | #define S_ISVTX 0001000 21 | 22 | #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) 23 | #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) 24 | #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 25 | #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) 26 | #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) 27 | #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) 28 | #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) 29 | 30 | #define S_IRWXU 00700 31 | #define S_IRUSR 00400 32 | #define S_IWUSR 00200 33 | #define S_IXUSR 00100 34 | 35 | #define S_IRWXG 00070 36 | #define S_IRGRP 00040 37 | #define S_IWGRP 00020 38 | #define S_IXGRP 00010 39 | 40 | #define S_IRWXO 00007 41 | #define S_IROTH 00004 42 | #define S_IWOTH 00002 43 | #define S_IXOTH 00001 44 | 45 | #ifdef __KERNEL__ 46 | #define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO) 47 | #define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO) 48 | #define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH) 49 | #define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH) 50 | #define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH) 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /linux/src/include/linux/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_STDDEF_H 2 | #define _LINUX_STDDEF_H 3 | 4 | #ifndef _SIZE_T 5 | #define _SIZE_T 6 | typedef unsigned long size_t; 7 | #endif 8 | 9 | #undef NULL 10 | #define NULL ((void *)0) 11 | 12 | #undef offsetof 13 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /linux/src/include/linux/symtab_end.h: -------------------------------------------------------------------------------- 1 | #ifdef MODVERSIONS 2 | #undef _set_ver 3 | #if defined(MODULE) && !defined(__GENKSYMS__) 4 | #define _set_ver(sym,vers) sym ## _R ## vers 5 | #else 6 | #define _set_ver(a,b) a 7 | #endif 8 | #endif /* MODVERSIONS */ 9 | #undef X 10 | #undef EMPTY 11 | /* mark end of table, last entry above ended with a comma! */ 12 | { (void *)0, (char *)0 } 13 | }, 14 | /* no module refs, insmod will take care of that instead! */ 15 | { { (struct module *)0, (struct module_ref *)0 } } 16 | -------------------------------------------------------------------------------- /linux/src/include/linux/tasks.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TASKS_H 2 | #define _LINUX_TASKS_H 3 | 4 | /* 5 | * This is the maximum nr of tasks - change it if you need to 6 | */ 7 | 8 | #define NR_CPUS NCPUS /* Max processors that can be running in SMP */ 9 | 10 | #define NR_TASKS 512 11 | 12 | #define NO_PROC_ID -1 13 | 14 | #define MAX_TASKS_PER_USER (NR_TASKS/2) 15 | #define MIN_TASKS_LEFT_FOR_ROOT 4 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /linux/src/include/linux/termios.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TERMIOS_H 2 | #define _LINUX_TERMIOS_H 3 | 4 | #include 5 | #include 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /linux/src/include/linux/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TIME_H 2 | #define _LINUX_TIME_H 3 | 4 | #ifndef _STRUCT_TIMESPEC 5 | #define _STRUCT_TIMESPEC 6 | struct timespec { 7 | long tv_sec; /* seconds */ 8 | long tv_nsec; /* nanoseconds */ 9 | }; 10 | #endif /* _STRUCT_TIMESPEC */ 11 | 12 | struct timeval { 13 | int tv_sec; /* seconds */ 14 | int tv_usec; /* microseconds */ 15 | }; 16 | 17 | struct timezone { 18 | int tz_minuteswest; /* minutes west of Greenwich */ 19 | int tz_dsttime; /* type of dst correction */ 20 | }; 21 | 22 | #define NFDBITS __NFDBITS 23 | 24 | #ifdef __KERNEL__ 25 | void do_gettimeofday(struct timeval *tv); 26 | void do_settimeofday(struct timeval *tv); 27 | #endif 28 | 29 | #define FD_SETSIZE __FD_SETSIZE 30 | #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp) 31 | #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp) 32 | #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp) 33 | #define FD_ZERO(fdsetp) __FD_ZERO(fdsetp) 34 | 35 | /* 36 | * Names of the interval timers, and structure 37 | * defining a timer setting. 38 | */ 39 | #define ITIMER_REAL 0 40 | #define ITIMER_VIRTUAL 1 41 | #define ITIMER_PROF 2 42 | 43 | struct itimerspec { 44 | struct timespec it_interval; /* timer period */ 45 | struct timespec it_value; /* timer expiration */ 46 | }; 47 | 48 | struct itimerval { 49 | struct timeval it_interval; /* timer interval */ 50 | struct timeval it_value; /* current value */ 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /linux/src/include/linux/trdevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. NET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the Ethernet handlers. 7 | * 8 | * Version: @(#)eth.h 1.0.4 05/13/93 9 | * 10 | * Authors: Ross Biro, 11 | * Fred N. van Kempen, 12 | * 13 | * Relocated to include/linux where it belongs by Alan Cox 14 | * 15 | * 16 | * This program is free software; you can redistribute it and/or 17 | * modify it under the terms of the GNU General Public License 18 | * as published by the Free Software Foundation; either version 19 | * 2 of the License, or (at your option) any later version. 20 | * 21 | * WARNING: This move may well be temporary. This file will get merged with others RSN. 22 | * 23 | */ 24 | #ifndef _LINUX_TRDEVICE_H 25 | #define _LINUX_TRDEVICE_H 26 | 27 | 28 | #include 29 | 30 | #ifdef __KERNEL__ 31 | extern int tr_header(struct sk_buff *skb, struct device *dev, 32 | unsigned short type, void *daddr, 33 | void *saddr, unsigned len); 34 | extern int tr_rebuild_header(void *buff, struct device *dev, 35 | unsigned long raddr, struct sk_buff *skb); 36 | extern unsigned short tr_type_trans(struct sk_buff *skb, struct device *dev); 37 | 38 | #endif 39 | 40 | #endif /* _LINUX_TRDEVICE_H */ 41 | -------------------------------------------------------------------------------- /linux/src/include/linux/tty_ldisc.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TTY_LDISC_H 2 | #define _LINUX_TTY_LDISC_H 3 | 4 | /* 5 | * Definitions for the tty line discipline 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | struct tty_ldisc { 12 | int magic; 13 | int num; 14 | int flags; 15 | /* 16 | * The following routines are called from above. 17 | */ 18 | int (*open)(struct tty_struct *); 19 | void (*close)(struct tty_struct *); 20 | void (*flush_buffer)(struct tty_struct *tty); 21 | int (*chars_in_buffer)(struct tty_struct *tty); 22 | int (*read)(struct tty_struct * tty, struct file * file, 23 | unsigned char * buf, unsigned int nr); 24 | int (*write)(struct tty_struct * tty, struct file * file, 25 | const unsigned char * buf, unsigned int nr); 26 | int (*ioctl)(struct tty_struct * tty, struct file * file, 27 | unsigned int cmd, unsigned long arg); 28 | void (*set_termios)(struct tty_struct *tty, struct termios * old); 29 | int (*select)(struct tty_struct * tty, struct inode * inode, 30 | struct file * file, int sel_type, 31 | struct select_table_struct *wait); 32 | 33 | /* 34 | * The following routines are called from below. 35 | */ 36 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, 37 | char *fp, int count); 38 | int (*receive_room)(struct tty_struct *); 39 | void (*write_wakeup)(struct tty_struct *); 40 | }; 41 | 42 | #define TTY_LDISC_MAGIC 0x5403 43 | 44 | #define LDISC_FLAG_DEFINED 0x00000001 45 | 46 | #endif /* _LINUX_TTY_LDISC_H */ 47 | -------------------------------------------------------------------------------- /linux/src/include/linux/udp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. INET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the UDP protocol. 7 | * 8 | * Version: @(#)udp.h 1.0.2 04/28/93 9 | * 10 | * Author: Fred N. van Kempen, 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 15 | * 2 of the License, or (at your option) any later version. 16 | */ 17 | #ifndef _LINUX_UDP_H 18 | #define _LINUX_UDP_H 19 | 20 | 21 | struct udphdr { 22 | unsigned short source; 23 | unsigned short dest; 24 | unsigned short len; 25 | unsigned short check; 26 | }; 27 | 28 | 29 | #endif /* _LINUX_UDP_H */ 30 | -------------------------------------------------------------------------------- /linux/src/include/linux/uio.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINUX_UIO_H 2 | #define __LINUX_UIO_H 3 | 4 | /* 5 | * Berkeley style UIO structures - Alan Cox 1994. 6 | * 7 | * This program is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU General Public License 9 | * as published by the Free Software Foundation; either version 10 | * 2 of the License, or (at your option) any later version. 11 | */ 12 | 13 | 14 | /* A word of warning: Our uio structure will clash with the C library one (which is now obsolete). Remove the C 15 | library one from sys/uio.h if you have a very old library set */ 16 | 17 | struct iovec 18 | { 19 | void *iov_base; /* BSD uses caddr_t (same thing in effect) */ 20 | int iov_len; 21 | }; 22 | 23 | #define UIO_MAXIOV 16 /* Maximum iovec's in one operation 24 | 16 matches BSD */ 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /linux/src/include/linux/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UNISTD_H_ 2 | #define _LINUX_UNISTD_H_ 3 | 4 | extern int errno; 5 | 6 | /* 7 | * Include machine specific syscallX macros 8 | */ 9 | #include 10 | 11 | #endif /* _LINUX_UNISTD_H_ */ 12 | -------------------------------------------------------------------------------- /linux/src/include/linux/utsname.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UTSNAME_H 2 | #define _LINUX_UTSNAME_H 3 | 4 | #define __OLD_UTS_LEN 8 5 | 6 | struct oldold_utsname { 7 | char sysname[9]; 8 | char nodename[9]; 9 | char release[9]; 10 | char version[9]; 11 | char machine[9]; 12 | }; 13 | 14 | #define __NEW_UTS_LEN 64 15 | 16 | struct old_utsname { 17 | char sysname[65]; 18 | char nodename[65]; 19 | char release[65]; 20 | char version[65]; 21 | char machine[65]; 22 | }; 23 | 24 | struct new_utsname { 25 | char sysname[65]; 26 | char nodename[65]; 27 | char release[65]; 28 | char version[65]; 29 | char machine[65]; 30 | char domainname[65]; 31 | }; 32 | 33 | extern struct new_utsname system_utsname; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /linux/src/include/linux/version.h: -------------------------------------------------------------------------------- 1 | #define UTS_RELEASE "2.0.36" 2 | #define LINUX_VERSION_CODE 131108 3 | -------------------------------------------------------------------------------- /linux/src/include/linux/vfs.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_VFS_H 2 | #define _LINUX_VFS_H 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /linux/src/include/linux/wait.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_WAIT_H 2 | #define _LINUX_WAIT_H 3 | 4 | #define WNOHANG 0x00000001 5 | #define WUNTRACED 0x00000002 6 | 7 | #define __WALL 0x40000000 /* Wait on all children, regardless of type */ 8 | #define __WCLONE 0x80000000 /* Wait only on non-SIGCHLD children */ 9 | 10 | #ifdef __KERNEL__ 11 | 12 | #include 13 | 14 | struct wait_queue { 15 | struct task_struct * task; 16 | struct wait_queue * next; 17 | }; 18 | 19 | typedef struct wait_queue wait_queue_t; 20 | typedef struct wait_queue *wait_queue_head_t; 21 | 22 | #define WAIT_QUEUE_HEAD(x) ((struct wait_queue *)((x)-1)) 23 | #define DECLARE_WAITQUEUE(wait, current) struct wait_queue wait = { current, NULL } 24 | #define DECLARE_WAIT_QUEUE_HEAD(wait) wait_queue_head_t wait 25 | #define init_waitqueue_head(x) *(x)=NULL 26 | #define init_waitqueue_entry(q,p) ((q)->task)=(p) 27 | 28 | static inline void init_waitqueue(struct wait_queue **q) 29 | { 30 | *q = WAIT_QUEUE_HEAD(q); 31 | } 32 | 33 | static inline int waitqueue_active(struct wait_queue **q) 34 | { 35 | struct wait_queue *head = *q; 36 | return head && head != WAIT_QUEUE_HEAD(q); 37 | } 38 | 39 | struct select_table_entry { 40 | struct wait_queue wait; 41 | struct wait_queue ** wait_address; 42 | }; 43 | 44 | typedef struct select_table_struct { 45 | int nr; 46 | struct select_table_entry * entry; 47 | } select_table; 48 | 49 | #define __MAX_SELECT_TABLE_ENTRIES (4096 / sizeof (struct select_table_entry)) 50 | 51 | #endif /* __KERNEL__ */ 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /linux/src/include/net/af_unix.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINUX_NET_AFUNIX_H 2 | #define __LINUX_NET_AFUNIX_H 3 | extern void unix_proto_init(struct net_proto *pro); 4 | extern struct proto_ops unix_proto_ops; 5 | extern void unix_inflight(struct file *fp); 6 | extern void unix_notinflight(struct file *fp); 7 | typedef struct sock unix_socket; 8 | extern void unix_gc(void); 9 | 10 | extern unix_socket *unix_socket_list; 11 | 12 | #define UNIX_MAX_FD 8 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /linux/src/include/net/arp.h: -------------------------------------------------------------------------------- 1 | /* linux/net/inet/arp.h */ 2 | #ifndef _ARP_H 3 | #define _ARP_H 4 | 5 | extern void arp_init(void); 6 | extern int arp_rcv(struct sk_buff *skb, struct device *dev, 7 | struct packet_type *pt); 8 | extern int arp_query(unsigned char *haddr, u32 paddr, struct device *dev); 9 | extern int arp_find(unsigned char *haddr, u32 paddr, 10 | struct device *dev, u32 saddr, struct sk_buff *skb); 11 | extern int arp_ioctl(unsigned int cmd, void *arg); 12 | extern void arp_send(int type, int ptype, u32 dest_ip, 13 | struct device *dev, u32 src_ip, 14 | unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); 15 | extern int arp_bind_cache(struct hh_cache ** hhp, struct device *dev, unsigned short type, __u32 daddr); 16 | extern int arp_update_cache(struct hh_cache * hh); 17 | #endif /* _ARP_H */ 18 | -------------------------------------------------------------------------------- /linux/src/include/net/atalkcall.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of protocols.c simpler */ 2 | extern void atalk_proto_init(struct net_proto *pro); 3 | -------------------------------------------------------------------------------- /linux/src/include/net/ax25call.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of protocols.c simpler */ 2 | extern void ax25_proto_init(struct net_proto *pro); 3 | -------------------------------------------------------------------------------- /linux/src/include/net/checksum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. INET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Checksumming functions for IP, TCP, UDP and so on 7 | * 8 | * Authors: Jorge Cwik, 9 | * Arnt Gulbrandsen, 10 | * Borrows very liberally from tcp.c and ip.c, see those 11 | * files for more names. 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 16 | * 2 of the License, or (at your option) any later version. 17 | */ 18 | #ifndef _CHECKSUM_H 19 | #define _CHECKSUM_H 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /linux/src/include/net/datalink.h: -------------------------------------------------------------------------------- 1 | #ifndef _NET_INET_DATALINK_H_ 2 | #define _NET_INET_DATALINK_H_ 3 | 4 | struct datalink_proto { 5 | unsigned short type_len; 6 | unsigned char type[8]; 7 | const char *string_name; 8 | unsigned short header_length; 9 | int (*rcvfunc)(struct sk_buff *, struct device *, 10 | struct packet_type *); 11 | void (*datalink_header)(struct datalink_proto *, struct sk_buff *, 12 | unsigned char *); 13 | struct datalink_proto *next; 14 | }; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /linux/src/include/net/gc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Interface routines assumed by gc() 3 | * 4 | * Copyright (C) Barak A. Pearlmutter. 5 | * Released under the GPL version 2 or later. 6 | * 7 | */ 8 | 9 | typedef struct object *pobj; /* pointer to a guy of the type we gc */ 10 | 11 | /* 12 | * How to mark and unmark objects 13 | */ 14 | 15 | extern void gc_mark(pobj); 16 | extern void gc_unmark(pobj); 17 | extern int gc_marked(pobj); 18 | 19 | /* 20 | * How to count and access an object's children 21 | */ 22 | 23 | extern int n_children(pobj); /* how many children */ 24 | extern pobj child_n(pobj, int); /* child i, numbered 0..n-1 */ 25 | 26 | /* 27 | * How to access the root set 28 | */ 29 | 30 | extern int root_size(void); /* number of things in root set */ 31 | extern pobj root_elt(int); /* element i of root set, numbered 0..n-1 */ 32 | 33 | /* 34 | * How to access the free list 35 | */ 36 | 37 | extern void clear_freelist(void); 38 | extern void add_to_free_list(pobj); 39 | 40 | /* 41 | * How to iterate through all objects in memory 42 | */ 43 | 44 | extern int N_OBJS; 45 | extern pobj obj_number(int); 46 | 47 | -------------------------------------------------------------------------------- /linux/src/include/net/ip_alias.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IP_ALIAS (AF_INET) aliasing definitions. 3 | * 4 | * 5 | * Version: @(#)ip_alias.h 0.50 4/20/97 6 | * 7 | * Author: Juan Jose Ciarlante, 8 | * 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 13 | * 2 of the License, or (at your option) any later version. 14 | * 15 | */ 16 | 17 | #ifndef _IP_ALIAS_H 18 | #define _IP_ALIAS_H 19 | 20 | extern int ip_alias_init(void); 21 | extern int ip_alias_done(void); 22 | 23 | #endif /* _IP_ALIAS_H */ 24 | -------------------------------------------------------------------------------- /linux/src/include/net/ip_forward.h: -------------------------------------------------------------------------------- 1 | #ifndef __NET_IP_FORWARD_H 2 | #define __NET_IP_FORWARD_H 3 | 4 | #define IPFWD_FRAGMENT 1 5 | #define IPFWD_LASTFRAG 2 6 | #define IPFWD_MASQUERADED 4 7 | #define IPFWD_MULTICASTING 8 8 | #define IPFWD_MULTITUNNEL 0x10 9 | #define IPFWD_NOTTLDEC 0x20 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /linux/src/include/net/ipip.h: -------------------------------------------------------------------------------- 1 | extern int ipip_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, 2 | __u32 daddr, unsigned short len, __u32 saddr, 3 | int redo, struct inet_protocol *protocol); 4 | 5 | -------------------------------------------------------------------------------- /linux/src/include/net/ipxcall.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of protocols.c simpler */ 2 | extern void ipx_proto_init(struct net_proto *pro); 3 | -------------------------------------------------------------------------------- /linux/src/include/net/netlink.h: -------------------------------------------------------------------------------- 1 | #ifndef __NET_NETLINK_H 2 | #define __NET_NETLINK_H 3 | 4 | #define NET_MAJOR 36 /* Major 18 is reserved for networking */ 5 | #define MAX_LINKS 11 /* 18,0 for route updates, 18,1 for SKIP, 18,2 debug tap 18,3 PPP reserved */ 6 | /* 4-7 are psi0-psi3 8 is arpd 9 is ppp */ 7 | /* 10 is for IPSEC */ 8 | #define MAX_QBYTES 32768 /* Maximum bytes in the queue */ 9 | 10 | #include 11 | 12 | extern int netlink_attach(int unit, int (*function)(struct sk_buff *skb)); 13 | extern int netlink_donothing(struct sk_buff *skb); 14 | extern void netlink_detach(int unit); 15 | extern int netlink_post(int unit, struct sk_buff *skb); 16 | extern int init_netlink(void); 17 | 18 | #define NETLINK_ROUTE 0 /* Routing/device hook */ 19 | #define NETLINK_SKIP 1 /* Reserved for ENskip */ 20 | #define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ 21 | #define NETLINK_FIREWALL 3 /* Firewalling hook */ 22 | #define NETLINK_PSI 4 /* PSI devices - 4 to 7 */ 23 | #define NETLINK_ARPD 8 24 | #define NETLINK_NET_PPP 9 /* Non tty PPP devices */ 25 | #define NETLINK_IPSEC 10 /* IPSEC */ 26 | 27 | #ifdef CONFIG_RTNETLINK 28 | extern void ip_netlink_msg(unsigned long, __u32, __u32, __u32, short, short, char *); 29 | #else 30 | #define ip_netlink_msg(a,b,c,d,e,f,g) 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /linux/src/include/net/nrcall.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of protocols.c simpler */ 2 | extern void nr_proto_init(struct net_proto *pro); 3 | -------------------------------------------------------------------------------- /linux/src/include/net/p8022.h: -------------------------------------------------------------------------------- 1 | #ifndef _NET_P8022_H 2 | #define _NET_P8022_H 3 | 4 | extern struct datalink_proto *register_8022_client(unsigned char type, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)); 5 | extern void unregister_8022_client(unsigned char type); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /linux/src/include/net/p8022call.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of Space.c simpler */ 2 | extern void p8022_proto_init(struct net_proto *); 3 | -------------------------------------------------------------------------------- /linux/src/include/net/p8022tr.h: -------------------------------------------------------------------------------- 1 | #ifndef _NET_P8022TR_H 2 | #define _NET_P8022TR_H 3 | 4 | extern struct datalink_proto *register_8022tr_client(unsigned char type, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)); 5 | extern void unregister_8022tr_client(unsigned char type); 6 | 7 | #endif 8 | 9 | -------------------------------------------------------------------------------- /linux/src/include/net/p8022trcall.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of Space.c simpler */ 2 | extern void p8022tr_proto_init(struct net_proto *); 3 | 4 | -------------------------------------------------------------------------------- /linux/src/include/net/psnap.h: -------------------------------------------------------------------------------- 1 | #ifndef _NET_PSNAP_H 2 | #define _NET_PSNAP_H 3 | 4 | extern struct datalink_proto *register_snap_client(unsigned char *desc, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)); 5 | extern void unregister_snap_client(unsigned char *desc); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /linux/src/include/net/psnapcall.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of Space.c simpler */ 2 | extern void snap_proto_init(struct net_proto *); 3 | -------------------------------------------------------------------------------- /linux/src/include/net/rarp.h: -------------------------------------------------------------------------------- 1 | /* linux/net/inet/rarp.h */ 2 | #ifndef _RARP_H 3 | #define _RARP_H 4 | 5 | extern int rarp_ioctl(unsigned int cmd, void *arg); 6 | extern int rarp_get_info(char *buffer, 7 | char **start, 8 | off_t offset, 9 | int length, 10 | int dummy); 11 | #endif /* _RARP_H */ 12 | 13 | -------------------------------------------------------------------------------- /linux/src/include/net/rosecall.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of protocols.c simpler */ 2 | extern void rose_proto_init(struct net_proto *pro); 3 | -------------------------------------------------------------------------------- /linux/src/include/net/slhc.h: -------------------------------------------------------------------------------- 1 | #ifndef __NET_SLHC_H 2 | #define __NET_SLHC_H 3 | 4 | extern void slhc_install(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /linux/src/include/net/spx.h: -------------------------------------------------------------------------------- 1 | #ifndef __NET_SPX_H 2 | #define __NET_SPX_H 3 | 4 | /* 5 | * Internal definitions for the SPX protocol. 6 | */ 7 | 8 | /* 9 | * The SPX header following an IPX header. 10 | */ 11 | 12 | struct spxhdr 13 | { 14 | __u8 cctl; 15 | #define CCTL_SPXII_XHD 0x01 /* SPX2 extended header */ 16 | #define CCTL_SPX_UNKNOWN 0x02 /* Unknown (unused ??) */ 17 | #define CCTL_SPXII_NEG 0x04 /* Negotiate size */ 18 | #define CCTL_SPXII 0x08 /* Set for SPX2 */ 19 | #define CCTL_EOM 0x10 /* End of message marker */ 20 | #define CCTL_URG 0x20 /* Urgent marker in SPP (not used in SPX?) */ 21 | #define CCTL_ACK 0x40 /* Send me an ACK */ 22 | #define CCTL_CTL 0x80 /* Control message */ 23 | __u8 dtype; 24 | #define SPX_DTYPE_ECONN 0xFE /* Finished */ 25 | #define SPX_DTYPE_ECACK 0xFF /* Ok */ 26 | __u16 sconn; /* Connection ID */ 27 | __u16 dconn; /* Connection ID */ 28 | __u16 sequence; 29 | __u16 ackseq; 30 | __u16 allocseq; 31 | }; 32 | 33 | #define IPXTYPE_SPX 5 34 | 35 | 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /linux/src/include/scsi/scsi_ioctl.h: -------------------------------------------------------------------------------- 1 | #ifndef _SCSI_IOCTL_H 2 | #define _SCSI_IOCTL_H 3 | 4 | #define SCSI_IOCTL_SEND_COMMAND 1 5 | #define SCSI_IOCTL_TEST_UNIT_READY 2 6 | #define SCSI_IOCTL_BENCHMARK_COMMAND 3 7 | #define SCSI_IOCTL_SYNC 4 /* Request synchronous parameters */ 8 | #define SCSI_IOCTL_START_UNIT 5 9 | #define SCSI_IOCTL_STOP_UNIT 6 10 | /* The door lock/unlock constants are compatible with Sun constants for 11 | the cdrom */ 12 | #define SCSI_IOCTL_DOORLOCK 0x5380 /* lock the eject mechanism */ 13 | #define SCSI_IOCTL_DOORUNLOCK 0x5381 /* unlock the mechanism */ 14 | 15 | #define SCSI_REMOVAL_PREVENT 1 16 | #define SCSI_REMOVAL_ALLOW 0 17 | 18 | #ifdef __KERNEL__ 19 | 20 | extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); 21 | extern int kernel_scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); 22 | extern int scsi_ioctl_send_command(Scsi_Device *dev, void *buffer); 23 | 24 | #endif 25 | 26 | #endif 27 | 28 | 29 | -------------------------------------------------------------------------------- /linux/src/include/scsi/scsicam.h: -------------------------------------------------------------------------------- 1 | /* 2 | * scsicam.h - SCSI CAM support functions, use for HDIO_GETGEO, etc. 3 | * 4 | * Copyright 1993, 1994 Drew Eckhardt 5 | * Visionary Computing 6 | * (Unix and Linux consulting and custom programming) 7 | * drew@Colorado.EDU 8 | * +1 (303) 786-7975 9 | * 10 | * For more information, please consult the SCSI-CAM draft. 11 | */ 12 | 13 | #ifndef SCSICAM_H 14 | #define SCSICAM_H 15 | #include 16 | extern int scsicam_bios_param (Disk *disk, kdev_t dev, int *ip); 17 | #endif /* def SCSICAM_H */ 18 | -------------------------------------------------------------------------------- /linux/src/init/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/version.c 3 | * 4 | * Copyright (C) 1992 Theodore Ts'o 5 | * 6 | * May be freely distributed as part of Linux. 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | /* make the "checkconfig" script happy: we really need to include config.h */ 15 | #ifdef CONFIG_BOGUS 16 | #endif 17 | 18 | #define version(a) Version_ ## a 19 | #define version_string(a) version(a) 20 | 21 | int version_string(LINUX_VERSION_CODE) = 0; 22 | 23 | struct new_utsname system_utsname = { 24 | UTS_SYSNAME, UTS_NODENAME, UTS_RELEASE, UTS_VERSION, 25 | UTS_MACHINE, UTS_DOMAINNAME 26 | }; 27 | 28 | const char *linux_banner = 29 | "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" 30 | LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; 31 | -------------------------------------------------------------------------------- /linux/src/kernel/softirq.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/kernel/softirq.c 3 | * 4 | * Copyright (C) 1992 Linus Torvalds 5 | * 6 | * do_bottom_half() runs at normal kernel priority: all interrupts 7 | * enabled. do_bottom_half() is atomic with respect to itself: a 8 | * bottom_half handler need not be re-entrant. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | unsigned int intr_count = 0; 25 | 26 | int bh_mask_count[32]; 27 | unsigned int bh_active = 0; 28 | unsigned int bh_mask = 0; 29 | void (*bh_base[32])(void); 30 | 31 | 32 | asmlinkage void do_bottom_half(void) 33 | { 34 | unsigned int active; 35 | unsigned int mask, left; 36 | void (**bh)(void); 37 | 38 | sti(); 39 | bh = bh_base; 40 | active = bh_active & bh_mask; 41 | for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) { 42 | if (mask & active) { 43 | void (*fn)(void); 44 | bh_active &= ~mask; 45 | fn = *bh; 46 | if (!fn) 47 | goto bad_bh; 48 | fn(); 49 | } 50 | } 51 | return; 52 | bad_bh: 53 | printk ("irq.c:bad bottom half entry %08lx\n", mask); 54 | } 55 | -------------------------------------------------------------------------------- /linux/src/lib/ctype.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/ctype.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | const unsigned char _ctype[] = { 11 | _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ 12 | _C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */ 13 | _C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */ 14 | _C,_C,_C,_C,_C,_C,_C,_C, /* 24-31 */ 15 | _S|_SP,_P,_P,_P,_P,_P,_P,_P, /* 32-39 */ 16 | _P,_P,_P,_P,_P,_P,_P,_P, /* 40-47 */ 17 | _D,_D,_D,_D,_D,_D,_D,_D, /* 48-55 */ 18 | _D,_D,_P,_P,_P,_P,_P,_P, /* 56-63 */ 19 | _P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U, /* 64-71 */ 20 | _U,_U,_U,_U,_U,_U,_U,_U, /* 72-79 */ 21 | _U,_U,_U,_U,_U,_U,_U,_U, /* 80-87 */ 22 | _U,_U,_U,_P,_P,_P,_P,_P, /* 88-95 */ 23 | _P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L, /* 96-103 */ 24 | _L,_L,_L,_L,_L,_L,_L,_L, /* 104-111 */ 25 | _L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */ 26 | _L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */ 27 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */ 28 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */ 29 | _S|_SP,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 160-175 */ 30 | _P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 176-191 */ 31 | _U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U, /* 192-207 */ 32 | _U,_U,_U,_U,_U,_U,_U,_P,_U,_U,_U,_U,_U,_U,_U,_L, /* 208-223 */ 33 | _L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L, /* 224-239 */ 34 | _L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */ 35 | 36 | EXPORT_SYMBOL(_ctype); 37 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | /test-mbchk 2 | -------------------------------------------------------------------------------- /tests/Makefrag.am: -------------------------------------------------------------------------------- 1 | # Makefile fragment for the test suite. 2 | 3 | # Copyright (C) 2006, 2007 Free Software Foundation, Inc. 4 | 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; either version 2, or (at your option) any later 8 | # version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 | # for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program; if not, write to the Free Software Foundation, Inc., 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | # 20 | # Tests. 21 | # 22 | 23 | TESTS += \ 24 | tests/test-mbchk 25 | -------------------------------------------------------------------------------- /tests/configfrag.ac: -------------------------------------------------------------------------------- 1 | dnl Configure fragment for the test suite. 2 | 3 | dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc. 4 | 5 | dnl This program is free software; you can redistribute it and/or modify it 6 | dnl under the terms of the GNU General Public License as published by the 7 | dnl Free Software Foundation; either version 2, or (at your option) any later 8 | dnl version. 9 | dnl 10 | dnl This program is distributed in the hope that it will be useful, but 11 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 | dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 | dnl for more details. 14 | dnl 15 | dnl You should have received a copy of the GNU General Public License along 16 | dnl with this program; if not, write to the Free Software Foundation, Inc., 17 | dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | # 20 | # Tests. 21 | # 22 | 23 | AC_CONFIG_FILES([tests/test-mbchk], [chmod +x tests/test-mbchk]) 24 | 25 | dnl Local Variables: 26 | dnl mode: autoconf 27 | dnl End: 28 | -------------------------------------------------------------------------------- /tests/test-mbchk.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | 3 | # Test if the kernel image complies with the multiboot specification. 4 | 5 | # Copyright (C) 2006, 2007 Free Software Foundation, Inc. 6 | 7 | # This program is free software; you can redistribute it and/or modify it 8 | # under the terms of the GNU General Public License as published by the 9 | # Free Software Foundation; either version 2, or (at your option) any later 10 | # version. 11 | # 12 | # This program is distributed in the hope that it will be useful, but 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | # for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 | 21 | if mbchk --version > /dev/null 2>&1 22 | then mbchk gnumach 23 | else 24 | # `mbchk' is not available -- ignore this test. 25 | exit 77 26 | fi 27 | 28 | # Local Variables: 29 | # mode: shell-script 30 | # End: 31 | -------------------------------------------------------------------------------- /util/putchar.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | 24 | #include 25 | 26 | int putchar(int c) 27 | { 28 | cnputc(c); 29 | return c; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /util/putchar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * Author: Barry deFreese. 19 | */ 20 | /* 21 | * Simple putchar implementation header. 22 | * 23 | */ 24 | 25 | #ifndef _PUTCHAR_H_ 26 | #define _PUTCHAR_H_ 27 | 28 | #include 29 | 30 | extern int putchar(int c); 31 | 32 | #endif /* _PUTCHAR_H_ */ 33 | -------------------------------------------------------------------------------- /version.c.in: -------------------------------------------------------------------------------- 1 | /* @configure_input@ */ 2 | const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@"; 3 | -------------------------------------------------------------------------------- /version.m4: -------------------------------------------------------------------------------- 1 | m4_define([AC_PACKAGE_NAME],[GNU Mach]) 2 | m4_define([AC_PACKAGE_VERSION],[1.8]) 3 | m4_define([AC_PACKAGE_BUGREPORT],[bug-hurd@gnu.org]) 4 | m4_define([AC_PACKAGE_TARNAME],[gnumach]) 5 | -------------------------------------------------------------------------------- /vm/memory_object.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mach Operating System 3 | * Copyright (c) 1991 Carnegie Mellon University 4 | * All Rights Reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software and its 7 | * documentation is hereby granted, provided that both the copyright 8 | * notice and this permission notice appear in all copies of the 9 | * software, derivative works or modified versions, and any portions 10 | * thereof, and that both notices appear in supporting documentation. 11 | * 12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15 | * 16 | * Carnegie Mellon requests users of this software to return to 17 | * 18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19 | * School of Computer Science 20 | * Carnegie Mellon University 21 | * Pittsburgh PA 15213-3890 22 | * 23 | * any improvements or extensions that they make and grant Carnegie the 24 | * rights to redistribute these changes. 25 | */ 26 | 27 | #ifndef _VM_MEMORY_OBJECT_H_ 28 | #define _VM_MEMORY_OBJECT_H_ 29 | 30 | #include 31 | #include 32 | 33 | extern ipc_port_t memory_manager_default_reference(void); 34 | extern boolean_t memory_manager_default_port(ipc_port_t); 35 | extern void memory_manager_default_init(void); 36 | 37 | extern ipc_port_t memory_manager_default; 38 | 39 | #endif /* _VM_MEMORY_OBJECT_H_ */ 40 | -------------------------------------------------------------------------------- /vm/memory_object_default.cli: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | /* This is a client presentation file. */ 24 | 25 | #define KERNEL_USER 1 26 | #define SEQNOS 1 27 | 28 | #include 29 | -------------------------------------------------------------------------------- /vm/memory_object_user.cli: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994 The University of Utah and 3 | * the Computer Systems Laboratory at the University of Utah (CSL). 4 | * All rights reserved. 5 | * 6 | * Permission to use, copy, modify and distribute this software is hereby 7 | * granted provided that (1) source code retains these copyright, permission, 8 | * and disclaimer notices, and (2) redistributions including binaries 9 | * reproduce the notices in supporting documentation, and (3) all advertising 10 | * materials mentioning features or use of this software display the following 11 | * acknowledgement: ``This product includes software developed by the 12 | * Computer Systems Laboratory at the University of Utah.'' 13 | * 14 | * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 15 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 16 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 | * 18 | * CSL requests users of this software to return to csl-dist@cs.utah.edu any 19 | * improvements that they make and grant CSL redistribution rights. 20 | * 21 | * Author: Bryan Ford, University of Utah CSL 22 | */ 23 | /* This is a client presentation file. */ 24 | 25 | #define KERNEL_USER 1 26 | #define SEQNOS 1 27 | 28 | #include 29 | -------------------------------------------------------------------------------- /vm/vm_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef _VM_VM_INIT_H_ 20 | #define _VM_VM_INIT_H_ 21 | 22 | extern void vm_mem_init(void); 23 | extern void vm_mem_bootstrap(void); 24 | 25 | #endif /* _VM_VM_INIT_H_ */ 26 | -------------------------------------------------------------------------------- /vm/vm_map_physical.h: -------------------------------------------------------------------------------- 1 | #ifndef _VM_VM_MAP_PHYSICAL_H_ 2 | #define _VM_VM_MAP_PHYSICAL_H_ 3 | 4 | #include 5 | 6 | long vm_map_physical(vm_offset_t *virt, phys_addr_t phys, 7 | unsigned long size, unsigned long flags); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /vm/vm_print.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Free Software Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef VM_PRINT_H 20 | #define VM_PRINT_H 21 | 22 | #include 23 | #include 24 | 25 | /* Debugging: print a map */ 26 | extern void vm_map_print(db_expr_t addr, boolean_t have_addr, 27 | db_expr_t count, const char *modif); 28 | 29 | /* Pretty-print a copy object for ddb. */ 30 | extern void vm_map_copy_print(const vm_map_copy_t); 31 | 32 | #include 33 | 34 | extern void vm_object_print(vm_object_t); 35 | 36 | #include 37 | 38 | extern void vm_page_print(const vm_page_t); 39 | 40 | #endif /* VM_PRINT_H */ 41 | 42 | -------------------------------------------------------------------------------- /vm/vm_resident.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Resident memory management module functions. 3 | * Copyright (C) 2008 Free Software Foundation, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18 | * 19 | * Author: Barry deFreese. 20 | */ 21 | /* 22 | * Resident memory management module functions. 23 | * 24 | */ 25 | 26 | #ifndef _VM_RESIDENT_H_ 27 | #define _VM_RESIDENT_H_ 28 | 29 | #include 30 | 31 | /* 32 | * vm_page_replace: 33 | * 34 | * Exactly like vm_page_insert, except that we first 35 | * remove any existing page at the given offset in object 36 | * and we don't do deactivate-behind. 37 | * 38 | * The object and page must be locked. 39 | */ 40 | extern void vm_page_replace ( 41 | vm_page_t mem, 42 | vm_object_t object, 43 | vm_offset_t offset); 44 | 45 | #endif /* _VM_RESIDENT_H_ */ 46 | -------------------------------------------------------------------------------- /vm/vm_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Free Software Foundation, Inc. 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 2, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 | * for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | * 18 | * Written by Thomas Schwinge. 19 | */ 20 | 21 | #ifndef VM_VM_TYPES_H 22 | #define VM_VM_TYPES_H 23 | 24 | /* 25 | * Types defined: 26 | * 27 | * vm_map_t the high-level address map data structure. 28 | * vm_object_t Virtual memory object. 29 | * vm_page_t See `vm/vm_page.h'. 30 | */ 31 | 32 | typedef struct vm_map *vm_map_t; 33 | #define VM_MAP_NULL ((vm_map_t) 0) 34 | 35 | typedef struct vm_object *vm_object_t; 36 | #define VM_OBJECT_NULL ((vm_object_t) 0) 37 | 38 | typedef struct vm_page *vm_page_t; 39 | #define VM_PAGE_NULL ((vm_page_t) 0) 40 | 41 | 42 | #endif /* VM_VM_TYPES_H */ 43 | -------------------------------------------------------------------------------- /x86_64/include/mach/x86_64: -------------------------------------------------------------------------------- 1 | ../../../i386/include/mach/i386 -------------------------------------------------------------------------------- /x86_64/x86_64: -------------------------------------------------------------------------------- 1 | ../i386/i386 -------------------------------------------------------------------------------- /xen/block.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2009 Free Software Foundation 3 | * 4 | * This program is free software ; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation ; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY ; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with the program ; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #ifndef XEN_BLOCK_H 20 | #define XEN_BLOCK_H 21 | 22 | void hyp_block_init(void); 23 | 24 | #endif /* XEN_BLOCK_H */ 25 | -------------------------------------------------------------------------------- /xen/evt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2009 Free Software Foundation 3 | * 4 | * This program is free software ; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation ; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY ; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with the program ; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #ifndef XEN_EVT_H 20 | #define XEN_EVT_H 21 | 22 | #include 23 | 24 | void hyp_intrinit(void); 25 | void form_int_mask(void); 26 | void hyp_evt_handler(evtchn_port_t port, void (*handler)(), int unit, spl_t spl); 27 | void hyp_c_callback(void *ret_addr, void *regs); 28 | 29 | #endif /* XEN_EVT_H */ 30 | -------------------------------------------------------------------------------- /xen/grant.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2009 Free Software Foundation 3 | * 4 | * This program is free software ; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation ; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY ; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with the program ; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #ifndef XEN_GRANT_H 20 | #define XEN_GRANT_H 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | void hyp_grant_init(void); 27 | grant_ref_t hyp_grant_give(domid_t domid, unsigned long frame_nr, int readonly); 28 | void hyp_grant_takeback(grant_ref_t grant); 29 | grant_ref_t hyp_grant_accept_transfer(domid_t domid, unsigned long frame_nr); 30 | unsigned long hyp_grant_finish_transfer(grant_ref_t grant); 31 | void *hyp_grant_address(grant_ref_t grant); 32 | 33 | #endif /* XEN_GRANT_H */ 34 | -------------------------------------------------------------------------------- /xen/net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2009 Free Software Foundation 3 | * 4 | * This program is free software ; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation ; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY ; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with the program ; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #ifndef XEN_NET_H 20 | #define XEN_NET_H 21 | 22 | void hyp_net_init(void); 23 | 24 | #endif /* XEN_NET_H */ 25 | -------------------------------------------------------------------------------- /xen/public/arch-x86_32.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * arch-x86_32.h 3 | * 4 | * Guest OS interface to x86 32-bit Xen. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 | * DEALINGS IN THE SOFTWARE. 23 | * 24 | * Copyright (c) 2004-2006, K A Fraser 25 | */ 26 | 27 | #include "arch-x86/xen.h" 28 | -------------------------------------------------------------------------------- /xen/public/arch-x86_64.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * arch-x86_64.h 3 | * 4 | * Guest OS interface to x86 64-bit Xen. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 | * DEALINGS IN THE SOFTWARE. 23 | * 24 | * Copyright (c) 2004-2006, K A Fraser 25 | */ 26 | 27 | #include "arch-x86/xen.h" 28 | -------------------------------------------------------------------------------- /xen/ring.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2009 Free Software Foundation 3 | * 4 | * This program is free software ; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation ; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY ; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with the program ; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #ifndef XEN_RING_H 20 | #define XEN_RING_H 21 | 22 | typedef uint32_t hyp_ring_pos_t; 23 | 24 | #define hyp_ring_idx(ring, pos) (((unsigned)(pos)) & (sizeof(ring)-1)) 25 | #define hyp_ring_cell(ring, pos) (ring)[hyp_ring_idx((ring), (pos))] 26 | #define hyp_ring_smash(ring, prod, cons) (hyp_ring_idx((ring), (prod) + 1) == \ 27 | hyp_ring_idx((ring), (cons))) 28 | #define hyp_ring_available(ring, prod, cons) hyp_ring_idx((ring), (cons)-(prod)-1) 29 | 30 | void hyp_ring_store(void *dest, const void *src, size_t size, void *start, void *end); 31 | void hyp_ring_fetch(void *dest, const void *src, size_t size, void *start, void *end); 32 | size_t hyp_ring_next_word(char **c, void *start, void *end); 33 | 34 | #endif /* XEN_RING_H */ 35 | -------------------------------------------------------------------------------- /xen/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2009 Free Software Foundation 3 | * 4 | * This program is free software ; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation ; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY ; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with the program ; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #ifndef XEN_TIME_H 20 | #define XEN_TIME_H 21 | 22 | #include 23 | uint64_t hyp_get_time(void); 24 | 25 | #endif /* XEN_TIME_H */ 26 | -------------------------------------------------------------------------------- /xen/xen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006-2009, 2011 Free Software Foundation 3 | * 4 | * This program is free software ; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation ; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY ; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with the program ; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #ifndef XEN_XEN_H 20 | #define XEN_XEN_H 21 | 22 | void hyp_init(void); 23 | void hyp_dev_init(void); 24 | void hyp_idle(void); 25 | void hyp_p2m_init(void); 26 | 27 | void hypclock_machine_intr(int old_ipl, void *ret_addr, struct i386_interrupt_state *regs, uint64_t delta); 28 | 29 | #endif /* XEN_XEN_H */ 30 | --------------------------------------------------------------------------------