├── .gitignore ├── .gitmodules ├── CHANGELOG ├── LICENSE ├── README.sigma0 ├── README.vmm ├── TODO ├── alexb ├── apps │ ├── config_test │ │ ├── SConscript │ │ └── main.cc │ ├── event_test │ │ ├── SConscript │ │ └── main.cc │ ├── fs_test │ │ ├── SConscript │ │ └── main.cc │ ├── ip_test │ │ ├── README.txt │ │ ├── SConscript │ │ ├── iptest.sh │ │ └── main.cc │ ├── ipc_test │ │ ├── SConscript │ │ ├── ipctest.wv │ │ └── main.cc │ ├── libvirt │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── event-test.c │ │ ├── events.wv │ │ ├── libvirt-connect.wv │ │ ├── libvirt-start-stop.wv │ │ ├── libvirt-stat.wv │ │ ├── libvirt-test.xml │ │ ├── libvirt-xml.wv │ │ ├── libvirt.wv │ │ ├── libvirt.wv.inc │ │ └── nova.diff │ └── remoteconfig │ │ ├── SConscript │ │ ├── disk.cc │ │ ├── events.cc │ │ ├── events.h │ │ ├── main.cc │ │ ├── nova_types.h │ │ ├── readme.txt │ │ ├── server.cc │ │ ├── server.h │ │ ├── sha.cc │ │ ├── sha.h │ │ └── util.el ├── include │ ├── nul │ │ └── service_events.h │ └── util │ │ ├── capalloc.h │ │ └── capalloc_partition.h └── lib │ ├── lwip │ ├── SConscript │ ├── contrib │ │ ├── CHANGELOG │ │ ├── COPYING │ │ ├── CVS │ │ │ ├── Entries │ │ │ ├── Repository │ │ │ └── Root │ │ ├── FILES │ │ ├── README │ │ ├── UPGRADING │ │ ├── doc │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ ├── FILES │ │ │ ├── contrib.txt │ │ │ ├── rawapi.txt │ │ │ ├── savannah.txt │ │ │ ├── snmp_agent.txt │ │ │ └── sys_arch.txt │ │ ├── proj │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ ├── minimal │ │ │ │ └── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ ├── msvc6 │ │ │ │ ├── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ │ ├── lwip4 │ │ │ │ │ └── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ └── pktif │ │ │ │ │ └── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ ├── unixlib │ │ │ │ └── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ └── unixsim │ │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ │ └── apps │ │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ │ └── fs │ │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ │ └── img │ │ │ │ └── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ ├── src │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ ├── FILES │ │ │ ├── api │ │ │ │ ├── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ │ ├── api_lib.c │ │ │ │ ├── api_msg.c │ │ │ │ ├── err.c │ │ │ │ ├── netbuf.c │ │ │ │ ├── netdb.c │ │ │ │ ├── netifapi.c │ │ │ │ ├── sockets.c │ │ │ │ └── tcpip.c │ │ │ ├── arch │ │ │ │ ├── 6502 │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ └── include │ │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ │ └── arch │ │ │ │ │ │ └── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ ├── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ │ ├── c16x │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ ├── include │ │ │ │ │ │ ├── CVS │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ └── Root │ │ │ │ │ │ ├── arch │ │ │ │ │ │ │ └── CVS │ │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ │ └── Root │ │ │ │ │ │ └── netif │ │ │ │ │ │ │ └── CVS │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ └── Root │ │ │ │ │ └── netif │ │ │ │ │ │ └── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ ├── msvc6 │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ └── include │ │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ │ └── arch │ │ │ │ │ │ └── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ ├── rtxc │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ ├── include │ │ │ │ │ │ ├── CVS │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ └── Root │ │ │ │ │ │ ├── arch │ │ │ │ │ │ │ └── CVS │ │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ │ └── Root │ │ │ │ │ │ └── netif │ │ │ │ │ │ │ └── CVS │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ └── Root │ │ │ │ │ └── netif │ │ │ │ │ │ └── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ ├── unix │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ ├── include │ │ │ │ │ │ ├── CVS │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ └── Root │ │ │ │ │ │ ├── arch │ │ │ │ │ │ │ └── CVS │ │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ │ └── Root │ │ │ │ │ │ └── netif │ │ │ │ │ │ │ └── CVS │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ └── Root │ │ │ │ │ └── netif │ │ │ │ │ │ └── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ └── v2pro │ │ │ │ │ ├── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ │ │ ├── include │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ ├── arch │ │ │ │ │ │ └── CVS │ │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ │ └── Root │ │ │ │ │ └── netif │ │ │ │ │ │ └── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ └── netif │ │ │ │ │ └── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ ├── core │ │ │ │ ├── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ │ ├── def.c │ │ │ │ ├── dhcp.c │ │ │ │ ├── dns.c │ │ │ │ ├── inet_chksum.c │ │ │ │ ├── init.c │ │ │ │ ├── ipv4 │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ ├── autoip.c │ │ │ │ │ ├── icmp.c │ │ │ │ │ ├── igmp.c │ │ │ │ │ ├── ip4.c │ │ │ │ │ ├── ip4_addr.c │ │ │ │ │ └── ip_frag.c │ │ │ │ ├── ipv6 │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ ├── README │ │ │ │ │ ├── dhcp6.c │ │ │ │ │ ├── ethip6.c │ │ │ │ │ ├── icmp6.c │ │ │ │ │ ├── inet6.c │ │ │ │ │ ├── ip6.c │ │ │ │ │ ├── ip6_addr.c │ │ │ │ │ ├── ip6_frag.c │ │ │ │ │ ├── mld6.c │ │ │ │ │ └── nd6.c │ │ │ │ ├── mem.c │ │ │ │ ├── memp.c │ │ │ │ ├── netif.c │ │ │ │ ├── pbuf.c │ │ │ │ ├── raw.c │ │ │ │ ├── snmp │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ ├── asn1_dec.c │ │ │ │ │ ├── asn1_enc.c │ │ │ │ │ ├── mib2.c │ │ │ │ │ ├── mib_structs.c │ │ │ │ │ ├── msg_in.c │ │ │ │ │ └── msg_out.c │ │ │ │ ├── stats.c │ │ │ │ ├── sys.c │ │ │ │ ├── tcp.c │ │ │ │ ├── tcp_in.c │ │ │ │ ├── tcp_out.c │ │ │ │ ├── timers.c │ │ │ │ └── udp.c │ │ │ ├── include │ │ │ │ ├── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ │ ├── ipv4 │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ └── lwip │ │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ │ ├── autoip.h │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ ├── igmp.h │ │ │ │ │ │ ├── inet.h │ │ │ │ │ │ ├── ip4.h │ │ │ │ │ │ ├── ip4_addr.h │ │ │ │ │ │ └── ip_frag.h │ │ │ │ ├── ipv6 │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ └── lwip │ │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ │ ├── dhcp6.h │ │ │ │ │ │ ├── ethip6.h │ │ │ │ │ │ ├── icmp6.h │ │ │ │ │ │ ├── inet6.h │ │ │ │ │ │ ├── ip6.h │ │ │ │ │ │ ├── ip6_addr.h │ │ │ │ │ │ ├── ip6_frag.h │ │ │ │ │ │ ├── mld6.h │ │ │ │ │ │ └── nd6.h │ │ │ │ ├── lwip │ │ │ │ │ ├── CVS │ │ │ │ │ │ ├── Entries │ │ │ │ │ │ ├── Repository │ │ │ │ │ │ └── Root │ │ │ │ │ ├── api.h │ │ │ │ │ ├── api_msg.h │ │ │ │ │ ├── arch.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── def.h │ │ │ │ │ ├── dhcp.h │ │ │ │ │ ├── dns.h │ │ │ │ │ ├── err.h │ │ │ │ │ ├── inet_chksum.h │ │ │ │ │ ├── init.h │ │ │ │ │ ├── ip.h │ │ │ │ │ ├── ip_addr.h │ │ │ │ │ ├── mem.h │ │ │ │ │ ├── memp.h │ │ │ │ │ ├── memp_std.h │ │ │ │ │ ├── netbuf.h │ │ │ │ │ ├── netdb.h │ │ │ │ │ ├── netif.h │ │ │ │ │ ├── netifapi.h │ │ │ │ │ ├── opt.h │ │ │ │ │ ├── pbuf.h │ │ │ │ │ ├── raw.h │ │ │ │ │ ├── sio.h │ │ │ │ │ ├── snmp.h │ │ │ │ │ ├── snmp_asn1.h │ │ │ │ │ ├── snmp_msg.h │ │ │ │ │ ├── snmp_structs.h │ │ │ │ │ ├── sockets.h │ │ │ │ │ ├── stats.h │ │ │ │ │ ├── sys.h │ │ │ │ │ ├── tcp.h │ │ │ │ │ ├── tcp_impl.h │ │ │ │ │ ├── tcpip.h │ │ │ │ │ ├── timers.h │ │ │ │ │ └── udp.h │ │ │ │ └── netif │ │ │ │ │ ├── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ppp_oe.h │ │ │ │ │ └── slipif.h │ │ │ └── netif │ │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ │ ├── FILES │ │ │ │ ├── etharp.c │ │ │ │ ├── ethernetif.c │ │ │ │ ├── ppp │ │ │ │ ├── CVS │ │ │ │ │ ├── Entries │ │ │ │ │ ├── Repository │ │ │ │ │ └── Root │ │ │ │ ├── auth.c │ │ │ │ ├── auth.h │ │ │ │ ├── chap.c │ │ │ │ ├── chap.h │ │ │ │ ├── chpms.c │ │ │ │ ├── chpms.h │ │ │ │ ├── fsm.c │ │ │ │ ├── fsm.h │ │ │ │ ├── ipcp.c │ │ │ │ ├── ipcp.h │ │ │ │ ├── lcp.c │ │ │ │ ├── lcp.h │ │ │ │ ├── magic.c │ │ │ │ ├── magic.h │ │ │ │ ├── md5.c │ │ │ │ ├── md5.h │ │ │ │ ├── pap.c │ │ │ │ ├── pap.h │ │ │ │ ├── ppp.c │ │ │ │ ├── ppp.h │ │ │ │ ├── ppp_oe.c │ │ │ │ ├── pppdebug.h │ │ │ │ ├── randm.c │ │ │ │ ├── randm.h │ │ │ │ ├── vj.c │ │ │ │ └── vj.h │ │ │ │ └── slipif.c │ │ └── test │ │ │ ├── CVS │ │ │ ├── Entries │ │ │ ├── Repository │ │ │ └── Root │ │ │ └── unit │ │ │ ├── CVS │ │ │ ├── Entries │ │ │ ├── Repository │ │ │ └── Root │ │ │ ├── core │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ ├── test_mem.c │ │ │ └── test_mem.h │ │ │ ├── etharp │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ ├── test_etharp.c │ │ │ └── test_etharp.h │ │ │ ├── lwip_check.h │ │ │ ├── lwip_unittests.c │ │ │ ├── tcp │ │ │ ├── CVS │ │ │ │ ├── Entries │ │ │ │ ├── Repository │ │ │ │ └── Root │ │ │ ├── tcp_helper.c │ │ │ ├── tcp_helper.h │ │ │ ├── test_tcp.c │ │ │ ├── test_tcp.h │ │ │ ├── test_tcp_oos.c │ │ │ └── test_tcp_oos.h │ │ │ └── udp │ │ │ ├── CVS │ │ │ ├── Entries │ │ │ ├── Repository │ │ │ └── Root │ │ │ ├── test_udp.c │ │ │ └── test_udp.h │ └── own │ │ ├── include │ │ ├── arch │ │ │ ├── cc.h │ │ │ ├── perf.h │ │ │ └── sys_arch.h │ │ ├── lwipopts.h │ │ └── string.h │ │ └── sys.cc │ └── matrixssl │ ├── SConscript │ ├── contrib │ ├── core │ │ ├── POSIX │ │ │ └── osdep.c │ │ ├── WIN32 │ │ │ └── osdep.c │ │ ├── coreApi.h │ │ ├── coreConfig.h │ │ ├── corelib.c │ │ ├── list.h │ │ ├── osdep.h │ │ └── psmalloc.h │ ├── crypto │ │ ├── cryptoApi.h │ │ ├── cryptoConfig.h │ │ ├── cryptolib.h │ │ ├── digest │ │ │ ├── digest.h │ │ │ ├── hmac.c │ │ │ ├── md5.c │ │ │ └── sha1.c │ │ ├── keyformat │ │ │ ├── asn1.c │ │ │ ├── asn1.h │ │ │ ├── base64.c │ │ │ ├── x509.c │ │ │ └── x509.h │ │ ├── math │ │ │ ├── pstm.c │ │ │ └── pstm.h │ │ ├── prng │ │ │ ├── prng.c │ │ │ ├── prng.h │ │ │ └── yarrow.c │ │ ├── pubkey │ │ │ ├── pkcs.c │ │ │ ├── pubkey.c │ │ │ ├── pubkey.h │ │ │ └── rsa.c │ │ └── symmetric │ │ │ ├── aes.c │ │ │ ├── arc4.c │ │ │ ├── des3.c │ │ │ ├── rc2.c │ │ │ └── symmetric.h │ ├── doc │ │ ├── MatrixSSL_3-3-OpenReleaseNotes.pdf │ │ ├── MatrixSSL_API.pdf │ │ ├── MatrixSSL_DevelopersGuide.pdf │ │ ├── MatrixSSL_GettingStarted.pdf │ │ └── MatrixSSL_PortingGuide.pdf │ ├── matrixssl │ │ ├── cipherSuite.c │ │ ├── matrixssl.c │ │ ├── matrixsslApi.c │ │ ├── matrixsslApi.h │ │ ├── matrixsslConfig.h │ │ ├── matrixssllib.h │ │ ├── sslDecode.c │ │ ├── sslEncode.c │ │ ├── sslv3.c │ │ ├── test │ │ │ ├── Makefile │ │ │ ├── matrixTest.vcxproj │ │ │ ├── matrixsslTest.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ └── sslTest.c │ │ ├── tls.c │ │ └── version.h │ └── readme.txt │ └── own │ ├── include │ ├── stdio.h │ └── string.h │ └── sys.cc ├── base ├── SConscript ├── apps │ ├── admission │ │ ├── SConscript │ │ ├── main.cc │ │ └── top.h │ └── sigma0 │ │ ├── SConscript │ │ ├── cfg │ │ └── admission.nulconfig │ │ ├── linker.ld │ │ ├── parent_protocol.h │ │ ├── s0_admission.h │ │ ├── s0_modules.h │ │ ├── scripting.cc │ │ ├── service_config.cc │ │ ├── service_fs.cc │ │ ├── service_per_cpu_timer.cc │ │ ├── service_tracebuffer.cc │ │ └── sigma0.cc ├── host │ ├── SConscript │ ├── atare.cc │ ├── hostacpi.cc │ ├── hostahci.cc │ ├── hosthpet.cc │ ├── hostide.cc │ ├── hostio.cc │ ├── hostkeyboard.cc │ ├── hostne2k.cc │ ├── hostpcicfg.cc │ ├── hostpit.cc │ ├── hostreboot.cc │ ├── hostrtc.cc │ ├── hostserial.cc │ ├── hostserialpci.cc │ ├── hostvesa.cc │ ├── hostvga.cc │ ├── mmconfig.cc │ └── virtualdisk.cc ├── include │ ├── ctype.h │ ├── host │ │ ├── dma.h │ │ ├── hostgenericata.h │ │ ├── hostpci.h │ │ ├── hostvf.h │ │ ├── hpet.h │ │ ├── keyboard.h │ │ ├── rtc.h │ │ ├── screen.h │ │ ├── simplehwioin.h │ │ ├── simplehwioout.h │ │ └── vesa.h │ ├── nul │ │ ├── baseprogram.h │ │ ├── bus.h │ │ ├── capalloc.h │ │ ├── compiler.h │ │ ├── config.h │ │ ├── error.h │ │ ├── generic_service.h │ │ ├── message.h │ │ ├── motherboard.h │ │ ├── parent.h │ │ ├── program.h │ │ ├── region.h │ │ ├── service_admission.h │ │ ├── service_config.h │ │ ├── service_disk.h │ │ ├── service_fs.h │ │ ├── service_log.h │ │ ├── service_timer.h │ │ ├── templates.h │ │ ├── timer.h │ │ ├── topology.h │ │ ├── types.h │ │ └── vcpu.h │ ├── service │ │ ├── acpi.h │ │ ├── bcd.h │ │ ├── cmdline.h │ │ ├── cpu.h │ │ ├── elf.h │ │ ├── elf32.h │ │ ├── endian.h │ │ ├── helper.h │ │ ├── lifo.h │ │ ├── logging.h │ │ ├── math.h │ │ ├── params.h │ │ ├── profile.h │ │ ├── quicksort.h │ │ ├── string.h │ │ ├── time.h │ │ └── vprintf.h │ ├── sigma0 │ │ ├── console.h │ │ ├── consumer.h │ │ └── sigma0.h │ └── sys │ │ ├── desc.h │ │ ├── hip.h │ │ ├── semaphore.h │ │ ├── syscalls.h │ │ └── utcb.h ├── lib │ └── runtime │ │ ├── SConscript │ │ ├── capalloc.cc │ │ ├── cpp-support.cc │ │ ├── int_lib.h │ │ ├── moddi3.c │ │ ├── string.cc │ │ ├── udivdi3.c │ │ ├── udivmoddi4.c │ │ └── umoddi3.c ├── service │ ├── SConscript │ ├── help.cc │ ├── hostsink.cc │ ├── kbd2serial.cc │ ├── linker.ld │ ├── logging.cc │ ├── serial2kbd.cc │ ├── simplemalloc.cc │ ├── startup.S │ └── vprintf.cc └── tools │ ├── boot │ ├── README │ ├── SConscript │ ├── bender │ ├── munich │ │ ├── asm.S │ │ ├── asm.h │ │ ├── boot_linux.S │ │ ├── boot_linux.h │ │ ├── mbi.h │ │ ├── munich.c │ │ ├── munich.h │ │ ├── munich.ld │ │ ├── util.c │ │ ├── util.h │ │ └── version.h │ └── unzip │ ├── connector │ ├── SConscript │ ├── rawpacket.cc │ └── tap_connector.cc │ ├── iprelay │ ├── SConscript │ └── iprelayd.cc │ ├── network_bench │ ├── Makefile │ └── tcp_sender.c │ └── nul.py ├── ben ├── contrib │ └── ocaml │ │ ├── Makefile │ │ ├── SConscript │ │ └── ocaml-3.11.0.patch └── include │ └── ocaml.h ├── build ├── .gitignore └── SConstruct ├── demo ├── apps │ ├── cycleburner │ │ ├── SConscript │ │ ├── cycleburner.cc │ │ ├── intro-text.inc │ │ └── math.h │ ├── diskbench │ │ ├── SConscript │ │ ├── diskbench-old.cc │ │ └── diskbench.cc │ ├── gt │ │ ├── SConscript │ │ └── gt.cc │ ├── hello │ │ ├── SConscript │ │ └── hello.cc │ ├── rocknshine │ │ ├── README.org │ │ ├── SConscript │ │ ├── pdfprepare.py │ │ ├── presentation.pdf │ │ └── rocknshine.cc │ └── tutor │ │ ├── SConscript │ │ ├── screen.py │ │ ├── screen1.txt │ │ └── tutor.cc ├── example.conf │ ├── README │ ├── empty.nulconfig │ ├── menu.lst │ ├── vmm1.nulconfig │ └── vmm2.nulconfig └── lib │ └── tinf │ ├── SConscript │ ├── examples │ └── tgunzip │ │ ├── makefile.b32 │ │ ├── makefile.dj2 │ │ ├── makefile.dmc │ │ ├── makefile.elf │ │ ├── makefile.mgw │ │ ├── makefile.vc │ │ ├── makefile.wat │ │ └── tgunzip.c │ ├── include │ └── tinf.h │ ├── readme.txt │ └── src │ ├── adler32.c │ ├── crc32.c │ ├── makefile.b32 │ ├── makefile.dj2 │ ├── makefile.dmc │ ├── makefile.elf │ ├── makefile.mgw │ ├── makefile.vc │ ├── makefile.wat │ ├── nasm │ ├── crc32.nas │ ├── nasmlcm.inc │ └── tinfzlib.nas │ ├── readme.txt │ ├── tinf.h │ ├── tinfgzip.c │ ├── tinflate.c │ └── tinfzlib.c ├── julian ├── apps │ └── per-cpu-service │ │ ├── SConscript │ │ ├── client.h │ │ ├── closure.h │ │ ├── per-cpu-service.cc │ │ ├── per-cpu-service.nulconfig │ │ ├── per-cpu-service.wv │ │ ├── queue.h │ │ ├── service.h │ │ ├── vnetsw.cc │ │ └── vnetsw.nulconfig ├── boot │ ├── bridge │ └── nictest ├── host │ ├── host82573.cc │ ├── host82573_regs.h │ ├── host82576.cc │ ├── host82576vf.cc │ ├── jsdriver.cc │ ├── nubus-bus.cc │ ├── nubus-device.cc │ └── nubus.cc ├── include │ ├── cstdint │ ├── host │ │ ├── host82576.h │ │ ├── jsdriver.h │ │ └── nubus.h │ ├── nul │ │ └── net.h │ ├── service │ │ ├── hexdump.h │ │ └── net.h │ └── stdlib.h ├── lib │ └── dlmalloc │ │ ├── SConscript │ │ ├── dlmalloc-config.h │ │ ├── dlmalloc-support.cc │ │ └── dlmalloc.c └── model │ ├── 82576vf.cc │ ├── 82576vf.h │ ├── 82576vf │ ├── 82576vf-rw.log │ ├── SConscript │ ├── genreg.py │ ├── genreg2.py │ ├── reg_mmio.py │ ├── reg_pci.py │ └── rw-log.lisp │ └── utils.h ├── kernel └── contrib │ ├── Chanage-serial-console-to-work-with-mmio-based-card-.patch │ ├── Maintain-memory-usage-statistics-and-print-them-on-p.patch │ ├── NOVA_REVISION │ ├── NOVA_URL │ ├── SConscript │ ├── checkout-nova.sh │ └── nova-patches │ ├── .keep.me │ ├── config.patch │ └── sc-ec-cpu-check.patch ├── michal ├── apps │ ├── echo │ │ ├── SConscript │ │ ├── echo.cc │ │ ├── echo2.cc │ │ ├── echo2ss.cc │ │ ├── echo2ssnoxlate.wv │ │ ├── echo2sstest.wv │ │ ├── echo2test.cc │ │ ├── echo2test.wv │ │ ├── echotest.cc │ │ ├── echotest.wv │ │ ├── parentperf.cc │ │ ├── parentperf.wv │ │ ├── parentperfsmp.wv │ │ ├── service_echo.h │ │ └── service_echo_noxlate.h │ ├── logdisk │ │ ├── SConscript │ │ ├── check.cc │ │ ├── crc32.cc │ │ ├── gpt │ │ ├── gpt.wv │ │ ├── logdisk.cc │ │ ├── lvm │ │ ├── lvm.cc │ │ ├── part │ │ └── part.wv │ └── tests │ │ ├── SConscript │ │ ├── ping.cc │ │ ├── pingpong.cc │ │ ├── pingpong.wv │ │ ├── pong.cc │ │ ├── startstop.cc │ │ ├── startstop.wv │ │ ├── timer.cc │ │ ├── timer.wv │ │ ├── utcb_bounds.cc │ │ └── utcb_bounds.wv ├── boot │ ├── SConscript │ ├── democd │ ├── democd.broken-keyboard │ ├── diskbench │ ├── diskbench-ramdisk-old.wv │ ├── diskbench-ramdisk.wv │ ├── diskbench-vm.wv │ ├── donor-vm │ │ ├── bin │ │ │ └── tap_connector │ │ ├── donor-vm │ │ └── etc │ │ │ └── rc.d │ │ │ ├── rc.bridge │ │ │ ├── rc.local │ │ │ └── rc.tapconn │ ├── gdisk │ ├── hello │ ├── kernelbuild-bare-metal.wv │ ├── local-hdd │ ├── netperf │ │ ├── etc │ │ │ └── init.d │ │ │ │ └── S99netperf │ │ └── vancouver-netperf.wv │ ├── nova-demo │ ├── novaboot │ ├── passive │ │ ├── Makefile │ │ ├── deploy │ │ ├── nova │ │ ├── nova-82573 │ │ ├── nova-82576 │ │ ├── nova-82576-static-ip │ │ ├── nova-qemu │ │ ├── nova-vmware │ │ ├── peig-vm │ │ └── vmware │ │ │ ├── NOVA.vmdk │ │ │ └── NOVA.vmx │ ├── pxegrub.pxe │ ├── sigma0-help │ ├── stage2_eltorito │ ├── vancouver │ ├── vancouver-basicperf.wv │ ├── vancouver-boot-from-disk.wv │ ├── vancouver-boottime.wv │ ├── vancouver-disk │ ├── vancouver-dpci │ ├── vancouver-dpci.wv │ ├── vancouver-kbuild-vdisk.wv │ ├── vancouver-kernelbuild-ept-no-vpid.wv │ ├── vancouver-kernelbuild-vtlb-no-vpid.wv │ ├── vancouver-kernelbuild-vtlb-vpid.wv │ ├── vancouver-kernelbuild.wv │ ├── vancouver-linux-basic.wv │ └── vancouver-linux-boot-time.wv ├── doc │ ├── .gitignore │ ├── Doxyfile.tmpl │ ├── SConscript │ ├── nova.png │ ├── nul.org │ └── org-e-doxygen.el ├── imgs ├── include │ ├── nul │ │ ├── disk_helper.h │ │ ├── sservice.h │ │ ├── sserviceprogram.h │ │ ├── timer_helper.h │ │ └── uuid.h │ ├── wvprogram.h │ └── wvtest.h ├── service │ └── service_disk.cc └── wvtest │ ├── .gitignore │ ├── README.first │ ├── README.nul │ ├── SConscript │ ├── for-each-commit │ ├── js │ ├── adapters │ │ ├── mootools-adapter.js │ │ ├── mootools-adapter.src.js │ │ ├── prototype-adapter.js │ │ └── prototype-adapter.src.js │ ├── highstock.js │ ├── highstock.src.js │ ├── modules │ │ ├── exporting.js │ │ └── exporting.src.js │ └── themes │ │ ├── dark-blue.js │ │ ├── dark-green.js │ │ ├── gray.js │ │ ├── grid.js │ │ └── skies.js │ ├── listtests │ ├── loc.wv │ ├── nul-nightly-cron.sh │ ├── nul-nightly.sh │ ├── passive-test │ ├── passive-test-cron │ ├── runall │ ├── sizes.wv │ ├── wvformat │ ├── wvnulrun │ ├── wvperf2html.py │ ├── wvperfpreprocess.py │ ├── wvprogram.h │ ├── wvtest.fail │ ├── wvtest.h │ ├── wvtest.sh │ ├── wvtest2html.py │ ├── wvtestrun │ ├── wvtesttest.cc │ ├── wvtesttest.wv │ └── wvwrap ├── nils └── boot │ ├── bochs.cfg │ ├── cycleburner │ ├── dsl │ ├── escape │ ├── escapehd │ ├── escapehw │ ├── linux │ └── test └── vancouver ├── README ├── apps └── vancouver │ ├── SConscript │ └── vancouver.cc ├── executor ├── SConscript ├── build_instructions.py ├── halifax.cc ├── instcache.h ├── insthelper.h ├── instructions.h ├── instructions.inc ├── memcache.h ├── memtlb.h ├── vbios_disk.cc ├── vbios_keyboard.cc ├── vbios_mem.cc ├── vbios_multiboot.cc ├── vbios_reset.cc └── vbios_time.cc ├── include ├── executor │ ├── bios.h │ └── cpustate.h └── model │ ├── pci.h │ ├── reg.h │ ├── sata.h │ └── simplemem.h └── model ├── SConscript ├── ahcicontroller.cc ├── directio.cc ├── directmem.cc ├── ioapic.cc ├── irqrouting.cc ├── keyboardcontroller.cc ├── lapic.cc ├── memorycontroller.cc ├── msi.cc ├── nullio.cc ├── nullmem.cc ├── pcidirect.cc ├── pcihostbridge.cc ├── pic8259.cc ├── pit8254.cc ├── pmtimer.cc ├── ps2keyboard.cc ├── ps2mouse.cc ├── rtc146818.cc ├── rtl8029.cc ├── satadrive.cc ├── serial16550.cc ├── sysctrlport.cc ├── vbios.cc ├── vcpu.cc └── vga.cc /.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | .scons* 3 | *.[oa] 4 | *~ 5 | *.pyc 6 | build 7 | !build/SConstruct 8 | !build/imgs 9 | TAGS 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "build/imgs"] 2 | path = build/imgs 3 | url = http://os.inf.tu-dresden.de/~jsteckli/git/nul-test-imgs.git 4 | ignore = untracked 5 | [submodule "alexb/apps/libvirt/libvirt-repo"] 6 | path = alexb/apps/libvirt/libvirt-repo 7 | url = http://os.inf.tu-dresden.de/~jsteckli/git/libvirt.git 8 | ignore = untracked 9 | [submodule "michal/doc/org-mode"] 10 | path = michal/doc/org-mode 11 | url = git://orgmode.org/org-mode.git 12 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | 2 | * Changes since 2010.7 3 | - bug fixes and cleanup 4 | 5 | * Changes since the XMas Alpha: 6 | 7 | - added support for one-shot timers (HPET) 8 | - MSI and MSI-X support 9 | - direct assignment of PCI devices to VMs 10 | - IRQ routing discovery 11 | - APIC, IO-APIC, and MSI/MSI-X support in VMs 12 | - SMP support 13 | - experimental SMP VM support 14 | - Intel 82576VF network card model 15 | - RTL8029 network card model 16 | - Intel 82576 host driver 17 | - VESA VBE 2.0 support 18 | 19 | ... and of course lots of bug fixes. 20 | -------------------------------------------------------------------------------- /alexb/apps/config_test/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'test_config', 8 | SOURCES = [ 'main.cc' ], 9 | INCLUDE = [ 'sigma0' ], 10 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 11 | MEMSIZE = 1<<20) 12 | 13 | # EOF 14 | -------------------------------------------------------------------------------- /alexb/apps/event_test/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'test_events', 8 | SOURCES = [ 'main.cc' ], 9 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 10 | MEMSIZE = 1<<20) 11 | 12 | # EOF 13 | -------------------------------------------------------------------------------- /alexb/apps/fs_test/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'dummy_fs', 8 | SOURCES = [ 'main.cc' ], 9 | INCLUDE = [ 'sigma0' ], 10 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 11 | MEMSIZE = 1<<20) 12 | 13 | # EOF 14 | -------------------------------------------------------------------------------- /alexb/apps/ip_test/README.txt: -------------------------------------------------------------------------------- 1 | The program tests the basic functionality of sending/receiving data to/by the 2 | IP stack. The test opens a TCP port and a UDP port and waits for incoming data. 3 | Whenever data is received the number of received bytes are printed. 4 | Additionally the test opens a connection to itself via the TCP port and tries 5 | to send data. 6 | 7 | The wv script can be used to start the test in Qemu. 8 | 9 | You may send data to the test issuing following commands on your host machine: 10 | 11 | - nc -q 1 127.0.0.1 7777 /dev/null" 14 | done 15 | 16 | finish 17 | -------------------------------------------------------------------------------- /alexb/apps/libvirt/libvirt-start-stop.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . $(dirname $0)/libvirt.wv.inc\ 4 | 5 | WVSTART Start and stop two VMs multiple times using libvirt 6 | 7 | echo "wvtest: expect 403 tests" 8 | 9 | init 10 | 11 | for i in $(seq 100); do 12 | echo Attempt $i 13 | WVPASS virsh -c nova+tls://$NOVA_IP:9999 'start linux; start linux' 14 | WVPASS "virsh -c nova+tls://$NOVA_IP:9999 list --all | tee log" 15 | WVPASS test "$(grep "linux.*running" log|wc -l)" -eq 2 16 | WVPASS virsh -c nova+tls://$NOVA_IP:9999 'destroy 5; destroy 6' 17 | done 18 | 19 | finish 20 | -------------------------------------------------------------------------------- /alexb/apps/libvirt/libvirt-test.xml: -------------------------------------------------------------------------------- 1 | 2 | xml 3 | 128000 4 | 128000 5 | 6 | hvm 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /alexb/apps/libvirt/libvirt-xml.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . $(dirname $0)/libvirt.wv.inc\ 4 | 5 | WVSTART Start of a VM via xml file 6 | 7 | init 8 | WVPASS "virsh -c nova+tls://$NOVA_IP:9999 create <(sed -e \"s/\/bin\/cat/${nulroot//\//\\\/}\/build\/imgs\/bootable-hdd.img/\" $(dirname $0)/libvirt-test.xml)" 9 | WVPASS "virsh -c nova+tls://$NOVA_IP:9999 dumpxml 5" 10 | WVPASS "virsh -c nova+tls://$NOVA_IP:9999 list --all | tee log" 11 | WVPASS test "$(grep "xml.*running" log|wc -l)" -eq 1 12 | WVPASS virsh -c nova+tls://$NOVA_IP:9999 'destroy 5' 13 | 14 | finish 15 | -------------------------------------------------------------------------------- /alexb/apps/libvirt/libvirt.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . $(dirname $0)/libvirt.wv.inc\ 4 | 5 | WVSTART libvirt basic functionality 6 | 7 | init 8 | 9 | # Tests for libvirt commands 10 | WVPASS "virsh -c nova+tls://$NOVA_IP:9999 nodeinfo | tee log" 11 | WVPASS grep "CPU model:" log 12 | 13 | WVPASS "virsh -c nova+tls://$NOVA_IP:9999 list --all | tee log" 14 | WVPASS grep "linux.*no state" log 15 | 16 | # Start and destroy single VM 17 | WVPASS virsh -c nova+tls://$NOVA_IP:9999 start linux 18 | WVPASS "virsh -c nova+tls://$NOVA_IP:9999 list | tee log" 19 | WVPASS grep "linux.*running" log 20 | WVPASS grep "linux.*running" log 21 | WVPASS virsh -c nova+tls://$NOVA_IP:9999 destroy 5 22 | 23 | # Start two VMs simulataneously 24 | WVPASS virsh -c nova+tls://$NOVA_IP:9999 'start linux; start linux' 25 | WVPASS "virsh -c nova+tls://$NOVA_IP:9999 list --all | tee log" 26 | WVPASS test "$(grep "linux.*running" log|wc -l)" -eq 2 27 | WVPASS virsh -c nova+tls://$NOVA_IP:9999 'destroy 5; destroy 6' 28 | 29 | finish 30 | -------------------------------------------------------------------------------- /alexb/apps/remoteconfig/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'remote_config', 8 | SOURCES = [ 'main.cc', 'server.cc', 'events.cc', 'disk.cc', 'sha.cc' ], 9 | INCLUDE = [ 'sigma0' ], 10 | OBJS = [ '#service/simplemalloc.o', 11 | '#service/logging.o', '#service/vprintf.o'], 12 | LIBS = [ 'dlmalloc', 'ip_lwip', 'ssl_matrix', 'runtime' ], 13 | MEMSIZE = 2<<20) 14 | 15 | # EOF 16 | -------------------------------------------------------------------------------- /alexb/apps/remoteconfig/nova_types.h: -------------------------------------------------------------------------------- 1 | enum LIBVIRT_NOVA_OPCODE { 2 | NOVA_OP_FAILED = 0x8, 3 | NOVA_OP_SUCCEEDED = 0x9, 4 | NOVA_OP_FAILED_OUT_OF_MEMORY = 0xa, 5 | NOVA_PACKET_LEN = 0x40, 6 | NOVA_NUM_OF_ACTIVE_DOMAINS = 0x20, 7 | NOVA_NUM_OF_DEFINED_DOMAINS, 8 | NOVA_LIST_ACTIVE_DOMAINS, 9 | NOVA_LIST_DEFINED_DOMAINS, 10 | NOVA_GET_NAME_ID, 11 | NOVA_GET_NAME_UUID, 12 | NOVA_GET_NAME, 13 | NOVA_GET_VM_INFO, 14 | NOVA_VM_START, 15 | NOVA_VM_PAUSE, 16 | NOVA_VM_RESUME, 17 | NOVA_VM_DESTROY, 18 | NOVA_UNSUPPORTED_VERSION, 19 | NOVA_ENABLE_EVENT, 20 | NOVA_DISABLE_EVENT, 21 | NOVA_EVENT, 22 | NOVA_HW_INFO, 23 | NOVA_AUTH, 24 | NOVA_ATOMIC_RULE, 25 | NOVA_GET_DISK_INFO, 26 | NOVA_GET_NET_INFO, 27 | EVENT_REBOOT = 0xbbbb, 28 | EVENT_UNSERVED_IOACCESS = 0xbbc0, 29 | EVENT_DMAR_ACCESS = 0xbbd0, 30 | EVENT_VDEV_HONEYPOT = 0xbbd1, 31 | }; 32 | // Elisp function to update op2string() server.cc: (update-nul-libvirt-server-cc) 33 | 34 | struct incoming_packet { 35 | uint16_t version; 36 | uint16_t opcode; 37 | unsigned char opspecific; 38 | } __attribute__((packed)); 39 | 40 | struct outgoing_packet { 41 | uint16_t version; 42 | uint16_t opcode; 43 | uint8_t result; 44 | unsigned char opspecific; 45 | } __attribute__((packed)); 46 | -------------------------------------------------------------------------------- /alexb/apps/remoteconfig/sha.h: -------------------------------------------------------------------------------- 1 | /* 2 | * \brief header of sha.c 3 | * \date 2006-03-28 4 | * \author Bernhard Kauer 5 | */ 6 | /* 7 | * Copyright (C) 2006 Bernhard Kauer 8 | * Technische Universitaet Dresden, Operating Systems Research Group 9 | * 10 | * This file is part of the OSLO package, which is distributed under 11 | * the terms of the GNU General Public Licence 2. Please see the 12 | * COPYING file for details. 13 | */ 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | class Sha1 { 21 | public: 22 | 23 | struct Context 24 | { 25 | unsigned int index; 26 | unsigned long blocks; 27 | unsigned char buffer[64+4]; 28 | unsigned char hash[20]; 29 | }; 30 | 31 | static void init(struct Context *ctx); 32 | static void hash(struct Context *ctx, unsigned char* value, unsigned count); 33 | static void finish(struct Context *ctx); 34 | 35 | private: 36 | static inline unsigned int get_w(unsigned char * value, unsigned int round); 37 | static inline void process_block(struct Context *ctx); 38 | 39 | static inline void ERROR(int result, bool value, const char * msg) { 40 | if (value) { 41 | Logging::panic("[sha1] - %d %s\n", result, msg); 42 | } 43 | } 44 | }; 45 | -------------------------------------------------------------------------------- /alexb/apps/remoteconfig/util.el: -------------------------------------------------------------------------------- 1 | (defun update-nul-libvirt-server-cc () 2 | "When called from nova-types.h it updates array of strings 3 | strings in server.cc to match the list defined errors" 4 | (save-excursion 5 | (beginning-of-buffer) 6 | (let* ((beg (progn 7 | (re-search-forward "^enum LIBVIRT_NOVA_OPCODE \{") 8 | (beginning-of-line 2) 9 | (point))) 10 | (end (progn 11 | (search-forward "}") 12 | (beginning-of-line) 13 | (point)))) 14 | (let ((opcodes)) 15 | (save-restriction 16 | (narrow-to-region beg end) 17 | (goto-char (point-min)) 18 | (while (re-search-forward "^[[:space:]]*[^[:space]]*" nil t) 19 | (prin1 opcodes) 20 | (push (current-word) opcodes))) 21 | (setq opcodes (reverse opcodes)) 22 | (save-current-buffer 23 | (set-buffer (find-file-noselect "server.cc")) 24 | (beginning-of-buffer) 25 | (search-forward "const char *op2string(unsigned op)") 26 | (search-forward "switch (op) {") 27 | (kill-region (point) (save-excursion (search-forward "}") (backward-char) (point))) 28 | (insert "\n") 29 | (dolist (op opcodes) 30 | (insert (concat "case " op ": return \"" op "\";")) 31 | (indent-according-to-mode) 32 | (insert "\n") 33 | (indent-according-to-mode))))) 34 | ;; (message "server.cc updated") 35 | )) 36 | -------------------------------------------------------------------------------- /alexb/include/nul/service_events.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Client part of the event protocol. 3 | * 4 | * Copyright (C) 2011, Alexander Boettcher 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of NUL (NOVA user land). 8 | * 9 | * NUL is free software: you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License version 11 | * 2 as published by the Free Software Foundation. 12 | * 13 | * NUL is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | #pragma once 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | /** 25 | */ 26 | struct EventsProtocol : public GenericProtocol { 27 | 28 | enum { 29 | TYPE_GET_EVENTS_INFO = ParentProtocol::TYPE_GENERIC_END, 30 | }; 31 | enum { 32 | EVENT_REBOOT = 0xbbbb, 33 | EVENT_UNSERVED_IOACCESS = 0xbbc0, 34 | }; 35 | 36 | unsigned send_event(Utcb &utcb, unsigned id, unsigned data_len = 0, const void * data = 0) { 37 | return call_server(init_frame(utcb, TYPE_GET_EVENTS_INFO) << id << data_len 38 | << Utcb::String(reinterpret_cast(data), data_len), true); 39 | } 40 | 41 | EventsProtocol(unsigned cap_base, unsigned instance=0) : GenericProtocol("events", instance, cap_base, true) {} 42 | }; 43 | 44 | // EOF 45 | -------------------------------------------------------------------------------- /alexb/lib/lwip/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | Import('target_env') 5 | 6 | target_env.Append(CPPPATH = ['contrib/src/include', 'contrib/src/include/ipv4', 'contrib/src/include/ipv6', 7 | 'own/include', '../../../vancouver/include']); 8 | 9 | nul.Lib(target_env, 'ip_lwip', 10 | SOURCES = [Glob('contrib/src/core/*.c'), 11 | Glob('contrib/src/core/ipv4/*.c'), 12 | Glob('contrib/src/api/*.c'), 13 | Glob('contrib/src/api/ipv4/*.c'), 14 | Glob('contrib/src/netif/*.c'), 15 | 'own/sys.cc']) 16 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/CHANGELOG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/alexb/lib/lwip/contrib/CHANGELOG -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/doc//// 2 | D/proj//// 3 | D/src//// 4 | D/test//// 5 | /CHANGELOG/1.613/Thu Feb 23 08:46:55 2012// 6 | /COPYING/1.4/Fri Jan 20 10:38:03 2012// 7 | /FILES/1.7/Fri Jan 20 10:38:03 2012// 8 | /README/1.14/Fri Jan 20 10:38:03 2012// 9 | /UPGRADING/1.8/Fri Jan 20 10:38:03 2012// 10 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/FILES: -------------------------------------------------------------------------------- 1 | src/ - The source code for the lwIP TCP/IP stack. 2 | doc/ - The documentation for lwIP. 3 | 4 | See also the FILES file in each subdirectory. 5 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/doc/CVS/Entries: -------------------------------------------------------------------------------- 1 | /FILES/1.3/Fri Jan 20 10:38:03 2012/-kk/ 2 | /contrib.txt/1.11/Fri Jan 20 10:38:03 2012// 3 | /rawapi.txt/1.20/Thu Feb 23 08:46:55 2012// 4 | /savannah.txt/1.9/Fri Jan 20 10:38:03 2012// 5 | /snmp_agent.txt/1.8/Fri Jan 20 10:38:03 2012// 6 | /sys_arch.txt/1.22/Thu Feb 23 08:46:55 2012// 7 | D 8 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/doc/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/doc 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/doc/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/doc/FILES: -------------------------------------------------------------------------------- 1 | savannah.txt - How to obtain the current development source code. 2 | contrib.txt - How to contribute to lwIP as a developer. 3 | rawapi.txt - The documentation for the core API of lwIP. 4 | Also provides an overview about the other APIs and multithreading. 5 | snmp_agent.txt - The documentation for the lwIP SNMP agent. 6 | sys_arch.txt - The documentation for a system abstraction layer of lwIP. 7 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/minimal//// 2 | D/msvc6//// 3 | D/unixlib//// 4 | D/unixsim//// 5 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/minimal/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/minimal/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/minimal 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/minimal/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/lwip4//// 2 | D/pktif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/msvc6 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/lwip4/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/lwip4/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/msvc6/lwip4 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/lwip4/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/pktif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/pktif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/msvc6/pktif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/msvc6/pktif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixlib/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixlib/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/unixlib 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixlib/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/apps//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/unixsim 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/fs//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/unixsim/apps 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/fs/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/img//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/fs/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/unixsim/apps/fs 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/fs/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/fs/img/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/fs/img/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/proj/unixsim/apps/fs/img 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/proj/unixsim/apps/fs/img/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/api//// 2 | D/arch//// 3 | D/core//// 4 | D/include//// 5 | D/netif//// 6 | /FILES/1.4/Fri Jan 20 10:38:03 2012// 7 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | core/ - The core of the TPC/IP stack; protocol implementations, 5 | memory and buffer management, and the low-level raw API. 6 | 7 | include/ - lwIP include files. 8 | 9 | netif/ - Generic network interface device drivers are kept here, 10 | as well as the ARP module. 11 | 12 | For more information on the various subdirectories, check the FILES 13 | file in each directory. 14 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/api/CVS/Entries: -------------------------------------------------------------------------------- 1 | /api_lib.c/1.120/Thu Feb 23 08:46:55 2012// 2 | /api_msg.c/1.159/Thu Feb 23 08:46:55 2012// 3 | /err.c/1.15/Thu Feb 23 08:46:55 2012// 4 | /netbuf.c/1.9/Thu Feb 23 08:46:55 2012// 5 | /netdb.c/1.18/Fri Jan 20 10:38:03 2012// 6 | /netifapi.c/1.12/Fri Jan 20 10:38:03 2012// 7 | /sockets.c/1.193/Thu Feb 23 08:46:55 2012// 8 | /tcpip.c/1.91/Thu Feb 23 08:46:55 2012// 9 | D 10 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/api/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/api 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/api/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/include//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/6502 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/include/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/arch//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/include/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/6502/include 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/include/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/include/arch/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/include/arch/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/6502/include/arch 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/6502/include/arch/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/6502//// 2 | D/c16x//// 3 | D/msvc6//// 4 | D/rtxc//// 5 | D/unix//// 6 | D/v2pro//// 7 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/include//// 2 | D/netif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/c16x 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/arch//// 2 | D/netif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/c16x/include 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/arch/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/arch/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/c16x/include/arch 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/arch/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/c16x/include/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/include/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/c16x/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/c16x/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/include//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/msvc6 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/include/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/arch//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/include/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/msvc6/include 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/include/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/include/arch/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/include/arch/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/msvc6/include/arch 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/msvc6/include/arch/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/include//// 2 | D/netif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/rtxc 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/arch//// 2 | D/netif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/rtxc/include 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/arch/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/arch/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/rtxc/include/arch 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/arch/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/rtxc/include/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/include/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/rtxc/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/rtxc/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/include//// 2 | D/netif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/unix 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/arch//// 2 | D/netif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/unix/include 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/arch/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/arch/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/unix/include/arch 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/arch/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/unix/include/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/include/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/unix/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/unix/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/include//// 2 | D/netif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/v2pro 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/arch//// 2 | D/netif//// 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/v2pro/include 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/arch/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/arch/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/v2pro/include/arch 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/arch/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/v2pro/include/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/include/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/arch/v2pro/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/arch/v2pro/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/ipv4//// 2 | D/ipv6//// 3 | D/snmp//// 4 | /def.c/1.2/Fri Jan 20 10:38:03 2012// 5 | /dhcp.c/1.136/Thu Feb 23 08:46:55 2012// 6 | /dns.c/1.47/Fri Jan 20 10:38:03 2012// 7 | /inet_chksum.c/1.3/Mon Jul 4 19:10:49 2011// 8 | /init.c/1.59/Thu Feb 23 08:46:55 2012// 9 | /mem.c/1.78/Result of merge// 10 | /memp.c/1.70/Thu Feb 23 08:46:55 2012// 11 | /netif.c/1.93/Thu Feb 23 08:46:55 2012// 12 | /pbuf.c/1.146/Thu Feb 23 08:46:55 2012// 13 | /raw.c/1.34/Thu Feb 23 08:46:55 2012// 14 | /stats.c/1.34/Thu Feb 23 08:46:55 2012// 15 | /sys.c/1.36/Fri Jan 20 10:38:03 2012// 16 | /tcp.c/1.149/Result of merge// 17 | /tcp_in.c/1.150/Result of merge// 18 | /tcp_out.c/1.121/Thu Feb 23 08:46:55 2012// 19 | /timers.c/1.19/Thu Feb 23 08:46:55 2012// 20 | /udp.c/1.136/Result of merge+Thu Feb 23 08:46:55 2012// 21 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/core 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/ipv4/CVS/Entries: -------------------------------------------------------------------------------- 1 | /autoip.c/1.34/Thu Feb 23 08:46:55 2012// 2 | /icmp.c/1.55/Result of merge// 3 | /igmp.c/1.46/Thu Feb 23 08:46:55 2012// 4 | /ip4.c/1.4/Wed Feb 8 23:06:39 2012// 5 | /ip4_addr.c/1.1/Wed May 25 17:16:37 2011// 6 | /ip_frag.c/1.58/Fri Jan 20 10:38:03 2012// 7 | D 8 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/ipv4/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/core/ipv4 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/ipv4/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/ipv6/CVS/Entries: -------------------------------------------------------------------------------- 1 | /README/1.1.1.1/Fri Jan 20 10:38:03 2012// 2 | /dhcp6.c/1.1/Tue May 17 19:54:40 2011// 3 | /ethip6.c/1.2/Wed May 25 17:16:35 2011// 4 | /icmp6.c/1.22/Thu Feb 23 08:46:55 2012// 5 | /inet6.c/1.2/Thu Feb 23 08:46:55 2012// 6 | /ip6.c/1.25/Thu Feb 23 08:46:55 2012// 7 | /ip6_addr.c/1.13/Thu Feb 23 08:46:55 2012// 8 | /ip6_frag.c/1.2/Fri Jun 17 11:03:15 2011// 9 | /mld6.c/1.2/Wed May 25 17:16:35 2011// 10 | /nd6.c/1.4/Fri Jun 17 11:05:38 2011// 11 | D 12 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/ipv6/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/core/ipv6 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/ipv6/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/ipv6/README: -------------------------------------------------------------------------------- 1 | IPv6 support in lwIP is very experimental. 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/snmp/CVS/Entries: -------------------------------------------------------------------------------- 1 | /asn1_dec.c/1.11/Fri Jan 20 10:38:03 2012// 2 | /asn1_enc.c/1.13/Fri Jan 20 10:38:03 2012// 3 | /mib2.c/1.43/Thu Feb 23 08:46:55 2012// 4 | /mib_structs.c/1.28/Fri Jan 20 10:38:03 2012// 5 | /msg_in.c/1.42/Fri Jan 20 10:38:03 2012// 6 | /msg_out.c/1.20/Fri Jan 20 10:38:03 2012// 7 | D 8 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/snmp/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/core/snmp 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/core/snmp/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/ipv4//// 2 | D/ipv6//// 3 | D/lwip//// 4 | D/netif//// 5 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/include 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv4/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/lwip//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv4/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/include/ipv4 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv4/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv4/lwip/CVS/Entries: -------------------------------------------------------------------------------- 1 | /autoip.h/1.10/Thu Feb 23 08:46:55 2012// 2 | /icmp.h/1.18/Thu Feb 23 08:46:55 2012// 3 | /igmp.h/1.22/Fri Jan 20 10:38:03 2012// 4 | /inet.h/1.26/Fri Jan 20 10:38:03 2012// 5 | /ip4.h/1.2/Thu May 26 15:46:44 2011// 6 | /ip4_addr.h/1.1/Wed May 25 17:16:36 2011// 7 | /ip_frag.h/1.17/Thu Feb 23 08:46:55 2012// 8 | D 9 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv4/lwip/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/include/ipv4/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv4/lwip/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv6/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/lwip//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv6/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/include/ipv6 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv6/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv6/lwip/CVS/Entries: -------------------------------------------------------------------------------- 1 | /dhcp6.h/1.2/Fri Jun 17 11:03:15 2011// 2 | /ethip6.h/1.1/Tue May 17 19:54:40 2011// 3 | /icmp6.h/1.1/Tue May 17 19:54:41 2011// 4 | /inet6.h/1.1/Tue May 17 19:54:41 2011// 5 | /ip6.h/1.3/Thu May 26 15:46:44 2011// 6 | /ip6_addr.h/1.2/Wed May 25 17:16:36 2011// 7 | /ip6_frag.h/1.2/Fri Jun 17 11:03:15 2011// 8 | /mld6.h/1.1/Tue May 17 19:54:41 2011// 9 | /nd6.h/1.1/Tue May 17 19:54:41 2011// 10 | D 11 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv6/lwip/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/include/ipv6/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/ipv6/lwip/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/lwip/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/include/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/lwip/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | /etharp.h/1.55/Thu Feb 23 08:46:56 2012// 2 | /ppp_oe.h/1.4/Fri Jan 20 10:38:03 2012// 3 | /slipif.h/1.5/Fri Jan 20 10:38:03 2012// 4 | D 5 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/include/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/include/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/netif/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/ppp//// 2 | /FILES/1.8/Fri Jan 20 10:38:03 2012// 3 | /etharp.c/1.179/Thu Feb 23 08:46:56 2012// 4 | /ethernetif.c/1.54/Thu Feb 23 08:46:56 2012// 5 | /slipif.c/1.34/Thu Feb 23 08:46:56 2012// 6 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/netif/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/netif 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/netif/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | etharp.c 6 | Implements the ARP (Address Resolution Protocol) over 7 | Ethernet. The code in this file should be used together with 8 | Ethernet device drivers. Note that this module has been 9 | largely made Ethernet independent so you should be able to 10 | adapt this for other link layers (such as Firewire). 11 | 12 | ethernetif.c 13 | An example of how an Ethernet device driver could look. This 14 | file can be used as a "skeleton" for developing new Ethernet 15 | network device drivers. It uses the etharp.c ARP code. 16 | 17 | loopif.c 18 | A "loopback" network interface driver. It requires configuration 19 | through the define LWIP_LOOPIF_MULTITHREADING (see opt.h). 20 | 21 | slipif.c 22 | A generic implementation of the SLIP (Serial Line IP) 23 | protocol. It requires a sio (serial I/O) module to work. 24 | 25 | ppp/ Point-to-Point Protocol stack 26 | The PPP stack has been ported from ucip (http://ucip.sourceforge.net). 27 | It matches quite well to pppd 2.3.1 (http://ppp.samba.org), although 28 | compared to that, it has some modifications for embedded systems and 29 | the source code has been reordered a bit. -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/netif/ppp/CVS/Entries: -------------------------------------------------------------------------------- 1 | /auth.c/1.21/Fri Jan 20 10:38:03 2012// 2 | /auth.h/1.5/Fri Jan 20 10:38:03 2012// 3 | /chap.c/1.15/Fri Jan 20 10:38:03 2012// 4 | /chap.h/1.6/Fri Jan 20 10:38:03 2012// 5 | /chpms.c/1.9/Fri Jan 20 10:38:03 2012// 6 | /chpms.h/1.5/Fri Jan 20 10:38:03 2012// 7 | /fsm.c/1.12/Fri Jan 20 10:38:03 2012// 8 | /fsm.h/1.5/Fri Jan 20 10:38:03 2012// 9 | /ipcp.c/1.15/Fri Jan 20 10:38:03 2012// 10 | /ipcp.h/1.4/Fri Jan 20 10:38:03 2012// 11 | /lcp.c/1.17/Fri Jan 20 10:38:03 2012// 12 | /lcp.h/1.4/Fri Jan 20 10:38:03 2012// 13 | /magic.c/1.6/Fri Jan 20 10:38:03 2012// 14 | /magic.h/1.3/Fri Jan 20 10:38:03 2012// 15 | /md5.c/1.8/Fri Jan 20 10:38:03 2012// 16 | /md5.h/1.2/Fri Jan 20 10:38:03 2012// 17 | /pap.c/1.17/Thu Feb 23 08:46:56 2012// 18 | /pap.h/1.6/Fri Jan 20 10:38:03 2012// 19 | /ppp.c/1.57/Thu Feb 23 08:46:56 2012// 20 | /ppp.h/1.20/Fri Jan 20 10:38:03 2012// 21 | /ppp_oe.c/1.19/Fri Jan 20 10:38:03 2012// 22 | /pppdebug.h/1.7/Fri Jan 20 10:38:03 2012// 23 | /randm.c/1.9/Fri Jan 20 10:38:03 2012// 24 | /randm.h/1.5/Fri Jan 20 10:38:03 2012// 25 | /vj.c/1.18/Fri Jan 20 10:38:03 2012// 26 | /vj.h/1.7/Fri Jan 20 10:38:03 2012// 27 | D 28 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/netif/ppp/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/src/netif/ppp 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/src/netif/ppp/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/unit//// 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/test 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/core//// 2 | D/etharp//// 3 | D/tcp//// 4 | D/udp//// 5 | /lwip_check.h/1.2/Fri Jan 20 10:38:03 2012// 6 | /lwip_unittests.c/1.3/Fri Jan 20 10:38:03 2012// 7 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/test/unit 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/core/CVS/Entries: -------------------------------------------------------------------------------- 1 | /test_mem.c/1.3/Fri Jan 20 10:38:03 2012// 2 | /test_mem.h/1.1/Fri Jan 20 10:38:03 2012// 3 | D 4 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/core/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/test/unit/core 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/core/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/core/test_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_MEM_H__ 2 | #define __TEST_MEM_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *mem_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/etharp/CVS/Entries: -------------------------------------------------------------------------------- 1 | /test_etharp.c/1.3/Thu Feb 23 08:46:56 2012// 2 | /test_etharp.h/1.1/Fri Jan 20 10:38:03 2012// 3 | D 4 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/etharp/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/test/unit/etharp 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/etharp/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/etharp/test_etharp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_ETHARP_H__ 2 | #define __TEST_ETHARP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* etharp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/lwip_check.h: -------------------------------------------------------------------------------- 1 | #ifndef __LWIP_CHECK_H__ 2 | #define __LWIP_CHECK_H__ 3 | 4 | /* Common header file for lwIP unit tests using the check framework */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #define FAIL_RET() do { fail(); return; } while(0) 11 | #define EXPECT(x) fail_unless(x) 12 | #define EXPECT_RET(x) do { fail_unless(x); if(!(x)) { return; }} while(0) 13 | #define EXPECT_RETX(x, y) do { fail_unless(x); if(!(x)) { return y; }} while(0) 14 | #define EXPECT_RETNULL(x) EXPECT_RETX(x, NULL) 15 | 16 | /** typedef for a function returning a test suite */ 17 | typedef Suite* (suite_getter_fn)(void); 18 | 19 | /** Create a test suite */ 20 | static Suite* create_suite(const char* name, TFun *tests, size_t num_tests, SFun setup, SFun teardown) 21 | { 22 | size_t i; 23 | Suite *s = suite_create(name); 24 | 25 | for(i = 0; i < num_tests; i++) { 26 | /* Core test case */ 27 | TCase *tc_core = tcase_create("Core"); 28 | if ((setup != NULL) || (teardown != NULL)) { 29 | tcase_add_checked_fixture(tc_core, setup, teardown); 30 | } 31 | tcase_add_test(tc_core, tests[i]); 32 | suite_add_tcase(s, tc_core); 33 | } 34 | return s; 35 | } 36 | 37 | #endif /* __LWIP_CHECK_H__ */ 38 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/lwip_unittests.c: -------------------------------------------------------------------------------- 1 | #include "lwip_check.h" 2 | 3 | #include "udp/test_udp.h" 4 | #include "tcp/test_tcp.h" 5 | #include "tcp/test_tcp_oos.h" 6 | #include "core/test_mem.h" 7 | #include "etharp/test_etharp.h" 8 | 9 | #include "lwip/init.h" 10 | 11 | 12 | int main() 13 | { 14 | int number_failed; 15 | SRunner *sr; 16 | size_t i; 17 | suite_getter_fn* suites[] = { 18 | udp_suite, 19 | tcp_suite, 20 | tcp_oos_suite, 21 | mem_suite, 22 | etharp_suite, 23 | }; 24 | size_t num = sizeof(suites)/sizeof(void*); 25 | LWIP_ASSERT("No suites defined", num > 0); 26 | 27 | lwip_init(); 28 | 29 | sr = srunner_create((suites[0])()); 30 | for(i = 1; i < num; i++) { 31 | srunner_add_suite(sr, ((suite_getter_fn*)suites[i])()); 32 | } 33 | 34 | #ifdef LWIP_UNITTESTS_NOFORK 35 | srunner_set_fork_status(sr, CK_NOFORK); 36 | #endif 37 | #ifdef LWIP_UNITTESTS_FORK 38 | srunner_set_fork_status(sr, CK_FORK); 39 | #endif 40 | 41 | srunner_run_all(sr, CK_NORMAL); 42 | number_failed = srunner_ntests_failed(sr); 43 | srunner_free(sr); 44 | return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 45 | } 46 | 47 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/tcp/CVS/Entries: -------------------------------------------------------------------------------- 1 | /tcp_helper.c/1.9/Thu Feb 23 08:46:56 2012// 2 | /tcp_helper.h/1.4/Thu Feb 23 08:46:56 2012// 3 | /test_tcp.c/1.5/Thu Feb 23 08:46:56 2012// 4 | /test_tcp.h/1.1/Fri Jan 20 10:38:03 2012// 5 | /test_tcp_oos.c/1.9/Thu Feb 23 08:46:56 2012// 6 | /test_tcp_oos.h/1.1/Fri Jan 20 10:38:03 2012// 7 | D 8 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/tcp/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/test/unit/tcp 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/tcp/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_TCP_H__ 2 | #define __TEST_TCP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_TCP_OOS_H__ 2 | #define __TEST_TCP_OOS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/udp/CVS/Entries: -------------------------------------------------------------------------------- 1 | /test_udp.c/1.2/Fri Jan 20 10:38:03 2012// 2 | /test_udp.h/1.1/Fri Jan 20 10:38:03 2012// 3 | D 4 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/udp/CVS/Repository: -------------------------------------------------------------------------------- 1 | lwip/test/unit/udp 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/udp/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip 2 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/udp/test_udp.c: -------------------------------------------------------------------------------- 1 | #include "test_udp.h" 2 | 3 | #include "lwip/udp.h" 4 | #include "lwip/stats.h" 5 | 6 | #if !LWIP_STATS || !UDP_STATS || !MEMP_STATS 7 | #error "This tests needs UDP- and MEMP-statistics enabled" 8 | #endif 9 | 10 | /* Helper functions */ 11 | static void 12 | udp_remove_all(void) 13 | { 14 | struct udp_pcb *pcb = udp_pcbs; 15 | struct udp_pcb *pcb2; 16 | 17 | while(pcb != NULL) { 18 | pcb2 = pcb; 19 | pcb = pcb->next; 20 | udp_remove(pcb2); 21 | } 22 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 23 | } 24 | 25 | /* Setups/teardown functions */ 26 | 27 | static void 28 | udp_setup(void) 29 | { 30 | udp_remove_all(); 31 | } 32 | 33 | static void 34 | udp_teardown(void) 35 | { 36 | udp_remove_all(); 37 | } 38 | 39 | 40 | /* Test functions */ 41 | 42 | START_TEST(test_udp_new_remove) 43 | { 44 | struct udp_pcb* pcb; 45 | LWIP_UNUSED_ARG(_i); 46 | 47 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 48 | 49 | pcb = udp_new(); 50 | fail_unless(pcb != NULL); 51 | if (pcb != NULL) { 52 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 1); 53 | udp_remove(pcb); 54 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0); 55 | } 56 | } 57 | END_TEST 58 | 59 | 60 | /** Create the suite including all tests for this module */ 61 | Suite * 62 | udp_suite(void) 63 | { 64 | TFun tests[] = { 65 | test_udp_new_remove, 66 | }; 67 | return create_suite("UDP", tests, sizeof(tests)/sizeof(TFun), udp_setup, udp_teardown); 68 | } 69 | -------------------------------------------------------------------------------- /alexb/lib/lwip/contrib/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_UDP_H__ 2 | #define __TEST_UDP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /alexb/lib/lwip/own/include/arch/cc.h: -------------------------------------------------------------------------------- 1 | #define BYTE_ORDER LITTLE_ENDIAN 2 | #define PACK_STRUCT_STRUCT __attribute__((packed)) 3 | #define LWIP_COMPAT_MUTEX 1 4 | #define LWIP_PROVIDE_ERRNO 5 | -------------------------------------------------------------------------------- /alexb/lib/lwip/own/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | #define PERF_START 2 | #define PERF_STOP(message) while (0) {} 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/own/include/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /alexb/lib/lwip/own/include/string.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /alexb/lib/matrixssl/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | Import('target_env') 5 | 6 | # sources are based on matrixssl-3-3-open release from February 22, 2012 7 | 8 | target_env.Append(CPPPATH = [ 'own/include', 9 | 'contrib', 10 | 'contrib/core', 11 | 'contrib/crypto', 12 | 'contrib/matrixssl']); 13 | 14 | nul.Lib(target_env, 'ssl_matrix', 15 | SOURCES = [Glob('contrib/core/*.c'), 16 | Glob('contrib/crypto/*/*.c'), 17 | Glob('contrib/matrixssl/*.c'), 18 | 'own/sys.cc' 19 | ]) 20 | -------------------------------------------------------------------------------- /alexb/lib/matrixssl/contrib/doc/MatrixSSL_3-3-OpenReleaseNotes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/alexb/lib/matrixssl/contrib/doc/MatrixSSL_3-3-OpenReleaseNotes.pdf -------------------------------------------------------------------------------- /alexb/lib/matrixssl/contrib/doc/MatrixSSL_API.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/alexb/lib/matrixssl/contrib/doc/MatrixSSL_API.pdf -------------------------------------------------------------------------------- /alexb/lib/matrixssl/contrib/doc/MatrixSSL_DevelopersGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/alexb/lib/matrixssl/contrib/doc/MatrixSSL_DevelopersGuide.pdf -------------------------------------------------------------------------------- /alexb/lib/matrixssl/contrib/doc/MatrixSSL_GettingStarted.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/alexb/lib/matrixssl/contrib/doc/MatrixSSL_GettingStarted.pdf -------------------------------------------------------------------------------- /alexb/lib/matrixssl/contrib/doc/MatrixSSL_PortingGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/alexb/lib/matrixssl/contrib/doc/MatrixSSL_PortingGuide.pdf -------------------------------------------------------------------------------- /alexb/lib/matrixssl/contrib/matrixssl/test/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # makefile for MatrixSSL single process protocol testing 3 | # 'make' builds optimized (Default). 4 | # 'make debug' builds debug. 5 | # 6 | # Copyright (c) PeerSec Networks, 2002-2011. All Rights Reserved 7 | # 8 | 9 | CC = gcc 10 | O = .o 11 | A = .a 12 | E = 13 | 14 | STATICS = ../../libmatrixssl$(A) 15 | 16 | TEST_EXE = sslTest$(E) 17 | TEST_OBJS = sslTest$(O) 18 | 19 | # 20 | # This is set by the debug target below 21 | # 22 | ifdef PS_DEBUG 23 | DFLAGS = -g -Wall -DDEBUG 24 | else 25 | DFLAGS = -Os 26 | endif 27 | 28 | gold: 29 | @$(MAKE) compile 30 | 31 | debug: 32 | @$(MAKE) compile "PS_DEBUG = 1" 33 | 34 | default: gold 35 | 36 | # 37 | # Compile options 38 | # 39 | CFLAGS = $(DFLAGS) -DPOSIX -I.. -I../.. -I../../sampleCerts 40 | LDFLAGS = -lc 41 | 42 | # 43 | # Override variables for compilation on x86-64 (AMD64, Nacona, etc) 44 | # 45 | ifeq ($(shell uname -m),x86_64) 46 | DFLAGS += -march=k8 -fPIC -DRDTSC 47 | endif 48 | 49 | # 50 | # Override variables for compilation on Mac OS X (Darwin) 51 | # 52 | ifeq ($(shell uname),Darwin) 53 | CFLAGS += -isystem -I/usr/include 54 | LDFLAGS = 55 | endif 56 | 57 | all: compile 58 | 59 | compile: $(TEST_EXE) 60 | 61 | $(TEST_EXE):$(TEST_OBJS) $(STATICS) 62 | $(CC) -o $@ $^ $(LDFLAGS) $(STATICS) 63 | 64 | # 65 | # Clean up all generated files 66 | # 67 | clean: 68 | rm -f $(TEST_EXE) $(TEST_OBJS) 69 | -------------------------------------------------------------------------------- /alexb/lib/matrixssl/contrib/matrixssl/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2012 AuthenTec 3 | This file is auto-generated 4 | */ 5 | #ifndef _h_MATRIXSSL_VERSION 6 | #define _h_MATRIXSSL_VERSION 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define MATRIXSSL_VERSION "3.3.0-OPEN" 12 | #define MATRIXSSL_VERSION_MAJOR 3 13 | #define MATRIXSSL_VERSION_MINOR 3 14 | #define MATRIXSSL_VERSION_PATCH 0 15 | #define MATRIXSSL_VERSION_CODE "OPEN" 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* _h_MATRIXSSL_VERSION */ 21 | 22 | -------------------------------------------------------------------------------- /alexb/lib/matrixssl/own/include/stdio.h: -------------------------------------------------------------------------------- 1 | #include 2 | //#include timevalue defined here 3 | typedef unsigned long long psTime_t; 4 | 5 | // don't divide by 64bit value 6 | #define USE_MATRIX_DIV64 7 | -------------------------------------------------------------------------------- /alexb/lib/matrixssl/own/include/string.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /base/apps/admission/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'admission', 8 | SOURCES = [ 'main.cc' ], 9 | INCLUDE = [ 'sigma0' ], 10 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 11 | MEMSIZE = 130<<12) # enough for 64 CPUs --> 0x1000 + 0x1000 + 2 * 0x1000 * number of cpus --> (notify page + small stuff + 2 * stacks for ECs on every cpu) 12 | 13 | # EOF 14 | -------------------------------------------------------------------------------- /base/apps/sigma0/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | nul.App(target_env, 'sigma0', 7 | SOURCES = Glob('*.cc'), 8 | LIBS = [ 'runtime', 'hostvesa', 'host', 'service'], 9 | LINKSCRIPT = 'linker.ld', 10 | ROMFS = [ 'cfg/admission.nulconfig', '#bin/apps/admission.nul' ], 11 | MEMSIZE = 2<<12) # enough memory for two stacks - echo and worker thread running on boot cpu 12 | 13 | # Sigma0 binary is bloated. Install a gzipped version by default. 14 | target_env.Command("#bin/apps/sigma0.nul.gz", "#bin/apps/sigma0.nul", 15 | "gzip -n -c $SOURCE > $TARGET") 16 | 17 | # EOF 18 | -------------------------------------------------------------------------------- /base/apps/sigma0/cfg/admission.nulconfig: -------------------------------------------------------------------------------- 1 | namespace::/s0 name::/s0/admission name::/s0/timer sigma0::mem:2 || 2 | embedded://admission.nul top 3 | -------------------------------------------------------------------------------- /base/host/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | Import('target_env') 5 | 6 | nul.Lib(target_env, 'host', 7 | SOURCES = filter(lambda x: x.name != 'hostvesa.cc',Glob('*.cc'))) 8 | 9 | nul.Lib(target_env, 'hostvesa', SOURCES = ['hostvesa.cc', 10 | '../model/memorycontroller.o', 11 | '../model/vcpu.o', 12 | '../executor/halifax.o', 13 | '../model/pit8254.o', 14 | '../model/sysctrlport.o', 15 | '../model/pcihostbridge.o', 16 | '../model/pcidirect.o', 17 | '../model/directio.o']) 18 | 19 | nul.Lib(target_env, 'hostkbd', SOURCES = ['hostkeyboard.o','hostio.o']) 20 | 21 | # EOF 22 | -------------------------------------------------------------------------------- /base/include/ctype.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C -*- */ 2 | 3 | #pragma once 4 | 5 | static inline int isspace(int c) 6 | { 7 | switch (c) { 8 | case ' ': 9 | case '\f': 10 | case '\n': 11 | case '\r': 12 | case '\t': 13 | case '\v': 14 | return 1; 15 | default: 16 | return 0; 17 | } 18 | } 19 | 20 | static inline int isdigit(int c) { return (c >= '0') && (c <= '9'); }; 21 | static inline int isupper(int c) { return (c >= 'A') && (c <= 'Z'); }; 22 | static inline int islower(int c) { return (c >= 'a') && (c <= 'z'); }; 23 | static inline int isalpha(int c) { return isupper(c) || islower(c); }; 24 | static inline int isalnum(int c) { return isalpha(c) || isdigit(c); }; 25 | 26 | static inline int tolower(int c) { return isupper(c) ? (c | 0x20) : c; } 27 | static inline int toupper(int c) { return islower(c) ? (c & ~0x20) : c; } 28 | 29 | 30 | /* EOF */ 31 | -------------------------------------------------------------------------------- /base/include/nul/config.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Global Config. 3 | * 4 | * Copyright (C) 2010, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License version 2 as 11 | * published by the Free Software Foundation. 12 | * 13 | * Vancouver is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | #pragma once 19 | 20 | struct Config { 21 | enum { 22 | NUL_VERSION = 0x00000003204c554eULL, 23 | WALLCLOCK_FREQUENCY = 1000000U, 24 | CAP_RESERVED_ORDER = 11, // reserved cap region where the parent can put caps for the client 25 | MAX_CLIENTS_ORDER = 6, 26 | PHYS_ADDR_SIZE = 40, 27 | EXC_PORTALS = 32, // Number of exception portals 28 | MAX_CPUS = 32, 29 | 30 | DEFAULT_QUANTUM = 10000U, // Default time slice length 31 | 32 | CAP_PARENT_BEGIN = EXC_PORTALS * MAX_CPUS, 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /base/include/nul/error.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Error codes. 3 | * 4 | * Copyright (C) 2010, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver.nova is free software: you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License version 11 | * 2 as published by the Free Software Foundation. 12 | * 13 | * Vancouver.nova is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | #pragma once 19 | 20 | enum { 21 | ENONE = 0, 22 | EPROTO = 0x100, 23 | EPERM, 24 | ERETRY, 25 | EABORT, 26 | ERESOURCE, 27 | EEXISTS, 28 | ELASTGLOBAL 29 | }; 30 | -------------------------------------------------------------------------------- /base/include/nul/service_log.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Client part of the log protocol. 3 | * 4 | * Copyright (C) 2010, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of NUL (NOVA user land). 8 | * 9 | * NUL is free software: you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License version 11 | * 2 as published by the Free Software Foundation. 12 | * 13 | * NUL is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | #pragma once 19 | 20 | #include "parent.h" 21 | 22 | /** 23 | * Missing: handle very-long strings 24 | */ 25 | struct LogProtocol : public GenericProtocol { 26 | enum { 27 | TYPE_LOG = ParentProtocol::TYPE_GENERIC_END, 28 | }; 29 | unsigned log(Utcb &utcb, const char *line) { 30 | return call_server(init_frame(utcb, TYPE_LOG) << Utcb::String(line), true); 31 | } 32 | 33 | LogProtocol(unsigned cap_base, unsigned instance=0) : GenericProtocol("log", instance, cap_base, true) {} 34 | }; 35 | -------------------------------------------------------------------------------- /base/include/service/bcd.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * BCD helper functions. 3 | * 4 | * Copyright (C) 2007-2009, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License version 2 as 11 | * published by the Free Software Foundation. 12 | * 13 | * Vancouver is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | #pragma once 19 | 20 | namespace Bcd { 21 | static void from_bcd(unsigned char &value) { value = (value & 0xf) + (value >> 4) * 10; } 22 | static void to_bcd(unsigned char &value) { value = ((value / 10) << 4) + (value % 10); } 23 | }; 24 | -------------------------------------------------------------------------------- /base/include/service/endian.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: C++ -*- 2 | /** @file 3 | * Endianness conversion 4 | * 5 | * Copyright (C) 2010, Julian Stecklina 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of Vancouver. 9 | * 10 | * Vancouver is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License version 2 as 12 | * published by the Free Software Foundation. 13 | * 14 | * Vancouver is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | 24 | namespace Endian { 25 | 26 | #ifdef __i386 27 | static inline uint16 hton16(uint16 value) { asm ("xchg %b0, %h0" : "+Q"(value)); return value; } 28 | static inline uint16 ntoh16(uint16 value) { asm ("xchg %b0, %h0" : "+Q"(value)); return value; } 29 | static inline uint32 hton32(uint32 value) { asm ("bswap %0" : "+r"(value)); return value; } 30 | static inline uint32 ntoh32(uint32 value) { asm ("bswap %0" : "+r"(value)); return value; } 31 | 32 | static inline uint64 hton64(uint64 value) { 33 | return static_cast(hton32(value))<<32 | hton32(value>>32); 34 | } 35 | #else 36 | #error Port me! 37 | #endif 38 | 39 | } 40 | 41 | // EOF 42 | -------------------------------------------------------------------------------- /base/include/service/lifo.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Generic MP LIFO implementation. 3 | * 4 | * Copyright (C) 2010, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver.nova is free software: you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License version 11 | * 2 as published by the Free Software Foundation. 12 | * 13 | * Vancouver.nova is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | #pragma once 19 | 20 | #include "service/cpu.h" 21 | 22 | /** 23 | * Generic MP-save LIFO implementation. 24 | */ 25 | template 26 | class AtomicLifo { 27 | T *_head; 28 | public: 29 | AtomicLifo() : _head(0) {} 30 | 31 | void enqueue(T volatile *value) { 32 | T *old; 33 | do { 34 | old = _head; 35 | value->lifo_next = old; 36 | } while (Cpu::cmpxchg4b(reinterpret_cast(&_head), reinterpret_cast(old), reinterpret_cast(value)) != reinterpret_cast(old)); 37 | } 38 | 39 | T *dequeue_all() { return Cpu::xchg(&_head, static_cast(NULL)); } 40 | T *head() { return _head; } 41 | }; 42 | -------------------------------------------------------------------------------- /base/include/service/logging.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Logging support. 3 | * 4 | * Copyright (C) 2007-2008, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License version 2 as 11 | * published by the Free Software Foundation. 12 | * 13 | * Vancouver is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | 19 | 20 | #pragma once 21 | #include "vprintf.h" 22 | 23 | class Logging : public Vprintf 24 | { 25 | static void (*_putcf)(void *data, int value); 26 | static void *_data; 27 | public: 28 | // debug functions 29 | static void panic(const char *format, ...) __attribute__((noreturn)) __attribute__ ((format(printf, 1, 2))); 30 | static void printf(const char *format, ...) __attribute__ ((format(printf, 1, 2))); 31 | static void vprintf(const char *format, va_list &ap); 32 | static void init(void (*putcf)(void *, int), void *data) { _putcf = putcf; _data = data; } 33 | }; 34 | -------------------------------------------------------------------------------- /base/include/service/profile.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Profiling support. 3 | * 4 | * Copyright (C) 2007-2010, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germa 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License version 2 as 11 | * published by the Free Software Foundation. 12 | * 13 | * Vancouver is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | 19 | #pragma once 20 | 21 | #define PVAR ".long" 22 | #define COUNTER_INC(NAME) \ 23 | ({ \ 24 | asm volatile (".section .data; 1: .string \"" NAME "\";.previous;" \ 25 | ".section .profile; " PVAR " 1b; 2: " PVAR " 0,0;.previous;" \ 26 | "incl 2b" : : : "cc"); \ 27 | }) 28 | 29 | 30 | #define COUNTER_SET(NAME, VALUE) \ 31 | { \ 32 | asm volatile (".section .data; 1: .string \"" NAME "\";.previous;" \ 33 | ".section .profile; " PVAR " 1b; 2: " PVAR " 0,0;.previous;" \ 34 | "mov %0,2b" : : "r"(static_cast(VALUE))); \ 35 | } 36 | -------------------------------------------------------------------------------- /base/lib/runtime/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.Lib(target_env, 8 | "runtime", 9 | SOURCES = [ 10 | 'cpp-support.cc', 11 | 'string.cc', 12 | 'capalloc.cc', 13 | # compiler-rt 14 | 'udivdi3.c', 15 | 'moddi3.c', 16 | 'umoddi3.c', 17 | 'udivmoddi4.c', 18 | ]) 19 | 20 | # EOF 21 | -------------------------------------------------------------------------------- /base/lib/runtime/capalloc.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * Copyright (C) 2011, Michal Sojka 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of NUL (NOVA user land). 8 | * 9 | * NUL is free software: you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License version 11 | * 2 as published by the Free Software Foundation. 12 | * 13 | * NUL is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | 19 | #include 20 | 21 | // cap map - maintains the list of free capability regions 22 | RegionList<512> _cap_region; 23 | // Not multi-threaded safe - lock by your own or use separate cap allocator -> alloc_cap/dealloc_cap in nul/capalloc.h ! 24 | unsigned alloc_cap_region(unsigned count, unsigned align_order) { return _cap_region.alloc(count, align_order); } 25 | void dealloc_cap_region(unsigned base, unsigned count) { return _cap_region.add(Region(base, count)); } 26 | -------------------------------------------------------------------------------- /base/lib/runtime/cpp-support.cc: -------------------------------------------------------------------------------- 1 | /** @file 2 | * C++ Runtime Stubs 3 | * 4 | * Copyright (C) 2010, Julian Stecklina 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License version 2 as 11 | * published by the Free Software Foundation. 12 | * 13 | * Vancouver is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | 19 | #include 20 | 21 | EXTERN_C NORETURN void __cxa_pure_virtual(void) { __builtin_trap(); } 22 | EXTERN_C NORETURN void __cxa_throw_bad_array_new_length(void) { __builtin_trap(); } 23 | 24 | EXTERN_C int 25 | __popcountsi2(unsigned int v) 26 | { 27 | // I am itching to rewrite this in inline assembler using 28 | // shr/adc... ;-) 29 | unsigned n = 0; 30 | for ( ; v != 0; v >>= 1 ) 31 | n += (v & 1); 32 | return n; 33 | } 34 | 35 | // EOF 36 | -------------------------------------------------------------------------------- /base/lib/runtime/int_lib.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C -*- */ 2 | #pragma once 3 | 4 | #define COMPILER_RT_ABI 5 | #define CHAR_BIT 8 6 | 7 | typedef int si_int; 8 | typedef unsigned su_int; 9 | 10 | typedef long long di_int; 11 | typedef unsigned long long du_int; 12 | 13 | typedef union 14 | { 15 | di_int all; 16 | struct 17 | { 18 | su_int low; 19 | si_int high; 20 | }s; 21 | } dwords; 22 | 23 | typedef union 24 | { 25 | du_int all; 26 | struct 27 | { 28 | su_int low; 29 | su_int high; 30 | }s; 31 | } udwords; 32 | 33 | /* EOF */ 34 | -------------------------------------------------------------------------------- /base/lib/runtime/moddi3.c: -------------------------------------------------------------------------------- 1 | /*===-- moddi3.c - Implement __moddi3 -------------------------------------=== 2 | * 3 | * The LLVM Compiler Infrastructure 4 | * 5 | * This file is dual licensed under the MIT and the University of Illinois Open 6 | * Source Licenses. See LICENSE.TXT for details. 7 | * 8 | * ===----------------------------------------------------------------------=== 9 | * 10 | * This file implements __moddi3 for the compiler_rt library. 11 | * 12 | * ===----------------------------------------------------------------------=== 13 | */ 14 | 15 | #include "int_lib.h" 16 | 17 | COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int* rem); 18 | 19 | /* Returns: a % b */ 20 | 21 | COMPILER_RT_ABI di_int 22 | __moddi3(di_int a, di_int b) 23 | { 24 | const int bits_in_dword_m1 = (int)(sizeof(di_int) * CHAR_BIT) - 1; 25 | di_int s = b >> bits_in_dword_m1; /* s = b < 0 ? -1 : 0 */ 26 | b = (b ^ s) - s; /* negate if s == -1 */ 27 | s = a >> bits_in_dword_m1; /* s = a < 0 ? -1 : 0 */ 28 | a = (a ^ s) - s; /* negate if s == -1 */ 29 | di_int r; 30 | __udivmoddi4(a, b, (du_int*)&r); 31 | return (r ^ s) - s; /* negate if s == -1 */ 32 | } 33 | -------------------------------------------------------------------------------- /base/lib/runtime/udivdi3.c: -------------------------------------------------------------------------------- 1 | /* ===-- udivdi3.c - Implement __udivdi3 -----------------------------------=== 2 | * 3 | * The LLVM Compiler Infrastructure 4 | * 5 | * This file is dual licensed under the MIT and the University of Illinois Open 6 | * Source Licenses. See LICENSE.TXT for details. 7 | * 8 | * ===----------------------------------------------------------------------=== 9 | * 10 | * This file implements __udivdi3 for the compiler_rt library. 11 | * 12 | * ===----------------------------------------------------------------------=== 13 | */ 14 | 15 | #include "int_lib.h" 16 | 17 | du_int COMPILER_RT_ABI __udivmoddi4(du_int a, du_int b, du_int* rem); 18 | 19 | /* Returns: a / b */ 20 | 21 | COMPILER_RT_ABI du_int 22 | __udivdi3(du_int a, du_int b) 23 | { 24 | return __udivmoddi4(a, b, 0); 25 | } 26 | -------------------------------------------------------------------------------- /base/lib/runtime/umoddi3.c: -------------------------------------------------------------------------------- 1 | /* ===-- umoddi3.c - Implement __umoddi3 -----------------------------------=== 2 | * 3 | * The LLVM Compiler Infrastructure 4 | * 5 | * This file is dual licensed under the MIT and the University of Illinois Open 6 | * Source Licenses. See LICENSE.TXT for details. 7 | * 8 | * ===----------------------------------------------------------------------=== 9 | * 10 | * This file implements __umoddi3 for the compiler_rt library. 11 | * 12 | * ===----------------------------------------------------------------------=== 13 | */ 14 | 15 | #include "int_lib.h" 16 | 17 | du_int COMPILER_RT_ABI __udivmoddi4(du_int a, du_int b, du_int* rem); 18 | 19 | /* Returns: a % b */ 20 | 21 | COMPILER_RT_ABI du_int 22 | __umoddi3(du_int a, du_int b) 23 | { 24 | du_int r; 25 | __udivmoddi4(a, b, &r); 26 | return r; 27 | } 28 | -------------------------------------------------------------------------------- /base/service/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | Import('target_env') 5 | 6 | target_env.Object("startup.S") 7 | nul.Lib(target_env, 'service', SOURCES = Glob('*.cc') + Glob('*.c')) 8 | -------------------------------------------------------------------------------- /base/service/startup.S: -------------------------------------------------------------------------------- 1 | ## -*- Mode: Asm -*- 2 | 3 | ## The startup function and the initial stack. Called with 4 | ## the HIP in %esp and the UTCB a page below the HIP. 5 | 6 | .global __start 7 | .section .text.__start 8 | 9 | __start: 10 | ## EAX contains our CPU number (first parameter to start) 11 | mov %esp, global_hip 12 | lea -0x1000(%esp), %edx 13 | mov $stack, %esp 14 | push %edx # push UTCB -- needed for myutcb() 15 | sub $12, %esp # alignment 16 | call start 17 | ud2a 18 | 19 | .global global_hip 20 | .section .bss.hip 21 | global_hip: .space 4 22 | 23 | 24 | .section .bss.stack 25 | .align 0x1000 26 | .space 0x1000 27 | stack: 28 | 29 | ## A fast reply to our client, called by a return to a portal 30 | ## function. 31 | .global idc_reply_and_wait_fast 32 | .section .text.idc_reply_and_wait_fast 33 | idc_reply_and_wait_fast: 34 | ## w0: NOVA_IPC_REPLY 35 | mov $1, %al 36 | ## keep a pointer to ourself on the stack 37 | ## ecx: stack 38 | lea -4(%esp), %ecx 39 | sysenter 40 | 41 | ## EOF 42 | -------------------------------------------------------------------------------- /base/tools/boot/README: -------------------------------------------------------------------------------- 1 | This directory contains multiboot tools used for booting. 2 | All follow the multiboot chainloading approach. 3 | 4 | * unzip: unzip and relocate all following modules 5 | * bender: look for serial controllers and update BIOS data area 6 | * vilo: gPXE loader (old linux format) 7 | * munich: start linux from multiboot 8 | -------------------------------------------------------------------------------- /base/tools/boot/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | Import('target_env') 4 | 5 | boot_env = target_env.Clone() 6 | # XXX Decouple this from target_env. This fails when we port to 64-bit. 7 | boot_env.Link('munich/munich', Glob('munich/*.[cS]'), linkscript='munich/munich.ld') 8 | 9 | prebuilt = [ 'bender', 10 | 'unzip', 11 | ] 12 | 13 | Install('#bin/boot', prebuilt + ['munich/munich']) 14 | 15 | # EOF 16 | -------------------------------------------------------------------------------- /base/tools/boot/bender: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/base/tools/boot/bender -------------------------------------------------------------------------------- /base/tools/boot/munich/asm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * \brief ASM inline helper routines. 3 | * \date 2006-03-28 4 | * \author Bernhard Kauer 5 | */ 6 | /* 7 | * Copyright (C) 2006,2007,2010 Bernhard Kauer 8 | * Technische Universitaet Dresden, Operating Systems Research Group 9 | * 10 | * This file is part of the OSLO package, which is distributed under 11 | * the terms of the GNU General Public Licence 2. Please see the 12 | * COPYING file for details. 13 | */ 14 | 15 | #pragma once 16 | 17 | void reboot(void) __attribute__((noreturn)); 18 | 19 | static inline 20 | unsigned char 21 | inb(const unsigned short port) 22 | { 23 | unsigned char res; 24 | asm volatile("inb %1, %0" : "=a"(res): "Nd"(port)); 25 | return res; 26 | } 27 | 28 | static inline 29 | void 30 | outb(const unsigned short port, unsigned char value) 31 | { 32 | asm volatile("outb %0,%1" :: "a"(value),"Nd"(port)); 33 | } 34 | 35 | static inline 36 | unsigned 37 | bsr(unsigned int value) 38 | { 39 | unsigned res; 40 | asm volatile("bsr %1,%0" : "=r"(res): "r"(value)); 41 | return res; 42 | } 43 | -------------------------------------------------------------------------------- /base/tools/boot/munich/boot_linux.h: -------------------------------------------------------------------------------- 1 | /* 2 | * \brief Header of boot_linux.S 3 | * \date 2006-06-28 4 | * \author Bernhard Kauer 5 | */ 6 | /* 7 | * Copyright (C) 2006,2007,2010 Bernhard Kauer 8 | * Technische Universitaet Dresden, Operating Systems Research Group 9 | * 10 | * This file is part of the OSLO package, which is distributed under 11 | * the terms of the GNU General Public Licence 2. Please see the 12 | * COPYING file for details. 13 | */ 14 | 15 | 16 | #ifndef _BOOT_LINUX_H_ 17 | #define _BOOT_LINUX_H_ 18 | 19 | void jmp_kernel(unsigned cs, unsigned stack) __attribute__((noreturn)); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /base/tools/boot/munich/munich.ld: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | ENTRY(__start) 4 | . = 0x18000; 5 | 6 | .text : 7 | { 8 | KEEP(*(.text.__mbheader)); 9 | KEEP(*(.text.__start)); 10 | *(.text .text.*); 11 | *(.rodata .rodata.*); 12 | } 13 | 14 | .bss : 15 | { 16 | *(.bss); 17 | } 18 | 19 | 20 | .debug : 21 | { 22 | *(.debug*); 23 | } 24 | 25 | 26 | /DISCARD/ : 27 | { 28 | *(.comment) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /base/tools/boot/munich/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * \brief Version definition 3 | * \date 2006-06-28 4 | * \author Bernhard Kauer 5 | */ 6 | /* 7 | * Copyright (C) 2006,2007,2010 Bernhard Kauer 8 | * Technische Universitaet Dresden, Operating Systems Research Group 9 | * 10 | * This file is part of the OSLO package, which is distributed under 11 | * the terms of the GNU General Public Licence 2. Please see the 12 | * COPYING file for details. 13 | */ 14 | 15 | #pragma once 16 | #define VERSION "v.0.4.6" 17 | -------------------------------------------------------------------------------- /base/tools/boot/unzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/base/tools/boot/unzip -------------------------------------------------------------------------------- /base/tools/connector/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | Import('initrd32_works') 4 | Import('initrd32_env') 5 | 6 | if initrd32_works: 7 | Install("#bin/host", 8 | initrd32_env.Program('tap_connector', 9 | ["tap_connector.cc"])) 10 | else: 11 | print("Skip building tap_connector.") 12 | 13 | # EOF 14 | -------------------------------------------------------------------------------- /base/tools/iprelay/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | Import('host_env') 4 | 5 | host_env.Program('iprelayd', [ 'iprelayd.cc' ]) 6 | 7 | host_env.Install('#bin/tools', 'iprelayd') 8 | -------------------------------------------------------------------------------- /base/tools/network_bench/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=tcp_sender tcp_recv 2 | all: $(OBJS) 3 | .PHONY: all 4 | tcp_recv: tcp_sender.c 5 | $(CC) -DRECV -o $@ $< 6 | clean: 7 | rm $(OBJS) -------------------------------------------------------------------------------- /ben/contrib/ocaml/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | #uncomment to build whole OCaml compiler and runtime 8 | 9 | #AlwaysBuild(target_env.Command("dummy_dependency",["Makefile", "ocaml-3.11.0.patch"],"make -C `dirname $TARGET` -f ${SOURCES[0]} PATCH=${SOURCES[1]}")) 10 | -------------------------------------------------------------------------------- /ben/include/ocaml.h: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | #include "callback.h" 3 | #include "memory.h" 4 | #include "mlvalues.h" 5 | } 6 | 7 | #define REGPARM(X) __attribute__ ((regparm(X))) 8 | #define NORETURN __attribute__ ((noreturn)) 9 | #define PACKED __attribute__ ((__packed__)) 10 | #define UNREACHED __builtin_trap() 11 | #define EXTERN_C extern "C" 12 | 13 | EXTERN_C REGPARM(0) 14 | void caml_startup (char ** argv); 15 | 16 | EXTERN_C REGPARM(0) 17 | value * caml_named_value (char const * name); 18 | 19 | EXTERN_C REGPARM(0) 20 | value caml_callback (value closure, value arg); 21 | 22 | EXTERN_C REGPARM(0) 23 | value caml_copy_string (char const *); 24 | 25 | void start_ocaml (); 26 | -------------------------------------------------------------------------------- /build/.gitignore: -------------------------------------------------------------------------------- 1 | /build_cache 2 | *.cc 3 | softcore.c 4 | -------------------------------------------------------------------------------- /demo/apps/cycleburner/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'cycleburner', 8 | SOURCES = [ 'cycleburner.cc'], 9 | INCLUDE = [ 'sigma0' ], 10 | OBJS = [ '#service/simplemalloc.o', 11 | '#service/logging.o', 12 | '#service/vprintf.o', 13 | ], 14 | LIBS = [ 'dlmalloc', 'runtime' ], 15 | MEMSIZE = 1<<20) 16 | 17 | # EOF 18 | -------------------------------------------------------------------------------- /demo/apps/cycleburner/intro-text.inc: -------------------------------------------------------------------------------- 1 | " __ __| | _ \\ | ", 2 | " | _ \\\\ \\ / __| | | | _` | __| __ `__ \\ _` | ", 3 | " | __/ ` < | ___/ | ( |\\__ \\ | | | ( | ", 4 | " _|\\___| _/\\_\\\\__| _| _|\\__,_|____/_| _| _|\\__,_| ", 5 | 6 | -------------------------------------------------------------------------------- /demo/apps/cycleburner/math.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: C++ -*- 2 | /** @file 3 | * Math helpers 4 | * 5 | * Copyright (C) 2009, Julian Stecklina 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of Vancouver. 9 | * 10 | * Vancouver is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License version 2 as 12 | * published by the Free Software Foundation. 13 | * 14 | * Vancouver is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include "nul/types.h" 23 | 24 | typedef signed char int8_t; 25 | typedef signed short int16_t; 26 | typedef uint8 uint8_t; 27 | typedef uint16 uint16_t; 28 | typedef uint32 uint32_t; 29 | 30 | # define M_PI 3.14159265358979323846 31 | 32 | static inline float 33 | fsin(float f) 34 | { 35 | asm ("fsin\n" : "+t" (f)); 36 | return f; 37 | } 38 | 39 | static inline float 40 | fsqrt(float f) 41 | { 42 | asm ("fsqrt\n" : "+t" (f)); 43 | return f; 44 | } 45 | 46 | 47 | /* EOF */ 48 | -------------------------------------------------------------------------------- /demo/apps/diskbench/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'diskbench', 8 | SOURCES = [ 'diskbench.cc' ], 9 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 10 | MEMSIZE = 1<<16) 11 | 12 | nul.App(target_env, 'diskbench-old', 13 | SOURCES = [ 'diskbench-old.cc' ], 14 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 15 | MEMSIZE = 1<<16) 16 | 17 | # EOF 18 | -------------------------------------------------------------------------------- /demo/apps/gt/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'gt', 8 | SOURCES = [ 'gt.cc' ], 9 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o']) 10 | 11 | # EOF 12 | -------------------------------------------------------------------------------- /demo/apps/hello/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'hello', 8 | SOURCES = [ 'hello.cc' ], 9 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 10 | MEMSIZE = 1<<16) 11 | 12 | # EOF 13 | -------------------------------------------------------------------------------- /demo/apps/hello/hello.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Test application that burns CPU time. 3 | * 4 | * Copyright (C) 2010, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver.nova. 8 | * 9 | * Vancouver.nova is free software: you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License version 11 | * 2 as published by the Free Software Foundation. 12 | * 13 | * Vancouver.nova is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | 19 | #include "sigma0/console.h" 20 | #include "nul/program.h" 21 | 22 | class Hello : public NovaProgram, public ProgramConsole 23 | { 24 | public: 25 | void run(Utcb *utcb, Hip *hip) 26 | { 27 | init(hip); 28 | console_init("Hello", new Semaphore(alloc_cap(), true)); 29 | for (unsigned i=1; i; i++) 30 | Logging::printf("%8x Hello World!\n", i++); 31 | } 32 | }; 33 | 34 | ASMFUNCS(Hello, NovaProgram) 35 | -------------------------------------------------------------------------------- /demo/apps/rocknshine/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | Import('host_env') 7 | 8 | nul.App(target_env, 'rocknshine', 9 | SOURCES = [ 'rocknshine.cc' ], 10 | INCLUDE = [ 'sigma0' ], 11 | LIBS = [ 'service', 'tinf', 'runtime'], 12 | MEMSIZE = 1<<16) 13 | 14 | rocknshine_env = host_env.Clone() 15 | 16 | # From AutoconfRecipies in Scons wiki: 17 | # note that the full command path or none is returned, which can serve as True or False. 18 | def CheckCommand(context, cmd): 19 | context.Message('Checking for %s command... ' % cmd) 20 | result = WhereIs(cmd) 21 | context.Result(result is not None) 22 | return result 23 | 24 | conf = Configure(rocknshine_env, custom_tests = {'CheckCommand' : CheckCommand}) 25 | has_pdftoppm = conf.CheckCommand("pdftoppm") 26 | conf.Finish() 27 | 28 | if has_pdftoppm: 29 | host_env.Command('#bin/apps/rocknshine.example', ['pdfprepare.py', 'presentation.pdf'], 30 | '${SOURCES[0]} ${SOURCES[1:]} ${TARGET}') 31 | else: 32 | print("Install poppler if you want to use pdfprepare to generate rocknshine slide sets.") 33 | 34 | # EOF 35 | -------------------------------------------------------------------------------- /demo/apps/rocknshine/presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUD-OS/NUL/def8f96689c8bde7d81f82642be0a4ac6eeb51b8/demo/apps/rocknshine/presentation.pdf -------------------------------------------------------------------------------- /demo/apps/tutor/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | Import('host_env') 7 | 8 | nul.App(target_env, 'tutor', 9 | SOURCES = [ 'tutor.cc', 'screen1.cc' ], 10 | INCLUDE = [ 'sigma0' ], 11 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 12 | MEMSIZE = 1<<16) 13 | 14 | host_env.Command('screen1.cc', ['screen.py', 'screen1.txt'], 15 | '@${SOURCES[0]} screen1 < ${SOURCES[1:]} > ${TARGET}') 16 | 17 | # EOF 18 | -------------------------------------------------------------------------------- /demo/apps/tutor/screen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | 3 | import sys 4 | from StringIO import StringIO 5 | 6 | table = StringIO() 7 | table.write(" unsigned written = 0;\n") 8 | table.write(" switch (line) {\n") 9 | 10 | input = sys.stdin 11 | lpos = 0 12 | screen_lines = 0 13 | 14 | while True: 15 | lpos += 1 16 | line = input.readline() 17 | if not line: 18 | break 19 | if (len(line)>0 and line[0] == '#'): 20 | continue 21 | pos = 0 22 | attr = 0x07 23 | 24 | screen_lines += 1 25 | table.write("case %d:\n" % (screen_lines - 1)) 26 | if (screen_lines > 25): 27 | table.write(" if (++written > 25) break;\n") 28 | for c in line: 29 | if c == '[': 30 | attr = 0x0F 31 | elif c == ']': 32 | attr = 0x07 33 | elif c in ['\n']: 34 | pass 35 | else: 36 | table.write(" *(dst+%d) = 0x%x;\n" % (pos, (attr << 8) | ord(c))) 37 | pos += 1 38 | table.write(" memset(dst + %d, 0, 160 - 2*%d);\n" % (pos, pos)) 39 | table.write(" dst += %d;\n" % 80) 40 | table.write(" }\n") 41 | table.write("memset(dst, 0, (25 - written) * 2*80);\n"); 42 | 43 | print("#include ") 44 | print("void print_%s(unsigned short *dst, unsigned &line) {" % sys.argv[1]) 45 | 46 | lline = (screen_lines - 24) if (screen_lines > 24) else 0 47 | print(" if (line > %d) line = %d; " % ( lline, lline )) 48 | print(table.getvalue()) 49 | table.close() 50 | print("}") 51 | -------------------------------------------------------------------------------- /demo/example.conf/README: -------------------------------------------------------------------------------- 1 | Configuration examples 2 | ====================== 3 | Some configuration which can be used with the current NUL repository. 4 | 5 | Grub of TUD 6 | ----------- 7 | http://os.inf.tu-dresden.de/~adam/grub 8 | 9 | see file menu.lst in this directory 10 | 11 | Pulsar of TUD 12 | ------------- 13 | http://os.inf.tu-dresden.de/~us15/pulsar 14 | -------------------------------------------------------------------------------- /demo/example.conf/empty.nulconfig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /demo/example.conf/menu.lst: -------------------------------------------------------------------------------- 1 | title example nul config 2 | kernel /nul/hypervisor.new 3 | modaddr 0x6000000 4 | module /nul/sigma0.nul.gz S0_DEFAULT \ 5 | hostvga hostkeyb:0,0x60,1,12 hostserial vnet script_start:1,64 6 | module /nul/vancouver.nul.gz 7 | module /tools/munich 8 | module /linux/bzImage 9 | module /linux/initrd1.lzma 10 | module /linux/initrd2.lzma 11 | module /linux/initrd3.lzma 12 | module /cfg/vmm1.nulconfig 13 | module /cfg/vmm2.nulconfig 14 | module /cfg/empty.nulconfig \ 15 | sigma0::mem:512 sigma0::dma name::/s0/log name::/s0/timer name::/s0/fs/rom || \ 16 | rom:///nul/vancouver.nul.gz 82576vf_vnet PC_PS2 || \ 17 | rom:///tools/munich || \ 18 | rom:///linux/bzImage clocksource=tsc || \ 19 | rom:///linux/initrd3.lzma 20 | -------------------------------------------------------------------------------- /demo/example.conf/vmm1.nulconfig: -------------------------------------------------------------------------------- 1 | sigma0::mem:512 sigma0::dma name::/s0/log name::/s0/timer name::/s0/fs/rom || 2 | rom:///nul/vancouver.nul.gz 82576vf_vnet PC_PS2 || 3 | rom:///tools/munich || 4 | rom:///linux/bzImage clocksource=tsc || 5 | rom:///linux/initrd1.lzma 6 | -------------------------------------------------------------------------------- /demo/example.conf/vmm2.nulconfig: -------------------------------------------------------------------------------- 1 | sigma0::mem:512 sigma0::dma name::/s0/log name::/s0/timer name::/s0/fs/rom || 2 | rom:///nul/vancouver.nul.gz 82576vf_vnet PC_PS2 || 3 | rom:///tools/munich || 4 | rom:///linux/bzImage clocksource=tsc || 5 | rom:///linux/initrd2.lzma 6 | -------------------------------------------------------------------------------- /demo/lib/tinf/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.Lib(target_env, 8 | "tinf", 9 | SOURCES = [ 10 | 'src/tinflate.c', 11 | 'src/tinfgzip.c', 12 | 'src/tinfzlib.c', 13 | 'src/adler32.c', 14 | 'src/crc32.c', 15 | ]) 16 | 17 | # EOF 18 | -------------------------------------------------------------------------------- /demo/lib/tinf/examples/tgunzip/makefile.b32: -------------------------------------------------------------------------------- 1 | ## 2 | ## tgunzip - gzip decompressor example 3 | ## 4 | ## Borland C/C++ makefile (GNU Make) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = tgunzip.exe 13 | objects = tgunzip.obj 14 | libs = ..\..\lib\tinf.lib 15 | temps = tgunzip.tds 16 | 17 | cflags = -a16 -K -O2 -OS -I..\..\src 18 | ldflags = -C -q -Gn -x -Gz -ap -Tpe 19 | 20 | .PHONY: all clean 21 | 22 | all: $(target) 23 | 24 | $(target): $(objects) 25 | ilink32 $(ldflags) c0x32 $(objects), $@ , , import32 cw32 $(libs) , , 26 | 27 | %.obj : %.c 28 | bcc32 $(cflags) -c $< 29 | 30 | clean: 31 | $(RM) $(objects) $(target) $(temps) 32 | -------------------------------------------------------------------------------- /demo/lib/tinf/examples/tgunzip/makefile.dj2: -------------------------------------------------------------------------------- 1 | ## 2 | ## tgunzip - gzip decompressor example 3 | ## 4 | ## DJGPP makefile 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = tgunzip.exe 13 | objects = tgunzip.o 14 | libs = ../../lib/libtinf.a 15 | 16 | cflags = -s -Wall -Os -fomit-frame-pointer -I../../src 17 | ldflags = $(cflags) 18 | 19 | .PHONY: all clean 20 | 21 | all: $(target) 22 | 23 | $(target): $(objects) 24 | gcc $(ldflags) -o $@ $^ $(libs) 25 | 26 | %.o : %.c 27 | gcc $(cflags) -o $@ -c $< 28 | 29 | clean: 30 | $(RM) $(objects) $(target) 31 | -------------------------------------------------------------------------------- /demo/lib/tinf/examples/tgunzip/makefile.dmc: -------------------------------------------------------------------------------- 1 | ## 2 | ## tgunzip - gzip decompressor example 3 | ## 4 | ## Digital Mars C/C++ makefile (GNU Make) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = tgunzip.exe 13 | objects = tgunzip.obj 14 | libs = ..\..\lib\tinf.lib 15 | temps = tgunzip.map 16 | 17 | cflags = -s -mn -o+all -I..\..\src 18 | ldflags = $(cflags) 19 | 20 | .PHONY: all clean 21 | 22 | all: $(target) 23 | 24 | $(target): $(objects) 25 | dmc $(ldflags) -o$@ $^ $(libs) 26 | 27 | %.obj : %.c 28 | dmc $(cflags) -c $< 29 | 30 | clean: 31 | $(RM) $(objects) $(target) $(temps) 32 | -------------------------------------------------------------------------------- /demo/lib/tinf/examples/tgunzip/makefile.elf: -------------------------------------------------------------------------------- 1 | ## 2 | ## tgunzip - gzip decompressor example 3 | ## 4 | ## GCC makefile (Linux, FreeBSD, BeOS and QNX) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = tgunzip 13 | objects = tgunzip.o 14 | libs = ../../lib/libtinf.a 15 | 16 | cflags = -s -Wall -Os -I../../src 17 | ldflags = $(cflags) 18 | 19 | .PHONY: all clean 20 | 21 | all: $(target) 22 | 23 | $(target): $(objects) 24 | gcc $(ldflags) -o $@ $^ $(libs) 25 | 26 | %.o : %.c 27 | gcc $(cflags) -c $< 28 | 29 | clean: 30 | $(RM) $(objects) $(target) 31 | -------------------------------------------------------------------------------- /demo/lib/tinf/examples/tgunzip/makefile.mgw: -------------------------------------------------------------------------------- 1 | ## 2 | ## tgunzip - gzip decompressor example 3 | ## 4 | ## MinGW / Cygwin makefile 5 | ## 6 | ## Copyright (c) 1998-2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | 10 | target = tgunzip.exe 11 | objects = tgunzip.o 12 | libs = ../../lib/libtinf.a 13 | 14 | cflags = -s -Wall -Os -fomit-frame-pointer -I../../src 15 | ldflags = $(cflags) 16 | 17 | .PHONY: all clean 18 | 19 | all: $(target) 20 | 21 | $(target): $(objects) 22 | gcc $(ldflags) -o $@ $^ $(libs) 23 | 24 | %.o : %.c 25 | gcc $(cflags) -o $@ -c $< 26 | 27 | clean: 28 | $(RM) $(target) $(objects) 29 | -------------------------------------------------------------------------------- /demo/lib/tinf/examples/tgunzip/makefile.vc: -------------------------------------------------------------------------------- 1 | ## 2 | ## tgunzip - gzip decompressor example 3 | ## 4 | ## Visual C/C++ makefile (GNU Make) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | 10 | target = tgunzip.exe 11 | objects = tgunzip.obj 12 | libs = ../../lib/tinf.lib 13 | 14 | cflags = /nologo /W3 /O1 /G6 /W3 /Gy /GF /I..\..\src 15 | ldflags = /nologo /release /opt:ref /opt:icf 16 | 17 | .PHONY: all clean 18 | 19 | all: $(target) 20 | 21 | $(target): $(objects) 22 | link $(ldflags) /out:$@ $^ $(libs) 23 | 24 | %.obj : %.c 25 | cl $(cflags) -c $< 26 | 27 | clean: 28 | $(RM) $(target) $(objects) 29 | -------------------------------------------------------------------------------- /demo/lib/tinf/examples/tgunzip/makefile.wat: -------------------------------------------------------------------------------- 1 | ## 2 | ## tgunzip - gzip decompressor example 3 | ## 4 | ## Watcom / OpenWatcom C/C++ makefile (GNU Make) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = tgunzip.exe 13 | objects = tgunzip.obj 14 | libs = ../../lib/tinf.lib 15 | system = nt 16 | 17 | cflags = -bt=$(system) -d0 -ox -I..\..\src 18 | ldflags = system $(system) 19 | 20 | .PHONY: all clean 21 | 22 | all: $(target) 23 | 24 | $(target): $(objects) 25 | wlink $(ldflags) name $@ file {$^} library {$(libs)} 26 | 27 | %.obj : %.c 28 | wcc386 $(cflags) $< 29 | 30 | clean: 31 | $(RM) $(objects) $(target) 32 | -------------------------------------------------------------------------------- /demo/lib/tinf/include/tinf.h: -------------------------------------------------------------------------------- 1 | ../src/tinf.h -------------------------------------------------------------------------------- /demo/lib/tinf/src/makefile.b32: -------------------------------------------------------------------------------- 1 | ## 2 | ## tinflib - tiny inflate library (inflate, gzip, zlib) 3 | ## 4 | ## Borland C/C++ makefile (GNU Make) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = ..\lib\tinf.lib 13 | objects = tinflate.obj tinfgzip.obj tinfzlib.obj adler32.obj crc32.obj 14 | 15 | cflags = -a16 -K -O2 -OS 16 | 17 | .PHONY: all clean 18 | 19 | all: $(target) 20 | 21 | $(target): $(objects) 22 | $(RM) $@ 23 | echo $(patsubst %,+%,$(objects)) >> lib.cmd 24 | tlib $@ /C @lib.cmd 25 | $(RM) lib.cmd 26 | 27 | %.obj : %.c 28 | bcc32 $(cflags) -c $< 29 | 30 | %.obj : %.nas 31 | nasm -o $@ -f obj -D_OBJ_ -O3 -Inasm/ $< 32 | 33 | clean: 34 | $(RM) $(objects) $(target) $(temps) 35 | -------------------------------------------------------------------------------- /demo/lib/tinf/src/makefile.dj2: -------------------------------------------------------------------------------- 1 | ## 2 | ## tinflib - tiny inflate library (inflate, gzip, zlib) 3 | ## 4 | ## DJGPP makefile 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = ../lib/libtinf.a 13 | objects = tinflate.o tinfgzip.o tinfzlib.o adler32.o crc32.o 14 | 15 | cflags = -s -Wall -Os -fomit-frame-pointer 16 | 17 | .PHONY: all clean 18 | 19 | all: $(target) 20 | 21 | $(target): $(objects) 22 | $(RM) $@ 23 | ar -frsv $@ $^ 24 | ranlib $@ 25 | 26 | %.o : %.c 27 | gcc $(cflags) -o $@ -c $< 28 | 29 | %.o : %.nas 30 | nasm -o $@ -f coff -O3 -Inasm/ $< 31 | 32 | clean: 33 | $(RM) $(objects) $(target) 34 | -------------------------------------------------------------------------------- /demo/lib/tinf/src/makefile.dmc: -------------------------------------------------------------------------------- 1 | ## 2 | ## tinflib - tiny inflate library (inflate, gzip, zlib) 3 | ## 4 | ## Digital Mars C/C++ makefile (GNU Make) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = ..\lib\tinf.lib 13 | objects = tinflate.obj tinfgzip.obj tinfzlib.obj adler32.obj crc32.obj 14 | 15 | cflags = -s -mn -o+all 16 | 17 | .PHONY: all clean 18 | 19 | all: $(target) 20 | 21 | $(target): $(objects) 22 | $(RM) $@ 23 | lib -c $@ $^ 24 | 25 | %.obj : %.c 26 | dmc $(cflags) -c $< 27 | 28 | %.obj : %.nas 29 | nasm -o $@ -f obj -D_OBJ_ -O3 $< 30 | 31 | clean: 32 | $(RM) $(objects) $(target) $(temps) 33 | -------------------------------------------------------------------------------- /demo/lib/tinf/src/makefile.elf: -------------------------------------------------------------------------------- 1 | ## 2 | ## tinflib - tiny inflate library (inflate, gzip, zlib) 3 | ## 4 | ## GCC makefile (Linux, FreeBSD, BeOS and QNX) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = ../lib/libtinf.a 13 | objects = tinflate.o tinfgzip.o tinfzlib.o adler32.o crc32.o 14 | 15 | cflags = -s -Wall -Os 16 | ldflags = $(cflags) 17 | 18 | .PHONY: all clean 19 | 20 | all: $(target) 21 | 22 | $(target): $(objects) 23 | $(RM) $@ 24 | ar -frsv $@ $^ 25 | ranlib $@ 26 | 27 | %.o : %.c 28 | gcc $(cflags) -o $@ -c $< 29 | 30 | %.o : %.nas 31 | nasm -o $@ -f elf -D_ELF_ -O3 -Inasm/ $< 32 | 33 | clean: 34 | $(RM) $(objects) $(target) 35 | -------------------------------------------------------------------------------- /demo/lib/tinf/src/makefile.mgw: -------------------------------------------------------------------------------- 1 | ## 2 | ## tinflib - tiny inflate library (inflate, gzip, zlib) 3 | ## 4 | ## MinGW / Cygwin makefile 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | 10 | target = ../lib/libtinf.a 11 | objects = tinflate.o tinfgzip.o tinfzlib.o adler32.o crc32.o 12 | 13 | cflags = -s -Wall -Os -fomit-frame-pointer 14 | 15 | .PHONY: all clean 16 | 17 | all: $(target) 18 | 19 | $(target): $(objects) 20 | $(RM) $@ 21 | ar -frsv $@ $^ 22 | ranlib $@ 23 | 24 | %.o : %.c 25 | gcc $(cflags) -o $@ -c $< 26 | 27 | %.o : %.nas 28 | nasm -o $@ -f win32 -O3 -Inasm/ $< 29 | 30 | clean: 31 | $(RM) $(target) $(objects) 32 | -------------------------------------------------------------------------------- /demo/lib/tinf/src/makefile.vc: -------------------------------------------------------------------------------- 1 | ## 2 | ## tinflib - tiny inflate library (inflate, gzip, zlib) 3 | ## 4 | ## Visual C++ Makefile (GNU Make) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | 10 | target = ../lib/tinf.lib 11 | objects = tinflate.obj tinfgzip.obj tinfzlib.obj adler32.obj crc32.obj 12 | 13 | cflags = /nologo /W3 /O1 /G6 /W3 /Gy /GF 14 | 15 | .PHONY: all clean 16 | 17 | all: $(target) 18 | 19 | $(target): $(objects) 20 | $(RM) $@ 21 | lib /OUT:$@ $^ 22 | 23 | %.obj : %.c 24 | cl $(cflags) -c $< 25 | 26 | %.obj : %.nas 27 | nasm -o $@ -f win32 -O3 -Inasm/ $< 28 | 29 | clean: 30 | $(RM) $(target) $(objects) 31 | -------------------------------------------------------------------------------- /demo/lib/tinf/src/makefile.wat: -------------------------------------------------------------------------------- 1 | ## 2 | ## tinflib - tiny inflate library (inflate, gzip, zlib) 3 | ## 4 | ## Watcom / OpenWatcom C/C++ makefile (GNU Make) 5 | ## 6 | ## Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | ## All Rights Reserved 8 | ## 9 | ## http://www.ibsensoftware.com/ 10 | ## 11 | 12 | target = ..\lib\tinf.lib 13 | objects = tinflate.obj tinfgzip.obj tinfzlib.obj adler32.obj crc32.obj 14 | system = nt 15 | 16 | cflags = -bt=$(system) -d0 -obmlrs -s -zl 17 | 18 | .PHONY: all clean 19 | 20 | all: $(target) 21 | 22 | $(target): $(objects) 23 | $(RM) $@ 24 | echo $(patsubst %,+%,$(objects)) >> lib.cmd 25 | wlib -c -n -q -s -fo -io $@ @lib.cmd 26 | $(RM) lib.cmd 27 | 28 | %.obj : %.c 29 | wcc386 $(cflags) $< 30 | 31 | %.obj : %.nas 32 | nasm -o $@ -f obj -D_OBJ_ -O3 -Inasm/ $< 33 | 34 | clean: 35 | $(RM) $(objects) $(target) 36 | -------------------------------------------------------------------------------- /demo/lib/tinf/src/tinf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tinf - tiny inflate library (inflate, gzip, zlib) 3 | * 4 | * version 1.00 5 | * 6 | * Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | * All Rights Reserved 8 | * 9 | * http://www.ibsensoftware.com/ 10 | */ 11 | 12 | #ifndef TINF_H_INCLUDED 13 | #define TINF_H_INCLUDED 14 | 15 | /* calling convention */ 16 | #ifndef TINFCC 17 | #ifdef __WATCOMC__ 18 | #define TINFCC __cdecl 19 | #else 20 | #define TINFCC 21 | #endif 22 | #endif 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | #define TINF_OK 0 29 | #define TINF_DATA_ERROR (-3) 30 | 31 | /* function prototypes */ 32 | 33 | void TINFCC tinf_init(); 34 | 35 | int TINFCC tinf_uncompress(void *dest, unsigned int *destLen, 36 | const void *source, unsigned int sourceLen); 37 | 38 | int TINFCC tinf_gzip_uncompress(void *dest, unsigned int *destLen, 39 | const void *source, unsigned int sourceLen); 40 | 41 | int TINFCC tinf_zlib_uncompress(void *dest, unsigned int *destLen, 42 | const void *source, unsigned int sourceLen); 43 | 44 | unsigned int TINFCC tinf_adler32(const void *data, unsigned int length); 45 | 46 | unsigned int TINFCC tinf_crc32(const void *data, unsigned int length); 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* TINF_H_INCLUDED */ 53 | -------------------------------------------------------------------------------- /julian/apps/per-cpu-service/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'per-cpu-service', 8 | SOURCES = [ 'per-cpu-service.cc' ], 9 | INCLUDE = [ 'sigma0' ], 10 | LIBS = [ 'runtime' ], 11 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o']) 12 | 13 | # EOF 14 | -------------------------------------------------------------------------------- /julian/apps/per-cpu-service/closure.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct Closure { 6 | uint8 mov_edx_opcode; 7 | uint32 mov_edx_value; 8 | uint8 jmp_opcode; 9 | uint32 jmp_target; 10 | uint8 end[0]; 11 | 12 | mword value() const { return reinterpret_cast(this); } 13 | void set(mword tls, mword method) { 14 | // eax == pt_id 15 | // mov tls, %edx 16 | // jmp somewhere 17 | mov_edx_opcode = 0xBA; 18 | mov_edx_value = tls; 19 | jmp_opcode = 0xE9; 20 | jmp_target = method - reinterpret_cast(end); 21 | }; 22 | } __attribute__((packed)); 23 | 24 | // EOF 25 | -------------------------------------------------------------------------------- /julian/apps/per-cpu-service/per-cpu-service.nulconfig: -------------------------------------------------------------------------------- 1 | namespace::/s0 name::/s0/admission name::/s0/pcpus namespace::/s0 || 2 | rom://bin/apps/per-cpu-service.nul 3 | -------------------------------------------------------------------------------- /julian/apps/per-cpu-service/per-cpu-service.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT verbose hostserial hostvga script_start:1,1 script_waitchild hostkeyb:0,0x60,1,12,2 4 | bin/apps/per-cpu-service.nul 5 | bin/apps/per-cpu-service.nulconfig < 6 | class Queue { 7 | 8 | T * volatile _head; 9 | 10 | public: 11 | 12 | class ListElement { 13 | public: 14 | T * volatile next; 15 | }; 16 | 17 | void enqueue(T *e) { 18 | T *head; 19 | do { 20 | head = _head; 21 | e->next = head; 22 | } while (not __sync_bool_compare_and_swap(&_head, head, e)); 23 | 24 | } 25 | 26 | T *dequeue() { 27 | T *head; 28 | do { 29 | head = _head; 30 | if (head == NULL) return NULL; 31 | } while (not __sync_bool_compare_and_swap(&_head, head, head->next)); 32 | return head; 33 | } 34 | 35 | Queue() : _head(NULL) { } 36 | }; 37 | 38 | // EOF 39 | -------------------------------------------------------------------------------- /julian/apps/per-cpu-service/vnetsw.nulconfig: -------------------------------------------------------------------------------- 1 | namespace::/s0 name::/s0/admission name::/s0/vnetsw || 2 | rom://bin/apps/vnetsw.nul 3 | -------------------------------------------------------------------------------- /julian/boot/bridge: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | QEMU_FLAGS=-m 1024 -no-kvm-irqchip 4 | bin/apps/sigma0.nul S0_DEFAULT hostvga:0,0 hostkeyb:0+0x60+1+12 service_config name::/s0/events script_start:1 script_start:2 5 | bin/apps/bridge.nul 6 | bin/apps/packetdump.nul 7 | bridge.nulconfig < 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License version 2 as 11 | * published by the Free Software Foundation. 12 | * 13 | * Vancouver is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | 24 | // XXX This could be much nicer if device initialization would run 25 | // in a separate thread that can sleep. 26 | void NubusManager::spin(unsigned ms) 27 | { 28 | timevalue timeout = _clock->abstime(ms, 1000); 29 | while (_clock->time() < timeout) { 30 | asm volatile ("pause"); 31 | } 32 | } 33 | 34 | NubusManager::NubusManager(HostVfPci pcicfg, Clock *clock) 35 | : _pci(pcicfg), _clock(clock), _root_bus(*this) 36 | { 37 | Logging::printf("Nubus initialized.\n"); 38 | } 39 | 40 | 41 | PARAM_HANDLER(nubus, 42 | "nubus - PCI bus manager") 43 | { 44 | HostVfPci pci(mb.bus_hwpcicfg, mb.bus_hostop); 45 | new NubusManager(pci, mb.clock()); 46 | } 47 | 48 | 49 | // EOF 50 | -------------------------------------------------------------------------------- /julian/include/cstdint: -------------------------------------------------------------------------------- 1 | ../lib/crun/include/cstdint -------------------------------------------------------------------------------- /julian/include/stdlib.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C -*- */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | /* XXX Move to malloc.h */ 8 | BEGIN_EXTERN_C 9 | void *realloc(void *ptr, size_t size); 10 | void *malloc(size_t size); 11 | void free(void *ptr); 12 | END_EXTERN_C 13 | 14 | /* EOF */ 15 | -------------------------------------------------------------------------------- /julian/lib/dlmalloc/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | # dlmalloc-config.h 8 | nul.Lib(target_env, 9 | "dlmalloc", 10 | SOURCES = [ 'dlmalloc-support.cc', 11 | 'dlmalloc.c' 12 | ]) 13 | 14 | # EOF 15 | -------------------------------------------------------------------------------- /julian/model/82576vf.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: C++ -*- 2 | /** @file 3 | * Intel 82576 VF device model. 4 | * 5 | * Copyright (C) 2010, Julian Stecklina 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of Vancouver. 9 | * 10 | * Vancouver is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License version 2 as 12 | * published by the Free Software Foundation. 13 | * 14 | * Vancouver is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | 24 | class Mta { 25 | uint32 _bits[128]; 26 | 27 | public: 28 | 29 | static uint16 hash(EthernetAddr const &addr) 30 | { 31 | return 0xFFF & (((addr.byte[4] >> 4) 32 | | static_cast(addr.byte[5]) << 4)); 33 | } 34 | 35 | bool includes(EthernetAddr const &addr) const 36 | { 37 | uint16 h = hash(addr); 38 | return (_bits[(h >> 5) & 0x7F] & (1 << (h & 0x1F))) != 0; 39 | } 40 | 41 | void set(uint16 hash) { _bits[(hash >> 5) & 0x7F] |= 1 << (hash&0x1F); } 42 | void clear() { memset(_bits, 0, sizeof(_bits)); } 43 | 44 | Mta() : _bits() { } 45 | }; 46 | 47 | // EOF 48 | -------------------------------------------------------------------------------- /julian/model/82576vf/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('host_env') 6 | 7 | for f in ['mmio', 'pci']: 8 | host_env.Command('#include/model/82576vf%s.inc' % f, ['genreg.py', 'reg_%s.py' % f], 9 | '${SOURCES[0]} ${SOURCES[1:]} ${TARGET}') 10 | 11 | for f in ['mmio']: 12 | host_env.Command('#include/model/82576vf%s_vnet.inc' % f, ['genreg2.py', 'reg_%s.py' % f], 13 | '${SOURCES[0]} ${SOURCES[1:]} ${TARGET}') 14 | 15 | # EOF 16 | -------------------------------------------------------------------------------- /julian/model/utils.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: C++ -*- 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | static inline void *alloc_from_guest(DBus &hostop, size_t size) 8 | { 9 | MessageHostOp alloc(MessageHostOp::OP_ALLOC_FROM_GUEST, size); 10 | if (not hostop.send(alloc)) 11 | Logging::panic("Could not allocate register window.\n"); 12 | 13 | // Cannot translate alloc.phys directly, because it is beyond 14 | // "normal" physical memory now and we would get NULL back. 15 | MessageHostOp conv(MessageHostOp::OP_GUEST_MEM, 0UL); 16 | if (not hostop.send(conv) or (conv.ptr == NULL)) 17 | Logging::panic("Could not convert VM pointer?\n"); 18 | 19 | return conv.ptr + alloc.phys; 20 | } 21 | 22 | // EOF 23 | -------------------------------------------------------------------------------- /kernel/contrib/NOVA_REVISION: -------------------------------------------------------------------------------- 1 | 8cf912cc8e504d325a61e03904535d96bf31fadb 2 | -------------------------------------------------------------------------------- /kernel/contrib/NOVA_URL: -------------------------------------------------------------------------------- 1 | git://github.com/IntelLabs/NOVA.git 2 | -------------------------------------------------------------------------------- /kernel/contrib/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | import os 5 | 6 | Import('target_env') 7 | Import('host_env') 8 | 9 | # If a NOVA directory exists, use it as-is, otherwise checkout a 10 | # known-good revision and apply our patches (if there are any). 11 | checkout = host_env.Command("nova/README.md", ["NOVA_URL", "NOVA_REVISION", "checkout-nova.sh", Glob("nova-patches/*.patch")], 12 | "${SOURCES[2]} `dirname $TARGET` `cat ${SOURCES[0]}` `cat ${SOURCES[1]}` ${SOURCES[3:]}") 13 | 14 | build = target_env.Command("nova/build/hypervisor-x86_32", "nova/README.md", 15 | "make -sC `dirname $TARGET` CC=${CC} CXX=${CXX}" % target_env) 16 | AlwaysBuild(build) 17 | Precious(build) 18 | 19 | host_env.InstallAs("#bin/apps/hypervisor", build) 20 | 21 | 22 | # EOF 23 | -------------------------------------------------------------------------------- /kernel/contrib/checkout-nova.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | TARGET=$1 4 | URL=$2 5 | REVISION=$3 6 | 7 | if test -d "$TARGET" && ( cd "$TARGET" && git rev-parse --is-inside-work-tree >/dev/null ) && \ 8 | test -z "$(cd "$TARGET" && git rev-parse --show-prefix)"; then 9 | if ! ( cd "$TARGET" && git show --oneline $REVISION >/dev/null 2>&1 ); then 10 | ( cd "$TARGET" && git fetch ) 11 | fi 12 | else 13 | rm -rf "$TARGET" || exit 1 14 | git clone "$URL" $TARGET || exit 1 15 | ( cd $TARGET && git branch nul-local ) || exit 1 16 | fi 17 | 18 | ( cd $TARGET && git checkout nul-local && git reset --hard "$REVISION" ) || exit 1 19 | 20 | shift 3 21 | 22 | while [ $# -ne 0 ]; do 23 | ( cd $TARGET && git apply "$1" && git commit -am "$1" ) || exit 24 | shift 25 | done 26 | 27 | # EOF 28 | -------------------------------------------------------------------------------- /kernel/contrib/nova-patches/.keep.me: -------------------------------------------------------------------------------- 1 | Just placeholder to make Git create this directory automatically. 2 | -------------------------------------------------------------------------------- /kernel/contrib/nova-patches/config.patch: -------------------------------------------------------------------------------- 1 | diff --git a/include/config.hpp b/include/config.hpp 2 | index f891bd1..c6932f2 100644 3 | --- a/include/config.hpp 4 | +++ b/include/config.hpp 5 | @@ -22,7 +22,7 @@ 6 | 7 | #define CFG_VER 6 8 | 9 | -#define NUM_CPU 64 10 | +#define NUM_CPU 32 11 | #define NUM_IRQ 16 12 | #define NUM_EXC 32 13 | #define NUM_VMI 256 14 | -------------------------------------------------------------------------------- /michal/apps/echo/echo2ssnoxlate.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | WVDESC=Echo service without capability translation based on SSession 4 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT hostserial hostvga verbose hostkeyb:0,0x60,1,12,2 \ 5 | script \ 6 | script_start:1 \ 7 | script_start:2 \ 8 | script_waitchild \ 9 | script_start:3 \ 10 | script_waitchild 11 | bin/apps/echo2ss-noxlate.nul 12 | echo.nulconfig < 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of Vancouver.nova. 9 | * 10 | * Vancouver.nova is free software: you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License version 12 | * 2 as published by the Free Software Foundation. 13 | * 14 | * Vancouver.nova is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | #include 21 | 22 | #ifndef NOXLATE 23 | #include "service_echo.h" 24 | #else 25 | #include "service_echo_noxlate.h" 26 | #define EchoProtocol EchoProtocolNoXlate 27 | #endif 28 | 29 | class EchoTest : public WvProgram 30 | { 31 | public: 32 | void wvrun(Utcb *utcb, Hip *hip) 33 | { 34 | unsigned last_val = 0; 35 | EchoProtocol *echo = new EchoProtocol(this); 36 | 37 | WVPASSEQ(echo->echo(*myutcb(), 42), 42U); 38 | WVPASSEQ(echo->get_last(*myutcb(), last_val), 0U); 39 | WVPASSEQ(last_val, 42U); 40 | echo->close(); 41 | } 42 | }; 43 | 44 | ASMFUNCS(EchoTest, WvTest) 45 | -------------------------------------------------------------------------------- /michal/apps/echo/echo2test.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | WVDESC=Echo service with sessions 4 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT hostserial hostvga verbose hostkeyb:0,0x60,1,12,2 \ 5 | script \ 6 | script_start:1 \ 7 | script_start:2 \ 8 | script_waitchild \ 9 | script_start:3 \ 10 | script_waitchild 11 | bin/apps/echo2.nul 12 | echo.nulconfig < 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of Vancouver.nova. 9 | * 10 | * Vancouver.nova is free software: you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License version 12 | * 2 as published by the Free Software Foundation. 13 | * 14 | * Vancouver.nova is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | #include "wvprogram.h" 21 | #include "service_echo.h" 22 | 23 | class EchoTest : public WvProgram 24 | { 25 | public: 26 | void wvrun(Utcb *utcb, Hip *hip) 27 | { 28 | EchoProtocol *echo = new EchoProtocol(this); 29 | 30 | WVPASSEQ(echo->echo(*myutcb(), 42), 42U); 31 | } 32 | }; 33 | 34 | ASMFUNCS(EchoTest, WvTest) 35 | -------------------------------------------------------------------------------- /michal/apps/echo/echotest.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | WVDESC=Simple echo service 4 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT hostserial hostvga verbose hostkeyb:0,0x60,1,12,2 \ 5 | script \ 6 | script_start:1 \ 7 | script_start:2 \ 8 | script_waitchild \ 9 | script_start:3 \ 10 | script_waitchild 11 | bin/apps/echo.nul 12 | echo.nulconfig < 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of NUL (NOVA user land). 9 | * 10 | * NUL is free software: you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License version 12 | * 2 as published by the Free Software Foundation. 13 | * 14 | * NUL is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | 24 | class DiskNameCheck : public WvProgram 25 | { 26 | public: 27 | 28 | void wvrun(Utcb *utcb, Hip *hip) 29 | { 30 | DiskHelper disk(this, 0); 31 | 32 | unsigned count = 0; 33 | disk.get_disk_count(*BaseProgram::myutcb(), count); 34 | bool match = false; 35 | WVSHOW(count); 36 | for (unsigned i=0; i disks.log 14 | WVPASS cat > expected.log < 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of NUL (NOVA user land). 9 | * 10 | * NUL is free software: you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License version 12 | * 2 as published by the Free Software Foundation. 13 | * 14 | * NUL is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | #include 21 | 22 | class Pong : public WvProgram 23 | { 24 | static void portal_func(unsigned long mtr) { } 25 | 26 | public: 27 | void wvrun(Utcb *utcb, Hip *hip) 28 | { 29 | unsigned service_cap = alloc_cap(); 30 | cap_sel ec; 31 | WVPASS(ec = create_ec4pt(this, utcb->head.nul_cpunr, 0)); 32 | WVSHOWHEX(ec); 33 | cap_sel pt = alloc_cap(); 34 | WVNOVA(nova_create_pt(pt, ec, reinterpret_cast(portal_func), 0)); 35 | WVNUL(ParentProtocol::register_service(*utcb, "/pong", utcb->head.nul_cpunr, pt, service_cap)); 36 | } 37 | }; 38 | 39 | ASMFUNCS(Pong, WvTest) 40 | -------------------------------------------------------------------------------- /michal/apps/tests/startstop.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | HYPERVISOR_PARAMS= 4 | QEMU_FLAGS=-cpu coreduo -smp 2 5 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT hostserial hostvga hostkeyb:0,0x60,1,12,2 \ 6 | script_start:1 script_waitchild service_config 7 | bin/apps/startstop.nul 8 | bin/apps/startstop.nulconfig < /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 12 | fi 13 | 14 | # if [ -x /usr/local/sbin/fp ]; then 15 | # /usr/local/sbin/fp 16 | # fi 17 | 18 | # Initialize tap connector 19 | if [ -x /etc/rc.d/rc.tapconn ]; then 20 | . /etc/rc.d/rc.tapconn 21 | fi 22 | -------------------------------------------------------------------------------- /michal/boot/gdisk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | QEMU_FLAGS=-net nic,model=ne2k_pci -net user,hostfwd=tcp:127.0.0.1:2222-:22 -hda disk.img 4 | KERNEL=imgs/bzImage-js ip=dhcp 5 | # console=uart,mmio,0xd0e01000,115200n8 6 | imgs/initramfs-gdisk.bz2 7 | -------------------------------------------------------------------------------- /michal/boot/hello: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | bin/apps/sigma0.nul S0_DEFAULT \ 4 | verbose \ 5 | hostserial \ 6 | hostvga \ 7 | script_start:1,1 \ 8 | hostkeyb:0,0x60,1,12,2 9 | bin/apps/hello.nul 10 | hello.nulconfig < /tmp/nova-vmware 4 | ./nova-82573 --dump > /tmp/nova-82573 5 | ./nova-82576 --dump > /tmp/nova-82576 6 | ./nova-qemu --dump > /tmp/nova-qemu 7 | ../novaboot -c /dev/null --iso=nova-vmware.iso -- /tmp/nova-vmware /tmp/nova-82576 /tmp/nova-82573 /tmp/nova-qemu ../gdisk 8 | ovftool -tt=vmx --powerOffTarget --overwrite vmware/NOVA.vmx . 9 | echo 'vhv.enable = "TRUE"' >> NOVA/NOVA.vmx 10 | -------------------------------------------------------------------------------- /michal/boot/passive/deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | d=$(dirname $0) 4 | 5 | $d/nova-82576 --server=~passive/deploy --rsync-flags="--chmod=Dg+s,ug+w,o-w,+rX --rsync-path=\"umask 002 && rsync\"" 6 | cp $d/nova $d/nova-82576 ~passive/deploy/ 7 | -------------------------------------------------------------------------------- /michal/boot/passive/nova-82573: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | exec novaboot --scriptmod='s/\@SIGMA0_ARGS@/host82573:0 hostahci/' "$@" -- $(dirname $0)/nova 3 | -------------------------------------------------------------------------------- /michal/boot/passive/nova-82576: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | exec novaboot --scriptmod='s/\@SIGMA0_ARGS@/host82576:0 host82576vf:0,0,1 hostahci/' "$@" -- $(dirname $0)/nova 3 | -------------------------------------------------------------------------------- /michal/boot/passive/nova-82576-static-ip: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | exec novaboot --scriptmod='s/\@SIGMA0_ARGS@/host82576:0 host82576vf:0,0,1 hostahci/' \ 3 | --scriptmod='s|IP_CONFIG|ip=141.76.48.226/29 mask=255.255.255.248 gw=141.76.48.225|' \ 4 | --server=erwin:~sojka/boot/passive --rsync-flags="--chmod=Dg+s,ug+w,o-w,+X --rsync-path=\"umask 002 && rsync\"" --grub-prefix="(nd)/tftpboot/sojka/passive" $(dirname $0)/nova 5 | -------------------------------------------------------------------------------- /michal/boot/passive/nova-qemu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | img=$(readlink -f $(dirname $0)/../../../build/imgs)/gpt-disk-10M.img 3 | set -x 4 | rm -f $img 5 | dd if=/dev/zero of=$img bs=1k seek=10k count=1 6 | test -x /sbin/sgdisk && sgdisk=/sbin/sgdisk 7 | test -x /usr/sbin/sgdisk && sgdisk=/usr/sbin/sgdisk 8 | $sgdisk --clear --new=1:0:0 --partition-guid=1:6ec3cb42-3c6d-45c7-a07b-02c85ecf12f2 --typecode=1:2be899e8-009f-47d1-a069-bd4bc05c20ea --info=1 $img 9 | 10 | exec novaboot --scriptmod='s/\@SIGMA0_ARGS@/hostne2k hostide/' "$@" -- $(dirname $0)/nova 11 | -------------------------------------------------------------------------------- /michal/boot/passive/nova-vmware: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | exec novaboot --scriptmod='s/\@SIGMA0_ARGS@/host82573:0 hostide/' "$@" -- $(dirname $0)/nova 3 | -------------------------------------------------------------------------------- /michal/boot/passive/peig-vm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | HYPERVISOR_PARAMS=iommu 4 | QEMU_FLAGS=-cpu phenom -smp 2 -m 512 5 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT mmconfig hostserial hostvga hostkeyb:0,0x60,1,12 service_config hostahci nubus host82576:0 host82576vf:0,0,1 verbose \ 6 | service_disk \ 7 | script_start:1 \ 8 | script_waitchild \ 9 | script_start:2 10 | bin/apps/logdisk.nul 11 | bin/apps/logdisk.nulconfig < 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of NUL (NOVA user land). 9 | * 10 | * NUL is free software: you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License version 12 | * 2 as published by the Free Software Foundation. 13 | * 14 | * NUL is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | class TimerHelper : public TimerProtocol 24 | { 25 | Clock clock; 26 | KernelSemaphore timersem; 27 | 28 | public: 29 | 30 | unsigned msleep(unsigned msecs) 31 | { 32 | unsigned res; 33 | res = timer(*BaseProgram::myutcb(), clock.abstime(msecs, 1000)); 34 | if (res) return res; 35 | timersem.downmulti(); 36 | return ENONE; 37 | } 38 | 39 | TimerHelper(CapAllocator *a) : 40 | TimerProtocol(a->alloc_cap(TimerProtocol::CAP_SERVER_PT + Global::hip.cpu_desc_count())), 41 | clock(Global::hip.freq_tsc * 1000), 42 | timersem(get_notify_sm()) 43 | 44 | {} 45 | }; 46 | -------------------------------------------------------------------------------- /michal/include/wvprogram.h: -------------------------------------------------------------------------------- 1 | ../wvtest/wvprogram.h -------------------------------------------------------------------------------- /michal/include/wvtest.h: -------------------------------------------------------------------------------- 1 | ../wvtest/wvtest.h -------------------------------------------------------------------------------- /michal/wvtest/.gitignore: -------------------------------------------------------------------------------- 1 | html/ 2 | -------------------------------------------------------------------------------- /michal/wvtest/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | 5 | Import('target_env') 6 | 7 | nul.App(target_env, 'wvtesttest', 8 | SOURCES = [ 'wvtesttest.cc' ], 9 | OBJS = [ '#service/simplemalloc.o', '#service/logging.o', '#service/vprintf.o'], 10 | MEMSIZE = 1<<16) 11 | 12 | # EOF 13 | -------------------------------------------------------------------------------- /michal/wvtest/for-each-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [[ $# = 0 ]]; then cat >&2 < 7 | Example: $0 5296754..ff8af37 wvnulrun ./diskbench-vm -I 8 | EOF 9 | exit 1 10 | fi 11 | 12 | range=$1 13 | shift 14 | 15 | toplevel=$(git rev-parse --show-toplevel) 16 | 17 | 18 | for GIT_COMMIT in $(git log --format=%h --date-order --reverse $range); do 19 | git checkout --quiet $GIT_COMMIT 20 | (cd $toplevel; git submodule --quiet update --init) 21 | ver=$(git log -n 1 --date=iso --format="%cd, commit: $(git describe --dirty) (%an: %s)") 22 | echo "Testing \"$ver\" in $0:" 23 | (cd $toplevel/build && scons -j2) 24 | eval "$@" 25 | done 26 | -------------------------------------------------------------------------------- /michal/wvtest/nul-nightly-cron.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | PATH=$HOME/bin:$PATH 4 | ret=0 5 | log=$(date '+nul_%F_%T.log') 6 | 7 | cd ~/nul 8 | umask 022 9 | 10 | git fetch --quiet 11 | git stash --quiet # Save any chnages made by humans e.g. some testing 12 | git checkout --quiet master 13 | git reset --quiet --hard origin/master 14 | git clean --quiet -fxd > /dev/null 15 | git submodule --quiet foreach --recursive 'git stash --quiet; git clean --quiet -fxd' 16 | git submodule --quiet update --init 17 | 18 | if ! cmp $0 michal/wvtest/nul-nightly-cron.sh; then 19 | cp michal/wvtest/nul-nightly-cron.sh $0 && exec $0 20 | fi 21 | 22 | cd ~/nul-nightly 23 | if nul-nightly.sh > $log 2>&1; then 24 | ( cd ~/nul; git push --quiet -f origin master:tested ) || : 25 | else 26 | ret=1 27 | ( 28 | cat < performance.html && mv performance.html ~/public_html/nul/ || exit 1 44 | wvtest2html.py ~/public_html/nul/test-report < $log || exit 1 45 | 46 | git push --quiet backup HEAD 47 | -------------------------------------------------------------------------------- /michal/wvtest/passive-test-cron: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | cd ~/nul 6 | 7 | # Switch to suspend branch used for PASSIVE 8 | git checkout --quiet suspend 9 | git reset --quiet --hard origin/suspend 10 | 11 | if ! cmp $0 michal/wvtest/passive-test-cron; then 12 | cp michal/wvtest/passive-test-cron $0 && exec $0 13 | fi 14 | 15 | (set -o pipefail; michal/wvtest/passive-test "$@" 2>&1 | tee passive-test.log) 16 | success=$? 17 | 18 | wvtest2html.py ~/public_html/nul/passive-test-report < passive-test.log || exit 1 19 | 20 | if [ $success != 0 ]; then 21 | ( 22 | cat < $backup/run 19 | chmod +x $backup/run 20 | 21 | echo 22 | echo "Binaries of this failed test were backed up to $backup/" 23 | fi 24 | fi 25 | done 26 | exit $exitcode 27 | -------------------------------------------------------------------------------- /michal/wvtest/sizes.wv: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nulroot=$(readlink -f $(dirname $0)/../..) 4 | wvpath=$nulroot/michal/wvtest 5 | 6 | . $wvpath/wvtest.sh 7 | 8 | WVSTART Sizes of binaries 9 | 10 | #set -x 11 | 12 | print_sizes() { 13 | fn=$1 14 | bn=$(basename $fn .nul) 15 | WVPERF $bn $(stat -c '%s' $fn) bytes 16 | set -- $(size $fn|tail -n 1) 17 | WVPERF $bn.text $1 bytes 18 | WVPERF $bn.data $2 bytes 19 | } 20 | 21 | print_sizes $nulroot/build/bin/apps/sigma0.bare.nul 22 | print_sizes $nulroot/build/bin/apps/vancouver.nul 23 | 24 | -------------------------------------------------------------------------------- /michal/wvtest/wvprogram.h: -------------------------------------------------------------------------------- 1 | #ifndef WVPROGRAM_H 2 | #define WVPROGRAM_H 3 | 4 | #include 5 | 6 | #include 7 | #include "sigma0/console.h" 8 | 9 | class WvProgram : public NovaProgram, public ProgramConsole 10 | { 11 | public: 12 | 13 | void test_init(Utcb *utcb, Hip *hip) { 14 | init(hip); 15 | init_mem(hip); 16 | console_init("wvtest", new Semaphore(alloc_cap(), true)); 17 | 18 | // Connect to the trace buffer 19 | _console_data.log = new LogProtocol(alloc_cap(LogProtocol::CAP_SERVER_PT + hip->cpu_count())); 20 | 21 | //Logging::printf("\nTesting \"%s\" in %s:\n", descr, file); 22 | } 23 | 24 | void test_done() { 25 | // WVPASS(WvTest::tests_run > 0); 26 | 27 | // Logging::printf("WvTest: %d test%s, %d failure%s.\n", 28 | // WvTest::tests_run, WvTest::tests_run==1 ? "" : "s", 29 | // WvTest::tests_failed, WvTest::tests_failed==1 ? "": "s"); 30 | } 31 | 32 | virtual void wvrun(Utcb *utcb, Hip *hip) = 0; 33 | 34 | void NORETURN run(Utcb *utcb, Hip *hip) { 35 | test_init(utcb, hip); 36 | wvrun(utcb, hip); 37 | test_done(); 38 | do_exit(0); 39 | } 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /michal/wvtest/wvtest.fail: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT hostserial hostvga verbose hostkeyb:0,0x60,1,12,2 \ 4 | script \ 5 | script_start:1 6 | bin/apps/wvtesttest.nul 7 | wvtesttest.nulconfig < 6 | * Economic rights: Technische Universitaet Dresden (Germany) 7 | * 8 | * This file is part of Vancouver.nova. 9 | * 10 | * Vancouver.nova is free software: you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License version 12 | * 2 as published by the Free Software Foundation. 13 | * 14 | * Vancouver.nova is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License version 2 for more details. 18 | */ 19 | 20 | // TODO: Add nul/ below 21 | #include 22 | 23 | class Test : public WvProgram 24 | { 25 | public: 26 | void wvrun(Utcb *utcb, Hip *hip) 27 | { 28 | WVPASS(1); 29 | WVPASSEQ(1, 1); 30 | WVPASSNE(1, 2); 31 | WVPASSLT(1, 2); 32 | 33 | WVPASSEQ("hello", "hello"); 34 | WVPASSNE("hello", "hello2"); 35 | 36 | char *cmdline = reinterpret_cast(hip->get_mod(0)->aux); 37 | 38 | // Fail if you see "fail" on command line 39 | WVFAIL(strstr(cmdline, "fail")); 40 | } 41 | }; 42 | 43 | ASMFUNCS(Test, WvTest) 44 | -------------------------------------------------------------------------------- /michal/wvtest/wvtesttest.wv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | WVDESC=Tests WvTest framework itself 4 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT \ 5 | verbose \ 6 | hostserial \ 7 | hostvga \ 8 | hostkeyb:0,0x60,1,12,2 \ 9 | script_start:1 \ 10 | script_waitchild 11 | bin/apps/wvtesttest.nul 12 | wvtesttest.nulconfig < 6 | # Licensed under the GNU Library General Public License, version 2. 7 | # See the included file named LICENSE for license information. 8 | # 9 | use strict; 10 | use Getopt::Long; 11 | 12 | sub usage() { 13 | print STDERR "Usage: $0 < wvtest.log\n"; 14 | exit 127; 15 | } 16 | 17 | usage() if (@ARGV > 0); 18 | 19 | my $istty = -t STDOUT && $ENV{'TERM'} ne "dumb"; 20 | my $columns; 21 | if ($istty) { 22 | $columns = `tput cols`; 23 | } else { 24 | $columns = $ENV{'COLUMNS'} || 80; 25 | } 26 | 27 | $| = 1; 28 | 29 | while (<>) 30 | { 31 | chomp; 32 | s/\r//g; 33 | 34 | if (/^(\([0-9]+\) (# )?)?!\s*(.*?)\s+(\S+)\s*$/) { 35 | my $line = $_; 36 | do { 37 | print substr($line, 0, $columns) . "\n"; 38 | $line = length($line) > $columns ? substr($line, $columns) : ''; 39 | } while (length($line)); 40 | } else { 41 | print "$_\n"; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /nils/boot/cycleburner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env novaboot 2 | # -*-sh-*- 3 | QEMU_FLAGS=-s -S -cpu coreduo 4 | bin/apps/sigma0.nul tracebuffer_verbose S0_DEFAULT hostserial hostvga verbose hostkeyb:0,0x60,1,12,2 \ 5 | hostide \ 6 | hostahci \ 7 | script \ 8 | script_start:1 9 | bin/apps/cycleburner.nul 10 | diskbench.nulconfig < 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License version 2 as 11 | * published by the Free Software Foundation. 12 | * 13 | * Vancouver is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | #pragma once 19 | #include "sys/utcb.h" 20 | #include "service/cpu.h" 21 | 22 | /** 23 | * A generic cpu state class. 24 | */ 25 | class CpuState : public Utcb 26 | { 27 | public: 28 | unsigned cpl() { return (ss.ar >> 5) & 3; } 29 | unsigned iopl() { return (efl >> 12) & 3; } 30 | unsigned pm() { return cr0 & 0x1; } 31 | unsigned pg() { return cr0 & 0x80000000; } 32 | unsigned v86() { return cr0 & 0x1 && efl & (1 << 17); } 33 | void edx_eax(unsigned long long value) 34 | { 35 | eax = value; 36 | edx = value >> 32; 37 | }; 38 | 39 | unsigned long long edx_eax() { return union64(edx, eax); }; 40 | }; 41 | -------------------------------------------------------------------------------- /vancouver/include/model/sata.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * Shared SATA definitions. 3 | * 4 | * Copyright (C) 2009, Bernhard Kauer 5 | * Economic rights: Technische Universitaet Dresden (Germany) 6 | * 7 | * This file is part of Vancouver. 8 | * 9 | * Vancouver is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License version 2 as 11 | * published by the Free Software Foundation. 12 | * 13 | * Vancouver is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License version 2 for more details. 17 | */ 18 | 19 | #pragma once 20 | 21 | class FisReceiver 22 | { 23 | protected: 24 | FisReceiver *_peer; 25 | public: 26 | FisReceiver() : _peer(0) {} 27 | virtual void receive_fis(unsigned fislen, unsigned *fis) = 0; 28 | void set_peer(FisReceiver *peer) { _peer = peer; } 29 | }; 30 | -------------------------------------------------------------------------------- /vancouver/model/SConscript: -------------------------------------------------------------------------------- 1 | # -*- Mode: Python -*- 2 | 3 | import nul 4 | Import('target_env') 5 | 6 | nul.Lib(target_env, 'model', SOURCES = Glob('*.cc')) 7 | 8 | # EOF 9 | --------------------------------------------------------------------------------