├── .gitignore ├── .gitmodules ├── .travis.yml ├── AcessNative ├── .gitignore ├── Makefile ├── RunNative ├── RunRootApp ├── RunTest ├── acesskernel_src │ ├── Details.txt │ ├── Makefile │ ├── helpers.c │ ├── include │ │ ├── arch.h │ │ ├── heap.h │ │ ├── mouse_int.h │ │ ├── proc.h │ │ ├── threads_glue.h │ │ └── threads_int.h │ ├── keyboard.c │ ├── main.c │ ├── mouse.c │ ├── nativefs.c │ ├── net.c │ ├── net_wrap.c │ ├── net_wrap.h │ ├── server.c │ ├── syscall_getpath.c │ ├── syscalls.c │ ├── threads.c │ ├── threads_glue.c │ ├── time.c │ ├── ui.h │ ├── ui_sdl.c │ ├── vfs_handle.c │ └── video.c ├── ld-acess_src │ ├── Makefile │ ├── binary.c │ ├── common.h │ ├── elf.c │ ├── elf32.h │ ├── elf64.h │ ├── elf_load.c │ ├── exports.c │ ├── exports.h │ ├── main.c │ ├── memory.c │ ├── request.c │ ├── request.h │ └── syscalls.c ├── libacess-native.so_src │ ├── Makefile │ ├── common.h │ ├── exports.c │ ├── heap.c │ ├── main.c │ ├── memory.c │ ├── request.c │ └── syscalls.c ├── symbol_renames.ld ├── syscalls.h └── syscalls_list.h ├── BuildAcessNative ├── BuildConf ├── armv6 │ ├── Makefile.cfg │ ├── default.mk │ └── raspberrypi.mk ├── armv7 │ ├── Makefile.cfg │ ├── default.mk │ ├── realview_pb.mk │ └── tegra2.mk ├── host │ ├── Makefile.cfg │ └── default.mk ├── m68k │ ├── Makefile.cfg │ └── default.mk ├── native │ ├── Makefile.cfg │ └── default.mk ├── x86 │ ├── Makefile.cfg │ ├── default.mk │ └── smp.mk └── x86_64 │ ├── Makefile.cfg │ └── default.mk ├── COPYING ├── CleanAllArch ├── DoRelease ├── EditBoot ├── Externals ├── .gitignore ├── ACPICA │ ├── .gitignore │ ├── Makefile │ ├── Makefile.kinc │ └── acacess.h ├── bochs │ ├── Makefile │ └── patches │ │ ├── config.h.in.patch │ │ └── config.sub.patch ├── common_automake.mk ├── config.mk ├── core.mk ├── cross-compiler │ ├── .gitignore │ ├── Makefile │ ├── Makefile.common.mk │ ├── Makefile.cross │ ├── Makefile.rules.mk │ └── patches │ │ ├── binutils │ │ ├── bfd │ │ │ └── config.bfd.patch │ │ ├── config.sub.patch │ │ ├── gas │ │ │ └── configure.tgt.patch │ │ └── ld │ │ │ ├── Makefile.in.patch │ │ │ ├── configure.tgt.patch │ │ │ └── emulparams │ │ │ ├── acess2_amd64.sh │ │ │ ├── acess2_arm.sh │ │ │ └── acess2_i386.sh │ │ ├── config │ │ └── override.m4.patch │ │ └── gcc │ │ ├── config.sub.patch │ │ ├── gcc │ │ ├── config.gcc.patch │ │ └── config │ │ │ ├── acess2.h │ │ │ └── acess2.opt │ │ └── libgcc │ │ └── config.host.patch ├── curl │ ├── Makefile │ └── patches │ │ └── config.sub.patch ├── dropbear │ ├── Makefile │ └── patches │ │ ├── config.sub.patch │ │ └── options.h.patch ├── freetype │ ├── .gitignore │ ├── Makefile │ └── patches │ │ └── builds │ │ └── unix │ │ └── config.sub.patch ├── glib │ ├── Makefile │ └── patches │ │ └── config.sub.patch ├── libpng │ ├── .gitignore │ └── Makefile ├── libspiderscript │ └── Makefile ├── mesa │ ├── Makefile │ └── patches │ │ └── bin │ │ └── config.sub.patch ├── mplayer │ ├── .gitignore │ └── Makefile ├── netsurf │ ├── Makefile │ └── patches │ │ └── UNIFIED.patch ├── pkgconfig │ ├── Makefile │ └── patches │ │ ├── config.sub.patch │ │ └── glib │ │ └── config.sub.patch ├── sdl12 │ ├── .gitignore │ ├── Makefile │ └── patches │ │ ├── configure.patch │ │ └── src │ │ └── video │ │ ├── SDL_sysvideo.h.patch │ │ ├── SDL_video.c.patch │ │ └── acess │ │ └── ptyvideo.c ├── vttest │ └── Makefile └── zlib │ ├── .gitignore │ └── Makefile ├── KernelLand ├── Kernel │ ├── .gitignore │ ├── Doxyfile │ ├── Doxyfile.api │ ├── DoxygenLayout.xml │ ├── GenSyscalls.pl │ ├── Makefile │ ├── adt.c │ ├── arch │ │ ├── archdoc.h │ │ ├── armv6 │ │ │ ├── Makefile │ │ │ ├── debug.c │ │ │ ├── include │ │ │ │ ├── arch.h │ │ │ │ ├── assembly.h │ │ │ │ ├── lock.h │ │ │ │ ├── mm_virt.h │ │ │ │ ├── options.h │ │ │ │ └── proc.h │ │ │ ├── lib.S │ │ │ ├── lib.c │ │ │ ├── link.ld │ │ │ ├── main.c │ │ │ ├── mm_phys.c │ │ │ ├── mm_virt.c │ │ │ ├── pci.c │ │ │ ├── proc.S │ │ │ ├── proc.c │ │ │ ├── start.S │ │ │ └── time.c │ │ ├── armv7 │ │ │ ├── Makefile │ │ │ ├── debug.c │ │ │ ├── include │ │ │ │ ├── arch.h │ │ │ │ ├── assembly.h │ │ │ │ ├── lock.h │ │ │ │ ├── mm_virt.h │ │ │ │ ├── options.h │ │ │ │ └── proc.h │ │ │ ├── lib.S │ │ │ ├── lib.c │ │ │ ├── link.ld │ │ │ ├── main.c │ │ │ ├── mm_phys.c │ │ │ ├── mm_virt.c │ │ │ ├── pci.c │ │ │ ├── platform_realview_pb.c │ │ │ ├── platform_tegra2.c │ │ │ ├── platform_tegra2.h │ │ │ ├── proc.S │ │ │ ├── proc.c │ │ │ ├── start.S │ │ │ ├── time.c │ │ │ ├── vpci_realview_pb.c │ │ │ └── vpci_tegra2.c │ │ ├── helpers.h │ │ ├── m68k │ │ │ ├── Makefile │ │ │ ├── debug.c │ │ │ ├── include │ │ │ │ ├── arch.h │ │ │ │ ├── mm_virt.h │ │ │ │ └── proc.h │ │ │ ├── lib.c │ │ │ ├── link.ld │ │ │ ├── main.c │ │ │ ├── mm_phys.c │ │ │ ├── mm_virt.c │ │ │ ├── proc.c │ │ │ └── time.c │ │ ├── x86 │ │ │ ├── Makefile │ │ │ ├── acpica.c │ │ │ ├── common.inc.asm │ │ │ ├── desctab.asm │ │ │ ├── errors.c │ │ │ ├── include │ │ │ │ ├── apic.h │ │ │ │ ├── arch.h │ │ │ │ ├── arch_int.h │ │ │ │ ├── desctab.h │ │ │ │ ├── mm_phys.h │ │ │ │ ├── mm_virt.h │ │ │ │ ├── mptable.h │ │ │ │ ├── multiboot2.h │ │ │ │ ├── proc.h │ │ │ │ ├── proc_int.h │ │ │ │ ├── vm8086.h │ │ │ │ └── vmem_layout.h │ │ │ ├── irq.c │ │ │ ├── kpanic.c │ │ │ ├── lib.c │ │ │ ├── link.ld │ │ │ ├── main.c │ │ │ ├── mboot.c │ │ │ ├── mm_phys.c │ │ │ ├── mm_virt.c │ │ │ ├── mptable.c │ │ │ ├── pci.c │ │ │ ├── proc.asm │ │ │ ├── proc.c │ │ │ ├── start.asm │ │ │ ├── time.c │ │ │ ├── validate_vmem.c │ │ │ ├── vm8086.c │ │ │ └── vpci.c │ │ └── x86_64 │ │ │ ├── Makefile │ │ │ ├── desctab.asm │ │ │ ├── errors.c │ │ │ ├── include │ │ │ ├── arch.h │ │ │ ├── arch_config.h │ │ │ ├── archinit.h │ │ │ ├── common.inc.asm │ │ │ ├── desctab.h │ │ │ ├── mm_virt.h │ │ │ ├── proc.h │ │ │ └── vm8086.h │ │ │ ├── kernelpanic.c │ │ │ ├── lib.c │ │ │ ├── link.ld │ │ │ ├── main.c │ │ │ ├── mm_phys.c │ │ │ ├── mm_virt.c │ │ │ ├── pci.c │ │ │ ├── proc.asm │ │ │ ├── proc.c │ │ │ ├── rme.c │ │ │ ├── rme.h │ │ │ ├── start32.asm │ │ │ ├── start64.asm │ │ │ ├── time.c │ │ │ ├── vm8086.c │ │ │ └── vpci.c │ ├── bin │ │ ├── README │ │ ├── elf.c │ │ ├── elf.h │ │ ├── pe.c │ │ └── pe.h │ ├── binary.c │ ├── debug.c │ ├── debug_hooks.c │ ├── drv │ │ ├── Makefile │ │ ├── dgram_pipe.c │ │ ├── fifo.c │ │ ├── iocache.c │ │ ├── meta_serial.c │ │ ├── pci.c │ │ ├── proc.c │ │ ├── pty.c │ │ ├── serial.c │ │ ├── shm.c │ │ ├── vpci.c │ │ ├── vterm.c │ │ ├── vterm.h │ │ ├── vterm_2d.c │ │ ├── vterm_font.c │ │ ├── vterm_font_8x16.h │ │ ├── vterm_font_8x8.h │ │ ├── vterm_input.c │ │ ├── vterm_output.c │ │ ├── vterm_termbuf.c │ │ ├── vterm_vt100.c │ │ └── zero-one.c │ ├── drvutil_disk.c │ ├── drvutil_video.c │ ├── emergency_console.c │ ├── events.c │ ├── heap.c │ ├── include │ │ ├── acess.h │ │ ├── acess_string.h │ │ ├── adt.h │ │ ├── api_drv_common.h │ │ ├── api_drv_disk.h │ │ ├── api_drv_joystick.h │ │ ├── api_drv_keyboard.h │ │ ├── api_drv_network.h │ │ ├── api_drv_terminal.h │ │ ├── api_drv_video.h │ │ ├── apidoc │ │ │ └── arch_x86.h │ │ ├── apidoc_mainpage.h │ │ ├── binary.h │ │ ├── binary_ext.h │ │ ├── bootmod.h │ │ ├── ctype.h │ │ ├── debug_hooks.h │ │ ├── drv_pci.h │ │ ├── drv_pci_int.h │ │ ├── drv_pty.h │ │ ├── drv_serial.h │ │ ├── errno.h │ │ ├── events.h │ │ ├── fs_devfs.h │ │ ├── fs_sysfs.h │ │ ├── hal_proc.h │ │ ├── heap.h │ │ ├── heap_int.h │ │ ├── init.h │ │ ├── iocache.h │ │ ├── keysyms.h │ │ ├── lib │ │ │ └── keyvalue.h │ │ ├── logdebug.h │ │ ├── mboot.h │ │ ├── memfs_helpers.h │ │ ├── meta_serial.h │ │ ├── modules.h │ │ ├── mutex.h │ │ ├── pmemmap.h │ │ ├── posix_signals.h │ │ ├── rwlock.h │ │ ├── semaphore.h │ │ ├── syscalls.h │ │ ├── syscalls.inc.asm │ │ ├── threads.h │ │ ├── threads_int.h │ │ ├── timers.h │ │ ├── timers_int.h │ │ ├── tpl_mm_phys_bitmap.h │ │ ├── tpl_mm_phys_stack.h │ │ ├── utf16.h │ │ ├── vfs.h │ │ ├── vfs_ext.h │ │ ├── vfs_int.h │ │ ├── vfs_ramfs.h │ │ ├── vfs_threads.h │ │ ├── virtual_pci.h │ │ └── workqueue.h │ ├── lib.c │ ├── libc.c │ ├── logging.c │ ├── memfs_helpers.c │ ├── messages.c │ ├── modules.c │ ├── mutex.c │ ├── pmemmap.c │ ├── rwlock.c │ ├── semaphore.c │ ├── syscalls.c │ ├── syscalls.lst │ ├── system.c │ ├── threads.c │ ├── time.c │ ├── utf16.c │ ├── vfs │ │ ├── acls.c │ │ ├── dir.c │ │ ├── fs │ │ │ ├── devfs.c │ │ │ └── root.c │ │ ├── handle.c │ │ ├── io.c │ │ ├── main.c │ │ ├── memfile.c │ │ ├── mmap.c │ │ ├── mount.c │ │ ├── nodecache.c │ │ ├── open.c │ │ └── select.c │ └── workqueue.c ├── Makefile.cfg └── Modules │ ├── Display │ ├── BochsGA │ │ ├── Makefile │ │ └── bochsvbe.c │ ├── Makefile.tpl │ ├── NVidia │ │ ├── main.c │ │ ├── regs.c │ │ └── regs.h │ ├── PL110 │ │ ├── Makefile │ │ └── main.c │ ├── RPi │ │ └── main.c │ ├── Tegra2Vid │ │ ├── Makefile │ │ ├── Registers.txt │ │ ├── main.c │ │ └── tegra2.h │ ├── VESA │ │ ├── Makefile │ │ ├── common.h │ │ ├── main.c │ │ └── vbe.h │ ├── VGA │ │ └── vgaregs.c │ └── VIAVideo │ │ ├── Makefile │ │ ├── common.h │ │ └── main.c │ ├── Filesystems │ ├── Ext2 │ │ ├── Makefile │ │ ├── dir.c │ │ ├── ext2.c │ │ ├── ext2_common.h │ │ ├── ext2fs.h │ │ ├── read.c │ │ └── write.c │ ├── FAT │ │ ├── Makefile │ │ ├── common.h │ │ ├── dir.c │ │ ├── fat.c │ │ ├── fatio.c │ │ ├── fs_fat.h │ │ └── nodecache.c │ ├── InitRD │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── files.lst │ │ ├── generate_initrd.c │ │ ├── initrd.h │ │ └── main.c │ ├── LEAN │ │ ├── common.h │ │ └── main.c │ ├── Makefile.tpl │ ├── NFS │ │ ├── Makefile │ │ ├── common.h │ │ └── main.c │ ├── NTFS │ │ ├── Makefile │ │ ├── attributes.h │ │ ├── common.h │ │ ├── dir.c │ │ ├── index.h │ │ ├── io.c │ │ ├── main.c │ │ └── ntfs.h │ └── RAMDisk │ │ ├── Makefile │ │ ├── ramdisk.c │ │ └── ramdisk.h │ ├── IPStack │ ├── Makefile │ ├── adapters.c │ ├── arp.c │ ├── arp.h │ ├── buffer.c │ ├── firewall.c │ ├── firewall.h │ ├── hwaddr_cache.c │ ├── hwaddr_cache.h │ ├── icmp.c │ ├── icmp.h │ ├── icmpv6.c │ ├── icmpv6.h │ ├── include │ │ ├── adapters.h │ │ ├── adapters_api.h │ │ ├── adapters_int.h │ │ └── buffer.h │ ├── init.h │ ├── interface.c │ ├── interface.h │ ├── ipstack.h │ ├── ipv4.c │ ├── ipv4.h │ ├── ipv6.c │ ├── ipv6.h │ ├── link.c │ ├── link.h │ ├── main.c │ ├── routing.c │ ├── sctp.c │ ├── tcp.c │ ├── tcp.h │ ├── udp.c │ └── udp.h │ ├── Input │ ├── Keyboard │ │ ├── Makefile │ │ ├── include │ │ │ └── keyboard.h │ │ ├── keymap_int.h │ │ ├── layout_kbdus.h │ │ └── main.c │ ├── Makefile.tpl │ ├── Mouse │ │ ├── Makefile │ │ ├── include │ │ │ ├── mouse.h │ │ │ └── mouse_int.h │ │ └── main.c │ └── PS2KbMouse │ │ ├── 8042.c │ │ ├── Makefile │ │ ├── common.h │ │ ├── kb.c │ │ ├── kb_transtab.h │ │ ├── main.c │ │ ├── pl050.c │ │ └── ps2mouse.c │ ├── Interfaces │ ├── Makefile.tpl │ └── UDI │ │ ├── Makefile │ │ ├── Notes.txt │ │ ├── channels.c │ │ ├── deferred_calls.c │ │ ├── include │ │ ├── trans_nsr.h │ │ ├── trans_pci.h │ │ ├── trans_uart.h │ │ ├── udi_internal.h │ │ └── udi_internal_ma.h │ │ ├── main.c │ │ ├── management_agent.c │ │ ├── trans │ │ ├── bus_pci.c │ │ ├── gfx.c │ │ ├── gfx.udic │ │ ├── gfx_plan.txt │ │ ├── gio_uart.c │ │ └── nsr.c │ │ └── udi_lib │ │ ├── core │ │ ├── attr.c │ │ ├── buf.c │ │ ├── cb.c │ │ ├── imc.c │ │ ├── layout.c │ │ ├── logging.c │ │ ├── mei.c │ │ ├── mem.c │ │ ├── meta_gio.c │ │ ├── meta_mgmt.c │ │ ├── queues.c │ │ ├── strmem.c │ │ └── time.c │ │ ├── physio.c │ │ ├── physio │ │ ├── dma.c │ │ ├── meta_bus.c │ │ └── pio.c │ │ ├── scsi.c │ │ └── udi_nic.c │ ├── Libraries │ ├── SunRPC │ │ └── proto.h │ └── VirtIO │ │ ├── Makefile │ │ ├── include │ │ ├── virtio.h │ │ └── virtio_hw.h │ │ └── virtio.c │ ├── Makefile.tpl │ ├── Network │ ├── E1000 │ │ ├── Makefile │ │ ├── e1000.c │ │ ├── e1000.h │ │ └── e1000_hw.h │ ├── Makefile.tpl │ ├── NE2000 │ │ ├── Makefile │ │ └── ne2000.c │ ├── PCnetFAST3 │ │ ├── Makefile │ │ ├── hw.h │ │ └── pcnet-fast3.c │ ├── PRO100 │ │ ├── Makefile │ │ ├── main.c │ │ ├── pro100.h │ │ └── pro100_hw.h │ ├── RTL8139 │ │ ├── Makefile │ │ └── rtl8139.c │ ├── RTL8169 │ │ ├── Makefile │ │ ├── rtl8169.c │ │ └── rtl8169.h │ ├── VIARhineII │ │ ├── Makefile │ │ ├── rhine2.c │ │ └── rhine2_hw.h │ └── VirtIONet │ │ ├── Makefile │ │ ├── virtio-net.c │ │ └── virtio-net.h │ ├── Sound │ └── SoundBlaster16 │ │ ├── Makefile │ │ ├── main.c │ │ └── sbdsp.txt │ ├── Storage │ ├── AHCI │ │ ├── Makefile │ │ ├── ahci.c │ │ ├── ahci.h │ │ ├── ahci_hw.h │ │ ├── ata.h │ │ └── sata.h │ ├── ATA │ │ ├── Makefile │ │ ├── common.h │ │ ├── io.c │ │ └── main.c │ ├── FDD │ │ ├── Makefile │ │ └── fdd.c │ ├── FDDv2 │ │ ├── Makefile │ │ ├── common.h │ │ ├── fdc.c │ │ └── main.c │ ├── LVM │ │ ├── Makefile │ │ ├── include │ │ │ └── lvm.h │ │ ├── lvm.h │ │ ├── lvm_int.h │ │ ├── main.c │ │ ├── mbr.c │ │ ├── mbr.h │ │ └── volumes.c │ └── Makefile.tpl │ ├── USB │ ├── Core │ │ ├── Makefile │ │ ├── hub.c │ │ ├── include │ │ │ ├── usb_core.h │ │ │ ├── usb_host.h │ │ │ └── usb_hub.h │ │ ├── main.c │ │ ├── portctl.c │ │ ├── usb.c │ │ ├── usb.h │ │ ├── usb_async.h │ │ ├── usb_devinit.c │ │ ├── usb_info.c │ │ ├── usb_io.c │ │ ├── usb_lowlevel.c │ │ ├── usb_lowlevel.h │ │ ├── usb_poll.c │ │ └── usb_proto.h │ ├── EHCI │ │ ├── Makefile │ │ ├── ehci.c │ │ ├── ehci.h │ │ └── ehci_hw.h │ ├── HID │ │ ├── Makefile │ │ ├── hid.h │ │ ├── hid_reports.h │ │ ├── keyboard.c │ │ ├── main.c │ │ └── mouse.c │ ├── MSC │ │ ├── Makefile │ │ ├── common.h │ │ ├── main.c │ │ ├── msc_proto.h │ │ ├── scsi.c │ │ └── scsi.h │ ├── Makefile.tpl │ ├── OHCI │ │ ├── Makefile │ │ ├── ohci.c │ │ └── ohci.h │ └── UHCI │ │ ├── Makefile │ │ ├── uhci.c │ │ └── uhci.h │ ├── armv7 │ ├── GIC │ │ ├── Makefile │ │ ├── gic.c │ │ └── gic.h │ └── Makefile.tpl │ ├── link.ld │ └── x86 │ ├── ISADMA │ ├── Makefile │ ├── dma.c │ └── include │ │ └── dma.h │ └── Makefile.tpl ├── MakeReleaseSet ├── Makefile ├── Makefile.Version.cfg ├── Makefile.cfg ├── Notes ├── 20120122-Events.txt ├── 20120204-RoutingNames.txt ├── 20130511-ptys.txt ├── 3D.txt ├── AcessFS.txt ├── AutoconfCrossCompiling.txt ├── SIF.txt ├── Spinlocks.txt ├── TODO ├── VBox_VGA.txt ├── VFS - Select.txt ├── VFS_MMap_Notes_20110711.txt ├── VTerm.txt └── VirtualPCI.txt ├── README ├── RunBochs ├── RunQemu ├── RunQemuArm ├── TODO.txt ├── Tools ├── BootFloppy │ ├── COPYING │ ├── MakeDiskImage │ ├── menu.lst │ ├── stage1 │ └── stage2 ├── DiskTool │ ├── Makefile │ ├── actions.c │ ├── helpers.c │ ├── include │ │ ├── acess.h │ │ ├── acess_logging.h │ │ ├── arch.h │ │ ├── disktool_common.h │ │ ├── modules.h │ │ ├── mutex.h │ │ └── rwlock.h │ ├── main.c │ ├── nativefs.c │ ├── script.c │ ├── testscript │ └── vfs_handles.c ├── GCCProxy │ ├── gccproxy.sh │ └── getconfig.mk ├── Makefile ├── NetTest │ ├── Makefile │ ├── cmdline_backend.c │ ├── helpers.c │ ├── include │ │ ├── cmdline.h │ │ ├── nettest.h │ │ └── tcpserver.h │ ├── logging.c │ ├── main.c │ ├── mode_cmdline.c │ ├── nic.c │ ├── tap.c │ ├── tcpclient.c │ ├── tcpserver.c │ └── vfs_shim.c ├── NetTest_Runner │ ├── Makefile │ ├── arp.c │ ├── include │ │ ├── arp.h │ │ ├── common.h │ │ ├── ip.h │ │ ├── link.h │ │ ├── net.h │ │ ├── stack.h │ │ ├── tcp.h │ │ ├── test.h │ │ └── tests.h │ ├── ip.c │ ├── link.c │ ├── main.c │ ├── net.c │ ├── stack.c │ ├── tcp.c │ ├── test_arp.c │ └── test_tcp.c ├── img2sif.c └── nativelib │ ├── Makefile │ ├── dummy_iocache.c │ ├── include │ ├── acess.h │ ├── acess_logging.h │ ├── arch.h │ ├── pthread_weak.h │ ├── shortlock.h │ └── threads_int.h │ ├── logging.c │ ├── misc.c │ ├── mutex.c │ ├── rwlock.c │ ├── semaphore.c │ ├── threads.c │ ├── threads_int.c │ └── time.c ├── UDI ├── Tools │ ├── udibuild.ini │ ├── udibuild_src │ │ ├── Makefile │ │ ├── build.c │ │ ├── include │ │ │ ├── build.h │ │ │ ├── common.h │ │ │ ├── inifile.h │ │ │ └── udiprops.h │ │ ├── inifile.c │ │ ├── main.c │ │ └── udiprops.c │ ├── udimkpkg │ ├── udisetup │ └── udisetup-ia32.ld ├── drivers │ ├── gfx_bochs │ │ ├── bochsga_common.h │ │ ├── bochsga_core.c │ │ ├── bochsga_engines.h │ │ ├── bochsga_pio.h │ │ └── udiprops.txt │ ├── helpers.h │ ├── helpers_gfx.h │ ├── net_ne2000 │ │ ├── ne2000_common.h │ │ ├── ne2000_core.c │ │ ├── ne2000_hw.h │ │ ├── ne2000_pio.h │ │ ├── ne2000_rx.c │ │ ├── ne2000_tx.c │ │ └── udiprops.txt │ └── uart_16c550 │ │ ├── uart16c550.c │ │ ├── uart16c550_common.h │ │ ├── uart16c550_pio.h │ │ └── udiprops.txt ├── gfx_spec_issues.txt └── include │ ├── physio │ ├── dma.h │ ├── dma_const.h │ ├── meta_bus.h │ ├── meta_intr.h │ ├── pci.h │ └── pio.h │ ├── udi.h │ ├── udi │ ├── arch │ │ ├── amd64.h │ │ └── ia32.h │ ├── attr.h │ ├── buf.h │ ├── cb.h │ ├── imc.h │ ├── init.h │ ├── log.h │ ├── mei.h │ ├── mem.h │ ├── meta_gio.h │ ├── meta_mgmt.h │ ├── queues.h │ ├── strmem.h │ └── time.h │ ├── udi_gfx.h │ ├── udi_gfx.h.ORIG │ ├── udi_nic.h │ ├── udi_pci.h │ ├── udi_physio.h │ └── udi_scsi.h ├── Usermode ├── Applications │ ├── CLIShell_src │ │ ├── Makefile │ │ ├── header.h │ │ ├── lib.c │ │ ├── main.c │ │ └── rules.mk │ ├── Makefile.cfg │ ├── Makefile.tpl │ ├── MultibootCheck_src │ │ ├── Makefile │ │ └── MultibootCheck.c │ ├── automounter_src │ │ ├── Makefile │ │ └── main.c │ ├── axwin3_src │ │ ├── AcessLogoSmall.sif │ │ ├── Interface │ │ │ ├── Makefile │ │ │ └── main.c │ │ ├── Makefile │ │ ├── Makefile.sdl │ │ ├── WM │ │ │ ├── Makefile │ │ │ ├── Makefile.sdl │ │ │ ├── common.mk │ │ │ ├── decorator.c │ │ │ ├── font_8x16.h │ │ │ ├── image.c │ │ │ ├── include │ │ │ │ ├── common.h │ │ │ │ ├── decorator.h │ │ │ │ ├── image.h │ │ │ │ ├── ipc_int.h │ │ │ │ ├── lowlevel.h │ │ │ │ ├── renderer_classful.h │ │ │ │ ├── renderer_widget.h │ │ │ │ ├── video.h │ │ │ │ ├── wm.h │ │ │ │ ├── wm_hotkeys.h │ │ │ │ ├── wm_input.h │ │ │ │ ├── wm_internals.h │ │ │ │ └── wm_renderer.h │ │ │ ├── input.c │ │ │ ├── input_SDL.c │ │ │ ├── ipc.c │ │ │ ├── ipc_acess.c │ │ │ ├── main.c │ │ │ ├── main_SDL.c │ │ │ ├── messageio.c │ │ │ ├── renderers │ │ │ │ ├── background.c │ │ │ │ ├── classes.c │ │ │ │ ├── framebuffer.c │ │ │ │ ├── menu.c │ │ │ │ ├── richtext.c │ │ │ │ ├── widget.c │ │ │ │ └── widget │ │ │ │ │ ├── button.c │ │ │ │ │ ├── colours.h │ │ │ │ │ ├── common.h │ │ │ │ │ ├── disptext.c │ │ │ │ │ ├── image.c │ │ │ │ │ ├── spacer.c │ │ │ │ │ ├── subwin.c │ │ │ │ │ └── textinput.c │ │ │ ├── resources │ │ │ │ ├── cursor.h │ │ │ │ ├── toolbar_new.png │ │ │ │ ├── toolbar_open.png │ │ │ │ └── toolbar_save.png │ │ │ ├── video.c │ │ │ ├── video_SDL.c │ │ │ ├── wm.c │ │ │ ├── wm_hotkeys.c │ │ │ ├── wm_input.c │ │ │ ├── wm_render.c │ │ │ └── wm_render_text.c │ │ ├── include │ │ │ ├── framebuffer_messages.h │ │ │ ├── ipcmessages.h │ │ │ ├── menu_messages.h │ │ │ ├── richtext_messages.h │ │ │ ├── widget_messages.h │ │ │ └── wm_messages.h │ │ ├── libaxwin3.so_src │ │ │ ├── Makefile │ │ │ ├── include │ │ │ │ ├── internal.h │ │ │ │ └── ipc.h │ │ │ ├── main.c │ │ │ ├── msg.c │ │ │ ├── r_menu.c │ │ │ ├── r_richtext.c │ │ │ ├── r_widget.c │ │ │ └── wm.c │ │ ├── notes.txt │ │ ├── notes │ │ │ └── menus.txt │ │ └── sdl.mk │ ├── axwin4_src │ │ ├── Common │ │ │ ├── include │ │ │ │ ├── ipc_proto.hpp │ │ │ │ └── serialisation.hpp │ │ │ └── serialisation.cpp │ │ ├── Makefile │ │ ├── Notes.txt │ │ ├── Server │ │ │ ├── CClient.cpp │ │ │ ├── CConfig.cpp │ │ │ ├── CIPCChannel_AcessIPCPipe.cpp │ │ │ ├── CRect.cpp │ │ │ ├── CSurface.cpp │ │ │ ├── CWindow.cpp │ │ │ ├── Makefile │ │ │ ├── compositor.cpp │ │ │ ├── draw_control.cpp │ │ │ ├── draw_text.cpp │ │ │ ├── include │ │ │ │ ├── CClient.hpp │ │ │ │ ├── CColour.hpp │ │ │ │ ├── CCompositor.hpp │ │ │ │ ├── CConfig.hpp │ │ │ │ ├── CConfigIPC.hpp │ │ │ │ ├── CConfigInput.hpp │ │ │ │ ├── CConfigVideo.hpp │ │ │ │ ├── CIPCChannel_AcessIPCPipe.hpp │ │ │ │ ├── CRect.hpp │ │ │ │ ├── CSurface.hpp │ │ │ │ ├── CWindow.hpp │ │ │ │ ├── IFontFace.hpp │ │ │ │ ├── IIPCChannel.hpp │ │ │ │ ├── IRegion.hpp │ │ │ │ ├── IVideo.hpp │ │ │ │ ├── IWindow.hpp │ │ │ │ ├── common.hpp │ │ │ │ ├── compositor.hpp │ │ │ │ ├── draw_control.hpp │ │ │ │ ├── draw_text.hpp │ │ │ │ ├── input.hpp │ │ │ │ ├── ipc.hpp │ │ │ │ ├── timing.hpp │ │ │ │ └── video.hpp │ │ │ ├── input.cpp │ │ │ ├── ipc.cpp │ │ │ ├── main.cpp │ │ │ ├── resources │ │ │ │ ├── cursor.h │ │ │ │ └── font_8x16.h │ │ │ ├── timing.cpp │ │ │ └── video.cpp │ │ └── UI │ │ │ ├── Makefile │ │ │ ├── include │ │ │ ├── common.h │ │ │ └── taskbar.h │ │ │ ├── main.c │ │ │ └── taskbar.c │ ├── bomb_src │ │ ├── Makefile │ │ └── main.c │ ├── cat_src │ │ ├── Makefile │ │ ├── main.c │ │ └── rules.mk │ ├── cpuid_src │ │ ├── Makefile │ │ └── main.c │ ├── dhcpclient_src │ │ ├── Makefile │ │ └── main.c │ ├── dnsresolve_src │ │ ├── Makefile │ │ └── main.c │ ├── edit_src │ │ ├── Makefile │ │ └── main.c │ ├── gui_ate_src │ │ ├── Makefile │ │ ├── edit.c │ │ ├── include │ │ │ ├── common.h │ │ │ ├── file.h │ │ │ └── syntax.h │ │ ├── main.c │ │ ├── strings.c │ │ ├── strings.h │ │ └── toolbar.c │ ├── gui_terminal_src │ │ ├── Makefile │ │ ├── UTEST │ │ │ ├── Makefile │ │ │ ├── TEST_vt100.c │ │ │ ├── test_common.c │ │ │ └── test_common.h │ │ ├── display.c │ │ ├── include │ │ │ ├── display.h │ │ │ └── vt100.h │ │ ├── main.c │ │ └── vt100.c │ ├── httpd_src │ │ ├── Makefile │ │ ├── cgi.c │ │ ├── http.c │ │ ├── include │ │ │ └── common.h │ │ ├── logging.c │ │ ├── main.c │ │ ├── net.c │ │ └── server.c │ ├── imageview_src │ │ ├── Makefile │ │ └── main.c │ ├── init_src │ │ ├── Makefile │ │ ├── common.h │ │ └── main.c │ ├── insmod_src │ │ ├── Makefile │ │ └── main.c │ ├── ip_src │ │ ├── Makefile │ │ ├── addr.c │ │ ├── common.h │ │ ├── main.c │ │ ├── routes.c │ │ └── rules.mk │ ├── irc_src │ │ ├── Makefile │ │ ├── common.h │ │ ├── input.c │ │ ├── input.h │ │ ├── main.c │ │ ├── message.h │ │ ├── pseudo_curses.c │ │ ├── pseudo_curses.h │ │ ├── server.c │ │ ├── server.h │ │ ├── window.c │ │ └── window.h │ ├── login_src │ │ ├── Makefile │ │ ├── database_tpl.c │ │ ├── header.h │ │ └── main.c │ ├── ls_src │ │ ├── Makefile │ │ ├── main.c │ │ └── rules.mk │ ├── lspci_src │ │ ├── Makefile │ │ └── main.c │ ├── mount_src │ │ ├── Makefile │ │ └── main.c │ ├── ping_src │ │ ├── Makefile │ │ └── main.c │ ├── rules.mk │ ├── telnet_src │ │ ├── Makefile │ │ └── main.c │ ├── telnetd_src │ │ ├── Makefile │ │ └── main.c │ ├── testclient_src │ │ ├── Makefile │ │ └── main.c │ ├── testserver_src │ │ ├── Makefile │ │ └── main.c │ ├── wget_src │ │ ├── Makefile │ │ └── main.c │ └── writetest_src │ │ ├── Makefile │ │ └── main.c ├── Filesystem │ ├── Conf │ │ ├── Auth │ │ │ ├── Groups │ │ │ ├── Passwords │ │ │ └── Users │ │ ├── BootConf.cfg │ │ └── inittab │ └── Makefile ├── Libraries │ ├── .gitignore │ ├── Makefile │ ├── Makefile.cfg │ ├── Makefile.tpl │ ├── _utest_include │ │ └── utest_common.h │ ├── crt0.o_src │ │ ├── Makefile │ │ ├── armv7-crti.S │ │ ├── armv7-crtn.S │ │ ├── crt0.c │ │ ├── crt0S.c │ │ ├── crtbegin.c │ │ ├── crtend.c │ │ ├── native-crti.S │ │ ├── native-crtn.S │ │ ├── rules.mk │ │ ├── x86-crti.S │ │ ├── x86-crtn.S │ │ ├── x86_64-crti.S │ │ └── x86_64-crtn.S │ ├── ld-acess.so_src │ │ ├── Makefile │ │ ├── _stublib.c │ │ ├── arch │ │ │ ├── .gitignore │ │ │ ├── armv6.S.h │ │ │ ├── armv6.ld │ │ │ ├── armv7.S.h │ │ │ ├── armv7.ld │ │ │ ├── syscalls.s.h │ │ │ ├── x86.asm.h │ │ │ ├── x86.ld │ │ │ ├── x86_64.asm.h │ │ │ └── x86_64.ld │ │ ├── common.h │ │ ├── elf.c │ │ ├── elf32.h │ │ ├── elf64.h │ │ ├── elf_impl.c │ │ ├── export.c │ │ ├── include_exp │ │ │ ├── acess │ │ │ │ ├── _native_syscallmod.h │ │ │ │ ├── devices.h │ │ │ │ ├── devices │ │ │ │ │ ├── joystick.h │ │ │ │ │ ├── pty.h │ │ │ │ │ ├── pty_cmds.h │ │ │ │ │ └── terminal.h │ │ │ │ ├── fd_set.h │ │ │ │ ├── sys.h │ │ │ │ └── syscall_types.h │ │ │ └── sys │ │ │ │ ├── basic_drivers.h │ │ │ │ └── param.h │ │ ├── lib.c │ │ ├── loadlib.c │ │ ├── main.c │ │ ├── pe.c │ │ ├── pe.h │ │ └── rules.mk │ ├── libacess-native.so_src │ │ └── Makefile │ ├── libaxwin3.so_src │ │ ├── Makefile │ │ └── include_exp │ │ │ └── axwin3 │ │ │ ├── axwin.h │ │ │ ├── keysyms.h │ │ │ ├── menu.h │ │ │ ├── richtext.h │ │ │ └── widget.h │ ├── libaxwin4.so_src │ │ ├── Makefile │ │ ├── include │ │ │ ├── CIPCChannel_AcessIPCPipe.hpp │ │ │ ├── IIPCChannel.hpp │ │ │ └── common.hpp │ │ ├── include_exp │ │ │ └── axwin4 │ │ │ │ ├── axwin.h │ │ │ │ └── definitions.h │ │ ├── ipc.cpp │ │ ├── ipc_acessipcpipe.cpp │ │ ├── main.c │ │ ├── window_drawing.cpp │ │ └── wm.cpp │ ├── libc++.so_src │ │ ├── Makefile │ │ ├── cxxabi.cc │ │ ├── exception_handling.cc │ │ ├── exception_handling_acxx.h │ │ ├── exception_handling_cxxabi.h │ │ ├── exceptions.cc │ │ ├── guard.cc │ │ ├── gxx_personality.cc │ │ ├── include_exp │ │ │ ├── _libcxx_helpers.h │ │ │ ├── algorithm │ │ │ ├── allocator │ │ │ ├── cassert │ │ │ ├── cerrno │ │ │ ├── cstddef │ │ │ ├── cstdint │ │ │ ├── cstdio │ │ │ ├── cstdlib │ │ │ ├── cstring │ │ │ ├── cxxabi.h │ │ │ ├── exception │ │ │ ├── functional │ │ │ ├── initializer_list │ │ │ ├── iterator │ │ │ ├── list │ │ │ ├── map │ │ │ ├── memory │ │ │ ├── mutex │ │ │ ├── new │ │ │ ├── stdexcept │ │ │ ├── string │ │ │ ├── system_error │ │ │ ├── type_traits │ │ │ ├── typeinfo │ │ │ ├── utility │ │ │ └── vector │ │ ├── misc.cc │ │ ├── mutex.cc │ │ ├── new.cc │ │ ├── string.cc │ │ ├── system_error.cc │ │ └── typeinfo.cc │ ├── libc++_extras.so_src │ │ ├── Makefile │ │ ├── TEST_cprintf.cpp │ │ └── include_exp │ │ │ └── cxxextras_printf │ ├── libc.so_src │ │ ├── .gitignore │ │ ├── EXP_strtoi.txt │ │ ├── Makefile │ │ ├── TEST_printf.c │ │ ├── TEST_string.c │ │ ├── TEST_strtoi.c │ │ ├── arch │ │ │ ├── armv6.S │ │ │ ├── armv7.S │ │ │ ├── native.S │ │ │ ├── native.asm │ │ │ ├── x86.asm │ │ │ └── x86_64.asm │ │ ├── config.h │ │ ├── crt0.asm │ │ ├── ctype.c │ │ ├── env.c │ │ ├── errno.c │ │ ├── heap.c │ │ ├── heap_native.c │ │ ├── include_exp │ │ │ ├── assert.h │ │ │ ├── ctype.h │ │ │ ├── errno.enum.h │ │ │ ├── errno.h │ │ │ ├── inttypes.h │ │ │ ├── locale.h │ │ │ ├── setjmp.h │ │ │ ├── signal.h │ │ │ ├── signal_list.h │ │ │ ├── stdio.h │ │ │ ├── stdlib.h │ │ │ ├── string.h │ │ │ └── time.h │ │ ├── lib.h │ │ ├── printf.c │ │ ├── rand.c │ │ ├── rules.mk │ │ ├── scanf.c │ │ ├── signals.c │ │ ├── sockets.c │ │ ├── stdio.c │ │ ├── stdio_files.c │ │ ├── stdio_int.h │ │ ├── stdlib.c │ │ ├── string.c │ │ ├── strtof.c │ │ ├── strtoi.c │ │ ├── stub.c │ │ ├── time.c │ │ ├── timeconv.c │ │ └── timeconv.h │ ├── libiconv.so_src │ │ ├── Makefile │ │ ├── iconv.c │ │ └── include_exp │ │ │ └── iconv.h │ ├── libimage.so_src │ │ └── include_exp │ │ │ └── image.h │ ├── libimage_sif.so_src │ │ ├── Makefile │ │ ├── main.c │ │ └── rules.mk │ ├── libintl.so_src │ │ ├── Makefile │ │ ├── gettext.c │ │ ├── include_exp │ │ │ └── libintl.h │ │ └── main.c │ ├── libm.so_src │ │ ├── Makefile │ │ ├── include_exp │ │ │ └── math.h │ │ ├── pow.c │ │ └── stub.c │ ├── libnet.so_src │ │ ├── Makefile │ │ ├── TEST_dns_proto.c │ │ ├── address.c │ │ ├── dns.c │ │ ├── dns_proto.c │ │ ├── hostnames.c │ │ ├── include │ │ │ ├── dns.h │ │ │ └── dns_int.h │ │ ├── include_exp │ │ │ └── net.h │ │ ├── main.c │ │ ├── rules.mk │ │ └── socket.c │ ├── libposix.so_src │ │ ├── Makefile │ │ ├── clocks.c │ │ ├── dirent.c │ │ ├── fcntl.c │ │ ├── getopt.c │ │ ├── grp.c │ │ ├── include_exp │ │ │ ├── dirent.h │ │ │ ├── endian.h │ │ │ ├── fcntl.h │ │ │ ├── getopt.h │ │ │ ├── glob.h │ │ │ ├── grp.h │ │ │ ├── libposix_stdlib.h │ │ │ ├── libposix_time.h │ │ │ ├── pty.h │ │ │ ├── pwd.h │ │ │ ├── regex.h │ │ │ ├── strings.h │ │ │ ├── sys │ │ │ │ ├── ioctl.h │ │ │ │ ├── mman.h │ │ │ │ ├── resource.h │ │ │ │ ├── select.h │ │ │ │ ├── stat.h │ │ │ │ ├── time.h │ │ │ │ ├── types.h │ │ │ │ └── wait.h │ │ │ ├── syslog.h │ │ │ ├── termios.h │ │ │ ├── unistd.h │ │ │ ├── utime.h │ │ │ └── utmpx.h │ │ ├── main.c │ │ ├── mktemp.c │ │ ├── pty.c │ │ ├── pwd.c │ │ ├── stat.c │ │ ├── sys_ioctl.c │ │ ├── sys_resource.c │ │ ├── sys_time.c │ │ ├── sys_wait.c │ │ ├── syslog.c │ │ ├── termios.c │ │ ├── unistd.c │ │ ├── unistd_crypt.c │ │ ├── utime.c │ │ └── utmpx.c │ ├── libpsocket.so_src │ │ ├── Makefile │ │ ├── byteordering.c │ │ ├── common.h │ │ ├── getaddrinfo.c │ │ ├── include_exp │ │ │ ├── arpa │ │ │ │ └── inet.h │ │ │ ├── netdb.h │ │ │ ├── netinet │ │ │ │ ├── in.h │ │ │ │ ├── ip.h │ │ │ │ └── tcp.h │ │ │ └── sys │ │ │ │ ├── socket.h │ │ │ │ └── un.h │ │ ├── main.c │ │ ├── pton.c │ │ └── socket.c │ ├── libpthread.so_src │ │ ├── Makefile │ │ ├── include_exp │ │ │ ├── pthread.h │ │ │ └── sched.h │ │ ├── main.c │ │ └── thread.c │ ├── libreadline.so_src │ │ ├── Makefile │ │ ├── include_exp │ │ │ └── readline.h │ │ ├── main.c │ │ └── rules.mk │ ├── libresolv.so_src │ │ ├── Makefile │ │ ├── include_exp │ │ │ ├── arpa │ │ │ │ └── nameser.h │ │ │ └── resolv.h │ │ └── resolv.c │ ├── libunicode.so_src │ │ ├── Makefile │ │ ├── include_exp │ │ │ └── unicode.h │ │ ├── main.c │ │ └── utf-8.c │ ├── liburi.so_src │ │ ├── Makefile │ │ ├── include_exp │ │ │ └── uri.h │ │ ├── main.c │ │ └── rules.mk │ └── rules.mk ├── Makefile ├── Makefile.cfg ├── body.mk ├── common_settings.mk ├── footer.mk ├── header.mk └── rules.mk └── bochsrc.txt /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Externals/libspiderscript/source"] 2 | path = Externals/libspiderscript/source 3 | url = git://git.mutabah.net/spiderscript.git 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | compiler: clang 3 | sudo: false 4 | 5 | #before_install: 6 | # - sudo apt-get update -qq 7 | # - sudo apt-get install -qq nasm 8 | #env: 9 | # - ARCH=host HOST_ARCH=x86 USE_ACPICA=0 10 | # - ARCH=host HOST_ARCH=x86_64 CC="$CC -m64" 11 | script: 12 | - "make utest-build mtest-build" 13 | - "make -k utest-run mtest-run" 14 | -------------------------------------------------------------------------------- /AcessNative/.gitignore: -------------------------------------------------------------------------------- 1 | ld-acess 2 | ld-acess.exe 3 | AcessKernel 4 | AcessKernel.exe 5 | Makefile.BuildNum 6 | -------------------------------------------------------------------------------- /AcessNative/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: all clean 3 | 4 | V ?= @ 5 | 6 | all clean: 7 | @$(MAKE) -C acesskernel_src $@ 8 | @$(MAKE) -C ld-acess_src $@ 9 | @$(MAKE) -C libacess-native.so_src $@ 10 | @$(MAKE) -C .. $@-user ARCH=native V=$(V) 11 | -------------------------------------------------------------------------------- /AcessNative/RunRootApp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Spin up an application bound to VTerm 0 using ./ld-acess 5 | # 6 | 7 | $DBG ./ld-acess --open /Devices/VTerm/0 --open /Devices/VTerm/0 --open /Devices/VTerm/0 $* 8 | -------------------------------------------------------------------------------- /AcessNative/RunTest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs the AcessNative kernel and spawns a native executable using ./ld-acess 4 | # 5 | trap '' 2 6 | #$1 ./AcessKernel --rootapp /Acess/SBin/login 7 | $1 ./AcessKernel --rootapp /Acess/Apps/AxWin/3.0/AxWinWM 8 | trap 2 9 | killall ld-acess 10 | -------------------------------------------------------------------------------- /AcessNative/acesskernel_src/Details.txt: -------------------------------------------------------------------------------- 1 | Provides Acess Kernel services 2 | - UDP Server listening on 127.0.0.1:2766 (0XACE) 3 | > See ld-acess.so_src/syscalls for the spec 4 | - Starts acess applications 5 | > Provides kernel loader services and loads libacess 6 | - Provides "vterms" / control panel 7 | - Cross platform (GTK?/SDL) -------------------------------------------------------------------------------- /AcessNative/acesskernel_src/include/proc.h: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | #ifndef _PROC_H_ 4 | #define _PROC_H_ 5 | 6 | #include 7 | 8 | #define MAX_CPUS 1 9 | 10 | typedef struct {} tTaskState; 11 | typedef struct {} tMemoryState; 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /AcessNative/acesskernel_src/include/threads_glue.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _ACESSNATIVE__THREADS_GLUE_H_ 4 | #define _ACESSNATIVE__THREADS_GLUE_H_ 5 | 6 | 7 | extern void Threads_Glue_Yield(void); 8 | extern void Threads_Glue_AcquireMutex(void **Lock); 9 | extern void Threads_Glue_ReleaseMutex(void **Lock); 10 | extern void Threads_Glue_SemInit(void **Ptr, int Val); 11 | extern int Threads_Glue_SemWait(void *Ptr, int Max); 12 | extern int Threads_Glue_SemSignal( void *Ptr, int AmmountToAdd ); 13 | extern void Threads_Glue_SemDestroy( void *Ptr ); 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /AcessNative/acesskernel_src/net_wrap.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _NET_WRAP_H_ 3 | #define _NET_WRAP_H_ 4 | 5 | extern void Net_Wrap_Init(void); 6 | extern void *Net_Wrap_ConnectTcp(void *Node, short SrcPort, short DstPtr, int Type, const void *Addr); 7 | extern size_t Net_Wrap_ReadSocket(void *Handle, size_t Bytes, void *Dest); 8 | extern size_t Net_Wrap_WriteSocket(void *Handle, size_t Bytes, const void *Dest); 9 | extern void Net_Wrap_CloseSocket(void *Handle); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /AcessNative/ld-acess_src/elf.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #define _COMMON_H 3 | // stops real ld-acess.so common.h being included 4 | #include "../../Usermode/Libraries/ld-acess.so_src/elf.c" 5 | -------------------------------------------------------------------------------- /AcessNative/ld-acess_src/elf32.h: -------------------------------------------------------------------------------- 1 | #include "../../Usermode/Libraries/ld-acess.so_src/elf32.h" 2 | -------------------------------------------------------------------------------- /AcessNative/ld-acess_src/elf64.h: -------------------------------------------------------------------------------- 1 | #include "../../Usermode/Libraries/ld-acess.so_src/elf64.h" 2 | -------------------------------------------------------------------------------- /AcessNative/ld-acess_src/request.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 - AcessNative 3 | * ld-acess 4 | * 5 | * request.h - IPC Request common header 6 | */ 7 | 8 | #ifndef _REQUEST_H_ 9 | #define _REQUEST_H_ 10 | 11 | #include "../syscalls.h" 12 | 13 | extern int SendRequest(tRequestHeader *Request, int RequestSize, int ResponseSize); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /AcessNative/libacess-native.so_src/common.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _LIBACESSNATIVE_COMMON_H_ 3 | #define _LIBACESSNATIVE_COMMON_H_ 4 | 5 | extern int giSyscall_ClientID; 6 | extern void Request_Preinit(void); 7 | extern int acess__SysOpen(const char *Path, unsigned int flags); 8 | extern int acessnative_spawn(const char *Binary, int SyscallID, const char * const * argv, const char * const * envp); 9 | 10 | #define ENV_VAR_PREOPENS "AN_PREOPEN" 11 | #define ENV_VAR_KEY "ACESSNATIVE_KEY" 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /AcessNative/libacess-native.so_src/heap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * AcessNative libacess-native 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * heap.c 6 | * - Proxies for the C standard heap 7 | */ 8 | #include 9 | 10 | void *acess_malloc(size_t bytes) 11 | { 12 | return malloc(bytes); 13 | } 14 | 15 | void acess_free(void *ptr) 16 | { 17 | free(ptr); 18 | } 19 | 20 | void *acess_calloc(size_t __nmemb, size_t __size) 21 | { 22 | return calloc(__nmemb, __size); 23 | } 24 | 25 | void *acess_realloc(void *__ptr, size_t __size) 26 | { 27 | return realloc(__ptr, __size); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /AcessNative/libacess-native.so_src/request.c: -------------------------------------------------------------------------------- 1 | #include "../ld-acess_src/request.c" 2 | -------------------------------------------------------------------------------- /AcessNative/libacess-native.so_src/syscalls.c: -------------------------------------------------------------------------------- 1 | #include "../ld-acess_src/syscalls.c" 2 | -------------------------------------------------------------------------------- /AcessNative/syscalls_list.h: -------------------------------------------------------------------------------- 1 | _(SYS_NULL), 2 | 3 | _(SYS_EXIT), 4 | 5 | _(SYS_OPEN), 6 | _(SYS_CLOSE), 7 | _(SYS_REOPEN), 8 | _(SYS_COPYFD), 9 | _(SYS_FDFLAGS), 10 | _(SYS_READ), 11 | _(SYS_WRITE), 12 | _(SYS_SEEK), 13 | _(SYS_TELL), 14 | _(SYS_IOCTL), 15 | _(SYS_FINFO), 16 | _(SYS_READDIR), 17 | _(SYS_OPENCHILD), 18 | _(SYS_GETACL), 19 | _(SYS_MOUNT), 20 | _(SYS_CHDIR), 21 | 22 | _(SYS_AN_GETPATH), 23 | 24 | _(SYS_WAITTID), 25 | _(SYS_SETUID), 26 | _(SYS_SETGID), 27 | 28 | _(SYS_GETTID), 29 | _(SYS_GETPID), 30 | _(SYS_GETUID), 31 | _(SYS_GETGID), 32 | 33 | // IPC 34 | _(SYS_SLEEP), 35 | _(SYS_AN_FORK), 36 | _(SYS_AN_SPAWN), 37 | _(SYS_SENDMSG), 38 | _(SYS_GETMSG), 39 | _(SYS_SELECT), 40 | _(SYS_WAITEVENT), 41 | 42 | -------------------------------------------------------------------------------- /BuildAcessNative: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | make -C AcessNative/libacess-native.so_src/ && make -C AcessNative/acesskernel_src/ && ARCH=native make all-user 3 | 4 | -------------------------------------------------------------------------------- /BuildConf/armv6/Makefile.cfg: -------------------------------------------------------------------------------- 1 | 2 | ARM_CPUNAME = gerneric-armv6 3 | CC = arm-armv6-eabi-gcc -mcpu=$(ARM_CPUNAME) 4 | AS = arm-armv6-eabi-gcc -mcpu=$(ARM_CPUNAME) -c 5 | LD = arm-armv6-eabi-ld 6 | OBJDUMP = arm-armv6-eabi-objdump 7 | DISASM = $(OBJDUMP) -d -S 8 | ARCHDIR = armv6 9 | STRIP = arm-elf-strip 10 | 11 | ASSUFFIX = S 12 | 13 | # Default Configuration 14 | ifeq ($(PLATFORM),) 15 | PLATFORM=raspberrypi 16 | $(warning Defaulting to "PLATFORM=$(PLATFORM)") 17 | endif 18 | 19 | -------------------------------------------------------------------------------- /BuildConf/armv6/default.mk: -------------------------------------------------------------------------------- 1 | 2 | ifeq ($(PLATFORM),default) 3 | $(error Please select a platform) 4 | endif 5 | 6 | #MODULES += armv7/GIC 7 | MODULES += Filesystems/InitRD 8 | -------------------------------------------------------------------------------- /BuildConf/armv6/raspberrypi.mk: -------------------------------------------------------------------------------- 1 | 2 | include $(ACESSDIR)/BuildConf/armv6/default.mk 3 | ARM_CPUNAME = arm1176jzf-s 4 | -------------------------------------------------------------------------------- /BuildConf/armv7/Makefile.cfg: -------------------------------------------------------------------------------- 1 | 2 | TRIPLET = arm-pc-acess2 3 | ARM_CPUNAME = gerneric-armv7 4 | #AS = $(TRIPLET)-gcc -mcpu=$(ARM_CPUNAME) -c 5 | DISASM := $(OBJDUMP) -d -S 6 | ARCHDIR = armv7 7 | 8 | ASSUFFIX = S 9 | 10 | # Default Configuration 11 | ifeq ($(PLATFORM),) 12 | PLATFORM=realview_pb 13 | endif 14 | 15 | -------------------------------------------------------------------------------- /BuildConf/armv7/default.mk: -------------------------------------------------------------------------------- 1 | 2 | ifeq ($(PLATFORM),default) 3 | $(error Please select a platform) 4 | endif 5 | 6 | # Core ARMv7 modules 7 | 8 | MODULES += Filesystems/InitRD 9 | -------------------------------------------------------------------------------- /BuildConf/armv7/realview_pb.mk: -------------------------------------------------------------------------------- 1 | 2 | include $(ACESSDIR)/BuildConf/armv7/default.mk 3 | 4 | ARM_CPUNAME = cortex-a8 5 | MODULES += armv7/GIC 6 | MODULES += Input/PS2KbMouse 7 | MODULES += Display/PL110 8 | -------------------------------------------------------------------------------- /BuildConf/armv7/tegra2.mk: -------------------------------------------------------------------------------- 1 | 2 | include $(ACESSDIR)/BuildConf/armv7/default.mk 3 | 4 | ARM_CPUNAME = cortex-a9 5 | MODULES += armv7/GIC 6 | MODULES += Display/Tegra2Vid 7 | MODULES += USB/Core USB/EHCI 8 | MODULES += USB/HID USB/MSC 9 | -------------------------------------------------------------------------------- /BuildConf/host/Makefile.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Host Native makefile 3 | # - Used for forcing the architecture 4 | # 5 | 6 | SAVED_CC_ := $(CC) 7 | SAVED_LD_ := $(LD) 8 | 9 | ifeq ($(HOST_ARCH),) 10 | $(error Please set HOST_ARCH to the architecture to compile, e.g. x86) 11 | endif 12 | 13 | include $(ACESSDIR)/BuildConf/$(HOST_ARCH)/Makefile.cfg 14 | 15 | OBJDUMP := objdump -S 16 | 17 | CC_SUFFIX = 18 | 19 | ifeq ($(HOST_ARCH),x86) 20 | CC_SUFFIX := -m32 21 | LD_SUFFIX := -melf_i386 22 | endif 23 | 24 | CC := $(SAVED_CC_) $(CC_SUFFIX) 25 | LD := $(SAVED_LD_) $(LD_SUFFIX) 26 | 27 | -------------------------------------------------------------------------------- /BuildConf/host/default.mk: -------------------------------------------------------------------------------- 1 | 2 | MODULES += Storage/ATA 3 | MODULES += Storage/FDDv2 4 | MODULES += Network/NE2000 Network/RTL8139 5 | MODULES += Display/VESA 6 | MODULES += Display/BochsGA 7 | MODULES += Input/PS2KbMouse 8 | MODULES += x86/ISADMA x86/VGAText 9 | MODULES += USB/Core USB/UHCI 10 | -------------------------------------------------------------------------------- /BuildConf/m68k/Makefile.cfg: -------------------------------------------------------------------------------- 1 | 2 | # BUILD_DIST=y - Install to ./Dist 3 | ifneq ($(BUILD_DIST),) 4 | DISTROOT := $(ACESSDIR)/Dist 5 | xCP := cp 6 | xMKDIR := mkdir -p 7 | endif 8 | -------------------------------------------------------------------------------- /BuildConf/m68k/default.mk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/BuildConf/m68k/default.mk -------------------------------------------------------------------------------- /BuildConf/native/Makefile.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Native config 3 | # - Used for forcing the architecture 4 | # 5 | 6 | ARCHDIR := native 7 | 8 | #LD ?= $(CC) -print-prog-name=ld 9 | LD = $(CC) 10 | AS = $(CC) -c 11 | ASSUFFIX = S 12 | 13 | OBJDUMP := objdump -S 14 | 15 | ifeq ($(HOST_ARCH),x86) 16 | CC_SUFFIX := -m32 17 | LD_SUFFIX := -melf_i386 18 | endif 19 | 20 | -------------------------------------------------------------------------------- /BuildConf/native/default.mk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/BuildConf/native/default.mk -------------------------------------------------------------------------------- /BuildConf/x86/Makefile.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Build Configuration 3 | # 4 | 5 | TRIPLET = i686-pc-acess2 6 | AS = nasm 7 | RM = @rm -f 8 | STRIP = strip 9 | 10 | ARCHDIR = x86 11 | 12 | DYNMOD_FLAGS := -mcmodel=small -fPIC 13 | 14 | 15 | ASFLAGS = -felf 16 | -------------------------------------------------------------------------------- /BuildConf/x86/default.mk: -------------------------------------------------------------------------------- 1 | 2 | MODULES += Input/PS2KbMouse 3 | MODULES += Storage/ATA 4 | MODULES += Storage/AHCI 5 | MODULES += Storage/FDDv2 6 | MODULES += Network/NE2000 7 | MODULES += Network/RTL8139 8 | MODULES += Network/VIARhineII 9 | MODULES += Network/PCnetFAST3 10 | MODULES += Network/E1000 11 | MODULES += Network/PRO100 12 | MODULES += Display/VESA 13 | MODULES += Display/BochsGA 14 | #MODULES += Display/VIAVideo 15 | MODULES += x86/ISADMA 16 | 17 | MODULES += USB/Core 18 | MODULES += USB/EHCI 19 | MODULES += USB/UHCI 20 | #USB/OHCI 21 | MODULES += USB/HID USB/MSC 22 | MODULES += Interfaces/UDI 23 | 24 | MODULES += Libraries/VirtIO 25 | MODULES += Network/VirtIONet 26 | 27 | DYNMODS += Filesystems/InitRD 28 | -------------------------------------------------------------------------------- /BuildConf/x86/smp.mk: -------------------------------------------------------------------------------- 1 | default.mk -------------------------------------------------------------------------------- /BuildConf/x86_64/Makefile.cfg: -------------------------------------------------------------------------------- 1 | 2 | TRIPLET = x86_64-pc-acess2 3 | AS = nasm 4 | 5 | KERNEL_CFLAGS := -mcmodel=kernel -nostdlib -mno-red-zone -Wall -mno-sse 6 | DYNMOD_CFLAGS := -mcmodel=small -fPIC -mno-red-zone -mno-sse 7 | 8 | ARCHDIR = x86_64 9 | 10 | ASFLAGS = -felf64 11 | 12 | -------------------------------------------------------------------------------- /BuildConf/x86_64/default.mk: -------------------------------------------------------------------------------- 1 | 2 | include $(ACESSDIR)/BuildConf/x86/default.mk 3 | 4 | MODULES := $(filter-out Interfaces/UDI,$(MODULES)) 5 | 6 | -------------------------------------------------------------------------------- /CleanAllArch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | for a in i386 x86_64 armv7 host; do echo $a; ARCH=$a make clean; done 3 | -------------------------------------------------------------------------------- /EditBoot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #./MountDisk 3 | #vim mnt/boot/menu.lst 4 | #sudo umount mnt/ 5 | if [[ "x$DISK" == "x" ]]; then 6 | DISK="-i Acess2.img :" 7 | fi 8 | mcopy $DISK:/boot/menu.lst .menu.lst.tmp 9 | vim .menu.lst.tmp 10 | mcopy -D o .menu.lst.tmp $DISK:/boot/menu.lst 11 | rm .menu.lst.tmp 12 | -------------------------------------------------------------------------------- /Externals/.gitignore: -------------------------------------------------------------------------------- 1 | bin-* 2 | *.tar.gz 3 | *.tar.bz2 4 | build-*/ 5 | Output/ 6 | */*-* 7 | -------------------------------------------------------------------------------- /Externals/ACPICA/.gitignore: -------------------------------------------------------------------------------- 1 | acpica-unix-* 2 | include 3 | -------------------------------------------------------------------------------- /Externals/ACPICA/Makefile.kinc: -------------------------------------------------------------------------------- 1 | ACPICA_OBJECT := $(ACESSDIR)/Externals/Output/$(ARCH)-kernel/libacpica.a 2 | 3 | CPPFLAGS += -I $(ACESSDIR)/Externals/ACPICA/include -D_ACESS -D__KERNEL__ 4 | EXTERN_OBJS += $(ACPICA_OBJECT) 5 | 6 | $(ACPICA_OBJECT): 7 | @make -C $(ACESSDIR)/Externals/ACPICA 8 | @make -C $(ACESSDIR)/Externals/ACPICA 9 | 10 | 11 | -------------------------------------------------------------------------------- /Externals/bochs/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Externals - bochs 3 | # - Patches and Makefile by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := sdl12 cross-compiler 7 | TARBALL_PATTERN := bochs-*.tar.gz 8 | TARBALL_TO_DIR_L := bochs-%.tar.gz 9 | TARBALL_TO_DIR_R := bochs-% 10 | PATCHES := config.h.in config.sub 11 | 12 | #AUTORECONF = yes 13 | CONFIGURE_ARGS := --with-sdl --without-x11 LDFLAGS=-lpsocket 14 | 15 | include ../common_automake.mk 16 | 17 | 18 | -------------------------------------------------------------------------------- /Externals/bochs/patches/config.h.in.patch: -------------------------------------------------------------------------------- 1 | --- bochs-2.6.2_orig/config.h.in 2013-06-17 11:39:39.670720710 +0800 2 | +++ bochs-2.6.2/config.h.in 2013-06-17 11:48:09.149384231 +0800 3 | @@ -57,2 +57,2 @@ 4 | // Define to 1 if you have 5 | -#define HAVE_LOCALE_H 0 6 | +#undef HAVE_LOCALE_H 7 | -------------------------------------------------------------------------------- /Externals/bochs/patches/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- bochs-2.6.2_orig/config.sub 2013-06-17 11:39:39.670720710 +0800 2 | +++ bochs-2.6.2/config.sub 2013-06-17 11:48:09.149384231 +0800 3 | @@ -1299,2 +1299,3 @@ 4 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 5 | + | -acess2 \ 6 | | -aos* | -aros* \ 7 | 8 | -------------------------------------------------------------------------------- /Externals/config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | -include ../../Makefile.cfg 5 | 6 | ifeq ($(ARCH),x86) 7 | BFD := i686 8 | else ifeq ($(ARCH),x86_64) 9 | BFD := x86_64 10 | else ifeq ($(ARCH),armv7) 11 | BFD := arm 12 | else 13 | $(error No BFD translation for $(ARCH) in Externals/config.mk) 14 | endif 15 | 16 | OUTDIR=$(ACESSDIR)/Externals/Output/$(ARCH) 17 | BUILD_OUTDIR=$(OUTDIR)-BUILD 18 | SYSROOT=$(ACESSDIR)/Externals/Output/sysroot-$(BFD) 19 | 20 | PATH:=$(BUILD_OUTDIR)/bin:$(PATH) 21 | INCLUDE_DIR=$(SYSROOT)/usr/include 22 | 23 | # Runtime Options 24 | PREFIX=/Acess/usr/ 25 | EPREFIX=$(PREFIX) 26 | HOST=$(BFD)-pc-acess2 27 | 28 | PARLEVEL ?= 1 29 | 30 | -------------------------------------------------------------------------------- /Externals/cross-compiler/.gitignore: -------------------------------------------------------------------------------- 1 | *.tar.* 2 | gcc-*/ 3 | binutils-*/ 4 | cross/ 5 | sysroot/ 6 | sysroot-*/ 7 | build-*/ 8 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/binutils/bfd/config.bfd.patch: -------------------------------------------------------------------------------- 1 | --- bfd/config.bfd 2011-07-29 00:00:00.000000 +0000 2 | +++ bfd/config.bfd 2013-03-01 10:45:00.000000 +0800 3 | @@ -1712,3 +1712,16 @@ 4 | ;; 5 | + i[3-7]86-*-acess2) 6 | + targ_defvec=i386_elf32_vec 7 | + targ_selvecs="i386_elf32_vec i386_coff_vec" 8 | + ;; 9 | + x86_64-*-acess2) 10 | + targ_defvec=bfd_elf64_x86_64_vec 11 | + targ_selvecs="i386_elf32_vec bfd_elf32_x86_64_vec i386linux_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec" 12 | + want64=true 13 | + ;; 14 | + arm-*-acess2) 15 | + targ_defvec=bfd_elf32_littlearm_vec 16 | + targ_selvecs="bfd_elf32_bigarm_vec" 17 | + ;; 18 | # END OF targmatch.h 19 | *) 20 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/binutils/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- config.sub 2 | +++ config.sub 3 | @@ -1325,1 +1325,2 @@ 4 | + | -acess2 \ 5 | | -aos* | -aros* \ 6 | 7 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/binutils/gas/configure.tgt.patch: -------------------------------------------------------------------------------- 1 | --- gas/configure.tgt 2011-07-29 00:00:00.000000 +0000 2 | +++ gas/configure.tgt 2013-03-01 10:45:00.000000 +0800 3 | @@ -173,2 +173,4 @@ 4 | i386-sequent-bsd*) fmt=aout em=dynix ;; 5 | + i386-*-acess2*) fmt=elf ;; 6 | + arm-*-acess2*) fmt=elf ;; 7 | i386-*-beospe*) fmt=coff em=pe ;; 8 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/binutils/ld/Makefile.in.patch: -------------------------------------------------------------------------------- 1 | --- ld/Makefile.in 2 | +++ ld/Makefile.in 3 | @@ -2627,2 +2627,8 @@ 4 | ${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)" 5 | +eacess2_i386.c: $(srcdir)/emulparams/acess2_i386.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 6 | + ${GENSCRIPTS} acess2_i386 "$(tdir_acess2_i386)" 7 | +eacess2_amd64.c: $(srcdir)/emulparams/acess2_amd64.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 8 | + ${GENSCRIPTS} acess2_amd64 "$(tdir_acess2_amd64)" 9 | +eacess2_arm.c: $(srcdir)/emulparams/acess2_arm.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 10 | + ${GENSCRIPTS} acess2_arm "$(tdir_acess2_arm)" 11 | eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ 12 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/binutils/ld/configure.tgt.patch: -------------------------------------------------------------------------------- 1 | --- ld/configure.tgt 2 | +++ ld/configure.tgt 3 | @@ -167,1 +167,4 @@ 4 | i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;; 5 | +i[3-7]86-*-acess2*) targ_emul=acess2_i386 ;; 6 | +x86_64-*-acess2*) targ_emul=acess2_amd64 ;; 7 | +arm-*-acess2*) targ_emul=acess2_arm ;; 8 | 9 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_amd64.sh: -------------------------------------------------------------------------------- 1 | SCRIPT_NAME=elf 2 | OUTPUT_FORMAT=elf64-x86-64 3 | TEXT_START_ADDR=0x00400000 4 | MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" 5 | COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" 6 | ELFSIZE=64 7 | TEMPLATE_NAME=elf32 8 | 9 | ARCH="i386:x86-64" 10 | MACHINE= 11 | NOP=0x90909090 12 | GENERATE_SHLIB_SCRIPT=yes 13 | GENERATE_PIE_SCRIPT=yes 14 | 15 | NO_SMALL_DATA=yes 16 | SEPARATE_GOTPLT=12 17 | 18 | ELF_INTERPRETER_NAME=\"/Acess/Libs/ld-acess.so\" 19 | 20 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_arm.sh: -------------------------------------------------------------------------------- 1 | SCRIPT_NAME=elf 2 | OUTPUT_FORMAT="elf32-littlearm" 3 | BIG_OUTPUT_FORMAT="elf32-bigarm" 4 | LITTLE_OUTPUT_FORMAT="elf32-littlearm" 5 | TEXT_START_ADDR=0x8000 6 | MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" 7 | COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" 8 | TEMPLATE_NAME=elf32 9 | 10 | ARCH=arm 11 | MACHINE= 12 | GENERATE_SHLIB_SCRIPT=yes 13 | GENERATE_PIE_SCRIPT=yes 14 | 15 | NO_SMALL_DATA=yes 16 | SEPARATE_GOTPLT=12 17 | 18 | ELF_INTERPRETER_NAME=\"/Acess/Libs/ld-acess.so\" 19 | 20 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_i386.sh: -------------------------------------------------------------------------------- 1 | SCRIPT_NAME=elf 2 | OUTPUT_FORMAT=elf32-i386 3 | TEXT_START_ADDR=0x08048000 4 | MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" 5 | COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" 6 | TEMPLATE_NAME=elf32 7 | 8 | ARCH=i386 9 | MACHINE= 10 | NOP=0x90909090 11 | GENERATE_SHLIB_SCRIPT=yes 12 | GENERATE_PIE_SCRIPT=yes 13 | 14 | NO_SMALL_DATA=yes 15 | SEPARATE_GOTPLT=12 16 | 17 | ELF_INTERPRETER_NAME=\"/Acess/Libs/ld-acess.so\" 18 | 19 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/gcc/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- config.sub 2 | +++ config.sub 3 | @@ -1379,4 +1379,5 @@ 4 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 5 | + | -acess2* \ 6 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 7 | # Remember, each alternative MUST END IN *, to match a version number. 8 | ;; 9 | -------------------------------------------------------------------------------- /Externals/cross-compiler/patches/gcc/gcc/config/acess2.opt: -------------------------------------------------------------------------------- 1 | ; Options for acess2 2 | 3 | pthread 4 | Driver 5 | 6 | ; 7 | -------------------------------------------------------------------------------- /Externals/curl/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: libcurl 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := 7 | TARBALL_PATTERN := curl-*.tar.bz2 8 | TARBALL_TO_DIR_L := %.tar.bz2 9 | TARBALL_TO_DIR_R := % 10 | PATCHES := config.sub 11 | CONFIGURE_ARGS = LIBS=-lpsocket 12 | 13 | include ../common_automake.mk 14 | 15 | -------------------------------------------------------------------------------- /Externals/curl/patches/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- bochs-2.6.2_orig/config.sub 2013-06-17 11:39:39.670720710 +0800 2 | +++ bochs-2.6.2/config.sub 2013-06-17 11:48:09.149384231 +0800 3 | @@ -1356,2 +1356,3 @@ 4 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 5 | + | -acess2 \ 6 | | -aos* | -aros* \ 7 | 8 | -------------------------------------------------------------------------------- /Externals/dropbear/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: dropbear 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := zlib 7 | TARBALL_PATTERN := dropbear-*.tar.bz2 8 | TARBALL_TO_DIR_L := %.tar.bz2 9 | TARBALL_TO_DIR_R := % 10 | PATCHES := options.h config.sub 11 | CONFIGURE_ARGS = --with-zlib=$(OUTDIR) --disable-utmp --disable-wtmp --disable-lastlog DSS_PRIV_FILENAME=/Acess/Conf/dropbear/host_key_dss RSA_PRIV_FILENAME=/Acess/Conf/dropbear/host_key_rsa MOTD_FILENAME=/Acess/Conf/dropbear/motd 12 | CONFIGURE_ENV = LIBS=-lpsocket 13 | BTARGETS = dbclient dropbear 14 | ITARGETS = inst_dbclient inst_dropbear 15 | 16 | include ../common_automake.mk 17 | 18 | -------------------------------------------------------------------------------- /Externals/dropbear/patches/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- config.sub 2 | +++ config.sub 3 | @@ -1344,3 +1344,6 @@ 4 | os=-mint 5 | ;; 6 | + -acess2) 7 | + os=-acess2 8 | + ;; 9 | -aros*) 10 | -------------------------------------------------------------------------------- /Externals/freetype/.gitignore: -------------------------------------------------------------------------------- 1 | freetype-* 2 | -------------------------------------------------------------------------------- /Externals/freetype/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: freetype 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := 7 | TARBALL_PATTERN := freetype-*.tar.bz2 8 | TARBALL_TO_DIR_L := %.tar.bz2 9 | TARBALL_TO_DIR_R := % 10 | PATCHES := builds/unix/config.sub 11 | CONFIGURE_ARGS = 12 | 13 | include ../common_automake.mk 14 | 15 | -------------------------------------------------------------------------------- /Externals/freetype/patches/builds/unix/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- builds/unix/config.sub 2 | +++ builds/unix/config.sub 3 | @@ -1498,3 +1498,6 @@ 4 | ;; 5 | + -acess2) 6 | + os=-acess2 7 | + ;; 8 | -aros*) 9 | os=-aros 10 | -------------------------------------------------------------------------------- /Externals/glib/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Externals - glib 3 | # - Patches and Makefile by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := libffi 7 | _NAME := glib 8 | TARBALL_PATTERN := $(_NAME)-*.tar.xz 9 | TARBALL_TO_DIR_L := $(_NAME)-%.tar.xz 10 | TARBALL_TO_DIR_R := $(_NAME)-% 11 | PATCHES := config.sub 12 | CONFIGURE_ARGS := glib_cv_stack_grows=no ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no 13 | CONFIGURE_ARGS += LDFLAGS=-lpsocket 14 | 15 | include ../common_automake.mk 16 | 17 | 18 | -------------------------------------------------------------------------------- /Externals/glib/patches/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- glib/config.sub 2 | +++ glib/config.sub 3 | @@ -1335,2 +1335,5 @@ 4 | ;; 5 | + -acess2) 6 | + os=-acess2 7 | + ;; 8 | -solaris) 9 | -------------------------------------------------------------------------------- /Externals/libpng/.gitignore: -------------------------------------------------------------------------------- 1 | libpng-* 2 | -------------------------------------------------------------------------------- /Externals/libpng/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: libpng 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := zlib 7 | TARBALL_PATTERN := libpng-*.tar.xz 8 | TARBALL_TO_DIR_L := %.tar.xz 9 | TARBALL_TO_DIR_R := % 10 | PATCHES := 11 | CONFIGURE_ARGS = 12 | 13 | include ../common.mk 14 | 15 | -------------------------------------------------------------------------------- /Externals/libspiderscript/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ARCHIVE=unused 3 | -include ../config.mk 4 | 5 | CC = $(HOST)-gcc 6 | 7 | all: source/libspiderscript.so 8 | 9 | clean: 10 | CC=$(CC) make -C source/src clean 11 | rm $(PREFIX)/include/spiderscript.h 12 | rm $(EPREFIX)/lib/libspiderscript.so 13 | 14 | source/: 15 | git submodule update source/ 16 | source/libspiderscript.so: source/ 17 | CC=$(CC) make -C source/src 18 | 19 | install: source/libspiderscript.so 20 | cp source/libspiderscript.so $(EPREFIX)/lib 21 | cp source/spiderscript.h $(PREFIX)/include 22 | 23 | 24 | -------------------------------------------------------------------------------- /Externals/mesa/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: mesa 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := 7 | TARBALL_PATTERN := MesaLib-*.tar.bz2 8 | TARBALL_TO_DIR_L := MesaLib-%.tar.bz2 9 | TARBALL_TO_DIR_R := Mesa-% 10 | PATCHES := bin/config.sub 11 | CONFIGURE_ARGS = --enable-osmesa --with-osmesa-bits=8 --disable-dri --disable-glx --with-dri-drivers=swrast --without-gallium-drivers --disable-egl --enable-shared 12 | 13 | include ../common_automake.mk 14 | 15 | -------------------------------------------------------------------------------- /Externals/mesa/patches/bin/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- config.sub 2013-06-17 11:39:39.670720710 +0800 2 | +++ config.sub 2013-06-17 11:48:09.149384231 +0800 3 | @@ -1350,2 +1350,3 @@ 4 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 5 | + | -acess2 \ 6 | | -aos* | -aros* \ 7 | 8 | -------------------------------------------------------------------------------- /Externals/mplayer/.gitignore: -------------------------------------------------------------------------------- 1 | MPlayer-* 2 | -------------------------------------------------------------------------------- /Externals/mplayer/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: mplayer 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := sdl12 7 | TARBALL_PATTERN := MPlayer-*.tar.xz 8 | TARBALL_TO_DIR_L := %.tar.xz 9 | TARBALL_TO_DIR_R := % 10 | CONFIGURE_LINE = $(SDIR)/configure --cc=$(HOST)-gcc --prefix=$(PREFIX) 11 | PATCHES := 12 | NOBDIR = no 13 | 14 | include ../common_automake.mk 15 | 16 | -------------------------------------------------------------------------------- /Externals/netsurf/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Externals - netsurf 3 | # - Patches and Makefile by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := sdl12 7 | TARBALL_PATTERN := netsurf-*-full-src.tar.gz 8 | TARBALL_TO_DIR_L := netsurf-%-full-src.tar.gz 9 | TARBALL_TO_DIR_R := netsurf-full-% 10 | PATCHES := 11 | NOBDIR = yes 12 | 13 | include ../core.mk 14 | 15 | .PHONY: _check_local_deps 16 | 17 | _build: _check_local_deps 18 | cd $(BDIR) && CC=$(HOST)-gcc TARGET=framebuffer make 19 | 20 | _check_local_deps: 21 | @gperf --help >/dev/null || (echo "ERROR: netsurf's build system requires gperf"; false) 22 | 23 | 24 | -------------------------------------------------------------------------------- /Externals/pkgconfig/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Externals - pkgconfig 3 | # - Patches and Makefile by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := 7 | TARBALL_PATTERN := pkg-config-*.tar.gz 8 | TARBALL_TO_DIR_L := pkg-config-%.tar.gz 9 | TARBALL_TO_DIR_R := pkg-config-% 10 | PATCHES := 11 | CONFIGURE_LINE = $(SDIR)/configure --prefix=$(BUILD_OUTDIR) --with-internal-glib 12 | 13 | include ../common_automake.mk 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Externals/pkgconfig/patches/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- bochs-2.6.2_orig/config.sub 2013-06-17 11:39:39.670720710 +0800 2 | +++ bochs-2.6.2/config.sub 2013-06-17 11:48:09.149384231 +0800 3 | @@ -1344,2 +1344,3 @@ 4 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 5 | + | -acess2 \ 6 | | -aos* | -aros* \ 7 | 8 | -------------------------------------------------------------------------------- /Externals/pkgconfig/patches/glib/config.sub.patch: -------------------------------------------------------------------------------- 1 | --- glib/config.sub 2 | +++ glib/config.sub 3 | @@ -1335,2 +1335,5 @@ 4 | ;; 5 | + -acess2) 6 | + os=-acess2 7 | + ;; 8 | -solaris) 9 | -------------------------------------------------------------------------------- /Externals/sdl12/.gitignore: -------------------------------------------------------------------------------- 1 | SDL-* 2 | -------------------------------------------------------------------------------- /Externals/sdl12/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: libsdl1.2 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := 7 | TARBALL_PATTERN := SDL-*.tar.gz 8 | TARBALL_TO_DIR_L := %.tar.gz 9 | TARBALL_TO_DIR_R := % 10 | PATCHES := configure build-scripts/config.sub 11 | PATCHES += src/video/acess/ptyvideo.c src/video/SDL_video.c src/video/SDL_sysvideo.h 12 | CONFIGURE_ARGS = --includedir=$(INCLUDEDIR) --bindir=$(OUTDIR)-BUILD/bin/ 13 | #AUTORECONF = yes 14 | 15 | include ../common_automake.mk 16 | 17 | -------------------------------------------------------------------------------- /Externals/sdl12/patches/configure.patch: -------------------------------------------------------------------------------- 1 | --- configure 2 | +++ configure 3 | @@ -30162,4 +30162,16 @@ 4 | # The RISC OS platform requires special setup. 5 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ljpeg -ltiff -lpng -lz" 6 | ;; 7 | + *-acess*) 8 | + ARCH=acess 9 | + # Set up files for the video library 10 | + if test x$enable_video = xyes; then 11 | + cat >>confdefs.h <<\_ACEOF 12 | +#define SDL_VIDEO_DRIVER_ACESS 1 13 | +_ACEOF 14 | + SOURCES="$SOURCES $srcdir/src/video/acess/*.c" 15 | + have_video=yes 16 | + fi 17 | + # TODO: Joystick 18 | + ;; 19 | *) 20 | -------------------------------------------------------------------------------- /Externals/sdl12/patches/src/video/SDL_sysvideo.h.patch: -------------------------------------------------------------------------------- 1 | --- SDL-1.2.15_orig/src/video/SDL_sysvideo.h 2013-06-17 09:54:34.237122843 +0800 2 | +++ SDL-1.2.15/src/video/SDL_sysvideo.h 2013-06-17 18:08:46.367186772 +0800 3 | @@ -410,6 +410,10 @@ 4 | #if SDL_VIDEO_DRIVER_CACA 5 | extern VideoBootStrap CACA_bootstrap; 6 | #endif 7 | +#if SDL_VIDEO_DRIVER_ACESS 8 | +extern VideoBootStrap AcessPTY_bootstrap; 9 | +extern VideoBootStrap AcessAxWin_bootstrap; 10 | +#endif 11 | #if SDL_VIDEO_DRIVER_DUMMY 12 | extern VideoBootStrap DUMMY_bootstrap; 13 | #endif 14 | -------------------------------------------------------------------------------- /Externals/sdl12/patches/src/video/SDL_video.c.patch: -------------------------------------------------------------------------------- 1 | --- SDL-1.2.15_orig/src/video/SDL_video.c 2013-06-17 09:54:34.265134457 +0800 2 | +++ SDL-1.2.15/src/video/SDL_video.c 2013-06-17 16:10:04.181159182 +0800 3 | @@ -126,6 +126,10 @@ 4 | #if SDL_VIDEO_DRIVER_CACA 5 | &CACA_bootstrap, 6 | #endif 7 | +#if SDL_VIDEO_DRIVER_ACESS 8 | + //&AcessAxWin_bootstrap, 9 | + &AcessPTY_bootstrap, 10 | +#endif 11 | #if SDL_VIDEO_DRIVER_DUMMY 12 | &DUMMY_bootstrap, 13 | #endif 14 | 15 | 16 | -------------------------------------------------------------------------------- /Externals/vttest/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: dropbear 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := 7 | TARBALL_PATTERN := vttest*.tar.gz 8 | TARBALL_TO_DIR_L := %.tar.gz 9 | TARBALL_TO_DIR_R := %* 10 | PATCHES := 11 | CONFIGURE_ARGS = 12 | BTARGETS = all 13 | ITARGETS = install 14 | 15 | include ../common.mk 16 | 17 | -------------------------------------------------------------------------------- /Externals/zlib/.gitignore: -------------------------------------------------------------------------------- 1 | zlib-* 2 | configure.log 3 | -------------------------------------------------------------------------------- /Externals/zlib/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 External: zlib 3 | # - Makefile and patches by John Hodge (thePowersGang) 4 | # 5 | 6 | DEPS := 7 | TARBALL_PATTERN := zlib-*.tar.gz 8 | TARBALL_TO_DIR_L := %.tar.gz 9 | TARBALL_TO_DIR_R := % 10 | PATCHES := 11 | CONFIGURE_LINE = CC=$(HOST)-gcc $(SDIR)/configure --static --prefix=$(PREFIX) --eprefix=$(EPREFIX) --includedir=$(INCLUDE_DIR) 12 | NOBDIR = yes 13 | 14 | include ../common_automake.mk 15 | 16 | -------------------------------------------------------------------------------- /KernelLand/Kernel/.gitignore: -------------------------------------------------------------------------------- 1 | *.BuildNum.* 2 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/armv6/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Kernel 3 | # arm7 Architecture Makefile 4 | # arch/arm7/Makefile 5 | 6 | CPPFLAGS = 7 | CFLAGS = 8 | ASFLAGS = 9 | 10 | CPPFLAGS += -DMMU_PRESENT=1 11 | LDFLAGS += 12 | LIBGCC_PATH = $(shell $(CC) --print-libgcc-file-name) 13 | 14 | A_OBJ = start.ao main.o lib.o lib.ao time.o pci.o debug.o 15 | A_OBJ += mm_phys.o mm_virt.o proc.o proc.ao 16 | 17 | #main.c: Makefile.BuildNum.$(ARCH) 18 | 19 | ifeq ($(PLATFORM),tegra2) 20 | POSTBUILD = arm-elf-objcopy $(BIN) -O binary $(BIN) 21 | endif 22 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/armv6/include/options.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 ARMv6 Port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * options.h 6 | * - C/ASM Shared constants 7 | */ 8 | #ifndef _ARMV7_OPTIONS_H_ 9 | #define _ARMV7_OPTIONS_H_ 10 | 11 | #define KERNEL_BASE 0x80000000 12 | 13 | #if PLATFORM_is_raspberrypi 14 | # define UART0_PADDR 0x7E215040 // Realview 15 | #else 16 | # error Unknown platform 17 | #endif 18 | 19 | #define MM_KSTACK_SIZE 0x2000 // 2 Pages 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/armv6/pci.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | #include 5 | #include 6 | 7 | // Realview 8 | //#define PCI_BASE 0x60000000 9 | 10 | //#define PCI_BASE 0xF0400000 // VMM Mapping 11 | #define PCI_BASE 0 12 | 13 | // === CODE === 14 | void PCI_CfgWriteDWord(Uint32 Addr, Uint32 Data) 15 | { 16 | #if PCI_BASE 17 | Uint32 address = PCI_BASE | Addr; 18 | *(Uint32*)(address) = Data; 19 | #else 20 | #endif 21 | } 22 | 23 | Uint32 PCI_CfgReadDWord(Uint32 Addr) 24 | { 25 | #if PCI_BASE 26 | Uint32 address = PCI_BASE | Addr; 27 | return *(Uint32*)address; 28 | #else 29 | return 0xFFFFFFFF; 30 | #endif 31 | } 32 | 33 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/armv6/time.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 3 | * 4 | * ARM7 Time code 5 | * arch/arm7/time.c 6 | */ 7 | #include 8 | 9 | // === GLOBALS === 10 | tTime giTimestamp; 11 | 12 | // === CODE === 13 | tTime now(void) 14 | { 15 | return giTimestamp; 16 | } 17 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/armv7/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Kernel 3 | # arm7 Architecture Makefile 4 | # arch/arm7/Makefile 5 | 6 | CPPFLAGS = 7 | CFLAGS = 8 | ASFLAGS = 9 | 10 | CPPFLAGS += -DMMU_PRESENT=1 11 | LDFLAGS += `$(CC) --print-libgcc-file-name` 12 | 13 | A_OBJ = start.ao main.o lib.o lib.ao time.o pci.o debug.o 14 | A_OBJ += mm_phys.o mm_virt.o proc.o proc.ao 15 | A_OBJ += vpci_$(PLATFORM).o platform_$(PLATFORM).o 16 | 17 | #main.c: Makefile.BuildNum.$(ARCH) 18 | 19 | ifeq ($(PLATFORM),tegra2) 20 | POSTBUILD = arm-eabi-objcopy $(BIN) -O binary $(BIN).flat && gzip -f $(BIN).flat 21 | endif 22 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/armv7/pci.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | #include 5 | #include 6 | 7 | // Realview 8 | //#define PCI_BASE 0x60000000 9 | 10 | //#define PCI_BASE 0xF0400000 // VMM Mapping 11 | #define PCI_BASE 0 12 | 13 | // === CODE === 14 | void PCI_CfgWriteDWord(Uint32 Addr, Uint32 Data) 15 | { 16 | #if PCI_BASE 17 | Uint32 address = PCI_BASE | Addr; 18 | *(Uint32*)(address) = Data; 19 | #else 20 | #endif 21 | } 22 | 23 | Uint32 PCI_CfgReadDWord(Uint32 Addr) 24 | { 25 | #if PCI_BASE 26 | Uint32 address = PCI_BASE | Addr; 27 | return *(Uint32*)address; 28 | #else 29 | return 0xFFFFFFFF; 30 | #endif 31 | } 32 | 33 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/armv7/time.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 3 | * 4 | * ARM7 Time code 5 | * arch/arm7/time.c 6 | */ 7 | #include 8 | 9 | // === IMPORTS === 10 | extern tTime Time_GetTickOffset(void); 11 | 12 | // === GLOBALS === 13 | tTime giTimestamp; 14 | 15 | // === CODE === 16 | tTime now(void) 17 | { 18 | return giTimestamp + Time_GetTickOffset(); 19 | } 20 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/armv7/vpci_realview_pb.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel ARMv7 Port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * vpci_realview_pb.c 6 | * - Realview PB VPCI Definitions 7 | */ 8 | #include 9 | 10 | // === PROTOTYPES === 11 | 12 | // === GLOBALS === 13 | tVPCI_Device gaVPCI_Devices[] = { 14 | }; 15 | int giVPCI_DeviceCount = sizeof(gaVPCI_Devices)/sizeof(gaVPCI_Devices[0]); 16 | 17 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/helpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * arch/helpers.h 6 | * - Misc helper functions for the arch code 7 | */ 8 | #ifndef _ARCH_HELPERS_H_ 9 | #define _ARCH_HELPERS_H_ 10 | 11 | // Divide 12 | // - Find what power of two times Den is > Num 13 | // - Iterate down in bit significance 14 | // > If the `N` value is greater than `D`, we can set this bit 15 | #define DEF_DIVMOD(s) Uint##s __divmod##s(Uint##s N, Uint##s D, Uint##s*Rem){\ 16 | Uint##s ret=0,add=1;\ 17 | while(N/2>=D&&add) {D<<=1;add<<=1;}\ 18 | while(add>0){\ 19 | if(N>=D){ret+=add;N-=D;}\ 20 | add>>=1;D>>=1;\ 21 | }\ 22 | if(Rem)*Rem = N;\ 23 | return ret;\ 24 | } 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/m68k/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Kernel 3 | # m68k Architecture Makefile 4 | # arch/m68k/Makefile 5 | 6 | CFLAGS = 7 | 8 | A_OBJ = main.o debug.o lib.o time.o proc.o mm_virt.o mm_phys.o 9 | 10 | LDFLAGS += `$(CC) --print-libgcc-file-name` 11 | 12 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/m68k/debug.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 M68K port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * arch/m68k/debug.c 6 | * - Debugging output 7 | */ 8 | #include 9 | 10 | // === PROTOTYPES === 11 | void StartupPrint(const char *Str); 12 | void KernelPanic_SetMode(void); 13 | void KernelPanic_PutChar(char ch); 14 | 15 | // === CODE === 16 | void StartupPrint(const char *Str) 17 | { 18 | } 19 | 20 | void KernelPanic_SetMode(void) 21 | { 22 | } 23 | 24 | void KernelPanic_PutChar(char ch) 25 | { 26 | } 27 | 28 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/m68k/include/mm_virt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 M68000 port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * arch/m68k/include/mm_virt.h 6 | * - Virtual memory addresses 7 | */ 8 | #ifndef _M68K_MM_VIRT_H_ 9 | #define _M68K_MM_VIRT_H_ 10 | 11 | #define MM_KHEAP_BASE 0 12 | #define MM_KHEAP_MAX 0 13 | 14 | #define MM_USER_MIN 0 15 | #define USER_LIB_MAX 0 16 | #define MM_MODULE_MIN 0 17 | #define MM_MODULE_MAX 0 18 | 19 | #define MM_PPD_HANDLES 0 20 | #define MM_KERNEL_VFS 0 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/m68k/include/proc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 M68000 port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * arch/m68k/include/proc.h 6 | * - Task management defs 7 | */ 8 | #ifndef _M68K_PROC_H_ 9 | #define _M68K_PROC_H_ 10 | 11 | #define MAX_CPUS 1 12 | 13 | typedef int tMemoryState; // Unused 14 | 15 | typedef struct { 16 | Uint32 IP; 17 | Uint32 SP; 18 | } tTaskState; 19 | 20 | typedef struct { 21 | Uint32 Num; 22 | union { 23 | Uint32 Arg1; 24 | Uint32 Return; 25 | }; 26 | union { 27 | Uint32 Arg2; 28 | Uint32 RetHi; 29 | }; 30 | union { 31 | Uint32 Arg3; 32 | Uint32 Error; 33 | }; 34 | Uint32 Arg4; 35 | Uint32 Arg5; 36 | Uint32 Arg6; 37 | } tSyscallRegs; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/m68k/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 M68K port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * arch/m68k/main.c 6 | * - C entrypoint 7 | */ 8 | #include 9 | #include 10 | 11 | // === PROTOTYPES === 12 | void kmain(void); 13 | 14 | // === CODE === 15 | void kmain(void) 16 | { 17 | LogF("Acess2 m68k v"EXPAND_STR(KERNEL_VERSION)"\n"); 18 | LogF(" Build %i, Git Hash %s\n", BUILD_NUM, gsGitHash); 19 | 20 | } 21 | 22 | void Arch_LoadBootModules(void) 23 | { 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/m68k/mm_phys.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 M68K port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * arch/m68k/mm_phys.c 6 | * - Stubbed physical memory management 7 | */ 8 | #include 9 | 10 | // === CODE === 11 | void MM_RefPhys(tPAddr Page) 12 | { 13 | // TODO: Refcount pages 14 | Log_Warning("MMPhys", "TODO: Implement MM_RefPhys"); 15 | } 16 | 17 | int MM_SetPageNode(tPAddr Page, void *Node) 18 | { 19 | Log_Warning("MMPhys", "TODO: Implement MM_SetPageNode"); 20 | return -1; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/m68k/time.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 M68K port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * arch/m68k/time.c 6 | * - Timekeeping 7 | */ 8 | #include 9 | 10 | // === CODE === 11 | Sint64 now(void) 12 | { 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86/common.inc.asm: -------------------------------------------------------------------------------- 1 | %macro PUSH_CC 0 2 | ; Don't bother being too picky, just take the time 3 | pusha 4 | %endmacro 5 | %macro PUSH_SEG 0 6 | push ds 7 | push es 8 | push fs 9 | push gs 10 | mov ax, 0x10 11 | mov ds, ax 12 | mov es, ax 13 | mov fs, ax 14 | mov gs, ax 15 | %endmacro 16 | %macro POP_CC 0 17 | popa 18 | %endmacro 19 | %macro POP_SEG 0 20 | pop gs 21 | pop fs 22 | pop es 23 | pop ds 24 | %endmacro 25 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86/include/arch_int.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * x86 Arch - Internal Definitions 6 | * - arch/x86/include/arch_int.h 7 | */ 8 | #ifndef _ARCH_INT_H_ 9 | #define _ARCH_INT_H_ 10 | 11 | /** 12 | * \brief Spinlock primative atomic set-if-zero loop 13 | */ 14 | extern void __AtomicTestSetLoop(Uint *Ptr, Uint Value); 15 | 16 | /** 17 | * \brief Clear and free an address space 18 | */ 19 | extern void MM_ClearSpace(Uint32 CR3); 20 | 21 | /** 22 | * \brief Print a backtrace using the supplied IP/BP 23 | */ 24 | void Error_Backtrace(Uint EIP, Uint EBP); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86/include/desctab.h: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | #ifndef _DESCTAB_H_ 4 | #define _DESCTAB_H_ 5 | 6 | typedef struct { 7 | Uint16 LimitLow; 8 | Uint16 BaseLow; 9 | Uint8 BaseMid; 10 | Uint8 Access; 11 | struct { 12 | unsigned LimitHi: 4; 13 | unsigned Flags: 4; 14 | } __attribute__ ((packed)); 15 | Uint8 BaseHi; 16 | } __attribute__ ((packed)) tGDT; 17 | 18 | typedef struct { 19 | Uint16 OffsetLo; 20 | Uint16 CS; 21 | Uint16 Flags; 22 | Uint16 OffsetHi; 23 | } __attribute__ ((packed)) tIDT; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86/include/mm_phys.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AcessOS Microkernel Version 3 | * mm_phys.h 4 | */ 5 | #ifndef _MM_PHYS_H 6 | #define _MM_PHYS_H 7 | 8 | // === FUNCTIONS === 9 | //extern tPAddr MM_AllocPhys(void); 10 | //extern tPAddr MM_AllocPhysRange(int Pages, int MaxBits); 11 | //extern void MM_RefPhys(tPAddr PAddr); 12 | //extern void MM_DerefPhys(tPAddr PAddr); 13 | //extern int MM_GetRefCount(tPAddr Addr); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86/include/multiboot2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess 2 3 | * By John Hodge (thePowersGang) 4 | * 5 | * multiboot2.h 6 | * - Multiboot 2 Header 7 | */ 8 | #ifndef _MULTIBOOT2_H_ 9 | #define _MULTIBOOT2_H_ 10 | 11 | #define MULTIBOOT2_MAGIC 0x36D76289 12 | 13 | typedef struct sMultiboot2Info 14 | { 15 | Uint32 TotalSize; 16 | Uint32 Reserved; // SBZ 17 | } tMultiboot2Info; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86/pci.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 3 | * arch/x86/pci.h - x86 PCI Bus Access 4 | */ 5 | #define DEBUG 0 6 | #include 7 | #include 8 | 9 | // === CODE === 10 | Uint32 PCI_CfgReadDWord(Uint32 Address) 11 | { 12 | Address |= 0x80000000; 13 | outd(0xCF8, Address); 14 | return ind(0xCFC); 15 | } 16 | 17 | void PCI_CfgWriteDWord(Uint32 Address, Uint32 Data) 18 | { 19 | Address |= 0x80000000; 20 | outd(0xCF8, Address); 21 | outd(0xCFC, Data); 22 | } 23 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86/vpci.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel x86 Port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * vpci.c 6 | * - Virtual PCI Bus 7 | */ 8 | #include 9 | 10 | // === GLOBALS === 11 | int giVPCI_DeviceCount = 0; 12 | tVPCI_Device gaVPCI_Devices[0]; 13 | 14 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86_64/include/arch_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _ARCH_CONFIG_H_ 4 | #define _ARCH_CONFIG_H_ 5 | 6 | 7 | #define PIT_TIMER_BASE_N 3579545 8 | #define PIT_TIMER_BASE_D 3 9 | // PIT Ticks at 1.1931816666666 MHz 10 | // Base is 1193182 HZ 11 | #define PIT_TIMER_DIVISOR 11931 //~100Hz 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86_64/include/archinit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel x86_64 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/init.h 6 | * - Arch-internal init functions 7 | */ 8 | #ifndef _ARCH__INIT_H_ 9 | #define _ARCH__INIT_H_ 10 | 11 | #include 12 | 13 | extern void MM_InitPhys(int NPMemRanges, tPMemMapEnt *PMemRanges); 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86_64/pci.c: -------------------------------------------------------------------------------- 1 | #include "../x86/pci.c" 2 | -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86_64/rme.c: -------------------------------------------------------------------------------- 1 | /home/tpg/Projects/RealmodeEmulator/src/rme.c -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86_64/rme.h: -------------------------------------------------------------------------------- 1 | /home/tpg/Projects/RealmodeEmulator/src/rme.h -------------------------------------------------------------------------------- /KernelLand/Kernel/arch/x86_64/vpci.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel x86 Port 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * vpci.c 6 | * - Virtual PCI Bus 7 | */ 8 | #include 9 | 10 | // === GLOBALS === 11 | int giVPCI_DeviceCount = 0; 12 | tVPCI_Device gaVPCI_Devices[0]; 13 | 14 | -------------------------------------------------------------------------------- /KernelLand/Kernel/drv/Makefile: -------------------------------------------------------------------------------- 1 | # Acess2 Module/Driver Templater Makefile 2 | # Makefile.tpl 3 | 4 | -include ../../Makefile.cfg 5 | 6 | CPPFLAGS = -I../include -I../arch/$(ARCHDIR)/include -DARCH=$(ARCH) -DBUILD_MODULE 7 | CFLAGS = -Wall -Werror $(CPPFLAGS) 8 | 9 | .PHONY: all clean 10 | 11 | all: bochsvbe.kmd 12 | 13 | %.kmd: %.o 14 | $(CC) -shared -nostdlib -o $@ $< 15 | 16 | %.o: %.c 17 | $(CC) $(CFLAGS) -o $@ -c $< 18 | 19 | #ata_x86.kmd: ata_x86.o 20 | #bochsvbe.kmd: bochsvbe.o 21 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/binary_ext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess 2 3 | * binary_ext.h 4 | * - Exported Symbols from the binary loader 5 | */ 6 | #ifndef _BINARY_EXT_H 7 | #define _BINARY_EXT_H 8 | 9 | // === FUNCTIONS === 10 | extern void *Binary_LoadFile(const char *Path); 11 | extern void *Binary_LoadKernel(const char *Path); 12 | extern Uint Binary_Relocate(void *Mem); 13 | extern void Binary_Unload(void *Base); 14 | extern int Binary_GetSymbol(const char *Name, Uint *Dest); 15 | extern Uint Binary_FindSymbol(void *Base, const char *Name, Uint *Val); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/bootmod.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/bootmod.h 6 | * - Common boot modules type 7 | */ 8 | #ifndef _BOOTMOD_H_ 9 | #define _BOOTMOD_H_ 10 | 11 | typedef struct sBootModule tBootModule; 12 | 13 | struct sBootModule { 14 | tPAddr PBase; 15 | void *Base; 16 | Uint Size; 17 | char *ArgString; 18 | }; 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/ctype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * ctype.h 6 | * - 7 | */ 8 | #ifndef _ACESS__CTYPE_H_ 9 | #define _ACESS__CTYPE_H_ 10 | 11 | extern int isalnum(int c); 12 | extern int isalpha(int c); 13 | extern int isascii(int c); 14 | extern int isblank(int c); 15 | extern int iscntrl(int c); 16 | extern int isdigit(int c); 17 | extern int isgraph(int c); 18 | extern int islower(int c); 19 | extern int isprint(int c); 20 | extern int ispunct(int c); 21 | extern int isspace(int c); 22 | extern int isupper(int c); 23 | extern int isxdigit(int c); 24 | 25 | extern int toupper(int c); 26 | extern int tolower(int c); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/drv_pci_int.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * drv_pci_int.h 6 | * - PCI internal definitions 7 | */ 8 | #ifndef _DRV_PCI_INT_H 9 | #define _DRV_PCI_INT_H 10 | 11 | #include 12 | 13 | extern Uint32 PCI_CfgReadDWord(Uint32 Addr); 14 | extern void PCI_CfgWriteDWord(Uint32 Addr, Uint32 data); 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/drv_serial.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * drv/serial.c 6 | * - Common serial port code 7 | */ 8 | #ifndef _DRV_SERIAL_H_ 9 | #define _DRV_SERIAL_H_ 10 | 11 | typedef void (*tSerial_OutFcn)(void *Handle, char Ch); 12 | typedef struct sSerialPort tSerialPort; 13 | 14 | extern tSerialPort *gSerial_KernelDebugPort; 15 | 16 | extern tSerialPort *Serial_CreatePort( tSerial_OutFcn output, void *handle ); 17 | extern void Serial_ByteReceived(tSerialPort *Port, char Ch); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/errno.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 3 | * errno.h 4 | */ 5 | #ifndef _ERRNO_H 6 | #define _ERRNO_H 7 | 8 | #include "../../../Usermode/Libraries/libc.so_src/include_exp/errno.enum.h" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/heap_int.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AcessOS Microkernel Version 3 | * heap_int.h 4 | * - Internal Heap Header 5 | */ 6 | #ifndef _HEAP_INT_H 7 | #define _HEAP_INT_H 8 | 9 | typedef struct { 10 | Uint Size; 11 | int ValidSize; 12 | const char *File; 13 | int Line; 14 | Uint Magic; 15 | tTime AllocateTime; 16 | char Data[]; 17 | } tHeapHead; 18 | 19 | typedef struct { 20 | Uint Magic; 21 | tHeapHead *Head; 22 | tHeapHead NextHead[]; // Array to make it act like an element, but have no size and refer to the next block 23 | } tHeapFoot; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AcessOS Microkernel Version 3 | * init.h 4 | */ 5 | #ifndef _INIT_H 6 | #define _INIT_H 7 | 8 | extern void Arch_LoadBootModules(void); 9 | extern void StartupPrint(const char *String); 10 | extern void System_Init(char *Commandline); 11 | extern void Threads_Init(void); 12 | extern void Heap_Install(void); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/posix_signals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * Signal List 4 | */ 5 | #ifndef _SIGNAL_H_ 6 | #define _SIGNAL_H_ 7 | 8 | #define SIG_DFL NULL 9 | 10 | #include "../../../Usermode/Libraries/libc.so_src/include_exp/signal_list.h" 11 | 12 | extern void Threads_PostSignal(int SigNum); 13 | extern void Threads_SignalGroup(tPGID PGID, int SignalNum); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/timers_int.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/timers_int.h 6 | * - Timer internal header 7 | * - Only for use by code that needs access to timer internals 8 | */ 9 | #ifndef _KERNEL__TIMERS_INT_H_ 10 | #define _KERNEL__TIMERS_INT_H_ 11 | 12 | #include 13 | 14 | // === TYPEDEFS === 15 | struct sTimer { 16 | tTimer *Next; 17 | Sint64 FiresAfter; 18 | void (*Callback)(void*); 19 | void *Argument; 20 | // tMutex Lock; 21 | BOOL bActive; 22 | }; 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/utf16.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * utf16.h 6 | * - UTF-16 <-> UTF-8/UCS32 translation 7 | */ 8 | #ifndef _UTF16_H_ 9 | #define _UTF16_H_ 10 | 11 | extern int ReadUTF16(const Uint16 *Str16, Uint32 *Codepoint); 12 | extern size_t UTF16_ConvertToUTF8(size_t DestLen, char *Dest, size_t SrcLen, const Uint16 *Source); 13 | extern int UTF16_CompareWithUTF8Ex(size_t Str16Len, const Uint16 *Str16, const char *Str8, int bIgnoreCase); 14 | extern int UTF16_CompareWithUTF8(size_t Str16Len, const Uint16 *Str16, const char *Str8); 15 | extern int UTF16_CompareWithUTF8CI(size_t Str16Len, const Uint16 *Str16, const char *Str8); 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/vfs_ramfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AcessMicro VFS 3 | * - RAM Filesystem Coommon Structures 4 | */ 5 | #ifndef _RAMFS_H 6 | #define _RAMFS_H 7 | #include 8 | 9 | typedef struct sRamFS_File { 10 | struct sRamFS_File *Next; 11 | struct sRamFS_File *Parent; 12 | char Name[32]; 13 | tVFS_Node Node; 14 | union { 15 | struct sRamFS_File *FirstChild; 16 | char *Bytes; 17 | } Data; 18 | } tRamFS_File; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/vfs_threads.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/vfs_threads.h 6 | * - Handle maintainance functions for the VFS used by threading code 7 | */ 8 | #ifndef _VFS_THREADS_H_ 9 | #define _VFS_THREADS_H_ 10 | 11 | // === FUNCTIONS === 12 | extern void VFS_ReferenceUserHandles(void); 13 | extern void VFS_CloseAllUserHandles(struct sProcess *Process); 14 | 15 | extern void *VFS_SaveHandles(int NumFDs, int *FDs); 16 | extern void VFS_RestoreHandles(int NumFDs, void *Handles); 17 | extern void VFS_FreeSavedHandles(int NumFDs, void *Handles); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /KernelLand/Kernel/include/workqueue.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Acess2 Kernel 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * workqueue.h 6 | * - FIFO Queue 7 | */ 8 | #ifndef _WORKQUEUE_H_ 9 | #define _WORKQUEUE_H_ 10 | 11 | #include 12 | 13 | typedef struct sWorkqueue tWorkqueue; 14 | 15 | struct sWorkqueue 16 | { 17 | tShortSpinlock Protector; 18 | const char *Name; 19 | int NextOffset; 20 | 21 | void *Head; 22 | void *Tail; 23 | struct sThread *Sleeper; 24 | struct sThread *SleepTail; 25 | }; 26 | 27 | extern void Workqueue_Init(tWorkqueue *Queue, const char *Name, size_t NextOfset); 28 | extern void *Workqueue_GetWork(tWorkqueue *Queue); 29 | extern void Workqueue_AddWork(tWorkqueue *Queue, void *Ptr); 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /KernelLand/Makefile.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Usermode Makefile.cfg 3 | # 4 | 5 | # Include Root Makefile.cfg 6 | -include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg 7 | 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Display/BochsGA/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = bochsvbe.o 5 | NAME = BochsGA 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Display/Makefile.tpl: -------------------------------------------------------------------------------- 1 | CATEGORY = Video 2 | 3 | -include ../../Makefile.tpl 4 | -------------------------------------------------------------------------------- /KernelLand/Modules/Display/NVidia/regs.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/KernelLand/Modules/Display/NVidia/regs.c -------------------------------------------------------------------------------- /KernelLand/Modules/Display/PL110/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | NAME = PL110 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Display/Tegra2Vid/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | NAME = Tegra2Vid 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Display/VESA/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | NAME = VESA 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Display/VIAVideo/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | NAME = VIAVideo 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Display/VIAVideo/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _VIAVIDEO__COMMON_H_ 4 | #define _VIAVIDEO__COMMON_H_ 5 | 6 | typedef struct sVIAVideo_Dev tVIAVideo_Dev; 7 | 8 | struct sVIAVideo_Dev 9 | { 10 | tPAddr FramebufferPhys; 11 | tPAddr MMIOPhys; 12 | 13 | void *Framebuffer; 14 | Uint8 *MMIO; 15 | 16 | tDrvUtil_Video_BufInfo BufInfo; 17 | 18 | size_t FBSize; 19 | }; 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/Ext2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = ext2.o read.o dir.o write.o 5 | NAME = Ext2 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/FAT/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = fat.o dir.o fatio.o nodecache.o 5 | NAME = FAT 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/InitRD/.gitignore: -------------------------------------------------------------------------------- 1 | files.*.c* 2 | generate_initrd 3 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/InitRD/Makefile: -------------------------------------------------------------------------------- 1 | # InitRD Filesystem Driver 2 | # 3 | 4 | OBJ = main.o files.$(ARCH).o 5 | EXTRA = files.c 6 | NAME = InitRD 7 | EXTRA = files.$(ARCH).c files.$(ARCH).c.dep files.$(ARCH).c.ldopts 8 | LDFLAGS += @files.$(ARCH).c.ldopts 9 | 10 | -include ../Makefile.tpl 11 | 12 | 13 | files.$(ARCH).c: generate_initrd files.lst 14 | @echo "--- generate_initrd files.lst $@" 15 | $VARCH=$(ARCH) ./generate_initrd files.lst $@ $@.ldopts $@.dep 16 | 17 | 18 | generate_initrd: generate_initrd.c 19 | @echo "--- [NCC] -o $@" 20 | $V$(NCC) -std=c11 -o $@ $< -g -Wall -Wextra 21 | 22 | # Override default install method, because the floppy is small :) 23 | install: 24 | true 25 | 26 | -include files.$(ARCH).c.dep 27 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/InitRD/initrd.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _INITRD_H_ 4 | #define _INITRD_H_ 5 | 6 | #include 7 | #include 8 | 9 | typedef struct sInitRD_File 10 | { 11 | char *Name; 12 | tVFS_Node *Node; 13 | } tInitRD_File; 14 | 15 | 16 | // === Globals === 17 | tVFS_NodeType gInitRD_DirType; 18 | tVFS_NodeType gInitRD_FileType; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/LEAN/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess 2 LEAN Filesystem Driver 3 | * By John Hodge (thePowersGang) 4 | */ 5 | #include 6 | #include 7 | 8 | // === CONSTANTS === 9 | 10 | // === PROTOTYPES === 11 | 12 | // === GLOBALS === 13 | 14 | // === CODE === 15 | int LEAN_Install(char **Arguments) 16 | { 17 | return 1; 18 | } 19 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/Makefile.tpl: -------------------------------------------------------------------------------- 1 | CATEGORY = FS 2 | -include ../../Makefile.tpl 3 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/NFS/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | NAME = NFS 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/NFS/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 - NFS Driver 3 | * By John Hodge (thePowersGang) 4 | * This file is published under the terms of the Acess licence. See the 5 | * file COPYING for details. 6 | * 7 | * common.h - Common definitions 8 | */ 9 | #ifndef _COMMON_H_ 10 | #define _COMMON_H_ 11 | 12 | typedef struct sNFS_Connection 13 | { 14 | int FD; 15 | tIPAddr Host; 16 | char *Base; 17 | tVFS_Node Node; 18 | } tNFS_Connection; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/NTFS/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o dir.o io.o 5 | NAME = NTFS 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/NTFS/io.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 - NTFS Driver 3 | * - By John Hodge (thePowersGang) 4 | * This file is published under the terms of the Acess licence. See the 5 | * file COPYING for details. 6 | * 7 | * io.c 8 | * - File Read/Write 9 | */ 10 | #define DEBUG 1 11 | #include "common.h" 12 | 13 | // == CODE === 14 | size_t NTFS_ReadFile(tVFS_Node *Node, Uint64 Offset, size_t Length, void *Buffer, Uint Flags) 15 | { 16 | tNTFS_File *File = (void*)Node; 17 | 18 | ENTER("XNode->Inode XOffset xLength pBuffer xFlags", 19 | Node->Inode, Offset, Length, Buffer, Flags); 20 | 21 | size_t ret = NTFS_ReadAttribData(File->Data, Offset, Length, Buffer); 22 | LEAVE('x', ret); 23 | return ret; 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /KernelLand/Modules/Filesystems/RAMDisk/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # RAMDisk Makfile 3 | # 4 | 5 | OBJ = ramdisk.o 6 | NAME = RAMDisk 7 | 8 | -include ../Makefile.tpl 9 | 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ := main.o interface.o adapters.o 5 | OBJ += buffer.o 6 | OBJ += link.o hwaddr_cache.o 7 | OBJ += ipv4.o icmp.o arp.o 8 | OBJ += ipv6.o icmpv6.o 9 | OBJ += firewall.o routing.o 10 | OBJ += udp.o tcp.o 11 | NAME := IPStack 12 | CATEGORY := 13 | 14 | -include ../Makefile.tpl 15 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/arp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 IP Stack 3 | * - Common Header 4 | */ 5 | #ifndef _ARP_H_ 6 | #define _ARP_H_ 7 | 8 | #include "ipstack.h" 9 | 10 | typedef struct sArpRequest4 tArpRequest4; 11 | typedef struct sArpRequest6 tArpRequest6; 12 | 13 | struct sArpRequest4 { 14 | Uint16 HWType; 15 | Uint16 Type; 16 | Uint8 HWSize, SWSize; 17 | Uint16 Request; 18 | tMacAddr SourceMac; 19 | tIPv4 SourceIP; 20 | tMacAddr DestMac; 21 | tIPv4 DestIP; 22 | } __attribute__((packed)); 23 | 24 | struct sArpRequest6 { 25 | Uint16 HWType; 26 | Uint16 Type; 27 | Uint8 HWSize, SWSize; 28 | Uint16 Request; 29 | tMacAddr SourceMac; 30 | tIPv6 SourceIP; 31 | tMacAddr DestMac; 32 | tIPv6 DestIP; 33 | } __attribute__((packed)); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/firewall.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _FIREWALL_H_ 4 | #define _FIREWALL_H_ 5 | 6 | enum eFirewallActions 7 | { 8 | FIREWALL_ACCEPT, 9 | FIREWALL_DROP 10 | }; 11 | 12 | /** 13 | * \brief Tests a packet on a chain 14 | */ 15 | extern int IPTables_TestChain( 16 | const char *RuleName, 17 | const int AddressType, 18 | const void *Src, const void *Dest, 19 | Uint8 Type, Uint32 Flags, 20 | size_t Length, const void *Data 21 | ); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/hwaddr_cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _HWADDR_CACHE_H_ 4 | #define _HWADDR_CACHE_H_ 5 | 6 | extern tMacAddr HWCache_Resolve(tInterface *Interface, const void *L2Addr); 7 | extern void HWCache_Set(tAdapter *Adapter, int AddrType, const void *L2Addr, const tMacAddr *HWAddr); 8 | 9 | 10 | extern void ARP_Request4(tInterface *Interface, tIPv4 Address); 11 | extern void ICMPv6_RequestND(tInterface *Interface, const tIPv6 *Address); 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/icmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 IP Stack 3 | * - ICMP Handling 4 | */ 5 | #ifndef _ICMP_H_ 6 | #define _ICMP_H_ 7 | 8 | // === TYPEDEFS === 9 | typedef struct sICMPHeader tICMPHeader; 10 | 11 | // === STRUCTURES === 12 | struct sICMPHeader 13 | { 14 | Uint8 Type; 15 | Uint8 Code; 16 | Uint16 Checksum; 17 | Uint16 ID; 18 | Uint16 Sequence; 19 | Uint8 Data[]; 20 | }; 21 | 22 | // === CONSTANTS === 23 | enum eICMPTypes 24 | { 25 | ICMP_ECHOREPLY = 0, 26 | ICMP_UNREACHABLE = 3, 27 | ICMP_QUENCH = 4, 28 | ICMP_REDIRECT = 5, 29 | ICMP_ALTADDR = 6, 30 | ICMP_ECHOREQ = 8, 31 | ICMP_TRACE = 30 // Information Request 32 | }; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/include/adapters.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Networking Stack 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * adapters.h 6 | * - Network Adapter Management (IPStack Internal) 7 | */ 8 | #ifndef _IPSTACK__ADAPTERS_H_ 9 | #define _IPSTACK__ADAPTERS_H_ 10 | 11 | #include "adapters_api.h" 12 | 13 | extern tAdapter *Adapter_GetByName(const char *Name); 14 | extern char *Adapter_GetName(tAdapter *Adapter); 15 | extern void Adapter_SendPacket(tAdapter *Handle, tIPStackBuffer *Buffer); 16 | 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/include/adapters_int.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Networking Stack 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * adapters_int.h 6 | * - Network Adapter Management (API Header) 7 | */ 8 | #ifndef _IPSTACK__ADAPTERS_INT_H_ 9 | #define _IPSTACK__ADAPTERS_INT_H_ 10 | 11 | #include "adapters.h" 12 | #include "adapters_api.h" 13 | 14 | struct sAdapter 15 | { 16 | struct sAdapter *Next; 17 | 18 | int RefCount; 19 | int Index; 20 | 21 | const tIPStack_AdapterType *Type; 22 | void *CardHandle; 23 | 24 | tVFS_Node Node; 25 | 26 | Uint8 HWAddr[]; 27 | }; 28 | 29 | extern void Adapter_SendPacket(tAdapter *Handle, tIPStackBuffer *Buffer); 30 | extern void Adapter_Watch(tAdapter *Handle); 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/init.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _IPSTACK__INIT_H_ 3 | #define _IPSTACK__INIT_H_ 4 | 5 | extern int ARP_Initialise(); 6 | extern void UDP_Initialise(); 7 | extern void TCP_Initialise(); 8 | extern int IPv4_Initialise(); 9 | extern int IPv6_Initialise(); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /KernelLand/Modules/IPStack/interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 IP Stack 3 | * - By John Hodge 4 | * 5 | * interface.h 6 | * - Interface manipulation/access definitions 7 | */ 8 | #ifndef _IPSTACK__INTERFACE_H_ 9 | #define _IPSTACK__INTERFACE_H_ 10 | 11 | extern tInterface gIP_LoopInterface; 12 | extern tVFS_NodeType gIP_RootNodeType; 13 | extern tInterface *IPStack_AddInterface(const char *Device, int Type, const char *Name); 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /KernelLand/Modules/Input/Keyboard/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | NAME = Keyboard 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Input/Makefile.tpl: -------------------------------------------------------------------------------- 1 | CATEGORY = Input 2 | 3 | -include ../../Makefile.tpl 4 | -------------------------------------------------------------------------------- /KernelLand/Modules/Input/Mouse/Makefile: -------------------------------------------------------------------------------- 1 | # Mouse Multiplexer 2 | 3 | OBJ = main.o 4 | NAME = Mouse 5 | 6 | -include ../Makefile.tpl 7 | 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Input/Mouse/include/mouse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel - Mouse Mulitplexing Driver 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/mouse.h 6 | * - Mouse mulitplexing interface header 7 | */ 8 | #ifndef _MOUSE__MOUSE_H_ 9 | #define _MOUSE__MOUSE_H_ 10 | 11 | typedef struct sMouse tMouse; 12 | 13 | tMouse *Mouse_Register(const char *Name, int NumButtons, int NumAxies); 14 | void Mouse_RemoveInstance(tMouse *Handle); 15 | void Mouse_HandleEvent(tMouse *Handle, Uint32 ButtonState, int AxisDeltas[4]); 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /KernelLand/Modules/Input/PS2KbMouse/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o kb.o ps2mouse.o 5 | OBJ += 8042.o pl050.o 6 | NAME = PS2KbMouse 7 | 8 | -include ../Makefile.tpl 9 | -------------------------------------------------------------------------------- /KernelLand/Modules/Input/PS2KbMouse/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 3 | * 4 | * PS2 Keyboard/Mouse Driver 5 | * 6 | * common.h 7 | * - Shared definitions 8 | */ 9 | #ifndef _COMMON_H_ 10 | #define _COMMON_H_ 11 | 12 | extern int KB_Install(char **Arguments); 13 | extern int PS2Mouse_Install(char **Arguments); 14 | 15 | extern void KBC8042_Init(void); 16 | extern void KBC8042_EnableMouse(void); 17 | 18 | extern void PL050_Init(Uint32 KeyboardBase, Uint8 KeyboardIRQ, Uint32 MouseBase, Uint8 MouseIRQ); 19 | extern void PL050_EnableMouse(void); 20 | 21 | extern void KB_HandleScancode(Uint8 scancode); 22 | extern void PS2Mouse_HandleInterrupt(Uint8 InputByte); 23 | 24 | extern void (*gpPS2Mouse_EnableFcn)(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /KernelLand/Modules/Interfaces/Makefile.tpl: -------------------------------------------------------------------------------- 1 | -include ../../Makefile.tpl 2 | -------------------------------------------------------------------------------- /KernelLand/Modules/Interfaces/UDI/include/trans_nsr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 UDI Layer 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * trans_nsr.h 6 | * - Acess IPStack to UDI Network Service Requester 7 | */ 8 | #ifndef _TRANS_NSR_H_ 9 | #define _TRANS_NSR_H_ 10 | 11 | extern const udi_init_t acessnsr_init; 12 | extern const char acessnsr_udiprops[]; 13 | extern size_t acessnsr_udiprops_size; 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /KernelLand/Modules/Interfaces/UDI/include/trans_pci.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 UDI Layer 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * trans_pci.h 6 | * - PCI Translation Layer builtin driver 7 | */ 8 | #ifndef _TRANS_PCI_H_ 9 | #define _TRANS_PCI_H_ 10 | 11 | extern udi_init_t pci_init; 12 | extern const char pci_udiprops[]; 13 | extern size_t pci_udiprops_size; 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /KernelLand/Modules/Interfaces/UDI/include/trans_uart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 UDI Layer 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * trans_uart.h 6 | * - Attaches a PTY to a GIO "uart" type 7 | */ 8 | #ifndef _TRANS_UART_H_ 9 | #define _TRANS_UART_H_ 10 | 11 | extern const udi_init_t acessuart_init; 12 | extern const char acessuart_udiprops[]; 13 | extern size_t acessuart_udiprops_size; 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /KernelLand/Modules/Interfaces/UDI/trans/gfx_plan.txt: -------------------------------------------------------------------------------- 1 | 2 | Upon binding: 3 | 4 | 1. Enumerate connectors (types and possible inputs) 5 | 2. For all engines that can have their input be -1, get pixel format 6 | a. Parse operator list into a tree 7 | 3. Create MIN(n_conns,n_edge) video devices 8 | a. Each device represents an edge engine (engine selected on modeset) 9 | 10 | Notes: 11 | - Need to figure out what engine(s) to use as framebuffer, and what ones to use as cursor 12 | > Allow user/admin intervention to set these relations (based on an identifier from the driver) 13 | -------------------------------------------------------------------------------- /KernelLand/Modules/Interfaces/UDI/udi_lib/core/mem.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file mem.c 3 | * \author John Hodge (thePowersGang) 4 | */ 5 | #include 6 | #include 7 | 8 | // === EXPORTS === 9 | EXPORT(udi_mem_alloc); 10 | EXPORT(udi_mem_free); 11 | 12 | // === CODE === 13 | void udi_mem_alloc( 14 | udi_mem_alloc_call_t *callback, 15 | udi_cb_t *gcb, 16 | udi_size_t size, 17 | udi_ubit8_t flags 18 | ) 19 | { 20 | void *buf = malloc(size); 21 | if(buf) 22 | { 23 | if( !(flags & UDI_MEM_NOZERO) ) 24 | memset(buf, 0, size); 25 | } 26 | callback(gcb, buf); 27 | } 28 | 29 | void udi_mem_free(void *target_mem) 30 | { 31 | free(target_mem); 32 | } 33 | -------------------------------------------------------------------------------- /KernelLand/Modules/Interfaces/UDI/udi_lib/core/queues.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file queues.c 3 | * \author John Hodge (thePowersGang) 4 | * 5 | * \brief UDI Queue Primatives 6 | */ 7 | #include 8 | #include 9 | 10 | // === EXPORTS === 11 | EXPORT(udi_enqueue); 12 | EXPORT(udi_dequeue); 13 | 14 | // === CODE === 15 | void udi_enqueue(udi_queue_t *new_el, udi_queue_t *old_el) 16 | { 17 | new_el->next = old_el->next; 18 | new_el->prev = old_el; 19 | old_el->next = new_el; 20 | old_el->next->prev = new_el; 21 | } 22 | udi_queue_t *udi_dequeue(udi_queue_t *element) 23 | { 24 | element->next->prev = element->prev; 25 | element->prev->next = element->next; 26 | return element; 27 | } 28 | -------------------------------------------------------------------------------- /KernelLand/Modules/Libraries/SunRPC/proto.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel 3 | * - Sun RPC (RFC 1057) implementation 4 | * proto.h 5 | * - Protocol definition 6 | */ 7 | #ifndef _SUNRPC_PROTO_H_ 8 | #define _SUNRPC_PROTO_H_ 9 | 10 | struct sRPC_CallBody 11 | { 12 | Uint32 RPCVers; //!< Version (2) 13 | Uint32 Program; //!< Program Identifier 14 | Uint32 Version; //!< Program Version 15 | 16 | }; 17 | 18 | struct sRPC_Message 19 | { 20 | tNet32 XID; //!< Transaction Identifier 21 | union 22 | { 23 | struct sRPC_CallBody Call; 24 | }; 25 | }; 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /KernelLand/Modules/Libraries/VirtIO/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 VirtIO driver 3 | # 4 | 5 | OBJ = virtio.o 6 | NAME = VirtIO 7 | 8 | include ../../Makefile.tpl 9 | 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/E1000/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Intel E1000 driver 3 | # 4 | 5 | OBJ = e1000.o 6 | NAME = E1000 7 | 8 | -include ../Makefile.tpl 9 | 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/Makefile.tpl: -------------------------------------------------------------------------------- 1 | CATEGORY = Network 2 | 3 | -include ../../Makefile.tpl 4 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/NE2000/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = ne2000.o 5 | NAME = NE2000 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/PCnetFAST3/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = pcnet-fast3.o 5 | NAME = PCnetFAST3 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/PRO100/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | NAME = PRO100 6 | 7 | -include ../Makefile.tpl 8 | 9 | 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/RTL8139/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = rtl8139.o 5 | NAME = RTL8139 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/RTL8169/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = rtl8169.o 5 | NAME = RTL8169 6 | 7 | -include ../Makefile.tpl 8 | 9 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/VIARhineII/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = rhine2.o 5 | NAME = VIARhineII 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Network/VirtIONet/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 VirtIO Network driver 3 | # 4 | 5 | OBJ = virtio-net.o 6 | NAME = VirtIONet 7 | 8 | include ../../Makefile.tpl 9 | 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/Sound/SoundBlaster16/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | NAME = SoundBlaster16 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Sound/SoundBlaster16/sbdsp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/KernelLand/Modules/Sound/SoundBlaster16/sbdsp.txt -------------------------------------------------------------------------------- /KernelLand/Modules/Storage/AHCI/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = ahci.o 5 | NAME = AHCI 6 | 7 | -include ../Makefile.tpl 8 | 9 | -------------------------------------------------------------------------------- /KernelLand/Modules/Storage/ATA/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o io.o 5 | NAME = ATA 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Storage/FDD/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = fdd.o 5 | NAME = FDD 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/Storage/FDDv2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | DEPS = x86/ISADMA 5 | OBJ = main.o fdc.o 6 | NAME = FDDv2 7 | 8 | -include ../Makefile.tpl 9 | -------------------------------------------------------------------------------- /KernelLand/Modules/Storage/LVM/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 Logical Volume Manager 3 | # - Handles MBR Partitions (and eventually others) 4 | # 5 | 6 | OBJ = main.o volumes.o mbr.o 7 | NAME = LVM 8 | 9 | -include ../Makefile.tpl 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/Storage/LVM/include/lvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Logical Volume Manager 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * lvm.h 6 | * - LVM Exports 7 | */ 8 | #ifndef _LVM__LVM_H_ 9 | #define _LVM__LVM_H_ 10 | 11 | #include 12 | 13 | typedef struct sLVM_VolType tLVM_VolType; 14 | 15 | struct sLVM_VolType 16 | { 17 | const char *Name; 18 | 19 | int (*Read)(void *, Uint64, size_t, void *); 20 | int (*Write)(void *, Uint64, size_t, const void *); 21 | void (*Cleanup)(void *); 22 | }; 23 | 24 | 25 | extern void *LVM_AddVolume(const tLVM_VolType *Type, const char *Name, void *Ptr, size_t BlockSize, size_t BlockCount); 26 | extern void LVM_DelVolume(void *Handle); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /KernelLand/Modules/Storage/LVM/mbr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Logical Volume Manager 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * mbr.h 6 | * - MBR Definitions 7 | */ 8 | #ifndef _LVM_MBR_H_ 9 | #define _LVM_MBR_H_ 10 | 11 | typedef struct 12 | { 13 | Uint8 BootCode[0x1BE]; 14 | struct { 15 | Uint8 Boot; 16 | Uint8 Unused1; // Also CHS Start 17 | Uint16 StartHi; // Also CHS Start 18 | Uint8 SystemID; 19 | Uint8 Unused2; // Also CHS Length 20 | Uint16 LengthHi; // Also CHS Length 21 | Uint32 LBAStart; 22 | Uint32 LBALength; 23 | } __attribute__ ((packed)) Parts[4]; 24 | Uint16 BootFlag; // = 0xAA 55 25 | } __attribute__ ((packed)) tMBR; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /KernelLand/Modules/Storage/Makefile.tpl: -------------------------------------------------------------------------------- 1 | CATEGORY = Storage 2 | 3 | -include ../../Makefile.tpl 4 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/Core/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ = main.o 5 | OBJ += usb.o usb_lowlevel.o usb_devinit.o usb_io.o usb_poll.o usb_info.o 6 | OBJ += hub.o portctl.o 7 | CPPFLAGS = -Iinclude 8 | NAME = Core 9 | 10 | -include ../Makefile.tpl 11 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/Core/usb_async.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 USB Stack 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * usb_async.h 6 | * - USB ASync operations 7 | */ 8 | #ifndef _USB__USB_ASYNC_H_ 9 | #define _USB__USB_ASYNC_H_ 10 | #include 11 | 12 | typedef struct sAsyncOp tAsyncOp; 13 | 14 | struct sAsyncOp 15 | { 16 | tAsyncOp *Next; 17 | tUSBEndpoint *Endpt; 18 | int Length; 19 | void *Data; 20 | }; 21 | 22 | extern void USB_AsyncCallback(void *Ptr, void *Buf, size_t Length); 23 | 24 | extern tWorkqueue gUSB_AsyncQueue;; 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/Core/usb_lowlevel.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Acess2 USB Stack 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * usb_lowlevel.h 6 | * - Low-Level USB IO Functions 7 | */ 8 | #ifndef _USB_LOWLEVEL_H_ 9 | #define _USB_LOWLEVEL_H_ 10 | 11 | extern void *USB_int_Request(tUSBDevice *Dev, int EndPt, int Type, int Req, int Val, int Indx, int Len, void *Data); 12 | extern int USB_int_SendSetupSetAddress(tUSBHost *Host, int Address); 13 | extern int USB_int_ReadDescriptor(tUSBDevice *Dev, int Endpoint, int Type, int Index, int Length, void *Dest); 14 | extern char *USB_int_GetDeviceString(tUSBDevice *Dev, int Endpoint, int Index); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/EHCI/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 EHCI Driver 3 | # 4 | 5 | OBJ = ehci.o 6 | CPPFLAGS = -I../Core/include 7 | NAME = EHCI 8 | 9 | -include ../Makefile.tpl 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/HID/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 HID Driver 3 | # 4 | 5 | OBJ = main.o mouse.o keyboard.o 6 | CPPFLAGS = -I../Core/include 7 | NAME = HID 8 | 9 | -include ../Makefile.tpl 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/MSC/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 USB MSC Driver 3 | # 4 | 5 | OBJ = main.o scsi.o 6 | CPPFLAGS = -I../Core/include 7 | NAME = MSC 8 | 9 | -include ../Makefile.tpl 10 | 11 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/Makefile.tpl: -------------------------------------------------------------------------------- 1 | CATEGORY = USB 2 | 3 | -include ../../Makefile.tpl 4 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/OHCI/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 OHCI Driver 3 | # 4 | 5 | OBJ = ohci.o 6 | CPPFLAGS = -I../Core/include 7 | NAME = OHCI 8 | 9 | -include ../Makefile.tpl 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/USB/UHCI/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 UHCI Driver 3 | # 4 | 5 | OBJ = uhci.o 6 | CPPFLAGS = -I../Core/include 7 | NAME = UHCI 8 | 9 | -include ../Makefile.tpl 10 | -------------------------------------------------------------------------------- /KernelLand/Modules/armv7/GIC/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ := gic.o 5 | NAME := GIC 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/armv7/Makefile.tpl: -------------------------------------------------------------------------------- 1 | CATEGORY = armv7 2 | 3 | -include ../../Makefile.tpl 4 | -------------------------------------------------------------------------------- /KernelLand/Modules/link.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Kernel Modules 3 | * Linker Script 4 | */ 5 | 6 | ENTRY(ModuleEntry) 7 | OUTPUT_FORMAT(elf32-i386) 8 | 9 | SECTIONS 10 | { 11 | . = 0 + SIZEOF_HEADERS; 12 | 13 | .text : AT(ADDR(.text)) { 14 | textzero = .; 15 | *(.text) 16 | } 17 | 18 | .rodata ALIGN(0x1000): AT(ADDR(.rodata)) { 19 | *(.rodata) 20 | *(.rdata) 21 | DriverInfo = .; 22 | *(KMODULES) 23 | } 24 | 25 | .data ALIGN (0x1000) : AT(ADDR(.data)) { 26 | *(.data) 27 | } 28 | 29 | .bss : AT(ADDR(.bss)) { 30 | _sbss = .; 31 | *(COMMON) 32 | *(.bss) 33 | _ebss = .; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /KernelLand/Modules/x86/ISADMA/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | OBJ := dma.o 5 | NAME := ISADMA 6 | 7 | -include ../Makefile.tpl 8 | -------------------------------------------------------------------------------- /KernelLand/Modules/x86/ISADMA/include/dma.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 DMA Driver 3 | */ 4 | #ifndef _DMA_H_ 5 | #define _DMA_H_ 6 | 7 | extern void DMA_SetChannel(int channel, int length, int read); 8 | extern int DMA_ReadData(int channel, int count, void *buffer); 9 | extern int DMA_WriteData(int channel, int count, void *buffer); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /KernelLand/Modules/x86/Makefile.tpl: -------------------------------------------------------------------------------- 1 | CATEGORY = x86 2 | 3 | -include ../../Makefile.tpl 4 | -------------------------------------------------------------------------------- /Makefile.Version.cfg: -------------------------------------------------------------------------------- 1 | 2 | ACESS_VERSION = 0.16 3 | 4 | ifneq ($(BUILD_DIST),y) 5 | ACESS_VERSION := $(ACESS_VERSION)-pr 6 | endif 7 | 8 | -------------------------------------------------------------------------------- /Notes/20120122-Events.txt: -------------------------------------------------------------------------------- 1 | Per-thread event system 2 | 3 | enum eEvents 4 | { 5 | EVENT_VFS, 6 | EVENT_IPCMESSAGE, 7 | ... 8 | }; 9 | 10 | Uint32 tThread.ActiveEvents 11 | tSemaphore tThread.EventSemaphore 12 | 13 | 14 | Threads_PostEvent(tThread *, int EventID); 15 | Threads_WaitEvents(Uint32 Mask); 16 | - Clears events watched when wait is over 17 | -------------------------------------------------------------------------------- /Notes/20120204-RoutingNames.txt: -------------------------------------------------------------------------------- 1 | Network only? 2 | - "/Devices/ip/routes/4:0A000200:24" 3 | Network and Metric? 4 | - "/Devices/ip/routes/4:0A000200:24:10" 5 | 6 | Would it need the interface? 7 | - "/Devices/ip/routes/0:4:0A000200:24:10" 8 | 9 | 10 | Current model 11 | - num = "/Devices/ip/routes"->CreateRoute("interface") 12 | - "/Devices/ip/routes/{num}"->SetNetwork() 13 | - "/Devices/ip/routes/{num}"->SetSubnetBits() 14 | - "/Devices/ip/routes/{num}"->SetMetric() 15 | - "/Devices/ip/routes/{num}"->SetNextHop() 16 | 17 | New Model 18 | - "/Devices/ip/routes/{type}:{network}:{subnet}:{metric}"->SetNextHop() 19 | - "/Devices/ip/routes/{type}:{network}:{subnet}:{metric}"->SetInterface()? 20 | -------------------------------------------------------------------------------- /Notes/20130511-ptys.txt: -------------------------------------------------------------------------------- 1 | PTYs 2 | 3 | Need support for toggling echo and line buffering 4 | - This needs to be communicated to pty owner somehow 5 | > Second FD? Nominated data structure? Out of band data? 6 | - API for the pty control? 7 | > "_SysSetFileFlag"/"_SysGetFileFlag"? 8 | Provides arbitary flags for each node 9 | E.g. Terminal graphics mode, echo and buffering 10 | -------------------------------------------------------------------------------- /Notes/3D.txt: -------------------------------------------------------------------------------- 1 | GL control channel: 2 | App -> GUI -> VTerm -> Driver 3 | - App creates 3D window 4 | - GUI passes X,Y WxH to VTerm (and can issue resize notices upwards) 5 | - VTerm passes to driver (and can disable display of local regions when VT switch) 6 | 7 | Allocates command ring buffer for libgl 8 | 9 | -------------------------------------------------------------------------------- /Notes/AutoconfCrossCompiling.txt: -------------------------------------------------------------------------------- 1 | 2 | Cross Compiling 3 | CC=i586-elf-gcc CPPFLAGS="-I /home/tpg/Projects/Acess2/Usermode/include/ -DARCHDIR_is_x86" CFLAGS="-Wl,-T,/home/tpg/Projects/Acess2/Usermode/Output/x86/Libs/acess.ld -nostartfiles -nodefaultlibs -lld-acess -lc" ./configure --host=i586-elf 4 | -------------------------------------------------------------------------------- /Notes/Spinlocks.txt: -------------------------------------------------------------------------------- 1 | SHORTLOCK() 2 | cli; lock cmpxchg 3 | SHORTREL() 4 | lock and ; sti 5 | 6 | 7 | LONGLOCK() 8 | mov eax, 1 9 | lock cmpxchg lock.lock, eax 10 | if(eax) { 11 | SHORTLOCK(lock.listLock) 12 | // add to list (linked list, 4 static entries) 13 | SHORTREL(lock.listLock) 14 | for(;;) 15 | { 16 | check owner 17 | mov eax, 1 18 | lock cmpxchg lock.lock, eax 19 | if(!eax) break; // got lock 20 | Threads_Sleep(); 21 | } 22 | } 23 | 24 | LONGREL() 25 | lock and lock.lock, 0 26 | pop off front of list, free entry, wake thread 27 | -------------------------------------------------------------------------------- /Notes/TODO: -------------------------------------------------------------------------------- 1 | Fix TCP code 2 | Get IPv6 working 3 | Finalise AxWin API structure 4 | Implement input in AxWin 5 | Write TFTP filesystem driver 6 | - Use .index or index.txt (or a true extension) to get directory contents 7 | Write NFS driver 8 | Get x86_64 port working 9 | Complete arm7 port 10 | Fix VTerm driver determination 11 | - Implement a clean way to load/initialise named modules from a module init function 12 | 13 | -------------------------------------------------------------------------------- /Notes/VFS_MMap_Notes_20110711.txt: -------------------------------------------------------------------------------- 1 | Notes: 2 | 3 | - Implement mmap() in Acess 4 | > tVFS_Node.MMap(tVFS_Node *Node, int Size, void *Dest): int 5 | > tVFS_Node.MappedAreas[]: struct{void *Base, int Size} 6 | > \a Size is always a multiple of page size 7 | -------------------------------------------------------------------------------- /Notes/VirtualPCI.txt: -------------------------------------------------------------------------------- 1 | Rationale: 2 | - Provides a method for ARM SoCs to use existing device drivers (e.g. USB ECHI) with minimal modifcation. 3 | 4 | Method possibilities 5 | # Hook in Kernel/drv/pci.c that enumerates the virtual bus using a fixed format. 6 | -------------------------------------------------------------------------------- /RunBochs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #umount /mnt/AcessHDD 3 | #mount /mnt/AcessHDD 4 | #cd ~/Bochs/OSDev 5 | #/opt/BochsDbg/bin/bochs -q 6 | #sudo bochs -q | tee BochsLog.txt 7 | /home/tpg/apps/bin/bochs -q 8 | # | tee BochsLog.txt 9 | 10 | -------------------------------------------------------------------------------- /Tools/BootFloppy/menu.lst: -------------------------------------------------------------------------------- 1 | timeout 1 2 | 3 | title Acess2 (FDD) 4 | kernel /Acess2/Acess2.gz /System=fat:/Devices/fdd/0 /Acess=/System/Acess2/ 5 | 6 | -------------------------------------------------------------------------------- /Tools/BootFloppy/stage1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Tools/BootFloppy/stage1 -------------------------------------------------------------------------------- /Tools/BootFloppy/stage2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Tools/BootFloppy/stage2 -------------------------------------------------------------------------------- /Tools/DiskTool/include/arch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Tools/DiskTool/include/arch.h -------------------------------------------------------------------------------- /Tools/DiskTool/include/modules.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 DiskTool 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/modules.h 6 | * - Reimplimentation of kernel module interface for POSIX userland 7 | */ 8 | #ifndef _INCLUDE__MODULES_H_ 9 | #define _INCLUDE__MODULES_H_ 10 | 11 | enum 12 | { 13 | MODULE_ERR_OK, 14 | }; 15 | 16 | #define MODULE_DEFINE(flags, version, name, init, deinit, deps...) \ 17 | void __init_##init(void) __attribute__((constructor(200))); void __init_##init(void){init(NULL);} 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /Tools/DiskTool/include/mutex.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _MUTEX_H_ 3 | #define _MUTEX_H_ 4 | 5 | typedef struct { 6 | void *LockerReturnAddr; 7 | } tMutex; 8 | 9 | static inline int Mutex_Acquire(tMutex *m) { 10 | if(m->LockerReturnAddr) 11 | Log_KernelPanic("---", "Double mutex lock of %p by %p (was locked by %p)", 12 | m, __builtin_return_address(0), m->LockerReturnAddr); 13 | m->LockerReturnAddr = __builtin_return_address(0);; 14 | return 0; 15 | } 16 | static inline void Mutex_Release(tMutex *m) { m->LockerReturnAddr = 0; } 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /Tools/DiskTool/include/rwlock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Disk Tool 3 | */ 4 | #ifndef _RWLOCK_H 5 | #define _RWLOCK_H 6 | 7 | typedef char tRWLock; 8 | 9 | static inline int RWLock_AcquireRead(tRWLock *m) { 10 | if(*m) Log_KernelPanic("---", "Double mutex lock"); 11 | *m = 1; 12 | return 0; 13 | } 14 | static inline int RWLock_AcquireWrite(tRWLock *m) { 15 | if(*m) Log_KernelPanic("---", "Double mutex lock"); 16 | *m = 1; 17 | return 0; 18 | } 19 | static inline void RWLock_Release(tRWLock *m) { *m = 0; } 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Tools/DiskTool/nativefs.c: -------------------------------------------------------------------------------- 1 | ../../AcessNative/acesskernel_src/nativefs.c -------------------------------------------------------------------------------- /Tools/DiskTool/script.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Tools/DiskTool/script.c -------------------------------------------------------------------------------- /Tools/DiskTool/testscript: -------------------------------------------------------------------------------- 1 | lvm Tools/Systest/DiskTool/HDD0.img hdd0 2 | mount :hdd0/0 hdd0-0 3 | cp Tools/Systest/DiskTool/testfile1 hdd0-0:testfile1 4 | cp hdd0-0:testfile1 Tools/Systest/DiskTool/testfile1.out 5 | 6 | mount Tools/Systest/DiskTool/FDD.img fdd 7 | mkdir fdd:testdir1 8 | cp Tools/Systest/DiskTool/testfile2 fdd:testdir1/testfile2 9 | cp fdd:testdir1/testfile2 Tools/Systest/DiskTool/testfile2.out 10 | -------------------------------------------------------------------------------- /Tools/GCCProxy/getconfig.mk: -------------------------------------------------------------------------------- 1 | include $(dir $(lastword $(MAKEFILE_LIST)))../../Usermode/$(TYPE)/Makefile.cfg 2 | 3 | .PHONY: shellvars 4 | 5 | shellvars: 6 | @echo '_CC="$(CC)"' 7 | @echo '_CXX="$(CXX)"' 8 | @echo '_LD="$(LD)"' 9 | @echo 'LDFLAGS="$(LDFLAGS)"' 10 | @echo 'CFLAGS="$(patsubst -std=%,,$(CFLAGS))"' 11 | @echo 'CXXFLAGS="$(patsubst -std=%,,$(CXXFLAGS))"' 12 | @echo 'LIBGCC_PATH="$(LIBGCC_PATH)"' 13 | @echo 'CRTBEGIN="$(CRTBEGIN)"' 14 | @echo 'CRTEND="$(CRTEND)"' 15 | -------------------------------------------------------------------------------- /Tools/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: all clean 3 | .PHONY: nativelib DiskTool NetTest 4 | #.PHONY: nativelib-clean DiskTool-clean NetTest-clean 5 | 6 | all clean: DiskTool NetTest 7 | 8 | img2sif: img2sif.c 9 | $(CC) -g -std=c99 -o $@ $< `sdl-config --libs --cflags` -lSDL_image -Wall 10 | 11 | nativelib: 12 | $(MAKE) -C $@ $(MAKECMDGOALS) 13 | 14 | DiskTool NetTest: nativelib 15 | $(MAKE) -C $@ $(MAKECMDGOALS) 16 | -------------------------------------------------------------------------------- /Tools/NetTest/include/cmdline.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _CMDLINE_H_ 4 | #define _CMDLINE_H_ 5 | 6 | extern void Cmdline_Backend_StartThread(void); 7 | extern void Cmdline_Backend_StartEchoServer(int Port); 8 | 9 | #endif 10 | 11 | -------------------------------------------------------------------------------- /Tools/NetTest/include/tcpserver.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _TCPSERVER_H_ 4 | #define _TCPSERVER_H_ 5 | 6 | #include 7 | #include 8 | 9 | typedef struct sNetTest_TCPServer tNetTest_TCPServer; 10 | 11 | extern tNetTest_TCPServer *NetTest_TCPServer_Create(int Port); 12 | extern void NetTest_TCPServer_Close(tNetTest_TCPServer *Srv); 13 | extern int NetTest_TCPServer_FillSelect(tNetTest_TCPServer *Srv, fd_set *fds); 14 | extern void NetTest_TCPServer_HandleSelect(tNetTest_TCPServer *Srv, const fd_set *rfds, const fd_set *wfds, const fd_set *efds); 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /Tools/NetTest_Runner/Makefile: -------------------------------------------------------------------------------- 1 | 2 | OBJ := main.o net.o stack.o 3 | OBJ += tcp.o 4 | OBJ += ip.o arp.o 5 | OBJ += link.o 6 | OBJ += test_arp.o test_tcp.o 7 | BIN := ../nettest_runner 8 | 9 | CFLAGS := -Wall -std=c99 -g 10 | CPPFLAGS := -Iinclude 11 | LIBS := 12 | 13 | OBJ := $(OBJ:%=obj/%) 14 | 15 | .PHONY: all clean 16 | 17 | all: $(BIN) 18 | 19 | clean: 20 | $(RM) $(OBJ) $(BIN) 21 | 22 | $(BIN): $(OBJ) 23 | @echo [CC] -o $@ 24 | @$(CC) $(LINKFLAGS) -o $@ $(OBJ) $(LIBS) 25 | 26 | obj/%.o: %.c Makefile 27 | @mkdir -p $(dir $@) 28 | @echo [CC] -c -o $@ 29 | @$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< -MMD -MP 30 | 31 | -include $(OBJ:%.o=%.d) 32 | 33 | -------------------------------------------------------------------------------- /Tools/NetTest_Runner/include/arp.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _ARP_H_ 4 | #define _ARP_H_ 5 | 6 | #include 7 | #include 8 | 9 | 10 | extern void ARP_SendRequest(int IfNum, const void *IPv4Addr); 11 | extern void ARP_SendResponse(int IfNum, const void *IPv4Addr, const void *MacAddr); 12 | extern bool ARP_Pkt_IsResponse(size_t Len, const void *Packet, const void *ExpectedIP, const void *ExpectedMac); 13 | extern bool ARP_Pkt_IsRequest(size_t Len, const void *Packet, const void *ExpectedIP); 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /Tools/NetTest_Runner/include/ip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ip.h 3 | * - IP-layer Test Wrapper (v5/v6) 4 | */ 5 | #ifndef _IP_H_ 6 | #define _IP_H_ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #define IPPROTO_TCP 6 13 | 14 | #define IP_CHECKSUM_START 0xFFFF 15 | 16 | extern uint16_t IP_Checksum(uint16_t Prev, size_t Length, const void *Data); 17 | 18 | extern void IP_Send(int IfNum, int AF, const void *Src, const void *Dst, uint8_t proto, 19 | int BufCount, size_t BufLens[], const void *Bufs[]); 20 | 21 | extern bool IP_Pkt_Check(size_t len, const void *data, size_t *out_ofs, size_t *out_len, int AF, const void *Src, const void *Dst, uint8_t proto); 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /Tools/NetTest_Runner/include/link.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _LINK_H_ 4 | #define _LINK_H_ 5 | 6 | #define ETHER_PROTO_IPV4 0x0800 7 | 8 | #include 9 | #include 10 | 11 | extern void Link_Send(int IfNum, const void *Src, const void *Dst, uint16_t Proto, int BufCount, size_t BufLens[], const void *Bufs[]); 12 | 13 | extern bool Link_Pkt_Check(size_t len, const void *data, size_t *ofs, const void *Src, const void *Dst, uint16_t Proto); 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /Tools/NetTest_Runner/include/net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * net.h 3 | * - Network interface IO 4 | */ 5 | #ifndef _NET_H_ 6 | #define _NET_H_ 7 | 8 | #include 9 | #include 10 | 11 | #define MTU 1520 12 | 13 | extern int Net_Open(int IfNum, const char *Path); 14 | extern void Net_Close(int IfNum); 15 | 16 | 17 | extern size_t Net_Receive(int IfNum, size_t MaxLen, void *DestBuf, unsigned int Timeout); 18 | extern void Net_Send(int IfNum, size_t Length, const void *Buf); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /Tools/NetTest_Runner/include/stack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * stack.h 3 | * - Functions for interacting with the IPStack program 4 | */ 5 | #ifndef _STACK_H_ 6 | #define _STACK_H_ 7 | 8 | #include 9 | 10 | extern void Stack_AddDevice(const char *Ident, const void *MacAddr); 11 | extern void Stack_AddInterface(const char *Name, int AddrType, const void *Addr, int MaskBits); 12 | extern void Stack_AddRoute(int Type, const void *Network, int MaskBits, const void *NextHop); 13 | 14 | extern void Stack_AddArg(const char *Fmt, ...); 15 | extern int Stack_Start(const char *TestName, const char *Subcommand); 16 | extern void Stack_Kill(void); 17 | 18 | extern int Stack_SendCommand(const char *CommandString, ...); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /Tools/NetTest_Runner/include/tests.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tests.h 3 | * - List of tests used by main.c 4 | */ 5 | #ifndef _TESTS_H_ 6 | #define _TESTS_H_ 7 | 8 | #include "common.h" 9 | #include 10 | 11 | extern bool Test_ARP_Basic(void); 12 | extern bool Test_TCP_Basic(void); 13 | extern bool Test_TCP_Reset(void); 14 | extern bool Test_TCP_WindowSizes(void); 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /Tools/nativelib/include/arch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Tools/nativelib/include/arch.h -------------------------------------------------------------------------------- /Tools/nativelib/include/shortlock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 native library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * shortlock.h 6 | * - Short locks :) 7 | */ 8 | #ifndef _SHORTLOCK_H_ 9 | #define _SHORTLOCK_H_ 10 | 11 | typedef void *tShortSpinlock; 12 | 13 | extern void SHORTLOCK(tShortSpinlock *Lock); 14 | extern void SHORTREL(tShortSpinlock *m); 15 | extern int CPU_HAS_LOCK(tShortSpinlock *m); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /Tools/nativelib/mutex.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 libnative (Kernel Simulation Library) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * mutex.c 6 | * - Mutex emulation 7 | */ 8 | #include 9 | 10 | 11 | // === CODE === 12 | int Mutex_Acquire(tMutex *Mutex) 13 | { 14 | // TODO: Assert 15 | return 0; 16 | } 17 | 18 | void Mutex_Release(tMutex *Mutex) 19 | { 20 | return; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /UDI/Tools/udibuild.ini: -------------------------------------------------------------------------------- 1 | [COMMON] 2 | 3 | [ia32] 4 | CFLAGS=-ffreestanding -I/home/tpg/Projects/GitClones/acess2/UDI/include/ -Wall -Wextra -Wno-unused-parameter 5 | # -std=c89 6 | # -Wc++-compat 7 | LDFLAGS=-s 8 | CC=i586-elf-gcc 9 | LD=i586-elf-ld 10 | 11 | [amd64] 12 | CFLAGS=-ffreestanding -I/home/tpg/Projects/acess2/UDI/include/ -Wall -Wextra -Wno-unused-parameter -fPIC -g 13 | # -std=c89 14 | # -Wc++-compat 15 | LDFLAGS=-g 16 | CC=gcc 17 | LD=ld 18 | -------------------------------------------------------------------------------- /UDI/Tools/udibuild_src/Makefile: -------------------------------------------------------------------------------- 1 | 2 | OBJS = main.o inifile.o build.o udiprops.o 3 | BIN = ../udibuild 4 | CFLAGS = -std=c99 -MMD -MP -g 5 | 6 | OBJS := $(OBJS:%=obj/%) 7 | 8 | .PHONY: all clean 9 | 10 | all: $(BIN) 11 | 12 | clean: 13 | $(RM) $(BIN) $(OBJS) $(OBJS:%.o=%.d) 14 | 15 | $(BIN): $(OBJS) 16 | @echo --- [CC] $@ 17 | @$(CC) -o $(BIN) $(OBJS) $(LDFLAGS) 18 | 19 | obj/%.o: %.c Makefile 20 | @mkdir -p $(dir $@) 21 | @echo --- [CC] $@ 22 | @$(CC) -o $@ -c $< $(CFLAGS) 23 | 24 | -include $(OBJS:%.o=%.d) 25 | 26 | -------------------------------------------------------------------------------- /UDI/Tools/udibuild_src/include/build.h: -------------------------------------------------------------------------------- 1 | /* 2 | * udibuild - UDI Compilation Utility 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * build.h 6 | * - Actual build steps (exposed functions) 7 | */ 8 | #ifndef _BUILD_H_ 9 | #define _BUILD_H_ 10 | 11 | #include "inifile.h" 12 | #include "udiprops.h" 13 | 14 | extern int Build_CompileFile(tIniFile *opts, const char *abi, tUdiprops *udiprops, tUdiprops_Srcfile *srcfile); 15 | extern int Build_CreateUdiprops(tIniFile *opts, const char *abi, tUdiprops *udiprops); 16 | extern int Build_LinkObjects(tIniFile *opts, const char *abi, tUdiprops *udiprops); 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /UDI/Tools/udibuild_src/include/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * udibuild - UDI Compilation Utility 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * common.h 6 | * - Common helpers 7 | */ 8 | #ifndef _COMMON_H_ 9 | #define _COMMON_H_ 10 | 11 | #include 12 | #include 13 | 14 | #ifndef __GNUC__ 15 | # define __attribute__(...) 16 | #endif 17 | 18 | extern char *mkstr(const char *fmt, ...) __attribute__((format(printf,1,2))); 19 | 20 | extern bool gbTraceEnabled; 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /UDI/Tools/udibuild_src/include/inifile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * udibuild - UDI Compilation Utility 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * inifile.h 6 | * - .ini file parsing 7 | */ 8 | #ifndef _INIFILE_H_ 9 | #define _INIFILE_H_ 10 | 11 | typedef struct sInifile tIniFile; 12 | 13 | extern tIniFile *IniFile_Load(const char *Path); 14 | extern const char *IniFile_Get(tIniFile *File, const char *Sect, const char *Key, const char *Default); 15 | extern void IniFile_Free(tIniFile *File); 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /UDI/Tools/udibuild_src/include/udiprops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * udibuild - UDI Compilation Utility 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * udiprops.h 6 | * - udiprops.txt parsing for udibuild 7 | */ 8 | #ifndef _UDIPROPS_H_ 9 | #define _UDIPROPS_H_ 10 | 11 | typedef struct sUdiprops tUdiprops; 12 | 13 | typedef struct sUdiprops_Srcfile tUdiprops_Srcfile; 14 | 15 | struct sUdiprops_Srcfile 16 | { 17 | const char *Filename; 18 | const char *CompileOpts; 19 | }; 20 | 21 | struct sUdiprops 22 | { 23 | const char *ModuleName; 24 | int nSourceFiles; 25 | tUdiprops_Srcfile **SourceFiles; 26 | 27 | int nLines; 28 | char **Lines; 29 | }; 30 | 31 | extern tUdiprops *Udiprops_LoadBuild(const char *Filename); 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /UDI/Tools/udisetup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #if [[ ! -e "$1" ]]; then 4 | # echo "Pacakge '$1' does not exist" 5 | # exit 1 6 | #fi 7 | 8 | TMPFILE=/tmp/acess_udisetup.tmp 9 | 10 | if echo $0 | grep '/' >/dev/null; then 11 | THISFILE=$(which $0) 12 | THISDIR=$(dirname ${THISFILE})/ 13 | else 14 | _=$PWD; cd $(dirname $0); THISDIR=$PWD/; cd $_ 15 | fi 16 | ACESSDIR=${THISDIR}../../ 17 | 18 | ARCH=ia32 19 | PREFIX=i586-elf 20 | 21 | UDI_INSTALL_DIR=${ACESSDIR}UDI/${ARCH}/ 22 | 23 | mkdir -p ${UDI_INSTALL_DIR} 24 | for file in $(tar -tf $1 --wildcards */bin/${ARCH}/*); do 25 | tar -xf $1 $file -O > $TMPFILE 26 | ${PREFIX}-ld -T ${THISDIR}udisetup-${ARCH}.ld $TMPFILE -shared -o ${UDI_INSTALL_DIR}$(basename $file) 27 | done 28 | -------------------------------------------------------------------------------- /UDI/Tools/udisetup-ia32.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT(elf32-i386) 2 | 3 | SECTIONS 4 | { 5 | . = 0 + SIZEOF_HEADERS; 6 | 7 | .text : AT(ADDR(.text)) { 8 | textzero = .; 9 | *(.text) 10 | } 11 | 12 | .rodata ALIGN(0x1000): AT(ADDR(.rodata)) { 13 | *(.rodata) 14 | *(.rdata) 15 | } 16 | 17 | .data ALIGN (0x1000) : AT(ADDR(.data)) { 18 | *(.data) 19 | _udiprops = .; 20 | *(.udiprops) 21 | _udiprops_end = .; 22 | } 23 | 24 | .bss : AT(ADDR(.bss)) { 25 | _sbss = .; 26 | *(COMMON) 27 | *(.bss) 28 | _ebss = .; 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /UDI/drivers/gfx_bochs/bochsga_pio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TODO 3 | */ 4 | #ifndef _BOCHSGA_PIO_H_ 5 | #define _BOCHSGA_PIO_H_ 6 | 7 | udi_pio_trans_t bochsga_pio_enable[] = { 8 | {UDI_PIO_END_IMM, UDI_PIO_2BYTE, 0}, 9 | }; 10 | 11 | enum { 12 | BOCHSGA_PIO_ENABLE, 13 | }; 14 | 15 | const struct s_pio_ops bochsga_pio_ops[] = { 16 | [BOCHSGA_PIO_ENABLE] = UDIH_PIO_OPS_ENTRY(bochsga_pio_enable, 0, UDI_PCI_BAR_2, 0x400, 0xB*2), 17 | // UDIH_PIO_OPS_ENTRY(bochsga_pio_enable, 0, UDI_PCI_BAR_2, 0x400, 0xB*2), 18 | }; 19 | #define N_PIO (sizeof(bochsga_pio_ops)/sizeof(struct s_pio_ops)) 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /UDI/include/physio/pci.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _UDI_PHYSIO_PCI_H_ 4 | #define _UDI_PHYSIO_PCI_H_ 5 | 6 | #define UDI_PCI_CONFIG_SPACE 255 7 | #define UDI_PCI_BAR_0 0 8 | #define UDI_PCI_BAR_1 1 9 | #define UDI_PCI_BAR_2 2 10 | #define UDI_PCI_BAR_3 3 11 | #define UDI_PCI_BAR_4 4 12 | #define UDI_PCI_BAR_5 5 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /UDI/include/udi/queues.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file udi_queues.h 3 | * \brief Queue Management Utility Functions 4 | */ 5 | #ifndef _UDI_QUEUES_H_ 6 | #define _UDI_QUEUES_H_ 7 | 8 | typedef struct udi_queue udi_queue_t; 9 | 10 | struct udi_queue 11 | { 12 | struct udi_queue *next; 13 | struct udi_queue *prev; 14 | }; 15 | 16 | extern void udi_enqueue(udi_queue_t *new_el, udi_queue_t *old_el); 17 | extern udi_queue_t *udi_dequeue(udi_queue_t *element); 18 | 19 | #define UDI_QUEUE_INIT(listhead) ((listhead)->next = (listhead)->prev = (listhead)) 20 | #define UDI_QUEUE_EMPTY(listhead) ((listhead)->next == (listhead)->prev) 21 | // TODO: other queue macros 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /UDI/include/udi_pci.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 UDI Layer 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/udi_pci.h 6 | * - PCI Bus Binding 7 | */ 8 | #ifndef _UDI_PCI_H_ 9 | #define _UDI_PCI_H_ 10 | 11 | #if UDI_PCI_VERSION != 0x101 12 | # error "udi_pci.h requires UDI_PCI_VERSION set to 0x101" 13 | #endif 14 | #ifndef _UDI_PHYSIO_H_ 15 | # error "udi_pci.h requires udi_physio.h" 16 | #endif 17 | 18 | #define UDI_PCI_CONFIG_SPACE 255 19 | #define UDI_PCI_BAR_0 0 20 | #define UDI_PCI_BAR_1 1 21 | #define UDI_PCI_BAR_2 2 22 | #define UDI_PCI_BAR_3 3 23 | #define UDI_PCI_BAR_4 4 24 | #define UDI_PCI_BAR_5 5 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /Usermode/Applications/CLIShell_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: Acess Shell 2 | 3 | -include ../Makefile.cfg 4 | 5 | CPPFLAGS += -I./include 6 | LDFLAGS += 7 | LIBS += -lreadline 8 | 9 | BIN = CLIShell 10 | OBJ = main.o lib.o 11 | 12 | -include ../Makefile.tpl 13 | -------------------------------------------------------------------------------- /Usermode/Applications/CLIShell_src/header.h: -------------------------------------------------------------------------------- 1 | /* 2 | Acess Shell Version 2 3 | - Based on IOOS CLI Shell 4 | */ 5 | #ifndef _HEADER_H 6 | #define _HEADER_H 7 | 8 | #define Print(str) do{char*s=(str);write(_stdout,strlen(s)+1,s);}while(0) 9 | 10 | extern int _stdout; 11 | extern int _stdin; 12 | 13 | extern int GeneratePath(char *file, char *base, char *tmpPath); 14 | 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /Usermode/Applications/CLIShell_src/rules.mk: -------------------------------------------------------------------------------- 1 | # CLIShell 2 | 3 | include $(BASE)header.mk 4 | 5 | # Variables 6 | SRCS := main.c lib.c 7 | BIN := $(OUTPUTDIR)Bin/CLIShell 8 | 9 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) -g 10 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) -I$(DIR)/include 11 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) -lreadline 12 | 13 | include $(BASE)body.mk 14 | 15 | $(BIN): $(OBJ) 16 | 17 | include $(BASE)footer.mk 18 | 19 | -------------------------------------------------------------------------------- /Usermode/Applications/MultibootCheck_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: Multiboot Check 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = MultibootCheck.o 6 | BIN = MultibootCheck 7 | 8 | -include ../Makefile.tpl 9 | -------------------------------------------------------------------------------- /Usermode/Applications/automounter_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: Automounter 2 | 3 | -include ../Makefile.cfg 4 | 5 | CPPFLAGS += 6 | LDFLAGS += 7 | 8 | DIR = SBin 9 | BIN = automount 10 | OBJ = main.o 11 | 12 | -include ../Makefile.tpl 13 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/AcessLogoSmall.sif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/axwin3_src/AcessLogoSmall.sif -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/Interface/Makefile: -------------------------------------------------------------------------------- 1 | # Project: Acess2 GUI v3 Interface 2 | 3 | -include ../../Makefile.cfg 4 | 5 | CPPFLAGS += -I include/ 6 | 7 | DIR := Apps/AxWin/3.0 8 | BIN := AxWinUI 9 | OBJ := main.o 10 | 11 | LIBS += -laxwin3 12 | 13 | -include ../../Makefile.tpl 14 | 15 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/Makefile.sdl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/axwin3_src/Makefile.sdl -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/Makefile: -------------------------------------------------------------------------------- 1 | # Project: Acess2 GUI v3 Window Manager 2 | 3 | -include ../../Makefile.cfg 4 | 5 | 6 | DIR := Apps/AxWin/3.0 7 | BIN := AxWinWM 8 | OBJ := main.o input.o video.o ipc_acess.o 9 | include common.mk 10 | 11 | LIBS += -lnet 12 | 13 | -include ../../Makefile.tpl 14 | 15 | .PHONY: install_resources 16 | 17 | install: install_resources 18 | 19 | install_%.sif: resources/.%.sif ; 20 | @echo [xCP] $(DISTROOT)/$(DIR)/$*.sif 21 | @$(xCP) $< $(DISTROOT)/$(DIR)/$*.sif 22 | 23 | install_resources: $(IMG2SIF) $(addprefix install_,$(PNGIMAGES:%.png=%.sif)) 24 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/Makefile.sdl: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 GUI (AxWin3) WM 3 | # - By John Hodge (thePowersGang) 4 | # 5 | # Makefile.sdl 6 | # - SDL-backed edition makefile 7 | # 8 | 9 | OBJ := main_SDL.o video_SDL.o input_SDL.o 10 | include common.mk 11 | 12 | BIN := AxWinWM 13 | 14 | include ../sdl.mk 15 | 16 | # vim: ft=make 17 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/include/decorator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Window Manager v3 (axwin3) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/decorator.h 6 | * - Decorator definitions 7 | */ 8 | #ifndef _DECORATOR_H_ 9 | #define _DECORATOR_H_ 10 | 11 | #include 12 | 13 | extern void Decorator_UpdateBorderSize(tWindow *Window); 14 | extern void Decorator_Redraw(tWindow *Window); 15 | extern int Decorator_HandleMessage(tWindow *Window, int Message, int Length, const void *Data); 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/include/image.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI (AxWin) Version 3 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * image.h 6 | */ 7 | #ifndef _IMAGE_H_ 8 | #define _IMAGE_H_ 9 | 10 | #include 11 | 12 | typedef struct sImage tImage; 13 | 14 | struct sImage 15 | { 16 | short Width; 17 | short Height; 18 | int Format; 19 | uint8_t Data[]; 20 | }; 21 | 22 | enum eImageFormats 23 | { 24 | IMGFMT_BGRA, 25 | IMGFMT_RGB, 26 | NUM_IMGFMTS 27 | }; 28 | 29 | // === PROTOTYPES === 30 | extern tImage *Image_Load(const char *URI); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/include/renderer_classful.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Window Manager v3 (axwin3) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/renderer_classful.h 6 | * - Classful renderer messages 7 | */ 8 | #ifndef _RENDERER_CLASSFUL_H_ 9 | #define _RENDERER_CLASSFUL_H_ 10 | 11 | #include "wm_messages.h" 12 | 13 | enum eWM_Classful_Messages 14 | { 15 | MSG_CLASSFUL_SETBGCOLOUR = WNDMSG_CLASS_MIN, 16 | MSG_CLASSFUL_SETTEXT 17 | }; 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/include/video.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Window Manager v3 (axwin3) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/video.h 6 | * - Video code header 7 | */ 8 | #ifndef _VIDEO_H_ 9 | #define _VIDEO_H_ 10 | 11 | extern void Video_Update(void); 12 | extern void Video_Blit(uint32_t *Source, short DstX, short DstY, short W, short H); 13 | extern void Video_FillRect(int X, int Y, int W, int H, uint32_t Colour); 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/include/wm_input.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI (AxWin) Version 3 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * wm_input.h 6 | * - Window Manager Input 7 | */ 8 | #ifndef _WM_INPUT_H_ 9 | #define _WM_INPUT_H_ 10 | 11 | extern void WM_Input_MouseMoved(int OldX, int OldY, int NewX, int NewY); 12 | extern void WM_Input_MouseButton(int X, int Y, int Button, int Pressed); 13 | extern void WM_Input_KeyDown(uint32_t Character, uint32_t Scancode); 14 | extern void WM_Input_KeyFire(uint32_t Character, uint32_t Scancode); 15 | extern void WM_Input_KeyUp (uint32_t Character, uint32_t Scancode); 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/input_SDL.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI (AxWin3) WM 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * input_SDL.c 6 | * - SDL build input translation 7 | */ 8 | #include 9 | 10 | // === CODE === 11 | int Input_Init(void) 12 | { 13 | return 0; 14 | } 15 | 16 | void InputSDL_HandleMouseBtn(const SDL_Event *ev) 17 | { 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/messageio.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI (axwin3) 3 | * By John Hodge (thePowersGang) 4 | * 5 | * messageio.c 6 | * - Common message handling code 7 | */ 8 | #include 9 | #include 10 | 11 | // === PROTOTYPES === 12 | 13 | // === GLOBALS === 14 | 15 | // === CODE === 16 | void DispachMessage(tAxWin_Message *Message, size_t Length) 17 | { 18 | switch(Message->ID) 19 | { 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/renderers/widget/colours.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Acess2 Window Manager v3 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * renderer/widget/colours.h 6 | * - Widget style definitions 7 | */ 8 | #ifndef _RENDERER_WIDGET_COLOURS_H 9 | #define _RENDERER_WIDGET_COLOURS_H 10 | 11 | #define BOX_BGCOLOUR 0xC0C0C0 12 | #define BOX_BORDER 0x202020 13 | #define BUTTON_BGCOLOUR 0xD0D0D0 14 | #define BUTTON_BORDER 0xF0F0F0 15 | #define TEXT_COLOUR 0x000000 16 | #define TEXTINPUT_BACKGROUND 0xFFFFFF 17 | #define TEXTINPUT_BORDER_OUT 0x404040 18 | #define TEXTINPUT_BORDER_IN 0x808080 19 | #define TEXTINPUT_TEXT 0x000000 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/resources/toolbar_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/axwin3_src/WM/resources/toolbar_new.png -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/resources/toolbar_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/axwin3_src/WM/resources/toolbar_open.png -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/WM/resources/toolbar_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/axwin3_src/WM/resources/toolbar_save.png -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/libaxwin3.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 - AxWin GUI Library 2 | # 3 | 4 | include ../../../Libraries/Makefile.cfg 5 | 6 | CPPFLAGS += -I ../include/ 7 | CFLAGS += -Wall 8 | LDFLAGS += -lc -soname libaxwin3.so 9 | 10 | OBJ = main.o msg.o wm.o r_widget.o r_menu.o 11 | OBJ += r_richtext.o 12 | BIN = libaxwin3.so 13 | 14 | include ../../../Libraries/Makefile.tpl 15 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/libaxwin3.so_src/include/ipc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Window Manager v3 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * internal.h 6 | * - Internal definitions 7 | */ 8 | #ifndef _IPC_H_ 9 | #define _IPC_H_ 10 | 11 | #include 12 | 13 | extern const char *gsAxWin3_int_ServerDesc; 14 | 15 | extern tAxWin_IPCMessage *AxWin3_int_AllocateIPCMessage(tHWND Window, int Message, int Flags, int ExtraBytes); 16 | extern void AxWin3_int_SendIPCMessage(tAxWin_IPCMessage *Msg); 17 | extern tAxWin_IPCMessage *AxWin3_int_GetIPCMessage(int nFD, fd_set *FDs); 18 | extern tAxWin_IPCMessage *AxWin3_int_WaitIPCMessage(int WantedID); 19 | extern void AxWin3_int_HandleMessage(tAxWin_IPCMessage *Msg); 20 | 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/notes.txt: -------------------------------------------------------------------------------- 1 | Window Based GUI 2 | Every window has a position, size, class and text and three colours (background, text and detail) 3 | 4 | Window Classes provide render information in form of a bytecode? 5 | - Save for later, maybe as a render handler 6 | 7 | Each window can register itself with a render handler 8 | - Handlers expose IPC methods via message queue 9 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin3_src/notes/menus.txt: -------------------------------------------------------------------------------- 1 | Hide/close condition 2 | - Focus lost (not transfered to child) 3 | - If not transfered back up, inform parent? 4 | > Get parent type, send magic message if it's a menu 5 | Item selected 6 | - In that case, send the magic child-closed message too 7 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Makefile: -------------------------------------------------------------------------------- 1 | %: 2 | @echo --- AxWin4 Server 3 | @make -C Server/ $* 4 | @echo --- AxWin4 UI 5 | @make -C UI/ $* 6 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/CConfig.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * CConfig.cpp 6 | * - Configuration 7 | */ 8 | #include 9 | 10 | namespace AxWin { 11 | 12 | CConfig::CConfig() 13 | { 14 | } 15 | 16 | bool CConfig::parseCommandline(int argc, char *argv[]) 17 | { 18 | return false; 19 | } 20 | 21 | CConfigVideo::CConfigVideo() 22 | { 23 | } 24 | 25 | CConfigInput::CConfigInput(): 26 | mouse_device("/Devices/Mouse/system") 27 | { 28 | } 29 | 30 | CConfigIPC::CConfigIPC() 31 | { 32 | } 33 | 34 | }; // namespace AxWin 35 | 36 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/Makefile: -------------------------------------------------------------------------------- 1 | 2 | include ../../Makefile.cfg 3 | 4 | DIR := Apps/AxWin/4.0 5 | 6 | CPPFLAGS += -Iinclude/ -I../Common/include/ 7 | OBJ := main.o ipc.o CConfig.o video.o input.o timing.o 8 | OBJ += compositor.o CWindow.o 9 | OBJ += Common__serialisation.o 10 | OBJ += CClient.o 11 | OBJ += CIPCChannel_AcessIPCPipe.o 12 | OBJ += CRect.o CSurface.o 13 | OBJ += draw_control.o draw_text.o 14 | BIN := AxWinServer 15 | 16 | LIBS += -lc++ -lunicode 17 | #CXXFLAGS += -O3 18 | USE_CXX_LINK = 1 19 | 20 | include ../../Makefile.tpl 21 | 22 | $(_OBJPREFIX)Common__%.o: ../Common/%.cpp 23 | @echo [CXX] -o $@ 24 | @mkdir -p $(dir $@) 25 | $V$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@ -MQ $@ -MP -MD -MF $(@:%.o=%.dep) 26 | 27 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/CConfig.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * CConfig.hpp 6 | * - Configuration class 7 | */ 8 | #ifndef _CCONFIG_H_ 9 | #define _CCONFIG_H_ 10 | 11 | #include "CConfigInput.hpp" 12 | #include "CConfigVideo.hpp" 13 | #include "CConfigIPC.hpp" 14 | 15 | namespace AxWin { 16 | 17 | class CConfig 18 | { 19 | public: 20 | CConfig(); 21 | 22 | bool parseCommandline(int argc, char *argv[]); 23 | 24 | CConfigInput m_input; 25 | CConfigVideo m_video; 26 | CConfigIPC m_ipc; 27 | }; 28 | 29 | } 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/CConfigIPC.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * CConfigIPC.hpp 6 | * - Configuration class 7 | */ 8 | #ifndef _CCONFIGIPC_H_ 9 | #define _CCONFIGIPC_H_ 10 | 11 | #include 12 | 13 | namespace AxWin { 14 | 15 | class CConfigIPC_Channel 16 | { 17 | public: 18 | ::std::string m_name; 19 | ::std::string m_argument; 20 | }; 21 | 22 | class CConfigIPC 23 | { 24 | public: 25 | CConfigIPC(); 26 | }; 27 | 28 | }; // namespace AxWin 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/CConfigInput.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * CConfig.hpp 6 | * - Configuration class 7 | */ 8 | #ifndef _CCONFIGINPUT_H_ 9 | #define _CCONFIGINPUT_H_ 10 | 11 | #include 12 | 13 | namespace AxWin { 14 | 15 | class CConfigInput 16 | { 17 | public: 18 | CConfigInput(); 19 | 20 | ::std::string mouse_device; 21 | }; 22 | 23 | }; // namespace AxWin 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/CConfigVideo.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * CConfigVideo.hpp 6 | * - Configuration class 7 | */ 8 | #ifndef _CCONFIGVIDEO_H_ 9 | #define _CCONFIGVIDEO_H_ 10 | 11 | namespace AxWin { 12 | 13 | class CConfigVideo 14 | { 15 | public: 16 | CConfigVideo(); 17 | }; 18 | 19 | }; // namespace AxWin 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/IFontFace.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * IFont.hpp 6 | * - Text drawing (font rendering) primitive 7 | */ 8 | #ifndef _IFONT_HPP_ 9 | #define _IFONT_HPP_ 10 | 11 | #include 12 | #include "CRect.hpp" 13 | #include "CSurface.hpp" 14 | 15 | namespace AxWin { 16 | 17 | class IFontFace 18 | { 19 | public: 20 | virtual CRect Size(const ::std::string& text, unsigned int Size) const = 0; 21 | virtual void Render(CSurface& dest, const CRect& rect, const ::std::string& text, unsigned int Size) = 0; 22 | }; 23 | 24 | }; 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/IIPCChannel.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * IIPCChannel.hpp 6 | * - IPC Channel interface 7 | */ 8 | #ifndef _IIPCCHANNEL_H_ 9 | #define _IIPCCHANNEL_H_ 10 | 11 | extern "C" { 12 | #include 13 | } 14 | 15 | namespace AxWin { 16 | 17 | class IIPCChannel 18 | { 19 | public: 20 | virtual ~IIPCChannel(); 21 | 22 | virtual int FillSelect(::fd_set& rfds) = 0; 23 | virtual void HandleSelect(const ::fd_set& rfds) = 0; 24 | }; 25 | 26 | 27 | }; 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/IVideo.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * IVideo.hpp 6 | * - Graphics backend abstraction 7 | */ 8 | #ifndef _IVIDEO_HPP_ 9 | #define _IVIDEO_HPP_ 10 | 11 | namespace AxWin { 12 | 13 | class IVideo 14 | { 15 | public: 16 | virtual ~IVideo(); 17 | 18 | // Allocate a new hardware surface 19 | IHWSurface& AllocateHWSurface(uint16_t Width, uint16_t Height); 20 | 21 | // Request redraw of backbuffer 22 | void Flip(); 23 | }; 24 | 25 | }; 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _COMMON_H_ 4 | #define _COMMON_H_ 5 | 6 | #include 7 | 8 | namespace AxWin { 9 | 10 | class InitFailure: 11 | public ::std::exception 12 | { 13 | const char *m_what; 14 | public: 15 | InitFailure(const char *reason): 16 | m_what(reason) 17 | { 18 | } 19 | 20 | virtual const char* what() const throw(); 21 | }; 22 | 23 | } // namespace AxWin 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/compositor.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * compositor.hpp 6 | * - Compositor Interface Header 7 | */ 8 | #ifndef _COMPOSITOR_H_ 9 | #define _COMPOSITOR_H_ 10 | 11 | namespace AxWin { 12 | 13 | class CCompositor; 14 | 15 | namespace Compositor { 16 | 17 | }; // namespace Compositor 18 | 19 | }; // namespace AxWin 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/input.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * input.hpp 6 | * - Input Interface Header 7 | */ 8 | #ifndef _INPUT_H_ 9 | #define _INPUT_H_ 10 | 11 | #include 12 | 13 | namespace AxWin { 14 | 15 | class CCompositor; 16 | 17 | class CInput 18 | { 19 | CCompositor& m_compositor; 20 | int m_keyboardFD; 21 | int m_mouseFD; 22 | 23 | unsigned int m_mouseX; 24 | unsigned int m_mouseY; 25 | unsigned int m_mouseBtns; 26 | public: 27 | CInput(const CConfigInput& config, CCompositor& compositor); 28 | int FillSelect(::fd_set& rfds); 29 | void HandleSelect(::fd_set& rfds); 30 | }; 31 | 32 | }; // namespace AxWin 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/include/timing.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * timing.hpp 6 | * - Timing Interface Header 7 | */ 8 | #ifndef _TIMING_H_ 9 | #define _TIMING_H_ 10 | 11 | #include 12 | 13 | namespace AxWin { 14 | namespace Timing { 15 | 16 | extern ::int64_t GetTimeToNextEvent(); 17 | extern void CheckEvents(); 18 | 19 | }; // namespace Timing 20 | }; // namespace AxWin 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/Server/timing.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUI v4 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * timing.cpp 6 | * - Timing code 7 | */ 8 | #include 9 | 10 | namespace AxWin { 11 | namespace Timing { 12 | 13 | int64_t GetTimeToNextEvent() 14 | { 15 | return -1; 16 | } 17 | 18 | void CheckEvents() 19 | { 20 | 21 | } 22 | 23 | }; // namespace Timing 24 | }; // namespace AxWin 25 | 26 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/UI/Makefile: -------------------------------------------------------------------------------- 1 | 2 | include ../../Makefile.cfg 3 | 4 | DIR := Apps/AxWin/4.0 5 | 6 | OBJ := main.o taskbar.o 7 | 8 | BIN := AxWinUI 9 | 10 | LIBS += -laxwin4 11 | 12 | include ../../Makefile.tpl 13 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/UI/include/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _COMMON_H_ 4 | #define _COMMON_H_ 5 | 6 | extern unsigned int giScreenWidth; 7 | extern unsigned int giScreenHeight; 8 | 9 | #endif 10 | 11 | -------------------------------------------------------------------------------- /Usermode/Applications/axwin4_src/UI/include/taskbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _TASKBAR_H_ 4 | #define _TASKBAR_H_ 5 | 6 | #include 7 | 8 | extern void Taskbar_Create(void); 9 | extern void Taskbar_Redraw(void); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Applications/bomb_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: bomb 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = bomb 7 | 8 | -include ../Makefile.tpl 9 | 10 | -------------------------------------------------------------------------------- /Usermode/Applications/cat_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: cat 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = cat 7 | 8 | -include ../Makefile.tpl 9 | 10 | -------------------------------------------------------------------------------- /Usermode/Applications/cat_src/rules.mk: -------------------------------------------------------------------------------- 1 | # cat 2 | 3 | include $(BASE)header.mk 4 | 5 | # Variables 6 | SRCS := main.c 7 | BIN := $(OUTPUTDIR)Bin/cat 8 | 9 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) -g 10 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) 11 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) 12 | 13 | include $(BASE)body.mk 14 | 15 | include $(BASE)footer.mk 16 | 17 | -------------------------------------------------------------------------------- /Usermode/Applications/cpuid_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: cpuid 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = cpuid 7 | 8 | -include ../Makefile.tpl 9 | -------------------------------------------------------------------------------- /Usermode/Applications/dhcpclient_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: DHCP Client 2 | 3 | -include ../Makefile.cfg 4 | 5 | LDFLAGS += -lnet 6 | 7 | OBJ = main.o 8 | BIN = dhcpc 9 | DIR = SBin 10 | 11 | -include ../Makefile.tpl 12 | -------------------------------------------------------------------------------- /Usermode/Applications/dnsresolve_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: cat 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = dnsresolve 7 | LDFLAGS += -lnet 8 | 9 | -include ../Makefile.tpl 10 | -------------------------------------------------------------------------------- /Usermode/Applications/edit_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: text editor 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = edit 7 | 8 | -include ../Makefile.tpl 9 | 10 | edit.lin: main.c 11 | gcc main.c -o edit.lin -DUSE_LOCAL=1 -Wall 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Applications/gui_ate_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: [GUI] Acess Text Editor (ATE) 2 | 3 | -include ../Makefile.cfg 4 | 5 | LIBS += -laxwin3 6 | 7 | OBJ = main.o strings.o toolbar.o 8 | BIN = ate 9 | DIR := Apps/AxWin/3.0 10 | 11 | -include ../Makefile.tpl 12 | -------------------------------------------------------------------------------- /Usermode/Applications/gui_ate_src/include/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess Text Editor (ATE) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * common.h 6 | * - Core header 7 | */ 8 | #ifndef _COMMON_H_ 9 | #define _COMMON_H_ 10 | 11 | extern void Toolbar_Init(tAxWin3_Widget *Parent); 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /Usermode/Applications/gui_ate_src/include/syntax.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess Text Editor (ATE) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * include/syntax.h 6 | * - Syntax Hilighting / Rendering structures 7 | */ 8 | #ifndef _ATE__SYNTAX_H_ 9 | #define _ATE__SYNTAX_H_ 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Applications/gui_ate_src/strings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess Text Editor (ATE) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * strings.h 6 | * - String Localisation 7 | */ 8 | #ifndef _STRINGS_H_ 9 | #define _STRINGS_H_ 10 | 11 | extern const char *getstr(const char *key); 12 | extern const char *getimg(const char *key); 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /Usermode/Applications/gui_terminal_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: [GUI] Terminal 2 | 3 | -include ../Makefile.cfg 4 | 5 | LIBS += -laxwin3 -lunicode 6 | 7 | OBJ = main.o vt100.o display.o 8 | BIN = terminal 9 | DIR := Apps/AxWin/3.0 10 | 11 | -include ../Makefile.tpl 12 | -------------------------------------------------------------------------------- /Usermode/Applications/gui_terminal_src/include/vt100.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess GUI Terminal 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * vt100.h 6 | * - VT100/xterm emulation 7 | */ 8 | #ifndef _VT100_H_ 9 | #define _VT100_H_ 10 | 11 | #include "display.h" 12 | 13 | /** 14 | * Returns either a positive or negative byte count. 15 | * Positive means that many bytes were used as part of the escape sequence 16 | * and should not be sent to the display. 17 | * Negative means that there were that many bytes before the next escape 18 | * sequence (and hence those should be displayed). 19 | */ 20 | extern int Term_HandleVT100(tTerminal *Term, int Len, const char *Buf); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /Usermode/Applications/httpd_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: Simple CGI-Capable HTTP Server 2 | 3 | -include ../Makefile.cfg 4 | 5 | LDFLAGS += -lnet 6 | 7 | OBJ = main.o net.o server.o http.o cgi.o logging.o 8 | BIN = httpd 9 | DIR = SBin 10 | 11 | -include ../Makefile.tpl 12 | -------------------------------------------------------------------------------- /Usermode/Applications/httpd_src/cgi.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/httpd_src/cgi.c -------------------------------------------------------------------------------- /Usermode/Applications/httpd_src/http.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/httpd_src/http.c -------------------------------------------------------------------------------- /Usermode/Applications/httpd_src/include/common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/httpd_src/include/common.h -------------------------------------------------------------------------------- /Usermode/Applications/httpd_src/logging.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/httpd_src/logging.c -------------------------------------------------------------------------------- /Usermode/Applications/httpd_src/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/httpd_src/main.c -------------------------------------------------------------------------------- /Usermode/Applications/httpd_src/net.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/httpd_src/net.c -------------------------------------------------------------------------------- /Usermode/Applications/httpd_src/server.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Applications/httpd_src/server.c -------------------------------------------------------------------------------- /Usermode/Applications/imageview_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: imageview 2 | 3 | -include ../Makefile.cfg 4 | 5 | LDFLAGS += -luri 6 | 7 | OBJ := main.o 8 | BIN := imageview 9 | 10 | -include ../Makefile.tpl 11 | 12 | -------------------------------------------------------------------------------- /Usermode/Applications/init_src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | 3 | -include ../Makefile.cfg 4 | 5 | CPPFLAGS += 6 | CFLAGS += -Wall -Werror -O3 7 | LDFLAGS += 8 | 9 | BIN = init 10 | OBJ = main.o 11 | DIR = SBin 12 | 13 | -include ../Makefile.tpl 14 | -------------------------------------------------------------------------------- /Usermode/Applications/insmod_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: insmod 2 | 3 | -include ../Makefile.cfg 4 | 5 | DIR = SBin 6 | OBJ = main.o 7 | BIN = insmod 8 | 9 | -include ../Makefile.tpl 10 | 11 | -------------------------------------------------------------------------------- /Usermode/Applications/ip_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: ip 2 | 3 | -include ../Makefile.cfg 4 | 5 | LDFLAGS += 6 | LIBS += -lnet 7 | 8 | OBJ = main.o addr.o routes.o 9 | BIN = ip 10 | 11 | -include ../Makefile.tpl 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Applications/ip_src/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 ip command 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * common.h 6 | * - Shared header 7 | */ 8 | #ifndef _COMMON_H_ 9 | #define _COMMON_H_ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define FILENAME_MAX 255 19 | #define IPSTACK_ROOT "/Devices/ip" 20 | 21 | #define ntohs(v) (((v&0xFF)<<8)|((v>>8)&0xFF)) 22 | 23 | extern void PrintUsage(const char *ProgName); 24 | extern int ParseIPAddress(const char *Address, uint8_t *Dest, int *SubnetBits); 25 | extern int Addr_main(int argc, char *argv[]); 26 | extern int Routes_main(int argc, char *argv[]); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /Usermode/Applications/ip_src/rules.mk: -------------------------------------------------------------------------------- 1 | # ifconfig 2 | 3 | include $(BASE)header.mk 4 | 5 | # Variables 6 | SRCS := main.c addr.c routes.c 7 | BIN := $(OUTPUTDIR)Bin/ifconfig 8 | 9 | LDFLAGS-$(DIR) += -lnet 10 | 11 | include $(BASE)body.mk 12 | 13 | include $(BASE)footer.mk 14 | 15 | -------------------------------------------------------------------------------- /Usermode/Applications/irc_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: IRC Client 2 | 3 | -include ../Makefile.cfg 4 | 5 | LIBS += -lnet -lreadline 6 | 7 | OBJ = main.o server.o input.o 8 | OBJ += window.o pseudo_curses.o 9 | BIN = irc 10 | 11 | -include ../Makefile.tpl 12 | -------------------------------------------------------------------------------- /Usermode/Applications/irc_src/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _COMMON_H_ 4 | #define _COMMON_H_ 5 | 6 | #include "pseudo_curses.h" 7 | 8 | typedef struct sServer tServer; 9 | 10 | extern void _SysDebug(const char *format, ...); 11 | 12 | extern int writef(int FD, const char *Format, ...); 13 | extern int OpenTCP(const char *AddressString, short PortNumber); 14 | extern char *GetValue(char *Src, int *Ofs); 15 | 16 | extern void Redraw_Screen(void); 17 | extern void Exit(const char *Reason) __attribute__((noreturn)); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /Usermode/Applications/irc_src/input.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _INPUT_H_ 4 | #define _INPUT_H_ 5 | 6 | #include 7 | 8 | extern void Input_FillSelect(int *nfds, fd_set *rfds); 9 | extern void Input_HandleSelect(int nfds, const fd_set *rfds); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Applications/irc_src/pseudo_curses.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _ACURSES_H_ 4 | #define _ACURSES_H_ 5 | 6 | extern int giTerminal_Width; 7 | extern int giTerminal_Height; 8 | 9 | extern void ACurses_Init(void); 10 | extern void SetCursorPos(int Row, int Col); 11 | 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /Usermode/Applications/login_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 Login Shell 2 | 3 | -include ../Makefile.cfg 4 | 5 | DBTYPE = tpl 6 | 7 | OBJ = main.o database_$(DBTYPE).o 8 | BIN = login 9 | DIR = SBin 10 | 11 | -include ../Makefile.tpl 12 | -------------------------------------------------------------------------------- /Usermode/Applications/login_src/header.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Login Shell 3 | */ 4 | #ifndef _HEADER_H_ 5 | #define _HEADER_H_ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | // === TYPES === 13 | typedef struct { 14 | int UID; 15 | int GID; 16 | char *Home; 17 | char *Shell; 18 | } tUserInfo; 19 | 20 | // === PROTOTYPES === 21 | // --- User Database --- 22 | extern int ValidateUser(char *Username, char *Password); 23 | extern tUserInfo *GetUserInfo(int UID); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Usermode/Applications/ls_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: cat 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = ls 7 | 8 | -include ../Makefile.tpl 9 | -------------------------------------------------------------------------------- /Usermode/Applications/ls_src/rules.mk: -------------------------------------------------------------------------------- 1 | # ls 2 | 3 | include $(BASE)header.mk 4 | 5 | # Variables 6 | SRCS := main.c 7 | BIN := $(OUTPUTDIR)Bin/ls 8 | 9 | include $(BASE)body.mk 10 | 11 | include $(BASE)footer.mk 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Applications/lspci_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: PCI Device Listing 2 | 3 | -include ../Makefile.cfg 4 | 5 | LDFLAGS += 6 | 7 | OBJ = main.o 8 | BIN = lspci 9 | 10 | -include ../Makefile.tpl 11 | -------------------------------------------------------------------------------- /Usermode/Applications/mount_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: mount 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = mount 7 | 8 | -include ../Makefile.tpl 9 | 10 | -------------------------------------------------------------------------------- /Usermode/Applications/ping_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: ping 2 | 3 | -include ../Makefile.cfg 4 | 5 | LIBS += -lnet 6 | 7 | OBJ = main.o 8 | BIN = ping 9 | 10 | -include ../Makefile.tpl 11 | 12 | -------------------------------------------------------------------------------- /Usermode/Applications/telnet_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: telnet 2 | 3 | -include ../Makefile.cfg 4 | 5 | LIBS += -lnet -lreadline 6 | 7 | OBJ = main.o 8 | BIN = telnet 9 | 10 | -include ../Makefile.tpl 11 | -------------------------------------------------------------------------------- /Usermode/Applications/telnetd_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: telnetd 2 | 3 | -include ../Makefile.cfg 4 | 5 | LIBS += -lnet 6 | 7 | OBJ = main.o 8 | BIN = telnetd 9 | DIR = SBin 10 | CFLAGS += -std=c99 11 | 12 | -include ../Makefile.tpl 13 | -------------------------------------------------------------------------------- /Usermode/Applications/testclient_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: Test TCP Client Application (testclient) 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = testclient 7 | LDFLAGS += -lnet 8 | 9 | -include ../Makefile.tpl 10 | 11 | -------------------------------------------------------------------------------- /Usermode/Applications/testserver_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: testsrv 2 | 3 | -include ../Makefile.cfg 4 | 5 | OBJ = main.o 6 | BIN = testsrv 7 | 8 | -include ../Makefile.tpl 9 | 10 | -------------------------------------------------------------------------------- /Usermode/Applications/wget_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: wget clone 2 | 3 | -include ../Makefile.cfg 4 | 5 | CFLAGS += -std=gnu99 6 | LIBS += -lnet -lpsocket -luri 7 | 8 | OBJ = main.o 9 | BIN = wget 10 | 11 | -include ../Makefile.tpl 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Applications/writetest_src/Makefile: -------------------------------------------------------------------------------- 1 | # Project: Acess Network Tester 2 | 3 | -include ../Makefile.cfg 4 | 5 | CPPFLAGS += 6 | CFLAGS += -Wall -fno-builtin -fno-stack-protector 7 | LDFLAGS += 8 | 9 | BIN = writetest 10 | OBJ = main.o 11 | 12 | include ../Makefile.tpl 13 | -------------------------------------------------------------------------------- /Usermode/Filesystem/Conf/Auth/Groups: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Filesystem/Conf/Auth/Groups -------------------------------------------------------------------------------- /Usermode/Filesystem/Conf/Auth/Passwords: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Filesystem/Conf/Auth/Passwords -------------------------------------------------------------------------------- /Usermode/Filesystem/Conf/Auth/Users: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Filesystem/Conf/Auth/Users -------------------------------------------------------------------------------- /Usermode/Filesystem/Conf/BootConf.cfg: -------------------------------------------------------------------------------- 1 | #module /Acess/Modules/bochsvbe.kmd 2 | #module /Acess/Modules/ps2mouse 3 | #edimod /Acess/Modules/serial.edi 4 | #module /Acess/Modules/ne2000.akm 5 | spawn /Acess/SBin/init 6 | -------------------------------------------------------------------------------- /Usermode/Filesystem/Conf/inittab: -------------------------------------------------------------------------------- 1 | exec /Acess/SBin/dhcpc 2 | exec /Acess/SBin/automount 3 | 4 | daemon /Devices/null /Devices/null /Acess/SBin/telnetd 5 | 6 | ktty 0 /Acess/SBin/login 7 | ktty 1 /Acess/SBin/login 8 | stty 0 8N1b115200 /Acess/SBin/login 9 | stty 1 8N1b115200 /Acess/SBin/login 10 | 11 | # vim: ft=text 12 | -------------------------------------------------------------------------------- /Usermode/Filesystem/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 2 | # - Usermode Filesystem Structure Generator 3 | 4 | -include ../Makefile.cfg 5 | 6 | DIRS = Bin SBin Libs Modules Apps 7 | DIRS += Conf Conf/Auth 8 | FILES = Conf/inittab 9 | # Conf/Auth/Users Conf/Auth/Passwords Conf/Auth/Groups 10 | 11 | #DIRS := $(addprefix $(DISTROOT)/,$(DIRS)) 12 | #FILES := $(addprefix $(DISTROOT)/,$(FILES)) 13 | 14 | .PHONY: all clean 15 | .PHONY: $(DIRS) $(FILES) DISTROOT 16 | 17 | install: DISTROOT $(DIRS) $(FILES) 18 | 19 | clean: 20 | 21 | DISTROOT: 22 | $(xMKDIR) $(DISTROOT); true 23 | 24 | $(DIRS): 25 | $(xMKDIR) $(DISTROOT)/$@; true 26 | 27 | $(FILES): 28 | $(xCP) $@ $(DISTROOT)/$@ 29 | 30 | force: ; 31 | -------------------------------------------------------------------------------- /Usermode/Libraries/.gitignore: -------------------------------------------------------------------------------- 1 | acess.ld 2 | TEST_* 3 | !TEST_*.c 4 | -------------------------------------------------------------------------------- /Usermode/Libraries/Makefile: -------------------------------------------------------------------------------- 1 | include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile 2 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/crt0S.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 3 | * - CRT0 Shared library version 4 | */ 5 | 6 | typedef void (*exithandler_t)(void); 7 | typedef void (*constructor_t)(void); 8 | 9 | extern void _SysDebug(const char *, ...); 10 | extern void _init(void); 11 | extern void _fini(void); 12 | extern int SoMain(void *Base, int argc, char *argv[], char **envp) __attribute__((weak)); 13 | 14 | int SoStart(void *Base, int argc, char *argv[], char **envp) 15 | { 16 | //_SysDebug("SoStart(%p,%i,%p)", Base, argc, argv); 17 | _init(); 18 | 19 | if( SoMain ) 20 | return SoMain(Base, argc, argv, envp); 21 | else 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/crtbegin.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Libraries/crt0.o_src/crtbegin.c -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/crtend.c: -------------------------------------------------------------------------------- 1 | 2 | void *_crtend_ctors[1] __attribute__((section(".ctors"))); 3 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/native-crti.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | .global _init 3 | .type _init, @function 4 | _init: 5 | /* gcc will nicely put the contents of crtbegin.o's .init section here. */ 6 | 7 | .section .fini 8 | .global _fini 9 | .type _fini, @function 10 | _fini: 11 | /* gcc will nicely put the contents of crtbegin.o's .fini section here. */ 12 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/native-crtn.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | /* gcc will nicely put the contents of crtend.o's .init section here. */ 3 | ret 4 | 5 | .section .fini 6 | ret 7 | /* gcc will nicely put the contents of crtend.o's .fini section here. */ 8 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/rules.mk: -------------------------------------------------------------------------------- 1 | # crt0 and friends 2 | 3 | include $(BASE)header.mk 4 | 5 | # Variables 6 | SRCS := crt0.c crtbegin.c crtend.c 7 | # signals.c 8 | BIN := $(OUTPUTDIR)Libs/crt0.o $(OUTPUTDIR)Libs/crtbegin.o $(OUTPUTDIR)Libs/crtend.o 9 | 10 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) -g 11 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) 12 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) 13 | 14 | include $(BASE)body.mk 15 | 16 | $(filter %crt0.o,$(BIN)): $(filter %crt0.c.o,$(OBJ)) 17 | @cp $< $@ 18 | $(filter %crtbegin.o,$(BIN)): $(filter %crtbegin.c.o,$(OBJ)) 19 | @cp $< $@ 20 | $(filter %crtend.o,$(BIN)): $(filter %crtend.c.o,$(OBJ)) 21 | @cp $< $@ 22 | 23 | include $(BASE)footer.mk 24 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/x86-crti.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | .global _init 3 | .type _init, @function 4 | _init: 5 | push %ebp 6 | movl %esp, %ebp 7 | /* gcc will nicely put the contents of crtbegin.o's .init section here. */ 8 | 9 | .section .fini 10 | .global _fini 11 | .type _fini, @function 12 | _fini: 13 | push %ebp 14 | movl %esp, %ebp 15 | /* gcc will nicely put the contents of crtbegin.o's .fini section here. */ 16 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/x86-crtn.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | /* gcc will nicely put the contents of crtend.o's .init section here. */ 3 | popl %ebp 4 | ret 5 | 6 | .section .fini 7 | /* gcc will nicely put the contents of crtend.o's .fini section here. */ 8 | popl %ebp 9 | ret 10 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/x86_64-crti.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | .global _init 3 | .type _init, @function 4 | _init: 5 | push %rbp 6 | mov %rsp, %rbp 7 | /* gcc will nicely put the contents of crtbegin.o's .init section here. */ 8 | 9 | .section .fini 10 | .global _fini 11 | .type _fini, @function 12 | _fini: 13 | push %rbp 14 | mov %rsp, %rbp 15 | /* gcc will nicely put the contents of crtbegin.o's .fini section here. */ 16 | -------------------------------------------------------------------------------- /Usermode/Libraries/crt0.o_src/x86_64-crtn.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | /* gcc will nicely put the contents of crtend.o's .init section here. */ 3 | pop %rbp 4 | ret 5 | 6 | .section .fini 7 | /* gcc will nicely put the contents of crtend.o's .fini section here. */ 8 | pop %rbp 9 | ret 10 | -------------------------------------------------------------------------------- /Usermode/Libraries/ld-acess.so_src/arch/.gitignore: -------------------------------------------------------------------------------- 1 | x86.asm 2 | -------------------------------------------------------------------------------- /Usermode/Libraries/ld-acess.so_src/include_exp/sys/param.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Dynamic Linker 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * sys/param.h 6 | * - System Parameters (?) 7 | */ 8 | #ifndef _SYS__PARAM_H_ 9 | #define _SYS__PARAM_H_ 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Libraries/libacess-native.so_src/Makefile: -------------------------------------------------------------------------------- 1 | 2 | include ../Makefile.cfg 3 | 4 | ANDIR := $(ACESSDIR)/AcessNative/ 5 | 6 | 7 | 8 | all: 9 | $(MAKE) -C $(ANDIR)libacess-native.so_src/ all 10 | ln -s $(ANDIR)/libacess-native.so $(OUTPUTDIR)Libs/ 11 | # ln -s $(ANDIR)/libacess-native.dll $(OUTPUTDIR)Libs/ 12 | 13 | install: 14 | @true 15 | -------------------------------------------------------------------------------- /Usermode/Libraries/libaxwin3.so_src/Makefile: -------------------------------------------------------------------------------- 1 | all clean install all-install: ; 2 | @$(MAKE) --no-print-directory -C ../../Applications/axwin3_src/libaxwin3.so_src/ $* 3 | -------------------------------------------------------------------------------- /Usermode/Libraries/libaxwin3.so_src/include_exp/axwin3/keysyms.h: -------------------------------------------------------------------------------- 1 | #include "../../../../../KernelLand/Kernel/include/keysyms.h" 2 | -------------------------------------------------------------------------------- /Usermode/Libraries/libaxwin4.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess2 AxWin4 Library 2 | # Makefile 3 | 4 | -include ../Makefile.cfg 5 | 6 | AXWIN4DIR := ../../Applications/axwin4_src/ 7 | 8 | CPPFLAGS += -I$(AXWIN4DIR)Common/include/ 9 | CFLAGS += -Wextra 10 | CXXFLAGS += 11 | ASFLAGS += 12 | LDFLAGS += -soname libaxwin4.so -Map map.txt 13 | LIBS += -lc -lc++ 14 | 15 | OBJ = main.o ipc.o ipc_acessipcpipe.o 16 | OBJ += wm.o window_drawing.o 17 | OBJ += Common__serialisation.o 18 | BIN = libaxwin4.so 19 | 20 | include ../Makefile.tpl 21 | 22 | $(_OBJPREFIX)Common__%.o: $(AXWIN4DIR)/Common/%.cpp 23 | @echo [CXX] -o $@ 24 | @mkdir -p $(dir $@) 25 | $V$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@ -MQ $@ -MP -MD -MF $(@:%=%.dep) 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Usermode/Libraries/libaxwin4.so_src/include/IIPCChannel.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUIv4 Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * IIPCChannel.h 6 | * - IPC Channel interface 7 | */ 8 | #ifndef _LIBAXWIN4_IIPCCHANNEL_H_ 9 | #define _LIBAXWIN4_IIPCCHANNEL_H_ 10 | 11 | #include 12 | 13 | #include 14 | 15 | namespace AxWin { 16 | 17 | class IIPCChannel 18 | { 19 | public: 20 | virtual ~IIPCChannel(); 21 | virtual int FillSelect(fd_set& fds) = 0; 22 | /** 23 | * \return False if the connection has dropped/errored 24 | */ 25 | virtual bool HandleSelect(const fd_set& fds) = 0; 26 | 27 | virtual void Send(CSerialiser& message) = 0; 28 | }; 29 | 30 | }; // namespace AxWin 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /Usermode/Libraries/libaxwin4.so_src/include/common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 GUIv4 Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * common.h 6 | * - Library internal header 7 | */ 8 | #ifndef _LIBAXWIN4_COMMON_H_ 9 | #define _LIBAXWIN4_COMMON_H_ 10 | 11 | #include 12 | 13 | namespace AxWin { 14 | 15 | extern void SendMessage(CSerialiser& message); 16 | extern void RecvMessage(CDeserialiser& message); 17 | extern CDeserialiser GetSyncReply(CSerialiser& request, unsigned int Message); 18 | 19 | }; 20 | 21 | struct sAxWin4_Window 22 | { 23 | unsigned int m_id; 24 | int m_fd; 25 | void *m_buffer; 26 | }; 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /Usermode/Libraries/libaxwin4.so_src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | // === CODE === 4 | int SoMain(void) 5 | { 6 | return 0; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/cassert: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | #include 3 | } 4 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/cerrno: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | extern "C" { 4 | #include 5 | } 6 | // vim: ft=cpp 7 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/cstddef: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C++ Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * cstddef (header) 6 | * - C++ wrapper around stddef.h 7 | */ 8 | #ifndef _LIBCXX_CSTDDEF_ 9 | #define _LIBCXX_CSTDDEF_ 10 | 11 | extern "C" { 12 | #include 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/cstdint: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C++ Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * cstdint (header) 6 | * - C++ wrapper around stdint.h 7 | */ 8 | #ifndef _LIBCXX_CSTDINT_ 9 | #define _LIBCXX_CSTDINT_ 10 | 11 | extern "C" { 12 | #include 13 | }; 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/cstdio: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | extern "C" { 4 | #include 5 | } 6 | // vim: ft=cpp 7 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/cstdlib: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C++ Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * cstdlib (header) 6 | * - C++ wrapper around stdlib.h 7 | */ 8 | #ifndef _LIBCXX_CSTDLIB_ 9 | #define _LIBCXX_CSTDLIB_ 10 | 11 | extern "C" { 12 | #include 13 | }; 14 | 15 | #endif 16 | 17 | 18 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/cstring: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C++ Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * cstring (header) 6 | * - C++ wrapper around string.h 7 | */ 8 | #ifndef _LIBCXX_CSTRING_ 9 | #define _LIBCXX_CSTRING_ 10 | 11 | extern "C" { 12 | #include 13 | }; 14 | 15 | #endif 16 | 17 | 18 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/functional: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C++ Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * functional (header) 6 | * - Funcional programming features 7 | */ 8 | #ifndef _LIBCXX_FUNCTIONAL_ 9 | #define _LIBCXX_FUNCTIONAL_ 10 | 11 | #include "_libcxx_helpers.h" 12 | 13 | namespace std { 14 | 15 | template 16 | struct less 17 | { 18 | bool operator() (const T& x, const T& y) const { 19 | return x < y; 20 | } 21 | typedef T first_argument_type; 22 | typedef T second_argument_type; 23 | typedef bool result_type; 24 | }; 25 | 26 | }; // namespace std 27 | 28 | #endif 29 | 30 | // vim: ft=cpp 31 | 32 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/memory: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _LIBCXX_MEMORY_ 3 | #define _LIBCXX_MEMORY_ 4 | 5 | namespace std { 6 | 7 | template <> 8 | class allocator 9 | { 10 | public: 11 | typedef void* pointer; 12 | typedef const void* const_pointer; 13 | typedef void value_type; 14 | template struct rebind { typedef allocator other; }; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/include_exp/type_traits: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C++ Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * type_traits (header) 6 | * - C++11 type traits 7 | */ 8 | #ifndef _LIBCXX_TYPE_TRAITS_ 9 | #define _LIBCXX_TYPE_TRAITS_ 10 | 11 | #include "_libcxx_helpers.h" 12 | 13 | #if !_CXX11_AVAIL 14 | # error "This header requires C++11 support enabled" 15 | #endif 16 | 17 | template struct remove_reference { typedef T type; }; 18 | template struct remove_reference { typedef T type; }; 19 | template struct remove_reference { typedef T type; }; 20 | 21 | #endif 22 | 23 | // vim: ft=cpp 24 | 25 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/mutex.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C++ Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * mutex.cc 6 | * - ::std::mutex and helpers 7 | */ 8 | #include 9 | #include 10 | #include 11 | 12 | // === CODE === 13 | ::std::mutex::~mutex() 14 | { 15 | 16 | } 17 | 18 | void ::std::mutex::lock() 19 | { 20 | if( m_flag ) 21 | { 22 | _sys::debug("TODO: userland mutexes"); 23 | throw ::std::system_error(ENOTIMPL, ::std::system_category()); 24 | } 25 | m_flag = true; 26 | } 27 | 28 | bool ::std::mutex::try_lock() 29 | { 30 | bool rv = m_flag; 31 | m_flag = true; 32 | return !rv; 33 | } 34 | 35 | void ::std::mutex::unlock() 36 | { 37 | m_flag = false; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++.so_src/string.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C++ Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * exceptions.cc 6 | * - ::std::exception and friends 7 | */ 8 | #include 9 | #include 10 | 11 | void ::std::_throw_out_of_range(const char *message) 12 | { 13 | throw ::std::out_of_range( ::std::string(message) ); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc++_extras.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess2 Basic C Library 2 | # Makefile 3 | 4 | -include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CXXFLAGS += -Wall -Werror -Wextra -std=c++11 8 | CFLAGS += -Wall -Werror -Wextra 9 | ASFLAGS += 10 | LDFLAGS += 11 | LIBS += -lc++ 12 | 13 | include ../Makefile.tpl 14 | 15 | %.native: %.cpp 16 | $(NCXX) $< -o $@ -Wall -std=c++14 -O3 -I include_exp/ 17 | 18 | TEST_cprintf.native: include_exp/cxxextras_printf 19 | 20 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/.gitignore: -------------------------------------------------------------------------------- 1 | EXP_printf.txt 2 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/EXP_strtoi.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Libraries/libc.so_src/EXP_strtoi.txt -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/arch/armv6.S: -------------------------------------------------------------------------------- 1 | @ 2 | @ Acess2 C Library 3 | @ - By John Hodge (thePowersGang) 4 | @ 5 | @ arch/armv6.S 6 | @ - ARMv6 specific code 7 | .globl setjmp 8 | setjmp: 9 | @ RO: Buffer 10 | stm r0, {r0-r14} 11 | eor r0, r0 12 | mov pc, lr 13 | 14 | .globl longjmp 15 | longjmp: 16 | @ R0: Buffer 17 | @ R1: Value 18 | add r0, #8 19 | ldm r0, {r2-r14} 20 | mov r0, r1 21 | tst r0, r0 22 | addeq r0, #1 23 | mov pc, lr @ Will return to after setjmp 24 | 25 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/arch/armv7.S: -------------------------------------------------------------------------------- 1 | @ 2 | @ Acess2 C Library 3 | @ - By John Hodge (thePowersGang) 4 | @ 5 | @ arch/armv7.S 6 | @ - ARMv7 specific code 7 | .globl setjmp 8 | setjmp: 9 | @ RO: Buffer 10 | stm r0, {r0-r14} 11 | eor r0, r0 12 | mov pc, lr 13 | 14 | .globl longjmp 15 | longjmp: 16 | @ R0: Buffer 17 | @ R1: Value 18 | add r0, #8 19 | ldm r0, {r2-r14} 20 | mov r0, r1 21 | tst r0, r0 22 | addeq r0, #1 23 | mov pc, lr @ Will return to after setjmp 24 | 25 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/arch/native.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Libraries/libc.so_src/arch/native.S -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/arch/native.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Acess2 C Library 3 | ; - By John Hodge (thePowersGang) 4 | ; 5 | ; arch/x86.asm 6 | ; - x86 specific code 7 | [bits 32] 8 | [section .text] 9 | unused_code: 10 | jmp $ 11 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AcessOS Standard C Library 3 | * CONFIG.H 4 | * Configuration Options 5 | */ 6 | #ifndef _CONFIG_H 7 | # define _CONFIG_H 8 | 9 | // -- COMMON -- 10 | #define _LIBC_BUILD 1 11 | #define DEBUG_BUILD 0 12 | 13 | // -- STDIO -- 14 | #define STDIO_MAX_STREAMS 64 15 | #define STDIO_LOCAL_BUFFER 0 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/crt0.asm: -------------------------------------------------------------------------------- 1 | ; AcessOS LibC 2 | ; crt0.asm 3 | ; 4 | 5 | [extern _heap_start] 6 | 7 | start: 8 | 9 | 10 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/heap_native.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | bool _libc_free(void *addr) 5 | { 6 | free(addr); 7 | return true; 8 | } 9 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/include_exp/errno.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Acess2 C Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * errno.h 6 | * - Error values and related functions 7 | */ 8 | #ifndef _LIBC_ERRNO_H_ 9 | #define _LIBC_ERRNO_H_ 10 | 11 | #include // size_t 12 | 13 | extern int *libc_geterrno(void); 14 | #define errno (*libc_geterrno()) 15 | 16 | extern int strerror_r(int errnum, char *buf, size_t buflen); 17 | extern char *strerror(int errnum); 18 | 19 | #include "errno.enum.h" 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/include_exp/inttypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * inttypes.h 6 | * - Fixed-size integer sizes 7 | * 8 | * Defined in IEEE Std 1003.1 9 | */ 10 | #ifndef _INTTYPES_H_ 11 | #define _INTTYPES_H_ 12 | 13 | #include 14 | #include 15 | 16 | #if INT64_MAX == LONG_MAX 17 | # define _PRI64 "l" 18 | #else 19 | # define _PRI64 "ll" 20 | #endif 21 | 22 | #define PRId64 _PRI64"d" 23 | #define PRIdLEAST64 _PRI64"d" 24 | #define PRIdFAST64 _PRI64"d" 25 | #define PRIdMAX 26 | #define PRIdPTR 27 | #define PRIi64 _PRI64"i" 28 | #define PRIiLEAST64 29 | #define PRIiFAST64 30 | #define PRIiMAX 31 | #define PRIiPTR 32 | 33 | #define PRIx64 _PRI64"i" 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/include_exp/locale.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * locale.h 6 | * - Locale management 7 | */ 8 | #ifndef _LIBC_LOCALE_H_ 9 | #define _LIBC_LOCALE_H_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/include_exp/setjmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 LibC 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * setjmp.h 6 | * - setjmp/longjmp support 7 | */ 8 | #ifndef _LIBC_SETJMP_H_ 9 | #define _LIBC_SETJMP_H_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #if defined(__i386__) 16 | typedef void *jmp_buf[8]; 17 | #elif defined(__amd64__) 18 | typedef void *jmp_buf[16]; 19 | #else 20 | # error "Unknown Architecture" 21 | #endif 22 | 23 | extern int setjmp(jmp_buf buf); 24 | extern void longjmp(jmp_buf buf, int val); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/lib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 Basic Lib C 3 | * lib.h 4 | */ 5 | #ifndef _LIB_H 6 | #define _LIB_H 7 | 8 | #include 9 | #include 10 | 11 | #define BUILD_SO 1 12 | 13 | #if defined(BUILD_DLL) 14 | #define EXPORT __declspec(dllexport) 15 | #define LOCAL 16 | #elif defined(BUILD_SO) 17 | #define EXPORT 18 | #define LOCAL 19 | #endif 20 | 21 | #define UNUSED(type, param) __attribute__((unused)) type UNUSED__##param 22 | 23 | extern void *memcpy(void *dest, const void *src, size_t n); 24 | 25 | typedef struct sCPUID tCPUID; 26 | 27 | struct sCPUID 28 | { 29 | uint8_t SSE; 30 | uint8_t SSE2; 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/rules.mk: -------------------------------------------------------------------------------- 1 | # libc 2 | 3 | include $(BASE)header.mk 4 | 5 | # Variables 6 | SRCS := stub.c heap.c stdlib.c env.c fileIO.c string.c select.c 7 | SRCS += perror.c 8 | SRCS += arch/$(ARCHDIR).$(ASSUFFIX) 9 | # signals.c 10 | BIN := $(OUTPUTDIR)Libs/libc.so 11 | 12 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) -g 13 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) 14 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) -lgcc 15 | 16 | include $(BASE)body.mk 17 | 18 | include $(BASE)footer.mk 19 | -------------------------------------------------------------------------------- /Usermode/Libraries/libc.so_src/stdio_files.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * stdio_files.c 6 | * - non-stream file manipulation 7 | */ 8 | #include 9 | #include // _SysDebug 10 | 11 | // === CODE === 12 | int remove(const char *filename) 13 | { 14 | _SysDebug("TODO: libc remove('%s')", filename); 15 | return 1; 16 | } 17 | 18 | int rename(const char *old, const char *new) 19 | { 20 | _SysDebug("TODO: libc rename('%s','%s')", old, new); 21 | return 1; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Usermode/Libraries/libiconv.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 "libiconv" 2 | # 3 | 4 | include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CFLAGS += -Wall 8 | LDFLAGS += -lc -soname libiconv.so 9 | 10 | OBJ = iconv.o 11 | BIN = libiconv.so 12 | 13 | include ../Makefile.tpl 14 | 15 | 16 | -------------------------------------------------------------------------------- /Usermode/Libraries/libiconv.so_src/iconv.c: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #include 4 | #include 5 | 6 | // === CODE === 7 | int SoMain(void) 8 | { 9 | return 0; 10 | } 11 | 12 | iconv_t iconv_open(const char *to, const char *from) 13 | { 14 | return NULL; 15 | } 16 | 17 | size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) 18 | { 19 | _SysDebug("WTF are you using iconv for?"); 20 | return 0; 21 | } 22 | 23 | int iconv_close(iconv_t cd) 24 | { 25 | return 0; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /Usermode/Libraries/libiconv.so_src/include_exp/iconv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 libiconv 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * iconv.h 6 | * - External header 7 | */ 8 | #ifndef _ICONV_H_ 9 | #define _ICONV_H_ 10 | 11 | #include 12 | 13 | typedef void *iconv_t; 14 | 15 | extern iconv_t iconv_open(const char *to, const char *from); 16 | extern size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); 17 | extern int iconv_close(iconv_t cd); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /Usermode/Libraries/libimage.so_src/include_exp/image.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _IMAGE_H_ 4 | #define _IMAGE_H_ 5 | 6 | // === TYPES === 7 | typedef struct sImage tImage; 8 | struct sImage 9 | { 10 | short Width; 11 | short Height; 12 | int Format; 13 | uint8_t Data[]; 14 | }; 15 | 16 | // === CONSTANTS === 17 | enum eImageFormats 18 | { 19 | IMGFMT_BGRA, 20 | IMGFMT_RGB, 21 | NUM_IMGFMTS 22 | }; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /Usermode/Libraries/libimage_sif.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 2 | # 3 | 4 | include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CFLAGS += -Wall 8 | LDFLAGS += -lc -soname libimage_sif.so 9 | 10 | OBJ = main.o 11 | BIN = libimage_sif.so 12 | 13 | include ../Makefile.tpl 14 | -------------------------------------------------------------------------------- /Usermode/Libraries/libimage_sif.so_src/rules.mk: -------------------------------------------------------------------------------- 1 | # libimage_sif 2 | include $(BASE)header.mk 3 | 4 | # Variables 5 | SRCS := main.c 6 | BIN := $(OUTPUTDIR)Libs/libimage_sif.so 7 | 8 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) 9 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) 10 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) -lc 11 | 12 | include $(BASE)body.mk 13 | 14 | $(BIN): $(OBJ) $(OUTPUTDIR)Libs/libc.so 15 | 16 | include $(BASE)footer.mk 17 | 18 | -------------------------------------------------------------------------------- /Usermode/Libraries/libintl.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 "libintl" 2 | # 3 | 4 | include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CFLAGS += -Wall 8 | LDFLAGS += -lc 9 | 10 | OBJ = main.o gettext.o 11 | BIN = libintl.so 12 | 13 | include ../Makefile.tpl 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Usermode/Libraries/libintl.so_src/include_exp/libintl.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _LIBINTL_H_ 4 | #define _LIBINTL_H_ 5 | 6 | extern char *gettext(const char *msg); 7 | extern char *dgettext(const char *domain, const char *msg); 8 | extern char *dcgettext(const char *domain, const char *msg, int category); 9 | extern char *ngettext(const char *msg, const char *msgp, unsigned long int n); 10 | extern char *dngettext(const char *domain, const char *msg, const char *msgp, unsigned long int n); 11 | extern char *dcngettext(const char *domain, const char *msg, const char *msgp, unsigned long int n, int category); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Usermode/Libraries/libintl.so_src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | 4 | int SoMain(void) 5 | { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /Usermode/Libraries/libm.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Acess2 C Library (Math) 3 | # - By John Hodge (thePowersGang) 4 | # 5 | 6 | -include ../Makefile.cfg 7 | 8 | CPPFLAGS += 9 | CFLAGS += -Werror -Wextra 10 | ASFLAGS += 11 | LDFLAGS += 12 | 13 | OBJ = stub.o pow.o 14 | BIN := libm.so 15 | 16 | include ../Makefile.tpl 17 | 18 | -------------------------------------------------------------------------------- /Usermode/Libraries/libm.so_src/include_exp/math.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C Library (Maths) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * math.h 6 | * - C99 Header 7 | */ 8 | #ifndef _LIBM__MATH_H_ 9 | #define _LIBM__MATH_H_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef float float_t; 16 | typedef double double_t; 17 | 18 | 19 | #define INFINITY (*(float*)((uint32_t[]){0x78000000})) 20 | #define NAN (*(float*)((uint32_t[]){0x78000001})) 21 | 22 | extern double pow(double x, double y); 23 | extern double exp(double x); 24 | extern double log(double val); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Usermode/Libraries/libm.so_src/pow.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C Library (Maths) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * pow.c 6 | * - pow(), powf() and powl() 7 | */ 8 | #include 9 | 10 | // === CODE === 11 | double pow(double x, double y) 12 | { 13 | if( x == 1.0f ) 14 | return 1.0f; 15 | if( y == 0.0f ) 16 | return 1.0f; 17 | return __builtin_pow(x,y); 18 | } 19 | 20 | double exp(double y) 21 | { 22 | if( y == 0.0f ) 23 | return 1.0f; 24 | return __builtin_exp(y); 25 | } 26 | 27 | double log(double n) 28 | { 29 | if(n == 1.0f) 30 | return 0.0f; 31 | return __builtin_log(n); 32 | } 33 | -------------------------------------------------------------------------------- /Usermode/Libraries/libm.so_src/stub.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 C Library (Maths) 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * stub.c 6 | * - Provides SoMain (unused) 7 | */ 8 | 9 | // === CODE === 10 | int SoMain(void) 11 | { 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Usermode/Libraries/libnet.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 - Networking Helpers 2 | 3 | include ../Makefile.cfg 4 | 5 | CPPFLAGS += 6 | CFLAGS += -Wall 7 | LDFLAGS += -lc -soname libnet.so 8 | 9 | OBJ = main.o address.o socket.o 10 | OBJ += hostnames.o dns.o dns_proto.o 11 | BIN = libnet.so 12 | 13 | UTESTS = dns_prot 14 | 15 | include ../Makefile.tpl 16 | -------------------------------------------------------------------------------- /Usermode/Libraries/libnet.so_src/include/dns_int.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _DNS_INT_H_ 4 | #define _DNS_INT_H_ 5 | 6 | #include "dns.h" 7 | 8 | extern size_t DNS_int_EncodeQuery(void *buf, size_t bufsize, const char *name, enum eTypes type, enum eClass class); 9 | extern int DNS_int_ParseResponse(const void* packet, size_t return_len, void *info, handle_record_t* handle_record_t); 10 | 11 | extern size_t DNS_EncodeName(void *buf, const char *dotted_name); 12 | extern int DNS_DecodeName(char dotted_name[256], const void *buf, size_t ofs, size_t space); 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /Usermode/Libraries/libnet.so_src/rules.mk: -------------------------------------------------------------------------------- 1 | # libnet 2 | include $(BASE)header.mk 3 | 4 | # Variables 5 | SRCS := main.c address.c 6 | BIN := $(OUTPUTDIR)Libs/libnet.so 7 | 8 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) 9 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) 10 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) -lc 11 | 12 | include $(BASE)body.mk 13 | 14 | $(BIN): $(OBJ) $(OUTPUTDIR)Libs/libc.so 15 | 16 | include $(BASE)footer.mk 17 | 18 | 19 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess2 POSIX Emulation 2 | # Makefile 3 | 4 | -include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CFLAGS += -Wextra 8 | ASFLAGS += 9 | LDFLAGS += -nostdlib 10 | PRELINK += $(CRTI) $(CRTBEGINS) $(CRT0S) 11 | LIBS += -lgcc -lc $(CRTENDS) $(CRTN) 12 | 13 | OBJ = main.o unistd.o dirent.o stat.o utmpx.o termios.o 14 | OBJ += pwd.o syslog.o sys_time.o sys_ioctl.o sys_resource.o 15 | OBJ += fcntl.o clocks.o sys_wait.o unistd_crypt.o 16 | OBJ += grp.o pty.o mktemp.o utime.o getopt.o 17 | DEPFILES := $(OBJ:%.o=%.d) 18 | BIN = libposix.so 19 | 20 | include ../Makefile.tpl 21 | 22 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/getopt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Layer 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * getopt.c 6 | * - getopt() command line parsing code 7 | */ 8 | #include 9 | 10 | // === GLOBALS === 11 | char* optarg; 12 | int opterr; 13 | int optind; 14 | int optopt; 15 | 16 | // === CODE === 17 | int getopt(int argc, char * const argv[], const char *optstring) 18 | { 19 | return -1; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/endian.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _LIBPOSIX_ENDIAN_H_ 4 | #define _LIBPOSIX_ENDIAN_H_ 5 | 6 | #define __LITTLE_ENDIAN 0 7 | #define __BIG_ENDIAN 0 8 | #define __BYTE_ORDER __LITTLE_ENDIAN 9 | 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/getopt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Layer 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * getopt.h 6 | * - getopt() command line parsing code 7 | */ 8 | #ifndef _LIBPOSIX_GETOPT_H_ 9 | #define _LIBPOSIX_GETOPT_H_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | extern char* optarg; 16 | extern int opterr; 17 | extern int optind; 18 | extern int optopt; 19 | 20 | extern int getopt(int argc, char * const argv[], const char *optstring); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/glob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * glob.h 6 | * - Globbing code 7 | */ 8 | #ifndef _LIBPOSIX__GLOB_H_ 9 | #define _LIBPOSIX__GLOB_H_ 10 | 11 | 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/libposix_stdlib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * stdlib.h (libposix version) 6 | * - Misc functions 7 | * 8 | * NOTE: Included by libc's stdlib.h 9 | */ 10 | #ifndef _LIBPOSIX__STDLIB_H_ 11 | #define _LIBPOSIX__STDLIB_H_ 12 | 13 | extern int mkstemp(char *_template); 14 | 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/pty.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Layer 3 | * - By John Hodge 4 | * 5 | * pty.h 6 | * - PTY Management 7 | * 8 | * BSD Conforming (Non-POSIX) 9 | */ 10 | #ifndef _LIBPOSIX__PTY_H_ 11 | #define _LIBPOSIX__PTY_H_ 12 | 13 | #include 14 | #include 15 | 16 | extern int openpty(int *amaster, int *aslave, char *name, const struct termios *termp, const struct winsize *winp); 17 | extern pid_t forkpty(int *amaster, char *name, const struct termios *termp, const struct winsize *winp); 18 | // - utmp.h? 19 | extern int login_tty(int fd); 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/strings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * strings.h 6 | * - BSD's verison of string.h 7 | */ 8 | #ifndef _LIBPOSIX_STRINGS_H_ 9 | #define _LIBPOSIX_STRINGS_H_ 10 | 11 | 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/sys/ioctl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * ioctl.h 6 | * - IOCtl hacks 7 | */ 8 | #ifndef _LIBPOSIX__IOCTL_H_ 9 | #define _LIBPOSIX__IOCTL_H_ 10 | 11 | extern int ioctl(int d, int request, ...); 12 | 13 | // ioctl numbers in termios 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/sys/mman.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Layer 3 | * - By John Hodge 4 | * 5 | * sys/mman.h 6 | * - Memory Management (mmap and friends) 7 | */ 8 | #ifndef _LIBPOSIX__SYS_MMAN_H_ 9 | #define _LIBPOSIX__SYS_MMAN_H_ 10 | 11 | extern void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); 12 | extern int munmap(void *addr, size_t length); 13 | 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/sys/select.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Layer 3 | * - By John Hodge 4 | * 5 | * sys/select.h 6 | * - select(2) 7 | */ 8 | #ifndef _SYS__SELECT_H_ 9 | #define _SYS__SELECT_H_ 10 | 11 | #include 12 | #include 13 | 14 | extern int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *execptfds, struct timeval *timeout); 15 | // TODO: pselect? 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/sys/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #ifndef _SYS_TYPES_H 4 | #define _SYS_TYPES_H 5 | 6 | #include 7 | 8 | #define __USE_BSD 1 9 | 10 | //typedef signed int ssize_t; 11 | 12 | #ifdef __USE_BSD 13 | typedef unsigned long u_long; 14 | typedef unsigned int u_int; 15 | #endif 16 | 17 | typedef struct stat t_fstat; 18 | 19 | 20 | typedef unsigned long uid_t; 21 | typedef unsigned long gid_t; 22 | typedef unsigned int id_t; 23 | typedef unsigned long pid_t; 24 | typedef unsigned long tid_t; 25 | typedef signed long long int time_t; 26 | typedef long long int off_t; 27 | 28 | typedef unsigned int uint; 29 | 30 | //#include "stat.h" 31 | #include 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/include_exp/utime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Layer 3 | * - By John Hodge 4 | * 5 | * utime.h 6 | * - 7 | */ 8 | #ifndef _LIBPOSIX__UTIME_H_ 9 | #define _LIBPOSIX__UTIME_H_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #include // time_t 16 | 17 | struct utimbuf { 18 | time_t actime; // access time 19 | time_t modtime; // modifcation time 20 | }; 21 | 22 | extern int utime(const char *filename, const struct utimbuf *times); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Layer 3 | * - By John Hodge 4 | * 5 | * main.c 6 | * - Stub Main 7 | */ 8 | 9 | // === CODE === 10 | int SoMain(void) 11 | { 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/sys_resource.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * sys_resource.c 6 | * - (XSI) Resource Operations 7 | */ 8 | #include 9 | #include 10 | 11 | // === CODE === 12 | int getrlimit(int resource, struct rlimit *rlim) 13 | { 14 | _SysDebug("TODO: getrlimit(%i)", resource); 15 | rlim->rlim_cur = 0; 16 | rlim->rlim_max = 0; 17 | return 0; 18 | } 19 | 20 | int setrlimit(int resource, const struct rlimit *rlim) 21 | { 22 | _SysDebug("TODO: setrlimit(%i,{%i,%i})", resource, rlim->rlim_cur, rlim->rlim_max); 23 | return 0; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/sys_wait.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * sys_wait.c 6 | * - Waiting 7 | */ 8 | #include 9 | #include 10 | #include 11 | 12 | // === CODE === 13 | pid_t wait(int *status) 14 | { 15 | return _SysWaitTID(0, status); 16 | } 17 | 18 | pid_t waitpid(pid_t pid, int *status, int options) 19 | { 20 | if( options & WNOHANG ) { 21 | _SysDebug("TODO: support waitpid(...,WNOHANG)"); 22 | errno = EINVAL; 23 | return -1; 24 | } 25 | return _SysWaitTID(pid, status); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/unistd_crypt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * unistd_crypt.c 6 | * - crypt(3) 7 | */ 8 | #include 9 | 10 | // === CODE === 11 | char *crypt(const char *key, const char *salt) 12 | { 13 | if( *salt == '$' ) 14 | { 15 | // $x$salt$ 16 | // x=1 : MD5 17 | // x=5 : SHA-256 18 | // x=6 : SHA-512 19 | } 20 | return "YIH14pBTDJvJ6"; // 'password' with the salt YI 21 | } 22 | -------------------------------------------------------------------------------- /Usermode/Libraries/libposix.so_src/utime.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Emulation Layer 3 | * - By John Hodge 4 | * 5 | * utime.h 6 | * - 7 | */ 8 | #include 9 | #include 10 | 11 | // === CODE === 12 | int utime(const char *filename, const struct utimbuf *times) 13 | { 14 | _SysDebug("TODO: libposix utime('%s', {%lli,%lli})", 15 | filename, times->actime, times->modtime 16 | ); 17 | return 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpsocket.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 - POSIX Sockets 2 | 3 | include ../Makefile.cfg 4 | 5 | CPPFLAGS += 6 | CFLAGS += -Wall 7 | LDFLAGS += -lc -soname libpsocket.so 8 | LIBS += -lnet 9 | 10 | OBJ = main.o getaddrinfo.o socket.o pton.o byteordering.o 11 | BIN = libpsocket.so 12 | 13 | include ../Makefile.tpl 14 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpsocket.so_src/common.h: -------------------------------------------------------------------------------- 1 | 2 | extern char *mkstr(const char *format, ...); 3 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpsocket.so_src/include_exp/netinet/ip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Sockets Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * netinet/ip.h 6 | * - ??? 7 | */ 8 | #ifndef _LIBPSOCKET__NETINET__IP_H_ 9 | #define _LIBPSOCKET__NETINET__IP_H_ 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpsocket.so_src/include_exp/netinet/tcp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Sockets Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * netinet/tcp.h 6 | * - TCP Options 7 | */ 8 | #ifndef _NETINET__TCP_H_ 9 | #define _NETINET__TCP_H_ 10 | 11 | 12 | /** 13 | * \brief Values for \a option_name in setsockopt/getsockopt 14 | */ 15 | enum eSockOpts_TCP 16 | { 17 | TCP_NODELAY 18 | }; 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpsocket.so_src/include_exp/sys/un.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Sockets Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * sys/un.h 6 | * - UNIX Domain Sockets 7 | */ 8 | #ifndef _LIBPSOCKET__SYS__UN_H_ 9 | #define _LIBPSOCKET__SYS__UN_H_ 10 | 11 | #define _SUN_PATH_MAX 108 12 | 13 | // POSIX Defined 14 | struct sockaddr_un 15 | { 16 | sa_family_t sun_family; 17 | char sun_path[_SUN_PATH_MAX]; 18 | }; 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpsocket.so_src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Sockets Library 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * main.c 6 | * - Entrypoint and misc code 7 | */ 8 | #include 9 | #include 10 | #include 11 | #include "common.h" 12 | 13 | int SoMain(void) 14 | { 15 | return 0; 16 | } 17 | 18 | char *mkstr(const char *format, ...) 19 | { 20 | va_list args; 21 | int len; 22 | char *ret; 23 | 24 | va_start(args, format); 25 | len = vsnprintf(NULL, 0, format, args); 26 | va_end(args); 27 | ret = malloc(len + 1); 28 | va_start(args, format); 29 | vsnprintf(ret, len+1, format, args); 30 | va_end(args); 31 | return ret; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpthread.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 - POSIX Threads 2 | 3 | include ../Makefile.cfg 4 | 5 | CPPFLAGS += 6 | CFLAGS += -Wall 7 | LDFLAGS += -lc -soname libpthread.so 8 | 9 | OBJ = main.o thread.o 10 | BIN = libpthread.so 11 | 12 | include ../Makefile.tpl 13 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpthread.so_src/include_exp/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 libpthread 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * sched.h 6 | * - Execution Scheduling (POSIX Realtime Extensions) 7 | */ 8 | #ifndef _LIBPTHREAT_SCHED_H_ 9 | #define _LIBPTHREAT_SCHED_H_ 10 | 11 | // *grumble* libgcc wants a yield 12 | extern int sched_yield(void); 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /Usermode/Libraries/libpthread.so_src/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thepowersgang/acess2/de2e8acad7ca6079d7b392a2e18932b5acf2e174/Usermode/Libraries/libpthread.so_src/main.c -------------------------------------------------------------------------------- /Usermode/Libraries/libreadline.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 - AxWin GUI Library 2 | # 3 | 4 | include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CFLAGS += -Wall 8 | LDFLAGS += -lc -soname libreadline.so 9 | 10 | OBJ = main.o 11 | BIN = libreadline.so 12 | 13 | include ../Makefile.tpl 14 | -------------------------------------------------------------------------------- /Usermode/Libraries/libreadline.so_src/rules.mk: -------------------------------------------------------------------------------- 1 | # libreadline 2 | include $(BASE)header.mk 3 | 4 | # Variables 5 | SRCS := main.c 6 | BIN := $(OUTPUTDIR)Libs/libreadline.so 7 | 8 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) 9 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) 10 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) -lc 11 | 12 | include $(BASE)body.mk 13 | 14 | $(BIN): $(OBJ) $(OUTPUTDIR)Libs/libc.so 15 | 16 | include $(BASE)footer.mk 17 | 18 | -------------------------------------------------------------------------------- /Usermode/Libraries/libresolv.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess2 BSD "resolv" library 2 | # Makefile 3 | 4 | -include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CFLAGS += -Wextra 8 | ASFLAGS += 9 | LDFLAGS += 10 | LIBS += -lnet -lpsocket 11 | 12 | OBJ = resolv.o 13 | BIN = libresolv.so 14 | 15 | include ../Makefile.tpl 16 | 17 | -------------------------------------------------------------------------------- /Usermode/Libraries/libresolv.so_src/include_exp/arpa/nameser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 POSIX Sockets Emulation 3 | * - By John Hodge (thePowersGang) 4 | * 5 | * arpa/nameser.h 6 | * - BSD name resolution (TODO: move to libresolv) 7 | * 8 | * NOTE: I have no fucking idea who/what defines this header, it's wanted by glib 9 | */ 10 | #ifndef _LIBPSOCKET__ARPA_NAMESER_H_ 11 | #define _LIBPSOCKET__ARPA_NAMESER_H_ 12 | 13 | #define C_IN 0x1 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /Usermode/Libraries/libunicode.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 "libunicode" 2 | # 3 | 4 | include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CFLAGS += -Wall 8 | LDFLAGS += -lc -soname libunicode.so 9 | 10 | OBJ = main.o utf-8.o 11 | BIN = libunicode.so 12 | 13 | include ../Makefile.tpl 14 | 15 | -------------------------------------------------------------------------------- /Usermode/Libraries/libunicode.so_src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Acess2 "libunicode" 3 | * - By John Hoge 4 | * 5 | * main.c 6 | * - Stub main 7 | */ 8 | 9 | int SoMain(void) 10 | { 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /Usermode/Libraries/liburi.so_src/Makefile: -------------------------------------------------------------------------------- 1 | # Acess 2 2 | # 3 | 4 | include ../Makefile.cfg 5 | 6 | CPPFLAGS += 7 | CFLAGS += -Wall 8 | LDFLAGS += -lc -soname liburi.so 9 | 10 | OBJ = main.o 11 | BIN = liburi.so 12 | 13 | include ../Makefile.tpl 14 | -------------------------------------------------------------------------------- /Usermode/Libraries/liburi.so_src/rules.mk: -------------------------------------------------------------------------------- 1 | # liburi 2 | include $(BASE)header.mk 3 | 4 | # Variables 5 | SRCS := main.c 6 | BIN := $(OUTPUTDIR)Libs/liburi.so 7 | 8 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) 9 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) 10 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) -lc 11 | 12 | include $(BASE)body.mk 13 | 14 | $(BIN): $(OBJ) $(OUTPUTDIR)Libs/libc.so 15 | 16 | include $(BASE)footer.mk 17 | 18 | -------------------------------------------------------------------------------- /Usermode/Makefile: -------------------------------------------------------------------------------- 1 | include $(dir $(lastword $(MAKEFILE_LIST)))rules.mk 2 | -------------------------------------------------------------------------------- /Usermode/Makefile.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Usermode Makefile.cfg 3 | # 4 | 5 | # Include Root Makefile.cfg 6 | -include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg 7 | 8 | # Set variables 9 | # > Usermode directory 10 | ACESSUSERDIR := $(ACESSDIR)/Usermode/ 11 | # > Output directory for build binaries 12 | OUTPUTDIR := $(ACESSUSERDIR)Output/$(ARCH)/ 13 | # > Distroot 14 | DISTROOT := $(DISTROOT)/$(ARCH) 15 | 16 | 17 | -------------------------------------------------------------------------------- /Usermode/body.mk: -------------------------------------------------------------------------------- 1 | 2 | OBJ := $(call fcn_src2obj,$(SRCS)) 3 | 4 | $(call fcn_addbin,$(BIN),$(OBJ)) 5 | 6 | # Rules 7 | .PHONY: all-$(DIR) clean-$(DIR) 8 | all-$(DIR): $(BIN) 9 | clean-$(DIR): clean-%: 10 | $(eval BIN=$(BIN-$*/)) 11 | $(eval OBJ=$(foreach f, $(BIN), $(OBJ-$f))) 12 | $(RM) $(BIN) $(OBJ) $(OBJ:%=%.dep) 13 | 14 | -------------------------------------------------------------------------------- /Usermode/footer.mk: -------------------------------------------------------------------------------- 1 | 2 | open-$(DIR): $(SRC-$(DIR)) 3 | close-$(DIR): $(SRC-$(DIR)) 4 | 5 | # Pop State 6 | DIR := $(DIR_$(x)) 7 | x := $(x:%.x=%) 8 | -------------------------------------------------------------------------------- /Usermode/header.mk: -------------------------------------------------------------------------------- 1 | # Push State 2 | x := $(x).x 3 | DIR_$(x) := $(DIR) 4 | DIR := $(dir $(lastword $(filter-out %/header.mk,$(MAKEFILE_LIST)))) 5 | PDIR := $(DIR_$(x)) 6 | EXTRA_DEP-$(DIR) := $(EXTRA_DEP-$(PDIR)) 7 | 8 | CFLAGS-$(DIR) := $(CFLAGS-$(PDIR)) 9 | CPPFLAGS-$(DIR) := $(CPPFLAGS-$(PDIR)) 10 | LDFLAGS-$(DIR) := $(LDFLAGS-$(PDIR)) 11 | --------------------------------------------------------------------------------