From 997da44b0f1ef3e60711513aa474e6c0f5b9ec91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Fri, 5 Apr 2019 14:54:11 +0200 Subject: [PATCH 01/81] threads: Add support for pthread_create/phtread_exit --- api/kernel/elf.hpp | 2 +- api/kernel/threads.hpp | 32 +++++ src/arch/x86_64/__syscall_entry.asm | 123 ++++++++---------- src/arch/x86_64/arch_start.asm | 3 +- src/arch/x86_64/syscall_entry.cpp | 62 ++++++++- src/kernel/CMakeLists.txt | 3 +- src/kernel/elf.cpp | 2 +- src/kernel/threads.cpp | 61 +++++++++ src/musl/exit.cpp | 14 +- src/platform/x86_pc/init_libc.cpp | 4 + .../kernel/integration/threads/CMakeLists.txt | 23 ++++ test/kernel/integration/threads/README.md | 9 ++ test/kernel/integration/threads/service.cpp | 58 +++++++++ test/kernel/integration/threads/test.py | 13 ++ test/kernel/integration/threads/vm.json | 4 + 15 files changed, 335 insertions(+), 78 deletions(-) create mode 100644 api/kernel/threads.hpp create mode 100644 src/kernel/threads.cpp create mode 100644 test/kernel/integration/threads/CMakeLists.txt create mode 100644 test/kernel/integration/threads/README.md create mode 100644 test/kernel/integration/threads/service.cpp create mode 100755 test/kernel/integration/threads/test.py create mode 100644 test/kernel/integration/threads/vm.json diff --git a/api/kernel/elf.hpp b/api/kernel/elf.hpp index bfff58eeb6..ee37e04e61 100644 --- a/api/kernel/elf.hpp +++ b/api/kernel/elf.hpp @@ -36,7 +36,7 @@ struct Elf // doesn't use heap static safe_func_offset - safe_resolve_symbol(void* addr, char* buffer, size_t length); + safe_resolve_symbol(const void* addr, char* buffer, size_t length); //returns the address of a symbol, or 0 static uintptr_t diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp new file mode 100644 index 0000000000..8cdb38e9fe --- /dev/null +++ b/api/kernel/threads.hpp @@ -0,0 +1,32 @@ +#pragma once +#include + +namespace kernel +{ + struct thread_t { + thread_t* self; + int tid; + void* ret_instr; + void* ret_stack; + + void init(int tid); + }; + + inline thread_t* get_thread() + { + thread_t* thread; + # ifdef ARCH_x86_64 + asm("movq %%fs:(0x10), %0" : "=r" (thread)); + # elif defined(ARCH_i686) + asm("movq %%gs:(0x08), %0" : "=r" (thread)); + # else + #error "Implement me?" + # endif + return thread; + } + + thread_t* thread_create() noexcept; + void thread_exit() noexcept; + + void setup_main_thread() noexcept; +} diff --git a/src/arch/x86_64/__syscall_entry.asm b/src/arch/x86_64/__syscall_entry.asm index d1146d514b..5d1b0eb1a5 100644 --- a/src/arch/x86_64/__syscall_entry.asm +++ b/src/arch/x86_64/__syscall_entry.asm @@ -15,9 +15,9 @@ ;; limitations under the License. global __syscall_entry:function -global __test_syscall:function +global __clone_helper:function +global __clone_exit:function extern syscall_entry -extern kprintf ;; x86_64 / System V ABI calling convention %define arg1 rdi @@ -27,9 +27,8 @@ extern kprintf %define arg5 r8 %define arg6 r9 -;; Preserve caller-saved registers %macro PUSHAQ 0 - push rax + ;;push rax push rcx push rdx push rdi @@ -38,13 +37,8 @@ extern kprintf push r9 push r10 push r11 - ; Preserve extended state - ;fxsave [__xsave_storage_area] %endmacro %macro POPAQ 0 - ; Restore extended state - ;fxrstor [__xsave_storage_area] - pop r11 pop r10 pop r9 @@ -53,28 +47,18 @@ extern kprintf pop rdi pop rdx pop rcx - pop rax + ;;pop rax %endmacro -%define stack_size 32768 - -section .bss -temp_stack: - resb stack_size -temp_old_stack: - resq 1 -temp_rcx: - resq 1 -section .text +SECTION .text __syscall_entry: - ;; mov [temp_rcx], rcx - ;; mov [temp_old_stack], rsp - ;; mov rsp, temp_stack + stack_size - 16 + ;; clone syscall + cmp rax, 56 + je __clone_helper + ;; store return address push rcx - ;; sub rsp, 8 - ;; Convert back from syscall conventions ;; Last param on stack movq 8(rsp),r9 mov r9, r8 @@ -83,51 +67,56 @@ __syscall_entry: mov rdx, rsi mov rsi, rdi mov rdi, rax - call syscall_entry - ;; add rsp, 8 + ;; return to rcx pop rcx + jmp QWORD rcx - ;; mov rsp, [temp_old_stack] - jmp QWORD rcx ;[temp_rcx] - - -__test_syscall: - mov [kparam.stack], rsp - mov arg1, kparam.rsp - mov arg2, [kparam.stack] - mov arg3, 0 +__clone_helper: + PUSHAQ + push rsp ;; alignment + ;; R9: thread callback + push r9 + ;; RSP: old stack push rsp - and rsp, ~15 - call kprintf - pop rsp - - mov rsi, rdi ; shift for syscall - mov edi, 0x1002 ;/* SET_FS register */ - mov eax, 158 ;/* set fs segment to */ - - - syscall ;/* arch_prctl(SET_FS, arg)*/ - mov [kparam.stack], rsp - mov arg1, kparam.rsp - mov arg2, [kparam.stack] - mov arg3, 0 - - push rsp - and rsp, ~15 - call kprintf - pop rsp - ret - -;; Make thread local -kparam: - .rsp: - db `__test_syscall: Stack: 0x%lx\n`,0 - .fmt_rcx: - db `__test_syscall: rcx: 0x%lx\n`,0 - .stack: - dq 0 - .rcx: - dq 0 + mov r11, rcx + ;; R9: struct pt_regs* regs + mov r9, r8 + ;; R8: void* ctid + mov r8, r10 + ;; RCX: void* ptid + mov rcx, rdx + ;; RDX: void* stack + mov rdx, rsi + ;; RSI: unsigned long flags + mov rsi, rdi + ;; RDI: next instruction + mov rdi, r11 + + ;; call clone so that kernel can create the thread data + extern syscall_clone + call syscall_clone + ;; remove old rsp + add rsp, 0x18 + ;; return value preserved + POPAQ + PUSHAQ + push rbp + + ;; switch stack + mov rsp, rsi + ;; zero return value + xor rax, rax + ;; return back + jmp QWORD rcx + +__clone_exit: + mov rax, rdx + mov rbx, rdi + mov rsp, rsi + pop rbp + POPAQ + ;; + jmp QWORD rbx diff --git a/src/arch/x86_64/arch_start.asm b/src/arch/x86_64/arch_start.asm index 983f2599e1..16c5bdc59b 100644 --- a/src/arch/x86_64/arch_start.asm +++ b/src/arch/x86_64/arch_start.asm @@ -202,8 +202,9 @@ __gdt64_base_pointer: dw $ - GDT64 - 1 ; Limit. dq GDT64 ; Base. -SECTION .bss +SECTION .rodata tls_table: dq tls_table +SECTION .bss smp_table: resw 8 diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index ae5bb46afd..0f9ca2c81f 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -15,11 +15,16 @@ // limitations under the License. #include +#include #include #include #include #include +extern "C" { + long syscall_SYS_set_thread_area(void* u_info); +} + #define ARCH_SET_GS 0x1001 #define ARCH_SET_FS 0x1002 #define ARCH_GET_FS 0x1003 @@ -28,6 +33,7 @@ #ifdef __x86_64__ static long sys_prctl(int code, uintptr_t ptr) { + return -ENOSYS; switch(code){ case ARCH_SET_GS: //kprintf(" set_gs to %#lx\n", ptr); @@ -48,11 +54,59 @@ static long sys_prctl(int code, uintptr_t ptr) } #endif +#include +static void print_symbol(const void* addr) +{ + char buffer[8192]; + auto symb = Elf::safe_resolve_symbol(addr, buffer, sizeof(buffer)); + kprintf("0x%lx + 0x%.3x: %s\n", + symb.addr, symb.offset, symb.name); +} + +struct libc_internal { + void* self; + void* dtv; + void* kthread; +}; + extern "C" -uintptr_t syscall_entry(uint64_t n, uint64_t a1, uint64_t a2, uint64_t a3, - uint64_t a4, uint64_t a5) +void* syscall_clone(void* next_instr, + unsigned long flags, void* stack, + void* ptid, void* ctid, void* newtls, + void* old_stack, void* callback) +{ + /* + kprintf("clone nexti: "); print_symbol(next_instr); + kprintf("clone flags: %#lx\n", flags); + kprintf("clone stack: %p\n", stack); + kprintf("clone parent: %p\n", ptid); + kprintf("clone child: %p\n", ctid); + kprintf("clone tls: %p\n", newtls); + kprintf("clone old stack: %p\n", old_stack); + kprintf("thread callback: "); print_symbol(callback); + */ + + auto* thread = kernel::thread_create(); + thread->ret_instr = next_instr; + thread->ret_stack = old_stack; + // new TLS location (arch-specific) + syscall_SYS_set_thread_area(newtls); + // store ourselves in the guarded libc structure + auto* s = (libc_internal*) newtls; + s->kthread = thread; + return thread; +} + +extern "C" +uintptr_t syscall_entry(long n, long a1, long a2, long a3, long a4, long a5) { switch(n) { + case 56: // clone + assert(0 && "Clone needs to be implemented in assembly"); + case 57: // fork + return -ENOSYS; + case 58: // vfork + return -ENOSYS; case 158: // arch_prctl sys_prctl(a1, a2); break; @@ -63,9 +117,9 @@ uintptr_t syscall_entry(uint64_t n, uint64_t a1, uint64_t a2, uint64_t a3, return 0; } -extern "C" -long syscall_SYS_set_thread_area(struct user_desc *u_info) +long syscall_SYS_set_thread_area(void* u_info) { + //kprintf(" set to %p\n", u_info); if (UNLIKELY(!u_info)) return -EINVAL; #ifdef __x86_64__ x86::CPU::set_fs(u_info); diff --git a/src/kernel/CMakeLists.txt b/src/kernel/CMakeLists.txt index 3cc5d5348b..b898970b8f 100644 --- a/src/kernel/CMakeLists.txt +++ b/src/kernel/CMakeLists.txt @@ -16,8 +16,9 @@ set(SRCS # profile.cpp terminal.cpp timers.cpp + threads.cpp + #tls.cpp rng.cpp - tls.cpp vga.cpp context.cpp #context_asm.asm diff --git a/src/kernel/elf.cpp b/src/kernel/elf.cpp index 696cd6019c..16d4275683 100644 --- a/src/kernel/elf.cpp +++ b/src/kernel/elf.cpp @@ -235,7 +235,7 @@ uintptr_t Elf::resolve_addr(void* addr) return (uintptr_t) addr; } -safe_func_offset Elf::safe_resolve_symbol(void* addr, char* buffer, size_t length) +safe_func_offset Elf::safe_resolve_symbol(const void* addr, char* buffer, size_t length) { return get_parser().getsym_safe((ElfAddr) addr, buffer, length); } diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp new file mode 100644 index 0000000000..c5228a9e5e --- /dev/null +++ b/src/kernel/threads.cpp @@ -0,0 +1,61 @@ +#include +#include +#include +#include + +extern "C" void __clone_exit(void* next, void* stack, long ret); + +namespace kernel +{ + static int thread_counter = 1; + static std::map threads; + static thread_t main_thread; + + void thread_t::init(int tid) + { + this->self = this; + this->tid = tid; + } + + thread_t* thread_create() noexcept + { + const int tid = __sync_fetch_and_add(&thread_counter, 1); + try { + auto* thread = new thread_t; + thread->init(tid); + + threads.emplace( + std::piecewise_construct, + std::forward_as_tuple(tid), + std::forward_as_tuple(*thread)); + return thread; + } + catch (...) { + return nullptr; + } + } + + void thread_exit() noexcept + { + auto* t = get_thread(); + assert(t->tid != 0 && "Can't exit main thread"); + //kprintf("thread_exit tid=%d RIP: %p RSP: %p\n", + // t->tid, t->ret_instr, t->ret_stack); + __clone_exit(t->ret_instr, t->ret_stack, t->tid); + __builtin_unreachable(); + } + + void setup_main_thread() noexcept + { + main_thread.init(0); + main_thread.ret_stack = nullptr; + main_thread.ret_instr = nullptr; + } +} + +extern "C" +long syscall_SYS_sched_setscheduler(pid_t pid, int policy, + const struct sched_param *param) +{ + return 0; +} diff --git a/src/musl/exit.cpp b/src/musl/exit.cpp index 00cb83a0a3..d911a25491 100644 --- a/src/musl/exit.cpp +++ b/src/musl/exit.cpp @@ -2,13 +2,21 @@ #include #include #include +#include __attribute__((noreturn)) static long sys_exit(int status) { - const std::string msg = "Service exited with status " + std::to_string(status) + "\n"; - os::print(msg.data(), msg.size()); - __arch_poweroff(); + auto* t = kernel::get_thread(); + if (t == 0) { + const std::string msg = "Service exited with status " + std::to_string(status) + "\n"; + os::print(msg.data(), msg.size()); + __arch_poweroff(); + } + else { + // exit from a thread + kernel::thread_exit(); + } __builtin_unreachable(); } diff --git a/src/platform/x86_pc/init_libc.cpp b/src/platform/x86_pc/init_libc.cpp index 0c1ad65a4d..af9c3a6a79 100644 --- a/src/platform/x86_pc/init_libc.cpp +++ b/src/platform/x86_pc/init_libc.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -43,6 +44,9 @@ int kernel_main(int, char * *, char * *) PRATTLE(" OS start \n"); + // setup main thread after global ctors + kernel::setup_main_thread(); + // Initialize early OS, platform and devices #if defined(PLATFORM_x86_pc) kernel::start(grub_magic, grub_addr); diff --git a/test/kernel/integration/threads/CMakeLists.txt b/test/kernel/integration/threads/CMakeLists.txt new file mode 100644 index 0000000000..97d324bbdb --- /dev/null +++ b/test/kernel/integration/threads/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.0) + +# Service +project (smp_test) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake OPTIONAL RESULT_VARIABLE HAS_CONAN) +if (NOT HAS_CONAN) + message(FATAL_ERROR "missing conanbuildinfo.cmake did you forget to run conan install ?") +endif() +conan_basic_setup() + +include(os) + +set(SOURCES + service.cpp # ...add more here +) + +os_add_executable(kernel_smp "SMP test" ${SOURCES}) +os_add_stdout(kernel_smp default_stdout) +os_add_drivers(kernel_smp boot_logger) +#os_add_plugins(service vfs) + +configure_file(test.py ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/test/kernel/integration/threads/README.md b/test/kernel/integration/threads/README.md new file mode 100644 index 0000000000..225488f17f --- /dev/null +++ b/test/kernel/integration/threads/README.md @@ -0,0 +1,9 @@ +### SMP + +``` +mkdir build +cd build +cmake .. +make +../run.sh smp_example +``` diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp new file mode 100644 index 0000000000..629b3bcad0 --- /dev/null +++ b/test/kernel/integration/threads/service.cpp @@ -0,0 +1,58 @@ +// This file is a part of the IncludeOS unikernel - www.includeos.org +// +// Copyright 2015 Oslo and Akershus University College of Applied Sciences +// and Alfred Bratterud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include + +extern "C" { + static void* thread_function1(void* data) + { + printf("Inside thread function1, x = %d\n", *(int*) data); + thread_local int test = 2019; + printf("test @ %p, test = %d\n", &test, test); + return NULL; + } + static void* thread_function2(void* data) + { + printf("Inside thread function2, x = %d\n", *(int*) data); + thread_local int test = 2020; + printf("test @ %p, test = %d\n", &test, test); + pthread_exit(NULL); + } +} + +void Service::start() +{ + int x = 666; + int y = 777; + pthread_t t; + int res; + printf("Calling pthread_create\n"); + res = pthread_create(&t, NULL, thread_function1, &x); + if (res < 0) { + printf("Failed to create thread!\n"); + return; + } + res = pthread_create(&t, NULL, thread_function2, &y); + if (res < 0) { + printf("Failed to create thread!\n"); + return; + } + printf("After pthread_create\n"); + os::shutdown(); +} diff --git a/test/kernel/integration/threads/test.py b/test/kernel/integration/threads/test.py new file mode 100755 index 0000000000..952f0f6367 --- /dev/null +++ b/test/kernel/integration/threads/test.py @@ -0,0 +1,13 @@ +#! /usr/bin/env python + +from builtins import str +import sys +import os + +from vmrunner import vmrunner + +if len(sys.argv) > 1: + vmrunner.vms[0].boot(image_name=str(sys.argv[1])) +else: + vmrunner.vms[0].cmake().boot(20,image_name='kernel_smp').clean() +#vm.cmake(["-Dsingle_threaded=OFF"]).boot(20).clean() diff --git a/test/kernel/integration/threads/vm.json b/test/kernel/integration/threads/vm.json new file mode 100644 index 0000000000..38a80d9209 --- /dev/null +++ b/test/kernel/integration/threads/vm.json @@ -0,0 +1,4 @@ +{ + "image" : "service.img", + "smp" : 1 +} From ba73c02d86b7417a3ddfc30499d83f15788b603f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 10 Apr 2019 16:06:02 +0200 Subject: [PATCH 02/81] threads: Recursive threads by restoring TLS --- api/kernel/threads.hpp | 7 ++-- src/arch/x86_64/__syscall_entry.asm | 3 +- src/arch/x86_64/syscall_entry.cpp | 2 ++ src/kernel/syscalls.cpp | 33 ------------------- src/kernel/threads.cpp | 31 +++++++++++++---- src/musl/exit.cpp | 12 +++++++ .../kernel/integration/threads/CMakeLists.txt | 6 ++-- test/kernel/integration/threads/service.cpp | 31 ++++++++++++++++- 8 files changed, 77 insertions(+), 48 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 8cdb38e9fe..c0d2f384f2 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -5,9 +5,10 @@ namespace kernel { struct thread_t { thread_t* self; - int tid; - void* ret_instr; - void* ret_stack; + int64_t tid; + void* ret_instr; + void* ret_stack; + uint64_t ret_tls; void init(int tid); }; diff --git a/src/arch/x86_64/__syscall_entry.asm b/src/arch/x86_64/__syscall_entry.asm index 5d1b0eb1a5..7283ebf877 100644 --- a/src/arch/x86_64/__syscall_entry.asm +++ b/src/arch/x86_64/__syscall_entry.asm @@ -82,7 +82,7 @@ __clone_helper: push rsp mov r11, rcx - ;; R9: struct pt_regs* regs + ;; R9: TLS data mov r9, r8 ;; R8: void* ctid mov r8, r10 @@ -116,6 +116,7 @@ __clone_exit: mov rax, rdx mov rbx, rdi mov rsp, rsi + pop rbp POPAQ ;; diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index 0f9ca2c81f..e5ecb6864e 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -89,6 +89,8 @@ void* syscall_clone(void* next_instr, auto* thread = kernel::thread_create(); thread->ret_instr = next_instr; thread->ret_stack = old_stack; + thread->ret_tls = x86::CPU::read_msr(IA32_FS_BASE); + //kprintf("thread %ld return TLS: %p\n", thread->tid, (void*) thread->ret_tls); // new TLS location (arch-specific) syscall_SYS_set_thread_area(newtls); // store ourselves in the guarded libc structure diff --git a/src/kernel/syscalls.cpp b/src/kernel/syscalls.cpp index 5bc23e6db4..9be6660cfd 100644 --- a/src/kernel/syscalls.cpp +++ b/src/kernel/syscalls.cpp @@ -17,15 +17,11 @@ #include #include -#include #include #include #include #include -#include #include -#include -#include #if defined (UNITTESTS) && !defined(__MACH__) #define THROW throw() @@ -33,40 +29,11 @@ #define THROW #endif -// We can't use the usual "info", as printf isn't available after call to exit -#define SYSINFO(TEXT, ...) kprintf("%13s ] " TEXT "\n", "[ Kernel", ##__VA_ARGS__) - // Emitted if and only if panic (unrecoverable system wide error) happens static const char* panic_signature = "\x15\x07\t**** PANIC ****"; extern uintptr_t heap_begin; extern uintptr_t heap_end; -/* -extern "C" __attribute__((noreturn)) -void abort_message(const char* format, ...) -{ - static char abort_buf[2048]; - va_list list; - va_start(list, format); - vsnprintf(abort_buf, sizeof(abort_buf), format, list); - va_end(list); - panic(abort_buf); -}*/ - -void _exit(int status) { - SYSINFO("Service exiting with status %d", status); - kernel::default_exit(); - __builtin_unreachable(); -} - -extern "C" -void syscall_SYS_exit_group(int status) -{ - SYSINFO("Service exiting with status %d", status); - kernel::default_exit(); - __builtin_unreachable(); -} - struct alignas(SMP_ALIGN) context_buffer { std::array buffer; diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index c5228a9e5e..dc9330a8d6 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -1,14 +1,24 @@ #include +#include #include #include #include -extern "C" void __clone_exit(void* next, void* stack, long ret); +extern "C" { + void __clone_exit(void* next, void* stack, long ret); + long syscall_SYS_set_thread_area(void* u_info); +} + +struct libc_internal { + void* self; + void* dtv; + kernel::thread_t* kthread; +}; namespace kernel { - static int thread_counter = 1; - static std::map threads; + static int64_t thread_counter = 1; + static std::map threads; static thread_t main_thread; void thread_t::init(int tid) @@ -39,8 +49,10 @@ namespace kernel { auto* t = get_thread(); assert(t->tid != 0 && "Can't exit main thread"); - //kprintf("thread_exit tid=%d RIP: %p RSP: %p\n", - // t->tid, t->ret_instr, t->ret_stack); + //kprintf("thread_exit tid=%ld RIP: %p RSP: %p TLS: %#lx\n", + // t->tid, t->ret_instr, t->ret_stack, t->ret_tls); + + syscall_SYS_set_thread_area((void*) t->ret_tls); __clone_exit(t->ret_instr, t->ret_stack, t->tid); __builtin_unreachable(); } @@ -50,12 +62,17 @@ namespace kernel main_thread.init(0); main_thread.ret_stack = nullptr; main_thread.ret_instr = nullptr; + main_thread.ret_tls = 0; + // allow exiting in main thread + uint64_t tls = x86::CPU::read_msr(IA32_FS_BASE); + auto* s = (libc_internal*) tls; + s->kthread = &main_thread; } } extern "C" -long syscall_SYS_sched_setscheduler(pid_t pid, int policy, - const struct sched_param *param) +long syscall_SYS_sched_setscheduler(pid_t /*pid*/, int /*policy*/, + const struct sched_param* /*param*/) { return 0; } diff --git a/src/musl/exit.cpp b/src/musl/exit.cpp index d911a25491..4d7d1542dc 100644 --- a/src/musl/exit.cpp +++ b/src/musl/exit.cpp @@ -4,6 +4,9 @@ #include #include +// We can't use the usual "info", as printf isn't available after call to exit +#define SYSINFO(TEXT, ...) kprintf("%13s ] " TEXT "\n", "[ Kernel", ##__VA_ARGS__) + __attribute__((noreturn)) static long sys_exit(int status) { @@ -20,6 +23,15 @@ static long sys_exit(int status) __builtin_unreachable(); } +extern "C" +void syscall_SYS_exit_group(int status) +{ + auto* t = kernel::get_thread(); + SYSINFO("Service exiting with status %d (thread %ld)\n", status, t->tid); + kernel::default_exit(); + __builtin_unreachable(); +} + extern "C" void syscall_SYS_exit(int status) { strace(sys_exit, "exit", status); diff --git a/test/kernel/integration/threads/CMakeLists.txt b/test/kernel/integration/threads/CMakeLists.txt index 97d324bbdb..0f5854a854 100644 --- a/test/kernel/integration/threads/CMakeLists.txt +++ b/test/kernel/integration/threads/CMakeLists.txt @@ -15,9 +15,9 @@ set(SOURCES service.cpp # ...add more here ) -os_add_executable(kernel_smp "SMP test" ${SOURCES}) -os_add_stdout(kernel_smp default_stdout) -os_add_drivers(kernel_smp boot_logger) +os_add_executable(kernel_threads "Threads test" ${SOURCES}) +os_add_stdout(kernel_threads default_stdout) +os_add_drivers(kernel_threads boot_logger) #os_add_plugins(service vfs) configure_file(test.py ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index 629b3bcad0..c86511df0c 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -19,6 +19,12 @@ #include #include +struct testdata +{ + int depth = 0; + const int max_depth = 5; +}; + extern "C" { static void* thread_function1(void* data) { @@ -34,6 +40,26 @@ extern "C" { printf("test @ %p, test = %d\n", &test, test); pthread_exit(NULL); } + static void* recursive_function(void* tdata) + { + auto* data = (testdata*) tdata; + data->depth++; + printf("Thread depth: %d / %d\n", data->depth, data->max_depth); + if (data->depth < data->max_depth) + { + pthread_t t; + int res = pthread_create(&t, NULL, recursive_function, data); + if (res < 0) { + printf("Failed to create thread!\n"); + return NULL; + } + } + printf("Thread exiting: %d / %d\n", data->depth, data->max_depth); + data->depth--; + pthread_t t = pthread_self(); + pthread_exit(&t); + return NULL; + } } void Service::start() @@ -53,6 +79,9 @@ void Service::start() printf("Failed to create thread!\n"); return; } - printf("After pthread_create\n"); + printf("Now testing recursive threads...\n"); + static testdata rdata; + recursive_function(&rdata); + printf("SUCCESS\n"); os::shutdown(); } From 314ef2ad2b6e7fc59876dc941048e70d8b2b892e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Thu, 11 Apr 2019 11:47:07 +0200 Subject: [PATCH 03/81] threads: Increase recursion depth in the test --- src/kernel/threads.cpp | 1 + test/kernel/integration/threads/service.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index dc9330a8d6..fd3f51f3b0 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index c86511df0c..089240a9ba 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -18,11 +18,12 @@ #include #include #include +#include struct testdata { int depth = 0; - const int max_depth = 5; + const int max_depth = 40; }; extern "C" { @@ -44,7 +45,8 @@ extern "C" { { auto* data = (testdata*) tdata; data->depth++; - printf("Thread depth: %d / %d\n", data->depth, data->max_depth); + printf("%ld: Thread depth %d / %d\n", + kernel::get_thread()->tid, data->depth, data->max_depth); if (data->depth < data->max_depth) { pthread_t t; @@ -54,7 +56,8 @@ extern "C" { return NULL; } } - printf("Thread exiting: %d / %d\n", data->depth, data->max_depth); + printf("%ld: Thread exiting %d / %d\n", + kernel::get_thread()->tid, data->depth, data->max_depth); data->depth--; pthread_t t = pthread_self(); pthread_exit(&t); From fbedca00674c7b764cbc3340f5bb361f47799709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Tue, 16 Jul 2019 14:21:09 +0200 Subject: [PATCH 04/81] threads: Refactor and add basic yield() --- api/kernel/threads.hpp | 35 ++++++- src/arch/x86_64/CMakeLists.txt | 1 + src/arch/x86_64/__syscall_entry.asm | 4 +- src/arch/x86_64/exceptions.asm | 5 +- src/arch/x86_64/syscall_entry.cpp | 28 ++--- src/arch/x86_64/threads.asm | 62 +++++++++++ src/kernel/threads.cpp | 108 ++++++++++++++++---- src/musl/exit.cpp | 10 +- src/musl/sched_yield.cpp | 6 ++ test/kernel/integration/threads/service.cpp | 12 ++- 10 files changed, 218 insertions(+), 53 deletions(-) create mode 100644 src/arch/x86_64/threads.asm diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index c0d2f384f2..1c9456a16d 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -1,16 +1,36 @@ #pragma once #include +#include + +//#define THREADS_DEBUG 1 +#ifdef THREADS_DEBUG +#define THPRINT(fmt, ...) kprintf(fmt, ##__VA_ARGS__) +#else +#define THPRINT(fmt, ...) /* fmt */ +#endif namespace kernel { struct thread_t { thread_t* self; + thread_t* parent = nullptr; int64_t tid; - void* ret_instr; - void* ret_stack; - uint64_t ret_tls; + void* my_tls; + void* my_stack; + // for returning to this thread + void* stored_stack = nullptr; + void* stored_nexti = nullptr; + bool yielded = false; + // children, detached when exited + std::vector children; void init(int tid); + void yield(); + void exit(); + void activate(void* newtls); + void resume(int64_t ctid); + void store_return(void* ret_instr, void* ret_stack); + void libc_store_this(); }; inline thread_t* get_thread() @@ -26,8 +46,13 @@ namespace kernel return thread; } - thread_t* thread_create() noexcept; - void thread_exit() noexcept; + inline int64_t get_tid() { + return get_thread()->tid; + } + + void* get_thread_area(); + + thread_t* thread_create(thread_t* parent) noexcept; void setup_main_thread() noexcept; } diff --git a/src/arch/x86_64/CMakeLists.txt b/src/arch/x86_64/CMakeLists.txt index de8d27d461..1d38d8a3ef 100644 --- a/src/arch/x86_64/CMakeLists.txt +++ b/src/arch/x86_64/CMakeLists.txt @@ -8,6 +8,7 @@ set(ARCH_OBJECTS exceptions.asm interrupts.asm fiber_asm.asm + threads.asm __syscall_entry.asm syscall_entry.cpp ist.cpp diff --git a/src/arch/x86_64/__syscall_entry.asm b/src/arch/x86_64/__syscall_entry.asm index 7283ebf877..598af5f023 100644 --- a/src/arch/x86_64/__syscall_entry.asm +++ b/src/arch/x86_64/__syscall_entry.asm @@ -16,7 +16,7 @@ global __syscall_entry:function global __clone_helper:function -global __clone_exit:function +global __clone_return:function extern syscall_entry ;; x86_64 / System V ABI calling convention @@ -112,7 +112,7 @@ __clone_helper: ;; return back jmp QWORD rcx -__clone_exit: +__clone_return: mov rax, rdx mov rbx, rdi mov rsp, rsi diff --git a/src/arch/x86_64/exceptions.asm b/src/arch/x86_64/exceptions.asm index 0a843b6282..2f02ca975c 100644 --- a/src/arch/x86_64/exceptions.asm +++ b/src/arch/x86_64/exceptions.asm @@ -98,7 +98,7 @@ SECTION .text ;; We don't have the previous stack pointer on stack ;; Make a best guess -%define RSP_OFFS SZ_CALL_FRAME * 2 + ERRCODE_OFFS +%define RSP_OFFS SZ_CALL_FRAME + 0x20 save_cpu_regs: mov regs(RAX), rax @@ -116,8 +116,7 @@ save_cpu_regs: mov regs(R14), r14 mov regs(R15), r15 - mov rax, rsp - add rax, RSP_OFFS + mov rax, QWORD [rsp + RSP_OFFS] mov regs(RSP), rax mov regs(RSI), rsi mov regs(RDI), rdi diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index e5ecb6864e..409e3d3622 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -63,19 +63,13 @@ static void print_symbol(const void* addr) symb.addr, symb.offset, symb.name); } -struct libc_internal { - void* self; - void* dtv; - void* kthread; -}; - extern "C" void* syscall_clone(void* next_instr, unsigned long flags, void* stack, void* ptid, void* ctid, void* newtls, void* old_stack, void* callback) { - /* + /* kprintf("clone nexti: "); print_symbol(next_instr); kprintf("clone flags: %#lx\n", flags); kprintf("clone stack: %p\n", stack); @@ -83,19 +77,18 @@ void* syscall_clone(void* next_instr, kprintf("clone child: %p\n", ctid); kprintf("clone tls: %p\n", newtls); kprintf("clone old stack: %p\n", old_stack); + kprintf("clone old tls: %p\n", kernel::get_thread_area()); kprintf("thread callback: "); print_symbol(callback); - */ + */ + + auto* parent = kernel::get_thread(); + parent->store_return(next_instr, old_stack); - auto* thread = kernel::thread_create(); - thread->ret_instr = next_instr; - thread->ret_stack = old_stack; - thread->ret_tls = x86::CPU::read_msr(IA32_FS_BASE); + // activate new TLS location + auto* thread = kernel::thread_create(parent); + thread->my_stack = stack; + thread->activate(newtls); //kprintf("thread %ld return TLS: %p\n", thread->tid, (void*) thread->ret_tls); - // new TLS location (arch-specific) - syscall_SYS_set_thread_area(newtls); - // store ourselves in the guarded libc structure - auto* s = (libc_internal*) newtls; - s->kthread = thread; return thread; } @@ -119,6 +112,7 @@ uintptr_t syscall_entry(long n, long a1, long a2, long a3, long a4, long a5) return 0; } +extern "C" long syscall_SYS_set_thread_area(void* u_info) { //kprintf(" set to %p\n", u_info); diff --git a/src/arch/x86_64/threads.asm b/src/arch/x86_64/threads.asm new file mode 100644 index 0000000000..fa1416e574 --- /dev/null +++ b/src/arch/x86_64/threads.asm @@ -0,0 +1,62 @@ +;; This file is a part of the IncludeOS unikernel - www.includeos.org +;; +;; Copyright 2018 IncludeOS AS, Oslo, Norway +;; +;; Licensed under the Apache License, Version 2.0 (the "License"); +;; you may not use this file except in compliance with the License. +;; You may obtain a copy of the License at +;; +;; http:;;www.apache.org/licenses/LICENSE-2.0 +;; +;; Unless required by applicable law or agreed to in writing, software +;; distributed under the License is distributed on an "AS IS" BASIS, +;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;; See the License for the specific language governing permissions and +;; limitations under the License. + +global __thread_yield:function +global __thread_restore:function +extern __thread_self_store + +;; x86_64 / System V ABI calling convention +%define arg0 rax +%define arg1 rdi +%define arg2 rsi +%define arg3 rdx +%define arg4 rcx +%define arg5 r8 +%define arg6 r9 + +SECTION .text +__thread_yield: + ;; a normal function call + ;; preserve callee-saved regs + ;; RBX, RBP, and R12–R15 + ;; as well as some thread-specific values + push rbx + push rbp + push r12 + push r13 + push r14 + push r15 + ;; now save this thread + mov rdi, next_instruction + mov rsi, rsp ;; my stack + ;; align stack + sub rsp, 8 + call __thread_self_store + ret + +__thread_restore: + mov rsp, rsi + jmp next_instruction + +next_instruction: + ;; restore saved registers + pop r15 + pop r14 + pop r13 + pop r12 + pop rbp + pop rbx + ret diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index fd3f51f3b0..b77bd69539 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -1,12 +1,15 @@ #include #include +#include #include -#include +#include #include -#include +#include extern "C" { - void __clone_exit(void* next, void* stack, long ret); + void __thread_yield(); + void __thread_restore(void* nexti, void* stack, long tid); + void __clone_return(void* nexti, void* stack, long tid); long syscall_SYS_set_thread_area(void* u_info); } @@ -20,6 +23,7 @@ namespace kernel { static int64_t thread_counter = 1; static std::map threads; + static std::deque suspended; static thread_t main_thread; void thread_t::init(int tid) @@ -28,12 +32,71 @@ namespace kernel this->tid = tid; } - thread_t* thread_create() noexcept + void thread_t::libc_store_this() + { + auto* s = (libc_internal*) this->my_tls; + s->kthread = this; + } + void thread_t::store_return(void* ret_instr, void* ret_stack) + { + THPRINT("thread %ld storing return point %p with stack %p\n", + this->tid, ret_instr, ret_stack); + this->stored_nexti = ret_instr; + this->stored_stack = ret_stack; + } + void thread_t::activate(void* newtls) + { + this->my_tls = newtls; + // store ourselves in the guarded libc structure + this->libc_store_this(); + syscall_SYS_set_thread_area(this->my_tls); + } + + void thread_t::yield() + { + this->yielded = true; + // add to suspended (NB: can throw) + suspended.push_back(this); + // resume a waiting thread + auto* next = suspended.front(); + suspended.pop_front(); + // resume next thread + next->resume(this->tid); + } + + void thread_t::exit() + { + assert(this->parent != nullptr); + // detach children + for (auto* child : this->children) { + child->parent = &main_thread; + } + // resume parent with this as child + this->parent->resume(this->tid); + } + + void thread_t::resume(long ctid) + { + THPRINT("Returning to tid=%ld tls=%p nexti=%p stack=%p\n", + this->tid, this->my_tls, this->stored_nexti, this->stored_stack); + syscall_SYS_set_thread_area(this->my_tls); + // NOTE: the RAX return value here is CHILD thread id, not this + if (yielded == false) { + __clone_return(this->stored_nexti, this->stored_stack, ctid); + } + else { + __thread_restore(this->stored_nexti, this->stored_stack, ctid); + } + __builtin_unreachable(); + } + + thread_t* thread_create(thread_t* parent) noexcept { const int tid = __sync_fetch_and_add(&thread_counter, 1); try { auto* thread = new thread_t; thread->init(tid); + thread->parent = parent; threads.emplace( std::piecewise_construct, @@ -46,31 +109,32 @@ namespace kernel } } - void thread_exit() noexcept - { - auto* t = get_thread(); - assert(t->tid != 0 && "Can't exit main thread"); - //kprintf("thread_exit tid=%ld RIP: %p RSP: %p TLS: %#lx\n", - // t->tid, t->ret_instr, t->ret_stack, t->ret_tls); - - syscall_SYS_set_thread_area((void*) t->ret_tls); - __clone_exit(t->ret_instr, t->ret_stack, t->tid); - __builtin_unreachable(); - } - void setup_main_thread() noexcept { main_thread.init(0); - main_thread.ret_stack = nullptr; - main_thread.ret_instr = nullptr; - main_thread.ret_tls = 0; // allow exiting in main thread - uint64_t tls = x86::CPU::read_msr(IA32_FS_BASE); - auto* s = (libc_internal*) tls; - s->kthread = &main_thread; + main_thread.my_tls = get_thread_area(); + main_thread.libc_store_this(); + } + + void* get_thread_area() + { +# ifdef ARCH_x86_64 + return (void*) x86::CPU::read_msr(IA32_FS_BASE); +# else + #error "Implement me" +# endif } } +extern "C" +void __thread_self_store(void* next_instr, void* stack) +{ + auto* thread = kernel::get_thread(); + thread->store_return(next_instr, stack); + thread->yield(); +} + extern "C" long syscall_SYS_sched_setscheduler(pid_t /*pid*/, int /*policy*/, const struct sched_param* /*param*/) diff --git a/src/musl/exit.cpp b/src/musl/exit.cpp index 4d7d1542dc..71f90c5e2b 100644 --- a/src/musl/exit.cpp +++ b/src/musl/exit.cpp @@ -11,14 +11,20 @@ __attribute__((noreturn)) static long sys_exit(int status) { auto* t = kernel::get_thread(); - if (t == 0) { + if (t->tid == 0) { const std::string msg = "Service exited with status " + std::to_string(status) + "\n"; os::print(msg.data(), msg.size()); __arch_poweroff(); } else { // exit from a thread - kernel::thread_exit(); +#ifdef THREADS_DEBUG + int64_t ptid = -1; + if (t->parent != nullptr) ptid = t->parent->tid; + THPRINT("thread_exit tid=%ld parent=%p ptid: %ld\n", + t->tid, t->parent, ptid); +#endif + t->exit(); } __builtin_unreachable(); } diff --git a/src/musl/sched_yield.cpp b/src/musl/sched_yield.cpp index 3cf320312c..58e6606d2d 100644 --- a/src/musl/sched_yield.cpp +++ b/src/musl/sched_yield.cpp @@ -1,7 +1,13 @@ #include "stub.hpp" +#include + +extern "C" { + void __thread_yield(); +} static long sys_sched_yield() { + __thread_yield(); return 0; } diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index 089240a9ba..2b87536b95 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -32,6 +32,13 @@ extern "C" { printf("Inside thread function1, x = %d\n", *(int*) data); thread_local int test = 2019; printf("test @ %p, test = %d\n", &test, test); + assert(test == 2019); + + printf("Yielding from thread1, expecting to be returned to mt sys clone\n"); + sched_yield(); + printf("Returned to thread1, expecting to exit to where mt yielded from\n"); + + //pthread_exit(NULL); return NULL; } static void* thread_function2(void* data) @@ -56,11 +63,12 @@ extern "C" { return NULL; } } + printf("%ld: Thread yielding %d / %d\n", + kernel::get_thread()->tid, data->depth, data->max_depth); + sched_yield(); printf("%ld: Thread exiting %d / %d\n", kernel::get_thread()->tid, data->depth, data->max_depth); data->depth--; - pthread_t t = pthread_self(); - pthread_exit(&t); return NULL; } } From d7ec120f1452e4cd5863a4c77f8b32fc6dd2224d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 17 Jul 2019 00:03:12 +0200 Subject: [PATCH 05/81] threads: Fully implemented yield and cleanup properly --- api/kernel/threads.hpp | 4 +- src/arch/x86_64/__syscall_entry.asm | 3 +- src/arch/x86_64/syscall_entry.cpp | 42 +++++----- src/arch/x86_64/threads.asm | 10 +-- src/kernel/threads.cpp | 87 +++++++++++++++------ src/musl/exit.cpp | 2 + src/musl/sched_yield.cpp | 5 +- test/kernel/integration/threads/service.cpp | 25 ++++-- 8 files changed, 118 insertions(+), 60 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 1c9456a16d..64027558e9 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -27,8 +27,10 @@ namespace kernel void init(int tid); void yield(); void exit(); + void suspend(void* ret_instr, void* ret_stack); void activate(void* newtls); - void resume(int64_t ctid); + void resume(); + private: void store_return(void* ret_instr, void* ret_stack); void libc_store_this(); }; diff --git a/src/arch/x86_64/__syscall_entry.asm b/src/arch/x86_64/__syscall_entry.asm index 598af5f023..c4c13890fc 100644 --- a/src/arch/x86_64/__syscall_entry.asm +++ b/src/arch/x86_64/__syscall_entry.asm @@ -104,6 +104,7 @@ __clone_helper: POPAQ PUSHAQ push rbp + push rax ;; store thread id ;; switch stack mov rsp, rsi @@ -113,10 +114,10 @@ __clone_helper: jmp QWORD rcx __clone_return: - mov rax, rdx mov rbx, rdi mov rsp, rsi + pop rax ;; restore thread id pop rbp POPAQ ;; diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index 409e3d3622..8d8d92ba34 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -64,32 +64,34 @@ static void print_symbol(const void* addr) } extern "C" -void* syscall_clone(void* next_instr, +pid_t syscall_clone(void* next_instr, unsigned long flags, void* stack, void* ptid, void* ctid, void* newtls, void* old_stack, void* callback) { - /* - kprintf("clone nexti: "); print_symbol(next_instr); - kprintf("clone flags: %#lx\n", flags); - kprintf("clone stack: %p\n", stack); - kprintf("clone parent: %p\n", ptid); - kprintf("clone child: %p\n", ctid); - kprintf("clone tls: %p\n", newtls); - kprintf("clone old stack: %p\n", old_stack); - kprintf("clone old tls: %p\n", kernel::get_thread_area()); - kprintf("thread callback: "); print_symbol(callback); - */ + auto* parent = kernel::get_thread(); - auto* parent = kernel::get_thread(); - parent->store_return(next_instr, old_stack); + auto* thread = kernel::thread_create(parent); +#ifdef THREADS_DEBUG + kprintf("clone syscall creating thread %ld\n", thread->tid); + kprintf("-> nexti: "); print_symbol(next_instr); + kprintf("-> flags: %#lx\n", flags); + kprintf("-> stack: %p\n", stack); + kprintf("-> parent: %p\n", ptid); + kprintf("-> child: %p\n", ctid); + kprintf("-> tls: %p\n", newtls); + kprintf("-> old stack: %p\n", old_stack); + kprintf("-> old tls: %p\n", kernel::get_thread_area()); + kprintf("-> callback: "); print_symbol(callback); +#endif - // activate new TLS location - auto* thread = kernel::thread_create(parent); - thread->my_stack = stack; - thread->activate(newtls); - //kprintf("thread %ld return TLS: %p\n", thread->tid, (void*) thread->ret_tls); - return thread; + // suspend parent thread + parent->suspend(next_instr, old_stack); + // activate new TLS location + thread->my_stack = stack; + thread->activate(newtls); + //kprintf("thread %ld return TLS: %p\n", thread->tid, (void*) thread->ret_tls); + return thread->tid; } extern "C" diff --git a/src/arch/x86_64/threads.asm b/src/arch/x86_64/threads.asm index fa1416e574..aa58bc8854 100644 --- a/src/arch/x86_64/threads.asm +++ b/src/arch/x86_64/threads.asm @@ -16,7 +16,7 @@ global __thread_yield:function global __thread_restore:function -extern __thread_self_store +extern __thread_suspend_and_yield ;; x86_64 / System V ABI calling convention %define arg0 rax @@ -40,18 +40,14 @@ __thread_yield: push r14 push r15 ;; now save this thread - mov rdi, next_instruction + mov rdi, __thread_restore mov rsi, rsp ;; my stack ;; align stack sub rsp, 8 - call __thread_self_store - ret + call __thread_suspend_and_yield __thread_restore: mov rsp, rsi - jmp next_instruction - -next_instruction: ;; restore saved registers pop r15 pop r14 diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index b77bd69539..ca655715c7 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -8,8 +8,8 @@ extern "C" { void __thread_yield(); - void __thread_restore(void* nexti, void* stack, long tid); - void __clone_return(void* nexti, void* stack, long tid); + void __thread_restore(void* nexti, void* stack); + void __clone_return(void* nexti, void* stack); long syscall_SYS_set_thread_area(void* u_info); } @@ -22,10 +22,23 @@ struct libc_internal { namespace kernel { static int64_t thread_counter = 1; - static std::map threads; + static std::map threads; static std::deque suspended; static thread_t main_thread; + static void erase_suspension(thread_t* t) + { + for (auto it = suspended.begin(); it != suspended.end();) + { + if (*it == t) { + it = suspended.erase(it); + } + else { + ++it; + } + } + } + void thread_t::init(int tid) { this->self = this; @@ -52,16 +65,21 @@ namespace kernel syscall_SYS_set_thread_area(this->my_tls); } - void thread_t::yield() + void thread_t::suspend(void* ret_instr, void* ret_stack) { - this->yielded = true; + this->store_return(ret_instr, ret_stack); // add to suspended (NB: can throw) suspended.push_back(this); + } + void thread_t::yield() + { // resume a waiting thread + assert(!suspended.empty()); auto* next = suspended.front(); suspended.pop_front(); // resume next thread - next->resume(this->tid); + this->yielded = true; + next->resume(); } void thread_t::exit() @@ -71,21 +89,40 @@ namespace kernel for (auto* child : this->children) { child->parent = &main_thread; } - // resume parent with this as child - this->parent->resume(this->tid); + // remove myself from parent + auto& pcvec = this->parent->children; + for (auto it = pcvec.begin(); it != pcvec.end(); ++it) { + if (*it == this) { + pcvec.erase(it); break; + } + } + // temporary copy of parent thread pointer + auto* next = this->parent; + // delete this thread + auto it = threads.find(this->tid); + assert(it != threads.end()); + assert(it->second == this); + threads.erase(it); + // free thread resources + delete this; + // resume parent thread + erase_suspension(next); + next->resume(); } - void thread_t::resume(long ctid) + void thread_t::resume() { THPRINT("Returning to tid=%ld tls=%p nexti=%p stack=%p\n", this->tid, this->my_tls, this->stored_nexti, this->stored_stack); - syscall_SYS_set_thread_area(this->my_tls); // NOTE: the RAX return value here is CHILD thread id, not this - if (yielded == false) { - __clone_return(this->stored_nexti, this->stored_stack, ctid); + if (this->yielded == false) { + syscall_SYS_set_thread_area(this->my_tls); + __clone_return(this->stored_nexti, this->stored_stack); } else { - __thread_restore(this->stored_nexti, this->stored_stack, ctid); + this->yielded = false; + syscall_SYS_set_thread_area(this->my_tls); + __thread_restore(this->stored_nexti, this->stored_stack); } __builtin_unreachable(); } @@ -97,11 +134,12 @@ namespace kernel auto* thread = new thread_t; thread->init(tid); thread->parent = parent; + thread->parent->children.push_back(thread); threads.emplace( std::piecewise_construct, std::forward_as_tuple(tid), - std::forward_as_tuple(*thread)); + std::forward_as_tuple(thread)); return thread; } catch (...) { @@ -111,10 +149,11 @@ namespace kernel void setup_main_thread() noexcept { - main_thread.init(0); - // allow exiting in main thread - main_thread.my_tls = get_thread_area(); - main_thread.libc_store_this(); + int stack_value; + main_thread.init(0); + main_thread.my_stack = (void*) &stack_value; + // allow exiting in main thread + main_thread.activate(get_thread_area()); } void* get_thread_area() @@ -128,11 +167,15 @@ namespace kernel } extern "C" -void __thread_self_store(void* next_instr, void* stack) +void __thread_suspend_and_yield(void* next_instr, void* stack) { - auto* thread = kernel::get_thread(); - thread->store_return(next_instr, stack); - thread->yield(); + // don't go through the ardous yielding process when alone + if (kernel::suspended.empty()) return; + // suspend current thread + auto* thread = kernel::get_thread(); + thread->suspend(next_instr, stack); + // resume some other thread + thread->yield(); } extern "C" diff --git a/src/musl/exit.cpp b/src/musl/exit.cpp index 71f90c5e2b..4ebee2d83c 100644 --- a/src/musl/exit.cpp +++ b/src/musl/exit.cpp @@ -19,10 +19,12 @@ static long sys_exit(int status) else { // exit from a thread #ifdef THREADS_DEBUG +/* int64_t ptid = -1; if (t->parent != nullptr) ptid = t->parent->tid; THPRINT("thread_exit tid=%ld parent=%p ptid: %ld\n", t->tid, t->parent, ptid); +*/ #endif t->exit(); } diff --git a/src/musl/sched_yield.cpp b/src/musl/sched_yield.cpp index 58e6606d2d..c2ce1eab00 100644 --- a/src/musl/sched_yield.cpp +++ b/src/musl/sched_yield.cpp @@ -7,8 +7,9 @@ extern "C" { static long sys_sched_yield() { - __thread_yield(); - return 0; + THPRINT("sched_yield() called on thread %ld\n", kernel::get_tid()); + __thread_yield(); + return 0; } extern "C" diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index 2b87536b95..bcab934366 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -23,7 +23,7 @@ struct testdata { int depth = 0; - const int max_depth = 40; + const int max_depth = 20; }; extern "C" { @@ -34,11 +34,9 @@ extern "C" { printf("test @ %p, test = %d\n", &test, test); assert(test == 2019); - printf("Yielding from thread1, expecting to be returned to mt sys clone\n"); + printf("Yielding from thread1, expecting to be returned to main thread\n"); sched_yield(); - printf("Returned to thread1, expecting to exit to where mt yielded from\n"); - - //pthread_exit(NULL); + printf("Returned to thread1, expecting to exit to after main thread yield\n"); return NULL; } static void* thread_function2(void* data) @@ -54,6 +52,7 @@ extern "C" { data->depth++; printf("%ld: Thread depth %d / %d\n", kernel::get_thread()->tid, data->depth, data->max_depth); + if (data->depth < data->max_depth) { pthread_t t; @@ -66,6 +65,7 @@ extern "C" { printf("%ld: Thread yielding %d / %d\n", kernel::get_thread()->tid, data->depth, data->max_depth); sched_yield(); + printf("%ld: Thread exiting %d / %d\n", kernel::get_thread()->tid, data->depth, data->max_depth); data->depth--; @@ -79,20 +79,31 @@ void Service::start() int y = 777; pthread_t t; int res; - printf("Calling pthread_create\n"); +/* + printf("*** Testing pthread_create and sched_yield...\n"); res = pthread_create(&t, NULL, thread_function1, &x); if (res < 0) { printf("Failed to create thread!\n"); return; } + printf("Yielding from main thread, expecting to return to thread1\n"); + // return back to finish thread1 + sched_yield(); + printf("After yielding from main thread, looking good!\n"); + res = pthread_create(&t, NULL, thread_function2, &y); if (res < 0) { printf("Failed to create thread!\n"); return; } - printf("Now testing recursive threads...\n"); +*/ + printf("*** Now testing recursive threads...\n"); static testdata rdata; recursive_function(&rdata); + // now we have to yield until all the detached children also exit + printf("*** Yielding until all children are dead!\n"); + while (rdata.depth > 0) sched_yield(); + printf("SUCCESS\n"); os::shutdown(); } From a7a74968b323ae0297118b254b3e3fe41835123a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 17 Jul 2019 10:59:39 +0200 Subject: [PATCH 06/81] threads: Basic futex support which enables mutexes --- api/kernel/threads.hpp | 4 +++ src/musl/futex.cpp | 17 ++++------- src/musl/sched_yield.cpp | 4 --- test/kernel/integration/threads/service.cpp | 34 +++++++++++++-------- 4 files changed, 31 insertions(+), 28 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 64027558e9..05dc08177f 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -58,3 +58,7 @@ namespace kernel void setup_main_thread() noexcept; } + +extern "C" { + void __thread_yield(); +} diff --git a/src/musl/futex.cpp b/src/musl/futex.cpp index 1b7c46559f..c51c770e73 100644 --- a/src/musl/futex.cpp +++ b/src/musl/futex.cpp @@ -1,6 +1,7 @@ #include "stub.hpp" #include #include +#include #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 @@ -17,20 +18,14 @@ extern void print_backtrace(); -static int sys_futex(int *uaddr, int /*futex_op*/, int val, +static int sys_futex(int *uaddr, int futex_op, int val, const struct timespec *timeout, int /*val3*/) { - - if (*uaddr != val){ - return EAGAIN; - } else { - *uaddr = 0; - } - - if (timeout == nullptr){ - kprintf("No timeout\n"); + if ((futex_op & 0xF) == FUTEX_WAIT) + { + THPRINT("FUTEX: Waiting for unlock... uaddr=%d val=%d\n", *uaddr, val); + while (*uaddr == val) __thread_yield(); } - return 0; } diff --git a/src/musl/sched_yield.cpp b/src/musl/sched_yield.cpp index c2ce1eab00..787dc55364 100644 --- a/src/musl/sched_yield.cpp +++ b/src/musl/sched_yield.cpp @@ -1,10 +1,6 @@ #include "stub.hpp" #include -extern "C" { - void __thread_yield(); -} - static long sys_sched_yield() { THPRINT("sched_yield() called on thread %ld\n", kernel::get_tid()); diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index bcab934366..a17cc2aefc 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -33,17 +33,22 @@ extern "C" { thread_local int test = 2019; printf("test @ %p, test = %d\n", &test, test); assert(test == 2019); - - printf("Yielding from thread1, expecting to be returned to main thread\n"); - sched_yield(); - printf("Returned to thread1, expecting to exit to after main thread yield\n"); return NULL; } static void* thread_function2(void* data) { printf("Inside thread function2, x = %d\n", *(int*) data); thread_local int test = 2020; - printf("test @ %p, test = %d\n", &test, test); + + printf("Locking already locked mutex now\n"); + auto* mtx = (pthread_mutex_t*) data; + const int res = pthread_mutex_lock(mtx); + printf("Locking returned %d\n", res); + + printf("Yielding from thread2, expecting to be returned to main thread\n"); + sched_yield(); + printf("Returned to thread2, expecting to exit to after main thread yield\n"); + pthread_exit(NULL); } static void* recursive_function(void* tdata) @@ -76,27 +81,30 @@ extern "C" { void Service::start() { int x = 666; - int y = 777; + pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; pthread_t t; int res; -/* + printf("*** Testing pthread_create and sched_yield...\n"); res = pthread_create(&t, NULL, thread_function1, &x); if (res < 0) { printf("Failed to create thread!\n"); return; } - printf("Yielding from main thread, expecting to return to thread1\n"); - // return back to finish thread1 - sched_yield(); - printf("After yielding from main thread, looking good!\n"); - res = pthread_create(&t, NULL, thread_function2, &y); + pthread_mutex_lock(&mtx); + res = pthread_create(&t, NULL, thread_function2, &mtx); if (res < 0) { printf("Failed to create thread!\n"); return; } -*/ + pthread_mutex_unlock(&mtx); + + printf("Yielding from main thread, expecting to return to thread2\n"); + // return back to finish thread2 + sched_yield(); + printf("After yielding from main thread, looking good!\n"); + printf("*** Now testing recursive threads...\n"); static testdata rdata; recursive_function(&rdata); From 24c88cb8556db3cc1be324fad704ef25892fd2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 17 Jul 2019 14:01:36 +0200 Subject: [PATCH 07/81] threads: gettid, settid_address, musl stubs, work on C++ threads support --- api/kernel/threads.hpp | 4 ++++ src/arch/x86_64/syscall_entry.cpp | 8 +++++++ src/kernel/threads.cpp | 14 ++++++++++-- src/musl/exit.cpp | 2 -- src/musl/gettid.cpp | 10 ++++----- src/musl/kill.cpp | 25 ++++++++++++++------- src/musl/mprotect.cpp | 20 +++++++++++++---- src/musl/sched_yield.cpp | 2 +- src/musl/set_tid_address.cpp | 16 +++++-------- test/kernel/integration/threads/service.cpp | 18 +++++++++++++++ 10 files changed, 85 insertions(+), 34 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 05dc08177f..e34db96302 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -21,6 +21,8 @@ namespace kernel void* stored_stack = nullptr; void* stored_nexti = nullptr; bool yielded = false; + // for waking up when exiting + void* clear_child = nullptr; // children, detached when exited std::vector children; @@ -48,6 +50,8 @@ namespace kernel return thread; } + thread_t* get_thread(int64_t tid); /* or nullptr */ + inline int64_t get_tid() { return get_thread()->tid; } diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index 8d8d92ba34..57a92b4131 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -85,6 +85,14 @@ pid_t syscall_clone(void* next_instr, kprintf("-> callback: "); print_symbol(callback); #endif + // flag for write child TID + if (flags & CLONE_CHILD_SETTID) { + *(pid_t*) ctid = thread->tid; + } + if (flags & CLONE_CHILD_CLEARTID) { + thread->clear_child = ctid; + } + // suspend parent thread parent->suspend(next_instr, old_stack); // activate new TLS location diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index ca655715c7..94679194cd 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -84,6 +84,7 @@ namespace kernel void thread_t::exit() { + const bool exiting_myself = (get_thread() == this); assert(this->parent != nullptr); // detach children for (auto* child : this->children) { @@ -106,8 +107,11 @@ namespace kernel // free thread resources delete this; // resume parent thread - erase_suspension(next); - next->resume(); + if (exiting_myself) + { + erase_suspension(next); + next->resume(); + } } void thread_t::resume() @@ -164,6 +168,12 @@ namespace kernel #error "Implement me" # endif } + + thread_t* get_thread(int64_t tid) { + auto it = threads.find(tid); + if (it == threads.end()) return nullptr; + return it->second; + } } extern "C" diff --git a/src/musl/exit.cpp b/src/musl/exit.cpp index 4ebee2d83c..71f90c5e2b 100644 --- a/src/musl/exit.cpp +++ b/src/musl/exit.cpp @@ -19,12 +19,10 @@ static long sys_exit(int status) else { // exit from a thread #ifdef THREADS_DEBUG -/* int64_t ptid = -1; if (t->parent != nullptr) ptid = t->parent->tid; THPRINT("thread_exit tid=%ld parent=%p ptid: %ld\n", t->tid, t->parent, ptid); -*/ #endif t->exit(); } diff --git a/src/musl/gettid.cpp b/src/musl/gettid.cpp index 525c957a0a..779cccc391 100644 --- a/src/musl/gettid.cpp +++ b/src/musl/gettid.cpp @@ -1,13 +1,11 @@ -#include "stub.hpp" +#include "common.hpp" +#include static long sys_gettid() { -#ifndef INCLUDEOS_SINGLE_THREADED -#warning "gettid not implemented for threaded IncludeOS" -#endif - return 1; + return kernel::get_tid(); } extern "C" long syscall_SYS_gettid() { - return stubtrace(sys_gettid, "gettid"); + return strace(sys_gettid, "gettid"); } diff --git a/src/musl/kill.cpp b/src/musl/kill.cpp index 3db3f7825b..94b34dc93d 100644 --- a/src/musl/kill.cpp +++ b/src/musl/kill.cpp @@ -1,19 +1,28 @@ #include "common.hpp" #include +#include -int sys_kill(pid_t /*pid*/, int /*sig*/) { +long sys_kill(pid_t /*pid*/, int /*sig*/) { os::panic("KILL called"); } -int sys_tkill(int /*tid*/, int /*sig*/) { -#ifndef INCLUDEOS_SINGLE_THREADED -# warning "tkill not implemented for threaded IncludeOS" -#endif - os::panic("TKILL called"); +long sys_tkill(int tid, int /*sig*/) +{ + if (tid == 0) { + os::panic("TKILL on main thread"); + } + + auto* thread = kernel::get_thread(tid); + printf("TKILL on tid=%d where thread=%p\n", tid, thread); + if (thread != nullptr) { + thread->exit(); + return 0; + } + return -EINVAL; } -int sys_tgkill(int /*tgid*/, int /*tid*/, int /*sig*/) { - os::panic("TGKILL called"); +long sys_tgkill(int /*tgid*/, int tid, int sig) { + return sys_tkill(tid, sig); } extern "C" diff --git a/src/musl/mprotect.cpp b/src/musl/mprotect.cpp index 5be2bc6cbc..00007e30e7 100644 --- a/src/musl/mprotect.cpp +++ b/src/musl/mprotect.cpp @@ -1,13 +1,25 @@ -#include "common.hpp" +#include "stub.hpp" #include -static long sys_mprotect(void* /*addr*/, size_t /*len*/, int /*prot*/) +static long sys_mprotect(void* addr, size_t len, int prot) { - return -ENOSYS; + if ((uintptr_t) addr & 0xFFF) { + return -EINVAL; + } + if (len & 0xFFF) { + return -EINVAL; + } + // TODO: mprotect(0x900000, 86016, 3) = -38 Function not implemented + if (prot == 0x3) // read & write + { + // all the heap is already read/write + return 0; + } + return -EINVAL; } extern "C" long syscall_SYS_mprotect(void *addr, size_t len, int prot) { - return strace(sys_mprotect, "mprotect", addr, len, prot); + return stubtrace(sys_mprotect, "mprotect", addr, len, prot); } diff --git a/src/musl/sched_yield.cpp b/src/musl/sched_yield.cpp index 787dc55364..c3dd5f48ee 100644 --- a/src/musl/sched_yield.cpp +++ b/src/musl/sched_yield.cpp @@ -10,5 +10,5 @@ static long sys_sched_yield() extern "C" long syscall_SYS_sched_yield() { - return stubtrace(sys_sched_yield, "sched_yield"); + return strace(sys_sched_yield, "sched_yield"); } diff --git a/src/musl/set_tid_address.cpp b/src/musl/set_tid_address.cpp index 9f83daa68f..76975a6591 100644 --- a/src/musl/set_tid_address.cpp +++ b/src/musl/set_tid_address.cpp @@ -1,17 +1,11 @@ -#include "stub.hpp" +#include "common.hpp" +#include -static struct { - int tid = 1; - int* set_child_tid = nullptr; - int* clear_child_tid = nullptr; -} __main_thread__; - -static long sys_set_tid_address(int* tidptr) { - __main_thread__.clear_child_tid = tidptr; - return __main_thread__.tid; +static long sys_set_tid_address(int* /*tidptr*/) { + return kernel::get_tid(); } extern "C" long syscall_SYS_set_tid_address(int* tidptr) { - return stubtrace(sys_set_tid_address, "set_tid_address", tidptr); + return strace(sys_set_tid_address, "set_tid_address", tidptr); } diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index a17cc2aefc..729870e639 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -19,6 +19,7 @@ #include #include #include +#include struct testdata { @@ -112,6 +113,23 @@ void Service::start() printf("*** Yielding until all children are dead!\n"); while (rdata.depth > 0) sched_yield(); +/* + try { + std::thread cppthread( + [] (int a, long long b, std::string c) -> void { + printf("Hello from a C++ thread\n"); + assert(a == 1); + assert(b == 2LL); + assert(c == std::string("test")); + printf("C++ thread arguments are OK, returning...\n"); + }, + 1, 2L, std::string("test") + ); + } + catch (std::exception& e) { + printf("Exception: %s\n", e.what()); + } +*/ printf("SUCCESS\n"); os::shutdown(); } From 833ad0ba63a3a414242fd5383c1d9ce46b298f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 17 Jul 2019 21:31:35 +0200 Subject: [PATCH 08/81] threads: Add support for some clone flags and C++ threads --- api/kernel/threads.hpp | 4 +-- src/arch/x86_64/__syscall_entry.asm | 8 +++--- src/arch/x86_64/syscall_entry.cpp | 3 +- src/kernel/threads.cpp | 5 ++++ test/kernel/integration/threads/service.cpp | 31 ++++++++++----------- 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index e34db96302..5eddf72c44 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -21,8 +21,8 @@ namespace kernel void* stored_stack = nullptr; void* stored_nexti = nullptr; bool yielded = false; - // for waking up when exiting - void* clear_child = nullptr; + // address zeroed when exiting + void* clear_tid = nullptr; // children, detached when exited std::vector children; diff --git a/src/arch/x86_64/__syscall_entry.asm b/src/arch/x86_64/__syscall_entry.asm index c4c13890fc..9534a05838 100644 --- a/src/arch/x86_64/__syscall_entry.asm +++ b/src/arch/x86_64/__syscall_entry.asm @@ -74,13 +74,13 @@ __syscall_entry: __clone_helper: PUSHAQ + sub rsp, 0x8 ;; alignment - push rsp ;; alignment - ;; R9: thread callback + ;; R13: thread callback push r9 - ;; RSP: old stack + ;; R12: old stack push rsp - + ;; r11: temp nexti mov r11, rcx ;; R9: TLS data mov r9, r8 diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index 57a92b4131..85a1ba932f 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -90,7 +90,7 @@ pid_t syscall_clone(void* next_instr, *(pid_t*) ctid = thread->tid; } if (flags & CLONE_CHILD_CLEARTID) { - thread->clear_child = ctid; + thread->clear_tid = ctid; } // suspend parent thread @@ -98,7 +98,6 @@ pid_t syscall_clone(void* next_instr, // activate new TLS location thread->my_stack = stack; thread->activate(newtls); - //kprintf("thread %ld return TLS: %p\n", thread->tid, (void*) thread->ret_tls); return thread->tid; } diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index 94679194cd..e48eb78394 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -99,6 +99,11 @@ namespace kernel } // temporary copy of parent thread pointer auto* next = this->parent; + // CLONE_CHILD_CLEARTID: set userspace TID value to zero + if (this->clear_tid) { + THPRINT("Clearing child value at %p\n", this->clear_tid); + *(pthread_t*) this->clear_tid = 0; + } // delete this thread auto it = threads.find(this->tid); assert(it != threads.end()); diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index 729870e639..4416a10aab 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -113,23 +113,20 @@ void Service::start() printf("*** Yielding until all children are dead!\n"); while (rdata.depth > 0) sched_yield(); -/* - try { - std::thread cppthread( - [] (int a, long long b, std::string c) -> void { - printf("Hello from a C++ thread\n"); - assert(a == 1); - assert(b == 2LL); - assert(c == std::string("test")); - printf("C++ thread arguments are OK, returning...\n"); - }, - 1, 2L, std::string("test") - ); - } - catch (std::exception& e) { - printf("Exception: %s\n", e.what()); - } -*/ + auto* cpp_thread = new std::thread( + [] (int a, long long b, std::string c) -> void { + printf("Hello from a C++ thread\n"); + assert(a == 1); + assert(b == 2LL); + assert(c == std::string("test")); + printf("C++ thread arguments are OK, returning...\n"); + }, + 1, 2L, std::string("test") + ); + printf("Returned. Deleting the C++ thread\n"); + cpp_thread->join(); + delete cpp_thread; + printf("SUCCESS\n"); os::shutdown(); } From 48f40057e500451a4c2434965cf647c11f62bb49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Thu, 18 Jul 2019 13:05:30 +0200 Subject: [PATCH 09/81] threads: Add some aarch64 stubs --- api/kernel/threads.hpp | 2 +- src/arch/aarch64/CMakeLists.txt | 10 +++------- src/arch/aarch64/syscall_entry.cpp | 30 +++++++++++++++++++++--------- src/arch/aarch64/threads.asm | 9 +++++++++ src/arch/x86_64/arch_start.asm | 2 -- src/arch/x86_64/syscall_entry.cpp | 13 ++----------- src/kernel/threads.cpp | 12 +++++++++++- 7 files changed, 47 insertions(+), 31 deletions(-) create mode 100644 src/arch/aarch64/threads.asm diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 5eddf72c44..006a1e380b 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -58,7 +58,7 @@ namespace kernel void* get_thread_area(); - thread_t* thread_create(thread_t* parent) noexcept; + thread_t* thread_create(thread_t* parent, int flags, void* ctid, void* stack) noexcept; void setup_main_thread() noexcept; } diff --git a/src/arch/aarch64/CMakeLists.txt b/src/arch/aarch64/CMakeLists.txt index 4df69bf8b2..0ee1bb2cd1 100644 --- a/src/arch/aarch64/CMakeLists.txt +++ b/src/arch/aarch64/CMakeLists.txt @@ -3,13 +3,9 @@ ### aarch64 arch specific ### set(ARCH_OBJECTS -# gdt_asm.asm -# profile_intr.asm -# apic_asm.asm - arch_start.asm - exceptions.asm -# interrupts.asm -# fiber.asm + arch_start.asm + exceptions.asm + threads.asm ) set(ARCH_SOURCES paging.cpp diff --git a/src/arch/aarch64/syscall_entry.cpp b/src/arch/aarch64/syscall_entry.cpp index ecc773ca55..6d38480729 100644 --- a/src/arch/aarch64/syscall_entry.cpp +++ b/src/arch/aarch64/syscall_entry.cpp @@ -1,18 +1,30 @@ - - #include "cpu.h" +#include + +extern "C" +pthread_t syscall_clone( + unsigned long flags, + void *stack, + int *ptid, + unsigned long newtls, + int *ctid, + // needed to suspend this thread + void* next_instr, + void* old_stack) +{ + auto* parent = kernel::get_thread(); + auto* thread = kernel::thread_create(parent, flags, ctid, stack); + // suspend parent thread + parent->suspend(next_instr, old_stack); + // activate new TLS location + thread->activate(newtls); + return thread->tid; +} extern "C" long syscall_SYS_set_thread_area(struct user_desc *u_info) { set_tpidr(u_info); - /* - if (UNLIKELY(!u_info)) return -EINVAL; -#ifdef __x86_64__ - x86::CPU::set_fs(u_info); -#else - x86::CPU::set_gs(u_info); -#endif*/ return 0; } diff --git a/src/arch/aarch64/threads.asm b/src/arch/aarch64/threads.asm new file mode 100644 index 0000000000..3019299d2a --- /dev/null +++ b/src/arch/aarch64/threads.asm @@ -0,0 +1,9 @@ +global __clone_return:function +global __thread_yield:function +global __thread_restore:function +extern __thread_suspend_and_yield + +SECTION .text +__clone_return: +__thread_yield: +__thread_restore: diff --git a/src/arch/x86_64/arch_start.asm b/src/arch/x86_64/arch_start.asm index 16c5bdc59b..cad92ff6d7 100644 --- a/src/arch/x86_64/arch_start.asm +++ b/src/arch/x86_64/arch_start.asm @@ -139,8 +139,6 @@ long_mode: extern _ELF_START_ push rsp mov rsp, _ELF_START_ - push 0 - push 0 mov rbp, rsp mov ecx, IA32_STAR diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index 85a1ba932f..cf36060a15 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -64,14 +64,14 @@ static void print_symbol(const void* addr) } extern "C" -pid_t syscall_clone(void* next_instr, +pthread_t syscall_clone(void* next_instr, unsigned long flags, void* stack, void* ptid, void* ctid, void* newtls, void* old_stack, void* callback) { auto* parent = kernel::get_thread(); - auto* thread = kernel::thread_create(parent); + auto* thread = kernel::thread_create(parent, flags, ctid, stack); #ifdef THREADS_DEBUG kprintf("clone syscall creating thread %ld\n", thread->tid); kprintf("-> nexti: "); print_symbol(next_instr); @@ -85,18 +85,9 @@ pid_t syscall_clone(void* next_instr, kprintf("-> callback: "); print_symbol(callback); #endif - // flag for write child TID - if (flags & CLONE_CHILD_SETTID) { - *(pid_t*) ctid = thread->tid; - } - if (flags & CLONE_CHILD_CLEARTID) { - thread->clear_tid = ctid; - } - // suspend parent thread parent->suspend(next_instr, old_stack); // activate new TLS location - thread->my_stack = stack; thread->activate(newtls); return thread->tid; } diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index e48eb78394..d377a719e1 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -136,7 +136,8 @@ namespace kernel __builtin_unreachable(); } - thread_t* thread_create(thread_t* parent) noexcept + thread_t* thread_create(thread_t* parent, int flags, + void* ctid, void* stack) noexcept { const int tid = __sync_fetch_and_add(&thread_counter, 1); try { @@ -144,6 +145,15 @@ namespace kernel thread->init(tid); thread->parent = parent; thread->parent->children.push_back(thread); + thread->my_stack = stack; + + // flag for write child TID + if (flags & CLONE_CHILD_SETTID) { + *(pid_t*) ctid = thread->tid; + } + if (flags & CLONE_CHILD_CLEARTID) { + thread->clear_tid = ctid; + } threads.emplace( std::piecewise_construct, From 886250e141469517c5b7aacfb0d9fca6394a652b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Fri, 19 Jul 2019 09:50:35 +0200 Subject: [PATCH 10/81] cmake: Make for-production default OFF --- cmake/os.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/os.cmake b/cmake/os.cmake index 597c99522a..7a15337f40 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -109,7 +109,7 @@ set(CMAKE_SKIP_RPATH ON) set(BUILD_SHARED_LIBRARIES OFF) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") -option(FOR_PRODUCTION "Stop the OS when conditions not suitable for production" ON) +option(FOR_PRODUCTION "Stop the OS when conditions not suitable for production" OFF) if (FOR_PRODUCTION) set(PROD_USE "--defsym __for_production_use=0x2000") else() From 4216a21b33d723370671eeafac2ae70d7491e706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Fri, 19 Jul 2019 09:54:23 +0200 Subject: [PATCH 11/81] cmake: Remove deprecated crtn/crti steps --- cmake/os.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake/os.cmake b/cmake/os.cmake index 7a15337f40..f3cb31966e 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -37,8 +37,6 @@ endif() set(NAME_STUB "${CONAN_INCLUDEOS_ROOT}/src/service_name.cpp") -set(CRTN ${CONAN_LIB_DIRS_MUSL}/crtn.o) -set(CRTI ${CONAN_LIB_DIRS_MUSL}/crti.o) set(TRIPLE "${ARCH}-pc-linux-elf") @@ -100,9 +98,9 @@ endif() # linker stuff set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) # this removed -rdynamic from linker output if (CMAKE_BUILD_TYPE STREQUAL "Debug") - set(CMAKE_CXX_LINK_EXECUTABLE " -o ${CRTI} --start-group --end-group ${CRTN}") + set(CMAKE_CXX_LINK_EXECUTABLE " -o --start-group --end-group") else() - set(CMAKE_CXX_LINK_EXECUTABLE " -S -o ${CRTI} --start-group --end-group ${CRTN}") + set(CMAKE_CXX_LINK_EXECUTABLE " -S -o --start-group --end-group") endif() set(CMAKE_SKIP_RPATH ON) From efa09ae88fd1a0854bc92d75168d9c4cbdb2cb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Fri, 19 Jul 2019 10:03:38 +0200 Subject: [PATCH 12/81] x86: Disable KVM clocks for now --- src/platform/x86_pc/clocks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/x86_pc/clocks.cpp b/src/platform/x86_pc/clocks.cpp index 1200a717a3..9c820ad864 100644 --- a/src/platform/x86_pc/clocks.cpp +++ b/src/platform/x86_pc/clocks.cpp @@ -43,7 +43,7 @@ namespace x86 { void Clocks::init() { - if (CPUID::kvm_feature(KVM_FEATURE_CLOCKSOURCE + if (0 && CPUID::kvm_feature(KVM_FEATURE_CLOCKSOURCE | KVM_FEATURE_CLOCKSOURCE2)) { KVM_clock::init(); From 6e909bb1103fd94ae296ead7255e3a6ce8e36f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Fri, 19 Jul 2019 21:45:27 +0200 Subject: [PATCH 13/81] cmake: Add minimal build option, remove PRE_BSS in aarch64 --- cmake/includeos.cmake | 2 +- cmake/os.cmake | 21 ++++++++++++++++----- src/arch/aarch64/linker.ld | 5 +---- src/arch/x86_64/linker.ld | 21 ++++++--------------- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/cmake/includeos.cmake b/cmake/includeos.cmake index 024fb479a9..7e2f2b0a9c 100644 --- a/cmake/includeos.cmake +++ b/cmake/includeos.cmake @@ -32,7 +32,7 @@ set(CMAKE_C_COMPILER_TARGET ${TRIPLE}) message(STATUS "Target triple ${TRIPLE}") -set(CAPABS "${CAPABS} -g -fstack-protector-strong") +set(CAPABS "${CAPABS} -g -fstack-protector-strong -ffunction-sections -fdata-sections") # Various global defines # * NO_DEBUG disables output from the debug macro diff --git a/cmake/os.cmake b/cmake/os.cmake index f3cb31966e..ff54526c32 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -5,6 +5,13 @@ endif() set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD_REQUIRED ON) +option(MINIMAL "Minimal build" OFF) +if (MINIMAL) + set(STRIP_CMD strip --strip-all) +else() + set(STRIP_CMD true) +endif() + find_program(PYTHON3_EXECUTABLE python3) if (PYTHON3_EXECUTABLE-NOTFOUND) message(FATAL_ERROR "python3 not found") @@ -115,10 +122,12 @@ else() endif() # TODO: find a more proper way to get the linker.ld script ? +set(LD_COMMON "-nostdlib --eh-frame-hdr ${LD_STRIP} --script=${LINK_SCRIPT} ${PROD_USE}") +set(LD_COMMON "${LD_COMMON} --gc-sections") if("${ARCH}" STREQUAL "aarch64") - set(LDFLAGS "-nostdlib -m${ELF}elf --eh-frame-hdr ${LD_STRIP} --script=${LINK_SCRIPT} ${PROD_USE} ${PRE_BSS_SIZE}") + set(LDFLAGS "-m${ELF}elf ${LD_COMMON}") else() - set(LDFLAGS "-nostdlib -melf_${ELF} --eh-frame-hdr ${LD_STRIP} --script=${LINK_SCRIPT} ${PROD_USE} ${PRE_BSS_SIZE}") + set(LDFLAGS "-melf_${ELF} ${LD_COMMON} ${PRE_BSS_SIZE}") endif() set(ELF_POSTFIX .elf.bin) @@ -138,6 +147,8 @@ function(os_add_executable TARGET NAME) set(ELF_TARGET ${TARGET}${ELF_POSTFIX}) add_executable(${ELF_TARGET} ${ARGN} ${NAME_STUB}) set_property(SOURCE ${NAME_STUB} PROPERTY COMPILE_DEFINITIONS SERVICE="${TARGET}" SERVICE_NAME="${NAME}") + target_compile_options(${ELF_TARGET} PRIVATE -Wall -Wextra -fstack-protector) + target_compile_options(${ELF_TARGET} PRIVATE -ffunction-sections -fdata-sections) set_target_properties(${ELF_TARGET} PROPERTIES LINK_FLAGS ${LDFLAGS}) conan_find_libraries_abs_path("${CONAN_LIBS}" "${CONAN_LIB_DIRS}" LIBRARIES) @@ -154,9 +165,9 @@ function(os_add_executable TARGET NAME) # TODO: if not debug strip if (CMAKE_BUILD_TYPE STREQUAL "Debug") - set(STRIP_LV ) + set(LD_STRIP ) else() - set(STRIP_LV ${CMAKE_STRIP} --strip-all ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}) + set(LD_STRIP --strip-debug) endif() FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/binary.txt "${TARGET}" @@ -166,7 +177,7 @@ function(os_add_executable TARGET NAME) COMMENT "elf.syms" COMMAND ${ELF_SYMS} $ COMMAND ${CMAKE_OBJCOPY} --update-section .elf_symbols=_elf_symbols.bin $ ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} - COMMAND ${STRIP_LV} + COMMAND ${STRIP_CMD} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} COMMAND mv bin/${ELF_TARGET} bin/${ELF_TARGET}.copy DEPENDS ${ELF_TARGET} ) diff --git a/src/arch/aarch64/linker.ld b/src/arch/aarch64/linker.ld index 12b9869e82..4798f535e6 100644 --- a/src/arch/aarch64/linker.ld +++ b/src/arch/aarch64/linker.ld @@ -183,10 +183,7 @@ SECTIONS LONG (0); } - /** Optional memory hole between memdisk and bss **/ - . += PRE_BSS_AREA; - - .bss ALIGN(0x1000) : + .bss ALIGN(0x100) : { _BSS_START_ = .; *(.bss .bss.* .gnu.linkonce.b.*) diff --git a/src/arch/x86_64/linker.ld b/src/arch/x86_64/linker.ld index 32b7e518b2..f7cd90573e 100644 --- a/src/arch/x86_64/linker.ld +++ b/src/arch/x86_64/linker.ld @@ -27,7 +27,7 @@ SECTIONS .multiboot : { PROVIDE(_MULTIBOOT_START_ = .); - *(.multiboot) + KEEP(*(.multiboot)) } .text ALIGN(0x1000): @@ -49,9 +49,11 @@ SECTIONS } /** - * .preinit_array, .init_array, .fini_array - * from GNU LD default linker script - */ + * Global constructors + * Constructors are split into groups allowing the OS to use global ctors + * before the OS itself is initialized, while delaying the calls to service constructors + * until as much of the OS / C++ runtime as possible is ready. + */ .preinit_array : { @@ -60,13 +62,6 @@ SECTIONS PROVIDE_HIDDEN (__preinit_array_end = .); } -/** - * Global constructors - * Constructors are split into groups allowing the OS to use global ctors - * before the OS itself is initialized, while delaying the calls to service constructors - * until as much of the OS / C++ runtime as possible is ready. - */ - /* OS / stdlib constructors */ .init_array : { @@ -155,10 +150,6 @@ SECTIONS LONG (0); } - .gcc_except_table : - { - *(.gcc_except_table) - } _READONLY_END_ = .; .data : { From 85425a14c1293e77094b09261f1881de669ccd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Fri, 19 Jul 2019 21:46:15 +0200 Subject: [PATCH 14/81] threads: Add test for throwing in a thread --- src/musl/kill.cpp | 2 +- test/kernel/integration/threads/service.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/musl/kill.cpp b/src/musl/kill.cpp index 94b34dc93d..95dfcc26bb 100644 --- a/src/musl/kill.cpp +++ b/src/musl/kill.cpp @@ -13,7 +13,7 @@ long sys_tkill(int tid, int /*sig*/) } auto* thread = kernel::get_thread(tid); - printf("TKILL on tid=%d where thread=%p\n", tid, thread); + THPRINT("TKILL on tid=%d where thread=%p\n", tid, thread); if (thread != nullptr) { thread->exit(); return 0; diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index 4416a10aab..39f488fe81 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -34,7 +34,8 @@ extern "C" { thread_local int test = 2019; printf("test @ %p, test = %d\n", &test, test); assert(test == 2019); - return NULL; + // this will cause a TKILL on this thread + throw std::runtime_error("Test"); } static void* thread_function2(void* data) { From 87a5f03ab2a10b0b6d00a6260bf2693575d224f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Fri, 19 Jul 2019 21:46:53 +0200 Subject: [PATCH 15/81] x86: Remove some stray spaces --- src/platform/x86_pc/init_libc.cpp | 8 ++++---- src/platform/x86_pc/kernel_start.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/platform/x86_pc/init_libc.cpp b/src/platform/x86_pc/init_libc.cpp index af9c3a6a79..c6e5fb10ac 100644 --- a/src/platform/x86_pc/init_libc.cpp +++ b/src/platform/x86_pc/init_libc.cpp @@ -35,14 +35,14 @@ static void global_ctor_test(){ extern "C" int kernel_main(int, char * *, char * *) { - PRATTLE(" libc initialization complete \n"); + PRATTLE(" libc initialization complete\n"); LL_ASSERT(global_ctors_ok == 42); kernel::state().libc_initialized = true; Elf_binary elf{{(char*)&_ELF_START_, &_ELF_END_ - &_ELF_START_}}; LL_ASSERT(elf.is_ELF() && "ELF header intact"); - PRATTLE(" OS start \n"); + PRATTLE(" OS start\n"); // setup main thread after global ctors kernel::setup_main_thread(); @@ -61,7 +61,7 @@ int kernel_main(int, char * *, char * *) // NOTE: because of page protection we can choose to stop checking here kernel_sanity_checks(); - PRATTLE(" post start \n"); + PRATTLE(" post start\n"); // Initialize common subsystems and call Service::start kernel::post_start(); @@ -95,7 +95,7 @@ namespace x86 PRATTLE("\tElf size: %zu \n", size); for (int i = 0; i < ehdr->e_phnum; i++) { - PRATTLE("\tPhdr %i @ %p, va_addr: 0x%lx \n", i, &phdr[i], phdr[i].p_vaddr); + PRATTLE("\tPhdr %i @ %p, va_addr: 0x%lx\n", i, &phdr[i], phdr[i].p_vaddr); } #endif diff --git a/src/platform/x86_pc/kernel_start.cpp b/src/platform/x86_pc/kernel_start.cpp index 7c3da9cbb3..5827285cd3 100644 --- a/src/platform/x86_pc/kernel_start.cpp +++ b/src/platform/x86_pc/kernel_start.cpp @@ -62,8 +62,8 @@ extern "C" __attribute__((no_sanitize("all"))) void kernel_start(uint32_t magic, uint32_t addr) { - PRATTLE("\n////////////////// IncludeOS kernel start ////////////////// \n"); - PRATTLE("* Booted with magic 0x%x, grub @ 0x%x \n", + PRATTLE("\n////////////////// IncludeOS kernel start //////////////////\n"); + PRATTLE("* Booted with magic 0x%x, grub @ 0x%x\n", magic, addr); // generate checksums of read-only areas etc. __init_sanity_checks(); @@ -83,13 +83,13 @@ void kernel_start(uint32_t magic, uint32_t addr) { memory_end = kernel::softreset_memory_end(addr); } - PRATTLE("* Free mem begin: 0x%zx, memory end: 0x%zx \n", + PRATTLE("* Free mem begin: 0x%zx, memory end: 0x%zx\n", free_mem_begin, memory_end); - PRATTLE("* Moving symbols. \n"); + PRATTLE("* Moving symbols\n"); // Preserve symbols from the ELF binary free_mem_begin += _move_symbols(free_mem_begin); - PRATTLE("* Free mem moved to: %p \n", (void*) free_mem_begin); + PRATTLE("* Free mem moved to: %p\n", (void*) free_mem_begin); PRATTLE("* Init .bss\n"); _init_bss(); From 36f375d5284098617fd1d4895284037551efad8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 20 Jul 2019 16:17:56 +0200 Subject: [PATCH 16/81] common: Print expects failure on newline --- api/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/common b/api/common index 0bc86a5e11..ca3cd4aa8d 100644 --- a/api/common +++ b/api/common @@ -62,7 +62,7 @@ inline void __expect_fail(const char *expr, const char *file, int line, const ch #ifdef INCLUDEOS_SMP_ENABLE SMP::global_lock(); #endif - fprintf(stderr, "%s:%i:%s %s \n",file, line, func, expr); + fprintf(stderr, "%s:%i:%s\n>>> %s\n",file, line, func, expr); fflush(NULL); #ifdef INCLUDEOS_SMP_ENABLE SMP::global_unlock(); From 4a1edae5b2e37860ee493b4d1578b4a7d249a7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 20 Jul 2019 16:18:52 +0200 Subject: [PATCH 17/81] x86: Keep .memdisk section when GC enabled --- src/arch/i686/linker.ld | 27 +++++++++------------------ src/arch/x86_64/linker.ld | 4 ++-- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/arch/i686/linker.ld b/src/arch/i686/linker.ld index 70550b9ad5..6334947c64 100644 --- a/src/arch/i686/linker.ld +++ b/src/arch/i686/linker.ld @@ -27,7 +27,7 @@ SECTIONS .multiboot : { PROVIDE(_MULTIBOOT_START_ = .); - *(.multiboot) + KEEP(*(.multiboot)) } .text ALIGN(0x1000): @@ -45,9 +45,11 @@ SECTIONS } /** - * .preinit_array, .init_array, .fini_array - * from GNU LD default linker script - */ + * Global constructors + * Constructors are split into groups allowing the OS to use global ctors + * before the OS itself is initialized, while delaying the calls to service constructors + * until as much of the OS / C++ runtime as possible is ready. + */ .preinit_array : { @@ -56,13 +58,6 @@ SECTIONS PROVIDE_HIDDEN (__preinit_array_end = .); } -/** - * Global constructors - * Constructors are split into groups allowing the OS to use global ctors - * before the OS itself is initialized, while delaying the calls to service constructors - * until as much of the OS / C++ runtime as possible is ready. - */ - /* OS / stdlib constructors */ .init_array : { @@ -113,8 +108,8 @@ SECTIONS KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) PROVIDE_HIDDEN (__fini_array_end = .); } - _EXEC_END_ = .; + _READONLY_START_ = .; .config ALIGN(0x1000) : { _CONFIG_JSON_START_ = .; @@ -149,7 +144,7 @@ SECTIONS .memdisk : { _DISK_START_ = .; - *(.diskdata) + KEEP(*(.diskdata)) _DISK_END_ = .; } @@ -164,12 +159,8 @@ SECTIONS KEEP(*(.eh_frame)) LONG (0); } - - .gcc_except_table : - { - *(.gcc_except_table) - } _READONLY_END_ = .; + .data : { _DATA_START_ = .; diff --git a/src/arch/x86_64/linker.ld b/src/arch/x86_64/linker.ld index f7cd90573e..43d135505b 100644 --- a/src/arch/x86_64/linker.ld +++ b/src/arch/x86_64/linker.ld @@ -134,7 +134,7 @@ SECTIONS .memdisk : { _DISK_START_ = .; - *(.diskdata) + KEEP(*(.diskdata)) _DISK_END_ = .; } @@ -149,8 +149,8 @@ SECTIONS KEEP(*(.eh_frame)) LONG (0); } - _READONLY_END_ = .; + .data : { _DATA_START_ = .; From b7ad380b9a1b33554055367a8743ee60c380e9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 20 Jul 2019 16:53:08 +0200 Subject: [PATCH 18/81] liveupdate: Make storage area size customizable --- cmake/os.cmake | 7 ++++- src/hal/machine.cpp | 31 ++++++++++--------- src/kernel/liveupdate.cpp | 1 + src/platform/x86_pc/os.cpp | 2 -- src/service_name.cpp | 13 +++++--- .../integration/LiveUpdate/CMakeLists.txt | 2 ++ test/kernel/integration/LiveUpdate/vm.json | 2 +- 7 files changed, 35 insertions(+), 23 deletions(-) diff --git a/cmake/os.cmake b/cmake/os.cmake index ff54526c32..bc3a69ca15 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -12,6 +12,8 @@ else() set(STRIP_CMD true) endif() +set(LIVEUPDATE_MB 0 CACHE STRING "Liveupdate size in MB") + find_program(PYTHON3_EXECUTABLE python3) if (PYTHON3_EXECUTABLE-NOTFOUND) message(FATAL_ERROR "python3 not found") @@ -146,7 +148,10 @@ endfunction() function(os_add_executable TARGET NAME) set(ELF_TARGET ${TARGET}${ELF_POSTFIX}) add_executable(${ELF_TARGET} ${ARGN} ${NAME_STUB}) - set_property(SOURCE ${NAME_STUB} PROPERTY COMPILE_DEFINITIONS SERVICE="${TARGET}" SERVICE_NAME="${NAME}") + set_property(SOURCE ${NAME_STUB} PROPERTY COMPILE_DEFINITIONS + SERVICE="${TARGET}" SERVICE_NAME="${NAME}" + _LIVEUPDATE_MEMSIZE_=${LIVEUPDATE_MB}) + target_compile_options(${ELF_TARGET} PRIVATE -Wall -Wextra -fstack-protector) target_compile_options(${ELF_TARGET} PRIVATE -ffunction-sections -fdata-sections) diff --git a/src/hal/machine.cpp b/src/hal/machine.cpp index cf070aecdf..1819fc170b 100644 --- a/src/hal/machine.cpp +++ b/src/hal/machine.cpp @@ -19,25 +19,30 @@ #include #include -#ifndef INFO_MACHINE +//#define INFO_MACHINE +#ifdef INFO_MACHINE #ifndef USERSPACE_KERNEL #define MINFO(fmt, ...) kprintf("[ Machine ] " fmt, ##__VA_ARGS__) #else #define MINFO(fmt, ...) printf("[ Machine ] " fmt, ##__VA_ARGS__) #endif +#else +#define MINFO(...) /* */ #endif using namespace util; // Reserve some machine memory for e.g. devices // (can still be used by heap as fallback). -static constexpr size_t reserve_mem = 1_MiB; +static constexpr size_t reserve_mem = 1_KiB; // Max percent of memory reserved by machine static constexpr int reserve_pct_max = 10; static_assert(reserve_pct_max > 0 and reserve_pct_max < 90); namespace os { + __attribute__((weak)) + uintptr_t liveupdate_memory_size_mb = 0; Machine::Memory& Machine::memory() noexcept { return impl->memory(); @@ -78,12 +83,9 @@ namespace os::detail { (void*) bits::align(Memory::align, (uintptr_t)raw_mem), size - (bits::align(Memory::align, (uintptr_t)raw_mem) - (uintptr_t)raw_mem) }, - ptr_alloc_(mem_), parts_(ptr_alloc_), device_types_(mem_) - { -#ifndef USERSPACE_KERNEL - kprintf("[%s %s] constructor \n", arch(), name()); -#endif - } + ptr_alloc_(mem_), parts_(ptr_alloc_), device_types_(mem_) { + + } void Machine::init() { MINFO("Initializing heap\n"); @@ -93,7 +95,7 @@ namespace os::detail { #ifndef PLATFORM_x86_solo5 static const size_t SYSTEMLOG_SIZE = 65536; - const size_t LIU_SIZE = (main_mem.size / (100 / 25)) & ~0xfff; + const size_t LIU_SIZE = os::liveupdate_memory_size_mb * 1024 * 1024; auto liu_mem = memory().allocate_back(LIU_SIZE + SYSTEMLOG_SIZE); kernel::state().liveupdate_phys = (uintptr_t) liu_mem.ptr + SYSTEMLOG_SIZE; kernel::state().liveupdate_size = liu_mem.size - SYSTEMLOG_SIZE; @@ -102,14 +104,13 @@ namespace os::detail { // reallocate main memory from remainder main_mem = memory().allocate_largest(); - const auto percent = main_mem.size / (100 / reserve_pct_max); - const auto reserve = std::min(reserve_mem, percent); - main_mem.size -= reserve; - auto back = (uintptr_t)main_mem.ptr + main_mem.size - reserve; + MINFO("Reserving %zu b for machine use\n", reserve_mem); + main_mem.size -= reserve_mem; + auto back = (uintptr_t)main_mem.ptr + main_mem.size - reserve_mem; + MINFO("Deallocating %zu b from back of machine\n", reserve_mem); memory().deallocate((void*)back, reserve_mem); - MINFO("Reserving %zu b for machine use \n", reserve); - kernel::init_heap((uintptr_t)main_mem.ptr,(uintptr_t)((char *)main_mem.ptr + main_mem.size)); + kernel::init_heap((uintptr_t) main_mem.ptr, (uintptr_t) main_mem.ptr + main_mem.size); } const char* Machine::arch() { return Arch::name; } diff --git a/src/kernel/liveupdate.cpp b/src/kernel/liveupdate.cpp index 03d4695dfb..789df601a8 100644 --- a/src/kernel/liveupdate.cpp +++ b/src/kernel/liveupdate.cpp @@ -21,6 +21,7 @@ void kernel::setup_liveupdate() #endif const size_t size = kernel::state().liveupdate_size; + if (size == 0) return; PRATTLE("Setting up LiveUpdate from %p to %p, %zx\n", (void*) kernel::state().liveupdate_phys, (void*) kernel::state().liveupdate_loc, size); diff --git a/src/platform/x86_pc/os.cpp b/src/platform/x86_pc/os.cpp index 9b2097889c..30268c239d 100644 --- a/src/platform/x86_pc/os.cpp +++ b/src/platform/x86_pc/os.cpp @@ -182,7 +182,6 @@ void os::event_loop() __arch_poweroff(); } - void kernel::legacy_boot() { // Fetch CMOS memory info (unfortunately this is maximally 10^16 kb) @@ -203,5 +202,4 @@ void kernel::legacy_boot() "EBDA"}); memmap.assign_range({0x000A0000, 0x000FFFFF, "VGA/ROM"}); - } diff --git a/src/service_name.cpp b/src/service_name.cpp index 436010f4d3..36d286eba5 100644 --- a/src/service_name.cpp +++ b/src/service_name.cpp @@ -16,16 +16,21 @@ // limitations under the License. #include - -extern "C" __attribute__((noreturn)) -void panic(const char* reason); +extern "C" { + __attribute__((noreturn)) void panic(const char* reason); +} #ifndef __linux__ extern "C" __attribute__((noreturn)) void abort(){ - panic("Abort called"); + panic("Abort called"); + __builtin_unreachable(); } #endif const char* service_name__ = SERVICE_NAME; const char* service_binary_name__ = SERVICE; + +namespace os { + uintptr_t liveupdate_memory_size_mb = _LIVEUPDATE_MEMSIZE_; +} diff --git a/test/kernel/integration/LiveUpdate/CMakeLists.txt b/test/kernel/integration/LiveUpdate/CMakeLists.txt index f125329fce..3434f6ad0d 100644 --- a/test/kernel/integration/LiveUpdate/CMakeLists.txt +++ b/test/kernel/integration/LiveUpdate/CMakeLists.txt @@ -7,6 +7,8 @@ if (NOT HAS_CONAN) endif() conan_basic_setup() +set(LIVEUPDATE_MB 32 CACHE STRING "") +option(MINIMAL "" ON) include(os) option(benchmark_mode "Optimizations for benchmarking" OFF) diff --git a/test/kernel/integration/LiveUpdate/vm.json b/test/kernel/integration/LiveUpdate/vm.json index 05c8586b61..71ec75bddd 100644 --- a/test/kernel/integration/LiveUpdate/vm.json +++ b/test/kernel/integration/LiveUpdate/vm.json @@ -3,5 +3,5 @@ "net" : [ {"device" : "virtio"} ], - "mem" : 1024 + "mem" : 128 } From f7337e3c05f34c76602a0bed2a638abe5e75d312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 20 Jul 2019 17:33:11 +0200 Subject: [PATCH 19/81] cmake: Add option to disable ELF symbols --- cmake/os.cmake | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/cmake/os.cmake b/cmake/os.cmake index bc3a69ca15..c43c8ce73d 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -11,6 +11,7 @@ if (MINIMAL) else() set(STRIP_CMD true) endif() +option(ELF_SYMBOLS "Enable full backtrace" ON) set(LIVEUPDATE_MB 0 CACHE STRING "Liveupdate size in MB") @@ -177,15 +178,24 @@ function(os_add_executable TARGET NAME) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/binary.txt "${TARGET}" ) - add_custom_target( - ${TARGET} ALL - COMMENT "elf.syms" - COMMAND ${ELF_SYMS} $ - COMMAND ${CMAKE_OBJCOPY} --update-section .elf_symbols=_elf_symbols.bin $ ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} - COMMAND ${STRIP_CMD} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} - COMMAND mv bin/${ELF_TARGET} bin/${ELF_TARGET}.copy - DEPENDS ${ELF_TARGET} - ) + if (ELF_SYMBOLS) + add_custom_target( + ${TARGET} ALL + COMMENT "elf.syms" + COMMAND ${ELF_SYMS} $ + COMMAND ${CMAKE_OBJCOPY} --update-section .elf_symbols=_elf_symbols.bin $ ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} + COMMAND ${STRIP_CMD} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} + COMMAND mv bin/${ELF_TARGET} bin/${ELF_TARGET}.copy + DEPENDS ${ELF_TARGET} + ) + else() + add_custom_target( + ${TARGET} ALL + COMMAND cp bin/${ELF_TARGET} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} + COMMAND ${STRIP_CMD} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} + DEPENDS ${ELF_TARGET} + ) + endif() if (DEFINED JSON_CONFIG_FILE_${ELF_TARGET}) message(STATUS "using set config file ${JSON_CONFIG_FILE_${ELF_TARGET}}") From e0bfa3f62287b06040bc4d53e0418bda2be3dca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 20 Jul 2019 17:33:32 +0200 Subject: [PATCH 20/81] Update README with new demo size measurements --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fe9e04be70..709e3c7d8c 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![IncludeOS Logo](./etc/logo.png) ================================================ -**IncludeOS** is an includable, minimal [unikernel](https://en.wikipedia.org/wiki/Unikernel) operating system for C++ services running in the cloud and on real HW. Starting a program with `#include ` will literally include a tiny operating system into your service during link-time. +**IncludeOS** is a minimal [unikernel](https://en.wikipedia.org/wiki/Unikernel) operating system for C++ services running in the cloud and on real hardware. Starting a program with `#include ` will include a tiny operating system into your service during link-time. IncludeOS is free software, with "no warranties or restrictions of any kind". @@ -14,14 +14,13 @@ IncludeOS is free software, with "no warranties or restrictions of any kind". ## Key features -* **Extreme memory footprint**: A minimal bootable 64-bit web server, including operating system components and anything needed from the C/C++ standard libraries is currently 2.5 MB. +* **Extreme memory footprint**: A tiny bootable 64-bit web server is currently 3.2 MB and needs only 10 MB RAM on x86_64. * **KVM, VirtualBox and VMWare support** with full virtualization, using [x86 hardware virtualization](https://en.wikipedia.org/wiki/X86_virtualization), available on most modern x86 CPUs. IncludeOS will run on any x86 hardware platform, even on a physical x86 computer, given appropriate drivers. Officially, we develop for- and test on [Linux KVM](http://www.linux-kvm.org/page/Main_Page), and VMWare [ESXi](https://www.vmware.com/products/esxi-and-esx.html)/[Fusion](https://www.vmware.com/products/fusion.html) which means that you can run your IncludeOS service on Linux, Microsoft Windows and macOS, as well as on cloud providers such as [Google Compute Engine](http://www.includeos.org/blog/2017/includeos-on-google-compute-engine.html), [OpenStack](https://www.openstack.org/) and VMWare [vcloud](https://www.vmware.com/products/vcloud-suite.html). * **Instant boot:** IncludeOS on Qemu/kvm boots in about 300ms but IBM Research has also integrated IncludeOS with [Solo5/uKVM](https://github.com/Solo5/solo5), providing boot times as low as 10 milliseconds. * **Modern C++ support** - * Full C++11/14/17 language support with [clang](http://clang.llvm.org) 5 and later. + * Full C++11/14/17 language support with [clang](http://clang.llvm.org) 6 and later. * Standard C++ library (STL) [libc++](http://libcxx.llvm.org) from [LLVM](http://llvm.org/). * Exceptions and stack unwinding (currently using [libgcc](https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html)). - * *Note:* Certain language features, such as threads and filestreams are currently missing backend support but is beeing worked on. * **Standard C library** using [musl libc](http://www.musl-libc.org/). * **Virtio and vmxnet3 Network drivers** with DMA. [Virtio](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio) provides a highly efficient and widely supported I/O virtualization. vmxnet3 is the VMWare equivalent. * **A highly modular TCP/IP-stack**. @@ -61,7 +60,7 @@ The following command will configure conan to use our build profiles and remote $ conan config install https://github.com/includeos/conan_config.git ``` -**Note:** If you prefer to set up conan manually the full configuration can be found in the [conan_config](https://github.com/includeos/conan_config.git) repository. You can browse our prebuilt conan packages in [bintray.com/includeos](https://bintray.com/includeos). +**Note:** If you prefer to set up conan manually the full configuration can be found in the [conan_config](https://github.com/includeos/conan_config.git) repository. You can browse our prebuilt conan packages in [bintray.com/includeos](https://bintray.com/includeos). From edfc533ebcdd66e975b193f6675c86a1a514f8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 21 Jul 2019 19:31:35 +0200 Subject: [PATCH 21/81] kernel: Fix multiboot end detection bug --- src/kernel/multiboot.cpp | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/kernel/multiboot.cpp b/src/kernel/multiboot.cpp index b9b34d0d30..e9e26d6ba6 100644 --- a/src/kernel/multiboot.cpp +++ b/src/kernel/multiboot.cpp @@ -34,18 +34,9 @@ #define MYINFO(X,...) INFO("Kernel", X, ##__VA_ARGS__) #endif - -extern uintptr_t _end; - - using namespace util::bitops; using namespace util::literals; - -static inline multiboot_info_t* bootinfo(uint32_t addr) -{ - // NOTE: the address is 32-bit and not a pointer - return (multiboot_info_t*) (uintptr_t) addr; -} +extern uintptr_t _end; #if defined(ARCH_aarch64) uint32_t dummy[24]; uintptr_t __multiboot_addr=(uintptr_t)&dummy[0]; @@ -53,6 +44,12 @@ static inline multiboot_info_t* bootinfo(uint32_t addr) extern uint32_t __multiboot_addr; #endif +static inline multiboot_info_t* bootinfo(uint32_t addr) +{ + // NOTE: the address is 32-bit and not a pointer + return (multiboot_info_t*) (uintptr_t) addr; +} + multiboot_info_t* kernel::bootinfo() { return (multiboot_info_t*) (uintptr_t) __multiboot_addr; @@ -70,7 +67,7 @@ uintptr_t _multiboot_memory_end(uintptr_t boot_addr) { // (e.g. multiboot's data area as offset to the _end symbol) uintptr_t _multiboot_free_begin(uintptr_t boot_addr) { - auto* info = bootinfo(boot_addr); + const auto* info = bootinfo(boot_addr); uintptr_t multi_end = reinterpret_cast(&_end); debug("* Multiboot begin: 0x%x \n", info); @@ -84,29 +81,29 @@ uintptr_t _multiboot_free_begin(uintptr_t boot_addr) if (info->cmdline > multi_end) { auto* cmdline_ptr = (const char*) (uintptr_t) info->cmdline; - // Set free begin to after the cmdline string - multi_end = info->cmdline + strlen(cmdline_ptr) + 1; + // Set free begin to after the cmdline string, + // but only if the cmdline is placed after image end + const uintptr_t cmdline_end = info->cmdline + strlen(cmdline_ptr) + 1; + if (cmdline_end > multi_end) multi_end = cmdline_end; } } debug("* Multiboot end: 0x%x \n", multi_end); - if (info->mods_count == 0) + if (info->mods_count == 0) { return multi_end; + } auto* mods_list = (multiboot_module_t*) (uintptr_t) info->mods_addr; debug("* Module list @ %p \n",mods_list); - for (multiboot_module_t* mod = mods_list; - mod < mods_list + info->mods_count; - mod ++) { - + for (auto* mod = mods_list; mod < mods_list + info->mods_count; mod ++) + { debug("\t * Module @ %#x \n", mod->mod_start); debug("\t * Args: %s \n ", (char*) (uintptr_t) mod->cmdline); debug("\t * End: %#x \n ", mod->mod_end); if (mod->mod_end > multi_end) multi_end = mod->mod_end; - } debug("* Multiboot end: 0x%x \n", multi_end); From a3c403b2897bd7d1c2c966b17272150146c7b949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 21 Jul 2019 20:04:52 +0200 Subject: [PATCH 22/81] kernel: Remove some unused startup and panic code --- src/include/kernel.hpp | 10 +++---- src/kernel/kernel.cpp | 4 +-- src/kernel/syscalls.cpp | 8 +----- src/platform/x86_pc/kernel_start.cpp | 6 +---- src/platform/x86_pc/sanity_checks.cpp | 39 +-------------------------- 5 files changed, 10 insertions(+), 57 deletions(-) diff --git a/src/include/kernel.hpp b/src/include/kernel.hpp index ad313db534..a977e94c49 100644 --- a/src/include/kernel.hpp +++ b/src/include/kernel.hpp @@ -78,16 +78,16 @@ namespace kernel { return state().is_live_updated; } - inline const char* cmdline() { + inline const char* cmdline() noexcept { return state().cmdline; } - inline bool is_panicking() noexcept { - return state().panics > 0; + inline int panics() noexcept { + return state().panics; } - inline int panics() { - return state().panics; + inline bool is_panicking() noexcept { + return panics() > 0; } inline os::Panic_action panic_action() noexcept { diff --git a/src/kernel/kernel.cpp b/src/kernel/kernel.cpp index bb04d12b05..525ea205f6 100644 --- a/src/kernel/kernel.cpp +++ b/src/kernel/kernel.cpp @@ -48,9 +48,9 @@ inline static bool is_for_production_use() { return &__for_production_use == (char*) 0x2000; } -kernel::State __kern_state; kernel::State& kernel::state() noexcept { - return __kern_state; + static kernel::State state; + return state; } util::KHz os::cpu_freq() { diff --git a/src/kernel/syscalls.cpp b/src/kernel/syscalls.cpp index 9be6660cfd..337edba773 100644 --- a/src/kernel/syscalls.cpp +++ b/src/kernel/syscalls.cpp @@ -65,9 +65,7 @@ void os::on_panic(on_panic_func func) } extern "C" void double_fault(const char* why); -extern "C" __attribute__((noreturn)) void panic_epilogue(const char*); -extern "C" __attribute__ ((weak)) -void panic_perform_inspection_procedure() {} +__attribute__((noreturn)) static void panic_epilogue(const char*); namespace net { __attribute__((weak)) void print_last_packet() {} @@ -141,10 +139,6 @@ void os::panic(const char* why) noexcept fflush(stderr); SMP::global_unlock(); - // action that restores some system functionality intended for inspection - // NB: Don't call this from double faults - panic_perform_inspection_procedure(); - panic_epilogue(why); } diff --git a/src/platform/x86_pc/kernel_start.cpp b/src/platform/x86_pc/kernel_start.cpp index 5827285cd3..650e4478ab 100644 --- a/src/platform/x86_pc/kernel_start.cpp +++ b/src/platform/x86_pc/kernel_start.cpp @@ -32,7 +32,6 @@ #endif extern "C" { - void __init_sanity_checks(); void kernel_sanity_checks(); void _init_bss(); uintptr_t _move_symbols(uintptr_t loc); @@ -65,15 +64,12 @@ void kernel_start(uint32_t magic, uint32_t addr) PRATTLE("\n////////////////// IncludeOS kernel start //////////////////\n"); PRATTLE("* Booted with magic 0x%x, grub @ 0x%x\n", magic, addr); - // generate checksums of read-only areas etc. - __init_sanity_checks(); - PRATTLE("* Grub magic: 0x%x, grub info @ 0x%x\n", magic, addr); // Determine where free memory starts extern char _end; uintptr_t free_mem_begin = reinterpret_cast(&_end); - uintptr_t memory_end = kernel::memory_end(); + uintptr_t memory_end = 0; if (magic == MULTIBOOT_BOOTLOADER_MAGIC) { free_mem_begin = _multiboot_free_begin(addr); diff --git a/src/platform/x86_pc/sanity_checks.cpp b/src/platform/x86_pc/sanity_checks.cpp index b9d381615a..8e525b02ce 100644 --- a/src/platform/x86_pc/sanity_checks.cpp +++ b/src/platform/x86_pc/sanity_checks.cpp @@ -15,15 +15,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include -#include -#include #include +#include #include -//#define ENABLE_CRC_RO - // Global constructors static int gconstr_value = 0; __attribute__((constructor, used)) @@ -31,40 +26,9 @@ static void self_test_gconstr() { gconstr_value = 1; } -#ifdef ENABLE_CRC_RO -// NOTE: crc_ro MUST NOT be initialized to zero -static uint32_t crc_ro = CRC32_BEGIN(); - -static uint32_t generate_ro_crc() noexcept -{ - extern char _TEXT_START_; - extern char _RODATA_END_; - return crc32_fast(&_TEXT_START_, &_RODATA_END_ - &_TEXT_START_); -} -#endif - -extern "C" -void __init_sanity_checks() noexcept -{ -#ifdef ENABLE_CRC_RO - // generate checksum for read-only portions of kernel - crc_ro = generate_ro_crc(); -#endif -} - extern "C" void kernel_sanity_checks() { -#ifdef ENABLE_CRC_RO - // verify checksum of read-only portions of kernel - uint32_t new_ro = generate_ro_crc(); - - if (crc_ro != new_ro) { - kprintf("CRC mismatch %#x vs %#x\n", crc_ro, new_ro); - os::panic("Sanity checks: CRC of kernel read-only area failed"); - } -#endif - // verify that Elf symbols were not overwritten bool symbols_verified = Elf::verify_symbols(); if (!symbols_verified) @@ -75,5 +39,4 @@ void kernel_sanity_checks() kprintf("Sanity checks: Global constructors not working (or modified during run-time)!\n"); os::panic("Sanity checks: Global constructors verification failed"); } - } From 67d357c6ff2ca9860106e469eef38a6f827c534a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 21 Jul 2019 20:38:07 +0200 Subject: [PATCH 23/81] kernel: Rename syscalls.cpp to panic.cpp --- src/kernel/CMakeLists.txt | 2 +- src/kernel/{syscalls.cpp => panic.cpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/kernel/{syscalls.cpp => panic.cpp} (100%) diff --git a/src/kernel/CMakeLists.txt b/src/kernel/CMakeLists.txt index b898970b8f..be3e3f6b56 100644 --- a/src/kernel/CMakeLists.txt +++ b/src/kernel/CMakeLists.txt @@ -7,8 +7,8 @@ set(SRCS memmap.cpp multiboot.cpp os.cpp + panic.cpp profile.cpp - syscalls.cpp service_stub.cpp #scoped_profiler.cpp # elf.cpp diff --git a/src/kernel/syscalls.cpp b/src/kernel/panic.cpp similarity index 100% rename from src/kernel/syscalls.cpp rename to src/kernel/panic.cpp From cd78def22938ff0f7ff8112a773d5fca200ea864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 21 Jul 2019 20:38:40 +0200 Subject: [PATCH 24/81] kernel: Add a way to disable extra symbol checks --- src/kernel/elf.cpp | 6 +++++- src/platform/x86_pc/sanity_checks.cpp | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kernel/elf.cpp b/src/kernel/elf.cpp index 16d4275683..d452c5f35b 100644 --- a/src/kernel/elf.cpp +++ b/src/kernel/elf.cpp @@ -378,6 +378,7 @@ void _move_elf_syms_location(const void* location, void* new_location) } // incoming header auto* hdr = (elfsyms_header*) location; +#ifdef TRUST_BUT_VERIFY // verify CRC sanity check const uint32_t temp_hdr = hdr->sanity_check; hdr->sanity_check = 0; @@ -411,6 +412,7 @@ void _move_elf_syms_location(const void* location, void* new_location) relocs.strsize = 0; return; } +#endif // update header relocs.syms = (ElfSym*) new_location; relocs.entries = hdr->symtab_entries; @@ -478,12 +480,14 @@ void elf_protect_symbol_areas() char* src = (char*) parser.symtab.base; ptrdiff_t size = &parser.strtab.base[parser.strtab.size] - src; if (size % os::mem::min_psize()) size += os::mem::min_psize() - (size & (os::mem::min_psize()-1)); + + INFO2("* Protecting syms %p to %p (size %#zx)\n", src, &src[size], size); if (size == 0) return; + // create the ELF symbols & strings area os::mem::vmmap().assign_range( {(uintptr_t) src, (uintptr_t) src + size-1, "Symbols & strings"}); - INFO2("* Protecting syms %p to %p (size %#zx)", src, &src[size], size); os::mem::protect((uintptr_t) src, size, os::mem::Access::read); } #endif diff --git a/src/platform/x86_pc/sanity_checks.cpp b/src/platform/x86_pc/sanity_checks.cpp index 8e525b02ce..8cbbe31af5 100644 --- a/src/platform/x86_pc/sanity_checks.cpp +++ b/src/platform/x86_pc/sanity_checks.cpp @@ -29,10 +29,12 @@ static void self_test_gconstr() { extern "C" void kernel_sanity_checks() { +#ifdef TRUST_BUT_VERIFY // verify that Elf symbols were not overwritten bool symbols_verified = Elf::verify_symbols(); if (!symbols_verified) os::panic("Sanity checks: Consistency of Elf symbols and string areas"); +#endif // global constructor self-test if (gconstr_value != 1) { From 432ee24b614d46f59594c8e4fdbb372ce60367bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 21 Jul 2019 22:56:39 +0200 Subject: [PATCH 25/81] liveupdate: Fix bug that underestimates ELF binary size --- lib/LiveUpdate/src/update.cpp | 10 +++++----- src/platform/x86_pc/sanity_checks.cpp | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/LiveUpdate/src/update.cpp b/lib/LiveUpdate/src/update.cpp index 9407fb8654..1ab2ccd678 100644 --- a/lib/LiveUpdate/src/update.cpp +++ b/lib/LiveUpdate/src/update.cpp @@ -32,8 +32,8 @@ #include #include // for flushing -#define LPRINT(x, ...) printf(x, ##__VA_ARGS__); -//#define LPRINT(x, ...) /** x **/ +//#define LPRINT(x, ...) printf(x, ##__VA_ARGS__); +#define LPRINT(x, ...) /** x **/ static const int SECT_SIZE = 512; static const int ELF_MINIMUM = 164; @@ -175,7 +175,7 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) // get offsets for the new service from program header auto* phdr = (Elf32_Phdr*) &binary[hdr->e_phoff]; bin_data = &binary[phdr->p_offset]; - bin_len = phdr->p_filesz; + bin_len = expected_total; phys_base = (char*) (uintptr_t) phdr->p_paddr; } else { @@ -191,7 +191,7 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) // get offsets for the new service from program header auto* phdr = (Elf64_Phdr*) &binary[ehdr->e_phoff]; bin_data = &binary[phdr->p_offset]; - bin_len = phdr->p_filesz; + bin_len = expected_total; phys_base = (char*) phdr->p_paddr; } @@ -274,7 +274,7 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) // copy hotswapping function to sweet spot memcpy(HOTSWAP_AREA, (void*) &hotswap, &__hotswap_length - (char*) &hotswap); /// the end - ((decltype(&hotswap)) HOTSWAP_AREA)(phys_base, bin_data, bin_len, (void*) start_offset, sr_data); + ((decltype(&hotswap)) HOTSWAP_AREA)(phys_base, bin_data, bin_len, (void*) (uintptr_t) start_offset, sr_data); } void LiveUpdate::restore_environment() { diff --git a/src/platform/x86_pc/sanity_checks.cpp b/src/platform/x86_pc/sanity_checks.cpp index 8cbbe31af5..beb0898477 100644 --- a/src/platform/x86_pc/sanity_checks.cpp +++ b/src/platform/x86_pc/sanity_checks.cpp @@ -18,6 +18,7 @@ #include #include #include +//#define TRUST_BUT_VERIFY // Global constructors static int gconstr_value = 0; From 3658486dfc0a94b2b0e2131e859d4d97e5990f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 22 Jul 2019 12:30:52 +0200 Subject: [PATCH 26/81] Remove some unused files --- src/arch/x86_64/arch_start_broken.asm | 158 --------------- src/arch/x86_64/arch_start_broken1.asm | 143 -------------- src/arch/x86_64/arch_start_new.asm | 160 --------------- src/arch/x86_64/linker_extended.ld | 228 ---------------------- src/arch/x86_64/linker_new_section_ok.txt | 228 ---------------------- src/crt/pthread.c | 60 ------ src/kernel/tls.cpp | 41 ---- 7 files changed, 1018 deletions(-) delete mode 100644 src/arch/x86_64/arch_start_broken.asm delete mode 100644 src/arch/x86_64/arch_start_broken1.asm delete mode 100644 src/arch/x86_64/arch_start_new.asm delete mode 100644 src/arch/x86_64/linker_extended.ld delete mode 100644 src/arch/x86_64/linker_new_section_ok.txt delete mode 100644 src/crt/pthread.c delete mode 100644 src/kernel/tls.cpp diff --git a/src/arch/x86_64/arch_start_broken.asm b/src/arch/x86_64/arch_start_broken.asm deleted file mode 100644 index cec61dfd91..0000000000 --- a/src/arch/x86_64/arch_start_broken.asm +++ /dev/null @@ -1,158 +0,0 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -global __arch_start:function -global __gdt64_base_pointer -extern kernel_start -extern __multiboot_magic -extern __multiboot_addr - -%define PAGE_SIZE 0x1000 -%define P4_TAB 0x1000 -%define P3_TAB 0x2000 ;; - 0x5fff -%define P2_TAB 0x100000 -%define STACK_LOCATION 0x9ffff0 - -[BITS 32] -__arch_start: - ;; disable old paging - mov eax, cr0 - and eax, 0x7fffffff ;; clear PG (bit 31) - mov cr0, eax - - ;; address for Page Map Level 4 - mov edi, P4_TAB - mov cr3, edi - mov ecx, 0x3000 / 0x4 - xor eax, eax ; Nullify the A-register. - rep stosd - - ;; create page map entry - mov edi, P4_TAB - mov DWORD [edi], P3_TAB | 0x3 ;; present+write - - ;; create 4x page directory pointer table entries - mov edi, P3_TAB - mov ebx, P2_TAB | 0x3 ;; present + write - mov DWORD [edi], ebx - add edi, 8 - add ebx, 0x1000 - mov DWORD [edi], ebx - add edi, 8 - add ebx, 0x1000 - mov DWORD [edi], ebx - add edi, 8 - add ebx, 0x1000 - mov DWORD [edi], ebx - - ;; create page directory entries - mov ecx, 512*4 ;; num entries - mov edi, P2_TAB - - ;; start at address 0x0 - mov ebx, 0x0 | 0x3 | 1 << 7 ;; present+write + huge -.ptd_loop: - mov DWORD [edi], ebx ;; Assign the physical adress to lower 32-bits - mov DWORD [edi+4], 0x0 ;; Zero out the rest of the 64-bit word - add ebx, 1 << 21 ;; 2MB increments - add edi, 8 - loop .ptd_loop - - ;; enable PAE - mov eax, cr4 - or eax, 1 << 5 - mov cr4, eax - - ;; enable long mode - mov ecx, 0xC0000080 ; EFER MSR - rdmsr - or eax, 1 << 8 ; Long Mode bit - wrmsr - - ;; enable paging - mov eax, cr0 ; Set the A-register to control register 0. - or eax, 1 << 31 - mov cr0, eax ; Set control register 0 to the A-register. - - ;; load 64-bit GDT - lgdt [__gdt64_base_pointer] - jmp GDT64.Code:long_mode - - -[BITS 64] -long_mode: - cli - - ;; segment regs - mov cx, GDT64.Data - mov ds, cx - mov es, cx - mov fs, cx - mov gs, cx - mov ss, cx - - ;; set up new stack for 64-bit - push rsp - mov rsp, STACK_LOCATION - mov rbp, rsp - - ;; setup temporary smp table - mov rax, sentinel_table - mov rdx, 0 - mov rcx, 0xC0000100 ;; FS BASE - wrmsr - - ;; geronimo! - mov edi, DWORD[__multiboot_magic] - mov esi, DWORD[__multiboot_addr] - call kernel_start - pop rsp - ret - -sentinel_table: - dq sentinel_table ;; 0x0 - dq 0 ;; 0x8 - dq 0 ;; 0x10 - dq 0 ;; 0x18 - dq 0 ;; 0x20 - dq 0x123456789ABCDEF - -SECTION .data -GDT64: - .Null: equ $ - GDT64 ; The null descriptor. - dq 0 - .Code: equ $ - GDT64 ; The code descriptor. - dw 0 ; Limit (low). - dw 0 ; Base (low). - db 0 ; Base (middle) - db 10011010b ; Access (exec/read). - db 00100000b ; Granularity. - db 0 ; Base (high). - .Data: equ $ - GDT64 ; The data descriptor. - dw 0 ; Limit (low). - dw 0 ; Base (low). - db 0 ; Base (middle) - db 10010010b ; Access (read/write). - db 00000000b ; Granularity. - db 0 ; Base (high). - .Task: equ $ - GDT64 ; TSS descriptor. - dq 0 - dq 0 - - dw 0x0 ;; alignment padding -__gdt64_base_pointer: - dw $ - GDT64 - 1 ; Limit. - dq GDT64 ; Base. diff --git a/src/arch/x86_64/arch_start_broken1.asm b/src/arch/x86_64/arch_start_broken1.asm deleted file mode 100644 index 177b8dc499..0000000000 --- a/src/arch/x86_64/arch_start_broken1.asm +++ /dev/null @@ -1,143 +0,0 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -global __arch_start:function -global __gdt64_base_pointer -extern kernel_start -extern __multiboot_magic -extern __multiboot_addr - -%define P4_TAB 0x1000 -%define P3_TAB 0x2000 -%define NUM_ENTRIES 4 -%define STACK_LOCATION 0x1ffff0 - -[BITS 32] -__arch_start: - ;; disable old paging - mov eax, cr0 - and eax, 0x7fffffff ;; clear PG (bit 31) - mov cr0, eax - - ;; address for Page Map Level 4 - mov edi, P4_TAB - mov cr3, edi - ;; clear out P4 and P3 - mov ecx, 0x2000 / 0x4 - xor eax, eax ; Nullify the A-register. - rep stosd - - ;; create page map entry - mov edi, P4_TAB - mov DWORD [edi], P3_TAB | 0x3 ;; present+write - - ;; create 4x 1GB mappings - mov ecx, NUM_ENTRIES - mov edi, P3_TAB - mov ebx, 0x0 | 0x3 | 1 << 7 ;; present + write + huge - -.ptd_loop: - mov DWORD [edi], ebx ;; Assign the physical adress to lower 32-bits - mov DWORD [edi+4], 0x0 ;; Zero out the rest of the 64-bit word - add ebx, 1 << 30 ;; 1GB increments - add edi, 8 - loop .ptd_loop - - ;; enable PAE - mov eax, cr4 - or eax, 1 << 5 - mov cr4, eax - - ;; enable long mode - mov ecx, 0xC0000080 ; EFER MSR - rdmsr - or eax, 1 << 8 ; Long Mode bit - wrmsr - - ;; enable paging - mov eax, cr0 ; Set the A-register to control register 0. - or eax, 1 << 31 - mov cr0, eax ; Set control register 0 to the A-register. - - ;; load 64-bit GDT - lgdt [__gdt64_base_pointer] - jmp GDT64.Code:long_mode - - -[BITS 64] -long_mode: - cli - - ;; segment regs - mov cx, GDT64.Data - mov ds, cx - mov es, cx - mov fs, cx - mov gs, cx - mov ss, cx - - ;; set up new stack for 64-bit - push rsp - mov rsp, STACK_LOCATION - mov rbp, rsp - - ;; setup temporary smp table - mov rax, sentinel_table - mov rdx, 0 - mov rcx, 0xC0000100 ;; FS BASE - wrmsr - - ;; geronimo! - mov edi, DWORD[__multiboot_magic] - mov esi, DWORD[__multiboot_addr] - call kernel_start - pop rsp - ret - -sentinel_table: - dq sentinel_table ;; 0x0 - dq 0 ;; 0x8 - dq 0 ;; 0x10 - dq 0 ;; 0x18 - dq 0 ;; 0x20 - dq 0x123456789ABCDEF - -SECTION .data -GDT64: - .Null: equ $ - GDT64 ; The null descriptor. - dq 0 - .Code: equ $ - GDT64 ; The code descriptor. - dw 0 ; Limit (low). - dw 0 ; Base (low). - db 0 ; Base (middle) - db 10011010b ; Access (exec/read). - db 00100000b ; Granularity. - db 0 ; Base (high). - .Data: equ $ - GDT64 ; The data descriptor. - dw 0 ; Limit (low). - dw 0 ; Base (low). - db 0 ; Base (middle) - db 10010010b ; Access (read/write). - db 00000000b ; Granularity. - db 0 ; Base (high). - .Task: equ $ - GDT64 ; TSS descriptor. - dq 0 - dq 0 - - dw 0x0 ;; alignment padding -__gdt64_base_pointer: - dw $ - GDT64 - 1 ; Limit. - dq GDT64 ; Base. diff --git a/src/arch/x86_64/arch_start_new.asm b/src/arch/x86_64/arch_start_new.asm deleted file mode 100644 index effafb528f..0000000000 --- a/src/arch/x86_64/arch_start_new.asm +++ /dev/null @@ -1,160 +0,0 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -global __arch_start:function -global __gdt64_base_pointer -extern kernel_start -extern __multiboot_magic -extern __multiboot_addr - -%define P4_TAB 0x1000 -%define P3_TAB 0x2000 -%define NUM_ENTRIES 512 -%define STACK_LOCATION 0x900000 - -;; CR0 paging enable bit -%define PAGING_ENABLE 0x80000000 -;; CR0 Supervisor write-protect enable -%define SUPER_WP_ENABLE 0x10000 - -;; Extended Feature Enable Register (MSR) -%define IA32_EFER_MSR 0xC0000080 -;; EFER Longmode bit -%define LONGMODE_ENABLE 0x100 -;; EFER Execute Disable bit -%define NX_ENABLE 0x800 - - -[BITS 32] -__arch_start: - ;; disable old paging - mov eax, cr0 - and eax, ~PAGING_ENABLE ;; clear PG (bit 31) - mov cr0, eax - - ;; address for Page Map Level 4 - mov edi, P4_TAB - mov cr3, edi - - ;; clear out P4 and P3 - mov ecx, 0x2000 / 0x4 - xor eax, eax ; Nullify the A-register. - rep stosd - - ;; create page map entry - mov edi, P4_TAB - mov DWORD [edi], P3_TAB | 0x3 ;; present+write - - ;; create 512x 1GB mappings - mov ecx, NUM_ENTRIES - mov edi, P3_TAB - mov eax, 0x0 | 0x3 | 1 << 7 ;; present + write + huge - mov ebx, 0x0 - -.ptd_loop: - mov DWORD [edi], eax ;; Low word - mov DWORD [edi+4], ebx ;; High word - add eax, 1 << 30 ;; 1GB increments - adc ebx, 0 ;; increment high word when CF set - add edi, 8 - loop .ptd_loop - - ;; enable PAE - mov eax, cr4 - or eax, 1 << 5 - mov cr4, eax - - ;; enable long mode - mov ecx, IA32_EFER_MSR - rdmsr - or eax, (LONGMODE_ENABLE | NX_ENABLE) - - wrmsr - - ;; enable paging - mov eax, cr0 ; Set the A-register to control register 0. - or eax, (PAGING_ENABLE | SUPER_WP_ENABLE) - mov cr0, eax ; Set control register 0 to the A-register. - - ;; load 64-bit GDT - lgdt [__gdt64_base_pointer] - jmp GDT64.Code:long_mode - - -[BITS 64] -long_mode: - cli - - ;; segment regs - mov cx, GDT64.Data - mov ds, cx - mov es, cx - mov fs, cx - mov gs, cx - mov ss, cx - - ;; set up new stack for 64-bit - push rsp - mov rsp, STACK_LOCATION - mov rbp, rsp - - ;; setup temporary smp table - mov rax, sentinel_table - mov rdx, 0 - mov rcx, 0xC0000100 ;; FS BASE - wrmsr - - ;; geronimo! - mov edi, DWORD[__multiboot_magic] - mov esi, DWORD[__multiboot_addr] - call kernel_start - pop rsp - ret - -sentinel_table: - dq sentinel_table ;; 0x0 - dq 0 ;; 0x8 - dq 0 ;; 0x10 - dq 0 ;; 0x18 - dq 0 ;; 0x20 - dq 0x123456789ABCDEF - -SECTION .data -GDT64: - .Null: equ $ - GDT64 ; The null descriptor. - dq 0 - .Code: equ $ - GDT64 ; The code descriptor. - dw 0 ; Limit (low). - dw 0 ; Base (low). - db 0 ; Base (middle) - db 10011010b ; Access (exec/read). - db 00100000b ; Granularity. - db 0 ; Base (high). - .Data: equ $ - GDT64 ; The data descriptor. - dw 0 ; Limit (low). - dw 0 ; Base (low). - db 0 ; Base (middle) - db 10010010b ; Access (read/write). - db 00000000b ; Granularity. - db 0 ; Base (high). - .Task: equ $ - GDT64 ; TSS descriptor. - dq 0 - dq 0 - - dw 0x0 ;; alignment padding -__gdt64_base_pointer: - dw $ - GDT64 - 1 ; Limit. - dq GDT64 ; Base. diff --git a/src/arch/x86_64/linker_extended.ld b/src/arch/x86_64/linker_extended.ld deleted file mode 100644 index bfe125b6bd..0000000000 --- a/src/arch/x86_64/linker_extended.ld +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file is a part of the IncludeOS unikernel - www.includeos.org - * - * Copyright 2015 Oslo and Akershus University College of Applied Sciences - * and Alfred Bratterud - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http: *www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -**/ -OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") -OUTPUT_ARCH(i386:x86-64) - -ENTRY(_start) - -SECTIONS -{ - - PROVIDE (__executable_start = SEGMENT_START("text-segment", 0xa00000)); - . = SEGMENT_START("text-segment", 0xa00000) + SIZEOF_HEADERS; - . = _ELF_START_ + SIZEOF_HEADERS; - - /* For convenience w. multiboot */ - PROVIDE ( _ELF_START_ = __executable_start); - PROVIDE ( _LOAD_START_ = _ELF_START_ ); - - .multiboot : { - PROVIDE(_MULTIBOOT_START_ = . ); - *(.multiboot) - } - - .text ALIGN(0x1000): - { - PROVIDE( _TEXT_START_ = . ); - /* For solo5, although it's just used to print the mem layout. */ - _stext = .; - *(.text) - *(.text.*) - *(.gnu.linkonce.t*) - /* For solo5, although it's just used to print the mem layout. */ - _etext = .; - } - - PROVIDE( _TEXT_END_ = . ); - . = SEGMENT_START("data-segment", .); - . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); - .init ALIGN(0x10) : { - _INIT_START_ = .; - *(.init) - _INIT_END_ = .; - } - - .fini ALIGN(0x10) : { - _FINI_START_ = .; - *(.fini) - _FINI_END_ = .; - } - - /* Global offset-table. For dynamic linking */ - .got ALIGN(0x10) : { - *(.got*) - } - -/** - * .ctors, .dtors, .preinit_array, .init_array, .fini_array - * from GNU LD default linker script - */ - -.ctors : - { - _GCONSTR_START_ = .; - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin.o(.ctors)) - KEEP (*crtbegin?.o(.ctors)) - /* We don't want to include the .ctor section from - the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - _GCONSTR_END_ = .; - } - - .dtors : - { - KEEP (*crtbegin.o(.dtors)) - KEEP (*crtbegin?.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - } - - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) - PROVIDE_HIDDEN (__init_array_end = .); - } - - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) - PROVIDE_HIDDEN (__fini_array_end = .); - } - - .rodata ALIGN(0x1000): - { - _RODATA_START_ = .; - *(.rodata*) - *(.gnu.linkonce.r*) - _RODATA_END_ = .; - /* For solo5, although it's just used to print the mem layout. */ - _erodata = .; - } - - .config ALIGN(0x8) : { - _CONFIG_JSON_START_ = .; - KEEP(*(.config)) - _CONFIG_JSON_END_ = .; - BYTE(0); - } - - - /* For stack unwinding (exception handling) - Taken from https://github.com/llvm-mirror/libunwind/blob/master/src/AddressSpace.hpp - Linker script reference in the comments*/ - - .eh_frame : - { - PROVIDE (__eh_frame_start = .); - KEEP(*(.eh_frame)) - PROVIDE (__eh_frame_end = .); - } - - .eh_frame_hdr : - { - KEEP(*(.eh_frame_hdr)) - } - - .gcc_except_table : - { - *(.gcc_except_table) - } - - .data : - { - _DATA_START_ = .; - *(.data) - *(.data.*) - *(.gnu.linkonce.d*) - _DATA_END_ = .; - } - - .tdata ALIGN(0x10) : - { - _TDATA_START_ = .; - *(.tdata .tdata.*) - _TDATA_END_ = .; - . = ALIGN(0x10); - } - - .tbss : - { - _TBSS_START_ = .; - *(.tbss .tbss.*) - _TBSS_END_ = .; - . = ALIGN(0x10); - } - - .memdisk : - { - _DISK_START_ = .; - *(.diskdata) - _DISK_END_ = .; - } - - .elf_symbols : { - _ELF_SYM_START_ = .; - LONG (0); - } - - /** Optional memory hole between memdisk and bss **/ - . += PRE_BSS_AREA; - - .bss ALIGN(0x1000) : - { - - _BSS_START_ = .; - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - _BSS_END_ = .; - } - . = ALIGN(0x8); - - _end = .; - . = DATA_SEGMENT_END (.); - - PROVIDE (end = .); - PROVIDE (_ELF_END_ = .); - PROVIDE (_LOAD_END_ = .); -} diff --git a/src/arch/x86_64/linker_new_section_ok.txt b/src/arch/x86_64/linker_new_section_ok.txt deleted file mode 100644 index 389e6322f7..0000000000 --- a/src/arch/x86_64/linker_new_section_ok.txt +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file is a part of the IncludeOS unikernel - www.includeos.org - * - * Copyright 2015 Oslo and Akershus University College of Applied Sciences - * and Alfred Bratterud - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http: *www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -**/ -ENTRY(_start) -PHDRS -{ - headers PT_LOAD FILEHDR PHDRS ; - text PT_LOAD; - data PT_LOAD ; - -} - -SECTIONS -{ - - PROVIDE ( _ELF_START_ = . + 0xA00000); - PROVIDE ( _LOAD_START_ = _ELF_START_ ); /* For convenience w. multiboot */ - - . = _ELF_START_ + SIZEOF_HEADERS; - - .multiboot : { - PROVIDE(_MULTIBOOT_START_ = . ); - *(.multiboot) - } :headers - - - .text ALIGN(0x1000): - { - PROVIDE( _TEXT_START_ = . ); - /* For solo5, although it's just used to print the mem layout. */ - _stext = .; - *(.text) - *(.text.*) - *(.gnu.linkonce.t*) - /* For solo5, although it's just used to print the mem layout. */ - _etext = .; - }:text - - PROVIDE( _TEXT_END_ = . ); - - .init ALIGN(0x10) : { - _INIT_START_ = .; - *(.init) - _INIT_END_ = .; - }:text - - .fini ALIGN(0x10) : { - _FINI_START_ = .; - *(.fini) - _FINI_END_ = .; - }:text - - /* Global offset-table. For dynamic linking */ - .got ALIGN(0x10) : { - *(.got*) - }:text - -/** - * .ctors, .dtors, .preinit_array, .init_array, .fini_array - * from GNU LD default linker script - */ - -.ctors : - { - _GCONSTR_START_ = .; - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin.o(.ctors)) - KEEP (*crtbegin?.o(.ctors)) - /* We don't want to include the .ctor section from - the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - _GCONSTR_END_ = .; - }:text - - .dtors : - { - KEEP (*crtbegin.o(.dtors)) - KEEP (*crtbegin?.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - }:text - - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - }:text - - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) - PROVIDE_HIDDEN (__init_array_end = .); - }:text - - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) - PROVIDE_HIDDEN (__fini_array_end = .); - } - - .config ALIGN(0x8) : { - _CONFIG_JSON_START_ = .; - KEEP(*(.config)) - _CONFIG_JSON_END_ = .; - BYTE(0); - } - - .rodata : - { - _RODATA_START_ = .; - *(.rodata*) - *(.gnu.linkonce.r*) - _RODATA_END_ = .; - /* For solo5, although it's just used to print the mem layout. */ - _erodata = .; - } - - /* For stack unwinding (exception handling) - Taken from https://github.com/llvm-mirror/libunwind/blob/master/src/AddressSpace.hpp - Linker script reference in the comments - */ - .eh_frame : - { - PROVIDE (__eh_frame_start = .); - KEEP(*(.eh_frame)) - PROVIDE (__eh_frame_end = .); - } - - .eh_frame_hdr : - { - KEEP(*(.eh_frame_hdr)) - } - - __eh_frame_hdr_start = SIZEOF(.eh_frame_hdr) > 0 ? ADDR(.eh_frame_hdr) : 0; - __eh_frame_hdr_end = SIZEOF(.eh_frame_hdr) > 0 ? . : 0; - - .gcc_except_table : - { - *(.gcc_except_table) - } - - .data : - { - _DATA_START_ = .; - *(.data) - *(.data.*) - *(.gnu.linkonce.d*) - _DATA_END_ = .; - } - - .tdata ALIGN(0x10) : - { - _TDATA_START_ = .; - *(.tdata .tdata.*) - _TDATA_END_ = .; - . = ALIGN(0x10); - } - .tbss : - { - _TBSS_START_ = .; - *(.tbss .tbss.*) - _TBSS_END_ = .; - . = ALIGN(0x10); - } - - .memdisk : - { - _DISK_START_ = .; - *(.diskdata) - _DISK_END_ = .; - } - - .elf_symbols : { - _ELF_SYM_START_ = .; - LONG (0); - } - - /** Optional memory hole between memdisk and bss **/ - . += PRE_BSS_AREA; - - .bss ALIGN(0x1000) : - { - _BSS_START_ = .; - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - _BSS_END_ = .; - } - . = ALIGN(0x8); - - _end = .; - - PROVIDE (end = .); - PROVIDE (_ELF_END_ = .); - PROVIDE (_LOAD_END_ = .); -} diff --git a/src/crt/pthread.c b/src/crt/pthread.c deleted file mode 100644 index bd9a35ebb7..0000000000 --- a/src/crt/pthread.c +++ /dev/null @@ -1,60 +0,0 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include -#define UNLOCKED 0 -#define LOCKED 1 - -extern void panic(const char* why); -typedef int spinlock_t; - -void yield() -{ - printf("yield() called, but not implemented yet!"); -} - -static int compare_and_swap(volatile spinlock_t* addr) -{ - const int expected = UNLOCKED; - const int newval = LOCKED; - return __sync_val_compare_and_swap(addr, expected, newval); -} - - -int pthread_mutex_init(volatile spinlock_t* lock) -{ - *lock = UNLOCKED; - return 0; -} -int pthread_mutex_destroy(volatile spinlock_t* lock) -{ - (void) lock; - return 0; -} - -int pthread_mutex_lock(volatile spinlock_t* lock) -{ - while (!compare_and_swap(lock)) - yield(); - return 0; -} - -int pthread_mutex_unlock(volatile spinlock_t* lock) -{ - *lock = UNLOCKED; - return 0; -} diff --git a/src/kernel/tls.cpp b/src/kernel/tls.cpp deleted file mode 100644 index 6bd5486915..0000000000 --- a/src/kernel/tls.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include - -extern char _TDATA_START_; -extern char _TDATA_END_; -extern char _TBSS_START_; -extern char _TBSS_END_; - -namespace tls -{ - static size_t align_value(size_t size) - { - if (size & 15) size += 16 - (size & 15); - return size; - } - - size_t get_tls_size() - { - const auto TDATA_SIZE = &_TDATA_END_ - &_TDATA_START_; - const auto TBSS_SIZE = &_TBSS_END_ - &_TBSS_START_; - return align_value(TDATA_SIZE) + align_value(TBSS_SIZE); - } - - void fill_tls_data(char* data) - { - const auto TDATA_SIZE = &_TDATA_END_ - &_TDATA_START_; - const auto TBSS_SIZE = &_TBSS_END_ - &_TBSS_START_; - - // copy over APs .tdata - char* tdata = data; - memcpy(tdata, &_TDATA_START_, TDATA_SIZE); - // clear APs .tbss - char* tbss = data + align_value(TDATA_SIZE); - memset(tbss, 0, TBSS_SIZE); - - //printf("TLS at %p is %lu -> %lu bytes\n", data, TDATA_SIZE + TBSS_SIZE, align_value(TDATA_SIZE) + align_value(TBSS_SIZE)); - //printf("DATA at %p is %lu -> %lu bytes\n", tdata, TDATA_SIZE, align_value(TDATA_SIZE)); - //printf("TBSS at %p is %lu -> %lu bytes\n", tbss, TBSS_SIZE, align_value(TBSS_SIZE)); - } -} From f403d2054ecd937bf6101ab3f8a4384f72b80749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 22 Jul 2019 18:22:23 +0200 Subject: [PATCH 27/81] Add licence removal script --- remove.txt | 27 +++++++++++++++++++++++++++ remove_licence.py | 17 +++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 remove.txt create mode 100755 remove_licence.py diff --git a/remove.txt b/remove.txt new file mode 100644 index 0000000000..73633652ae --- /dev/null +++ b/remove.txt @@ -0,0 +1,27 @@ +// This file is a part of the IncludeOS unikernel - www.includeos.org +// +// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences +// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences +// Copyright 2015-2018 Oslo and Akershus University College of Applied Sciences +// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences +// Copyright 2016-2018 Oslo and Akershus University College of Applied Sciences +// Copyright 2018-2019 Oslo and Akershus University College of Applied Sciences +// Copyright 2015 Oslo and Akershus University College of Applied Sciences +// Copyright 2016 Oslo and Akershus University College of Applied Sciences +// Copyright 2017 Oslo and Akershus University College of Applied Sciences +// Copyright 2018 Oslo and Akershus University College of Applied Sciences +// and Alfred Bratterud +// Copyright 2017 IncludeOS AS, Oslo, Norway +// Copyright 2018 IncludeOS AS, Oslo, Norway +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. diff --git a/remove_licence.py b/remove_licence.py new file mode 100755 index 0000000000..d362b2e0bf --- /dev/null +++ b/remove_licence.py @@ -0,0 +1,17 @@ +#!/usr/bin/python +import sys +outfile = sys.argv[1] +print(outfile + " is being processed...") + +list = () +with open("remove.txt", "r") as f: + list = f.readlines() + + +with open(outfile, "r+") as f: + d = f.readlines() + f.seek(0) + for i in d: + if i not in list: + f.write(i) + f.truncate() From 826686c6c9c0d378071e2f689361911b8bf56198 Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Mon, 22 Jul 2019 18:35:23 +0200 Subject: [PATCH 28/81] Remove header spam from all source files --- .gitignore | 3 -- NOTICE | 8 ----- api/arch.hpp | 16 --------- api/arch/aarch64.hpp | 16 --------- api/arch/i686.hpp | 16 --------- api/arch/x86/cpu.hpp | 16 --------- api/arch/x86/gdt.hpp | 16 --------- api/arch/x86/paging.hpp | 19 ----------- api/arch/x86/paging_utils.hpp | 16 --------- api/arch/x86_64.hpp | 16 --------- api/common | 16 --------- api/debug | 16 --------- api/delegate | 14 -------- api/fiber | 16 --------- api/fs/common.hpp | 16 --------- api/fs/dirent.hpp | 16 --------- api/fs/disk.hpp | 16 --------- api/fs/fat.hpp | 16 --------- api/fs/fat_internal.hpp | 16 --------- api/fs/fd_compatible.hpp | 16 --------- api/fs/filesystem.hpp | 16 --------- api/fs/mbr.hpp | 14 -------- api/fs/memdisk.hpp | 16 --------- api/fs/partition.hpp | 16 --------- api/fs/path.hpp | 16 --------- api/fs/vfs.hpp | 16 --------- api/fuzz/fuzzy_http.hpp | 16 --------- api/fuzz/fuzzy_stream.hpp | 16 --------- api/hal/detail/machine.hpp | 15 -------- api/hal/machine.hpp | 15 -------- api/hal/machine_memory.hpp | 15 -------- api/http | 16 --------- api/https | 16 --------- api/hw/async_device.hpp | 16 --------- api/hw/block_device.hpp | 16 --------- api/hw/cpu.hpp | 15 -------- api/hw/device.hpp | 17 ---------- api/hw/ioport.hpp | 16 --------- api/hw/mac_addr.hpp | 16 --------- api/hw/msi.hpp | 16 --------- api/hw/nic.hpp | 16 --------- api/hw/pci.hpp | 16 --------- api/hw/pci_device.hpp | 16 --------- api/hw/pci_manager.hpp | 16 --------- api/hw/ps2.hpp | 16 --------- api/hw/serial.hpp | 16 --------- api/hw/usernet.hpp | 16 --------- api/hw/writable_blkdev.hpp | 16 --------- api/info | 16 --------- api/isotime | 16 --------- api/kernel/botan_rng.hpp | 16 --------- api/kernel/context.hpp | 16 --------- api/kernel/cpuid.hpp | 16 --------- api/kernel/crash_context.hpp | 16 --------- api/kernel/elf.hpp | 16 --------- api/kernel/events.hpp | 16 --------- api/kernel/fiber.hpp | 16 --------- api/kernel/memmap.hpp | 16 --------- api/kernel/memory.hpp | 16 --------- api/kernel/rng.hpp | 16 --------- api/kernel/rtc.hpp | 16 --------- api/kernel/service.hpp | 16 --------- api/kernel/solo5_manager.hpp | 16 --------- api/kernel/terminal.hpp | 16 --------- api/kernel/timers.hpp | 16 --------- api/kernel/vga.hpp | 16 --------- api/membitmap | 14 -------- api/memdisk | 16 --------- api/memstream | 14 -------- api/net/addr.hpp | 15 -------- api/net/botan/credman.hpp | 16 --------- api/net/botan/tls_server.hpp | 16 --------- api/net/buffer_store.hpp | 16 --------- api/net/checksum.hpp | 16 --------- api/net/configure.hpp | 16 --------- api/net/conntrack.hpp | 16 --------- api/net/dhcp/dh4client.hpp | 16 --------- api/net/dhcp/dhcp4.hpp | 16 --------- api/net/dhcp/dhcpd.hpp | 16 --------- api/net/dhcp/message.hpp | 16 --------- api/net/dhcp/options.hpp | 16 --------- api/net/dhcp/record.hpp | 16 --------- api/net/dns/client.hpp | 16 --------- api/net/dns/dns.hpp | 16 --------- api/net/dns/query.hpp | 15 -------- api/net/dns/record.hpp | 15 -------- api/net/dns/response.hpp | 15 -------- api/net/error.hpp | 16 --------- api/net/ethernet/ethernet.hpp | 16 --------- api/net/ethernet/ethernet_8021q.hpp | 16 --------- api/net/ethernet/ethertype.hpp | 16 --------- api/net/ethernet/header.hpp | 16 --------- api/net/http/basic_client.hpp | 16 --------- api/net/http/client.hpp | 15 -------- api/net/http/client_connection.hpp | 16 --------- api/net/http/common.hpp | 16 --------- api/net/http/connection.hpp | 16 --------- api/net/http/cookie.hpp | 16 --------- api/net/http/error.hpp | 16 --------- api/net/http/header.hpp | 16 --------- api/net/http/header_fields.hpp | 16 --------- api/net/http/message.hpp | 16 --------- api/net/http/methods.hpp | 16 --------- api/net/http/mime_types.hpp | 16 --------- api/net/http/request.hpp | 16 --------- api/net/http/response.hpp | 16 --------- api/net/http/response_writer.hpp | 16 --------- api/net/http/server.hpp | 16 --------- api/net/http/server_connection.hpp | 16 --------- api/net/http/status_code_constants.hpp | 13 ------- api/net/http/status_codes.hpp | 16 --------- api/net/http/time.hpp | 16 --------- api/net/http/version.hpp | 16 --------- api/net/https/botan_server.hpp | 16 --------- api/net/https/openssl_server.hpp | 16 --------- api/net/https/s2n_server.hpp | 16 --------- api/net/iana.hpp | 15 -------- api/net/inet.hpp | 16 --------- api/net/inet_common.hpp | 16 --------- api/net/interfaces | 16 --------- api/net/interfaces.hpp | 16 --------- api/net/ip4/addr.hpp | 16 --------- api/net/ip4/arp.hpp | 16 --------- api/net/ip4/cidr.hpp | 16 --------- api/net/ip4/header.hpp | 16 --------- api/net/ip4/icmp4.hpp | 16 --------- api/net/ip4/icmp4_common.hpp | 16 --------- api/net/ip4/icmp_error.hpp | 16 --------- api/net/ip4/ip4.hpp | 16 --------- api/net/ip4/packet_arp.hpp | 16 --------- api/net/ip4/packet_icmp4.hpp | 16 --------- api/net/ip4/packet_ip4.hpp | 16 --------- api/net/ip6/addr.hpp | 16 --------- api/net/ip6/addr_list.hpp | 16 --------- api/net/ip6/detail/stateful_addr.hpp | 17 ---------- api/net/ip6/dhcp6.hpp | 14 -------- api/net/ip6/extension_header.hpp | 15 -------- api/net/ip6/header.hpp | 16 --------- api/net/ip6/icmp6.hpp | 16 --------- api/net/ip6/icmp6_common.hpp | 17 ---------- api/net/ip6/icmp6_error.hpp | 16 --------- api/net/ip6/ip6.hpp | 16 --------- api/net/ip6/mld.hpp | 16 --------- api/net/ip6/mld/message.hpp | 16 --------- api/net/ip6/ndp.hpp | 16 --------- api/net/ip6/ndp/host_params.hpp | 16 --------- api/net/ip6/ndp/message.hpp | 16 --------- api/net/ip6/ndp/options.hpp | 16 --------- api/net/ip6/ndp/router_entry.hpp | 16 --------- api/net/ip6/ndp/router_params.hpp | 16 --------- api/net/ip6/packet_icmp6.hpp | 16 --------- api/net/ip6/packet_ip6.hpp | 16 --------- api/net/ip6/packet_mld.hpp | 16 --------- api/net/ip6/packet_ndp.hpp | 16 --------- api/net/ip6/slaac.hpp | 16 --------- api/net/ip6/stateful_addr.hpp | 16 --------- api/net/ip6/tcp6.hpp | 16 --------- api/net/ip6/udp6.hpp | 16 --------- api/net/link_layer.hpp | 16 --------- api/net/nat/napt.hpp | 16 --------- api/net/nat/nat.hpp | 16 --------- api/net/netfilter.hpp | 16 --------- api/net/packet.hpp | 16 --------- api/net/port_util.hpp | 16 --------- api/net/router.hpp | 16 --------- api/net/s2n/stream.hpp | 16 --------- api/net/socket.hpp | 16 --------- api/net/stream.hpp | 16 --------- api/net/stream_buffer.hpp | 16 --------- api/net/tcp/common.hpp | 16 --------- api/net/tcp/connection.hpp | 16 --------- api/net/tcp/connection_states.hpp | 16 --------- api/net/tcp/headers.hpp | 16 --------- api/net/tcp/listener.hpp | 16 --------- api/net/tcp/options.hpp | 16 --------- api/net/tcp/packet.hpp | 16 --------- api/net/tcp/packet4_view.hpp | 15 -------- api/net/tcp/packet6_view.hpp | 15 -------- api/net/tcp/packet_view.hpp | 15 -------- api/net/tcp/read_buffer.hpp | 16 --------- api/net/tcp/read_request.hpp | 16 --------- api/net/tcp/rttm.hpp | 16 --------- api/net/tcp/sack.hpp | 16 --------- api/net/tcp/tcp.hpp | 16 --------- api/net/tcp/tcp_conntrack.hpp | 15 -------- api/net/tcp/tcp_errors.hpp | 16 --------- api/net/tcp/write_queue.hpp | 16 --------- api/net/udp/common.hpp | 15 -------- api/net/udp/header.hpp | 15 -------- api/net/udp/packet4_view.hpp | 15 -------- api/net/udp/packet6_view.hpp | 15 -------- api/net/udp/packet_udp.hpp | 16 --------- api/net/udp/packet_view.hpp | 15 -------- api/net/udp/socket.hpp | 16 --------- api/net/udp/udp.hpp | 16 --------- api/net/util.hpp | 16 --------- api/net/vif.hpp | 16 --------- api/net/vlan | 16 --------- api/net/vlan_manager.hpp | 16 --------- api/net/ws/connector.hpp | 16 --------- api/net/ws/header.hpp | 16 --------- api/net/ws/websocket.hpp | 16 --------- api/os | 16 --------- api/os.hpp | 15 -------- api/plugins/unik.hpp | 16 --------- api/posix/fd.hpp | 16 --------- api/posix/fd_map.hpp | 16 --------- api/posix/file_fd.hpp | 16 --------- api/posix/rng_fd.hpp | 16 --------- api/posix/sockfd.hpp | 16 --------- api/posix/syslog_print_socket.hpp | 15 -------- api/posix/syslog_udp_socket.hpp | 15 -------- api/posix/tcp_fd.hpp | 16 --------- api/posix/udp_fd.hpp | 16 --------- api/posix/unix_fd.hpp | 15 -------- api/posix/unix_fd_impl.hpp | 15 -------- api/profile | 16 --------- api/ringbuffer | 14 -------- api/rtc | 16 --------- api/serial | 14 -------- api/service | 14 -------- api/signal | 14 -------- api/smp | 16 --------- api/smp_utils | 16 --------- api/statman | 16 --------- api/syslogd | 16 --------- api/system_log | 15 -------- api/tar | 16 --------- api/terminal | 16 --------- api/timers | 14 -------- api/uri | 16 --------- api/util/alloc_buddy.hpp | 17 ---------- api/util/alloc_lstack.hpp | 15 -------- api/util/alloc_pmr.hpp | 15 -------- api/util/allocator.hpp | 15 -------- api/util/async.hpp | 16 --------- api/util/autoconf.hpp | 16 --------- api/util/base64.hpp | 20 ----------- api/util/bitops.hpp | 20 ----------- api/util/config.hpp | 16 --------- api/util/crc32.hpp | 16 --------- api/util/crc64.hpp | 15 -------- api/util/delegate.hpp | 16 --------- api/util/detail/alloc_pmr.hpp | 15 -------- api/util/detail/string_view | 16 --------- api/util/elf_binary.hpp | 16 --------- api/util/elf_binary.inc | 16 --------- api/util/fixed_bitmap.hpp | 16 --------- api/util/fixed_list_alloc.hpp | 16 --------- api/util/fixed_queue.hpp | 16 --------- api/util/fixed_storage.hpp | 16 --------- api/util/fixed_vector.hpp | 16 --------- api/util/isotime.hpp | 16 --------- api/util/logger.hpp | 16 --------- api/util/membitmap.hpp | 16 --------- api/util/memstream.h | 14 -------- api/util/path_to_regex.hpp | 16 --------- api/util/percent_encoding.hpp | 16 --------- api/util/ringbuffer.hpp | 16 --------- api/util/signal.hpp | 16 --------- api/util/statman.hpp | 16 --------- api/util/syslog_facility.hpp | 16 --------- api/util/syslogd.hpp | 16 --------- api/util/tar.hpp | 16 --------- api/util/timer.hpp | 16 --------- api/util/typename.hpp | 16 --------- api/util/units.hpp | 15 -------- api/util/uri.hpp | 16 --------- api/vga | 16 --------- api/virtio/virtio.hpp | 16 --------- lib/LiveUpdate/include/liveupdate | 15 -------- lib/LiveUpdate/include/liveupdate.hpp | 15 -------- lib/LiveUpdate/include/storage.hpp | 15 -------- lib/LiveUpdate/src/elfscan.cpp | 15 -------- lib/LiveUpdate/src/hotswap.cpp | 15 -------- lib/LiveUpdate/src/hotswap64.asm | 18 ---------- lib/LiveUpdate/src/hotswap64_blob.asm | 17 ++-------- lib/LiveUpdate/src/partition.cpp | 15 -------- lib/LiveUpdate/src/resume.cpp | 15 -------- lib/LiveUpdate/src/rollback.cpp | 15 -------- lib/LiveUpdate/src/serialize_tcp.cpp | 15 -------- lib/LiveUpdate/src/serialize_tcp.hpp | 15 -------- lib/LiveUpdate/src/storage.cpp | 15 -------- lib/LiveUpdate/src/update.cpp | 15 -------- remove.txt | 34 +++++++++++++++++++ src/arch/aarch64/arch_start.asm | 16 --------- src/arch/aarch64/exceptions.asm | 16 --------- src/arch/aarch64/linker.ld | 18 ---------- src/arch/aarch64/paging.cpp | 15 -------- src/arch/i686/apic_asm.asm | 16 --------- src/arch/i686/arch_start.asm | 16 --------- src/arch/i686/exceptions.asm | 16 --------- src/arch/i686/fiber.asm | 16 --------- src/arch/i686/gdt_asm.asm | 16 --------- src/arch/i686/interrupts.asm | 16 --------- src/arch/i686/linker.ld | 18 ---------- src/arch/i686/paging.cpp | 15 -------- src/arch/i686/profile_intr.asm | 16 --------- src/arch/x86_64/__syscall_entry.asm | 16 --------- src/arch/x86_64/apic_asm.asm | 16 --------- src/arch/x86_64/apic_longmode.asm | 17 ---------- src/arch/x86_64/arch_start.asm | 16 --------- src/arch/x86_64/exceptions.asm | 16 --------- src/arch/x86_64/fiber_asm.asm | 17 ---------- src/arch/x86_64/init_paging.cpp | 15 -------- src/arch/x86_64/interrupts.asm | 16 --------- src/arch/x86_64/linker.ld | 18 ---------- src/arch/x86_64/paging.cpp | 15 -------- src/arch/x86_64/profile_intr.asm | 16 --------- src/arch/x86_64/syscall_entry.cpp | 15 -------- src/arch/x86_64/threads.asm | 16 --------- src/arch/x86_64/tss.hpp | 16 --------- src/chainload/hotswap.cpp | 16 --------- src/chainload/service.cpp | 16 --------- src/crt/c_abi.c | 16 --------- src/crt/cxx_abi.cpp | 16 --------- src/crt/quick_exit.cpp | 16 --------- src/crt/string.c | 17 ---------- src/crt/string.h | 17 ---------- src/drivers/disk_logger.cpp | 16 --------- src/drivers/e1000.cpp | 16 --------- src/drivers/e1000.hpp | 16 --------- src/drivers/e1000_defs.hpp | 16 --------- src/drivers/heap_debugging.cpp | 16 --------- src/drivers/ide.cpp | 16 --------- src/drivers/ide.hpp | 16 --------- src/drivers/solo5blk.hpp | 16 --------- src/drivers/solo5net.cpp | 16 --------- src/drivers/solo5net.hpp | 16 --------- src/drivers/stdout/bootlog.cpp | 16 --------- src/drivers/stdout/default_stdout.cpp | 16 --------- src/drivers/stdout/timestamps.cpp | 16 --------- src/drivers/stdout/vgaout.cpp | 16 --------- src/drivers/virtioblk.hpp | 16 --------- src/drivers/virtiocon.hpp | 16 --------- src/drivers/virtionet.cpp | 16 --------- src/drivers/virtionet.hpp | 16 --------- src/drivers/vmxnet3.cpp | 16 --------- src/drivers/vmxnet3.hpp | 16 --------- src/drivers/vmxnet3_queues.hpp | 16 --------- src/fs/dirent.cpp | 16 --------- src/fs/disk.cpp | 16 --------- src/fs/fat.cpp | 16 --------- src/fs/fat_async.cpp | 16 --------- src/fs/fat_sync.cpp | 16 --------- src/fs/filesystem.cpp | 16 --------- src/fs/memdisk.cpp | 16 --------- src/fs/path.cpp | 16 --------- src/hal/machine.cpp | 15 -------- src/hw/nic.cpp | 16 --------- src/hw/pci_device.cpp | 16 --------- src/hw/pci_manager.cpp | 16 --------- src/hw/ps2.cpp | 16 --------- src/hw/serial.cpp | 16 --------- src/include/kernel.hpp | 15 -------- src/include/kprint | 17 ---------- src/kernel/block.cpp | 16 --------- src/kernel/context.cpp | 16 --------- src/kernel/context_asm.asm | 16 --------- src/kernel/cpuid.cpp | 16 --------- src/kernel/elf.cpp | 16 --------- src/kernel/events.cpp | 16 --------- src/kernel/fiber.cpp | 15 -------- src/kernel/heap.cpp | 16 --------- src/kernel/kernel.cpp | 16 --------- src/kernel/memmap.cpp | 16 --------- src/kernel/multiboot.cpp | 16 --------- src/kernel/os.cpp | 15 -------- src/kernel/panic.cpp | 16 --------- src/kernel/profile.cpp | 16 --------- src/kernel/rng.cpp | 16 --------- src/kernel/scoped_profiler.cpp | 16 --------- src/kernel/service_stub.cpp | 16 --------- src/kernel/terminal.cpp | 16 --------- src/kernel/vga.cpp | 16 --------- src/net/buffer_store.cpp | 16 --------- src/net/checksum.cpp | 16 --------- src/net/configure.cpp | 16 --------- src/net/conntrack.cpp | 16 --------- src/net/dhcp/dh4client.cpp | 16 --------- src/net/dhcp/dhcpd.cpp | 16 --------- src/net/dns/client.cpp | 16 --------- src/net/dns/dns.cpp | 16 --------- src/net/dns/query.cpp | 15 -------- src/net/dns/record.cpp | 15 -------- src/net/dns/response.cpp | 15 -------- src/net/ethernet/ethernet.cpp | 16 --------- src/net/ethernet/ethernet_8021q.cpp | 16 --------- src/net/http/basic_client.cpp | 16 --------- src/net/http/client.cpp | 15 -------- src/net/http/client_connection.cpp | 16 --------- src/net/http/cookie.cpp | 16 --------- src/net/http/header.cpp | 16 --------- src/net/http/header_fields.cpp | 16 --------- src/net/http/message.cpp | 16 --------- src/net/http/mime_types.cpp | 16 --------- src/net/http/request.cpp | 16 --------- src/net/http/response.cpp | 16 --------- src/net/http/response_writer.cpp | 16 --------- src/net/http/server.cpp | 16 --------- src/net/http/server_connection.cpp | 16 --------- src/net/http/status_codes.cpp | 16 --------- src/net/http/time.cpp | 16 --------- src/net/http/version.cpp | 16 --------- src/net/https/botan_server.cpp | 16 --------- src/net/https/s2n_server.cpp | 16 --------- src/net/inet.cpp | 16 --------- src/net/interfaces.cpp | 16 --------- src/net/ip4/arp.cpp | 16 --------- src/net/ip4/icmp4.cpp | 16 --------- src/net/ip4/ip4.cpp | 16 --------- src/net/ip6/addr.cpp | 15 -------- src/net/ip6/addr_list.cpp | 16 --------- src/net/ip6/extension_header.cpp | 15 -------- src/net/ip6/icmp6.cpp | 16 --------- src/net/ip6/ip6.cpp | 16 --------- src/net/ip6/mld.cpp | 16 --------- src/net/ip6/ndp.cpp | 16 --------- src/net/ip6/slaac.cpp | 16 --------- src/net/ip6/udp6.cpp | 14 -------- src/net/nat/napt.cpp | 16 --------- src/net/nat/nat.cpp | 16 --------- src/net/packet_debug.cpp | 15 -------- src/net/tcp/connection.cpp | 17 ---------- src/net/tcp/connection_states.cpp | 16 --------- src/net/tcp/listener.cpp | 16 --------- src/net/tcp/read_buffer.cpp | 16 --------- src/net/tcp/read_request.cpp | 16 --------- src/net/tcp/rttm.cpp | 16 --------- src/net/tcp/tcp.cpp | 16 --------- src/net/tcp/tcp_conntrack.cpp | 15 -------- src/net/tcp/write_queue.cpp | 16 --------- src/net/udp/socket.cpp | 16 --------- src/net/udp/udp.cpp | 16 --------- src/net/vlan_manager.cpp | 16 --------- src/net/ws/websocket.cpp | 16 --------- src/platform/aarch64_vm/kernel_start.cpp | 16 --------- src/platform/aarch64_vm/sanity_checks.cpp | 16 --------- src/platform/aarch64_vm/start.asm | 18 ---------- src/platform/x86_nano/kernel_start.cpp | 16 --------- src/platform/x86_pc/acpi.cpp | 16 --------- src/platform/x86_pc/acpi.hpp | 16 --------- src/platform/x86_pc/apic.cpp | 16 --------- src/platform/x86_pc/apic.hpp | 16 --------- src/platform/x86_pc/apic_boot.asm | 18 ---------- src/platform/x86_pc/apic_iface.hpp | 16 --------- src/platform/x86_pc/apic_regs.hpp | 16 --------- src/platform/x86_pc/apic_revenant.hpp | 16 --------- src/platform/x86_pc/apic_timer.cpp | 16 --------- src/platform/x86_pc/apic_timer.hpp | 16 --------- src/platform/x86_pc/boot/bootloader.asm | 17 ---------- src/platform/x86_pc/boot/disk_read_lba.asm | 3 -- src/platform/x86_pc/clocks.cpp | 16 --------- src/platform/x86_pc/clocks.hpp | 16 --------- src/platform/x86_pc/cmos.hpp | 16 --------- src/platform/x86_pc/cmos_clock.cpp | 16 --------- src/platform/x86_pc/cmos_clock.hpp | 16 --------- src/platform/x86_pc/cpu_freq_sampling.cpp | 16 --------- src/platform/x86_pc/cpu_freq_sampling.hpp | 14 -------- src/platform/x86_pc/idt.hpp | 16 --------- src/platform/x86_pc/ioapic.cpp | 16 --------- src/platform/x86_pc/ioapic.hpp | 16 --------- src/platform/x86_pc/kernel_start.cpp | 15 -------- src/platform/x86_pc/os.cpp | 16 --------- src/platform/x86_pc/pic.cpp | 16 --------- src/platform/x86_pc/pic.hpp | 16 --------- src/platform/x86_pc/pit.cpp | 16 --------- src/platform/x86_pc/pit.hpp | 16 --------- src/platform/x86_pc/platform.cpp | 16 --------- src/platform/x86_pc/platform.hpp | 16 --------- src/platform/x86_pc/sanity_checks.cpp | 16 --------- src/platform/x86_pc/smbios.cpp | 16 --------- src/platform/x86_pc/smbios.hpp | 16 --------- src/platform/x86_pc/smp.cpp | 16 --------- src/platform/x86_pc/smp.hpp | 16 --------- src/platform/x86_pc/start.asm | 16 --------- src/platform/x86_pc/x2apic.hpp | 16 --------- src/platform/x86_pc/xapic.hpp | 16 --------- src/platform/x86_solo5/sanity_checks.cpp | 16 --------- src/platform/x86_solo5/solo5_manager.cpp | 16 --------- src/platform/x86_solo5/start.asm | 16 --------- src/plugins/autoconf.cpp | 16 --------- src/plugins/example.cpp | 16 --------- src/plugins/field_medic/diag.cpp | 15 -------- src/plugins/field_medic/fieldmedic.cpp | 15 -------- src/plugins/field_medic/fieldmedic.hpp | 15 -------- src/plugins/madness/madness.cpp | 15 -------- src/plugins/madness/madness.hpp | 15 -------- src/plugins/nacl.cpp | 16 --------- src/plugins/syslog.cpp | 16 --------- src/plugins/syslogd.cpp | 17 ---------- src/plugins/terminal.cpp | 16 --------- src/plugins/unik.cpp | 16 --------- src/plugins/vfs.cpp | 16 --------- src/posix/fd.cpp | 16 --------- src/posix/file_fd.cpp | 16 --------- src/posix/memalign.cpp | 15 -------- src/posix/pthread.cpp | 16 --------- src/posix/stdlib.cpp | 16 --------- src/posix/sys/socket.cpp | 16 --------- src/posix/sys/stat.cpp | 16 --------- src/posix/tcp_fd.cpp | 15 -------- src/posix/udp_fd.cpp | 15 -------- src/posix/unistd.cpp | 16 --------- src/posix/unix_fd.cpp | 15 -------- src/service_name.cpp | 16 --------- src/util/async.cpp | 16 --------- src/util/autoconf.cpp | 16 --------- src/util/config.cpp | 16 --------- src/util/crc32.cpp | 16 --------- src/util/logger.cpp | 16 --------- src/util/memstream.c | 17 ---------- src/util/path_to_regex.cpp | 16 --------- src/util/percent_encoding.cpp | 16 --------- src/util/statman.cpp | 16 --------- src/util/syslog_facility.cpp | 16 --------- src/util/syslogd.cpp | 16 --------- src/util/tar.cpp | 16 --------- src/util/uri.cpp | 16 --------- src/version.cpp | 15 -------- src/virtio/virtio.cpp | 16 --------- src/virtio/virtio_queue.cpp | 16 --------- test/fs/integration/fat16/fat16.cpp | 16 --------- test/fs/integration/fat32/fat32.cpp | 16 --------- test/fs/integration/ide/service.cpp | 16 --------- test/fs/integration/ide_write/service.cpp | 16 --------- test/fs/integration/memdisk/bigdisk.cpp | 16 --------- test/fs/integration/memdisk/nosector.cpp | 16 --------- test/fs/integration/memdisk/twosector.cpp | 16 --------- test/fs/integration/vfs/service.cpp | 15 -------- test/fs/integration/virtio_block/service.cpp | 15 -------- test/fs/unit/memdisk_test.cpp | 16 --------- test/fs/unit/path_test.cpp | 16 --------- test/fs/unit/vfs_test.cpp | 16 --------- test/hw/integration/serial/service.cpp | 16 --------- test/hw/integration/vga/vga.cpp | 14 -------- test/hw/integration/virtio_queue/service.cpp | 16 --------- test/hw/unit/cpu_test.cpp | 16 --------- test/hw/unit/mac_addr_test.cpp | 16 --------- test/hw/unit/usernet.cpp | 16 --------- test/hw/unit/virtio_queue.cpp | 16 --------- test/kernel/integration/LiveUpdate/liu.hpp | 16 --------- .../kernel/integration/LiveUpdate/service.cpp | 16 --------- test/kernel/integration/block/service.cpp | 16 --------- test/kernel/integration/context/service.cpp | 16 --------- test/kernel/integration/exception/service.cpp | 16 --------- test/kernel/integration/fiber/service.cpp | 16 --------- test/kernel/integration/grub/service.cpp | 16 --------- test/kernel/integration/kprint/service.cpp | 16 --------- test/kernel/integration/memmap/service.cpp | 16 --------- test/kernel/integration/modules/service.cpp | 16 --------- test/kernel/integration/paging/service.cpp | 16 --------- .../integration/plugin_init/service.cpp | 16 --------- test/kernel/integration/rng/service.cpp | 16 --------- test/kernel/integration/smp/service.cpp | 16 --------- test/kernel/integration/term/service.cpp | 16 --------- test/kernel/integration/threads/service.cpp | 16 --------- test/kernel/integration/timers/service.cpp | 16 --------- test/kernel/integration/timers/timers.cpp | 16 --------- test/kernel/integration/tls/service.cpp | 16 --------- test/kernel/unit/memmap_test.cpp | 16 --------- test/kernel/unit/memory.cpp | 15 -------- test/kernel/unit/os_test.cpp | 16 --------- test/kernel/unit/rng.cpp | 16 --------- test/kernel/unit/service_stub_test.cpp | 16 --------- test/kernel/unit/test_hal.cpp | 15 -------- test/kernel/unit/unit_events.cpp | 16 --------- test/kernel/unit/unit_timers.cpp | 16 --------- test/kernel/unit/x86_paging.cpp | 15 -------- test/lest_util/nic_mock.hpp | 16 --------- test/lest_util/os_mock.cpp | 16 --------- test/lest_util/packet_factory.hpp | 16 --------- test/lib/unit/mana/cookie_jar_test.cpp | 16 --------- test/mod/integration/gsl/service.cpp | 16 --------- test/net/integration/bufstore/service.cpp | 16 --------- test/net/integration/configure/service.cpp | 16 --------- test/net/integration/dhclient/service.cpp | 16 --------- test/net/integration/dhcpd/service.cpp | 16 --------- .../dhcpd_dhclient_linux/service.cpp | 16 --------- test/net/integration/dns/service.cpp | 16 --------- test/net/integration/gateway/service.cpp | 16 --------- test/net/integration/http/service.cpp | 16 --------- test/net/integration/icmp/service.cpp | 16 --------- test/net/integration/icmp6/service.cpp | 16 --------- test/net/integration/microLB/service.cpp | 16 --------- test/net/integration/nat/service.cpp | 16 --------- test/net/integration/router/service.cpp | 16 --------- test/net/integration/router6/service.cpp | 16 --------- test/net/integration/slaac/service.cpp | 16 --------- test/net/integration/tcp/service.cpp | 16 --------- test/net/integration/udp/service.cpp | 16 --------- test/net/integration/vlan/service.cpp | 16 --------- test/net/unit/addr_test.cpp | 16 --------- test/net/unit/bufstore.cpp | 16 --------- test/net/unit/checksum.cpp | 16 --------- test/net/unit/cidr.cpp | 16 --------- test/net/unit/conntrack_test.cpp | 16 --------- test/net/unit/cookie_test.cpp | 16 --------- test/net/unit/dhcp.cpp | 16 --------- test/net/unit/dhcp_message_test.cpp | 16 --------- test/net/unit/error.cpp | 16 --------- test/net/unit/http_header_test.cpp | 16 --------- test/net/unit/http_method_test.cpp | 16 --------- test/net/unit/http_mime_types_test.cpp | 16 --------- test/net/unit/http_request_test.cpp | 16 --------- test/net/unit/http_response_test.cpp | 16 --------- test/net/unit/http_status_codes_test.cpp | 16 --------- test/net/unit/http_time_test.cpp | 16 --------- test/net/unit/http_version_test.cpp | 16 --------- test/net/unit/interfaces_test.cpp | 16 --------- test/net/unit/ip4.cpp | 16 --------- test/net/unit/ip4_addr.cpp | 16 --------- test/net/unit/ip4_packet_test.cpp | 16 --------- test/net/unit/ip6.cpp | 16 --------- test/net/unit/ip6_addr.cpp | 16 --------- test/net/unit/ip6_addr_list_test.cpp | 17 ---------- test/net/unit/ip6_packet_test.cpp | 16 --------- test/net/unit/napt_test.cpp | 16 --------- test/net/unit/nat_test.cpp | 16 --------- test/net/unit/packets.cpp | 16 --------- test/net/unit/path_mtu_discovery.cpp | 18 ---------- test/net/unit/port_util_test.cpp | 16 --------- test/net/unit/router_test.cpp | 16 --------- test/net/unit/socket.cpp | 16 --------- test/net/unit/stateful_addr_test.cpp | 17 ---------- test/net/unit/tcp_packet_test.cpp | 16 --------- test/net/unit/tcp_read_buffer_test.cpp | 16 --------- test/net/unit/tcp_read_request_test.cpp | 16 --------- test/net/unit/tcp_sack_test.cpp | 16 --------- test/net/unit/tcp_write_queue.cpp | 16 --------- test/plugin/integration/unik/service.cpp | 16 --------- test/posix/integration/conf/service.cpp | 16 --------- test/posix/integration/conf/test_pathconf.c | 16 --------- test/posix/integration/conf/test_pwd.c | 16 --------- test/posix/integration/conf/test_sysconf.c | 16 --------- .../integration/file_fd/test_file_fd.cpp | 16 --------- test/posix/integration/main/service.cpp | 16 --------- test/posix/integration/pthread/service.cpp | 16 --------- test/posix/integration/stat/test_stat_ftw.cpp | 16 --------- .../integration/syslog_default/service.cpp | 16 --------- .../integration/syslog_plugin/service.cpp | 16 --------- test/posix/integration/tcp/service.cpp | 16 --------- test/posix/integration/udp/service.cpp | 16 --------- test/posix/integration/utsname/service.cpp | 16 --------- test/posix/unit/fd_map_test.cpp | 16 --------- test/posix/unit/inet_test.cpp | 16 --------- test/stl/integration/coroutines/service.cpp | 16 --------- test/stl/integration/crt/service.cpp | 16 --------- test/stl/integration/exceptions/service.cpp | 16 --------- test/stl/integration/stl/service.cpp | 16 --------- test/stress/service.cpp | 16 --------- test/userspace/fuzz/fuzzy_http.hpp | 16 --------- test/userspace/fuzz/fuzzy_stream.hpp | 16 --------- test/userspace/fuzz/service.cpp | 16 --------- test/userspace/liveupdate/service.cpp | 16 --------- test/userspace/microlb/service.cpp | 16 --------- test/userspace/s2n/service.cpp | 16 --------- test/userspace/tcp/service.cpp | 16 --------- test/util/integration/tar/service.cpp | 16 --------- .../tar/tar_example/l1_f1/l2/service.cpp | 16 --------- .../tar/tar_example/l1_f1/service.cpp | 16 --------- .../tar/tar_example/l1_f2/virtio.hpp | 16 --------- test/util/integration/tar_gz/service.cpp | 16 --------- .../tar_gz/tar_example/l1_f1/l2/service.cpp | 16 --------- .../tar_gz/tar_example/l1_f1/service.cpp | 16 --------- .../tar_gz/tar_example/l1_f2/virtio.hpp | 16 --------- test/util/unit/base64.cpp | 16 --------- test/util/unit/bitops.cpp | 16 --------- test/util/unit/buddy_alloc_test.cpp | 15 -------- test/util/unit/crc32.cpp | 16 --------- test/util/unit/delegate.cpp | 16 --------- test/util/unit/fixed_list_alloc_test.cpp | 16 --------- test/util/unit/fixed_queue.cpp | 16 --------- test/util/unit/fixed_vector.cpp | 16 --------- test/util/unit/isotime.cpp | 16 --------- test/util/unit/logger_test.cpp | 16 --------- test/util/unit/lstack/test_lstack.hpp | 15 -------- test/util/unit/lstack/test_lstack_common.cpp | 15 -------- test/util/unit/lstack/test_lstack_merging.cpp | 15 -------- test/util/unit/lstack/test_lstack_nodes.cpp | 15 -------- test/util/unit/lstack/test_lstack_nomerge.cpp | 15 -------- test/util/unit/membitmap.cpp | 16 --------- test/util/unit/path_to_regex_no_options.cpp | 16 --------- test/util/unit/path_to_regex_options.cpp | 16 --------- test/util/unit/path_to_regex_parse.cpp | 16 --------- test/util/unit/percent_encoding_test.cpp | 16 --------- test/util/unit/pmr_alloc_test.cpp | 15 -------- test/util/unit/ringbuffer.cpp | 16 --------- test/util/unit/sha1.cpp | 16 --------- test/util/unit/statman.cpp | 16 --------- test/util/unit/syslog_facility_test.cpp | 16 --------- test/util/unit/syslogd_test.cpp | 16 --------- test/util/unit/tar_test.cpp | 16 --------- test/util/unit/uri_test.cpp | 16 --------- userspace/src/config.cpp | 16 --------- 695 files changed, 36 insertions(+), 10994 deletions(-) delete mode 100644 NOTICE diff --git a/.gitignore b/.gitignore index 07a379145f..67770236ff 100644 --- a/.gitignore +++ b/.gitignore @@ -41,9 +41,6 @@ CMakeFiles* CMakeCache* cmake_install.cmake -# Name of installation folder -IncludeOS_install - # Vim *.swp diff --git a/NOTICE b/NOTICE deleted file mode 100644 index 3946739da5..0000000000 --- a/NOTICE +++ /dev/null @@ -1,8 +0,0 @@ -IncludeOS - A Resource Efficient Unikernel for Cloud Services - -Copyright 2015 Oslo and Akershus University College of Applied Sciences -and Alfred Bratterud - -This product includes software developed at -IncludeOS (http://www.includeos.org/). - diff --git a/api/arch.hpp b/api/arch.hpp index c5b72b49e1..f683a94056 100644 --- a/api/arch.hpp +++ b/api/arch.hpp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDEOS_ARCH_HEADER diff --git a/api/arch/aarch64.hpp b/api/arch/aarch64.hpp index b7553a3143..49a331623b 100644 --- a/api/arch/aarch64.hpp +++ b/api/arch/aarch64.hpp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef AARCH64_ARCH_HPP #define AARCH64_ARCH_HPP diff --git a/api/arch/i686.hpp b/api/arch/i686.hpp index 58043b9aee..d0ee27f11c 100644 --- a/api/arch/i686.hpp +++ b/api/arch/i686.hpp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef i686_ARCH_HPP #define i686_ARCH_HPP diff --git a/api/arch/x86/cpu.hpp b/api/arch/x86/cpu.hpp index 53f53d494b..1471c09d2d 100644 --- a/api/arch/x86/cpu.hpp +++ b/api/arch/x86/cpu.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_CPU_HPP diff --git a/api/arch/x86/gdt.hpp b/api/arch/x86/gdt.hpp index 56d15d1662..a48a90a763 100644 --- a/api/arch/x86/gdt.hpp +++ b/api/arch/x86/gdt.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_GDT_HPP diff --git a/api/arch/x86/paging.hpp b/api/arch/x86/paging.hpp index ef001a311e..0d5aa549d4 100644 --- a/api/arch/x86/paging.hpp +++ b/api/arch/x86/paging.hpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef X86_PAGING_HPP #define X86_PAGING_HPP @@ -823,18 +808,14 @@ class Page_table { }; -// // Page table types for 4-level x86 paging -// using Pml1 = Page_table<4_KiB, void, x86_64, Flags::all & ~(Flags::huge | Flags::pdir)>; using Pml2 = Page_table; using Pml3 = Page_table; using Pml4 = Page_table; -// // Specializations for lowest level 4k page tables (e.g. leaf nodes) -// template <> inline bool Pml1::is_page_dir(uintptr_t) noexcept diff --git a/api/arch/x86/paging_utils.hpp b/api/arch/x86/paging_utils.hpp index c9e683b78a..2fbdc78207 100644 --- a/api/arch/x86/paging_utils.hpp +++ b/api/arch/x86/paging_utils.hpp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef X86_PAGING_UTILS #define X86_PAGING_UTILS diff --git a/api/arch/x86_64.hpp b/api/arch/x86_64.hpp index 14ba3f5778..0c2e82d605 100644 --- a/api/arch/x86_64.hpp +++ b/api/arch/x86_64.hpp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef X86_64_ARCH_HPP #define X86_64_ARCH_HPP diff --git a/api/common b/api/common index ca3cd4aa8d..7d7dcd11d0 100644 --- a/api/common +++ b/api/common @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDEOS_COMMON_HEADER diff --git a/api/debug b/api/debug index 32940bdf33..2321bc5491 100644 --- a/api/debug +++ b/api/debug @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_DEBUG_HEADER diff --git a/api/delegate b/api/delegate index 69669bcb7b..5d6d8cb736 100644 --- a/api/delegate +++ b/api/delegate @@ -1,20 +1,6 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_DELEGATE_HEADER diff --git a/api/fiber b/api/fiber index ebefa192ff..b3abb1610f 100644 --- a/api/fiber +++ b/api/fiber @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef __API_FIBER__ #define __API_FIBER__ diff --git a/api/fs/common.hpp b/api/fs/common.hpp index a6c8cd4616..0d696ddf15 100644 --- a/api/fs/common.hpp +++ b/api/fs/common.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_COMMON_HPP diff --git a/api/fs/dirent.hpp b/api/fs/dirent.hpp index d633890fab..b1ed8e728e 100644 --- a/api/fs/dirent.hpp +++ b/api/fs/dirent.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_DIRENT_HPP diff --git a/api/fs/disk.hpp b/api/fs/disk.hpp index 71fa5ea110..4ae058e78b 100644 --- a/api/fs/disk.hpp +++ b/api/fs/disk.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_DISK_HPP diff --git a/api/fs/fat.hpp b/api/fs/fat.hpp index 08b89b8c01..45ade8e8da 100644 --- a/api/fs/fat.hpp +++ b/api/fs/fat.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_FAT_HPP diff --git a/api/fs/fat_internal.hpp b/api/fs/fat_internal.hpp index 8633611010..67e10efa92 100644 --- a/api/fs/fat_internal.hpp +++ b/api/fs/fat_internal.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_FAT_INTERNAL_HPP diff --git a/api/fs/fd_compatible.hpp b/api/fs/fd_compatible.hpp index 248c591b95..5d76338c6e 100644 --- a/api/fs/fd_compatible.hpp +++ b/api/fs/fd_compatible.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDE_FD_COMPATIBLE_HPP diff --git a/api/fs/filesystem.hpp b/api/fs/filesystem.hpp index 24ea4ac46b..ffb0ddca82 100644 --- a/api/fs/filesystem.hpp +++ b/api/fs/filesystem.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef FS_FILESYSTEM_HPP #define FS_FILESYSTEM_HPP diff --git a/api/fs/mbr.hpp b/api/fs/mbr.hpp index 9f860ffd7d..fd037d264b 100644 --- a/api/fs/mbr.hpp +++ b/api/fs/mbr.hpp @@ -1,19 +1,5 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_MBR_HPP diff --git a/api/fs/memdisk.hpp b/api/fs/memdisk.hpp index bba3b46ee9..31be90121b 100644 --- a/api/fs/memdisk.hpp +++ b/api/fs/memdisk.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_MEMDISK_HPP diff --git a/api/fs/partition.hpp b/api/fs/partition.hpp index 3f2dcff692..8ebd511e9c 100644 --- a/api/fs/partition.hpp +++ b/api/fs/partition.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_PARTITION_HPP diff --git a/api/fs/path.hpp b/api/fs/path.hpp index 3088efc545..2289b400b0 100644 --- a/api/fs/path.hpp +++ b/api/fs/path.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FS_PATH_HPP diff --git a/api/fs/vfs.hpp b/api/fs/vfs.hpp index f9cefb9479..63375560bf 100644 --- a/api/fs/vfs.hpp +++ b/api/fs/vfs.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef FS_VFS_HPP #define FS_VFS_HPP diff --git a/api/fuzz/fuzzy_http.hpp b/api/fuzz/fuzzy_http.hpp index e668bde29b..4b63023065 100644 --- a/api/fuzz/fuzzy_http.hpp +++ b/api/fuzz/fuzzy_http.hpp @@ -1,20 +1,4 @@ #pragma once -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FUZZY_HTTP_SERVER_HPP diff --git a/api/fuzz/fuzzy_stream.hpp b/api/fuzz/fuzzy_stream.hpp index 82983cc0e9..8138a6e529 100644 --- a/api/fuzz/fuzzy_stream.hpp +++ b/api/fuzz/fuzzy_stream.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/hal/detail/machine.hpp b/api/hal/detail/machine.hpp index ffa20ea8f5..b88fb58d41 100644 --- a/api/hal/detail/machine.hpp +++ b/api/hal/detail/machine.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef OS_DETAIL_MACHINE_HPP #define OS_DETAIL_MACHINE_HPP diff --git a/api/hal/machine.hpp b/api/hal/machine.hpp index 3f9a920991..e8ca4c2f06 100644 --- a/api/hal/machine.hpp +++ b/api/hal/machine.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef OS_MACHINE_HPP #define OS_MACHINE_HPP diff --git a/api/hal/machine_memory.hpp b/api/hal/machine_memory.hpp index 951b9567d5..d2070fd719 100644 --- a/api/hal/machine_memory.hpp +++ b/api/hal/machine_memory.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/api/http b/api/http index 8e10ffb0df..71fa69b6ba 100644 --- a/api/http +++ b/api/http @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDEOS_HTTP_API_HPP diff --git a/api/https b/api/https index de066c0af9..a48c537ef2 100644 --- a/api/https +++ b/api/https @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_HTTPS_HEADER diff --git a/api/hw/async_device.hpp b/api/hw/async_device.hpp index 7a016edfeb..be02459832 100644 --- a/api/hw/async_device.hpp +++ b/api/hw/async_device.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/hw/block_device.hpp b/api/hw/block_device.hpp index ce0bab6052..30560a28ed 100644 --- a/api/hw/block_device.hpp +++ b/api/hw/block_device.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HW_BLOCK_DEVICE_HPP diff --git a/api/hw/cpu.hpp b/api/hw/cpu.hpp index e50b5c06e5..df8b952d95 100644 --- a/api/hw/cpu.hpp +++ b/api/hw/cpu.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef OS_HW_CPU #define OS_HW_CPU diff --git a/api/hw/device.hpp b/api/hw/device.hpp index cae671bce0..8bf30ce527 100644 --- a/api/hw/device.hpp +++ b/api/hw/device.hpp @@ -1,21 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2019 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #pragma once - #include namespace hw { diff --git a/api/hw/ioport.hpp b/api/hw/ioport.hpp index 7cc09eb7c4..4ff5f8e500 100644 --- a/api/hw/ioport.hpp +++ b/api/hw/ioport.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HW_IOPORT_HPP #define HW_IOPORT_HPP diff --git a/api/hw/mac_addr.hpp b/api/hw/mac_addr.hpp index 160f2cc8cb..c3c1c69c34 100644 --- a/api/hw/mac_addr.hpp +++ b/api/hw/mac_addr.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HW_MAC_ADDR_HPP diff --git a/api/hw/msi.hpp b/api/hw/msi.hpp index 884e6d688a..f0a403d91b 100644 --- a/api/hw/msi.hpp +++ b/api/hw/msi.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HW_MSI_HPP diff --git a/api/hw/nic.hpp b/api/hw/nic.hpp index ae8196c381..812718f004 100644 --- a/api/hw/nic.hpp +++ b/api/hw/nic.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HW_NIC_HPP #define HW_NIC_HPP diff --git a/api/hw/pci.hpp b/api/hw/pci.hpp index c90716f1fa..86ad4aa91a 100644 --- a/api/hw/pci.hpp +++ b/api/hw/pci.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HW_PCI_HPP diff --git a/api/hw/pci_device.hpp b/api/hw/pci_device.hpp index 33820f60c7..83a893e7d2 100644 --- a/api/hw/pci_device.hpp +++ b/api/hw/pci_device.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HW_PCI_DEVICE_HPP #define HW_PCI_DEVICE_HPP diff --git a/api/hw/pci_manager.hpp b/api/hw/pci_manager.hpp index 74238799e2..a63af59aab 100644 --- a/api/hw/pci_manager.hpp +++ b/api/hw/pci_manager.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_PCI_MANAGER_HPP #define KERNEL_PCI_MANAGER_HPP diff --git a/api/hw/ps2.hpp b/api/hw/ps2.hpp index 2383f36ddc..43f4e74d73 100644 --- a/api/hw/ps2.hpp +++ b/api/hw/ps2.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HW_PS2_HPP diff --git a/api/hw/serial.hpp b/api/hw/serial.hpp index f9abaf5c81..2a3512cc2d 100644 --- a/api/hw/serial.hpp +++ b/api/hw/serial.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HW_SERIAL_HPP #define HW_SERIAL_HPP diff --git a/api/hw/usernet.hpp b/api/hw/usernet.hpp index c4c60e2ea7..5fbf6ef2d8 100644 --- a/api/hw/usernet.hpp +++ b/api/hw/usernet.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/hw/writable_blkdev.hpp b/api/hw/writable_blkdev.hpp index 01c094a865..08bbbdf910 100644 --- a/api/hw/writable_blkdev.hpp +++ b/api/hw/writable_blkdev.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HW_WRITABLE_BLOCK_DEVICE_HPP diff --git a/api/info b/api/info index bf31157a19..d1dab3f62b 100644 --- a/api/info +++ b/api/info @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef API_INFO_HEADER #define API_INFO_HEADER diff --git a/api/isotime b/api/isotime index 0007217189..09fbc11b4e 100644 --- a/api/isotime +++ b/api/isotime @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_ISOTIME_HEADER diff --git a/api/kernel/botan_rng.hpp b/api/kernel/botan_rng.hpp index 42dce9cc2d..303dc29384 100644 --- a/api/kernel/botan_rng.hpp +++ b/api/kernel/botan_rng.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_BOTAN_RNG_HPP diff --git a/api/kernel/context.hpp b/api/kernel/context.hpp index 19b286771c..1d98244098 100644 --- a/api/kernel/context.hpp +++ b/api/kernel/context.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_CONTEXT_HPP diff --git a/api/kernel/cpuid.hpp b/api/kernel/cpuid.hpp index 6c5616b7b2..acbfc58eb0 100644 --- a/api/kernel/cpuid.hpp +++ b/api/kernel/cpuid.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_CPUID_HPP diff --git a/api/kernel/crash_context.hpp b/api/kernel/crash_context.hpp index 89de67d569..6734c84bd2 100644 --- a/api/kernel/crash_context.hpp +++ b/api/kernel/crash_context.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_CRASH_CONTEXT_HPP #define KERNEL_CRASH_CONTEXT_HPP diff --git a/api/kernel/elf.hpp b/api/kernel/elf.hpp index ee37e04e61..c029580d13 100644 --- a/api/kernel/elf.hpp +++ b/api/kernel/elf.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_ELF_HPP diff --git a/api/kernel/events.hpp b/api/kernel/events.hpp index e0f3ce3bbd..8ae541933d 100644 --- a/api/kernel/events.hpp +++ b/api/kernel/events.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_EVENTS_HPP #define KERNEL_EVENTS_HPP diff --git a/api/kernel/fiber.hpp b/api/kernel/fiber.hpp index 5f13d5071a..74cd675d47 100644 --- a/api/kernel/fiber.hpp +++ b/api/kernel/fiber.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_CONTEXT_HPP diff --git a/api/kernel/memmap.hpp b/api/kernel/memmap.hpp index 4838b7fd91..db65716548 100644 --- a/api/kernel/memmap.hpp +++ b/api/kernel/memmap.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_MEMMAP_HPP diff --git a/api/kernel/memory.hpp b/api/kernel/memory.hpp index 836f63ef76..810a35666d 100644 --- a/api/kernel/memory.hpp +++ b/api/kernel/memory.hpp @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_MEMORY_HPP #define KERNEL_MEMORY_HPP diff --git a/api/kernel/rng.hpp b/api/kernel/rng.hpp index e93e7254a3..a5cd2fdbae 100644 --- a/api/kernel/rng.hpp +++ b/api/kernel/rng.hpp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_RNG_HPP diff --git a/api/kernel/rtc.hpp b/api/kernel/rtc.hpp index a304891899..7df2336ea6 100644 --- a/api/kernel/rtc.hpp +++ b/api/kernel/rtc.hpp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_RTC_HPP diff --git a/api/kernel/service.hpp b/api/kernel/service.hpp index d2836aa0ac..d7b0f34c1c 100644 --- a/api/kernel/service.hpp +++ b/api/kernel/service.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_SERVICE_HPP #define KERNEL_SERVICE_HPP diff --git a/api/kernel/solo5_manager.hpp b/api/kernel/solo5_manager.hpp index f8b3eca1f7..20c6e84d39 100644 --- a/api/kernel/solo5_manager.hpp +++ b/api/kernel/solo5_manager.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_SOLO5_MANAGER_HPP #define KERNEL_SOLO5_MANAGER_HPP diff --git a/api/kernel/terminal.hpp b/api/kernel/terminal.hpp index b5b0b6f7a4..2adc9b7cf0 100644 --- a/api/kernel/terminal.hpp +++ b/api/kernel/terminal.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_KERNEL_TERMINAL_HPP diff --git a/api/kernel/timers.hpp b/api/kernel/timers.hpp index 73c0a12cc4..955887d8bc 100644 --- a/api/kernel/timers.hpp +++ b/api/kernel/timers.hpp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef KERNEL_TIMERS_HPP diff --git a/api/kernel/vga.hpp b/api/kernel/vga.hpp index 63a09f5ca9..673f096618 100644 --- a/api/kernel/vga.hpp +++ b/api/kernel/vga.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_VGA_HPP #define KERNEL_VGA_HPP diff --git a/api/membitmap b/api/membitmap index a523d79f99..d602f7aa30 100644 --- a/api/membitmap +++ b/api/membitmap @@ -1,20 +1,6 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ___API_MEMBITMAP___ #define ___API_MEMBITMAP___ diff --git a/api/memdisk b/api/memdisk index 0ce087d005..2270fb4a82 100644 --- a/api/memdisk +++ b/api/memdisk @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef MEMDISK_HEADER diff --git a/api/memstream b/api/memstream index bb836585bc..f946bfc206 100644 --- a/api/memstream +++ b/api/memstream @@ -1,20 +1,6 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ___API_MEMSTREAM___ #define ___API_MEMSTREAM___ diff --git a/api/net/addr.hpp b/api/net/addr.hpp index 9c5aa1cab5..c12e580f86 100644 --- a/api/net/addr.hpp +++ b/api/net/addr.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/botan/credman.hpp b/api/net/botan/credman.hpp index 7ffb229872..ca67a684bc 100644 --- a/api/net/botan/credman.hpp +++ b/api/net/botan/credman.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TLS_CREDMAN_HPP diff --git a/api/net/botan/tls_server.hpp b/api/net/botan/tls_server.hpp index a2101fa8de..56cb7d61fd 100644 --- a/api/net/botan/tls_server.hpp +++ b/api/net/botan/tls_server.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TLS_SERVER_STREAM_HPP diff --git a/api/net/buffer_store.hpp b/api/net/buffer_store.hpp index 5bcbd8d838..ce7cdf2b48 100644 --- a/api/net/buffer_store.hpp +++ b/api/net/buffer_store.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_BUFFER_STORE_HPP diff --git a/api/net/checksum.hpp b/api/net/checksum.hpp index 3faddf4e06..4d2aafcd89 100644 --- a/api/net/checksum.hpp +++ b/api/net/checksum.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_CHECKSUM_HPP diff --git a/api/net/configure.hpp b/api/net/configure.hpp index ab22ec605a..aeb4b16d75 100644 --- a/api/net/configure.hpp +++ b/api/net/configure.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_AUTOCONF_HPP diff --git a/api/net/conntrack.hpp b/api/net/conntrack.hpp index 9fedb3c9da..18feea57db 100644 --- a/api/net/conntrack.hpp +++ b/api/net/conntrack.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_CONNTRACK_HPP diff --git a/api/net/dhcp/dh4client.hpp b/api/net/dhcp/dh4client.hpp index d6a217b19e..7d054d3a79 100644 --- a/api/net/dhcp/dh4client.hpp +++ b/api/net/dhcp/dh4client.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_DHCP_DH4CLIENT_HPP diff --git a/api/net/dhcp/dhcp4.hpp b/api/net/dhcp/dhcp4.hpp index d3072eb8c5..ac80c06f7c 100644 --- a/api/net/dhcp/dhcp4.hpp +++ b/api/net/dhcp/dhcp4.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_DHCP_DHCP4_HPP diff --git a/api/net/dhcp/dhcpd.hpp b/api/net/dhcp/dhcpd.hpp index e2ab36724b..79e5cbbfac 100644 --- a/api/net/dhcp/dhcpd.hpp +++ b/api/net/dhcp/dhcpd.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_DHCP_DHCPD_HPP diff --git a/api/net/dhcp/message.hpp b/api/net/dhcp/message.hpp index 9177254087..ef1f9d1bff 100644 --- a/api/net/dhcp/message.hpp +++ b/api/net/dhcp/message.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_DHCP_MESSAGE_HPP diff --git a/api/net/dhcp/options.hpp b/api/net/dhcp/options.hpp index 1264f8d37a..17ff387ada 100644 --- a/api/net/dhcp/options.hpp +++ b/api/net/dhcp/options.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_DHCP_OPTIONS_HPP diff --git a/api/net/dhcp/record.hpp b/api/net/dhcp/record.hpp index 3f210ce023..ebe1af1df4 100644 --- a/api/net/dhcp/record.hpp +++ b/api/net/dhcp/record.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_DHCP_RECORD_HPP diff --git a/api/net/dns/client.hpp b/api/net/dns/client.hpp index e2eb499d40..013021b68a 100644 --- a/api/net/dns/client.hpp +++ b/api/net/dns/client.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_DNS_CLIENT_HPP #define NET_DNS_CLIENT_HPP diff --git a/api/net/dns/dns.hpp b/api/net/dns/dns.hpp index cd4f77367c..2b6ed2636b 100644 --- a/api/net/dns/dns.hpp +++ b/api/net/dns/dns.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_DNS_DNS_HPP #define NET_DNS_DNS_HPP diff --git a/api/net/dns/query.hpp b/api/net/dns/query.hpp index 035a94d829..552bec7cb7 100644 --- a/api/net/dns/query.hpp +++ b/api/net/dns/query.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/dns/record.hpp b/api/net/dns/record.hpp index d73152bac1..f4675a89b3 100644 --- a/api/net/dns/record.hpp +++ b/api/net/dns/record.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/dns/response.hpp b/api/net/dns/response.hpp index 20c9556a25..c4adff80f5 100644 --- a/api/net/dns/response.hpp +++ b/api/net/dns/response.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/error.hpp b/api/net/error.hpp index 00b1a468e6..697c4d99b1 100644 --- a/api/net/error.hpp +++ b/api/net/error.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_ERROR_HPP #define NET_ERROR_HPP diff --git a/api/net/ethernet/ethernet.hpp b/api/net/ethernet/ethernet.hpp index 0044d46988..d3dc8d8a0e 100644 --- a/api/net/ethernet/ethernet.hpp +++ b/api/net/ethernet/ethernet.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_ETHERNET_HPP diff --git a/api/net/ethernet/ethernet_8021q.hpp b/api/net/ethernet/ethernet_8021q.hpp index d1082e683f..1f9cb41362 100644 --- a/api/net/ethernet/ethernet_8021q.hpp +++ b/api/net/ethernet/ethernet_8021q.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_ETHERNET_8021Q_HPP diff --git a/api/net/ethernet/ethertype.hpp b/api/net/ethernet/ethertype.hpp index e8940fdd83..c86880ea4c 100644 --- a/api/net/ethernet/ethertype.hpp +++ b/api/net/ethernet/ethertype.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_ETHERTYPE_HPP diff --git a/api/net/ethernet/header.hpp b/api/net/ethernet/header.hpp index 51622454b7..de04dbbb63 100644 --- a/api/net/ethernet/header.hpp +++ b/api/net/ethernet/header.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_ETHERNET_HEADER_HPP diff --git a/api/net/http/basic_client.hpp b/api/net/http/basic_client.hpp index 67099b198f..290b26d71b 100644 --- a/api/net/http/basic_client.hpp +++ b/api/net/http/basic_client.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HTTP_BASIC_CLIENT_HPP diff --git a/api/net/http/client.hpp b/api/net/http/client.hpp index 03de404e17..aa86b2fd41 100644 --- a/api/net/http/client.hpp +++ b/api/net/http/client.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_HTTP_CLIENT_HPP diff --git a/api/net/http/client_connection.hpp b/api/net/http/client_connection.hpp index c71f5499f2..a14b7a7f15 100644 --- a/api/net/http/client_connection.hpp +++ b/api/net/http/client_connection.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HTTP_CLIENT_CONNECTION_HPP diff --git a/api/net/http/common.hpp b/api/net/http/common.hpp index 5c8fb6da4b..3894e8018f 100644 --- a/api/net/http/common.hpp +++ b/api/net/http/common.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_COMMON_HPP #define HTTP_COMMON_HPP diff --git a/api/net/http/connection.hpp b/api/net/http/connection.hpp index dc206eabc8..6d6b3caef9 100644 --- a/api/net/http/connection.hpp +++ b/api/net/http/connection.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HTTP_CONNECTION_HPP diff --git a/api/net/http/cookie.hpp b/api/net/http/cookie.hpp index 6827eaa712..41322ad947 100644 --- a/api/net/http/cookie.hpp +++ b/api/net/http/cookie.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_COOKIE_HPP #define HTTP_COOKIE_HPP diff --git a/api/net/http/error.hpp b/api/net/http/error.hpp index 43c1d8be45..e40955385b 100644 --- a/api/net/http/error.hpp +++ b/api/net/http/error.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HTTP_ERROR_HPP diff --git a/api/net/http/header.hpp b/api/net/http/header.hpp index 0e41b6e92c..6f562eeda9 100644 --- a/api/net/http/header.hpp +++ b/api/net/http/header.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_HEADER_HPP #define HTTP_HEADER_HPP diff --git a/api/net/http/header_fields.hpp b/api/net/http/header_fields.hpp index 224b101502..62dd0ae314 100644 --- a/api/net/http/header_fields.hpp +++ b/api/net/http/header_fields.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_HEADER_FIELDS_HPP #define HTTP_HEADER_FIELDS_HPP diff --git a/api/net/http/message.hpp b/api/net/http/message.hpp index 0c50b4b1ac..05d387f025 100644 --- a/api/net/http/message.hpp +++ b/api/net/http/message.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_MESSAGE_HPP #define HTTP_MESSAGE_HPP diff --git a/api/net/http/methods.hpp b/api/net/http/methods.hpp index be586925c3..0c5a537de2 100644 --- a/api/net/http/methods.hpp +++ b/api/net/http/methods.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_METHODS_HPP #define HTTP_METHODS_HPP diff --git a/api/net/http/mime_types.hpp b/api/net/http/mime_types.hpp index 0b7469fc4f..5bf40d3130 100644 --- a/api/net/http/mime_types.hpp +++ b/api/net/http/mime_types.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_MIME_TYPES_HPP #define HTTP_MIME_TYPES_HPP diff --git a/api/net/http/request.hpp b/api/net/http/request.hpp index d07a1dde7b..b460a98eac 100644 --- a/api/net/http/request.hpp +++ b/api/net/http/request.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_REQUEST_HPP #define HTTP_REQUEST_HPP diff --git a/api/net/http/response.hpp b/api/net/http/response.hpp index 7263435143..5a0086f8ff 100644 --- a/api/net/http/response.hpp +++ b/api/net/http/response.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_RESPONSE_HPP #define HTTP_RESPONSE_HPP diff --git a/api/net/http/response_writer.hpp b/api/net/http/response_writer.hpp index 21bd2912ff..66450ef969 100644 --- a/api/net/http/response_writer.hpp +++ b/api/net/http/response_writer.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HTTP_RESPONSE_WRITER_HPP diff --git a/api/net/http/server.hpp b/api/net/http/server.hpp index a966e1802c..e19e4cd28a 100644 --- a/api/net/http/server.hpp +++ b/api/net/http/server.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HTTP_SERVER_HPP diff --git a/api/net/http/server_connection.hpp b/api/net/http/server_connection.hpp index 2be0d59ae1..05f7c9cda1 100644 --- a/api/net/http/server_connection.hpp +++ b/api/net/http/server_connection.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HTTP_SERVER_CONNECTION_HPP diff --git a/api/net/http/status_code_constants.hpp b/api/net/http/status_code_constants.hpp index 48df65f400..bd3a5ed025 100644 --- a/api/net/http/status_code_constants.hpp +++ b/api/net/http/status_code_constants.hpp @@ -1,19 +1,6 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// // Licensed under the Apache License, Version 2.0 (the "License"), -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_STATUS_CODE_CONSTANTS_HPP #define HTTP_STATUS_CODE_CONSTANTS_HPP diff --git a/api/net/http/status_codes.hpp b/api/net/http/status_codes.hpp index 38b3c93cd1..e02caaa623 100644 --- a/api/net/http/status_codes.hpp +++ b/api/net/http/status_codes.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_STATUS_CODES_HPP #define HTTP_STATUS_CODES_HPP diff --git a/api/net/http/time.hpp b/api/net/http/time.hpp index 1ecf0ff9d0..b55faa8c57 100644 --- a/api/net/http/time.hpp +++ b/api/net/http/time.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_TIME_HPP #define HTTP_TIME_HPP diff --git a/api/net/http/version.hpp b/api/net/http/version.hpp index 980b04292a..e4b65c4616 100644 --- a/api/net/http/version.hpp +++ b/api/net/http/version.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HTTP_VERSION_HPP #define HTTP_VERSION_HPP diff --git a/api/net/https/botan_server.hpp b/api/net/https/botan_server.hpp index 455d314128..7ebe20d01b 100644 --- a/api/net/https/botan_server.hpp +++ b/api/net/https/botan_server.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_BOTAN_HTTP_SERVER_HPP diff --git a/api/net/https/openssl_server.hpp b/api/net/https/openssl_server.hpp index e33672f914..b0ca1bc47d 100644 --- a/api/net/https/openssl_server.hpp +++ b/api/net/https/openssl_server.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_HTTP_OPENSSL_SERVER_HPP diff --git a/api/net/https/s2n_server.hpp b/api/net/https/s2n_server.hpp index 22ebb31219..f0291e4160 100644 --- a/api/net/https/s2n_server.hpp +++ b/api/net/https/s2n_server.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_HTTP_S2N_SERVER_HPP diff --git a/api/net/iana.hpp b/api/net/iana.hpp index 8f0f18773e..a3de16dba7 100644 --- a/api/net/iana.hpp +++ b/api/net/iana.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/inet.hpp b/api/net/inet.hpp index a4ff4b9c22..e5336776b5 100644 --- a/api/net/inet.hpp +++ b/api/net/inet.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_INET_HPP #define NET_INET_HPP diff --git a/api/net/inet_common.hpp b/api/net/inet_common.hpp index 9ba9a8a4f2..d330355f3b 100644 --- a/api/net/inet_common.hpp +++ b/api/net/inet_common.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** Common utilities for internetworking */ diff --git a/api/net/interfaces b/api/net/interfaces index 93070952cc..37eecd18f6 100644 --- a/api/net/interfaces +++ b/api/net/interfaces @@ -1,20 +1,4 @@ //-*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/interfaces.hpp b/api/net/interfaces.hpp index 292dfa1e2b..f4c6ff1e5f 100644 --- a/api/net/interfaces.hpp +++ b/api/net/interfaces.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_SUPER_STACK_HPP diff --git a/api/net/ip4/addr.hpp b/api/net/ip4/addr.hpp index d26ed00abb..40fdba3547 100644 --- a/api/net/ip4/addr.hpp +++ b/api/net/ip4/addr.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP4_ADDR_HPP diff --git a/api/net/ip4/arp.hpp b/api/net/ip4/arp.hpp index 2aecea4c94..c290643360 100644 --- a/api/net/ip4/arp.hpp +++ b/api/net/ip4/arp.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP4_ARP_HPP diff --git a/api/net/ip4/cidr.hpp b/api/net/ip4/cidr.hpp index ef44364a5e..17695e1722 100644 --- a/api/net/ip4/cidr.hpp +++ b/api/net/ip4/cidr.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_IP4_CIDR_HPP #define NET_IP4_CIDR_HPP diff --git a/api/net/ip4/header.hpp b/api/net/ip4/header.hpp index ac1f41d5fd..612c78a43a 100644 --- a/api/net/ip4/header.hpp +++ b/api/net/ip4/header.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP4_HEADER_HPP diff --git a/api/net/ip4/icmp4.hpp b/api/net/ip4/icmp4.hpp index f3faaf5fa5..f2d2509220 100644 --- a/api/net/ip4/icmp4.hpp +++ b/api/net/ip4/icmp4.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_IP4_ICMPv4_HPP #define NET_IP4_ICMPv4_HPP diff --git a/api/net/ip4/icmp4_common.hpp b/api/net/ip4/icmp4_common.hpp index 7489939322..140a90378a 100644 --- a/api/net/ip4/icmp4_common.hpp +++ b/api/net/ip4/icmp4_common.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP4_ICMP4_COMMON_HPP diff --git a/api/net/ip4/icmp_error.hpp b/api/net/ip4/icmp_error.hpp index 69bc8bb0dc..79a9904f28 100644 --- a/api/net/ip4/icmp_error.hpp +++ b/api/net/ip4/icmp_error.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_IP4_ICMP_ERROR_HPP #define NET_IP4_ICMP_ERROR_HPP diff --git a/api/net/ip4/ip4.hpp b/api/net/ip4/ip4.hpp index 20fcb17037..4ab39461a3 100644 --- a/api/net/ip4/ip4.hpp +++ b/api/net/ip4/ip4.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_IP4_IP4_HPP #define NET_IP4_IP4_HPP diff --git a/api/net/ip4/packet_arp.hpp b/api/net/ip4/packet_arp.hpp index 3f8f90b844..1454d2d525 100644 --- a/api/net/ip4/packet_arp.hpp +++ b/api/net/ip4/packet_arp.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP4_PACKET_ARP diff --git a/api/net/ip4/packet_icmp4.hpp b/api/net/ip4/packet_icmp4.hpp index 437b33c369..98454cbe4d 100644 --- a/api/net/ip4/packet_icmp4.hpp +++ b/api/net/ip4/packet_icmp4.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/api/net/ip4/packet_ip4.hpp b/api/net/ip4/packet_ip4.hpp index 95a18f9720..2288ebbd20 100644 --- a/api/net/ip4/packet_ip4.hpp +++ b/api/net/ip4/packet_ip4.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef IP4_PACKET_IP4_HPP #define IP4_PACKET_IP4_HPP diff --git a/api/net/ip6/addr.hpp b/api/net/ip6/addr.hpp index e7266b6e23..bea3627661 100644 --- a/api/net/ip6/addr.hpp +++ b/api/net/ip6/addr.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP6_ADDR_HPP diff --git a/api/net/ip6/addr_list.hpp b/api/net/ip6/addr_list.hpp index ed8bdd7157..da406a418e 100644 --- a/api/net/ip6/addr_list.hpp +++ b/api/net/ip6/addr_list.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018-2019 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/ip6/detail/stateful_addr.hpp b/api/net/ip6/detail/stateful_addr.hpp index 2b52dc0291..39a8530879 100644 --- a/api/net/ip6/detail/stateful_addr.hpp +++ b/api/net/ip6/detail/stateful_addr.hpp @@ -1,21 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2019 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once - #include namespace net::ip6::detail diff --git a/api/net/ip6/dhcp6.hpp b/api/net/ip6/dhcp6.hpp index 743edd8347..23ad7b1197 100644 --- a/api/net/ip6/dhcp6.hpp +++ b/api/net/ip6/dhcp6.hpp @@ -1,19 +1,5 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/ip6/extension_header.hpp b/api/net/ip6/extension_header.hpp index 8055016744..bb6f506cd7 100644 --- a/api/net/ip6/extension_header.hpp +++ b/api/net/ip6/extension_header.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/ip6/header.hpp b/api/net/ip6/header.hpp index c305c12ae1..8dd7bf5d93 100644 --- a/api/net/ip6/header.hpp +++ b/api/net/ip6/header.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP6_HEADER_HPP diff --git a/api/net/ip6/icmp6.hpp b/api/net/ip6/icmp6.hpp index 3c96dcd8e8..bcce515f3d 100644 --- a/api/net/ip6/icmp6.hpp +++ b/api/net/ip6/icmp6.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/ip6/icmp6_common.hpp b/api/net/ip6/icmp6_common.hpp index 500ba52aa6..cf35ab6aa7 100644 --- a/api/net/ip6/icmp6_common.hpp +++ b/api/net/ip6/icmp6_common.hpp @@ -1,20 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// #pragma once #ifndef NET_IP6_ICMP6_COMMON_HPP #define NET_IP6_ICMP6_COMMON_HPP diff --git a/api/net/ip6/icmp6_error.hpp b/api/net/ip6/icmp6_error.hpp index 05e34e0398..1bbadc122a 100644 --- a/api/net/ip6/icmp6_error.hpp +++ b/api/net/ip6/icmp6_error.hpp @@ -1,20 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_IP6_ICMP_ERROR_HPP #define NET_IP6_ICMP_ERROR_HPP diff --git a/api/net/ip6/ip6.hpp b/api/net/ip6/ip6.hpp index ae4794e118..3e5101e24e 100644 --- a/api/net/ip6/ip6.hpp +++ b/api/net/ip6/ip6.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_IP6_IP6_HPP #define NET_IP6_IP6_HPP diff --git a/api/net/ip6/mld.hpp b/api/net/ip6/mld.hpp index f6bd3d2d5a..08f3ec90a9 100644 --- a/api/net/ip6/mld.hpp +++ b/api/net/ip6/mld.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP6_MLD_HPP diff --git a/api/net/ip6/mld/message.hpp b/api/net/ip6/mld/message.hpp index 34be2ab16e..8fb24f3c7a 100644 --- a/api/net/ip6/mld/message.hpp +++ b/api/net/ip6/mld/message.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/ip6/ndp.hpp b/api/net/ip6/ndp.hpp index 426f9de293..19826d1aa7 100644 --- a/api/net/ip6/ndp.hpp +++ b/api/net/ip6/ndp.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP6_NDP_HPP diff --git a/api/net/ip6/ndp/host_params.hpp b/api/net/ip6/ndp/host_params.hpp index fde69394ea..0d952ca077 100644 --- a/api/net/ip6/ndp/host_params.hpp +++ b/api/net/ip6/ndp/host_params.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/ip6/ndp/message.hpp b/api/net/ip6/ndp/message.hpp index 366cad3b94..bac9a4c4ad 100644 --- a/api/net/ip6/ndp/message.hpp +++ b/api/net/ip6/ndp/message.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include "options.hpp" diff --git a/api/net/ip6/ndp/options.hpp b/api/net/ip6/ndp/options.hpp index 55be350fcf..7f40e8aafb 100644 --- a/api/net/ip6/ndp/options.hpp +++ b/api/net/ip6/ndp/options.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/ip6/ndp/router_entry.hpp b/api/net/ip6/ndp/router_entry.hpp index 68f0660ca2..0f791c235b 100644 --- a/api/net/ip6/ndp/router_entry.hpp +++ b/api/net/ip6/ndp/router_entry.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/ip6/ndp/router_params.hpp b/api/net/ip6/ndp/router_params.hpp index cbb3e27810..45601ddf6c 100644 --- a/api/net/ip6/ndp/router_params.hpp +++ b/api/net/ip6/ndp/router_params.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/ip6/packet_icmp6.hpp b/api/net/ip6/packet_icmp6.hpp index 1449be3dc9..05b687add5 100644 --- a/api/net/ip6/packet_icmp6.hpp +++ b/api/net/ip6/packet_icmp6.hpp @@ -1,20 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef PACKET_ICMP6_HPP diff --git a/api/net/ip6/packet_ip6.hpp b/api/net/ip6/packet_ip6.hpp index e870e83e91..2d9a47cecf 100644 --- a/api/net/ip6/packet_ip6.hpp +++ b/api/net/ip6/packet_ip6.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef IP6_PACKET_IP6_HPP diff --git a/api/net/ip6/packet_mld.hpp b/api/net/ip6/packet_mld.hpp index 29ec255215..8fe87f1727 100644 --- a/api/net/ip6/packet_mld.hpp +++ b/api/net/ip6/packet_mld.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef PACKET_MLD_HPP diff --git a/api/net/ip6/packet_ndp.hpp b/api/net/ip6/packet_ndp.hpp index bee58e337f..9df780166a 100644 --- a/api/net/ip6/packet_ndp.hpp +++ b/api/net/ip6/packet_ndp.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef PACKET_NDP_HPP diff --git a/api/net/ip6/slaac.hpp b/api/net/ip6/slaac.hpp index 7934cd3dba..1ddcaf4831 100644 --- a/api/net/ip6/slaac.hpp +++ b/api/net/ip6/slaac.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_SLAAC_HPP diff --git a/api/net/ip6/stateful_addr.hpp b/api/net/ip6/stateful_addr.hpp index 578a6fd50f..e2b6b042be 100644 --- a/api/net/ip6/stateful_addr.hpp +++ b/api/net/ip6/stateful_addr.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include "detail/stateful_addr.hpp" diff --git a/api/net/ip6/tcp6.hpp b/api/net/ip6/tcp6.hpp index 96cd732076..e69de29bb2 100644 --- a/api/net/ip6/tcp6.hpp +++ b/api/net/ip6/tcp6.hpp @@ -1,16 +0,0 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. diff --git a/api/net/ip6/udp6.hpp b/api/net/ip6/udp6.hpp index c5f7b5e904..34ac5c0ac8 100644 --- a/api/net/ip6/udp6.hpp +++ b/api/net/ip6/udp6.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_IP6_UDP_HPP #define NET_IP6_UDP_HPP diff --git a/api/net/link_layer.hpp b/api/net/link_layer.hpp index 37106a0bd6..171409da17 100644 --- a/api/net/link_layer.hpp +++ b/api/net/link_layer.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_LINK_LAYER_HPP diff --git a/api/net/nat/napt.hpp b/api/net/nat/napt.hpp index 00074e7ce1..a64048fd0c 100644 --- a/api/net/nat/napt.hpp +++ b/api/net/nat/napt.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_NAT_NAPT_HPP diff --git a/api/net/nat/nat.hpp b/api/net/nat/nat.hpp index c58a329fd1..682c0a3b39 100644 --- a/api/net/nat/nat.hpp +++ b/api/net/nat/nat.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_NAT_NAT_HPP diff --git a/api/net/netfilter.hpp b/api/net/netfilter.hpp index 7a849db4d6..40c43b32a3 100644 --- a/api/net/netfilter.hpp +++ b/api/net/netfilter.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_NETFILTER_HPP diff --git a/api/net/packet.hpp b/api/net/packet.hpp index b8f23858a3..b04ea0e57f 100644 --- a/api/net/packet.hpp +++ b/api/net/packet.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_PACKET_HPP #define NET_PACKET_HPP diff --git a/api/net/port_util.hpp b/api/net/port_util.hpp index 9e002fc7e6..f1071c59ca 100644 --- a/api/net/port_util.hpp +++ b/api/net/port_util.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_PORT_UTIL_HPP diff --git a/api/net/router.hpp b/api/net/router.hpp index 584f2165e2..39ae96afb0 100644 --- a/api/net/router.hpp +++ b/api/net/router.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_ROUTER_HPP #define NET_ROUTER_HPP diff --git a/api/net/s2n/stream.hpp b/api/net/s2n/stream.hpp index 3fb6d68837..2be6b05b42 100644 --- a/api/net/s2n/stream.hpp +++ b/api/net/s2n/stream.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/net/socket.hpp b/api/net/socket.hpp index 3246ab5bd4..166e0f4301 100644 --- a/api/net/socket.hpp +++ b/api/net/socket.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_SOCKET_HPP diff --git a/api/net/stream.hpp b/api/net/stream.hpp index ea35b8f1e7..9b98b118ab 100644 --- a/api/net/stream.hpp +++ b/api/net/stream.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_STREAM_HPP diff --git a/api/net/stream_buffer.hpp b/api/net/stream_buffer.hpp index bc1a0c56a4..52d10c06d4 100644 --- a/api/net/stream_buffer.hpp +++ b/api/net/stream_buffer.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef STREAMBUFFERR_HPP diff --git a/api/net/tcp/common.hpp b/api/net/tcp/common.hpp index 597152cc50..9c98a51f1d 100644 --- a/api/net/tcp/common.hpp +++ b/api/net/tcp/common.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_COMMON_HPP diff --git a/api/net/tcp/connection.hpp b/api/net/tcp/connection.hpp index a6c35cfeaa..0db202e32a 100644 --- a/api/net/tcp/connection.hpp +++ b/api/net/tcp/connection.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_CONNECTION_HPP diff --git a/api/net/tcp/connection_states.hpp b/api/net/tcp/connection_states.hpp index ca95f9acb2..e91768816f 100644 --- a/api/net/tcp/connection_states.hpp +++ b/api/net/tcp/connection_states.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_CONNECTION_STATES_HPP diff --git a/api/net/tcp/headers.hpp b/api/net/tcp/headers.hpp index 73d1d63126..2cd436db9b 100644 --- a/api/net/tcp/headers.hpp +++ b/api/net/tcp/headers.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_HEADERS_HPP diff --git a/api/net/tcp/listener.hpp b/api/net/tcp/listener.hpp index 9a2202b56b..d438bb2385 100644 --- a/api/net/tcp/listener.hpp +++ b/api/net/tcp/listener.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_LISTENER_HPP diff --git a/api/net/tcp/options.hpp b/api/net/tcp/options.hpp index 4ffbb3e5e6..f0b68ea985 100644 --- a/api/net/tcp/options.hpp +++ b/api/net/tcp/options.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_OPTION_HPP diff --git a/api/net/tcp/packet.hpp b/api/net/tcp/packet.hpp index dc80751ad4..1abc1f2007 100644 --- a/api/net/tcp/packet.hpp +++ b/api/net/tcp/packet.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_PACKET_HPP diff --git a/api/net/tcp/packet4_view.hpp b/api/net/tcp/packet4_view.hpp index 49cdb9688e..7b663da441 100644 --- a/api/net/tcp/packet4_view.hpp +++ b/api/net/tcp/packet4_view.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/tcp/packet6_view.hpp b/api/net/tcp/packet6_view.hpp index 2db7733958..fd48cbda12 100644 --- a/api/net/tcp/packet6_view.hpp +++ b/api/net/tcp/packet6_view.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/tcp/packet_view.hpp b/api/net/tcp/packet_view.hpp index 695a9b3547..f7e7ff73b5 100644 --- a/api/net/tcp/packet_view.hpp +++ b/api/net/tcp/packet_view.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/tcp/read_buffer.hpp b/api/net/tcp/read_buffer.hpp index a7539ebd57..b08f923285 100644 --- a/api/net/tcp/read_buffer.hpp +++ b/api/net/tcp/read_buffer.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_READ_BUFFER_HPP diff --git a/api/net/tcp/read_request.hpp b/api/net/tcp/read_request.hpp index 203dc329e3..3246cdc6dd 100644 --- a/api/net/tcp/read_request.hpp +++ b/api/net/tcp/read_request.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_READ_REQUEST_HPP diff --git a/api/net/tcp/rttm.hpp b/api/net/tcp/rttm.hpp index a3e7c7f983..24e86e2add 100644 --- a/api/net/tcp/rttm.hpp +++ b/api/net/tcp/rttm.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_RTTM_HPP diff --git a/api/net/tcp/sack.hpp b/api/net/tcp/sack.hpp index e034a21615..31616eb7bf 100644 --- a/api/net/tcp/sack.hpp +++ b/api/net/tcp/sack.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_SACK_HPP #define NET_TCP_SACK_HPP diff --git a/api/net/tcp/tcp.hpp b/api/net/tcp/tcp.hpp index a3072857a3..6572df5cfd 100644 --- a/api/net/tcp/tcp.hpp +++ b/api/net/tcp/tcp.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_HPP diff --git a/api/net/tcp/tcp_conntrack.hpp b/api/net/tcp/tcp_conntrack.hpp index fc53d877dd..43eb8b89d9 100644 --- a/api/net/tcp/tcp_conntrack.hpp +++ b/api/net/tcp/tcp_conntrack.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/tcp/tcp_errors.hpp b/api/net/tcp/tcp_errors.hpp index a7f9af9509..e9643f17b4 100644 --- a/api/net/tcp/tcp_errors.hpp +++ b/api/net/tcp/tcp_errors.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_TCP_ERRORS_HPP diff --git a/api/net/tcp/write_queue.hpp b/api/net/tcp/write_queue.hpp index 479a6be3be..b6cac59e75 100644 --- a/api/net/tcp/write_queue.hpp +++ b/api/net/tcp/write_queue.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_TCP_WRITE_QUEUE_HPP diff --git a/api/net/udp/common.hpp b/api/net/udp/common.hpp index 8022870698..683a8900d0 100644 --- a/api/net/udp/common.hpp +++ b/api/net/udp/common.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/udp/header.hpp b/api/net/udp/header.hpp index a139d7f0ef..bd8d33e8e9 100644 --- a/api/net/udp/header.hpp +++ b/api/net/udp/header.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/udp/packet4_view.hpp b/api/net/udp/packet4_view.hpp index dac42f6f15..772e0a503b 100644 --- a/api/net/udp/packet4_view.hpp +++ b/api/net/udp/packet4_view.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/udp/packet6_view.hpp b/api/net/udp/packet6_view.hpp index 74638698dd..aecbf32c54 100644 --- a/api/net/udp/packet6_view.hpp +++ b/api/net/udp/packet6_view.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/udp/packet_udp.hpp b/api/net/udp/packet_udp.hpp index 103922bdca..8b2e135611 100644 --- a/api/net/udp/packet_udp.hpp +++ b/api/net/udp/packet_udp.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/udp/packet_view.hpp b/api/net/udp/packet_view.hpp index 9ce07ab018..042ac29e94 100644 --- a/api/net/udp/packet_view.hpp +++ b/api/net/udp/packet_view.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/net/udp/socket.hpp b/api/net/udp/socket.hpp index 24a92f9739..d962d758b1 100644 --- a/api/net/udp/socket.hpp +++ b/api/net/udp/socket.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_IP4_UDP_SOCKET_HPP diff --git a/api/net/udp/udp.hpp b/api/net/udp/udp.hpp index c4edeb49ff..2d434f4cdd 100644 --- a/api/net/udp/udp.hpp +++ b/api/net/udp/udp.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_UDP_UDP_HPP diff --git a/api/net/util.hpp b/api/net/util.hpp index 8dc2bcff46..6ed730b32a 100644 --- a/api/net/util.hpp +++ b/api/net/util.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef NET_UTIL_HPP #define NET_UTIL_HPP diff --git a/api/net/vif.hpp b/api/net/vif.hpp index cb3ddada47..f5459a4d22 100644 --- a/api/net/vif.hpp +++ b/api/net/vif.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_VIF_HPP diff --git a/api/net/vlan b/api/net/vlan index 6854e4ad9e..29b39055a5 100644 --- a/api/net/vlan +++ b/api/net/vlan @@ -1,20 +1,4 @@ //-*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_VLAN_API #define NET_VLAN_API diff --git a/api/net/vlan_manager.hpp b/api/net/vlan_manager.hpp index 32c593608f..f2583645f2 100644 --- a/api/net/vlan_manager.hpp +++ b/api/net/vlan_manager.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_VLAN_MANAGER_HPP diff --git a/api/net/ws/connector.hpp b/api/net/ws/connector.hpp index 82ee2731a9..3459d6878a 100644 --- a/api/net/ws/connector.hpp +++ b/api/net/ws/connector.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_HTTP_WS_CONNECTOR_HPP diff --git a/api/net/ws/header.hpp b/api/net/ws/header.hpp index d2740938fe..0b17007870 100644 --- a/api/net/ws/header.hpp +++ b/api/net/ws/header.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_WS_HEADER_HPP diff --git a/api/net/ws/websocket.hpp b/api/net/ws/websocket.hpp index 82196d2c3b..6e433ab884 100644 --- a/api/net/ws/websocket.hpp +++ b/api/net/ws/websocket.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef NET_WS_WEBSOCKET_HPP diff --git a/api/os b/api/os index b562048477..edd8f08b05 100644 --- a/api/os +++ b/api/os @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ___API_OS_INCLUDEOS___ #define ___API_OS_INCLUDEOS___ diff --git a/api/os.hpp b/api/os.hpp index 1bfa3ddd32..31be0e84c3 100644 --- a/api/os.hpp +++ b/api/os.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef OS_HPP #define OS_HPP diff --git a/api/plugins/unik.hpp b/api/plugins/unik.hpp index 66196d7a5e..a73568e58d 100644 --- a/api/plugins/unik.hpp +++ b/api/plugins/unik.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef PLUGINS_UNIK_HPP #define PLUGINS_UNIK_HPP diff --git a/api/posix/fd.hpp b/api/posix/fd.hpp index 454151c797..2e1675428e 100644 --- a/api/posix/fd.hpp +++ b/api/posix/fd.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDE_FD_HPP diff --git a/api/posix/fd_map.hpp b/api/posix/fd_map.hpp index dcf51de04c..855f3f8976 100644 --- a/api/posix/fd_map.hpp +++ b/api/posix/fd_map.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDE_FD_MAP_HPP diff --git a/api/posix/file_fd.hpp b/api/posix/file_fd.hpp index 6703276c99..f9d19aa149 100644 --- a/api/posix/file_fd.hpp +++ b/api/posix/file_fd.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef FILE_FD_HPP #define FILE_FD_HPP diff --git a/api/posix/rng_fd.hpp b/api/posix/rng_fd.hpp index 369b7f2459..30b96b6090 100644 --- a/api/posix/rng_fd.hpp +++ b/api/posix/rng_fd.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDE_RNG_FD_HPP diff --git a/api/posix/sockfd.hpp b/api/posix/sockfd.hpp index 00c20cb457..4ab91ae4b0 100644 --- a/api/posix/sockfd.hpp +++ b/api/posix/sockfd.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDE_SOCKFD_HPP diff --git a/api/posix/syslog_print_socket.hpp b/api/posix/syslog_print_socket.hpp index 7cbe1c6f84..4d60019cb3 100644 --- a/api/posix/syslog_print_socket.hpp +++ b/api/posix/syslog_print_socket.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef POSIX_SYSLOG_PRINT_SOCKET_HPP diff --git a/api/posix/syslog_udp_socket.hpp b/api/posix/syslog_udp_socket.hpp index 105207000c..f3e18a486c 100644 --- a/api/posix/syslog_udp_socket.hpp +++ b/api/posix/syslog_udp_socket.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef POSIX_SYSLOG_UDP_SOCKET_HPP diff --git a/api/posix/tcp_fd.hpp b/api/posix/tcp_fd.hpp index fad3db4180..0eeca8f08c 100644 --- a/api/posix/tcp_fd.hpp +++ b/api/posix/tcp_fd.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDE_TCP_FD_HPP diff --git a/api/posix/udp_fd.hpp b/api/posix/udp_fd.hpp index 296ef681d8..ceac5911a1 100644 --- a/api/posix/udp_fd.hpp +++ b/api/posix/udp_fd.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef INCLUDE_UDP_FD_HPP diff --git a/api/posix/unix_fd.hpp b/api/posix/unix_fd.hpp index 9e99e654a2..d913e30ea9 100644 --- a/api/posix/unix_fd.hpp +++ b/api/posix/unix_fd.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef POSIX_UNIX_FD_HPP diff --git a/api/posix/unix_fd_impl.hpp b/api/posix/unix_fd_impl.hpp index 0f0bec3995..de16179c35 100644 --- a/api/posix/unix_fd_impl.hpp +++ b/api/posix/unix_fd_impl.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef POSIX_UNIX_FD_IMPL_HPP diff --git a/api/profile b/api/profile index d731643894..759cd14e6e 100644 --- a/api/profile +++ b/api/profile @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_PROFILE_HEADER diff --git a/api/ringbuffer b/api/ringbuffer index be903cf7a3..436dfbdee2 100644 --- a/api/ringbuffer +++ b/api/ringbuffer @@ -1,20 +1,6 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_RINGBUFFER_HEADER diff --git a/api/rtc b/api/rtc index 795ae32b97..9f6a8478de 100644 --- a/api/rtc +++ b/api/rtc @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_RTC_HEADER diff --git a/api/serial b/api/serial index 3edbaa54dc..ea0a7b5fb2 100644 --- a/api/serial +++ b/api/serial @@ -1,19 +1,5 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef SERIAL_HEADER #define SERIAL_HEADER diff --git a/api/service b/api/service index 5ee584f5eb..981c73fafe 100644 --- a/api/service +++ b/api/service @@ -1,20 +1,6 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ___API_SERVICE___ #define ___API_SERVICE___ diff --git a/api/signal b/api/signal index ef0d9d73c2..defd5fbb6f 100644 --- a/api/signal +++ b/api/signal @@ -1,20 +1,6 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ___API_SIGNAL___ #define ___API_SIGNAL___ diff --git a/api/smp b/api/smp index 7fb3f2b836..098e08d271 100644 --- a/api/smp +++ b/api/smp @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_SMP_HEADER diff --git a/api/smp_utils b/api/smp_utils index 65d489b3c1..cf2170849d 100644 --- a/api/smp_utils +++ b/api/smp_utils @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_SMP_UTILS_HEADER diff --git a/api/statman b/api/statman index 3c9b7dfbe8..04c07dcaff 100644 --- a/api/statman +++ b/api/statman @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ___API_STATMAN___ #define ___API_STATMAN___ diff --git a/api/syslogd b/api/syslogd index a47335095e..9706e7d563 100644 --- a/api/syslogd +++ b/api/syslogd @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ___API_SYSLOGD___ #define ___API_SYSLOGD___ diff --git a/api/system_log b/api/system_log index 340177b160..32770e1ad4 100644 --- a/api/system_log +++ b/api/system_log @@ -1,19 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once diff --git a/api/tar b/api/tar index 85dce43370..d896b192b9 100644 --- a/api/tar +++ b/api/tar @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ___API_TAR___ #define ___API_TAR___ diff --git a/api/terminal b/api/terminal index cd34882c11..f1f059146d 100644 --- a/api/terminal +++ b/api/terminal @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_TERMINAL_HEADER diff --git a/api/timers b/api/timers index bf75948141..a3c62b693e 100644 --- a/api/timers +++ b/api/timers @@ -1,20 +1,6 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef API_TIMERS_HEADER diff --git a/api/uri b/api/uri index d69f880540..63928d3c7b 100644 --- a/api/uri +++ b/api/uri @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef ___URI_API___ diff --git a/api/util/alloc_buddy.hpp b/api/util/alloc_buddy.hpp index 509c6b4c97..5a46afb4b4 100644 --- a/api/util/alloc_buddy.hpp +++ b/api/util/alloc_buddy.hpp @@ -1,19 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef UTIL_ALLOC_BUDDY_HPP #define UTIL_ALLOC_BUDDY_HPP @@ -28,9 +13,7 @@ #include #include -// // Tree node flags -// namespace os::mem::buddy { enum class Flags : uint8_t { diff --git a/api/util/alloc_lstack.hpp b/api/util/alloc_lstack.hpp index 828acdf58f..8e84d1ae3e 100644 --- a/api/util/alloc_lstack.hpp +++ b/api/util/alloc_lstack.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef UTIL_MINIALLOC_HPP #define UTIL_MINIALLOC_HPP diff --git a/api/util/alloc_pmr.hpp b/api/util/alloc_pmr.hpp index ac0da1ce2a..0afa49db94 100644 --- a/api/util/alloc_pmr.hpp +++ b/api/util/alloc_pmr.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef UTIL_ALLOC_PMR #define UTIL_ALLOC_PMR diff --git a/api/util/allocator.hpp b/api/util/allocator.hpp index 043079f8e8..17674dfe24 100644 --- a/api/util/allocator.hpp +++ b/api/util/allocator.hpp @@ -1,19 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef OS_ALLOCATOR_HPP #define OS_ALLOCATOR_HPP diff --git a/api/util/async.hpp b/api/util/async.hpp index 46c1b8e52e..71d35297d5 100644 --- a/api/util/async.hpp +++ b/api/util/async.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_ASYNC_HPP diff --git a/api/util/autoconf.hpp b/api/util/autoconf.hpp index 21234c2842..fa2533114c 100644 --- a/api/util/autoconf.hpp +++ b/api/util/autoconf.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_AUTOCONF_HPP diff --git a/api/util/base64.hpp b/api/util/base64.hpp index d7db141896..62a3fb0dd1 100644 --- a/api/util/base64.hpp +++ b/api/util/base64.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_BASE64_HPP @@ -26,14 +10,10 @@ #include #include -// // This module consist of functions for the Base64 encoding scheme -// // The implementation supports the RFC specified at: // http://www.ietf.org/rfc/rfc4648.txt -// // NOTE: Currently the codec don't support MIME's -// namespace base64 { /** diff --git a/api/util/bitops.hpp b/api/util/bitops.hpp index 59e51a716c..a9a62a9c2c 100644 --- a/api/util/bitops.hpp +++ b/api/util/bitops.hpp @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef UTIL_BITOPS_HPP #define UTIL_BITOPS_HPP @@ -25,9 +9,7 @@ namespace util { inline namespace bitops { -// // Enabling bitmask ops for enum class etc. -// template struct enable_bitmask_ops{ @@ -110,9 +92,7 @@ struct enable_bitmask_ops { namespace bits { -// // Various bit operations -// // Number of bits per word constexpr int bitcnt() { return sizeof(uintptr_t) * 8; } diff --git a/api/util/config.hpp b/api/util/config.hpp index 16989a095b..f1a3bd660a 100644 --- a/api/util/config.hpp +++ b/api/util/config.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_CONFIG_HPP diff --git a/api/util/crc32.hpp b/api/util/crc32.hpp index 6fbb30cdef..34246e2f0d 100644 --- a/api/util/crc32.hpp +++ b/api/util/crc32.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_CRC32_HPP diff --git a/api/util/crc64.hpp b/api/util/crc64.hpp index af19778f9b..bb24888744 100644 --- a/api/util/crc64.hpp +++ b/api/util/crc64.hpp @@ -1,19 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// // Licensed under the Apache License, Version 2.0 the "License"; -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_CRC64_HPP diff --git a/api/util/delegate.hpp b/api/util/delegate.hpp index 4dc1795f86..610d7fbca9 100644 --- a/api/util/delegate.hpp +++ b/api/util/delegate.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef DELEGATE_HPP_INCLUDED #define DELEGATE_HPP_INCLUDED diff --git a/api/util/detail/alloc_pmr.hpp b/api/util/detail/alloc_pmr.hpp index 5489eaa844..b8ca303226 100644 --- a/api/util/detail/alloc_pmr.hpp +++ b/api/util/detail/alloc_pmr.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef UTIL_DETAIL_ALLOC_PMR #define UTIL_DETAIL_ALLOC_PMR diff --git a/api/util/detail/string_view b/api/util/detail/string_view index 2659d24cf1..6efbbaf0fd 100644 --- a/api/util/detail/string_view +++ b/api/util/detail/string_view @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_STRING_VIEW_HPP diff --git a/api/util/elf_binary.hpp b/api/util/elf_binary.hpp index 7f452a5d00..fedee4444b 100644 --- a/api/util/elf_binary.hpp +++ b/api/util/elf_binary.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef ELF_BINARY_HPP #define ELF_BINARY_HPP diff --git a/api/util/elf_binary.inc b/api/util/elf_binary.inc index 079ed1e664..038514cad5 100644 --- a/api/util/elf_binary.inc +++ b/api/util/elf_binary.inc @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/api/util/fixed_bitmap.hpp b/api/util/fixed_bitmap.hpp index 4e7cc7b199..6af978d5fd 100644 --- a/api/util/fixed_bitmap.hpp +++ b/api/util/fixed_bitmap.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_FIXED_BITMAP_HPP diff --git a/api/util/fixed_list_alloc.hpp b/api/util/fixed_list_alloc.hpp index 6be4eb3b22..abdafc1364 100644 --- a/api/util/fixed_list_alloc.hpp +++ b/api/util/fixed_list_alloc.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_FIXED_LIST_ALLOC_HPP diff --git a/api/util/fixed_queue.hpp b/api/util/fixed_queue.hpp index 28cfc3d819..717083dbf1 100644 --- a/api/util/fixed_queue.hpp +++ b/api/util/fixed_queue.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef FIXEDQUEUE_H_INCLUDED #define FIXEDQUEUE_H_INCLUDED diff --git a/api/util/fixed_storage.hpp b/api/util/fixed_storage.hpp index 2524cc6e18..deb038029e 100644 --- a/api/util/fixed_storage.hpp +++ b/api/util/fixed_storage.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_FIXED_STORAGE_HPP diff --git a/api/util/fixed_vector.hpp b/api/util/fixed_vector.hpp index 3508ac70e6..7285424551 100644 --- a/api/util/fixed_vector.hpp +++ b/api/util/fixed_vector.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_FIXED_VECTOR_HPP diff --git a/api/util/isotime.hpp b/api/util/isotime.hpp index cd88c6e251..88c09c1d58 100644 --- a/api/util/isotime.hpp +++ b/api/util/isotime.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_ISOTIME_HPP diff --git a/api/util/logger.hpp b/api/util/logger.hpp index b774845189..2bb7bffb9a 100644 --- a/api/util/logger.hpp +++ b/api/util/logger.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_LOGGER_HPP diff --git a/api/util/membitmap.hpp b/api/util/membitmap.hpp index a7ed71970f..d8c554d27e 100644 --- a/api/util/membitmap.hpp +++ b/api/util/membitmap.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/api/util/memstream.h b/api/util/memstream.h index 28dad56352..4dfe53c46e 100644 --- a/api/util/memstream.h +++ b/api/util/memstream.h @@ -1,19 +1,5 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef UTIL_MEMSTREAM_H #define UTIL_MEMSTREAM_H diff --git a/api/util/path_to_regex.hpp b/api/util/path_to_regex.hpp index 3b83e20d16..d1911ef726 100644 --- a/api/util/path_to_regex.hpp +++ b/api/util/path_to_regex.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // https://github.com/pillarjs/path-to-regexp/blob/master/index.js diff --git a/api/util/percent_encoding.hpp b/api/util/percent_encoding.hpp index b620659a34..858a04fc7e 100644 --- a/api/util/percent_encoding.hpp +++ b/api/util/percent_encoding.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /// diff --git a/api/util/ringbuffer.hpp b/api/util/ringbuffer.hpp index 27d1a47524..4724010fc3 100644 --- a/api/util/ringbuffer.hpp +++ b/api/util/ringbuffer.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef UTIL_RINGBUFFER_HPP #define UTIL_RINGBUFFER_HPP diff --git a/api/util/signal.hpp b/api/util/signal.hpp index 05ff22ca50..3869ad27e3 100644 --- a/api/util/signal.hpp +++ b/api/util/signal.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef UTIL_SIGNAL_HPP #define UTIL_SIGNAL_HPP diff --git a/api/util/statman.hpp b/api/util/statman.hpp index 5458a63722..e7f3f191af 100644 --- a/api/util/statman.hpp +++ b/api/util/statman.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_STATMAN_HPP diff --git a/api/util/syslog_facility.hpp b/api/util/syslog_facility.hpp index 8ba3ee758c..99120ed838 100644 --- a/api/util/syslog_facility.hpp +++ b/api/util/syslog_facility.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #pragma once #ifndef UTIL_SYSLOG_FACILITY_HPP #define UTIL_SYSLOG_FACILITY_HPP diff --git a/api/util/syslogd.hpp b/api/util/syslogd.hpp index fd3445bcad..fcc7ef8382 100644 --- a/api/util/syslogd.hpp +++ b/api/util/syslogd.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #pragma once #ifndef UTIL_SYSLOGD_HPP #define UTIL_SYSLOGD_HPP diff --git a/api/util/tar.hpp b/api/util/tar.hpp index 6a7adf48a6..cf29edc020 100644 --- a/api/util/tar.hpp +++ b/api/util/tar.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef TAR_HPP diff --git a/api/util/timer.hpp b/api/util/timer.hpp index 901d839e4b..d84977c2a3 100644 --- a/api/util/timer.hpp +++ b/api/util/timer.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_TIMER_HPP diff --git a/api/util/typename.hpp b/api/util/typename.hpp index 676f48ac76..b931ba50dd 100644 --- a/api/util/typename.hpp +++ b/api/util/typename.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/api/util/units.hpp b/api/util/units.hpp index d80a0405bc..f4f63f71c6 100644 --- a/api/util/units.hpp +++ b/api/util/units.hpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_UNITS_HPP diff --git a/api/util/uri.hpp b/api/util/uri.hpp index 1b0b7969f6..b9ee4aa83c 100644 --- a/api/util/uri.hpp +++ b/api/util/uri.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef UTIL_URI_HPP diff --git a/api/vga b/api/vga index a73eea80d8..9c0901a6b0 100644 --- a/api/vga +++ b/api/vga @@ -1,20 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef VGA_HEADER diff --git a/api/virtio/virtio.hpp b/api/virtio/virtio.hpp index bfabed7a10..6eb382e876 100644 --- a/api/virtio/virtio.hpp +++ b/api/virtio/virtio.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** @note This virtio implementation was very much inspired by diff --git a/lib/LiveUpdate/include/liveupdate b/lib/LiveUpdate/include/liveupdate index f2064ad7f1..bf24af5046 100644 --- a/lib/LiveUpdate/include/liveupdate +++ b/lib/LiveUpdate/include/liveupdate @@ -1,19 +1,4 @@ //-*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/include/liveupdate.hpp b/lib/LiveUpdate/include/liveupdate.hpp index b3d5bb971e..8e02631977 100644 --- a/lib/LiveUpdate/include/liveupdate.hpp +++ b/lib/LiveUpdate/include/liveupdate.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/include/storage.hpp b/lib/LiveUpdate/include/storage.hpp index f88c69ca95..3ad194ecce 100644 --- a/lib/LiveUpdate/include/storage.hpp +++ b/lib/LiveUpdate/include/storage.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/elfscan.cpp b/lib/LiveUpdate/src/elfscan.cpp index b2f776501f..168c9e6362 100644 --- a/lib/LiveUpdate/src/elfscan.cpp +++ b/lib/LiveUpdate/src/elfscan.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/hotswap.cpp b/lib/LiveUpdate/src/hotswap.cpp index f42f14f0a1..7ea6e321c4 100644 --- a/lib/LiveUpdate/src/hotswap.cpp +++ b/lib/LiveUpdate/src/hotswap.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/hotswap64.asm b/lib/LiveUpdate/src/hotswap64.asm index c5174deea7..202c30a3ef 100644 --- a/lib/LiveUpdate/src/hotswap64.asm +++ b/lib/LiveUpdate/src/hotswap64.asm @@ -1,23 +1,5 @@ -;; This file is a part of the IncludeOS unikernel - www.includeos.org -;; -;; Copyright 2017 IncludeOS AS, Oslo, Norway -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http:;;www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. -; ; Master thesis ; by Alf-Andre Walla 2016-2017 -; -; ORG 0x8000 %define code32_segment 0x08 diff --git a/lib/LiveUpdate/src/hotswap64_blob.asm b/lib/LiveUpdate/src/hotswap64_blob.asm index c8ea656ad9..cd7a461469 100644 --- a/lib/LiveUpdate/src/hotswap64_blob.asm +++ b/lib/LiveUpdate/src/hotswap64_blob.asm @@ -1,18 +1,5 @@ -;; This file is a part of the IncludeOS unikernel - www.includeos.org -;; -;; Copyright 2017 IncludeOS AS, Oslo, Norway -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http:;;www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. +; Master thesis +; by Alf-Andre Walla 2016-2017 global hotswap64 global hotswap64_len diff --git a/lib/LiveUpdate/src/partition.cpp b/lib/LiveUpdate/src/partition.cpp index dd01ef57b9..3fac58a9b9 100644 --- a/lib/LiveUpdate/src/partition.cpp +++ b/lib/LiveUpdate/src/partition.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/resume.cpp b/lib/LiveUpdate/src/resume.cpp index b776fe6171..4f01a3ea53 100644 --- a/lib/LiveUpdate/src/resume.cpp +++ b/lib/LiveUpdate/src/resume.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/rollback.cpp b/lib/LiveUpdate/src/rollback.cpp index a689b2fbff..e9dc21f10f 100644 --- a/lib/LiveUpdate/src/rollback.cpp +++ b/lib/LiveUpdate/src/rollback.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/serialize_tcp.cpp b/lib/LiveUpdate/src/serialize_tcp.cpp index 47ab82692d..422c9426e9 100644 --- a/lib/LiveUpdate/src/serialize_tcp.cpp +++ b/lib/LiveUpdate/src/serialize_tcp.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/serialize_tcp.hpp b/lib/LiveUpdate/src/serialize_tcp.hpp index c7ce4b33fb..0ef348a616 100644 --- a/lib/LiveUpdate/src/serialize_tcp.hpp +++ b/lib/LiveUpdate/src/serialize_tcp.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/storage.cpp b/lib/LiveUpdate/src/storage.cpp index abb7fed443..f2b876681a 100644 --- a/lib/LiveUpdate/src/storage.cpp +++ b/lib/LiveUpdate/src/storage.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/lib/LiveUpdate/src/update.cpp b/lib/LiveUpdate/src/update.cpp index 1ab2ccd678..f457b5f97d 100644 --- a/lib/LiveUpdate/src/update.cpp +++ b/lib/LiveUpdate/src/update.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Master thesis * by Alf-Andre Walla 2016-2017 diff --git a/remove.txt b/remove.txt index 73633652ae..70130713fa 100644 --- a/remove.txt +++ b/remove.txt @@ -13,6 +13,8 @@ // and Alfred Bratterud // Copyright 2017 IncludeOS AS, Oslo, Norway // Copyright 2018 IncludeOS AS, Oslo, Norway +// Copyright 2015-2018 IncludeOS AS, Oslo, Norway +// Copyright 2017-2018 IncludeOS AS, Oslo, Norway // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,3 +27,35 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +;; This file is a part of the IncludeOS unikernel - www.includeos.org +;; +;; Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences +;; and Alfred Bratterud +;; +;; Licensed under the Apache License, Version 2.0 (the "License"); +;; you may not use this file except in compliance with the License. +;; You may obtain a copy of the License at +;; +;; http:;;www.apache.org/licenses/LICENSE-2.0 +;; +;; Unless required by applicable law or agreed to in writing, software +;; distributed under the License is distributed on an "AS IS" BASIS, +;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;; See the License for the specific language governing permissions and +;; limitations under the License. +; This file is a part of the IncludeOS unikernel - www.includeos.org +; +; Copyright 2015 Oslo and Akershus University College of Applied Sciences +; and Alfred Bratterud +; +; Licensed under the Apache License, Version 2.0 (the "License"); +; you may not use this file except in compliance with the License. +; You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. diff --git a/src/arch/aarch64/arch_start.asm b/src/arch/aarch64/arch_start.asm index f585ff9161..2329775c8a 100644 --- a/src/arch/aarch64/arch_start.asm +++ b/src/arch/aarch64/arch_start.asm @@ -1,20 +1,4 @@ /* -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. */ .text .global __arch_start diff --git a/src/arch/aarch64/exceptions.asm b/src/arch/aarch64/exceptions.asm index dfdb975e5a..c9014e2c22 100644 --- a/src/arch/aarch64/exceptions.asm +++ b/src/arch/aarch64/exceptions.asm @@ -1,20 +1,4 @@ /* -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. */ #include "macros.h" diff --git a/src/arch/aarch64/linker.ld b/src/arch/aarch64/linker.ld index 4798f535e6..47b9c422e7 100644 --- a/src/arch/aarch64/linker.ld +++ b/src/arch/aarch64/linker.ld @@ -1,21 +1,3 @@ -/** - * This file is a part of the IncludeOS unikernel - www.includeos.org - * - * Copyright 2015 Oslo and Akershus University College of Applied Sciences - * and Alfred Bratterud - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http: *www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -**/ ENTRY(_start) /* diff --git a/src/arch/aarch64/paging.cpp b/src/arch/aarch64/paging.cpp index eda50ca68e..ea79a879b6 100644 --- a/src/arch/aarch64/paging.cpp +++ b/src/arch/aarch64/paging.cpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/arch/i686/apic_asm.asm b/src/arch/i686/apic_asm.asm index bc65fe7e5d..a01437a776 100644 --- a/src/arch/i686/apic_asm.asm +++ b/src/arch/i686/apic_asm.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. USE32 global spurious_intr:function global lapic_send_eoi:function diff --git a/src/arch/i686/arch_start.asm b/src/arch/i686/arch_start.asm index 97a6fd8c01..c2e0841df8 100644 --- a/src/arch/i686/arch_start.asm +++ b/src/arch/i686/arch_start.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. global __arch_start:function global fast_kernel_start:function diff --git a/src/arch/i686/exceptions.asm b/src/arch/i686/exceptions.asm index 04313d5dd0..73757185a2 100644 --- a/src/arch/i686/exceptions.asm +++ b/src/arch/i686/exceptions.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. [BITS 32] extern __cpu_exception diff --git a/src/arch/i686/fiber.asm b/src/arch/i686/fiber.asm index 517d7cf2a5..256690df8a 100644 --- a/src/arch/i686/fiber.asm +++ b/src/arch/i686/fiber.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2017 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. USE32 global __fiber_jumpstart diff --git a/src/arch/i686/gdt_asm.asm b/src/arch/i686/gdt_asm.asm index f8bfebda60..cb9e08735c 100644 --- a/src/arch/i686/gdt_asm.asm +++ b/src/arch/i686/gdt_asm.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. USE32 global __load_gdt:function diff --git a/src/arch/i686/interrupts.asm b/src/arch/i686/interrupts.asm index bf3ba00983..48ccd2100b 100644 --- a/src/arch/i686/interrupts.asm +++ b/src/arch/i686/interrupts.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. USE32 global unused_interrupt_handler:function global modern_interrupt_handler:function diff --git a/src/arch/i686/linker.ld b/src/arch/i686/linker.ld index 6334947c64..59df3122c9 100644 --- a/src/arch/i686/linker.ld +++ b/src/arch/i686/linker.ld @@ -1,21 +1,3 @@ -/** - * This file is a part of the IncludeOS unikernel - www.includeos.org - * - * Copyright 2015 Oslo and Akershus University College of Applied Sciences - * and Alfred Bratterud - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http: *www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -**/ ENTRY(_start) SECTIONS diff --git a/src/arch/i686/paging.cpp b/src/arch/i686/paging.cpp index 433a7e5c27..4de036fdea 100644 --- a/src/arch/i686/paging.cpp +++ b/src/arch/i686/paging.cpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/arch/i686/profile_intr.asm b/src/arch/i686/profile_intr.asm index 9141a5b19d..6dea14f0af 100644 --- a/src/arch/i686/profile_intr.asm +++ b/src/arch/i686/profile_intr.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. USE32 extern current_intr_handler diff --git a/src/arch/x86_64/__syscall_entry.asm b/src/arch/x86_64/__syscall_entry.asm index 9534a05838..b4debb5534 100644 --- a/src/arch/x86_64/__syscall_entry.asm +++ b/src/arch/x86_64/__syscall_entry.asm @@ -1,19 +1,3 @@ -;; This file is a part of the IncludeOS unikernel - www.includeos.org -;; -;; Copyright 2018 IncludeOS AS, Oslo, Norway -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http:;;www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. - global __syscall_entry:function global __clone_helper:function global __clone_return:function diff --git a/src/arch/x86_64/apic_asm.asm b/src/arch/x86_64/apic_asm.asm index 56f4d9655e..7c126ff90f 100644 --- a/src/arch/x86_64/apic_asm.asm +++ b/src/arch/x86_64/apic_asm.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. [BITS 64] global spurious_intr:function global lapic_send_eoi:function diff --git a/src/arch/x86_64/apic_longmode.asm b/src/arch/x86_64/apic_longmode.asm index 87345ed02d..042f06a169 100644 --- a/src/arch/x86_64/apic_longmode.asm +++ b/src/arch/x86_64/apic_longmode.asm @@ -1,20 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -; global __apic_trampoline:function extern __gdt64_base_pointer extern revenant_main diff --git a/src/arch/x86_64/arch_start.asm b/src/arch/x86_64/arch_start.asm index cad92ff6d7..8e3ad42ccc 100644 --- a/src/arch/x86_64/arch_start.asm +++ b/src/arch/x86_64/arch_start.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. global __arch_start:function global __gdt64_base_pointer global fast_kernel_start:function diff --git a/src/arch/x86_64/exceptions.asm b/src/arch/x86_64/exceptions.asm index 2f02ca975c..85a676a458 100644 --- a/src/arch/x86_64/exceptions.asm +++ b/src/arch/x86_64/exceptions.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. [BITS 64] extern __cpu_exception diff --git a/src/arch/x86_64/fiber_asm.asm b/src/arch/x86_64/fiber_asm.asm index 5c2c812484..d0b46e945d 100644 --- a/src/arch/x86_64/fiber_asm.asm +++ b/src/arch/x86_64/fiber_asm.asm @@ -1,21 +1,4 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2017 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. USE64 - global __fiber_jumpstart global __fiber_yield diff --git a/src/arch/x86_64/init_paging.cpp b/src/arch/x86_64/init_paging.cpp index c2b68bc4d0..24e8395dd3 100644 --- a/src/arch/x86_64/init_paging.cpp +++ b/src/arch/x86_64/init_paging.cpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. __attribute__((weak)) extern void __x86_init_paging(void* pdir) { diff --git a/src/arch/x86_64/interrupts.asm b/src/arch/x86_64/interrupts.asm index cbdf09830e..a2379af641 100644 --- a/src/arch/x86_64/interrupts.asm +++ b/src/arch/x86_64/interrupts.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. [BITS 64] global unused_interrupt_handler:function global modern_interrupt_handler:function diff --git a/src/arch/x86_64/linker.ld b/src/arch/x86_64/linker.ld index 43d135505b..dfa327eff2 100644 --- a/src/arch/x86_64/linker.ld +++ b/src/arch/x86_64/linker.ld @@ -1,21 +1,3 @@ -/** - * This file is a part of the IncludeOS unikernel - www.includeos.org - * - * Copyright 2015 Oslo and Akershus University College of Applied Sciences - * and Alfred Bratterud - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http: *www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -**/ ENTRY(_start) SECTIONS diff --git a/src/arch/x86_64/paging.cpp b/src/arch/x86_64/paging.cpp index 6fdf71391e..da710ae92a 100644 --- a/src/arch/x86_64/paging.cpp +++ b/src/arch/x86_64/paging.cpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include #include diff --git a/src/arch/x86_64/profile_intr.asm b/src/arch/x86_64/profile_intr.asm index 443783a293..14d5e61b62 100644 --- a/src/arch/x86_64/profile_intr.asm +++ b/src/arch/x86_64/profile_intr.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. [BITS 64] extern current_intr_handler diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index cf36060a15..5a311a990a 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/arch/x86_64/threads.asm b/src/arch/x86_64/threads.asm index aa58bc8854..48528cbc22 100644 --- a/src/arch/x86_64/threads.asm +++ b/src/arch/x86_64/threads.asm @@ -1,19 +1,3 @@ -;; This file is a part of the IncludeOS unikernel - www.includeos.org -;; -;; Copyright 2018 IncludeOS AS, Oslo, Norway -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http:;;www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. - global __thread_yield:function global __thread_restore:function extern __thread_suspend_and_yield diff --git a/src/arch/x86_64/tss.hpp b/src/arch/x86_64/tss.hpp index b70c87d20c..e196bbab86 100644 --- a/src/arch/x86_64/tss.hpp +++ b/src/arch/x86_64/tss.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_TSS_HPP diff --git a/src/chainload/hotswap.cpp b/src/chainload/hotswap.cpp index 7968bdd767..0855375a6b 100644 --- a/src/chainload/hotswap.cpp +++ b/src/chainload/hotswap.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /* * Self sufficient Utility function that will copy a binary to a certain diff --git a/src/chainload/service.cpp b/src/chainload/service.cpp index eb70bff985..3383ca5329 100644 --- a/src/chainload/service.cpp +++ b/src/chainload/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/crt/c_abi.c b/src/crt/c_abi.c index 1edf8495a6..34ef9b34f7 100644 --- a/src/crt/c_abi.c +++ b/src/crt/c_abi.c @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/crt/cxx_abi.cpp b/src/crt/cxx_abi.cpp index f62d18abc9..26217e8972 100644 --- a/src/crt/cxx_abi.cpp +++ b/src/crt/cxx_abi.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/crt/quick_exit.cpp b/src/crt/quick_exit.cpp index d7ac0a8c5c..ff4ca5140b 100644 --- a/src/crt/quick_exit.cpp +++ b/src/crt/quick_exit.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/crt/string.c b/src/crt/string.c index 0570abfdfc..be192ac5cd 100644 --- a/src/crt/string.c +++ b/src/crt/string.c @@ -1,20 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #include "string.h" #include diff --git a/src/crt/string.h b/src/crt/string.h index ce24514ae8..3fe0f8698c 100644 --- a/src/crt/string.h +++ b/src/crt/string.h @@ -1,20 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #ifndef _CABI_STRING_H #define _CABI_STRING_H diff --git a/src/drivers/disk_logger.cpp b/src/drivers/disk_logger.cpp index e6f8b06acb..386bd612db 100644 --- a/src/drivers/disk_logger.cpp +++ b/src/drivers/disk_logger.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/drivers/e1000.cpp b/src/drivers/e1000.cpp index a6b5255cf8..c6fd6ed67d 100644 --- a/src/drivers/e1000.cpp +++ b/src/drivers/e1000.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "e1000.hpp" #include "e1000_defs.hpp" diff --git a/src/drivers/e1000.hpp b/src/drivers/e1000.hpp index 403d316501..55c1dbdbc9 100644 --- a/src/drivers/e1000.hpp +++ b/src/drivers/e1000.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/drivers/e1000_defs.hpp b/src/drivers/e1000_defs.hpp index 3da25ab8fa..2fa4c6bdec 100644 --- a/src/drivers/e1000_defs.hpp +++ b/src/drivers/e1000_defs.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once // see: http://wiki.osdev.org/Intel_Ethernet_i217 diff --git a/src/drivers/heap_debugging.cpp b/src/drivers/heap_debugging.cpp index 3f14ce12ae..b9e440653c 100644 --- a/src/drivers/heap_debugging.cpp +++ b/src/drivers/heap_debugging.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DEBUG // Enable debugging //#define DEBUG2 diff --git a/src/drivers/ide.cpp b/src/drivers/ide.cpp index d048c750a0..6cc3d0b8c1 100644 --- a/src/drivers/ide.cpp +++ b/src/drivers/ide.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Intel IDE Controller datasheet at : diff --git a/src/drivers/ide.hpp b/src/drivers/ide.hpp index 620324e19d..104f8b18cd 100644 --- a/src/drivers/ide.hpp +++ b/src/drivers/ide.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef DRIVERS_IDE_HPP #define DRIVERS_IDE_HPP diff --git a/src/drivers/solo5blk.hpp b/src/drivers/solo5blk.hpp index 20378e05a7..229bf7169f 100644 --- a/src/drivers/solo5blk.hpp +++ b/src/drivers/solo5blk.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef SOLO5_BLOCK_HPP diff --git a/src/drivers/solo5net.cpp b/src/drivers/solo5net.cpp index c74651bcaa..6098bfb0b3 100644 --- a/src/drivers/solo5net.cpp +++ b/src/drivers/solo5net.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "solo5net.hpp" #include diff --git a/src/drivers/solo5net.hpp b/src/drivers/solo5net.hpp index 077eddebd9..593d25b8d0 100644 --- a/src/drivers/solo5net.hpp +++ b/src/drivers/solo5net.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef VIRTIO_SOLO5NET_HPP #define VIRTIO_SOLO5NET_HPP diff --git a/src/drivers/stdout/bootlog.cpp b/src/drivers/stdout/bootlog.cpp index 7cf9d9bca6..3afa01f48f 100644 --- a/src/drivers/stdout/bootlog.cpp +++ b/src/drivers/stdout/bootlog.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // enable logging during boot bool os_enable_boot_logging = true; diff --git a/src/drivers/stdout/default_stdout.cpp b/src/drivers/stdout/default_stdout.cpp index 8635760d83..4a42d9ddbd 100644 --- a/src/drivers/stdout/default_stdout.cpp +++ b/src/drivers/stdout/default_stdout.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // add OS default stdout handler bool os_default_stdout = true; diff --git a/src/drivers/stdout/timestamps.cpp b/src/drivers/stdout/timestamps.cpp index becaf3600d..061be1ca22 100644 --- a/src/drivers/stdout/timestamps.cpp +++ b/src/drivers/stdout/timestamps.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/drivers/stdout/vgaout.cpp b/src/drivers/stdout/vgaout.cpp index ae1b7c7d09..f37d2e05b4 100644 --- a/src/drivers/stdout/vgaout.cpp +++ b/src/drivers/stdout/vgaout.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/drivers/virtioblk.hpp b/src/drivers/virtioblk.hpp index 0e6d0c73a2..e1807b8db9 100644 --- a/src/drivers/virtioblk.hpp +++ b/src/drivers/virtioblk.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef VIRTIO_BLOCK_HPP diff --git a/src/drivers/virtiocon.hpp b/src/drivers/virtiocon.hpp index 7ce845abc5..44dbe9f0f5 100644 --- a/src/drivers/virtiocon.hpp +++ b/src/drivers/virtiocon.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef VIRTIO_CONSOLE_HPP diff --git a/src/drivers/virtionet.cpp b/src/drivers/virtionet.cpp index e86657cee0..6e49f3b08a 100644 --- a/src/drivers/virtionet.cpp +++ b/src/drivers/virtionet.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define VNET_DEBUG //#define VNET_DEBUG_RX diff --git a/src/drivers/virtionet.hpp b/src/drivers/virtionet.hpp index cdded90431..6256af9110 100644 --- a/src/drivers/virtionet.hpp +++ b/src/drivers/virtionet.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** @note This virtionet implementation was very much inspired by diff --git a/src/drivers/vmxnet3.cpp b/src/drivers/vmxnet3.cpp index e739420174..dd3ae8a3e2 100644 --- a/src/drivers/vmxnet3.cpp +++ b/src/drivers/vmxnet3.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // loosely based on iPXE driver as well as from Linux driver by VMware #include "vmxnet3.hpp" diff --git a/src/drivers/vmxnet3.hpp b/src/drivers/vmxnet3.hpp index 353dbff0a9..29e8e6db68 100644 --- a/src/drivers/vmxnet3.hpp +++ b/src/drivers/vmxnet3.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/drivers/vmxnet3_queues.hpp b/src/drivers/vmxnet3_queues.hpp index 9b4c75ffca..ba3345e275 100644 --- a/src/drivers/vmxnet3_queues.hpp +++ b/src/drivers/vmxnet3_queues.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/src/fs/dirent.cpp b/src/fs/dirent.cpp index 47653d7b7d..dff666c23d 100644 --- a/src/fs/dirent.cpp +++ b/src/fs/dirent.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/fs/disk.cpp b/src/fs/disk.cpp index afd2cfbe84..7bbf427e92 100644 --- a/src/fs/disk.cpp +++ b/src/fs/disk.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/fs/fat.cpp b/src/fs/fat.cpp index 9aeae7a15d..09b42ee1f4 100644 --- a/src/fs/fat.cpp +++ b/src/fs/fat.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/fs/fat_async.cpp b/src/fs/fat_async.cpp index 31c75aa187..d2bd1a1b52 100644 --- a/src/fs/fat_async.cpp +++ b/src/fs/fat_async.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/fs/fat_sync.cpp b/src/fs/fat_sync.cpp index 55b738fac8..01dca4f286 100644 --- a/src/fs/fat_sync.cpp +++ b/src/fs/fat_sync.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/fs/filesystem.cpp b/src/fs/filesystem.cpp index e62d9ad989..b2acbeab77 100644 --- a/src/fs/filesystem.cpp +++ b/src/fs/filesystem.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/fs/memdisk.cpp b/src/fs/memdisk.cpp index 75f0d5a016..1aa4d218b7 100644 --- a/src/fs/memdisk.cpp +++ b/src/fs/memdisk.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/fs/path.cpp b/src/fs/path.cpp index 3a7470e9c2..8dcfb123c3 100644 --- a/src/fs/path.cpp +++ b/src/fs/path.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/hal/machine.cpp b/src/hal/machine.cpp index 1819fc170b..7e1daaec30 100644 --- a/src/hal/machine.cpp +++ b/src/hal/machine.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/hw/nic.cpp b/src/hw/nic.cpp index 52f93dee9a..51fc22f358 100644 --- a/src/hw/nic.cpp +++ b/src/hw/nic.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/hw/pci_device.cpp b/src/hw/pci_device.cpp index 8bc2c56091..54587e7aa4 100644 --- a/src/hw/pci_device.cpp +++ b/src/hw/pci_device.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/hw/pci_manager.cpp b/src/hw/pci_manager.cpp index 9ea9940736..cbb64c2089 100644 --- a/src/hw/pci_manager.cpp +++ b/src/hw/pci_manager.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/hw/ps2.cpp b/src/hw/ps2.cpp index 3929cdb0a7..67cf307e68 100644 --- a/src/hw/ps2.cpp +++ b/src/hw/ps2.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/hw/serial.cpp b/src/hw/serial.cpp index d703dc032d..dec8ee8ca8 100644 --- a/src/hw/serial.cpp +++ b/src/hw/serial.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/include/kernel.hpp b/src/include/kernel.hpp index a977e94c49..3c5a78aea3 100644 --- a/src/include/kernel.hpp +++ b/src/include/kernel.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_HPP #define KERNEL_HPP diff --git a/src/include/kprint b/src/include/kprint index 6d2b304ca3..c32bf70e21 100644 --- a/src/include/kprint +++ b/src/include/kprint @@ -1,21 +1,4 @@ // -*-C-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #ifndef INCLUDE_KPRINT #define INCLUDE_KPRINT diff --git a/src/kernel/block.cpp b/src/kernel/block.cpp index 61d37aa06b..93497ac817 100644 --- a/src/kernel/block.cpp +++ b/src/kernel/block.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/context.cpp b/src/kernel/context.cpp index b25f769070..557ded2818 100644 --- a/src/kernel/context.cpp +++ b/src/kernel/context.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/context_asm.asm b/src/kernel/context_asm.asm index bdaa5a0387..082ccb0f35 100644 --- a/src/kernel/context_asm.asm +++ b/src/kernel/context_asm.asm @@ -1,19 +1,3 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. USE32 global __context_switch extern __context_switch_delegate diff --git a/src/kernel/cpuid.cpp b/src/kernel/cpuid.cpp index 5ac4f2cbad..74036424db 100644 --- a/src/kernel/cpuid.cpp +++ b/src/kernel/cpuid.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/elf.cpp b/src/kernel/elf.cpp index d452c5f35b..a92e50c283 100644 --- a/src/kernel/elf.cpp +++ b/src/kernel/elf.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/events.cpp b/src/kernel/events.cpp index e6d15beb57..d48b960985 100644 --- a/src/kernel/events.cpp +++ b/src/kernel/events.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/fiber.cpp b/src/kernel/fiber.cpp index bae0b77049..0cffb03e9b 100644 --- a/src/kernel/fiber.cpp +++ b/src/kernel/fiber.cpp @@ -1,19 +1,4 @@ // This file is a part of the IntcludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define SMP_DEBUG 1 #include diff --git a/src/kernel/heap.cpp b/src/kernel/heap.cpp index 2e9a45a6fc..a06b9556f3 100644 --- a/src/kernel/heap.cpp +++ b/src/kernel/heap.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/kernel.cpp b/src/kernel/kernel.cpp index 525ea205f6..ce355cd2b5 100644 --- a/src/kernel/kernel.cpp +++ b/src/kernel/kernel.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/memmap.cpp b/src/kernel/memmap.cpp index d57650b95d..d2bf2a4d47 100644 --- a/src/kernel/memmap.cpp +++ b/src/kernel/memmap.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/multiboot.cpp b/src/kernel/multiboot.cpp index e9e26d6ba6..df8d1e76f4 100644 --- a/src/kernel/multiboot.cpp +++ b/src/kernel/multiboot.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/kernel/os.cpp b/src/kernel/os.cpp index 0ae45b159d..0b6db64f0e 100644 --- a/src/kernel/os.cpp +++ b/src/kernel/os.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/panic.cpp b/src/kernel/panic.cpp index 337edba773..796063c5b6 100644 --- a/src/kernel/panic.cpp +++ b/src/kernel/panic.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/profile.cpp b/src/kernel/profile.cpp index 36ed20b933..ad19bb5b15 100644 --- a/src/kernel/profile.cpp +++ b/src/kernel/profile.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/rng.cpp b/src/kernel/rng.cpp index 9b4c4af3a1..a0721a322b 100644 --- a/src/kernel/rng.cpp +++ b/src/kernel/rng.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/scoped_profiler.cpp b/src/kernel/scoped_profiler.cpp index 63bfd76b59..5131ed3d59 100644 --- a/src/kernel/scoped_profiler.cpp +++ b/src/kernel/scoped_profiler.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/service_stub.cpp b/src/kernel/service_stub.cpp index b870b6f6bf..47e4624e2a 100644 --- a/src/kernel/service_stub.cpp +++ b/src/kernel/service_stub.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/kernel/terminal.cpp b/src/kernel/terminal.cpp index d4d4118b53..5e4e2440b1 100644 --- a/src/kernel/terminal.cpp +++ b/src/kernel/terminal.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/kernel/vga.cpp b/src/kernel/vga.cpp index e0b62a1bc7..2c23a832a4 100644 --- a/src/kernel/vga.cpp +++ b/src/kernel/vga.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/buffer_store.cpp b/src/net/buffer_store.cpp index 50592b0acb..8a876ddb2b 100644 --- a/src/net/buffer_store.cpp +++ b/src/net/buffer_store.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/checksum.cpp b/src/net/checksum.cpp index a45198f2de..11572590a5 100644 --- a/src/net/checksum.cpp +++ b/src/net/checksum.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/configure.cpp b/src/net/configure.cpp index c983d1ccc7..f10ed3ac80 100644 --- a/src/net/configure.cpp +++ b/src/net/configure.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/conntrack.cpp b/src/net/conntrack.cpp index 8f9de6a758..89aabfb014 100644 --- a/src/net/conntrack.cpp +++ b/src/net/conntrack.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/dhcp/dh4client.cpp b/src/net/dhcp/dh4client.cpp index 8694656e3c..253c6a0b3b 100644 --- a/src/net/dhcp/dh4client.cpp +++ b/src/net/dhcp/dh4client.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DHCP_DEBUG 1 #ifdef DHCP_DEBUG diff --git a/src/net/dhcp/dhcpd.cpp b/src/net/dhcp/dhcpd.cpp index 69a64c0ac1..15dd0a020f 100644 --- a/src/net/dhcp/dhcpd.cpp +++ b/src/net/dhcp/dhcpd.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include #include diff --git a/src/net/dns/client.cpp b/src/net/dns/client.cpp index 7dc16236ff..229b827ce6 100644 --- a/src/net/dns/client.cpp +++ b/src/net/dns/client.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/dns/dns.cpp b/src/net/dns/dns.cpp index 1af614057c..ed508104f9 100644 --- a/src/net/dns/dns.cpp +++ b/src/net/dns/dns.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DNS_DEBUG 1 #ifdef DNS_DEBUG diff --git a/src/net/dns/query.cpp b/src/net/dns/query.cpp index 323a6ad38c..fc4e8d25c8 100644 --- a/src/net/dns/query.cpp +++ b/src/net/dns/query.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/dns/record.cpp b/src/net/dns/record.cpp index dde246543f..6f10f46e67 100644 --- a/src/net/dns/record.cpp +++ b/src/net/dns/record.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/dns/response.cpp b/src/net/dns/response.cpp index 537b501408..5188e741f8 100644 --- a/src/net/dns/response.cpp +++ b/src/net/dns/response.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/ethernet/ethernet.cpp b/src/net/ethernet/ethernet.cpp index bae993ca13..8e18b43be3 100644 --- a/src/net/ethernet/ethernet.cpp +++ b/src/net/ethernet/ethernet.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define ETH_DEBUG 1 #ifdef ETH_DEBUG diff --git a/src/net/ethernet/ethernet_8021q.cpp b/src/net/ethernet/ethernet_8021q.cpp index 5ba3e86151..677afb091b 100644 --- a/src/net/ethernet/ethernet_8021q.cpp +++ b/src/net/ethernet/ethernet_8021q.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define VLAN_DEBUG 1 #ifdef VLAN_DEBUG diff --git a/src/net/http/basic_client.cpp b/src/net/http/basic_client.cpp index 793866af0e..f09f207a00 100644 --- a/src/net/http/basic_client.cpp +++ b/src/net/http/basic_client.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/client.cpp b/src/net/http/client.cpp index 4a5a925e91..ecccd63b5c 100644 --- a/src/net/http/client.cpp +++ b/src/net/http/client.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/client_connection.cpp b/src/net/http/client_connection.cpp index 6bf807f720..52a1f1d058 100644 --- a/src/net/http/client_connection.cpp +++ b/src/net/http/client_connection.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/http/cookie.cpp b/src/net/http/cookie.cpp index c87b4fdcb2..5e726a387e 100644 --- a/src/net/http/cookie.cpp +++ b/src/net/http/cookie.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/header.cpp b/src/net/http/header.cpp index 2fdac97214..7f7a09d614 100644 --- a/src/net/http/header.cpp +++ b/src/net/http/header.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/header_fields.cpp b/src/net/http/header_fields.cpp index 967168d96c..be22ddc6dc 100644 --- a/src/net/http/header_fields.cpp +++ b/src/net/http/header_fields.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. namespace http { namespace header { diff --git a/src/net/http/message.cpp b/src/net/http/message.cpp index 4c643b9bfc..4f819bbdc8 100644 --- a/src/net/http/message.cpp +++ b/src/net/http/message.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/mime_types.cpp b/src/net/http/mime_types.cpp index d10594e4b2..8d761dc91a 100644 --- a/src/net/http/mime_types.cpp +++ b/src/net/http/mime_types.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/request.cpp b/src/net/http/request.cpp index ee2ea204d7..f02dfa86db 100644 --- a/src/net/http/request.cpp +++ b/src/net/http/request.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/http/response.cpp b/src/net/http/response.cpp index e6bd5b8338..421e7c51bf 100644 --- a/src/net/http/response.cpp +++ b/src/net/http/response.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/http/response_writer.cpp b/src/net/http/response_writer.cpp index 4a9631659f..d53aaf2881 100644 --- a/src/net/http/response_writer.cpp +++ b/src/net/http/response_writer.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/server.cpp b/src/net/http/server.cpp index d70ea62c2b..3ac7f49c7b 100644 --- a/src/net/http/server.cpp +++ b/src/net/http/server.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/http/server_connection.cpp b/src/net/http/server_connection.cpp index 3849b7c7cd..6d2d0ae4e2 100644 --- a/src/net/http/server_connection.cpp +++ b/src/net/http/server_connection.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/http/status_codes.cpp b/src/net/http/status_codes.cpp index e68b55be99..62848095b8 100644 --- a/src/net/http/status_codes.cpp +++ b/src/net/http/status_codes.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/time.cpp b/src/net/http/time.cpp index dcf178fa28..2bfc7c71ff 100644 --- a/src/net/http/time.cpp +++ b/src/net/http/time.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/http/version.cpp b/src/net/http/version.cpp index f92cb24b17..11f614766d 100644 --- a/src/net/http/version.cpp +++ b/src/net/http/version.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/https/botan_server.cpp b/src/net/https/botan_server.cpp index d620e05314..6effb9a536 100644 --- a/src/net/https/botan_server.cpp +++ b/src/net/https/botan_server.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/https/s2n_server.cpp b/src/net/https/s2n_server.cpp index 96ac479a71..47243e5892 100644 --- a/src/net/https/s2n_server.cpp +++ b/src/net/https/s2n_server.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/inet.cpp b/src/net/inet.cpp index e7f96f296d..4ef3751205 100644 --- a/src/net/inet.cpp +++ b/src/net/inet.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/interfaces.cpp b/src/net/interfaces.cpp index 73dd56591f..1c73af360e 100644 --- a/src/net/interfaces.cpp +++ b/src/net/interfaces.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/ip4/arp.cpp b/src/net/ip4/arp.cpp index bc3323c0d3..e55b2b3c9e 100644 --- a/src/net/ip4/arp.cpp +++ b/src/net/ip4/arp.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define ARP_DEBUG 1 #ifdef ARP_DEBUG diff --git a/src/net/ip4/icmp4.cpp b/src/net/ip4/icmp4.cpp index 84af1c5775..a67de39ff7 100644 --- a/src/net/ip4/icmp4.cpp +++ b/src/net/ip4/icmp4.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // #define DEBUG #include diff --git a/src/net/ip4/ip4.cpp b/src/net/ip4/ip4.cpp index 416c01eeab..955d448f13 100644 --- a/src/net/ip4/ip4.cpp +++ b/src/net/ip4/ip4.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define IP_DEBUG 1 #ifdef IP_DEBUG diff --git a/src/net/ip6/addr.cpp b/src/net/ip6/addr.cpp index e7003fb253..ae3c98c897 100644 --- a/src/net/ip6/addr.cpp +++ b/src/net/ip6/addr.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/ip6/addr_list.cpp b/src/net/ip6/addr_list.cpp index 74c0eccee8..679ec00509 100644 --- a/src/net/ip6/addr_list.cpp +++ b/src/net/ip6/addr_list.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018-2019 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/ip6/extension_header.cpp b/src/net/ip6/extension_header.cpp index f0b8dac089..2f727afe75 100644 --- a/src/net/ip6/extension_header.cpp +++ b/src/net/ip6/extension_header.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/ip6/icmp6.cpp b/src/net/ip6/icmp6.cpp index 97747a820a..b5e6b1fe0b 100644 --- a/src/net/ip6/icmp6.cpp +++ b/src/net/ip6/icmp6.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define ICMP6_DEBUG 1 #ifdef ICMP6_DEBUG diff --git a/src/net/ip6/ip6.cpp b/src/net/ip6/ip6.cpp index 79e4f3ade4..251d7925a6 100644 --- a/src/net/ip6/ip6.cpp +++ b/src/net/ip6/ip6.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define IP6_DEBUG 1 #ifdef IP6_DEBUG diff --git a/src/net/ip6/mld.cpp b/src/net/ip6/mld.cpp index c4c6189c10..18961e2fcc 100644 --- a/src/net/ip6/mld.cpp +++ b/src/net/ip6/mld.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define MLD_DEBUG 1 #ifdef MLD_DEBUG diff --git a/src/net/ip6/ndp.cpp b/src/net/ip6/ndp.cpp index a36cded004..87f6359bb0 100644 --- a/src/net/ip6/ndp.cpp +++ b/src/net/ip6/ndp.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define NDP_DEBUG 1 #ifdef NDP_DEBUG diff --git a/src/net/ip6/slaac.cpp b/src/net/ip6/slaac.cpp index 702e775de3..4dec8bf53b 100644 --- a/src/net/ip6/slaac.cpp +++ b/src/net/ip6/slaac.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define SLAAC_DEBUG 1 #ifdef SLAAC_DEBUG diff --git a/src/net/ip6/udp6.cpp b/src/net/ip6/udp6.cpp index efe24fbea4..52432d0a5a 100644 --- a/src/net/ip6/udp6.cpp +++ b/src/net/ip6/udp6.cpp @@ -1,19 +1,5 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DEBUG #include diff --git a/src/net/nat/napt.cpp b/src/net/nat/napt.cpp index a88668b45b..01da5a51d5 100644 --- a/src/net/nat/napt.cpp +++ b/src/net/nat/napt.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/nat/nat.cpp b/src/net/nat/nat.cpp index b41caffa58..7211c8f044 100644 --- a/src/net/nat/nat.cpp +++ b/src/net/nat/nat.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/packet_debug.cpp b/src/net/packet_debug.cpp index 50209c7d9d..30324765c0 100644 --- a/src/net/packet_debug.cpp +++ b/src/net/packet_debug.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/tcp/connection.cpp b/src/net/tcp/connection.cpp index 1ceaf0dc50..726eb265fd 100644 --- a/src/net/tcp/connection.cpp +++ b/src/net/tcp/connection.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // #define DEBUG // #define DEBUG2 @@ -884,7 +868,6 @@ void Connection::recv_data(const Packet_view& in) // * Data cannot be duplicate (already S-acked) // * Read buffer needs to have room for the data // * SACK list needs to have room for the entry (either connects or new) -// // For now, only full segments are allowed (not partial), // meaning the data will get thrown away if the read buffer not fully fits it. // This makes everything much easier. diff --git a/src/net/tcp/connection_states.cpp b/src/net/tcp/connection_states.cpp index 0b6d055df1..dd90f2789a 100644 --- a/src/net/tcp/connection_states.cpp +++ b/src/net/tcp/connection_states.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/tcp/listener.cpp b/src/net/tcp/listener.cpp index 77b32532d8..29c4d3cdbf 100644 --- a/src/net/tcp/listener.cpp +++ b/src/net/tcp/listener.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/tcp/read_buffer.cpp b/src/net/tcp/read_buffer.cpp index 5745c969d1..cd688a6d05 100644 --- a/src/net/tcp/read_buffer.cpp +++ b/src/net/tcp/read_buffer.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/tcp/read_request.cpp b/src/net/tcp/read_request.cpp index d4fb300257..baac39f4d6 100644 --- a/src/net/tcp/read_request.cpp +++ b/src/net/tcp/read_request.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/tcp/rttm.cpp b/src/net/tcp/rttm.cpp index 0d32a2638a..38811fd142 100644 --- a/src/net/tcp/rttm.cpp +++ b/src/net/tcp/rttm.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/tcp/tcp.cpp b/src/net/tcp/tcp.cpp index f9cadcdf24..bc730c7d50 100644 --- a/src/net/tcp/tcp.cpp +++ b/src/net/tcp/tcp.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define TCP_DEBUG 1 #ifdef TCP_DEBUG diff --git a/src/net/tcp/tcp_conntrack.cpp b/src/net/tcp/tcp_conntrack.cpp index 789a158149..ef39b5a599 100644 --- a/src/net/tcp/tcp_conntrack.cpp +++ b/src/net/tcp/tcp_conntrack.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define CT_DEBUG 1 #ifdef CT_DEBUG diff --git a/src/net/tcp/write_queue.cpp b/src/net/tcp/write_queue.cpp index 0c866de7f4..2223154b79 100644 --- a/src/net/tcp/write_queue.cpp +++ b/src/net/tcp/write_queue.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/net/udp/socket.cpp b/src/net/udp/socket.cpp index 8be3c59e76..bf86b33152 100644 --- a/src/net/udp/socket.cpp +++ b/src/net/udp/socket.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/net/udp/udp.cpp b/src/net/udp/udp.cpp index bb6cd6a8ab..7bd7a98767 100644 --- a/src/net/udp/udp.cpp +++ b/src/net/udp/udp.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define UDP_DEBUG 1 #ifdef UDP_DEBUG diff --git a/src/net/vlan_manager.cpp b/src/net/vlan_manager.cpp index 4ba50196a9..5b6ddee680 100644 --- a/src/net/vlan_manager.cpp +++ b/src/net/vlan_manager.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define VLAN_DEBUG 1 #ifdef VLAN_DEBUG diff --git a/src/net/ws/websocket.cpp b/src/net/ws/websocket.cpp index 9989c94b1f..a3308e8d75 100644 --- a/src/net/ws/websocket.cpp +++ b/src/net/ws/websocket.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/platform/aarch64_vm/kernel_start.cpp b/src/platform/aarch64_vm/kernel_start.cpp index 164390e4a0..2806793d34 100644 --- a/src/platform/aarch64_vm/kernel_start.cpp +++ b/src/platform/aarch64_vm/kernel_start.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/platform/aarch64_vm/sanity_checks.cpp b/src/platform/aarch64_vm/sanity_checks.cpp index b9d381615a..7efa42d928 100644 --- a/src/platform/aarch64_vm/sanity_checks.cpp +++ b/src/platform/aarch64_vm/sanity_checks.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/platform/aarch64_vm/start.asm b/src/platform/aarch64_vm/start.asm index 3a13774c85..ff71971de6 100644 --- a/src/platform/aarch64_vm/start.asm +++ b/src/platform/aarch64_vm/start.asm @@ -1,21 +1,3 @@ -/*;; This file is a part of the IncludeOS unikernel - www.includeos.org -;; -;; Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -;; and Alfred Bratterud -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http:;;www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. -*/ - //USE32 .extern __arch_start .extern __serial_print1 diff --git a/src/platform/x86_nano/kernel_start.cpp b/src/platform/x86_nano/kernel_start.cpp index e18db56512..93e4fca90f 100644 --- a/src/platform/x86_nano/kernel_start.cpp +++ b/src/platform/x86_nano/kernel_start.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/platform/x86_pc/acpi.cpp b/src/platform/x86_pc/acpi.cpp index c5bbce7e8c..30e418a588 100644 --- a/src/platform/x86_pc/acpi.cpp +++ b/src/platform/x86_pc/acpi.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "acpi.hpp" #include diff --git a/src/platform/x86_pc/acpi.hpp b/src/platform/x86_pc/acpi.hpp index 118b371094..687e1a7c9e 100644 --- a/src/platform/x86_pc/acpi.hpp +++ b/src/platform/x86_pc/acpi.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_ACPI_HPP diff --git a/src/platform/x86_pc/apic.cpp b/src/platform/x86_pc/apic.cpp index c838883991..4d27252d8b 100644 --- a/src/platform/x86_pc/apic.cpp +++ b/src/platform/x86_pc/apic.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "apic.hpp" #include "ioapic.hpp" diff --git a/src/platform/x86_pc/apic.hpp b/src/platform/x86_pc/apic.hpp index 78f08991ad..487f9947b6 100644 --- a/src/platform/x86_pc/apic.hpp +++ b/src/platform/x86_pc/apic.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HW_APIC_HPP diff --git a/src/platform/x86_pc/apic_boot.asm b/src/platform/x86_pc/apic_boot.asm index 4be93f3bde..9403b50db6 100644 --- a/src/platform/x86_pc/apic_boot.asm +++ b/src/platform/x86_pc/apic_boot.asm @@ -1,23 +1,5 @@ -; This file is a part of the IncludeOS unikernel - www.includeos.org -; -; Copyright 2015 Oslo and Akershus University College of Applied Sciences -; and Alfred Bratterud -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -; ; Thanks to Maghsoud for paving the way to SMP! ; We are still calling them Revenants -; org 0x10000 BITS 16 ; 2-bytes of jmp instruction, but aligned to 4-bytes (!) diff --git a/src/platform/x86_pc/apic_iface.hpp b/src/platform/x86_pc/apic_iface.hpp index ef3d3c5a19..21ae0825eb 100644 --- a/src/platform/x86_pc/apic_iface.hpp +++ b/src/platform/x86_pc/apic_iface.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_APIC_IFACE_HPP diff --git a/src/platform/x86_pc/apic_regs.hpp b/src/platform/x86_pc/apic_regs.hpp index fe21d95a17..22a2848bbd 100644 --- a/src/platform/x86_pc/apic_regs.hpp +++ b/src/platform/x86_pc/apic_regs.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef HW_APIC_REGS_HPP diff --git a/src/platform/x86_pc/apic_revenant.hpp b/src/platform/x86_pc/apic_revenant.hpp index bee479ee41..4ea74bb1bb 100644 --- a/src/platform/x86_pc/apic_revenant.hpp +++ b/src/platform/x86_pc/apic_revenant.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_APIC_REVENANT_HPP diff --git a/src/platform/x86_pc/apic_timer.cpp b/src/platform/x86_pc/apic_timer.cpp index c905ac7c55..de412a3e0d 100644 --- a/src/platform/x86_pc/apic_timer.cpp +++ b/src/platform/x86_pc/apic_timer.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "apic_timer.hpp" #include "apic.hpp" diff --git a/src/platform/x86_pc/apic_timer.hpp b/src/platform/x86_pc/apic_timer.hpp index d0c2d6d572..8a2b9adc24 100644 --- a/src/platform/x86_pc/apic_timer.hpp +++ b/src/platform/x86_pc/apic_timer.hpp @@ -1,20 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_APIC_TIMER_HPP diff --git a/src/platform/x86_pc/boot/bootloader.asm b/src/platform/x86_pc/boot/bootloader.asm index 9024f94626..bed0b45d7d 100644 --- a/src/platform/x86_pc/boot/bootloader.asm +++ b/src/platform/x86_pc/boot/bootloader.asm @@ -1,20 +1,3 @@ -;; This file is a part of the IncludeOS unikernel - www.includeos.org -;; -;; Copyright 2015 Oslo and Akershus University College of Applied Sciences -;; and Alfred Bratterud -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http:;;www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. - USE16 ;; Memory layout, 16-bit %define _boot_segment 0x07c0 diff --git a/src/platform/x86_pc/boot/disk_read_lba.asm b/src/platform/x86_pc/boot/disk_read_lba.asm index 493e322b5d..cf19ca17cb 100644 --- a/src/platform/x86_pc/boot/disk_read_lba.asm +++ b/src/platform/x86_pc/boot/disk_read_lba.asm @@ -3,13 +3,10 @@ ;; ;; Modification/rewrite of code found at osdev: ;; http://wiki.osdev.org/ATA_read/write_sectors#Read_in_LBA_mode -;; ;; Licence: ...assumed to be in public domain -;; ;; @param EAX Logical Block Address of sector ;; @param CL Number of sectors to read ;; @param EDI The address of buffer to put data obtained from disk -;; ;; @return None ;; ============================================================================= ata_lba_read: diff --git a/src/platform/x86_pc/clocks.cpp b/src/platform/x86_pc/clocks.cpp index 9c820ad864..f9590034e1 100644 --- a/src/platform/x86_pc/clocks.cpp +++ b/src/platform/x86_pc/clocks.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "clocks.hpp" #include "../kvm/kvmclock.hpp" diff --git a/src/platform/x86_pc/clocks.hpp b/src/platform/x86_pc/clocks.hpp index b6dd34d8bf..2927fbc1ca 100644 --- a/src/platform/x86_pc/clocks.hpp +++ b/src/platform/x86_pc/clocks.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/src/platform/x86_pc/cmos.hpp b/src/platform/x86_pc/cmos.hpp index 7a1196326e..b75c516208 100644 --- a/src/platform/x86_pc/cmos.hpp +++ b/src/platform/x86_pc/cmos.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef HW_CMOS_HPP #define HW_CMOS_HPP diff --git a/src/platform/x86_pc/cmos_clock.cpp b/src/platform/x86_pc/cmos_clock.cpp index eb99ecd88e..19db95d1b2 100644 --- a/src/platform/x86_pc/cmos_clock.cpp +++ b/src/platform/x86_pc/cmos_clock.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "cmos_clock.hpp" #include "cmos.hpp" diff --git a/src/platform/x86_pc/cmos_clock.hpp b/src/platform/x86_pc/cmos_clock.hpp index fed06c5a64..76ab18a517 100644 --- a/src/platform/x86_pc/cmos_clock.hpp +++ b/src/platform/x86_pc/cmos_clock.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include "clocks.hpp" diff --git a/src/platform/x86_pc/cpu_freq_sampling.cpp b/src/platform/x86_pc/cpu_freq_sampling.cpp index 4c671d75bf..5cbbf9296d 100644 --- a/src/platform/x86_pc/cpu_freq_sampling.cpp +++ b/src/platform/x86_pc/cpu_freq_sampling.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DEBUG #include "cpu_freq_sampling.hpp" diff --git a/src/platform/x86_pc/cpu_freq_sampling.hpp b/src/platform/x86_pc/cpu_freq_sampling.hpp index 0eada9adee..7a412041c5 100644 --- a/src/platform/x86_pc/cpu_freq_sampling.hpp +++ b/src/platform/x86_pc/cpu_freq_sampling.hpp @@ -1,19 +1,5 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_CPU_FREQ_SAMPLING_HPP diff --git a/src/platform/x86_pc/idt.hpp b/src/platform/x86_pc/idt.hpp index 9ce3680f6a..a40389643b 100644 --- a/src/platform/x86_pc/idt.hpp +++ b/src/platform/x86_pc/idt.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef KERNEL_IDT_HPP #define KERNEL_IDT_HPP diff --git a/src/platform/x86_pc/ioapic.cpp b/src/platform/x86_pc/ioapic.cpp index 8dd09b5aa0..e1ff2ab895 100644 --- a/src/platform/x86_pc/ioapic.cpp +++ b/src/platform/x86_pc/ioapic.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "ioapic.hpp" #include diff --git a/src/platform/x86_pc/ioapic.hpp b/src/platform/x86_pc/ioapic.hpp index 77841b81ec..adc3008f2b 100644 --- a/src/platform/x86_pc/ioapic.hpp +++ b/src/platform/x86_pc/ioapic.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_IOAPIC_HPP diff --git a/src/platform/x86_pc/kernel_start.cpp b/src/platform/x86_pc/kernel_start.cpp index 650e4478ab..0ac0eb66b5 100644 --- a/src/platform/x86_pc/kernel_start.cpp +++ b/src/platform/x86_pc/kernel_start.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/platform/x86_pc/os.cpp b/src/platform/x86_pc/os.cpp index 30268c239d..3651c43c3d 100644 --- a/src/platform/x86_pc/os.cpp +++ b/src/platform/x86_pc/os.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #define DEBUG #define MYINFO(X,...) INFO("Kernel", X, ##__VA_ARGS__) diff --git a/src/platform/x86_pc/pic.cpp b/src/platform/x86_pc/pic.cpp index 481bd6e0c9..c15c4b8250 100644 --- a/src/platform/x86_pc/pic.cpp +++ b/src/platform/x86_pc/pic.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include "pic.hpp" diff --git a/src/platform/x86_pc/pic.hpp b/src/platform/x86_pc/pic.hpp index 3e6af8b112..1892c573fd 100644 --- a/src/platform/x86_pc/pic.hpp +++ b/src/platform/x86_pc/pic.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef X86_PIC_HPP #define X86_PIC_HPP diff --git a/src/platform/x86_pc/pit.cpp b/src/platform/x86_pc/pit.cpp index 5f9f78a558..b50d18e4df 100644 --- a/src/platform/x86_pc/pit.cpp +++ b/src/platform/x86_pc/pit.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "pit.hpp" #include "cpu_freq_sampling.hpp" diff --git a/src/platform/x86_pc/pit.hpp b/src/platform/x86_pc/pit.hpp index 8acf590036..d85bd5dd4e 100644 --- a/src/platform/x86_pc/pit.hpp +++ b/src/platform/x86_pc/pit.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_PIT_HPP diff --git a/src/platform/x86_pc/platform.cpp b/src/platform/x86_pc/platform.cpp index f440663fe0..e9f504d7f9 100644 --- a/src/platform/x86_pc/platform.cpp +++ b/src/platform/x86_pc/platform.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "acpi.hpp" #include "apic.hpp" diff --git a/src/platform/x86_pc/platform.hpp b/src/platform/x86_pc/platform.hpp index 6a462b53a8..2506b629a4 100644 --- a/src/platform/x86_pc/platform.hpp +++ b/src/platform/x86_pc/platform.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/src/platform/x86_pc/sanity_checks.cpp b/src/platform/x86_pc/sanity_checks.cpp index beb0898477..7e19c99705 100644 --- a/src/platform/x86_pc/sanity_checks.cpp +++ b/src/platform/x86_pc/sanity_checks.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/platform/x86_pc/smbios.cpp b/src/platform/x86_pc/smbios.cpp index 498dcdec54..05a49dafbc 100644 --- a/src/platform/x86_pc/smbios.cpp +++ b/src/platform/x86_pc/smbios.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "smbios.hpp" #include diff --git a/src/platform/x86_pc/smbios.hpp b/src/platform/x86_pc/smbios.hpp index 710b0267b4..5775517b30 100644 --- a/src/platform/x86_pc/smbios.hpp +++ b/src/platform/x86_pc/smbios.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index 622a1a2f79..01a5ab0934 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "smp.hpp" #include "acpi.hpp" diff --git a/src/platform/x86_pc/smp.hpp b/src/platform/x86_pc/smp.hpp index e664525945..91b7cae437 100644 --- a/src/platform/x86_pc/smp.hpp +++ b/src/platform/x86_pc/smp.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_SMP_HPP diff --git a/src/platform/x86_pc/start.asm b/src/platform/x86_pc/start.asm index 6cd80657e2..006609fb9f 100644 --- a/src/platform/x86_pc/start.asm +++ b/src/platform/x86_pc/start.asm @@ -1,19 +1,3 @@ -;; This file is a part of the IncludeOS unikernel - www.includeos.org -;; -;; Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -;; and Alfred Bratterud -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http:;;www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. USE32 extern __arch_start diff --git a/src/platform/x86_pc/x2apic.hpp b/src/platform/x86_pc/x2apic.hpp index 164f3f4d40..9dbd2d0a3f 100644 --- a/src/platform/x86_pc/x2apic.hpp +++ b/src/platform/x86_pc/x2apic.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_X2APIC_HPP diff --git a/src/platform/x86_pc/xapic.hpp b/src/platform/x86_pc/xapic.hpp index a94a6e291c..addf4e5fb0 100644 --- a/src/platform/x86_pc/xapic.hpp +++ b/src/platform/x86_pc/xapic.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef X86_XAPIC_HPP diff --git a/src/platform/x86_solo5/sanity_checks.cpp b/src/platform/x86_solo5/sanity_checks.cpp index 11ce8abde6..5f6e5aaa46 100644 --- a/src/platform/x86_solo5/sanity_checks.cpp +++ b/src/platform/x86_solo5/sanity_checks.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/platform/x86_solo5/solo5_manager.cpp b/src/platform/x86_solo5/solo5_manager.cpp index 23df200926..a694000361 100644 --- a/src/platform/x86_solo5/solo5_manager.cpp +++ b/src/platform/x86_solo5/solo5_manager.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/platform/x86_solo5/start.asm b/src/platform/x86_solo5/start.asm index e30e594c4b..151aed72ab 100644 --- a/src/platform/x86_solo5/start.asm +++ b/src/platform/x86_solo5/start.asm @@ -1,19 +1,3 @@ -;; This file is a part of the IncludeOS unikernel - www.includeos.org -;; -;; Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -;; and Alfred Bratterud -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http:;;www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. global get_fs_sentinel_value:function global pre_initialize_tls:function diff --git a/src/plugins/autoconf.cpp b/src/plugins/autoconf.cpp index 7a95af3b42..0a3ff9060d 100644 --- a/src/plugins/autoconf.cpp +++ b/src/plugins/autoconf.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/plugins/example.cpp b/src/plugins/example.cpp index a34e187c55..40e40e2822 100644 --- a/src/plugins/example.cpp +++ b/src/plugins/example.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Example plugin. Also used for testing. diff --git a/src/plugins/field_medic/diag.cpp b/src/plugins/field_medic/diag.cpp index b12022bff9..f1c32ec4cd 100644 --- a/src/plugins/field_medic/diag.cpp +++ b/src/plugins/field_medic/diag.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/plugins/field_medic/fieldmedic.cpp b/src/plugins/field_medic/fieldmedic.cpp index 985db52726..706318d4fe 100644 --- a/src/plugins/field_medic/fieldmedic.cpp +++ b/src/plugins/field_medic/fieldmedic.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "fieldmedic.hpp" diff --git a/src/plugins/field_medic/fieldmedic.hpp b/src/plugins/field_medic/fieldmedic.hpp index 11d1152412..7c025b3a9a 100644 --- a/src/plugins/field_medic/fieldmedic.hpp +++ b/src/plugins/field_medic/fieldmedic.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** Field medic - OS diagnostic plugins diff --git a/src/plugins/madness/madness.cpp b/src/plugins/madness/madness.cpp index 5de88928fa..825d6c7490 100644 --- a/src/plugins/madness/madness.cpp +++ b/src/plugins/madness/madness.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/plugins/madness/madness.hpp b/src/plugins/madness/madness.hpp index 8f52f83ea1..a91fe7be1c 100644 --- a/src/plugins/madness/madness.hpp +++ b/src/plugins/madness/madness.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef PLUGINS_MADNESS_HPP #define PLUGINS_MADNESS_HPP diff --git a/src/plugins/nacl.cpp b/src/plugins/nacl.cpp index e6679e4d59..a5c6fee0ab 100644 --- a/src/plugins/nacl.cpp +++ b/src/plugins/nacl.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/plugins/syslog.cpp b/src/plugins/syslog.cpp index 484e8d16b3..bb31982729 100644 --- a/src/plugins/syslog.cpp +++ b/src/plugins/syslog.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // This file contains a plugin for automatically mounting // a given syslog implementation to the virtual filesystem (VFS) diff --git a/src/plugins/syslogd.cpp b/src/plugins/syslogd.cpp index 330f76a10a..426a61f841 100644 --- a/src/plugins/syslogd.cpp +++ b/src/plugins/syslogd.cpp @@ -1,21 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - // Syslog plugin (UDP) - #include #include diff --git a/src/plugins/terminal.cpp b/src/plugins/terminal.cpp index 4684118609..9b0c51d894 100644 --- a/src/plugins/terminal.cpp +++ b/src/plugins/terminal.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/plugins/unik.cpp b/src/plugins/unik.cpp index aa676d9ff3..6246d28858 100644 --- a/src/plugins/unik.cpp +++ b/src/plugins/unik.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/src/plugins/vfs.cpp b/src/plugins/vfs.cpp index a5774ea8c8..95529bde37 100644 --- a/src/plugins/vfs.cpp +++ b/src/plugins/vfs.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // This file contains a plugin for automatically mounting // resources to the virtual filesystem (VFS) diff --git a/src/posix/fd.cpp b/src/posix/fd.cpp index 8a9bac7ce2..12cda1165d 100644 --- a/src/posix/fd.cpp +++ b/src/posix/fd.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/file_fd.cpp b/src/posix/file_fd.cpp index 37e156a42d..eb00dc4ae5 100644 --- a/src/posix/file_fd.cpp +++ b/src/posix/file_fd.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/memalign.cpp b/src/posix/memalign.cpp index 9281f5598a..ee8c940a34 100644 --- a/src/posix/memalign.cpp +++ b/src/posix/memalign.cpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/pthread.cpp b/src/posix/pthread.cpp index 6be16326ed..78c8b35e8d 100644 --- a/src/posix/pthread.cpp +++ b/src/posix/pthread.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/stdlib.cpp b/src/posix/stdlib.cpp index 1264de1bda..399ee9d3e4 100644 --- a/src/posix/stdlib.cpp +++ b/src/posix/stdlib.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/sys/socket.cpp b/src/posix/sys/socket.cpp index 1cc28aa1e5..936483107b 100644 --- a/src/posix/sys/socket.cpp +++ b/src/posix/sys/socket.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/sys/stat.cpp b/src/posix/sys/stat.cpp index 5891150254..521239801c 100644 --- a/src/posix/sys/stat.cpp +++ b/src/posix/sys/stat.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/tcp_fd.cpp b/src/posix/tcp_fd.cpp index 481dd3be85..957c872c65 100644 --- a/src/posix/tcp_fd.cpp +++ b/src/posix/tcp_fd.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017-2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/udp_fd.cpp b/src/posix/udp_fd.cpp index 6d63b606cc..163ad973f3 100644 --- a/src/posix/udp_fd.cpp +++ b/src/posix/udp_fd.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017-2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include // os::block() diff --git a/src/posix/unistd.cpp b/src/posix/unistd.cpp index 8e0c4dfa13..a14f96d2e1 100644 --- a/src/posix/unistd.cpp +++ b/src/posix/unistd.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/posix/unix_fd.cpp b/src/posix/unix_fd.cpp index 1a50c4fd88..edc3c69289 100644 --- a/src/posix/unix_fd.cpp +++ b/src/posix/unix_fd.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/service_name.cpp b/src/service_name.cpp index 36d286eba5..4e2ed7adcd 100644 --- a/src/service_name.cpp +++ b/src/service_name.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include extern "C" { diff --git a/src/util/async.cpp b/src/util/async.cpp index f83efa443e..2763610087 100644 --- a/src/util/async.cpp +++ b/src/util/async.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/util/autoconf.cpp b/src/util/autoconf.cpp index b793d8d490..955d189bed 100644 --- a/src/util/autoconf.cpp +++ b/src/util/autoconf.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/util/config.cpp b/src/util/config.cpp index a7adedec36..902f10701c 100644 --- a/src/util/config.cpp +++ b/src/util/config.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/util/crc32.cpp b/src/util/crc32.cpp index 632c3897fe..4e7c8cbd09 100644 --- a/src/util/crc32.cpp +++ b/src/util/crc32.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/util/logger.cpp b/src/util/logger.cpp index b6c53e9592..3b86b93d37 100644 --- a/src/util/logger.cpp +++ b/src/util/logger.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/util/memstream.c b/src/util/memstream.c index 4f3bf743ad..adc6e879f8 100644 --- a/src/util/memstream.c +++ b/src/util/memstream.c @@ -1,20 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #include #include diff --git a/src/util/path_to_regex.cpp b/src/util/path_to_regex.cpp index 955cfdd856..4bac7c5990 100644 --- a/src/util/path_to_regex.cpp +++ b/src/util/path_to_regex.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // https://github.com/pillarjs/path-to-regexp/blob/master/index.js diff --git a/src/util/percent_encoding.cpp b/src/util/percent_encoding.cpp index 1509cc597f..68bd7f3b87 100644 --- a/src/util/percent_encoding.cpp +++ b/src/util/percent_encoding.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/util/statman.cpp b/src/util/statman.cpp index 6ef2364679..f0828186d6 100644 --- a/src/util/statman.cpp +++ b/src/util/statman.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/util/syslog_facility.cpp b/src/util/syslog_facility.cpp index 43cd1aed0f..0a873ae3e1 100644 --- a/src/util/syslog_facility.cpp +++ b/src/util/syslog_facility.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #include #include #include // getpid diff --git a/src/util/syslogd.cpp b/src/util/syslogd.cpp index 91379a9830..d2df178555 100644 --- a/src/util/syslogd.cpp +++ b/src/util/syslogd.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #include #include #include // errno diff --git a/src/util/tar.cpp b/src/util/tar.cpp index 63a9e99371..41782080b3 100644 --- a/src/util/tar.cpp +++ b/src/util/tar.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/util/uri.cpp b/src/util/uri.cpp index 3902c82623..18d5401c96 100644 --- a/src/util/uri.cpp +++ b/src/util/uri.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/version.cpp b/src/version.cpp index fdff088ea5..67523d2333 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #ifndef USERSPACE_KERNEL diff --git a/src/virtio/virtio.cpp b/src/virtio/virtio.cpp index 30da49379b..42165df346 100644 --- a/src/virtio/virtio.cpp +++ b/src/virtio/virtio.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/src/virtio/virtio_queue.cpp b/src/virtio/virtio_queue.cpp index 86a17ddf17..40b31cb573 100644 --- a/src/virtio/virtio_queue.cpp +++ b/src/virtio/virtio_queue.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#undef NO_DEBUG #define DEBUG // Allow debug diff --git a/test/fs/integration/fat16/fat16.cpp b/test/fs/integration/fat16/fat16.cpp index 36c9757e71..a37133ca8e 100644 --- a/test/fs/integration/fat16/fat16.cpp +++ b/test/fs/integration/fat16/fat16.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/integration/fat32/fat32.cpp b/test/fs/integration/fat32/fat32.cpp index 33b3fb52c1..254bf8c7fa 100644 --- a/test/fs/integration/fat32/fat32.cpp +++ b/test/fs/integration/fat32/fat32.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/integration/ide/service.cpp b/test/fs/integration/ide/service.cpp index 51482f3b94..82cdfa4d0d 100644 --- a/test/fs/integration/ide/service.cpp +++ b/test/fs/integration/ide/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/integration/ide_write/service.cpp b/test/fs/integration/ide_write/service.cpp index bff5704fe8..e66e5a5147 100644 --- a/test/fs/integration/ide_write/service.cpp +++ b/test/fs/integration/ide_write/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/integration/memdisk/bigdisk.cpp b/test/fs/integration/memdisk/bigdisk.cpp index e3d08d1c38..2830a5976c 100644 --- a/test/fs/integration/memdisk/bigdisk.cpp +++ b/test/fs/integration/memdisk/bigdisk.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/integration/memdisk/nosector.cpp b/test/fs/integration/memdisk/nosector.cpp index 1223c5dd3c..5bffc156b1 100644 --- a/test/fs/integration/memdisk/nosector.cpp +++ b/test/fs/integration/memdisk/nosector.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/integration/memdisk/twosector.cpp b/test/fs/integration/memdisk/twosector.cpp index 4a76abef6c..e3507ebf65 100644 --- a/test/fs/integration/memdisk/twosector.cpp +++ b/test/fs/integration/memdisk/twosector.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/integration/vfs/service.cpp b/test/fs/integration/vfs/service.cpp index 886500515c..2b5a4abe58 100644 --- a/test/fs/integration/vfs/service.cpp +++ b/test/fs/integration/vfs/service.cpp @@ -1,19 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, //1 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #define OS_TERMINATE_ON_CONTRACT_VIOLATION diff --git a/test/fs/integration/virtio_block/service.cpp b/test/fs/integration/virtio_block/service.cpp index bccfc0bed4..baaf1431be 100644 --- a/test/fs/integration/virtio_block/service.cpp +++ b/test/fs/integration/virtio_block/service.cpp @@ -1,19 +1,4 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, //1 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #define OS_TERMINATE_ON_CONTRACT_VIOLATION #include diff --git a/test/fs/unit/memdisk_test.cpp b/test/fs/unit/memdisk_test.cpp index a7440c62bb..ae86f788a7 100644 --- a/test/fs/unit/memdisk_test.cpp +++ b/test/fs/unit/memdisk_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/unit/path_test.cpp b/test/fs/unit/path_test.cpp index bf1f4dd893..f4e5d30ed4 100644 --- a/test/fs/unit/path_test.cpp +++ b/test/fs/unit/path_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/fs/unit/vfs_test.cpp b/test/fs/unit/vfs_test.cpp index 292aa1cd27..f7341214c3 100644 --- a/test/fs/unit/vfs_test.cpp +++ b/test/fs/unit/vfs_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/hw/integration/serial/service.cpp b/test/hw/integration/serial/service.cpp index 3ad0811db6..07e56faedf 100644 --- a/test/hw/integration/serial/service.cpp +++ b/test/hw/integration/serial/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/hw/integration/vga/vga.cpp b/test/hw/integration/vga/vga.cpp index c098599bff..345e55dd1b 100644 --- a/test/hw/integration/vga/vga.cpp +++ b/test/hw/integration/vga/vga.cpp @@ -1,19 +1,5 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/hw/integration/virtio_queue/service.cpp b/test/hw/integration/virtio_queue/service.cpp index 73dbc8812c..24492eacb3 100644 --- a/test/hw/integration/virtio_queue/service.cpp +++ b/test/hw/integration/virtio_queue/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** A very superficial test to verify that basic STL is working diff --git a/test/hw/unit/cpu_test.cpp b/test/hw/unit/cpu_test.cpp index 355a5a68cc..64e079d9c0 100644 --- a/test/hw/unit/cpu_test.cpp +++ b/test/hw/unit/cpu_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/test/hw/unit/mac_addr_test.cpp b/test/hw/unit/mac_addr_test.cpp index 902aede3f9..8960837ac8 100644 --- a/test/hw/unit/mac_addr_test.cpp +++ b/test/hw/unit/mac_addr_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/hw/unit/usernet.cpp b/test/hw/unit/usernet.cpp index ce0afb3535..61878a9995 100644 --- a/test/hw/unit/usernet.cpp +++ b/test/hw/unit/usernet.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/hw/unit/virtio_queue.cpp b/test/hw/unit/virtio_queue.cpp index 6594b1d0ea..413bd9430c 100644 --- a/test/hw/unit/virtio_queue.cpp +++ b/test/hw/unit/virtio_queue.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/LiveUpdate/liu.hpp b/test/kernel/integration/LiveUpdate/liu.hpp index 4519ce39be..614baf8830 100644 --- a/test/kernel/integration/LiveUpdate/liu.hpp +++ b/test/kernel/integration/LiveUpdate/liu.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/test/kernel/integration/LiveUpdate/service.cpp b/test/kernel/integration/LiveUpdate/service.cpp index 95dce1259d..8e6a2c7fc2 100644 --- a/test/kernel/integration/LiveUpdate/service.cpp +++ b/test/kernel/integration/LiveUpdate/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/block/service.cpp b/test/kernel/integration/block/service.cpp index ed07ebea68..3ac6f7ea94 100644 --- a/test/kernel/integration/block/service.cpp +++ b/test/kernel/integration/block/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/context/service.cpp b/test/kernel/integration/context/service.cpp index 71582250c3..ccb06c2eb2 100644 --- a/test/kernel/integration/context/service.cpp +++ b/test/kernel/integration/context/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/exception/service.cpp b/test/kernel/integration/exception/service.cpp index 75e4fe1d60..d9484593a6 100644 --- a/test/kernel/integration/exception/service.cpp +++ b/test/kernel/integration/exception/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/test/kernel/integration/fiber/service.cpp b/test/kernel/integration/fiber/service.cpp index 3f76439b08..ebd5d02d1d 100644 --- a/test/kernel/integration/fiber/service.cpp +++ b/test/kernel/integration/fiber/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/grub/service.cpp b/test/kernel/integration/grub/service.cpp index 58def2d702..435b7f527e 100644 --- a/test/kernel/integration/grub/service.cpp +++ b/test/kernel/integration/grub/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/test/kernel/integration/kprint/service.cpp b/test/kernel/integration/kprint/service.cpp index 66cae54cfb..26101ea31e 100644 --- a/test/kernel/integration/kprint/service.cpp +++ b/test/kernel/integration/kprint/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include "../../../../src/include/kprint" diff --git a/test/kernel/integration/memmap/service.cpp b/test/kernel/integration/memmap/service.cpp index 017838fef9..bf3eb6cb25 100644 --- a/test/kernel/integration/memmap/service.cpp +++ b/test/kernel/integration/memmap/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/modules/service.cpp b/test/kernel/integration/modules/service.cpp index 9145e276e6..c0b20902e8 100644 --- a/test/kernel/integration/modules/service.cpp +++ b/test/kernel/integration/modules/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/paging/service.cpp b/test/kernel/integration/paging/service.cpp index d7963f89ee..dd30048ec6 100644 --- a/test/kernel/integration/paging/service.cpp +++ b/test/kernel/integration/paging/service.cpp @@ -1,20 +1,4 @@ // -*- C++ -*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include //#include diff --git a/test/kernel/integration/plugin_init/service.cpp b/test/kernel/integration/plugin_init/service.cpp index fbbca3e291..274fd8f0a4 100644 --- a/test/kernel/integration/plugin_init/service.cpp +++ b/test/kernel/integration/plugin_init/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/test/kernel/integration/rng/service.cpp b/test/kernel/integration/rng/service.cpp index 4791cabfbd..8110bb0730 100644 --- a/test/kernel/integration/rng/service.cpp +++ b/test/kernel/integration/rng/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include // std::random_device diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index e2e6f1dac7..08278cfdd4 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/term/service.cpp b/test/kernel/integration/term/service.cpp index 99389f96ae..cb6ceae852 100644 --- a/test/kernel/integration/term/service.cpp +++ b/test/kernel/integration/term/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index 39f488fe81..5398097764 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/timers/service.cpp b/test/kernel/integration/timers/service.cpp index 7db283fd1f..7a1ede494c 100644 --- a/test/kernel/integration/timers/service.cpp +++ b/test/kernel/integration/timers/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/timers/timers.cpp b/test/kernel/integration/timers/timers.cpp index 6afc2aeb79..d783c37fd7 100644 --- a/test/kernel/integration/timers/timers.cpp +++ b/test/kernel/integration/timers/timers.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/integration/tls/service.cpp b/test/kernel/integration/tls/service.cpp index a0e1dd4eb5..3006050724 100644 --- a/test/kernel/integration/tls/service.cpp +++ b/test/kernel/integration/tls/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/unit/memmap_test.cpp b/test/kernel/unit/memmap_test.cpp index 9cc256c2d0..09e0987727 100644 --- a/test/kernel/unit/memmap_test.cpp +++ b/test/kernel/unit/memmap_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/unit/memory.cpp b/test/kernel/unit/memory.cpp index 3be60dccb8..d7109c22c3 100644 --- a/test/kernel/unit/memory.cpp +++ b/test/kernel/unit/memory.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // #define DEBUG_UNIT #ifdef DEBUG_UNIT diff --git a/test/kernel/unit/os_test.cpp b/test/kernel/unit/os_test.cpp index 82f6e8e9b0..8f06a3b881 100644 --- a/test/kernel/unit/os_test.cpp +++ b/test/kernel/unit/os_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/unit/rng.cpp b/test/kernel/unit/rng.cpp index 7c4e622eae..95f15c6daa 100644 --- a/test/kernel/unit/rng.cpp +++ b/test/kernel/unit/rng.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/unit/service_stub_test.cpp b/test/kernel/unit/service_stub_test.cpp index 7f7210af1c..30b4e7a506 100644 --- a/test/kernel/unit/service_stub_test.cpp +++ b/test/kernel/unit/service_stub_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/unit/test_hal.cpp b/test/kernel/unit/test_hal.cpp index 2720785014..2dcc1b75f9 100644 --- a/test/kernel/unit/test_hal.cpp +++ b/test/kernel/unit/test_hal.cpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #define DEBUG_UNIT diff --git a/test/kernel/unit/unit_events.cpp b/test/kernel/unit/unit_events.cpp index 3903175697..91f7692f06 100644 --- a/test/kernel/unit/unit_events.cpp +++ b/test/kernel/unit/unit_events.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/unit/unit_timers.cpp b/test/kernel/unit/unit_timers.cpp index 395aae72b6..ff5d8cc580 100644 --- a/test/kernel/unit/unit_timers.cpp +++ b/test/kernel/unit/unit_timers.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/kernel/unit/x86_paging.cpp b/test/kernel/unit/x86_paging.cpp index 214e376bb6..a664958fd6 100644 --- a/test/kernel/unit/x86_paging.cpp +++ b/test/kernel/unit/x86_paging.cpp @@ -1,19 +1,4 @@ // -*-C++-*- -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DEBUG_UNIT diff --git a/test/lest_util/nic_mock.hpp b/test/lest_util/nic_mock.hpp index ef385abc07..0faa10bc73 100644 --- a/test/lest_util/nic_mock.hpp +++ b/test/lest_util/nic_mock.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/test/lest_util/os_mock.cpp b/test/lest_util/os_mock.cpp index 68e4239d21..b5fae771e6 100644 --- a/test/lest_util/os_mock.cpp +++ b/test/lest_util/os_mock.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/lest_util/packet_factory.hpp b/test/lest_util/packet_factory.hpp index 9d8886c4ec..d762b0c84c 100644 --- a/test/lest_util/packet_factory.hpp +++ b/test/lest_util/packet_factory.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef TEST_PACKET_FACTORY_HPP diff --git a/test/lib/unit/mana/cookie_jar_test.cpp b/test/lib/unit/mana/cookie_jar_test.cpp index 8e02ee5e7d..7c6d94f13e 100644 --- a/test/lib/unit/mana/cookie_jar_test.cpp +++ b/test/lib/unit/mana/cookie_jar_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "../cookie_jar.hpp" #include diff --git a/test/mod/integration/gsl/service.cpp b/test/mod/integration/gsl/service.cpp index 23428e97f7..c117dbe60f 100644 --- a/test/mod/integration/gsl/service.cpp +++ b/test/mod/integration/gsl/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** A very superficial test to verify that basic STL is working diff --git a/test/net/integration/bufstore/service.cpp b/test/net/integration/bufstore/service.cpp index 1db42fb59a..609e3fc2d4 100644 --- a/test/net/integration/bufstore/service.cpp +++ b/test/net/integration/bufstore/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DEBUG // Debug supression diff --git a/test/net/integration/configure/service.cpp b/test/net/integration/configure/service.cpp index 5f0e915b88..6b195233e8 100644 --- a/test/net/integration/configure/service.cpp +++ b/test/net/integration/configure/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/dhclient/service.cpp b/test/net/integration/dhclient/service.cpp index 352aac1db7..c20539a423 100644 --- a/test/net/integration/dhclient/service.cpp +++ b/test/net/integration/dhclient/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DEBUG // Debug supression diff --git a/test/net/integration/dhcpd/service.cpp b/test/net/integration/dhcpd/service.cpp index c8e23af0b6..8e8a54b827 100644 --- a/test/net/integration/dhcpd/service.cpp +++ b/test/net/integration/dhcpd/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/dhcpd_dhclient_linux/service.cpp b/test/net/integration/dhcpd_dhclient_linux/service.cpp index 9f218b5d7b..e83287dae5 100644 --- a/test/net/integration/dhcpd_dhclient_linux/service.cpp +++ b/test/net/integration/dhcpd_dhclient_linux/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/dns/service.cpp b/test/net/integration/dns/service.cpp index 3d67e5abed..77dae70684 100644 --- a/test/net/integration/dns/service.cpp +++ b/test/net/integration/dns/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/gateway/service.cpp b/test/net/integration/gateway/service.cpp index 97af15eec0..5410c66838 100644 --- a/test/net/integration/gateway/service.cpp +++ b/test/net/integration/gateway/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/http/service.cpp b/test/net/integration/http/service.cpp index 009b08b40c..25ce59ca76 100644 --- a/test/net/integration/http/service.cpp +++ b/test/net/integration/http/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/icmp/service.cpp b/test/net/integration/icmp/service.cpp index 982a89cfd7..f20404bb21 100644 --- a/test/net/integration/icmp/service.cpp +++ b/test/net/integration/icmp/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/icmp6/service.cpp b/test/net/integration/icmp6/service.cpp index 950cee4a1f..97f3512219 100644 --- a/test/net/integration/icmp6/service.cpp +++ b/test/net/integration/icmp6/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/microLB/service.cpp b/test/net/integration/microLB/service.cpp index f757203cd5..46c11baef5 100644 --- a/test/net/integration/microLB/service.cpp +++ b/test/net/integration/microLB/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/nat/service.cpp b/test/net/integration/nat/service.cpp index dd5de2c99d..46ec9a73bf 100644 --- a/test/net/integration/nat/service.cpp +++ b/test/net/integration/nat/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/router/service.cpp b/test/net/integration/router/service.cpp index bbd65fe9d2..6fd78e8b2e 100644 --- a/test/net/integration/router/service.cpp +++ b/test/net/integration/router/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/router6/service.cpp b/test/net/integration/router6/service.cpp index b9ed9d536c..d650acc036 100644 --- a/test/net/integration/router6/service.cpp +++ b/test/net/integration/router6/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/slaac/service.cpp b/test/net/integration/slaac/service.cpp index a018572bc2..130abe64a2 100644 --- a/test/net/integration/slaac/service.cpp +++ b/test/net/integration/slaac/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. //#define DEBUG // Debug supression diff --git a/test/net/integration/tcp/service.cpp b/test/net/integration/tcp/service.cpp index 95f2e1828d..126866dc45 100644 --- a/test/net/integration/tcp/service.cpp +++ b/test/net/integration/tcp/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/udp/service.cpp b/test/net/integration/udp/service.cpp index 9d5ecffc60..c6edce14f8 100644 --- a/test/net/integration/udp/service.cpp +++ b/test/net/integration/udp/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/integration/vlan/service.cpp b/test/net/integration/vlan/service.cpp index c0b3623e1d..bbdcdf23b2 100644 --- a/test/net/integration/vlan/service.cpp +++ b/test/net/integration/vlan/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/addr_test.cpp b/test/net/unit/addr_test.cpp index 5aa371ab04..561799c981 100644 --- a/test/net/unit/addr_test.cpp +++ b/test/net/unit/addr_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/bufstore.cpp b/test/net/unit/bufstore.cpp index cb3979a25d..7dffd75936 100644 --- a/test/net/unit/bufstore.cpp +++ b/test/net/unit/bufstore.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/checksum.cpp b/test/net/unit/checksum.cpp index 2493b6ffa6..5b6c39ee63 100644 --- a/test/net/unit/checksum.cpp +++ b/test/net/unit/checksum.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/cidr.cpp b/test/net/unit/cidr.cpp index 643e7600b0..3a5159ecdc 100644 --- a/test/net/unit/cidr.cpp +++ b/test/net/unit/cidr.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/conntrack_test.cpp b/test/net/unit/conntrack_test.cpp index 2814720ffb..ecf8d78f08 100644 --- a/test/net/unit/conntrack_test.cpp +++ b/test/net/unit/conntrack_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/cookie_test.cpp b/test/net/unit/cookie_test.cpp index fe94f76f43..a53b24f9c0 100644 --- a/test/net/unit/cookie_test.cpp +++ b/test/net/unit/cookie_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/dhcp.cpp b/test/net/unit/dhcp.cpp index 6627c01a72..b523d0183d 100644 --- a/test/net/unit/dhcp.cpp +++ b/test/net/unit/dhcp.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/dhcp_message_test.cpp b/test/net/unit/dhcp_message_test.cpp index 75896b5128..c0ec8384ae 100644 --- a/test/net/unit/dhcp_message_test.cpp +++ b/test/net/unit/dhcp_message_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/error.cpp b/test/net/unit/error.cpp index 9444cbf91e..a6e7cdca26 100644 --- a/test/net/unit/error.cpp +++ b/test/net/unit/error.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/http_header_test.cpp b/test/net/unit/http_header_test.cpp index c00d668ba5..15bd2adfa2 100644 --- a/test/net/unit/http_header_test.cpp +++ b/test/net/unit/http_header_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/http_method_test.cpp b/test/net/unit/http_method_test.cpp index 8244a5b314..0d00c2665e 100644 --- a/test/net/unit/http_method_test.cpp +++ b/test/net/unit/http_method_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/http_mime_types_test.cpp b/test/net/unit/http_mime_types_test.cpp index 99694b51cd..1e59f76287 100644 --- a/test/net/unit/http_mime_types_test.cpp +++ b/test/net/unit/http_mime_types_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/http_request_test.cpp b/test/net/unit/http_request_test.cpp index 97b1cf3126..d70e04b5e5 100644 --- a/test/net/unit/http_request_test.cpp +++ b/test/net/unit/http_request_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/http_response_test.cpp b/test/net/unit/http_response_test.cpp index 6e7ff43f19..832080e2d4 100644 --- a/test/net/unit/http_response_test.cpp +++ b/test/net/unit/http_response_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/http_status_codes_test.cpp b/test/net/unit/http_status_codes_test.cpp index 6ce1ec6119..ab75597262 100644 --- a/test/net/unit/http_status_codes_test.cpp +++ b/test/net/unit/http_status_codes_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/http_time_test.cpp b/test/net/unit/http_time_test.cpp index e10c6eb692..afa55271c0 100644 --- a/test/net/unit/http_time_test.cpp +++ b/test/net/unit/http_time_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/http_version_test.cpp b/test/net/unit/http_version_test.cpp index 34b3801a00..6baff0a199 100644 --- a/test/net/unit/http_version_test.cpp +++ b/test/net/unit/http_version_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/interfaces_test.cpp b/test/net/unit/interfaces_test.cpp index e764dd7f09..aa51a6be6d 100644 --- a/test/net/unit/interfaces_test.cpp +++ b/test/net/unit/interfaces_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/test/net/unit/ip4.cpp b/test/net/unit/ip4.cpp index afdef6deab..1183b26294 100644 --- a/test/net/unit/ip4.cpp +++ b/test/net/unit/ip4.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/ip4_addr.cpp b/test/net/unit/ip4_addr.cpp index 51baf84b18..ebdd5f2a20 100644 --- a/test/net/unit/ip4_addr.cpp +++ b/test/net/unit/ip4_addr.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/ip4_packet_test.cpp b/test/net/unit/ip4_packet_test.cpp index e715eba5ac..f4f52544a8 100644 --- a/test/net/unit/ip4_packet_test.cpp +++ b/test/net/unit/ip4_packet_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/ip6.cpp b/test/net/unit/ip6.cpp index de480c0a89..9499c6156b 100644 --- a/test/net/unit/ip6.cpp +++ b/test/net/unit/ip6.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/ip6_addr.cpp b/test/net/unit/ip6_addr.cpp index 57ddd3f48c..1e84c5bf71 100644 --- a/test/net/unit/ip6_addr.cpp +++ b/test/net/unit/ip6_addr.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/ip6_addr_list_test.cpp b/test/net/unit/ip6_addr_list_test.cpp index 9bd7b8296a..63e56c7683 100644 --- a/test/net/unit/ip6_addr_list_test.cpp +++ b/test/net/unit/ip6_addr_list_test.cpp @@ -1,20 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2019 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #include #include diff --git a/test/net/unit/ip6_packet_test.cpp b/test/net/unit/ip6_packet_test.cpp index 786b735594..6f9e1e0841 100644 --- a/test/net/unit/ip6_packet_test.cpp +++ b/test/net/unit/ip6_packet_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/napt_test.cpp b/test/net/unit/napt_test.cpp index b985731b9c..536d87639f 100644 --- a/test/net/unit/napt_test.cpp +++ b/test/net/unit/napt_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/nat_test.cpp b/test/net/unit/nat_test.cpp index 11796471d8..54f05d9df7 100644 --- a/test/net/unit/nat_test.cpp +++ b/test/net/unit/nat_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/packets.cpp b/test/net/unit/packets.cpp index 3eb2b17ac2..a65d719f11 100644 --- a/test/net/unit/packets.cpp +++ b/test/net/unit/packets.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/path_mtu_discovery.cpp b/test/net/unit/path_mtu_discovery.cpp index d3946f9423..7bfd827a69 100644 --- a/test/net/unit/path_mtu_discovery.cpp +++ b/test/net/unit/path_mtu_discovery.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include @@ -21,9 +5,7 @@ using namespace net; -// // Unit tests for when Path MTU Discovery is disabled by default: -// CASE("Path MTU Discovery is disabled by default and can be enabled") { Nic_mock nic; diff --git a/test/net/unit/port_util_test.cpp b/test/net/unit/port_util_test.cpp index 4c670b3e0d..0d6e34ea1e 100644 --- a/test/net/unit/port_util_test.cpp +++ b/test/net/unit/port_util_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/router_test.cpp b/test/net/unit/router_test.cpp index 4d64656351..39f6ca4ad5 100644 --- a/test/net/unit/router_test.cpp +++ b/test/net/unit/router_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/socket.cpp b/test/net/unit/socket.cpp index 7c1215e97f..a4a44349f1 100644 --- a/test/net/unit/socket.cpp +++ b/test/net/unit/socket.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/stateful_addr_test.cpp b/test/net/unit/stateful_addr_test.cpp index 869db3f403..419e656464 100644 --- a/test/net/unit/stateful_addr_test.cpp +++ b/test/net/unit/stateful_addr_test.cpp @@ -1,20 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2019 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - #include #include diff --git a/test/net/unit/tcp_packet_test.cpp b/test/net/unit/tcp_packet_test.cpp index fbabbffbb3..59fd4efc2c 100644 --- a/test/net/unit/tcp_packet_test.cpp +++ b/test/net/unit/tcp_packet_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/tcp_read_buffer_test.cpp b/test/net/unit/tcp_read_buffer_test.cpp index f618288f96..d28e726673 100644 --- a/test/net/unit/tcp_read_buffer_test.cpp +++ b/test/net/unit/tcp_read_buffer_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/tcp_read_request_test.cpp b/test/net/unit/tcp_read_request_test.cpp index a157c024ad..9c03e854c1 100644 --- a/test/net/unit/tcp_read_request_test.cpp +++ b/test/net/unit/tcp_read_request_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/tcp_sack_test.cpp b/test/net/unit/tcp_sack_test.cpp index e168faf6a5..503fb84290 100644 --- a/test/net/unit/tcp_sack_test.cpp +++ b/test/net/unit/tcp_sack_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/net/unit/tcp_write_queue.cpp b/test/net/unit/tcp_write_queue.cpp index a83b008e67..6d292283b1 100644 --- a/test/net/unit/tcp_write_queue.cpp +++ b/test/net/unit/tcp_write_queue.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/plugin/integration/unik/service.cpp b/test/plugin/integration/unik/service.cpp index ea377b5365..35b048f4dd 100644 --- a/test/plugin/integration/unik/service.cpp +++ b/test/plugin/integration/unik/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/conf/service.cpp b/test/posix/integration/conf/service.cpp index abc4a9cfc1..d33869604f 100644 --- a/test/posix/integration/conf/service.cpp +++ b/test/posix/integration/conf/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/conf/test_pathconf.c b/test/posix/integration/conf/test_pathconf.c index d7d0d77153..37eb4c9a82 100644 --- a/test/posix/integration/conf/test_pathconf.c +++ b/test/posix/integration/conf/test_pathconf.c @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/conf/test_pwd.c b/test/posix/integration/conf/test_pwd.c index 6d913febc8..c14328a5e7 100644 --- a/test/posix/integration/conf/test_pwd.c +++ b/test/posix/integration/conf/test_pwd.c @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/conf/test_sysconf.c b/test/posix/integration/conf/test_sysconf.c index 5612f7313a..ab18c7c799 100644 --- a/test/posix/integration/conf/test_sysconf.c +++ b/test/posix/integration/conf/test_sysconf.c @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/file_fd/test_file_fd.cpp b/test/posix/integration/file_fd/test_file_fd.cpp index 51bdb87253..038efa67da 100644 --- a/test/posix/integration/file_fd/test_file_fd.cpp +++ b/test/posix/integration/file_fd/test_file_fd.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/main/service.cpp b/test/posix/integration/main/service.cpp index cf0f72b7fe..dea0d32a06 100644 --- a/test/posix/integration/main/service.cpp +++ b/test/posix/integration/main/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/pthread/service.cpp b/test/posix/integration/pthread/service.cpp index 93e096421e..3f184e1055 100644 --- a/test/posix/integration/pthread/service.cpp +++ b/test/posix/integration/pthread/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** * Example from http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html diff --git a/test/posix/integration/stat/test_stat_ftw.cpp b/test/posix/integration/stat/test_stat_ftw.cpp index d037162e2b..1434ff23da 100644 --- a/test/posix/integration/stat/test_stat_ftw.cpp +++ b/test/posix/integration/stat/test_stat_ftw.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/syslog_default/service.cpp b/test/posix/integration/syslog_default/service.cpp index e2cf350460..f4af50d685 100644 --- a/test/posix/integration/syslog_default/service.cpp +++ b/test/posix/integration/syslog_default/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/test/posix/integration/syslog_plugin/service.cpp b/test/posix/integration/syslog_plugin/service.cpp index 04d40b92b6..387343d6c2 100644 --- a/test/posix/integration/syslog_plugin/service.cpp +++ b/test/posix/integration/syslog_plugin/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include diff --git a/test/posix/integration/tcp/service.cpp b/test/posix/integration/tcp/service.cpp index 6da2c7b2ff..834f276f0f 100644 --- a/test/posix/integration/tcp/service.cpp +++ b/test/posix/integration/tcp/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/udp/service.cpp b/test/posix/integration/udp/service.cpp index e777981733..4a13b6c0a1 100644 --- a/test/posix/integration/udp/service.cpp +++ b/test/posix/integration/udp/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/integration/utsname/service.cpp b/test/posix/integration/utsname/service.cpp index bc22fad9be..ffabf9e70b 100644 --- a/test/posix/integration/utsname/service.cpp +++ b/test/posix/integration/utsname/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2018 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/unit/fd_map_test.cpp b/test/posix/unit/fd_map_test.cpp index c7fd0216ab..7a41c6a528 100644 --- a/test/posix/unit/fd_map_test.cpp +++ b/test/posix/unit/fd_map_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/posix/unit/inet_test.cpp b/test/posix/unit/inet_test.cpp index 7ef24df778..66ce6b3b26 100644 --- a/test/posix/unit/inet_test.cpp +++ b/test/posix/unit/inet_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/stl/integration/coroutines/service.cpp b/test/stl/integration/coroutines/service.cpp index 0185a56781..ca8e458cfc 100644 --- a/test/stl/integration/coroutines/service.cpp +++ b/test/stl/integration/coroutines/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** A very superficial test to verify that basic STL is working diff --git a/test/stl/integration/crt/service.cpp b/test/stl/integration/crt/service.cpp index 69b275ac7c..8e74f730fa 100644 --- a/test/stl/integration/crt/service.cpp +++ b/test/stl/integration/crt/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/stl/integration/exceptions/service.cpp b/test/stl/integration/exceptions/service.cpp index dd65e4d620..22ea59f816 100644 --- a/test/stl/integration/exceptions/service.cpp +++ b/test/stl/integration/exceptions/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/stl/integration/stl/service.cpp b/test/stl/integration/stl/service.cpp index 302f04e034..edd1cdfb47 100644 --- a/test/stl/integration/stl/service.cpp +++ b/test/stl/integration/stl/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** A very superficial test to verify that basic STL is working diff --git a/test/stress/service.cpp b/test/stress/service.cpp index 0087f312c1..b994be7b4b 100644 --- a/test/stress/service.cpp +++ b/test/stress/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/userspace/fuzz/fuzzy_http.hpp b/test/userspace/fuzz/fuzzy_http.hpp index e668bde29b..4b63023065 100644 --- a/test/userspace/fuzz/fuzzy_http.hpp +++ b/test/userspace/fuzz/fuzzy_http.hpp @@ -1,20 +1,4 @@ #pragma once -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #ifndef FUZZY_HTTP_SERVER_HPP diff --git a/test/userspace/fuzz/fuzzy_stream.hpp b/test/userspace/fuzz/fuzzy_stream.hpp index a0d63c235a..e242b27524 100644 --- a/test/userspace/fuzz/fuzzy_stream.hpp +++ b/test/userspace/fuzz/fuzzy_stream.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #pragma once #include diff --git a/test/userspace/fuzz/service.cpp b/test/userspace/fuzz/service.cpp index 3a0a93199a..12de7e2c64 100644 --- a/test/userspace/fuzz/service.cpp +++ b/test/userspace/fuzz/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/userspace/liveupdate/service.cpp b/test/userspace/liveupdate/service.cpp index 6ceb820868..84ffcbefb1 100644 --- a/test/userspace/liveupdate/service.cpp +++ b/test/userspace/liveupdate/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/userspace/microlb/service.cpp b/test/userspace/microlb/service.cpp index 0f7ca48969..35653e66c9 100644 --- a/test/userspace/microlb/service.cpp +++ b/test/userspace/microlb/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/userspace/s2n/service.cpp b/test/userspace/s2n/service.cpp index 36e76674d2..0f2b7d11af 100644 --- a/test/userspace/s2n/service.cpp +++ b/test/userspace/s2n/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/userspace/tcp/service.cpp b/test/userspace/tcp/service.cpp index ee257383d1..95da6c1b19 100644 --- a/test/userspace/tcp/service.cpp +++ b/test/userspace/tcp/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/integration/tar/service.cpp b/test/util/integration/tar/service.cpp index 3c4f546154..252184289e 100644 --- a/test/util/integration/tar/service.cpp +++ b/test/util/integration/tar/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/integration/tar/tar_example/l1_f1/l2/service.cpp b/test/util/integration/tar/tar_example/l1_f1/l2/service.cpp index 94f8d4dda8..ec4ade0742 100644 --- a/test/util/integration/tar/tar_example/l1_f1/l2/service.cpp +++ b/test/util/integration/tar/tar_example/l1_f1/l2/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include // rand() #include diff --git a/test/util/integration/tar/tar_example/l1_f1/service.cpp b/test/util/integration/tar/tar_example/l1_f1/service.cpp index 94f8d4dda8..ec4ade0742 100644 --- a/test/util/integration/tar/tar_example/l1_f1/service.cpp +++ b/test/util/integration/tar/tar_example/l1_f1/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include // rand() #include diff --git a/test/util/integration/tar/tar_example/l1_f2/virtio.hpp b/test/util/integration/tar/tar_example/l1_f2/virtio.hpp index 5fabf41548..49b89718a1 100644 --- a/test/util/integration/tar/tar_example/l1_f2/virtio.hpp +++ b/test/util/integration/tar/tar_example/l1_f2/virtio.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** @note This virtio implementation was very much inspired by diff --git a/test/util/integration/tar_gz/service.cpp b/test/util/integration/tar_gz/service.cpp index b30aa4d50e..ad4944b27e 100644 --- a/test/util/integration/tar_gz/service.cpp +++ b/test/util/integration/tar_gz/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/integration/tar_gz/tar_example/l1_f1/l2/service.cpp b/test/util/integration/tar_gz/tar_example/l1_f1/l2/service.cpp index 94f8d4dda8..ec4ade0742 100644 --- a/test/util/integration/tar_gz/tar_example/l1_f1/l2/service.cpp +++ b/test/util/integration/tar_gz/tar_example/l1_f1/l2/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include // rand() #include diff --git a/test/util/integration/tar_gz/tar_example/l1_f1/service.cpp b/test/util/integration/tar_gz/tar_example/l1_f1/service.cpp index 94f8d4dda8..ec4ade0742 100644 --- a/test/util/integration/tar_gz/tar_example/l1_f1/service.cpp +++ b/test/util/integration/tar_gz/tar_example/l1_f1/service.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include // rand() #include diff --git a/test/util/integration/tar_gz/tar_example/l1_f2/virtio.hpp b/test/util/integration/tar_gz/tar_example/l1_f2/virtio.hpp index 5fabf41548..49b89718a1 100644 --- a/test/util/integration/tar_gz/tar_example/l1_f2/virtio.hpp +++ b/test/util/integration/tar_gz/tar_example/l1_f2/virtio.hpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /** @note This virtio implementation was very much inspired by diff --git a/test/util/unit/base64.cpp b/test/util/unit/base64.cpp index 3f89268078..224af52b86 100644 --- a/test/util/unit/base64.cpp +++ b/test/util/unit/base64.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /// /// This file tests the base64 module by using the test vectors from: diff --git a/test/util/unit/bitops.cpp b/test/util/unit/bitops.cpp index 885eaada68..808eb35af6 100644 --- a/test/util/unit/bitops.cpp +++ b/test/util/unit/bitops.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/buddy_alloc_test.cpp b/test/util/unit/buddy_alloc_test.cpp index 9a9934dc14..f6ec3a2e97 100644 --- a/test/util/unit/buddy_alloc_test.cpp +++ b/test/util/unit/buddy_alloc_test.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // #define DEBUG_UNIT diff --git a/test/util/unit/crc32.cpp b/test/util/unit/crc32.cpp index a075fea944..4bc1b5c23b 100644 --- a/test/util/unit/crc32.cpp +++ b/test/util/unit/crc32.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/delegate.cpp b/test/util/unit/delegate.cpp index 1b309ad7e6..d72bba9713 100644 --- a/test/util/unit/delegate.cpp +++ b/test/util/unit/delegate.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/fixed_list_alloc_test.cpp b/test/util/unit/fixed_list_alloc_test.cpp index e538dbf7bf..55026f2671 100644 --- a/test/util/unit/fixed_list_alloc_test.cpp +++ b/test/util/unit/fixed_list_alloc_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/fixed_queue.cpp b/test/util/unit/fixed_queue.cpp index d0bd45574d..86b6502858 100644 --- a/test/util/unit/fixed_queue.cpp +++ b/test/util/unit/fixed_queue.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/fixed_vector.cpp b/test/util/unit/fixed_vector.cpp index d174a9744f..b7ce7b3e81 100644 --- a/test/util/unit/fixed_vector.cpp +++ b/test/util/unit/fixed_vector.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/isotime.cpp b/test/util/unit/isotime.cpp index 4fe9e2d57e..fe4890aee9 100644 --- a/test/util/unit/isotime.cpp +++ b/test/util/unit/isotime.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/logger_test.cpp b/test/util/unit/logger_test.cpp index 3c6dcdf9e1..f4f767bac8 100644 --- a/test/util/unit/logger_test.cpp +++ b/test/util/unit/logger_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/lstack/test_lstack.hpp b/test/util/unit/lstack/test_lstack.hpp index 8d5dd2f6f4..f960b6ae84 100644 --- a/test/util/unit/lstack/test_lstack.hpp +++ b/test/util/unit/lstack/test_lstack.hpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef LSTACK_COMMON_HPP #define LSTACK_COMMON_HPP diff --git a/test/util/unit/lstack/test_lstack_common.cpp b/test/util/unit/lstack/test_lstack_common.cpp index 874003c18f..4c028c8980 100644 --- a/test/util/unit/lstack/test_lstack_common.cpp +++ b/test/util/unit/lstack/test_lstack_common.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /* Separated test body to use with a couple of different lstack options set diff --git a/test/util/unit/lstack/test_lstack_merging.cpp b/test/util/unit/lstack/test_lstack_merging.cpp index f3e405729e..5b67ddb323 100644 --- a/test/util/unit/lstack/test_lstack_merging.cpp +++ b/test/util/unit/lstack/test_lstack_merging.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #define LSTACK_OPT merge #include "test_lstack_common.cpp" diff --git a/test/util/unit/lstack/test_lstack_nodes.cpp b/test/util/unit/lstack/test_lstack_nodes.cpp index 6f24f91d67..c4387b4751 100644 --- a/test/util/unit/lstack/test_lstack_nodes.cpp +++ b/test/util/unit/lstack/test_lstack_nodes.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include "test_lstack.hpp" diff --git a/test/util/unit/lstack/test_lstack_nomerge.cpp b/test/util/unit/lstack/test_lstack_nomerge.cpp index cd7d5a8eac..b126b8347c 100644 --- a/test/util/unit/lstack/test_lstack_nomerge.cpp +++ b/test/util/unit/lstack/test_lstack_nomerge.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #define LSTACK_OPT no_merge #include "test_lstack_common.cpp" diff --git a/test/util/unit/membitmap.cpp b/test/util/unit/membitmap.cpp index 2d84f5e7e8..d3c57e8bc0 100644 --- a/test/util/unit/membitmap.cpp +++ b/test/util/unit/membitmap.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/path_to_regex_no_options.cpp b/test/util/unit/path_to_regex_no_options.cpp index a0ebdd0cc9..ea09777cee 100644 --- a/test/util/unit/path_to_regex_no_options.cpp +++ b/test/util/unit/path_to_regex_no_options.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/path_to_regex_options.cpp b/test/util/unit/path_to_regex_options.cpp index db4d4eb2be..5b163760ff 100644 --- a/test/util/unit/path_to_regex_options.cpp +++ b/test/util/unit/path_to_regex_options.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/path_to_regex_parse.cpp b/test/util/unit/path_to_regex_parse.cpp index 4b2f9bc449..27554cca76 100644 --- a/test/util/unit/path_to_regex_parse.cpp +++ b/test/util/unit/path_to_regex_parse.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/percent_encoding_test.cpp b/test/util/unit/percent_encoding_test.cpp index 8e9deee2f9..344e08652b 100644 --- a/test/util/unit/percent_encoding_test.cpp +++ b/test/util/unit/percent_encoding_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/pmr_alloc_test.cpp b/test/util/unit/pmr_alloc_test.cpp index 1f537bc0b3..0975f50fea 100644 --- a/test/util/unit/pmr_alloc_test.cpp +++ b/test/util/unit/pmr_alloc_test.cpp @@ -1,18 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2018 IncludeOS AS, Oslo, Norway -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #define DEBUG_UNIT diff --git a/test/util/unit/ringbuffer.cpp b/test/util/unit/ringbuffer.cpp index ad3b08aa05..db4ae1bd5c 100644 --- a/test/util/unit/ringbuffer.cpp +++ b/test/util/unit/ringbuffer.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/sha1.cpp b/test/util/unit/sha1.cpp index 577d6b467d..ed7975e8a6 100644 --- a/test/util/unit/sha1.cpp +++ b/test/util/unit/sha1.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/statman.cpp b/test/util/unit/statman.cpp index b792e48b18..b48ffa59e1 100644 --- a/test/util/unit/statman.cpp +++ b/test/util/unit/statman.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/syslog_facility_test.cpp b/test/util/unit/syslog_facility_test.cpp index 81c8666fc6..9e84eee188 100644 --- a/test/util/unit/syslog_facility_test.cpp +++ b/test/util/unit/syslog_facility_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/syslogd_test.cpp b/test/util/unit/syslogd_test.cpp index b6455c240b..747b3979af 100644 --- a/test/util/unit/syslogd_test.cpp +++ b/test/util/unit/syslogd_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/tar_test.cpp b/test/util/unit/tar_test.cpp index cab8be1c40..04fc208cb6 100644 --- a/test/util/unit/tar_test.cpp +++ b/test/util/unit/tar_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/test/util/unit/uri_test.cpp b/test/util/unit/uri_test.cpp index 41ec9f7045..d0005cbfad 100644 --- a/test/util/unit/uri_test.cpp +++ b/test/util/unit/uri_test.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2016 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include diff --git a/userspace/src/config.cpp b/userspace/src/config.cpp index 58b0b3cbe2..8ab7d6b73d 100644 --- a/userspace/src/config.cpp +++ b/userspace/src/config.cpp @@ -1,19 +1,3 @@ -// This file is a part of the IncludeOS unikernel - www.includeos.org -// -// Copyright 2017 Oslo and Akershus University College of Applied Sciences -// and Alfred Bratterud -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #include #include From 928587930a9b84628bd3c48120621d65581e603a Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Mon, 22 Jul 2019 20:34:04 +0200 Subject: [PATCH 29/81] x86: Silence warnings and disable verbose multiboot --- src/kernel/multiboot.cpp | 4 ++-- src/platform/x86_pc/apic_revenant.cpp | 4 ++-- src/platform/x86_pc/platform.cpp | 3 +-- src/platform/x86_pc/x2apic.hpp | 2 +- src/platform/x86_pc/xapic.hpp | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/kernel/multiboot.cpp b/src/kernel/multiboot.cpp index df8d1e76f4..a424fdb6d5 100644 --- a/src/kernel/multiboot.cpp +++ b/src/kernel/multiboot.cpp @@ -6,8 +6,8 @@ #include #include -#define DEBUG_MULTIBOOT -#if defined(DEBUG_MULTIBOOT) +//#define DEBUG_MULTIBOOT +#ifdef DEBUG_MULTIBOOT #undef debug #define debug(X,...) kprintf(X,##__VA_ARGS__); #define MYINFO(X,...) kprintf("" X "\n", ##__VA_ARGS__) diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index bbc564f2d2..9aa407e73c 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -88,8 +88,8 @@ void revenant_main(int cpu) SMP::global_unlock(); // initialize exceptions before asserts x86::idt_initialize_for_cpu(cpu); - assert(cpu == SMP::cpu_id()); - assert(stack >= this_stack_end && stack < this_stack); + Expects(cpu == SMP::cpu_id()); + Expects(stack >= this_stack_end && stack < this_stack); #ifdef ARCH_x86_64 // interrupt stack tables diff --git a/src/platform/x86_pc/platform.cpp b/src/platform/x86_pc/platform.cpp index e9f504d7f9..064e14f5c2 100644 --- a/src/platform/x86_pc/platform.cpp +++ b/src/platform/x86_pc/platform.cpp @@ -25,8 +25,6 @@ struct alignas(64) smp_table }; static SMP::Array cpu_tables; -static util::KHz cpu_freq_{}; - namespace x86 { void initialize_cpu_tables_for_cpu(int cpu); void register_deactivation_function(delegate); @@ -91,6 +89,7 @@ void __platform_init() kernel::state().block_drivers_ready = true; // Initialize network devices hw::PCI_manager::init_devices(PCI::NIC); + // Print registered devices os::machine().print_devices(); } diff --git a/src/platform/x86_pc/x2apic.hpp b/src/platform/x86_pc/x2apic.hpp index 9dbd2d0a3f..916a66b4d7 100644 --- a/src/platform/x86_pc/x2apic.hpp +++ b/src/platform/x86_pc/x2apic.hpp @@ -50,7 +50,7 @@ namespace x86 { CPU::write_msr(IA32_APIC_BASE_MSR, base_msr, 0); // verify that x2APIC is online uint64_t verify = CPU::read_msr(IA32_APIC_BASE_MSR); - assert(verify & MSR_ENABLE_X2APIC); + Expects(verify & MSR_ENABLE_X2APIC); INFO2("APIC id: %x ver: %x", get_id(), version()); } diff --git a/src/platform/x86_pc/xapic.hpp b/src/platform/x86_pc/xapic.hpp index addf4e5fb0..c240c1dbeb 100644 --- a/src/platform/x86_pc/xapic.hpp +++ b/src/platform/x86_pc/xapic.hpp @@ -58,7 +58,7 @@ namespace x86 { CPU::write_msr(IA32_APIC_BASE_MSR, this->base_msr); // verify that xAPIC is online uint64_t verify = CPU::read_msr(IA32_APIC_BASE_MSR); - assert(verify & MSR_ENABLE_XAPIC); + Expects(verify & MSR_ENABLE_XAPIC); INFO2("ID: %x Ver: %x", get_id(), version()); } From 7f6c6f068e52f6ba228cccd3dadac03fac5e0922 Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Mon, 22 Jul 2019 20:34:52 +0200 Subject: [PATCH 30/81] liveupdate: Fix build issue when missing ARCH --- lib/LiveUpdate/CMakeLists.txt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/LiveUpdate/CMakeLists.txt b/lib/LiveUpdate/CMakeLists.txt index 7ae600dde3..1842bdc928 100644 --- a/lib/LiveUpdate/CMakeLists.txt +++ b/lib/LiveUpdate/CMakeLists.txt @@ -1,13 +1,15 @@ cmake_minimum_required(VERSION 2.8.9) - set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) - project(includeos C CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +if (NOT ARCH) + set(ARCH ${CMAKE_SYSTEM_PROCESSOR}) +endif() + if (NOT CMAKE_TESTING_ENABLED) if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) include(${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) @@ -41,12 +43,6 @@ include_directories( ../../src/include ) - - -if (NOT ARCH) - set(ARCH CMAKE_SYSTEM_PROCESSOR) -endif() - #do we need all of this*? add_definitions(-DARCH_${ARCH}) add_definitions(-DARCH="${ARCH}") From 6dc5289d55ef195bc0da2edc13b074e91070646a Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Mon, 22 Jul 2019 22:37:56 +0200 Subject: [PATCH 31/81] kernel: Improvements, fixes, utilize profiling solution --- api/profile | 16 +++++- src/kernel/kernel.cpp | 56 +++++++++----------- src/kernel/scoped_profiler.cpp | 38 +++++++------ src/platform/x86_pc/init_libc.cpp | 14 +++++ src/platform/x86_pc/kernel_start.cpp | 9 +++- src/platform/x86_pc/os.cpp | 41 +++++++++------ src/platform/x86_pc/platform.cpp | 79 +++++++++++++++++++++------- 7 files changed, 163 insertions(+), 90 deletions(-) diff --git a/api/profile b/api/profile index 759cd14e6e..b0d8b7055f 100644 --- a/api/profile +++ b/api/profile @@ -10,6 +10,14 @@ #include #include +#ifdef ENABLE_PROFILERS +#define __PCONCAT(x,y) x ## y +#define PCONCAT(x,y) __PCONCAT(x, y) +#define PROFILE(name) ScopedProfiler PCONCAT(sp, __COUNTER__){name}; +#else +#define PROFILE(name) /* name */ +#endif + struct Sample { uint32_t samp; // samples void* addr; // function address @@ -115,8 +123,12 @@ class ScopedProfiler const char* name; std::string function_name; unsigned num_samples; - uint64_t cycles_average; - uint64_t nanos_start; + uint64_t cycles_total; + uint64_t ticks_start; + + uint64_t cycles_average() const noexcept { + return this->cycles_total / this->num_samples; + } }; diff --git a/src/kernel/kernel.cpp b/src/kernel/kernel.cpp index ce355cd2b5..5281b5bd95 100644 --- a/src/kernel/kernel.cpp +++ b/src/kernel/kernel.cpp @@ -9,14 +9,8 @@ #include #include #define MYINFO(X,...) INFO("Kernel", X, ##__VA_ARGS__) - //#define ENABLE_PROFILERS -#ifdef ENABLE_PROFILERS #include -#define PROFILE(name) ScopedProfiler __CONCAT(sp, __COUNTER__){name}; -#else -#define PROFILE(name) /* name */ -#endif using namespace util; @@ -83,44 +77,43 @@ void kernel::post_start() // Enable timestamps (if present) kernel::state().timestamps_ready = true; - // LiveUpdate needs some initialization, although only if present - kernel::setup_liveupdate(); - - // Initialize the system log if plugin is present. - // Dependent on the liveupdate location being set - SystemLog::initialize(); + { + PROFILE("LiveUpdate and SystemLog"); + // LiveUpdate needs some initialization, although only if present + kernel::setup_liveupdate(); - MYINFO("Initializing RNG"); - PROFILE("RNG init"); - RNG::get().init(); + // Initialize the system log if plugin is present. + // Dependent on the liveupdate location being set + SystemLog::initialize(); + } // Seed rand with 32 bits from RNG srand(rng_extract_uint32()); -#ifndef __MACH__ // Custom initialization functions MYINFO("Initializing plugins"); - kernel::run_ctors(&__plugin_ctors_start, &__plugin_ctors_end); -#endif + { + PROFILE("Plugin constructors"); + kernel::run_ctors(&__plugin_ctors_start, &__plugin_ctors_end); - // Run plugins - PROFILE("Plugins init"); - for (auto plugin : plugins) { - INFO2("* Initializing %s", plugin.name); - plugin.func(); + // Run plugins + for (auto plugin : plugins) { + INFO2("* Initializing %s", plugin.name); + plugin.func(); + } } MYINFO("Running service constructors"); FILLINE('-'); - // the boot sequence is over when we get to plugins/Service::start - kernel::state().boot_sequence_passed = true; + { + PROFILE("Service constructors"); + // the boot sequence is over when we get to plugins/Service::start + kernel::state().boot_sequence_passed = true; -#ifndef __MACH__ // Run service constructors - kernel::run_ctors(&__service_ctors_start, &__service_ctors_end); -#endif + kernel::run_ctors(&__service_ctors_start, &__service_ctors_end); + } - PROFILE("Service::start"); // begin service start FILLINE('='); printf(" IncludeOS %s (%s / %u-bit)\n", @@ -149,7 +142,10 @@ void kernel::post_start() } // service program start - Service::start(); + { + PROFILE("Service::start"); + Service::start(); + } } void os::add_stdout(os::print_func func) diff --git a/src/kernel/scoped_profiler.cpp b/src/kernel/scoped_profiler.cpp index 5131ed3d59..36a29497ce 100644 --- a/src/kernel/scoped_profiler.cpp +++ b/src/kernel/scoped_profiler.cpp @@ -3,16 +3,17 @@ #include #include #include -//#include #include #include +#include #include #include #include #include decltype(ScopedProfiler::guard) ScopedProfiler::guard = Guard::NOT_SELECTED; -decltype(ScopedProfiler::entries) ScopedProfiler::entries = {}; +decltype(ScopedProfiler::entries) ScopedProfiler::entries; +static uint64_t base_ticks = 0; void ScopedProfiler::record() { @@ -52,6 +53,7 @@ void ScopedProfiler::record() "rdtsc\n\t" : "=A" (tick_start)); } + if (base_ticks == 0) base_ticks = tick_start; } ScopedProfiler::~ScopedProfiler() @@ -75,13 +77,7 @@ ScopedProfiler::~ScopedProfiler() : "=A" (tick)); } - uint64_t nanos_start = RTC::nanos_now(); - - static uint64_t base_nanos = 0; - if (base_nanos == 0) base_nanos = nanos_start; - nanos_start -= base_nanos; - - uint64_t cycles = tick - tick_start; + const uint64_t cycles = tick - this->tick_start; auto function_address = __builtin_return_address(0); // Find an entry that matches this function_address @@ -90,7 +86,7 @@ ScopedProfiler::~ScopedProfiler() if (entry.function_address == function_address) { // Update the entry - entry.cycles_average = ((entry.cycles_average * entry.num_samples) + cycles) / (entry.num_samples + 1); + entry.cycles_total += cycles; entry.num_samples += 1; return; } @@ -101,16 +97,16 @@ ScopedProfiler::~ScopedProfiler() if (entry.function_address == 0) { // Use this unused entry - char symbol_buffer[4096]; + char symbol_buffer[8192]; const auto symbols = Elf::safe_resolve_symbol(function_address, symbol_buffer, sizeof(symbol_buffer)); entry.name = this->name; entry.function_address = function_address; entry.function_name = symbols.name; - entry.cycles_average = cycles; - entry.nanos_start = nanos_start; - entry.num_samples = 1; + entry.num_samples = 1; + entry.cycles_total = cycles; + entry.ticks_start = this->tick_start; return; } } @@ -147,23 +143,25 @@ std::string ScopedProfiler::get_statistics(bool sorted) // Make sure to keep unused entries last (only sort used entries) std::sort(entries.begin(), entries.begin() + num_entries, [](const Entry& a, const Entry& b) { - return a.cycles_average > b.cycles_average; + return a.cycles_average() < b.cycles_average(); }); } // Add each entry ss.setf(std::ios_base::fixed); - for (auto i = 0u; i < num_entries; i++) + for (unsigned i = 0; i < num_entries; i++) { + using namespace util; const auto& entry = entries[i]; - double timst = entry.nanos_start / 1.0e6; + const uint64_t tickdiff = entry.ticks_start - base_ticks; + double timst = ((double) tickdiff / Hz(os::cpu_freq()).count()); ss.width(10); - ss << timst << " ms | "; + ss << timst * 1000.0 << " ms | "; - double micros = entry.cycles_average / os::cpu_freq().count(); + double micros = (double) entry.cycles_average() / Hz(os::cpu_freq()).count(); ss.width(10); - ss << micros / 1000.0 << " ms | "; + ss << micros * 1000.0 << " ms | "; ss.width(7); ss << entry.num_samples << " | "; diff --git a/src/platform/x86_pc/init_libc.cpp b/src/platform/x86_pc/init_libc.cpp index c6e5fb10ac..d3da48041c 100644 --- a/src/platform/x86_pc/init_libc.cpp +++ b/src/platform/x86_pc/init_libc.cpp @@ -10,6 +10,11 @@ #include #include #include +//#define ENABLE_PROFILERS +#include +#ifdef ENABLE_PROFILERS +static ScopedProfiler* pinit = nullptr; +#endif //#define KERN_DEBUG 1 #ifdef KERN_DEBUG @@ -35,6 +40,11 @@ static void global_ctor_test(){ extern "C" int kernel_main(int, char * *, char * *) { +#ifdef ENABLE_PROFILERS + delete pinit; +#endif + { + PROFILE("Kernel main"); PRATTLE(" libc initialization complete\n"); LL_ASSERT(global_ctors_ok == 42); kernel::state().libc_initialized = true; @@ -64,6 +74,7 @@ int kernel_main(int, char * *, char * *) PRATTLE(" post start\n"); // Initialize common subsystems and call Service::start kernel::post_start(); + } // Starting event loop from here allows us to profile OS::start os::event_loop(); @@ -165,6 +176,9 @@ namespace x86 // GDB_ENTRY; PRATTLE("* Starting libc initialization\n"); +#ifdef ENABLE_PROFILERS + pinit = new ScopedProfiler("Init libc + gconstr"); +#endif __libc_start_main(kernel_main, argc, argv.data()); } } diff --git a/src/platform/x86_pc/kernel_start.cpp b/src/platform/x86_pc/kernel_start.cpp index 0ac0eb66b5..8ce7546068 100644 --- a/src/platform/x86_pc/kernel_start.cpp +++ b/src/platform/x86_pc/kernel_start.cpp @@ -8,6 +8,8 @@ #include "idt.hpp" #include "init_libc.hpp" +//#define ENABLE_PROFILERS +#include //#define KERN_DEBUG 1 #ifdef KERN_DEBUG @@ -85,8 +87,11 @@ void kernel_start(uint32_t magic, uint32_t addr) // Begin portable HAL initialization __machine->init(); - // TODO: Move more stuff into Machine::init - RNG::init(); + { + PROFILE("RNG init") + // TODO: Move more stuff into Machine::init + RNG::init(); + } PRATTLE("* Init syscalls\n"); _init_syscalls(); diff --git a/src/platform/x86_pc/os.cpp b/src/platform/x86_pc/os.cpp index 3651c43c3d..d548305d66 100644 --- a/src/platform/x86_pc/os.cpp +++ b/src/platform/x86_pc/os.cpp @@ -11,16 +11,9 @@ #include #include #include -#include #include "cmos.hpp" - //#define ENABLE_PROFILERS -#ifdef ENABLE_PROFILERS #include -#define PROFILE(name) ScopedProfiler __CONCAT(sp, __COUNTER__){name}; -#else -#define PROFILE(name) /* name */ -#endif extern "C" void* get_cpu_esp(); extern uintptr_t _start; @@ -90,10 +83,13 @@ void kernel::start(uint32_t boot_magic, uint32_t boot_addr) MYINFO("Boot magic: 0x%x, addr: 0x%x", boot_magic, boot_addr); // PAGING // - PROFILE("Enable paging"); - __arch_init_paging(); + { + PROFILE("Enable paging"); + __arch_init_paging(); + } // BOOT METHOD // + { PROFILE("Multiboot / legacy"); // Detect memory limits etc. depending on boot type if (boot_magic == MULTIBOOT_BOOTLOADER_MAGIC) { @@ -106,6 +102,7 @@ void kernel::start(uint32_t boot_magic, uint32_t boot_addr) kernel::legacy_boot(); } assert(kernel::memory_end() != 0); + } MYINFO("Total memory detected as %s ", util::Byte_r(kernel::memory_end()).to_string().c_str()); @@ -113,12 +110,15 @@ void kernel::start(uint32_t boot_magic, uint32_t boot_addr) kernel::state().heap_max = kernel::memory_end() - 1; assert(kernel::heap_begin() != 0x0 and kernel::heap_max() != 0x0); - PROFILE("Memory map"); // Assign memory ranges used by the kernel auto& memmap = os::mem::vmmap(); INFO2("Assigning fixed memory ranges (Memory map)"); + // protect symbols early on (the calculation is complex so not doing it here) - elf_protect_symbol_areas(); + { + PROFILE("Protect symbols"); + elf_protect_symbol_areas(); + } #if defined(ARCH_x86_64) // protect the basic pagetable used by LiveUpdate and any other @@ -138,15 +138,22 @@ void kernel::start(uint32_t boot_magic, uint32_t boot_addr) "Dynamic memory", kernel::heap_usage }); MYINFO("Virtual memory map"); - for (const auto& entry : memmap) - INFO2("%s", entry.second.to_string().c_str()); + { + PROFILE("Print memory map"); + for (const auto& entry : memmap) + INFO2("%s", entry.second.to_string().c_str()); + } - PROFILE("Platform init"); - __platform_init(); + { + PROFILE("Platform init"); + __platform_init(); + } - PROFILE("RTC init"); // Realtime/monotonic clock - RTC::init(); + { + PROFILE("RTC init"); + RTC::init(); + } } extern void __arch_poweroff(); diff --git a/src/platform/x86_pc/platform.cpp b/src/platform/x86_pc/platform.cpp index 064e14f5c2..87743f3e8f 100644 --- a/src/platform/x86_pc/platform.cpp +++ b/src/platform/x86_pc/platform.cpp @@ -12,6 +12,8 @@ #include #include #include +//#define ENABLE_PROFILERS +#include #define MYINFO(X,...) INFO("x86", X, ##__VA_ARGS__) extern "C" char* get_cpu_esp(); @@ -30,42 +32,69 @@ namespace x86 { void register_deactivation_function(delegate); } - void __platform_init() { // read ACPI tables - x86::ACPI::init(); + { + PROFILE("ACPI init"); + x86::ACPI::init(); + } // read SMBIOS tables - x86::SMBIOS::init(); + { + PROFILE("SMBIOS init"); + x86::SMBIOS::init(); + } // enable fs/gs for local APIC INFO("x86", "Setting up GDT, TLS, IST"); //initialize_gdt_for_cpu(0); #ifdef ARCH_x86_64 // setup Interrupt Stack Table - x86::ist_initialize_for_cpu(0, 0x9D3F0); + { + PROFILE("IST amd64"); + x86::ist_initialize_for_cpu(0, 0x9D3F0); + } #endif INFO("x86", "Initializing CPU 0"); - x86::initialize_cpu_tables_for_cpu(0); - Events::get(0).init_local(); + { + PROFILE("CPU tables x86"); + x86::initialize_cpu_tables_for_cpu(0); + } + + { + PROFILE("Events init"); + Events::get(0).init_local(); + } // setup APIC, APIC timer, SMP etc. - x86::APIC::init(); + { + PROFILE("APIC init"); + x86::APIC::init(); + } // enable interrupts MYINFO("Enabling interrupts"); - asm volatile("sti"); + { + PROFILE("Enable interrupts"); + asm volatile("sti"); + } // initialize and start registered APs found in ACPI-tables #ifdef INCLUDEOS_SMP_ENABLE +{ + PROFILE("SMP init"); x86::init_SMP(); +} #endif // Setup kernel clocks MYINFO("Setting up kernel clock sources"); - x86::Clocks::init(); + { + PROFILE("Clocks init (x86)"); + x86::Clocks::init(); + } if (os::cpu_freq().count() <= 0.0) { kernel::state().cpu_khz = x86::Clocks::get_khz(); @@ -75,20 +104,32 @@ void __platform_init() // Note: CPU freq must be known before we can start timer system // Initialize APIC timers and timer systems // Deferred call to Service::ready() when calibration is complete - x86::APIC_Timer::calibrate(); + { + PROFILE("APIC timer calibrate"); + x86::APIC_Timer::calibrate(); + } INFO2("Initializing drivers"); - extern kernel::ctor_t __driver_ctors_start; - extern kernel::ctor_t __driver_ctors_end; - kernel::run_ctors(&__driver_ctors_start, &__driver_ctors_end); + { + PROFILE("Initialize drivers"); + extern kernel::ctor_t __driver_ctors_start; + extern kernel::ctor_t __driver_ctors_end; + kernel::run_ctors(&__driver_ctors_start, &__driver_ctors_end); + } // Scan PCI buses - hw::PCI_manager::init(); - // Initialize storage devices - hw::PCI_manager::init_devices(PCI::STORAGE); - kernel::state().block_drivers_ready = true; - // Initialize network devices - hw::PCI_manager::init_devices(PCI::NIC); + { + PROFILE("PCI bus scan"); + hw::PCI_manager::init(); + } + { + PROFILE("PCI device init") + // Initialize storage devices + hw::PCI_manager::init_devices(PCI::STORAGE); + kernel::state().block_drivers_ready = true; + // Initialize network devices + hw::PCI_manager::init_devices(PCI::NIC); + } // Print registered devices os::machine().print_devices(); From f4a8367827f68c27e7d838560fe26cd02bd2c23f Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Mon, 22 Jul 2019 22:38:46 +0200 Subject: [PATCH 32/81] x86: Run less rounds on RNG init --- src/platform/x86_pc/rand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/x86_pc/rand.cpp b/src/platform/x86_pc/rand.cpp index f24d32e116..05ed9854b2 100644 --- a/src/platform/x86_pc/rand.cpp +++ b/src/platform/x86_pc/rand.cpp @@ -31,7 +31,7 @@ void RNG::init() return; } #ifndef PLATFORM_x86_solo5 - rng_reseed_init(fallback_entropy, 64*16); + rng_reseed_init(fallback_entropy, 10); return; #endif assert(0 && "No randomness fallback"); From b99da8e02e9b6970d67e759d16c4684c0c783584 Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Mon, 22 Jul 2019 22:43:58 +0200 Subject: [PATCH 33/81] cmake: Add option for enabling startup profiling --- CMakeLists.txt | 1 + src/CMakeLists.txt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f9fdf03e9..c82d31ac1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) project (includeos C CXX) option(SMP "Compile with SMP (multiprocessing)" OFF) +option(PROFILE "Compile with startup profilers" OFF) #Are we executing cmake from conan or locally #if locally then pull the deps from conanfile.py diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4d04b199c3..7e5a20601d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,9 @@ add_definitions(-DARCH="${ARCH}") if (SMP) add_definitions(-DINCLUDEOS_SMP_ENABLE) endif() +if (PROFILE) + add_definitions(-DENABLE_PROFILERS) +endif() include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../api From ab1069b4f35b844a7359551e3abc32ae628384f8 Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Tue, 23 Jul 2019 10:21:43 +0200 Subject: [PATCH 34/81] x86: Make fast kernel start more reliable --- src/arch/x86_64/arch_start.asm | 14 ++++++++------ test/kernel/integration/LiveUpdate/service.cpp | 3 +++ test/kernel/integration/LiveUpdate/test_boot.cpp | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/arch/x86_64/arch_start.asm b/src/arch/x86_64/arch_start.asm index 8e3ad42ccc..c0c187a449 100644 --- a/src/arch/x86_64/arch_start.asm +++ b/src/arch/x86_64/arch_start.asm @@ -1,5 +1,6 @@ global __arch_start:function global __gdt64_base_pointer +global __startup_was_fast global fast_kernel_start:function extern kernel_start extern __multiboot_magic @@ -119,6 +120,7 @@ long_mode: mov gs, cx mov ss, cx +resume_startup: ;; set up new stack for 64-bit extern _ELF_START_ push rsp @@ -150,12 +152,10 @@ long_mode: ;; this function can be jumped to directly from hotswap fast_kernel_start: - and rsp, -16 - mov edi, eax - mov esi, ebx - call kernel_start - cli - hlt + mov DWORD[__multiboot_magic], eax + mov DWORD[__multiboot_addr], ebx + mov WORD [__startup_was_fast], 1 + jmp resume_startup SECTION .data GDT64: @@ -187,6 +187,8 @@ __gdt64_base_pointer: SECTION .rodata tls_table: dq tls_table +__startup_was_fast: + dw 0 SECTION .bss smp_table: resw 8 diff --git a/test/kernel/integration/LiveUpdate/service.cpp b/test/kernel/integration/LiveUpdate/service.cpp index 8e6a2c7fc2..6cdf7556d8 100644 --- a/test/kernel/integration/LiveUpdate/service.cpp +++ b/test/kernel/integration/LiveUpdate/service.cpp @@ -1,6 +1,7 @@ #include #include +#include #include #include "liu.hpp" @@ -9,6 +10,8 @@ extern storage_func_t begin_test_boot(); void Service::start() { + auto prof = ScopedProfiler::get_statistics(false); + printf("%s\n", prof.c_str()); #ifdef BENCHMARK_MODE extern bool LIVEUPDATE_USE_CHEKSUMS; LIVEUPDATE_USE_CHEKSUMS = false; diff --git a/test/kernel/integration/LiveUpdate/test_boot.cpp b/test/kernel/integration/LiveUpdate/test_boot.cpp index fe2953b1cc..cf3528b5e2 100644 --- a/test/kernel/integration/LiveUpdate/test_boot.cpp +++ b/test/kernel/integration/LiveUpdate/test_boot.cpp @@ -92,6 +92,8 @@ LiveUpdate::storage_func begin_test_boot() using namespace std::chrono; Timers::oneshot(5ms,[] (int) { + extern int16_t __startup_was_fast; + printf("Startup was fast: %d\n", __startup_was_fast); printf("SUCCESS\n"); SystemLog::print_to(os::default_stdout); }); From bffe869e4d603c64ae48e2aef8f5453fdc81672a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Tue, 23 Jul 2019 11:15:52 +0200 Subject: [PATCH 35/81] Set theme jekyll-theme-cayman --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000000..c4192631f2 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file From 1a342bbac40b3514ce3773613ed845aa7ee85076 Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Tue, 23 Jul 2019 23:52:11 +0200 Subject: [PATCH 36/81] liveupdate: Refactor to solve performance issues, add profiling --- api/detail/os.hpp | 4 +- api/profile | 2 +- cmake/os.cmake | 4 + lib/LiveUpdate/CMakeLists.txt | 5 ++ lib/LiveUpdate/include/liveupdate.hpp | 12 ++- lib/LiveUpdate/include/storage.hpp | 2 +- lib/LiveUpdate/src/resume.cpp | 12 ++- lib/LiveUpdate/src/rollback.cpp | 13 ++- lib/LiveUpdate/src/storage.cpp | 6 +- lib/LiveUpdate/src/update.cpp | 88 +++++++++++++------ src/kernel/scoped_profiler.cpp | 8 +- src/plugins/terminal.cpp | 2 +- .../integration/LiveUpdate/CMakeLists.txt | 2 +- test/kernel/integration/LiveUpdate/manual.sh | 2 +- .../kernel/integration/LiveUpdate/service.cpp | 6 +- .../integration/LiveUpdate/test_boot.cpp | 39 ++++---- test/kernel/integration/LiveUpdate/vm.json | 2 +- 17 files changed, 124 insertions(+), 85 deletions(-) diff --git a/api/detail/os.hpp b/api/detail/os.hpp index ed8ca8d3cd..8103fc9fad 100644 --- a/api/detail/os.hpp +++ b/api/detail/os.hpp @@ -1,5 +1,3 @@ - -#include #include #include @@ -9,5 +7,5 @@ inline uint64_t os::cycles_since_boot() noexcept } inline uint64_t os::nanos_since_boot() noexcept { - return (cycles_since_boot() * 1e6) / os::cpu_freq().count(); + return cycles_since_boot() / util::GHz(os::cpu_freq()).count(); } diff --git a/api/profile b/api/profile index b0d8b7055f..df7bb2b749 100644 --- a/api/profile +++ b/api/profile @@ -143,7 +143,7 @@ class ScopedProfiler // Use plain array for performance (cache locality) // Increase size if there is a need to profile more than 64 scopes - static std::array entries; + static std::array entries; }; struct HeapDiag diff --git a/cmake/os.cmake b/cmake/os.cmake index c43c8ce73d..1778a7d84e 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -12,6 +12,7 @@ else() set(STRIP_CMD true) endif() option(ELF_SYMBOLS "Enable full backtrace" ON) +option(PROFILE "Compile with startup profilers" OFF) set(LIVEUPDATE_MB 0 CACHE STRING "Liveupdate size in MB") @@ -155,6 +156,9 @@ function(os_add_executable TARGET NAME) target_compile_options(${ELF_TARGET} PRIVATE -Wall -Wextra -fstack-protector) target_compile_options(${ELF_TARGET} PRIVATE -ffunction-sections -fdata-sections) + if (PROFILE) + target_compile_definitions(${ELF_TARGET} PRIVATE ENABLE_PROFILERS=1) + endif() set_target_properties(${ELF_TARGET} PROPERTIES LINK_FLAGS ${LDFLAGS}) conan_find_libraries_abs_path("${CONAN_LIBS}" "${CONAN_LIB_DIRS}" LIBRARIES) diff --git a/lib/LiveUpdate/CMakeLists.txt b/lib/LiveUpdate/CMakeLists.txt index 1842bdc928..93f726fbf7 100644 --- a/lib/LiveUpdate/CMakeLists.txt +++ b/lib/LiveUpdate/CMakeLists.txt @@ -6,6 +6,11 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +option(PROFILE "Compile with startup profilers" OFF) +if (PROFILE) + add_definitions(-DENABLE_PROFILERS) +endif() + if (NOT ARCH) set(ARCH ${CMAKE_SYSTEM_PROCESSOR}) endif() diff --git a/lib/LiveUpdate/include/liveupdate.hpp b/lib/LiveUpdate/include/liveupdate.hpp index 8e02631977..a0b301c977 100644 --- a/lib/LiveUpdate/include/liveupdate.hpp +++ b/lib/LiveUpdate/include/liveupdate.hpp @@ -19,7 +19,7 @@ namespace liu { struct Storage; struct Restore; -typedef std::vector buffer_t; +typedef std::vector buffer_t; /** * The beginning and the end of the LiveUpdate process is the exec() and resume() functions. @@ -33,7 +33,7 @@ struct LiveUpdate { // The buffer_t parameter is the update blob (the new kernel) and can be null. // If the parameter is null, you can assume that it's currently not a live update. - typedef delegate storage_func; + typedef delegate storage_func; typedef delegate resume_func; // Register a function to be called when serialization phase begins @@ -44,8 +44,10 @@ struct LiveUpdate // Start a live update process, storing all user-defined data // If no storage functions are registered no state will be saved // If @storage_area is nullptr (default) it will be retrieved from OS - static void exec(const buffer_t& blob, void* storage_area = nullptr); + static void exec(const uint8_t* blob, size_t size, void* storage_area = nullptr); // Same as above, but including the partition [@key, func] + static void exec(const uint8_t* blob, size_t size, std::string key, storage_func func); + // Same as above, but using buffer_t instead of pointer, length static void exec(const buffer_t& blob, std::string key, storage_func func); // In the event that LiveUpdate::exec() fails, @@ -56,6 +58,10 @@ struct LiveUpdate // Throws exception if process or sanity checks fail static buffer_t store(); + // Returns the location and size of the executable during exec() + // To be used from inside the store callbacks to optionally save the binary + static std::pair binary_blob() noexcept; + // Returns true if there is stored data from before. // It performs an extensive validation process to make sure the data is // complete and consistent diff --git a/lib/LiveUpdate/include/storage.hpp b/lib/LiveUpdate/include/storage.hpp index 3ad194ecce..3c5fd0227d 100644 --- a/lib/LiveUpdate/include/storage.hpp +++ b/lib/LiveUpdate/include/storage.hpp @@ -108,7 +108,7 @@ struct storage_header void add_marker(uint16_t id); void add_int (uint16_t id, int value); void add_string(uint16_t id, const std::string& data); - void add_buffer(uint16_t id, const char*, int); + void add_buffer(uint16_t id, const void*, int); storage_entry& add_struct(int16_t type, uint16_t id, int length); storage_entry& add_struct(int16_t type, uint16_t id, construct_func); void add_vector(uint16_t, const void*, size_t cnt, size_t esize); diff --git a/lib/LiveUpdate/src/resume.cpp b/lib/LiveUpdate/src/resume.cpp index 4f01a3ea53..f349cbcd24 100644 --- a/lib/LiveUpdate/src/resume.cpp +++ b/lib/LiveUpdate/src/resume.cpp @@ -7,6 +7,7 @@ #include #include +#include #include "storage.hpp" #include "serialize_tcp.hpp" #include @@ -70,6 +71,7 @@ void LiveUpdate::resume_from_heap(void* location, std::string key, LiveUpdate::r bool resume_begin(storage_header& storage, std::string key, LiveUpdate::resume_func func) { + PROFILE("LiveUpdate: Resume partition"); if (key.empty()) throw std::length_error("LiveUpdate partition key cannot be an empty string"); @@ -81,7 +83,10 @@ bool resume_begin(storage_header& storage, std::string key, LiveUpdate::resume_f // resume wrapper Restore wrapper(storage.begin(p)); // use registered functions when we can, otherwise, use normal - func(wrapper); + { + PROFILE("LiveUpdate: Resume callback"); + func(wrapper); + } // wake all the slumbering IP stacks serialized_tcp::wakeup_ip_networks(); @@ -142,10 +147,9 @@ std::string Restore::as_string() const } buffer_t Restore::as_buffer() const { + PROFILE("LiveUpdate: Restore::as_buffer"); if (ent->type == TYPE_BUFFER) { - buffer_t buffer; - buffer.assign(ent->data(), ent->data() + ent->len); - return buffer; + return buffer_t{ent->data(), ent->data() + ent->len}; } throw std::runtime_error("LiveUpdate: Restore::as_buffer() encountered incorrect type " + std::to_string(ent->type)); } diff --git a/lib/LiveUpdate/src/rollback.cpp b/lib/LiveUpdate/src/rollback.cpp index e9dc21f10f..855d5f77fb 100644 --- a/lib/LiveUpdate/src/rollback.cpp +++ b/lib/LiveUpdate/src/rollback.cpp @@ -10,8 +10,8 @@ extern uintptr_t heap_end; namespace liu { - static const char* rollback_data; - static size_t rollback_len; + static const uint8_t* rollback_data; + static size_t rollback_len; void LiveUpdate::rollback_now(const char* reason) { @@ -21,9 +21,8 @@ void LiveUpdate::rollback_now(const char* reason) rollback_data, (uint32_t) rollback_len, reason); try { - buffer_t vec(rollback_data, rollback_data + rollback_len); // run live update process - LiveUpdate::exec(vec); + LiveUpdate::exec(rollback_data, rollback_len); } catch (std::exception& err) { @@ -39,14 +38,14 @@ void LiveUpdate::rollback_now(const char* reason) __builtin_unreachable(); } -const std::pair get_rollback_location() +const std::pair get_rollback_location() { return {rollback_data, rollback_len}; } void LiveUpdate::set_rollback_blob(const void* buffer, size_t len) noexcept { - rollback_data = (const char*) buffer; + rollback_data = (const uint8_t*) buffer; rollback_len = len; os::on_panic(LiveUpdate::rollback_now); } @@ -60,7 +59,7 @@ bool LiveUpdate::has_rollback_blob() noexcept void softreset_service_handler(const void* opaque, size_t length) { // make deep copy? - auto* data = new char[length]; + auto* data = new uint8_t[length]; memcpy(data, opaque, length); liu::rollback_data = data; liu::rollback_len = length; diff --git a/lib/LiveUpdate/src/storage.cpp b/lib/LiveUpdate/src/storage.cpp index f2b876681a..1bd35e3e60 100644 --- a/lib/LiveUpdate/src/storage.cpp +++ b/lib/LiveUpdate/src/storage.cpp @@ -44,13 +44,13 @@ void storage_header::add_string(uint16_t id, const std::string& data) assert(entry.checksum() == csum); #endif } -void storage_header::add_buffer(uint16_t id, const char* buffer, int length) +void storage_header::add_buffer(uint16_t id, const void* buffer, int length) { auto& entry = create_entry(TYPE_BUFFER, id, length); - memcpy(entry.vla, buffer, length); + memcpy(entry.vla, (const char*) buffer, length); #ifdef VERIFY_MEMORY /// verify memory - uint32_t csum = liu_crc32(buffer, length); + const uint32_t csum = liu_crc32(buffer, length); assert(entry.checksum() == csum); #endif } diff --git a/lib/LiveUpdate/src/update.cpp b/lib/LiveUpdate/src/update.cpp index f457b5f97d..10c1155eb4 100644 --- a/lib/LiveUpdate/src/update.cpp +++ b/lib/LiveUpdate/src/update.cpp @@ -16,6 +16,7 @@ #include #include #include // for flushing +#include //#define LPRINT(x, ...) printf(x, ##__VA_ARGS__); #define LPRINT(x, ...) /** x **/ @@ -25,26 +26,28 @@ static const int ELF_MINIMUM = 164; // hotswapping functions extern "C" void solo5_exec(const char*, size_t); static void* HOTSWAP_AREA = (void*) 0x8000; -extern "C" void hotswap(char*, const char*, int, void*, void*); +extern "C" void hotswap(char*, const uint8_t*, int, void*, void*); extern "C" char __hotswap_length; -extern "C" void hotswap64(char*, const char*, int, uint32_t, void*, void*); +extern "C" void hotswap64(char*, const uint8_t*, int, uint32_t, void*, void*); extern uint32_t hotswap64_len; extern void __x86_init_paging(void*); extern "C" void* __os_store_soft_reset(const void*, size_t); // kernel area -extern char _ELF_START_; -extern char _end; +extern uint8_t _ELF_START_; +extern uint8_t _end; // turn this off to reduce liveupdate times at the cost of extra checks -bool LIVEUPDATE_USE_CHEKSUMS = true; +bool LIVEUPDATE_USE_CHEKSUMS = false; // turn this om to zero-initialize all memory between new kernel and heap end bool LIVEUPDATE_ZERO_OLD_MEMORY = false; using namespace liu; -static size_t update_store_data(void* location, const buffer_t*); +static size_t update_store_data(void* location); // serialization callbacks static std::unordered_map storage_callbacks; +static const uint8_t* liveupdate_blob_data = nullptr; +static size_t liveupdate_blob_size = 0; void LiveUpdate::register_partition(std::string key, storage_func callback) { @@ -77,13 +80,18 @@ inline bool validate_header(const Class* hdr) void LiveUpdate::exec(const buffer_t& blob, std::string key, storage_func func) { if (func != nullptr) LiveUpdate::register_partition(key, func); - LiveUpdate::exec(blob); + LiveUpdate::exec(blob.data(), blob.size()); +} +void LiveUpdate::exec(const uint8_t* blob, size_t size, std::string key, storage_func func) +{ + if (func != nullptr) LiveUpdate::register_partition(key, func); + LiveUpdate::exec(blob, size); } -void LiveUpdate::exec(const buffer_t& blob, void* location) +void LiveUpdate::exec(const uint8_t* blob_data, size_t blob_size, void* location) { if (location == nullptr) location = kernel::liveupdate_storage_area(); - LPRINT("LiveUpdate::begin(%p, %p:%d, ...)\n", location, blob.data(), (int) blob.size()); + LPRINT("LiveUpdate::begin(%p, %p:%zu, ...)\n", location, blob_data, blob_size); #if defined(__includeos__) // 1. turn off interrupts asm volatile("cli"); @@ -96,13 +104,13 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) // blobs are separated by at least one old kernel size and // some early heap allocations, which is at least 1mb, while // the copy mechanism just copies single bytes. - if (blob.size() < ELF_MINIMUM) + if (blob_size < ELF_MINIMUM) throw std::runtime_error("Buffer too small to be valid ELF"); - const char* update_area = blob.data(); - char* storage_area = (char*) location; + const uint8_t* update_area = blob_data; + uint8_t* storage_area = (uint8_t*) location; // validate not overwriting heap, kernel area and other things - if (storage_area < (char*) 0x200) { + if (storage_area < (uint8_t*) 0x200) { throw std::runtime_error("LiveUpdate storage area is (probably) a null pointer"); } #if !defined(PLATFORM_UNITTEST) && !defined(USERSPACE_KERNEL) @@ -112,14 +120,14 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) if (storage_area >= &_ELF_START_ && storage_area < &_end) { throw std::runtime_error("LiveUpdate storage area is inside kernel area"); } - if (storage_area >= (char*) kernel::heap_begin() && storage_area < (char*) kernel::heap_end()) { + if (storage_area >= (uint8_t*) kernel::heap_begin() && storage_area < (uint8_t*) kernel::heap_end()) { throw std::runtime_error("LiveUpdate storage area is inside the heap area"); } #endif // search for ELF header LPRINT("* Looking for ELF header at %p\n", update_area); - const char* binary = &update_area[0]; + const auto* binary = &update_area[0]; const auto* hdr = (const Elf32_Ehdr*) binary; if (!validate_header(hdr)) { @@ -142,12 +150,13 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) extern void* find_kernel_start32(const Elf32_Ehdr* hdr); extern void* find_kernel_start64(const Elf64_Ehdr* hdr); - const char* bin_data = nullptr; + const uint8_t* bin_data = nullptr; int bin_len = 0; char* phys_base = nullptr; if (hdr->e_ident[EI_CLASS] == ELFCLASS32) { + PROFILE("LiveUpdate: Scan ELF32"); /// note: this assumes section headers are at the end expected_total = hdr->e_shnum * hdr->e_shentsize + @@ -164,6 +173,7 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) phys_base = (char*) (uintptr_t) phdr->p_paddr; } else { + PROFILE("LiveUpdate: Scan ELF64"); auto* ehdr = (Elf64_Ehdr*) hdr; /// note: this assumes section headers are at the end expected_total = @@ -180,14 +190,14 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) phys_base = (char*) phdr->p_paddr; } - if (blob.size() < expected_total || expected_total < ELF_MINIMUM) + if (blob_size < expected_total || expected_total < ELF_MINIMUM) { fprintf(stderr, "*** There was a mismatch between blob length and expected ELF file size:\n"); fprintf(stderr, - "EXPECTED: %u byte\n", (uint32_t) expected_total); + "EXPECTED: %zu byte\n", expected_total); fprintf(stderr, - "ACTUAL: %u bytes\n", (uint32_t) blob.size()); + "ACTUAL: %zu bytes\n", blob_size); throw std::runtime_error("ELF file was incomplete"); } LPRINT("* Validated ELF header\n"); @@ -195,9 +205,16 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) // _start() entry point LPRINT("* Kernel entry is located at %#x\n", start_offset); - // save ourselves if function passed - update_store_data(storage_area, &blob); + liveupdate_blob_data = blob_data; + liveupdate_blob_size = blob_size; + { + PROFILE("LiveUpdate: Store user data"); + // save ourselves if function passed + update_store_data(storage_area); + } +{ + PROFILE("LiveUpdate: Deactivate devices"); #if !defined(PLATFORM_UNITTEST) && !defined(USERSPACE_KERNEL) // 2. flush all NICs for(auto& nic : os::machine().get()) @@ -208,18 +225,28 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) #endif // turn off devices that affect memory __arch_system_deactivate(); +} // store soft-resetting stuff #if defined(__includeos__) + void* sr_data = nullptr; +{ + PROFILE("Soft-reset store") extern const std::pair get_rollback_location(); const auto rollback = get_rollback_location(); // we should store physical address of update location auto rb_phys = os::mem::virt_to_phys((uintptr_t) rollback.first); - void* sr_data = __os_store_soft_reset((void*) rb_phys, rollback.second); + sr_data = __os_store_soft_reset((void*) rb_phys, rollback.second); +} #else void* sr_data = nullptr; #endif +#ifdef ENABLE_PROFILERS + auto prof = ScopedProfiler::get_statistics(false); + printf("%s\n", prof.c_str()); +#endif + // get offsets for the new service from program header if (bin_data == nullptr || phys_base == nullptr || bin_len <= 64) { @@ -231,7 +258,7 @@ void LiveUpdate::exec(const buffer_t& blob, void* location) LPRINT("* Replacing self with %d bytes and jumping to %#x\n", bin_len, start_offset); #ifdef PLATFORM_x86_solo5 - solo5_exec(blob.data(), blob.size()); + solo5_exec(blob_data, blob_size); throw std::runtime_error("solo5_exec returned"); # elif defined(PLATFORM_UNITTEST) throw liveupdate_exec_success(); @@ -270,8 +297,8 @@ void LiveUpdate::restore_environment() } buffer_t LiveUpdate::store() { - char* location = (char*) kernel::liveupdate_storage_area(); - size_t size = update_store_data(location, nullptr); + uint8_t* location = (uint8_t*) kernel::liveupdate_storage_area(); + const size_t size = update_store_data(location); return buffer_t(location, location + size); } @@ -287,7 +314,12 @@ size_t LiveUpdate::stored_data_length(const void* location) return storage->total_bytes(); } -size_t update_store_data(void* location, const buffer_t* blob) +std::pair LiveUpdate::binary_blob() noexcept +{ + return {liveupdate_blob_data, liveupdate_blob_size}; +} + +size_t update_store_data(void* location) { // create storage header in the fixed location new (location) storage_header(); @@ -300,7 +332,7 @@ size_t update_store_data(void* location, const buffer_t* blob) // create partition int p = storage->create_partition(pair.first); // run serialization process - pair.second(wrapper, blob); + pair.second(wrapper); // add end for partition storage->finish_partition(p); } @@ -332,7 +364,7 @@ void Storage::add_buffer(uid id, const buffer_t& blob) } void Storage::add_buffer(uid id, const void* buf, size_t len) { - hdr.add_buffer(id, (const char*) buf, len); + hdr.add_buffer(id, buf, len); } void Storage::add_vector(uid id, const void* buf, size_t count, size_t esize) { diff --git a/src/kernel/scoped_profiler.cpp b/src/kernel/scoped_profiler.cpp index 36a29497ce..fbf1fe0e59 100644 --- a/src/kernel/scoped_profiler.cpp +++ b/src/kernel/scoped_profiler.cpp @@ -155,13 +155,13 @@ std::string ScopedProfiler::get_statistics(bool sorted) const auto& entry = entries[i]; const uint64_t tickdiff = entry.ticks_start - base_ticks; - double timst = ((double) tickdiff / Hz(os::cpu_freq()).count()); + double timst = ((double) tickdiff / KHz(os::cpu_freq()).count()); ss.width(10); - ss << timst * 1000.0 << " ms | "; + ss << timst << " ms | "; - double micros = (double) entry.cycles_average() / Hz(os::cpu_freq()).count(); + double micros = (double) entry.cycles_average() / KHz(os::cpu_freq()).count(); ss.width(10); - ss << micros * 1000.0 << " ms | "; + ss << micros << " ms | "; ss.width(7); ss << entry.num_samples << " | "; diff --git a/src/plugins/terminal.cpp b/src/plugins/terminal.cpp index 9b0c51d894..a7b3a369b2 100644 --- a/src/plugins/terminal.cpp +++ b/src/plugins/terminal.cpp @@ -24,7 +24,7 @@ static auto& create_connection_from(net::tcp::Connection_ptr conn) #ifdef USE_LIVEUPDATE #include "liveupdate.hpp" -void store_terminal(liu::Storage& store, const liu::buffer_t*) +void store_terminal(liu::Storage& store) { for (auto& kv : terms) { diff --git a/test/kernel/integration/LiveUpdate/CMakeLists.txt b/test/kernel/integration/LiveUpdate/CMakeLists.txt index 3434f6ad0d..60752e5f0e 100644 --- a/test/kernel/integration/LiveUpdate/CMakeLists.txt +++ b/test/kernel/integration/LiveUpdate/CMakeLists.txt @@ -24,7 +24,7 @@ set(SOURCES os_add_executable(kernel_LiveUpdate "LiveUpdate integration test" ${SOURCES}) os_add_drivers(kernel_LiveUpdate - virtionet + vmxnet3 boot_logger ) diff --git a/test/kernel/integration/LiveUpdate/manual.sh b/test/kernel/integration/LiveUpdate/manual.sh index e662bd2a10..32ebc74578 100755 --- a/test/kernel/integration/LiveUpdate/manual.sh +++ b/test/kernel/integration/LiveUpdate/manual.sh @@ -1,2 +1,2 @@ #!/bin/bash -cat > /dev/tcp/10.0.0.59/666 < build/kernel_LiveUpdate +cat > /dev/tcp/10.0.1.59/666 < build/kernel_LiveUpdate diff --git a/test/kernel/integration/LiveUpdate/service.cpp b/test/kernel/integration/LiveUpdate/service.cpp index 6cdf7556d8..f91841af21 100644 --- a/test/kernel/integration/LiveUpdate/service.cpp +++ b/test/kernel/integration/LiveUpdate/service.cpp @@ -10,8 +10,8 @@ extern storage_func_t begin_test_boot(); void Service::start() { - auto prof = ScopedProfiler::get_statistics(false); - printf("%s\n", prof.c_str()); +// auto prof = ScopedProfiler::get_statistics(false); +// printf("%s\n", prof.c_str()); #ifdef BENCHMARK_MODE extern bool LIVEUPDATE_USE_CHEKSUMS; LIVEUPDATE_USE_CHEKSUMS = false; @@ -23,7 +23,7 @@ void Service::start() if (liu::LiveUpdate::os_is_liveupdated() == false) { auto& inet = net::Interfaces::get(0); - inet.network_config({10,0,0,59}, {255,255,255,0}, {10,0,0,1}); + inet.network_config({10,0,1,59}, {255,255,255,0}, {10,0,1,1}); setup_liveupdate_server(inet, 666, func); // signal test.py that the server is up diff --git a/test/kernel/integration/LiveUpdate/test_boot.cpp b/test/kernel/integration/LiveUpdate/test_boot.cpp index cf3528b5e2..d9f976b9dc 100644 --- a/test/kernel/integration/LiveUpdate/test_boot.cpp +++ b/test/kernel/integration/LiveUpdate/test_boot.cpp @@ -3,31 +3,22 @@ #include #include #include +#include using namespace liu; static std::vector timestamps; -static buffer_t bloberino; +static uint8_t blob_data[1024*1024*16]; +static size_t blob_size = 0; -//#define DRIFTING_BINARY -#ifdef DRIFTING_BINARY -static char* blob_location = nullptr; -#endif - -static void boot_save(Storage& storage, const buffer_t* blob) +static void boot_save(Storage& storage) { timestamps.push_back(os::nanos_since_boot()); storage.add_vector(0, timestamps); assert(blob != nullptr); // store binary blob for later -#ifdef DRIFTING_BINARY - blob_location = (char*) os::liveupdate_storage_area() - 0x200000 - blob->size(); - std::copy(blob->begin(), blob->end(), blob_location); + auto blob = LiveUpdate::binary_blob(); + storage.add_buffer(2, blob.first, blob.second); - storage.add(2, blob_location); - storage.add(2, blob->size()); -#else - storage.add_buffer(2, *blob); -#endif auto& stm = Statman::get(); // increment number of updates performed try { @@ -48,14 +39,12 @@ static void boot_resume_all(Restore& thing) // set final time timestamps.back() = t2 - t1; // retrieve binary blob -#ifdef DRIFTING_BINARY - blob_location = thing.as_type(); thing.go_next(); - size_t len = thing.as_type (); thing.go_next(); - - bloberino = buffer_t{blob_location, blob_location + len}; -#else - bloberino = thing.as_buffer(); thing.go_next(); -#endif +{ + PROFILE("Retrieve ELF binary"); + memcpy(blob_data, thing.data(), thing.length()); + blob_size = thing.length(); + thing.go_next(); +} // statman auto& stm = Statman::get(); stm.restore(thing); thing.go_next(); @@ -79,6 +68,8 @@ LiveUpdate::storage_func begin_test_boot() // show information printf("Median boot time over %lu samples: %.2f millis\n", timestamps.size(), median / 1000000.0); + printf("Best time: %.2f millis Worst time: %.2f millis\n", + timestamps.front() / 1000000.0, timestamps.back() / 1000000.0); /* for (auto& stamp : timestamps) { printf("%lld\n", stamp); @@ -101,7 +92,7 @@ LiveUpdate::storage_func begin_test_boot() } else { // immediately liveupdate - LiveUpdate::exec(bloberino, "test", boot_save); + LiveUpdate::exec(blob_data, blob_size, "test", boot_save); } } // wait for update diff --git a/test/kernel/integration/LiveUpdate/vm.json b/test/kernel/integration/LiveUpdate/vm.json index 71ec75bddd..3b205c7324 100644 --- a/test/kernel/integration/LiveUpdate/vm.json +++ b/test/kernel/integration/LiveUpdate/vm.json @@ -1,7 +1,7 @@ { "description" : "VM with interface for testing LiveUpdate", "net" : [ - {"device" : "virtio"} + {"device" : "vmxnet3"} ], "mem" : 128 } From f9828aed29e57e72c0eb9b8c785152c8b7135d3d Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Wed, 24 Jul 2019 10:41:57 +0200 Subject: [PATCH 37/81] musl: Implement nanosleep --- src/musl/nanosleep.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/musl/nanosleep.cpp b/src/musl/nanosleep.cpp index 06b2a67e29..17be07fb91 100644 --- a/src/musl/nanosleep.cpp +++ b/src/musl/nanosleep.cpp @@ -1,9 +1,28 @@ #include "common.hpp" #include +#include +using namespace std::chrono; -static long sys_nanosleep(const struct timespec */*req*/, struct timespec */*rem*/) +static void nanosleep(nanoseconds nanos) { - return -ENOSYS; + bool ticked = false; + + Timers::oneshot(nanos, + [&ticked] (int) { + ticked = true; + }); + + while (ticked == false) { + os::block(); + } +} + +static long sys_nanosleep(const struct timespec* req, struct timespec */*rem*/) +{ + if (req == nullptr) return -EINVAL; + auto nanos = nanoseconds(req->tv_sec * 1'000'000'000ull + req->tv_nsec); + nanosleep(nanos); + return 0; } extern "C" From f62de2c08e94d6aeae50999df7af65204d402561 Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Wed, 24 Jul 2019 10:42:59 +0200 Subject: [PATCH 38/81] Remove pages theme --- _config.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 _config.yml diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c4192631f2..0000000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-cayman \ No newline at end of file From 15bec8ce0d2f21b8ce45a292a85a828ca4a43ea9 Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Wed, 24 Jul 2019 18:53:10 +0200 Subject: [PATCH 39/81] liveupdate: Checksum internal headers by default --- lib/LiveUpdate/include/liveupdate.hpp | 4 ++++ lib/LiveUpdate/src/partition.cpp | 8 ++++---- lib/LiveUpdate/src/storage.cpp | 9 ++------- lib/LiveUpdate/src/update.cpp | 11 +++++++++-- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/lib/LiveUpdate/include/liveupdate.hpp b/lib/LiveUpdate/include/liveupdate.hpp index a0b301c977..c84d16fb95 100644 --- a/lib/LiveUpdate/include/liveupdate.hpp +++ b/lib/LiveUpdate/include/liveupdate.hpp @@ -95,6 +95,10 @@ struct LiveUpdate static void rollback_now(const char* reason); // Returns if the state in the OS has been set to being "liveupdated" static bool os_is_liveupdated() noexcept; + + // Enable/disable extra checksumming + // Note that internal headers are always checked + void enable_extra_checks(bool en) noexcept; }; //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/LiveUpdate/src/partition.cpp b/lib/LiveUpdate/src/partition.cpp index 3fac58a9b9..78afa1f93d 100644 --- a/lib/LiveUpdate/src/partition.cpp +++ b/lib/LiveUpdate/src/partition.cpp @@ -7,7 +7,7 @@ #include #include #include -extern bool LIVEUPDATE_USE_CHEKSUMS; +extern bool LIVEUPDATE_EXTRA_CHECKS; inline uint32_t liu_crc32(const void* buf, size_t len) { @@ -39,7 +39,7 @@ int storage_header::find_partition(const char* key) const // the partition must have a valid name assert(part.name[0] != 0); // the partition should be fully consistent - if (LIVEUPDATE_USE_CHEKSUMS) { + if (LIVEUPDATE_EXTRA_CHECKS) { uint32_t chsum = part.generate_checksum(this->vla); if (part.crc != chsum) throw std::runtime_error("Invalid CRC in partition '" + std::string(key) + "'"); @@ -56,7 +56,7 @@ void storage_header::finish_partition(int p) // write length and crc auto& part = ptable.at(p); part.length = this->length - part.offset; - if (LIVEUPDATE_USE_CHEKSUMS) { + if (LIVEUPDATE_EXTRA_CHECKS) { part.crc = part.generate_checksum(this->vla); } else part.crc = 0; @@ -66,7 +66,7 @@ void storage_header::zero_partition(int p) auto& part = ptable.at(p); memset(&this->vla[part.offset], 0, part.length); part = {}; - if (LIVEUPDATE_USE_CHEKSUMS) { + if (LIVEUPDATE_EXTRA_CHECKS) { // NOTE: generate **NEW** checksum for header this->crc = generate_checksum(); } diff --git a/lib/LiveUpdate/src/storage.cpp b/lib/LiveUpdate/src/storage.cpp index 1bd35e3e60..127a01e4f1 100644 --- a/lib/LiveUpdate/src/storage.cpp +++ b/lib/LiveUpdate/src/storage.cpp @@ -10,7 +10,6 @@ #include #include //#define VERIFY_MEMORY -extern bool LIVEUPDATE_USE_CHEKSUMS; inline uint32_t liu_crc32(const void* buf, size_t len) { @@ -125,16 +124,12 @@ void storage_header::finalize() throw std::runtime_error("Magic field invalidated during store process"); // add end if missing if (this->length == 0) this->add_end(); - if (LIVEUPDATE_USE_CHEKSUMS) - // generate checksum for header - this->crc = generate_checksum(); - else - this->crc = 0; + // generate checksum for header + this->crc = generate_checksum(); } bool storage_header::validate() const noexcept { if (this->magic != LIVEUPD_MAGIC) return false; - if (LIVEUPDATE_USE_CHEKSUMS == false) return true; uint32_t chsum = generate_checksum(); if (this->crc != chsum) return false; diff --git a/lib/LiveUpdate/src/update.cpp b/lib/LiveUpdate/src/update.cpp index 10c1155eb4..d4f62c1c6a 100644 --- a/lib/LiveUpdate/src/update.cpp +++ b/lib/LiveUpdate/src/update.cpp @@ -35,8 +35,9 @@ extern "C" void* __os_store_soft_reset(const void*, size_t); // kernel area extern uint8_t _ELF_START_; extern uint8_t _end; -// turn this off to reduce liveupdate times at the cost of extra checks -bool LIVEUPDATE_USE_CHEKSUMS = false; +// the internal checksums cover the main storage header and all partition headers +// turning this on will checksum partition user data, which scales poorly +bool LIVEUPDATE_EXTRA_CHECKS = false; // turn this om to zero-initialize all memory between new kernel and heap end bool LIVEUPDATE_ZERO_OLD_MEMORY = false; @@ -319,6 +320,12 @@ std::pair LiveUpdate::binary_blob() noexcept return {liveupdate_blob_data, liveupdate_blob_size}; } +void LiveUpdate::enable_extra_checks(bool en) noexcept +{ + LIVEUPDATE_EXTRA_CHECKS = en; + // TODO: also enable destination zeroing? +} + size_t update_store_data(void* location) { // create storage header in the fixed location From 0f1019db78df0deead61c7af1f7a8243d34d7c54 Mon Sep 17 00:00:00 2001 From: fwsGonzo Date: Thu, 25 Jul 2019 13:36:43 +0200 Subject: [PATCH 40/81] liveupdate: Add bounds-checking to storage area --- lib/LiveUpdate/include/hotswap.hpp | 15 +++++++ lib/LiveUpdate/include/liveupdate.hpp | 43 +++++++++++--------- lib/LiveUpdate/include/storage.hpp | 14 ++++++- lib/LiveUpdate/src/resume.cpp | 40 +++++++++--------- lib/LiveUpdate/src/storage.cpp | 13 ++++-- lib/LiveUpdate/src/update.cpp | 58 +++++++++++++-------------- src/include/kernel.hpp | 10 ++--- 7 files changed, 116 insertions(+), 77 deletions(-) create mode 100644 lib/LiveUpdate/include/hotswap.hpp diff --git a/lib/LiveUpdate/include/hotswap.hpp b/lib/LiveUpdate/include/hotswap.hpp new file mode 100644 index 0000000000..7a5dc6d223 --- /dev/null +++ b/lib/LiveUpdate/include/hotswap.hpp @@ -0,0 +1,15 @@ +/** + * Master thesis + * by Alf-Andre Walla 2016-2017 + * +**/ +#ifdef PLATFORM_x86_solo5 +extern "C" void solo5_exec(const char*, size_t); +#else +static void* HOTSWAP_AREA = (void*) 0x8000; +extern "C" void hotswap(char*, const uint8_t*, int, void*, void*); +extern "C" char __hotswap_length; +extern "C" void hotswap64(char*, const uint8_t*, int, uint32_t, void*, void*); +extern uint32_t hotswap64_len; +extern void __x86_init_paging(void*); +#endif diff --git a/lib/LiveUpdate/include/liveupdate.hpp b/lib/LiveUpdate/include/liveupdate.hpp index c84d16fb95..3cca32b6af 100644 --- a/lib/LiveUpdate/include/liveupdate.hpp +++ b/lib/LiveUpdate/include/liveupdate.hpp @@ -19,11 +19,12 @@ namespace liu { struct Storage; struct Restore; -typedef std::vector buffer_t; +using buffer_t = std::vector; +using location_t = std::pair; /** * The beginning and the end of the LiveUpdate process is the exec() and resume() functions. - * exec() is called with a provided fixed memory location for where to store all serialized data, + * exec() is called with a provided binary blob that is the new executable code to live update to, * and after an update is_resumable, with the same fixed memory location, will return true. * resume() can then be called with this same location, and it will call handlers for each @id it finds, * unless no such handler is registered, in which case it just calls the default handler which is passed @@ -31,8 +32,7 @@ typedef std::vector buffer_t; **/ struct LiveUpdate { - // The buffer_t parameter is the update blob (the new kernel) and can be null. - // If the parameter is null, you can assume that it's currently not a live update. + static constexpr location_t default_location { nullptr, 0 }; typedef delegate storage_func; typedef delegate resume_func; @@ -43,12 +43,12 @@ struct LiveUpdate // Start a live update process, storing all user-defined data // If no storage functions are registered no state will be saved - // If @storage_area is nullptr (default) it will be retrieved from OS - static void exec(const uint8_t* blob, size_t size, void* storage_area = nullptr); + // The default storage area is managed by the OS and is recommended + static void exec(const uint8_t* blob, size_t size, location_t = default_location); // Same as above, but including the partition [@key, func] - static void exec(const uint8_t* blob, size_t size, std::string key, storage_func func); - // Same as above, but using buffer_t instead of pointer, length - static void exec(const buffer_t& blob, std::string key, storage_func func); + static void exec(const uint8_t* blob, size_t size, std::string key, storage_func func, location_t = default_location); + // Same as above, but using buffer_t& instead of pointer, length + static void exec(const buffer_t& blob, std::string key, storage_func func, location_t = default_location); // In the event that LiveUpdate::exec() fails, // call this function in the C++ exception catch scope: @@ -56,7 +56,7 @@ struct LiveUpdate // Only store user data, as if there was a live update process // Throws exception if process or sanity checks fail - static buffer_t store(); + static size_t store(location_t = default_location); // Returns the location and size of the executable during exec() // To be used from inside the store callbacks to optionally save the binary @@ -65,25 +65,24 @@ struct LiveUpdate // Returns true if there is stored data from before. // It performs an extensive validation process to make sure the data is // complete and consistent - static bool is_resumable(); - static bool is_resumable(const void* location); + static bool is_resumable(const location_t = default_location); // Restore existing state for a partition named @key. // Returns false if there was no such partition // Can throw lots of standard exceptions - static bool resume(std::string key, resume_func handler); + static bool resume(std::string key, resume_func handler, location_t = default_location); + + // When explicitly resuming from heap, heap overrun checks are disabled + static void resume_from_heap(std::string key, resume_func, location_t); // Check whether a partition named @key exists at default update location. // When @storage_area is nullptr (default) the area is retrieved from OS - static bool partition_exists(const std::string& key, const void* storage_area = nullptr) noexcept; - - // When explicitly resuming from heap, heap overrun checks are disabled - static void resume_from_heap(void* location, std::string key, resume_func); + static bool partition_exists(const std::string& key, location_t = default_location) noexcept; // Retrieve the recorded length, in bytes, of a valid storage area // Throws std::runtime_error when something bad happens // Never returns zero - static size_t stored_data_length(const void* storage_area = nullptr); + static size_t stored_data_length(location_t); // Set location of known good blob to rollback to if something happens static void set_rollback_blob(const void*, size_t) noexcept; @@ -270,6 +269,14 @@ class liveupdate_exec_success : public std::exception } }; +class liveupdate_end_reached : public std::exception +{ +public: + const char* what() const throw() { + return "LiveUpdate: end of storage area reached"; + } +}; + } // liu #endif diff --git a/lib/LiveUpdate/include/storage.hpp b/lib/LiveUpdate/include/storage.hpp index 3c5fd0227d..73ae7e9ce6 100644 --- a/lib/LiveUpdate/include/storage.hpp +++ b/lib/LiveUpdate/include/storage.hpp @@ -98,8 +98,11 @@ struct storage_header uint32_t get_entries() const noexcept { return this->entries; } + uint32_t end_bytes() const noexcept { + return max_length - sizeof(storage_entry); + } - storage_header(); + storage_header(const size_t); int create_partition(std::string key); int find_partition(const char*) const; void finish_partition(int); @@ -124,6 +127,7 @@ struct storage_header inline storage_entry& var_entry(int16_t type, uint16_t id, construct_func func); + void end_reached(); void append_eof() noexcept { ((storage_entry*) &vla[length])->type = TYPE_END; } @@ -141,6 +145,7 @@ struct storage_header mutable uint32_t crc = 0; uint32_t entries = 0; uint32_t length = 0; + const uint32_t max_length; std::array ptable; uint32_t partitions = 0; char vla[0]; @@ -153,6 +158,10 @@ storage_header::create_entry(Args&&... args) // create entry auto* entry = (storage_entry*) &vla[length]; new (entry) storage_entry(args...); + // check that we dont start writing into nowhere-land + if (this->length + entry->size() > end_bytes()) { + this->end_reached(); + } // next storage_entry will be this much further out: this->length += entry->size(); this->entries++; @@ -169,6 +178,9 @@ storage_header::var_entry(int16_t type, uint16_t id, construct_func func) new (entry) storage_entry(type, id, 0); // determine and set size of entry entry->len = func(entry->vla); + if (this->length + entry->size() > end_bytes()) { + this->end_reached(); + } // next storage_entry will be this much further out: this->length += entry->size(); this->entries++; diff --git a/lib/LiveUpdate/src/resume.cpp b/lib/LiveUpdate/src/resume.cpp index f349cbcd24..4b44cb85dd 100644 --- a/lib/LiveUpdate/src/resume.cpp +++ b/lib/LiveUpdate/src/resume.cpp @@ -19,20 +19,24 @@ namespace liu { static bool resume_begin(storage_header&, std::string, LiveUpdate::resume_func); -bool LiveUpdate::is_resumable() +static inline location_t resolve_default(location_t other) { - return is_resumable(kernel::liveupdate_storage_area()); + if (other.first == nullptr || other.second == 0) + return { kernel::liveupdate_storage_area(), kernel::liveupdate_storage_size() }; + return other; } -bool LiveUpdate::is_resumable(const void* location) + +bool LiveUpdate::is_resumable(const location_t provided) { - return ((const storage_header*) location)->validate(); + const auto location = resolve_default(provided); + return ((const storage_header*) location.first)->validate(); } bool LiveUpdate::os_is_liveupdated() noexcept { return kernel::state().is_live_updated; } -static bool resume_helper(void* location, std::string key, LiveUpdate::resume_func func) +static bool resume_helper(location_t location, std::string key, LiveUpdate::resume_func func) { // check if an update has occurred if (!LiveUpdate::is_resumable(location)) @@ -40,34 +44,34 @@ static bool resume_helper(void* location, std::string key, LiveUpdate::resume_fu LPRINT("* Restoring data...\n"); // restore connections etc. - return resume_begin(*(storage_header*) location, key.c_str(), func); + return resume_begin(*(storage_header*) location.first, key.c_str(), func); } -bool LiveUpdate::resume(std::string key, resume_func func) +bool LiveUpdate::resume(std::string key, resume_func func, location_t provided) { - void* location = kernel::liveupdate_storage_area(); + const auto location = resolve_default(provided); /// memory sanity check - if (kernel::heap_end() >= (uintptr_t) location) { + if (kernel::heap_end() >= (uintptr_t) location.first) { fprintf(stderr, "WARNING: LiveUpdate storage area inside heap (margin: %ld)\n", - (long int) (kernel::heap_end() - (uintptr_t) location)); + (long int) (kernel::heap_end() - (uintptr_t) location.first)); throw std::runtime_error("LiveUpdate::resume(): Storage area inside heap"); } return resume_helper(location, std::move(key), func); } -bool LiveUpdate::partition_exists(const std::string& key, const void* area) noexcept +void LiveUpdate::resume_from_heap(std::string key, LiveUpdate::resume_func func, location_t location) +{ + resume_helper(location, std::move(key), func); +} +bool LiveUpdate::partition_exists(const std::string& key, const location_t provided) noexcept { - if (area == nullptr) area = kernel::liveupdate_storage_area(); + const auto location = resolve_default(provided); - if (!LiveUpdate::is_resumable(area)) + if (!LiveUpdate::is_resumable(location)) return false; - auto& storage = *(const storage_header*) area; + auto& storage = *(const storage_header*) location.first; return (storage.find_partition(key.c_str()) != -1); } -void LiveUpdate::resume_from_heap(void* location, std::string key, LiveUpdate::resume_func func) -{ - resume_helper(location, std::move(key), func); -} bool resume_begin(storage_header& storage, std::string key, LiveUpdate::resume_func func) { diff --git a/lib/LiveUpdate/src/storage.cpp b/lib/LiveUpdate/src/storage.cpp index 127a01e4f1..f49247e7ba 100644 --- a/lib/LiveUpdate/src/storage.cpp +++ b/lib/LiveUpdate/src/storage.cpp @@ -4,6 +4,7 @@ * **/ #include "storage.hpp" +#include "liveupdate.hpp" #include #include #include @@ -18,8 +19,8 @@ inline uint32_t liu_crc32(const void* buf, size_t len) const uint64_t storage_header::LIVEUPD_MAGIC = 0xbaadb33fdeadc0de; -storage_header::storage_header() - : magic(LIVEUPD_MAGIC) +storage_header::storage_header(const size_t maxlen) + : magic(LIVEUPD_MAGIC), max_length(maxlen) { //printf("%p --> %#llx\n", this, value); } @@ -135,6 +136,10 @@ bool storage_header::validate() const noexcept if (this->crc != chsum) return false; return true; } +void storage_header::end_reached() +{ + throw liu::liveupdate_end_reached(); +} uint32_t storage_header::generate_checksum() const noexcept { @@ -160,8 +165,8 @@ void storage_header::try_zero() noexcept } void storage_header::zero() { - memset(this->vla, 0, this->length); - *this = {}; + //memset(this->vla, 0, this->length); + new (this) storage_header(0); this->magic = 0; } diff --git a/lib/LiveUpdate/src/update.cpp b/lib/LiveUpdate/src/update.cpp index d4f62c1c6a..ef5c992360 100644 --- a/lib/LiveUpdate/src/update.cpp +++ b/lib/LiveUpdate/src/update.cpp @@ -14,7 +14,6 @@ #include "storage.hpp" #include #include -#include #include // for flushing #include @@ -24,13 +23,7 @@ static const int SECT_SIZE = 512; static const int ELF_MINIMUM = 164; // hotswapping functions -extern "C" void solo5_exec(const char*, size_t); -static void* HOTSWAP_AREA = (void*) 0x8000; -extern "C" void hotswap(char*, const uint8_t*, int, void*, void*); -extern "C" char __hotswap_length; -extern "C" void hotswap64(char*, const uint8_t*, int, uint32_t, void*, void*); -extern uint32_t hotswap64_len; -extern void __x86_init_paging(void*); +#include "hotswap.hpp" extern "C" void* __os_store_soft_reset(const void*, size_t); // kernel area extern uint8_t _ELF_START_; @@ -43,7 +36,7 @@ bool LIVEUPDATE_ZERO_OLD_MEMORY = false; using namespace liu; -static size_t update_store_data(void* location); +static size_t update_store_data(location_t location); // serialization callbacks static std::unordered_map storage_callbacks; @@ -78,22 +71,29 @@ inline bool validate_header(const Class* hdr) hdr->e_ident[3] == 'F'; } -void LiveUpdate::exec(const buffer_t& blob, std::string key, storage_func func) +static inline location_t resolve_default(location_t other) +{ + if (other.first == nullptr || other.second == 0) + return { kernel::liveupdate_storage_area(), kernel::liveupdate_storage_size() }; + return other; +} + +void LiveUpdate::exec(const buffer_t& blob, std::string key, storage_func func, location_t location) { if (func != nullptr) LiveUpdate::register_partition(key, func); - LiveUpdate::exec(blob.data(), blob.size()); + LiveUpdate::exec(blob.data(), blob.size(), location); } -void LiveUpdate::exec(const uint8_t* blob, size_t size, std::string key, storage_func func) +void LiveUpdate::exec(const uint8_t* blob, size_t size, std::string key, storage_func func, location_t location) { if (func != nullptr) LiveUpdate::register_partition(key, func); - LiveUpdate::exec(blob, size); + LiveUpdate::exec(blob, size, location); } -void LiveUpdate::exec(const uint8_t* blob_data, size_t blob_size, void* location) +void LiveUpdate::exec(const uint8_t* blob_data, size_t blob_size, location_t provided_location) { - if (location == nullptr) location = kernel::liveupdate_storage_area(); - LPRINT("LiveUpdate::begin(%p, %p:%zu, ...)\n", location, blob_data, blob_size); -#if defined(__includeos__) + auto location = resolve_default(provided_location); + LPRINT("LiveUpdate::begin(%p:%zu, %p:%zu, ...)\n", location.first, location.second, blob_data, blob_size); +#if defined(__includeos__) && defined(ARCH_x86) // 1. turn off interrupts asm volatile("cli"); #endif @@ -108,7 +108,7 @@ void LiveUpdate::exec(const uint8_t* blob_data, size_t blob_size, void* location if (blob_size < ELF_MINIMUM) throw std::runtime_error("Buffer too small to be valid ELF"); const uint8_t* update_area = blob_data; - uint8_t* storage_area = (uint8_t*) location; + uint8_t* storage_area = (uint8_t*) location.first; // validate not overwriting heap, kernel area and other things if (storage_area < (uint8_t*) 0x200) { @@ -211,7 +211,7 @@ void LiveUpdate::exec(const uint8_t* blob_data, size_t blob_size, void* location { PROFILE("LiveUpdate: Store user data"); // save ourselves if function passed - update_store_data(storage_area); + update_store_data(location); } { @@ -296,20 +296,20 @@ void LiveUpdate::restore_environment() asm volatile("sti"); #endif } -buffer_t LiveUpdate::store() +size_t LiveUpdate::store(location_t provided) { - uint8_t* location = (uint8_t*) kernel::liveupdate_storage_area(); + auto location = resolve_default(provided); const size_t size = update_store_data(location); - return buffer_t(location, location + size); + return size; } -size_t LiveUpdate::stored_data_length(const void* location) +size_t LiveUpdate::stored_data_length(location_t provided) { - if (location == nullptr) location = kernel::liveupdate_storage_area(); - auto* storage = (storage_header*) location; + auto location = resolve_default(provided); + const auto* storage = (storage_header*) location.first; if (storage->validate() == false) - throw std::runtime_error("Failed sanity check on LiveUpdate storage area"); + throw std::runtime_error("Failed validation of LiveUpdate storage area"); /// return length of the whole area return storage->total_bytes(); @@ -326,11 +326,11 @@ void LiveUpdate::enable_extra_checks(bool en) noexcept // TODO: also enable destination zeroing? } -size_t update_store_data(void* location) +size_t update_store_data(location_t location) { // create storage header in the fixed location - new (location) storage_header(); - auto* storage = (storage_header*) location; + new (location.first) storage_header(location.second); + auto* storage = (storage_header*) location.first; Storage wrapper(*storage); /// callback for storing stuff, if provided diff --git a/src/include/kernel.hpp b/src/include/kernel.hpp index 3c5a78aea3..834b1ea7a6 100644 --- a/src/include/kernel.hpp +++ b/src/include/kernel.hpp @@ -119,10 +119,6 @@ namespace kernel { /** Boot with no multiboot params */ void legacy_boot(); - //static constexpr int PAGE_SHIFT = 12; - //static - - void default_stdout(const char*, size_t); /** Resume stuff from a soft reset **/ @@ -131,10 +127,10 @@ namespace kernel { void resume_softreset(intptr_t boot_addr); inline void* liveupdate_storage_area() noexcept { - return (void*)state().liveupdate_loc; + return (void*) state().liveupdate_loc; } - inline void* liveupdate_storage_end() noexcept { - return (void*) (state().liveupdate_loc + state().liveupdate_size); + inline size_t liveupdate_storage_size() noexcept { + return state().liveupdate_size; } void setup_liveupdate(); From e8864a34e3e37cce14bf2a34226dafb126e0148b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 28 Jul 2019 22:45:08 +0200 Subject: [PATCH 41/81] readme: Update info on hello world example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 709e3c7d8c..b743129a90 100755 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ IncludeOS is free software, with "no warranties or restrictions of any kind". ## Key features -* **Extreme memory footprint**: A tiny bootable 64-bit web server is currently 3.2 MB and needs only 10 MB RAM on x86_64. +* **Extreme memory footprint**: A tiny bootable C++17 hello world is currently 900 KB and needs only 5 MB RAM on x86_64. * **KVM, VirtualBox and VMWare support** with full virtualization, using [x86 hardware virtualization](https://en.wikipedia.org/wiki/X86_virtualization), available on most modern x86 CPUs. IncludeOS will run on any x86 hardware platform, even on a physical x86 computer, given appropriate drivers. Officially, we develop for- and test on [Linux KVM](http://www.linux-kvm.org/page/Main_Page), and VMWare [ESXi](https://www.vmware.com/products/esxi-and-esx.html)/[Fusion](https://www.vmware.com/products/fusion.html) which means that you can run your IncludeOS service on Linux, Microsoft Windows and macOS, as well as on cloud providers such as [Google Compute Engine](http://www.includeos.org/blog/2017/includeos-on-google-compute-engine.html), [OpenStack](https://www.openstack.org/) and VMWare [vcloud](https://www.vmware.com/products/vcloud-suite.html). * **Instant boot:** IncludeOS on Qemu/kvm boots in about 300ms but IBM Research has also integrated IncludeOS with [Solo5/uKVM](https://github.com/Solo5/solo5), providing boot times as low as 10 milliseconds. * **Modern C++ support** From 9b009415651f38da191b80c6cd7fef070e869044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 3 Aug 2019 12:13:27 +0200 Subject: [PATCH 42/81] liveupdate: Store multiboot memory map across updates --- src/include/kernel.hpp | 5 ++- src/kernel/multiboot.cpp | 65 +++++++++++++++++-------------- src/platform/x86_pc/os.cpp | 14 +++---- src/platform/x86_pc/softreset.cpp | 12 +++++- 4 files changed, 55 insertions(+), 41 deletions(-) diff --git a/src/include/kernel.hpp b/src/include/kernel.hpp index 834b1ea7a6..52d2d19c86 100644 --- a/src/include/kernel.hpp +++ b/src/include/kernel.hpp @@ -30,7 +30,9 @@ namespace kernel { int panics = 0; os::Panic_action panic_action {}; util::KHz cpu_khz {-1}; - //const uintptr_t elf_binary_size = 0; + // Memory Mapping buffer (stored for live updates) + void* mmap_addr = nullptr; + uint32_t mmap_size = 0; }; State& state() noexcept; @@ -113,6 +115,7 @@ namespace kernel { /** Process multiboot info. Called by 'start' if multibooted **/ void multiboot(uint32_t boot_addr); + void multiboot_mmap(void* addr, size_t); multiboot_info_t* bootinfo(); diff --git a/src/kernel/multiboot.cpp b/src/kernel/multiboot.cpp index a424fdb6d5..a56037fbec 100644 --- a/src/kernel/multiboot.cpp +++ b/src/kernel/multiboot.cpp @@ -94,6 +94,38 @@ uintptr_t _multiboot_free_begin(uintptr_t boot_addr) return multi_end; } +void kernel::multiboot_mmap(void* start, size_t size) +{ + const gsl::span mmap { + (multiboot_memory_map_t*) start, + (int) (size / sizeof(multiboot_memory_map_t)) + }; + + for (const auto& map : mmap) + { + const char* str_type = map.type & MULTIBOOT_MEMORY_AVAILABLE ? "FREE" : "RESERVED"; + const uintptr_t addr = map.addr; + const uintptr_t size = map.len; + INFO2(" 0x%010zx - 0x%010zx %s (%zu Kb.)", + map.addr, map.addr + map.len - 1, str_type, map.len / 1024 ); + + if ((map.type & MULTIBOOT_MEMORY_AVAILABLE) == 0) + { + if (util::bits::is_aligned<4_KiB>(map.addr)) { + os::mem::map({addr, addr, os::mem::Access::read | os::mem::Access::write, size}, + "Reserved (Multiboot)"); + continue; + } + // For non-aligned addresses, assign + os::mem::vmmap().assign_range({map.addr, map.addr + map.len-1, "Reserved (Multiboot)"}); + } + else + { + // Map as free memory + } + } +} + void kernel::multiboot(uint32_t boot_addr) { MYINFO("Booted with multiboot"); @@ -129,36 +161,9 @@ void kernel::multiboot(uint32_t boot_addr) INFO2("* Multiboot provided memory map (%zu entries @ %p)", info->mmap_length / sizeof(multiboot_memory_map_t), (void*) (uintptr_t) info->mmap_addr); - gsl::span mmap { - reinterpret_cast(info->mmap_addr), - (int)(info->mmap_length / sizeof(multiboot_memory_map_t)) - }; - - for (auto map : mmap) - { - const char* str_type = map.type & MULTIBOOT_MEMORY_AVAILABLE ? "FREE" : "RESERVED"; - const uintptr_t addr = map.addr; - const uintptr_t size = map.len; - INFO2(" 0x%010zx - 0x%010zx %s (%zu Kb.)", - addr, addr + size - 1, str_type, size / 1024 ); - - if (not (map.type & MULTIBOOT_MEMORY_AVAILABLE)) { - - if (util::bits::is_aligned<4_KiB>(map.addr)) { - os::mem::map({addr, addr, os::mem::Access::read | os::mem::Access::write, size}, - "Reserved (Multiboot)"); - continue; - } - - // For non-aligned addresses, assign - os::mem::vmmap().assign_range({addr, addr + size - 1, "Reserved (Multiboot)"}); - } - else - { - // Map as free memory - //os::mem::map_avail({map.addr, map.addr, {os::mem::Access::read | os::mem::Access::write}, map.len}, "Reserved (Multiboot)"); - } - } + kernel::state().mmap_addr = (void*) (uintptr_t) info->mmap_addr; + kernel::state().mmap_size = info->mmap_length; + multiboot_mmap(kernel::state().mmap_addr, kernel::state().mmap_size); printf("\n"); } diff --git a/src/platform/x86_pc/os.cpp b/src/platform/x86_pc/os.cpp index d548305d66..d5dcca847c 100644 --- a/src/platform/x86_pc/os.cpp +++ b/src/platform/x86_pc/os.cpp @@ -70,7 +70,7 @@ void kernel::start(uint32_t boot_magic, uint32_t boot_addr) kernel::state().cmdline = Service::binary_name(); // Initialize stdout handlers - if(os_default_stdout) { + if (os_default_stdout) { os::add_stdout(&kernel::default_stdout); } @@ -186,11 +186,9 @@ void kernel::legacy_boot() INFO2("* High memory (from cmos): %i Kib", mem.extended.total); kernel::state().memory_end = 0x100000 + high_memory_size - 1; } - - auto& memmap = os::mem::vmmap(); - // No guarantees without multiboot, but we assume standard memory layout - memmap.assign_range({0x0009FC00, 0x0009FFFF, - "EBDA"}); - memmap.assign_range({0x000A0000, 0x000FFFFF, - "VGA/ROM"}); + // this can be set by softreset during live update + if (kernel::state().mmap_addr != nullptr) + { + multiboot_mmap(kernel::state().mmap_addr, kernel::state().mmap_size); + } } diff --git a/src/platform/x86_pc/softreset.cpp b/src/platform/x86_pc/softreset.cpp index aad752a7cd..e3b09e5fb1 100644 --- a/src/platform/x86_pc/softreset.cpp +++ b/src/platform/x86_pc/softreset.cpp @@ -22,8 +22,11 @@ struct softreset_t uint64_t high_mem; KHz cpu_freq; uint32_t apic_ticks; - uint64_t extra; uint32_t extra_len; + uint64_t extra; + // Memory map FMA + uint32_t mmap_size; + char mmap_buffer[0]; }; bool kernel::is_softreset_magic(uint32_t value) @@ -65,6 +68,9 @@ void kernel::resume_softreset(intptr_t addr) kernel::state().cpu_khz = data->cpu_freq; x86::apic_timer_set_ticks(data->apic_ticks); + kernel::state().mmap_size = data->mmap_size; + kernel::state().mmap_addr = data->mmap_buffer; + /// call service-specific softreset handler softreset_service_handler((void*) data->extra, data->extra_len); } @@ -81,8 +87,10 @@ void* __os_store_soft_reset(void* extra, size_t extra_len) data->high_mem = memory_end; data->cpu_freq = os::cpu_freq(); data->apic_ticks = x86::apic_timer_get_ticks(); - data->extra = (uint64_t) extra; data->extra_len = extra_len; + data->extra = (uint64_t) extra; + data->mmap_size = kernel::state().mmap_size; + std::memcpy(data->mmap_buffer, kernel::state().mmap_addr, data->mmap_size); uint32_t csum = crc32_fast(data, sizeof(softreset_t)); data->checksum = csum; From aac8a940989ff9933d43c8944b64694660dfeff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 3 Aug 2019 12:14:37 +0200 Subject: [PATCH 43/81] cmake: Disable system headers and fix liveupdate compiler arguments --- cmake/os.cmake | 2 ++ lib/LiveUpdate/CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/cmake/os.cmake b/cmake/os.cmake index 1778a7d84e..c667a50e76 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -156,6 +156,8 @@ function(os_add_executable TARGET NAME) target_compile_options(${ELF_TARGET} PRIVATE -Wall -Wextra -fstack-protector) target_compile_options(${ELF_TARGET} PRIVATE -ffunction-sections -fdata-sections) + target_compile_options(${ELF_TARGET} PRIVATE $<$:-nostdlib -nostdlibinc>) + if (PROFILE) target_compile_definitions(${ELF_TARGET} PRIVATE ENABLE_PROFILERS=1) endif() diff --git a/lib/LiveUpdate/CMakeLists.txt b/lib/LiveUpdate/CMakeLists.txt index 93f726fbf7..15d14e5c26 100644 --- a/lib/LiveUpdate/CMakeLists.txt +++ b/lib/LiveUpdate/CMakeLists.txt @@ -93,6 +93,9 @@ if (NOT CMAKE_TESTING_ENABLED) add_dependencies(liveupdate hotswap64) endif() set_target_properties(liveupdate PROPERTIES PUBLIC_HEADER "include/liveupdate;include/liveupdate.hpp") +target_compile_options(liveupdate PRIVATE $<$:-nostdlib -nostdlibinc>) +target_compile_options(liveupdate PRIVATE $<$:-Wall -Wextra -fstack-protector>) +target_compile_options(liveupdate PRIVATE $<$:-ffunction-sections -fdata-sections>) INSTALL(TARGETS liveupdate ARCHIVE DESTINATION lib From 383f8e5a72200bbdc54ee047d0c9b9115dad3304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 11 Aug 2019 19:52:27 +0200 Subject: [PATCH 44/81] cmake: Fix building with GCC, linker: Remove .got and merge GCC except table --- cmake/os.cmake | 6 +++++- src/arch/x86_64/linker.ld | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cmake/os.cmake b/cmake/os.cmake index c667a50e76..a254b3cfde 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -156,7 +156,11 @@ function(os_add_executable TARGET NAME) target_compile_options(${ELF_TARGET} PRIVATE -Wall -Wextra -fstack-protector) target_compile_options(${ELF_TARGET} PRIVATE -ffunction-sections -fdata-sections) - target_compile_options(${ELF_TARGET} PRIVATE $<$:-nostdlib -nostdlibinc>) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + target_compile_options(${ELF_TARGET} PRIVATE $<$:-nostdlib -nostdlibinc>) + else() + target_compile_options(${ELF_TARGET} PRIVATE $<$:-nostdlib -nostdinc>) + endif() if (PROFILE) target_compile_definitions(${ELF_TARGET} PRIVATE ENABLE_PROFILERS=1) diff --git a/src/arch/x86_64/linker.ld b/src/arch/x86_64/linker.ld index dfa327eff2..091a1b3b4f 100644 --- a/src/arch/x86_64/linker.ld +++ b/src/arch/x86_64/linker.ld @@ -25,11 +25,6 @@ SECTIONS } PROVIDE( _TEXT_END_ = . ); - /* Global offset-table. For dynamic linking */ - .got ALIGN(0x10) : { - *(.got*) - } - /** * Global constructors * Constructors are split into groups allowing the OS to use global ctors @@ -131,6 +126,10 @@ SECTIONS KEEP(*(.eh_frame)) LONG (0); } + .gcc_except_table : { + *(.gcc_except_table*) + } + _READONLY_END_ = .; .data : From 7c1e23af01b6c1f9a5e71dcf980b524dd23bc022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 1 Dec 2019 22:17:24 +0100 Subject: [PATCH 45/81] Stop ignoring extensionless files --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 67770236ff..a69a2455bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -* !/**/ -!*.* *~ *.a *.o From 0d49d80431008bbfddd0c86ab43eaaf0112ee483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 1 Dec 2019 22:19:53 +0100 Subject: [PATCH 46/81] Add mr. spinny, struct for kernel locks --- api/kernel/mrspinny.hpp | 8 ++++++++ src/kernel/kernel.cpp | 4 +++- src/musl/mmap.cpp | 3 ++- src/musl/munmap.cpp | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 api/kernel/mrspinny.hpp diff --git a/api/kernel/mrspinny.hpp b/api/kernel/mrspinny.hpp new file mode 100644 index 0000000000..b8e3cbbf25 --- /dev/null +++ b/api/kernel/mrspinny.hpp @@ -0,0 +1,8 @@ +#pragma once +#include + +struct struct_spinny { + spinlock_t memory = 0; + +}; +extern struct_spinny mr_spinny; diff --git a/src/kernel/kernel.cpp b/src/kernel/kernel.cpp index 5281b5bd95..164dace86d 100644 --- a/src/kernel/kernel.cpp +++ b/src/kernel/kernel.cpp @@ -1,4 +1,3 @@ - #include #include #include @@ -205,3 +204,6 @@ void os::print_timestamps(const bool enabled) { kernel::state().timestamps = enabled; } + +#include +struct struct_spinny mr_spinny {}; diff --git a/src/musl/mmap.cpp b/src/musl/mmap.cpp index f30aefc53b..b692b44f21 100644 --- a/src/musl/mmap.cpp +++ b/src/musl/mmap.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include using Alloc = os::mem::Raw_allocator; static Alloc* alloc; @@ -61,6 +61,7 @@ static void* sys_mmap(void *addr, size_t length, int /*prot*/, int /*flags*/, return MAP_FAILED; } + scoped_spinlock { mr_spinny.memory }; auto* res = kalloc(length); if (UNLIKELY(res == nullptr)) diff --git a/src/musl/munmap.cpp b/src/musl/munmap.cpp index 89c56eaa5d..c1e253b176 100644 --- a/src/musl/munmap.cpp +++ b/src/musl/munmap.cpp @@ -1,4 +1,5 @@ #include "common.hpp" +#include extern "C" void kfree(void* addr, size_t length); @@ -7,6 +8,7 @@ static long sys_munmap(void *addr, size_t length) if(UNLIKELY(length == 0)) return -EINVAL; + scoped_spinlock { mr_spinny.memory }; kfree(addr, length); return 0; } From a8381399bf126e5fc16718e5fc9936c22fbdfbaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 1 Dec 2019 22:21:35 +0100 Subject: [PATCH 47/81] membitmap: Use size_t for size --- api/net/port_util.hpp | 2 +- api/util/membitmap.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/net/port_util.hpp b/api/net/port_util.hpp index f1071c59ca..56e6941fbe 100644 --- a/api/net/port_util.hpp +++ b/api/net/port_util.hpp @@ -28,7 +28,7 @@ class Port_util { : ports(), eph_view{ // set the ephemeral view to be between 49152-65535 ports.data() + port_ranges::DYNAMIC_START / 8, - static_cast (size() / sizeof(MemBitmap::word)) + size() / sizeof(MemBitmap::word) }, ephemeral_(net::new_ephemeral_port()), eph_count(0) diff --git a/api/util/membitmap.hpp b/api/util/membitmap.hpp index d8c554d27e..325cfc5d12 100644 --- a/api/util/membitmap.hpp +++ b/api/util/membitmap.hpp @@ -19,7 +19,7 @@ class MemBitmap static const int CHUNK_SIZE = sizeof(word) * 8; MemBitmap() = default; - MemBitmap(void* location, index_t chunks) + MemBitmap(void* location, size_t chunks) : _chunks(chunks) { _data = (word*) location; From 71a01311cbd7f3de7214e19f7edf7877be5f6078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 1 Dec 2019 22:24:11 +0100 Subject: [PATCH 48/81] kernel: Threads in SMP part 1 --- api/kernel/threads.hpp | 5 ++ api/smp_utils | 6 +- src/arch/x86_64/syscall_entry.cpp | 6 +- src/kernel/threads.cpp | 21 +++++- src/platform/x86_pc/apic_revenant.cpp | 92 +++++++++++++++------------ src/platform/x86_pc/apic_revenant.hpp | 13 ++-- src/platform/x86_pc/smp.cpp | 40 +++++------- 7 files changed, 106 insertions(+), 77 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 006a1e380b..8910cb5512 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -56,10 +56,15 @@ namespace kernel return get_thread()->tid; } + int64_t get_last_thread_id() noexcept; + void* get_thread_area(); + void set_thread_area(void*); thread_t* thread_create(thread_t* parent, int flags, void* ctid, void* stack) noexcept; + void resume(int64_t tid); + void setup_main_thread() noexcept; } diff --git a/api/smp_utils b/api/smp_utils index cf2170849d..8bddac6e4e 100644 --- a/api/smp_utils +++ b/api/smp_utils @@ -40,12 +40,12 @@ private: struct minimal_barrier_t { - void inc() + void increment() noexcept { __sync_fetch_and_add(&val, 1); } - void spin_wait(int max) + void spin_wait(int max) noexcept { asm("mfence"); while (this->val < max) { @@ -53,7 +53,7 @@ struct minimal_barrier_t } } - void reset(int val) + void reset(int val) noexcept { asm volatile("mfence"); this->val = val; diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index 5a311a990a..731e07f551 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -103,7 +103,11 @@ long syscall_SYS_set_thread_area(void* u_info) //kprintf(" set to %p\n", u_info); if (UNLIKELY(!u_info)) return -EINVAL; #ifdef __x86_64__ - x86::CPU::set_fs(u_info); +# ifdef PLATFORM_x86_solo5 + solo5_set_tls_base((uintptr_t) u_info); +# else + x86::CPU::set_fs(u_info); +# endif #else x86::CPU::set_gs(u_info); #endif diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index d377a719e1..c7e4e4c360 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -39,6 +39,10 @@ namespace kernel } } + int64_t get_last_thread_id() noexcept { + return thread_counter-1; + } + void thread_t::init(int tid) { this->self = this; @@ -62,7 +66,7 @@ namespace kernel this->my_tls = newtls; // store ourselves in the guarded libc structure this->libc_store_this(); - syscall_SYS_set_thread_area(this->my_tls); + set_thread_area(this->my_tls); } void thread_t::suspend(void* ret_instr, void* ret_stack) @@ -125,12 +129,12 @@ namespace kernel this->tid, this->my_tls, this->stored_nexti, this->stored_stack); // NOTE: the RAX return value here is CHILD thread id, not this if (this->yielded == false) { - syscall_SYS_set_thread_area(this->my_tls); + set_thread_area(this->my_tls); __clone_return(this->stored_nexti, this->stored_stack); } else { this->yielded = false; - syscall_SYS_set_thread_area(this->my_tls); + set_thread_area(this->my_tls); __thread_restore(this->stored_nexti, this->stored_stack); } __builtin_unreachable(); @@ -184,11 +188,22 @@ namespace kernel # endif } + void set_thread_area(void* new_area) { + syscall_SYS_set_thread_area(new_area); + } + thread_t* get_thread(int64_t tid) { auto it = threads.find(tid); if (it == threads.end()) return nullptr; return it->second; } + + void resume(int64_t tid) + { + auto* thread = get_thread(tid); + assert(thread); + thread->resume(); + } } extern "C" diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index 9aa407e73c..dd471a2811 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -4,19 +4,15 @@ #include "clocks.hpp" #include "idt.hpp" #include -//#include -#include #include -#include +#include +#include namespace x86 { extern void initialize_cpu_tables_for_cpu(int); smp_stuff smp_main; SMP::Array smp_system; } - -extern "C" void* get_cpu_esp(); -extern "C" void lapic_exception_handler(); #define INFO(FROM, TEXT, ...) printf("%13s ] " TEXT "\n", "[ " FROM, ##__VA_ARGS__) using namespace x86; @@ -73,56 +69,68 @@ static void revenant_task_handler() } } +void revenant_thread_main(int cpu) +{ + int stack; + while (SMP::cpu_id() != cpu) { + INFO2("AP %d yielding from revenant main", cpu); + sched_yield(); + } + + // show we are online, and verify CPU ID is correct + SMP::global_lock(); + INFO2("AP %d started at %p", SMP::cpu_id(), &stack); + SMP::global_unlock(); + Expects(cpu == SMP::cpu_id()); + + auto& ev = Events::get(cpu); + ev.init_local(); + // subscribe to task and timer interrupts + ev.subscribe(0, revenant_task_handler); + ev.subscribe(1, APIC_Timer::start_timers); + // enable interrupts + asm volatile("sti"); + // init timer system + APIC_Timer::init(); + // initialize clocks + Clocks::init(); + // seed RNG + RNG::get().init(); + + // allow programmers to do stuff on each core at init + SMP::init_task(); + + // signal that the revenant has started + smp_main.boot_barrier.increment(); + + SMP::global_lock(); + x86::smp_main.initialized_cpus.push_back(cpu); + SMP::global_unlock(); + while (true) + { + Events::get().process_events(); + os::halt(); + } + __builtin_unreachable(); +} + void revenant_main(int cpu) { uintptr_t this_stack = smp_main.stack_base + cpu * smp_main.stack_size; - uintptr_t this_stack_end = this_stack - smp_main.stack_size; // enable Local APIC x86::APIC::get().smp_enable(); // setup GDT & per-cpu feature x86::initialize_cpu_tables_for_cpu(cpu); - // show we are online, and verify CPU ID is correct - SMP::global_lock(); - auto stack = (uintptr_t) get_cpu_esp(); - INFO2("AP %d started at %p", SMP::cpu_id(), (void*) this_stack); - SMP::global_unlock(); // initialize exceptions before asserts x86::idt_initialize_for_cpu(cpu); - Expects(cpu == SMP::cpu_id()); - Expects(stack >= this_stack_end && stack < this_stack); #ifdef ARCH_x86_64 // interrupt stack tables ist_initialize_for_cpu(cpu, this_stack); #endif - auto& ev = Events::get(cpu); - ev.init_local(); - // subscribe to task and timer interrupts - ev.subscribe(0, revenant_task_handler); - ev.subscribe(1, APIC_Timer::start_timers); - // enable interrupts - asm volatile("sti"); - // init timer system - APIC_Timer::init(); - // initialize clocks - Clocks::init(); - // seed RNG - RNG::get().init(); - - // allow programmers to do stuff on each core at init - SMP::init_task(); - - // signal that the revenant has started - smp_main.boot_barrier.inc(); - - SMP::global_lock(); - x86::smp_main.initialized_cpus.push_back(cpu); - SMP::global_unlock(); - while (true) - { - Events::get().process_events(); - os::halt(); - } + // resume APs main thread + auto& system = PER_CPU(smp_system); + kernel::resume(system.main_thread_id); __builtin_unreachable(); } diff --git a/src/platform/x86_pc/apic_revenant.hpp b/src/platform/x86_pc/apic_revenant.hpp index 4ea74bb1bb..179aa46f12 100644 --- a/src/platform/x86_pc/apic_revenant.hpp +++ b/src/platform/x86_pc/apic_revenant.hpp @@ -8,8 +8,10 @@ #include #include #include +#include extern "C" void revenant_main(int); +extern void revenant_thread_main(int cpu); namespace x86 { struct smp_task { @@ -26,12 +28,10 @@ struct smp_stuff uintptr_t stack_base; uintptr_t stack_size; minimal_barrier_t boot_barrier; - uint32_t bmp_storage[1] = {0}; std::vector initialized_cpus {0}; - MemBitmap bitmap{&bmp_storage[0], 1}; + std::array bmp_storage = {0}; + MemBitmap bitmap{bmp_storage.data(), bmp_storage.size()}; }; - - extern smp_stuff smp_main; struct smp_system_stuff @@ -40,7 +40,10 @@ struct smp_system_stuff spinlock_t flock = 0; std::vector tasks; std::vector completed; - bool work_done; + bool work_done = false; + // main thread on this vCPU + std::thread* main_thread = nullptr; + long main_thread_id = 0; }; extern SMP::Array smp_system; } diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index 01a5ab0934..c343892d54 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -6,9 +6,11 @@ #include "pit.hpp" #include #include +#include #include #include #include +#include extern "C" { extern char _binary_apic_boot_bin_start; @@ -29,26 +31,6 @@ struct apic_boot { uint32_t stack_size; }; -struct __libc { - int can_do_threads; - int threaded; - int secure; - volatile int threads_minus_1; - size_t* auxv; -}; -extern struct __libc __libc; -//extern "C" struct __libc *__libc_loc(void) __attribute__((const)); -//#define __libc (*__libc_loc()) - -static inline void musl_override_glob_locks() -{ - printf("__libc.can_do_threads: %d __libc.threaded: %d\n", - __libc.can_do_threads, __libc.threaded); - printf("__libc.threads_minus_1: %d -> %d\n", - __libc.threads_minus_1, 1); - __libc.threads_minus_1 = 1; -} - namespace x86 { @@ -91,10 +73,22 @@ void init_SMP() // reset barrier smp_main.boot_barrier.reset(1); - // enable global locks on musl - musl_override_glob_locks(); - auto& apic = x86::APIC::get(); + // massage musl to create a main thread for each AP + for (const auto& cpu : ACPI::get_cpus()) + { + if (cpu.id == apic.get_id()) continue; + //printf("Creating main thread for CPU %d\n", cpu.id); + // thread should immediately yield + auto* t = new std::thread(&revenant_thread_main, cpu.id); + const long tid = kernel::get_last_thread_id(); + //printf("Back at the main thread, last thread: %ld\n", tid); + // store thread info in SMP structure + auto& system = smp_system.at(cpu.id); + system.main_thread = t; + system.main_thread_id = tid; + } + // turn on CPUs INFO("SMP", "Initializing APs"); for (const auto& cpu : ACPI::get_cpus()) From 47f6702aefb7f007f3f2764dff7becc01e036dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 1 Dec 2019 22:25:40 +0100 Subject: [PATCH 49/81] Custom printf mechanism for SMP test --- test/kernel/integration/smp/service.cpp | 65 ++++++++++++++++++++----- test/kernel/integration/smp/vm.json | 2 +- 2 files changed, 55 insertions(+), 12 deletions(-) diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index 08278cfdd4..bc2ec13d9c 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -98,26 +98,69 @@ void SMP::init_task() Events::get().subscribe(IRQ, random_irq_handler); } +#include +static struct { + std::vector buffers; + spinlock_t spinner; + minimal_barrier_t barry; +} messages; + +__attribute__((format (printf, 1, 2))) +static int smpprintf(const char* fmt, ...) { + char buffer[4096]; + // printf format -> buffer + va_list va; + va_start(va, fmt); + int len = vsnprintf(buffer, sizeof(buffer), fmt, va); + va_end(va); + // serialized append buffer + scoped_spinlock { messages.spinner }; + messages.buffers.emplace_back(buffer, buffer + len); + // return message length + return len; +} + +#include +static void task_main(int cpu) +{ + smpprintf("CPU %d (%d) running task \n", cpu, SMP::cpu_id()); + messages.barry.increment(); +} + void Service::start() { +#ifdef INCLUDEOS_SMP_ENABLE + printf("SMP is enabled\n"); +#else + static_assert(false, "SMP is not enabled"); +#endif - for (const auto& i : SMP::active_cpus()) + for (const int i : SMP::active_cpus()) { - SMP::global_lock(); - printf("CPU %i active \n", i); - SMP::global_unlock(); + smpprintf("CPU %i active \n", i); - SMP::add_task([i]{ - SMP::global_lock(); - printf("CPU %i, id %i running task \n", i, SMP::cpu_id()); - SMP::global_unlock(); - }, i); + SMP::add_task( + [cpu = i] { + //auto* t = new std::thread(&task_main, i); + //t->join(); + smpprintf("CPU %d (%d) running task \n", cpu, SMP::cpu_id()); + messages.barry.increment(); + }, i); SMP::signal(i); } // trigger interrupt - SMP::broadcast(IRQ); + SMP::signal(); + + // wait for idiots to finish + messages.barry.spin_wait(SMP::cpu_count()); + for (const auto& msg : messages.buffers) { + printf("%.*s", (int) msg.size(), msg.data()); + } + messages.buffers.clear(); + + printf("SUCCESS\n"); // the rest - smp_advanced_test(); + //smp_advanced_test(); } diff --git a/test/kernel/integration/smp/vm.json b/test/kernel/integration/smp/vm.json index 96bc16da35..b207f208e9 100644 --- a/test/kernel/integration/smp/vm.json +++ b/test/kernel/integration/smp/vm.json @@ -1,4 +1,4 @@ { "image" : "service.img", - "smp" : 16 + "smp" : 4 } From 7a9d3b805111f213b215981cfb37a3de8172782e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 1 Dec 2019 22:29:09 +0100 Subject: [PATCH 50/81] kernel: Rename thread_t to Thread --- api/kernel/threads.hpp | 29 ++++++++------- src/kernel/threads.cpp | 82 +++++++++++++++++++++--------------------- 2 files changed, 58 insertions(+), 53 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 8910cb5512..d4ec6828b2 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -11,20 +11,20 @@ namespace kernel { - struct thread_t { - thread_t* self; - thread_t* parent = nullptr; + struct Thread { + Thread* self; + Thread* parent = nullptr; int64_t tid; void* my_tls; void* my_stack; - // for returning to this thread + // for returning to this Thread void* stored_stack = nullptr; void* stored_nexti = nullptr; bool yielded = false; // address zeroed when exiting void* clear_tid = nullptr; // children, detached when exited - std::vector children; + std::vector children; void init(int tid); void yield(); @@ -37,20 +37,25 @@ namespace kernel void libc_store_this(); }; - inline thread_t* get_thread() + struct Thread_manager { - thread_t* thread; + + }; + + inline Thread* get_thread() + { + Thread* Thread; # ifdef ARCH_x86_64 - asm("movq %%fs:(0x10), %0" : "=r" (thread)); + asm("movq %%fs:(0x10), %0" : "=r" (Thread)); # elif defined(ARCH_i686) - asm("movq %%gs:(0x08), %0" : "=r" (thread)); + asm("movq %%gs:(0x08), %0" : "=r" (Thread)); # else #error "Implement me?" # endif - return thread; + return Thread; } - thread_t* get_thread(int64_t tid); /* or nullptr */ + Thread* get_thread(int64_t tid); /* or nullptr */ inline int64_t get_tid() { return get_thread()->tid; @@ -61,7 +66,7 @@ namespace kernel void* get_thread_area(); void set_thread_area(void*); - thread_t* thread_create(thread_t* parent, int flags, void* ctid, void* stack) noexcept; + Thread* thread_create(Thread* parent, int flags, void* ctid, void* stack) noexcept; void resume(int64_t tid); diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index c7e4e4c360..8415f22f27 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -16,17 +16,17 @@ extern "C" { struct libc_internal { void* self; void* dtv; - kernel::thread_t* kthread; + kernel::Thread* kthread; }; namespace kernel { static int64_t thread_counter = 1; - static std::map threads; - static std::deque suspended; - static thread_t main_thread; + static std::map threads; + static std::deque suspended; + static Thread main_thread; - static void erase_suspension(thread_t* t) + static void erase_suspension(Thread* t) { for (auto it = suspended.begin(); it != suspended.end();) { @@ -43,25 +43,25 @@ namespace kernel return thread_counter-1; } - void thread_t::init(int tid) + void Thread::init(int tid) { this->self = this; this->tid = tid; } - void thread_t::libc_store_this() + void Thread::libc_store_this() { auto* s = (libc_internal*) this->my_tls; s->kthread = this; } - void thread_t::store_return(void* ret_instr, void* ret_stack) + void Thread::store_return(void* ret_instr, void* ret_stack) { - THPRINT("thread %ld storing return point %p with stack %p\n", + THPRINT("Thread %ld storing return point %p with stack %p\n", this->tid, ret_instr, ret_stack); this->stored_nexti = ret_instr; this->stored_stack = ret_stack; } - void thread_t::activate(void* newtls) + void Thread::activate(void* newtls) { this->my_tls = newtls; // store ourselves in the guarded libc structure @@ -69,24 +69,24 @@ namespace kernel set_thread_area(this->my_tls); } - void thread_t::suspend(void* ret_instr, void* ret_stack) + void Thread::suspend(void* ret_instr, void* ret_stack) { this->store_return(ret_instr, ret_stack); // add to suspended (NB: can throw) suspended.push_back(this); } - void thread_t::yield() + void Thread::yield() { - // resume a waiting thread + // resume a waiting Thread assert(!suspended.empty()); auto* next = suspended.front(); suspended.pop_front(); - // resume next thread + // resume next Thread this->yielded = true; next->resume(); } - void thread_t::exit() + void Thread::exit() { const bool exiting_myself = (get_thread() == this); assert(this->parent != nullptr); @@ -101,21 +101,21 @@ namespace kernel pcvec.erase(it); break; } } - // temporary copy of parent thread pointer + // temporary copy of parent Thread pointer auto* next = this->parent; // CLONE_CHILD_CLEARTID: set userspace TID value to zero if (this->clear_tid) { THPRINT("Clearing child value at %p\n", this->clear_tid); *(pthread_t*) this->clear_tid = 0; } - // delete this thread + // delete this Thread auto it = threads.find(this->tid); assert(it != threads.end()); assert(it->second == this); threads.erase(it); - // free thread resources + // free Thread resources delete this; - // resume parent thread + // resume parent Thread if (exiting_myself) { erase_suspension(next); @@ -123,11 +123,11 @@ namespace kernel } } - void thread_t::resume() + void Thread::resume() { THPRINT("Returning to tid=%ld tls=%p nexti=%p stack=%p\n", this->tid, this->my_tls, this->stored_nexti, this->stored_stack); - // NOTE: the RAX return value here is CHILD thread id, not this + // NOTE: the RAX return value here is CHILD Thread id, not this if (this->yielded == false) { set_thread_area(this->my_tls); __clone_return(this->stored_nexti, this->stored_stack); @@ -140,30 +140,30 @@ namespace kernel __builtin_unreachable(); } - thread_t* thread_create(thread_t* parent, int flags, + Thread* thread_create(Thread* parent, int flags, void* ctid, void* stack) noexcept { const int tid = __sync_fetch_and_add(&thread_counter, 1); try { - auto* thread = new thread_t; - thread->init(tid); - thread->parent = parent; - thread->parent->children.push_back(thread); - thread->my_stack = stack; + auto* Thread = new struct Thread; + Thread->init(tid); + Thread->parent = parent; + Thread->parent->children.push_back(Thread); + Thread->my_stack = stack; // flag for write child TID if (flags & CLONE_CHILD_SETTID) { - *(pid_t*) ctid = thread->tid; + *(pid_t*) ctid = Thread->tid; } if (flags & CLONE_CHILD_CLEARTID) { - thread->clear_tid = ctid; + Thread->clear_tid = ctid; } threads.emplace( std::piecewise_construct, std::forward_as_tuple(tid), - std::forward_as_tuple(thread)); - return thread; + std::forward_as_tuple(Thread)); + return Thread; } catch (...) { return nullptr; @@ -175,7 +175,7 @@ namespace kernel int stack_value; main_thread.init(0); main_thread.my_stack = (void*) &stack_value; - // allow exiting in main thread + // allow exiting in main Thread main_thread.activate(get_thread_area()); } @@ -192,7 +192,7 @@ namespace kernel syscall_SYS_set_thread_area(new_area); } - thread_t* get_thread(int64_t tid) { + Thread* get_thread(int64_t tid) { auto it = threads.find(tid); if (it == threads.end()) return nullptr; return it->second; @@ -200,9 +200,9 @@ namespace kernel void resume(int64_t tid) { - auto* thread = get_thread(tid); - assert(thread); - thread->resume(); + auto* Thread = get_thread(tid); + assert(Thread); + Thread->resume(); } } @@ -211,11 +211,11 @@ void __thread_suspend_and_yield(void* next_instr, void* stack) { // don't go through the ardous yielding process when alone if (kernel::suspended.empty()) return; - // suspend current thread - auto* thread = kernel::get_thread(); - thread->suspend(next_instr, stack); - // resume some other thread - thread->yield(); + // suspend current Thread + auto* Thread = kernel::get_thread(); + Thread->suspend(next_instr, stack); + // resume some other Thread + Thread->yield(); } extern "C" From 99750c1531d3f2b4bc883de5b713ac1d0e86f5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 1 Dec 2019 23:00:37 +0100 Subject: [PATCH 51/81] Add ThreadManager, add thread migration --- api/kernel/threads.hpp | 28 +++++++-- src/kernel/threads.cpp | 120 ++++++++++++++++++++++-------------- src/platform/x86_pc/smp.cpp | 1 + 3 files changed, 98 insertions(+), 51 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index d4ec6828b2..85d8c13d41 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -1,5 +1,7 @@ #pragma once #include +#include +#include #include //#define THREADS_DEBUG 1 @@ -14,7 +16,7 @@ namespace kernel struct Thread { Thread* self; Thread* parent = nullptr; - int64_t tid; + long tid; void* my_tls; void* my_stack; // for returning to this Thread @@ -37,9 +39,23 @@ namespace kernel void libc_store_this(); }; - struct Thread_manager + struct ThreadManager { + std::map threads; + std::deque suspended; + Thread main_thread; + static ThreadManager& get() noexcept; + static ThreadManager& get(int cpu); + + void migrate(long tid, int cpu); + + void insert_thread(Thread* thread); + void erase_thread_safely(Thread* thread); + + void erase_suspension(Thread* t); + void suspend(Thread* t) { suspended.push_back(t); } + Thread* wakeup_next(); }; inline Thread* get_thread() @@ -55,20 +71,20 @@ namespace kernel return Thread; } - Thread* get_thread(int64_t tid); /* or nullptr */ + Thread* get_thread(long tid); /* or nullptr */ - inline int64_t get_tid() { + inline long get_tid() { return get_thread()->tid; } - int64_t get_last_thread_id() noexcept; + long get_last_thread_id() noexcept; void* get_thread_area(); void set_thread_area(void*); Thread* thread_create(Thread* parent, int flags, void* ctid, void* stack) noexcept; - void resume(int64_t tid); + void resume(long tid); void setup_main_thread() noexcept; } diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index 8415f22f27..57894dc6c9 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -1,9 +1,8 @@ #include #include -#include +#include #include #include -#include #include extern "C" { @@ -21,28 +20,23 @@ struct libc_internal { namespace kernel { - static int64_t thread_counter = 1; - static std::map threads; - static std::deque suspended; - static Thread main_thread; + static long thread_counter = 1; - static void erase_suspension(Thread* t) - { - for (auto it = suspended.begin(); it != suspended.end();) - { - if (*it == t) { - it = suspended.erase(it); - } - else { - ++it; - } - } + inline long generate_new_thread_id() noexcept { + return __sync_fetch_and_add(&thread_counter, 1); } - - int64_t get_last_thread_id() noexcept { + long get_last_thread_id() noexcept { return thread_counter-1; } + SMP::Array thread_managers; + ThreadManager& ThreadManager::get() noexcept { + return PER_CPU(thread_managers); + } + ThreadManager& ThreadManager::get(int cpu) { + return thread_managers.at(cpu); + } + void Thread::init(int tid) { this->self = this; @@ -73,14 +67,12 @@ namespace kernel { this->store_return(ret_instr, ret_stack); // add to suspended (NB: can throw) - suspended.push_back(this); + ThreadManager::get().suspend(this); } void Thread::yield() { // resume a waiting Thread - assert(!suspended.empty()); - auto* next = suspended.front(); - suspended.pop_front(); + auto* next = ThreadManager::get().wakeup_next(); // resume next Thread this->yielded = true; next->resume(); @@ -92,7 +84,7 @@ namespace kernel assert(this->parent != nullptr); // detach children for (auto* child : this->children) { - child->parent = &main_thread; + child->parent = &ThreadManager::get().main_thread; } // remove myself from parent auto& pcvec = this->parent->children; @@ -109,16 +101,13 @@ namespace kernel *(pthread_t*) this->clear_tid = 0; } // delete this Thread - auto it = threads.find(this->tid); - assert(it != threads.end()); - assert(it->second == this); - threads.erase(it); + ThreadManager::get().erase_thread_safely(this); // free Thread resources delete this; // resume parent Thread if (exiting_myself) { - erase_suspension(next); + ThreadManager::get().erase_suspension(next); next->resume(); } } @@ -143,27 +132,24 @@ namespace kernel Thread* thread_create(Thread* parent, int flags, void* ctid, void* stack) noexcept { - const int tid = __sync_fetch_and_add(&thread_counter, 1); + const int tid = generate_new_thread_id(); try { - auto* Thread = new struct Thread; - Thread->init(tid); - Thread->parent = parent; - Thread->parent->children.push_back(Thread); - Thread->my_stack = stack; + auto* thread = new struct Thread; + thread->init(tid); + thread->parent = parent; + thread->parent->children.push_back(thread); + thread->my_stack = stack; // flag for write child TID if (flags & CLONE_CHILD_SETTID) { - *(pid_t*) ctid = Thread->tid; + *(pid_t*) ctid = thread->tid; } if (flags & CLONE_CHILD_CLEARTID) { - Thread->clear_tid = ctid; + thread->clear_tid = ctid; } - threads.emplace( - std::piecewise_construct, - std::forward_as_tuple(tid), - std::forward_as_tuple(Thread)); - return Thread; + ThreadManager::get().insert_thread(thread); + return thread; } catch (...) { return nullptr; @@ -173,6 +159,7 @@ namespace kernel void setup_main_thread() noexcept { int stack_value; + auto& main_thread = ThreadManager::get().main_thread; main_thread.init(0); main_thread.my_stack = (void*) &stack_value; // allow exiting in main Thread @@ -192,25 +179,68 @@ namespace kernel syscall_SYS_set_thread_area(new_area); } - Thread* get_thread(int64_t tid) { + Thread* get_thread(long tid) { + auto& threads = ThreadManager::get().threads; auto it = threads.find(tid); if (it == threads.end()) return nullptr; return it->second; } - void resume(int64_t tid) + void resume(long tid) { auto* Thread = get_thread(tid); assert(Thread); Thread->resume(); } + + void ThreadManager::migrate(long tid, int cpu) + { + auto* thread = get_thread(tid); + assert(thread != nullptr); + this->erase_thread_safely(thread); + ThreadManager::get(cpu).insert_thread(thread); + } + void ThreadManager::insert_thread(Thread* thread) + { + threads.emplace( + std::piecewise_construct, + std::forward_as_tuple(thread->tid), + std::forward_as_tuple(thread)); + } + void ThreadManager::erase_thread_safely(Thread* thread) + { + assert(thread != nullptr); + auto it = threads.find(thread->tid); + assert(it != threads.end()); + assert(it->second == thread); + threads.erase(it); + } + Thread* ThreadManager::wakeup_next() + { + assert(!suspended.empty()); + auto* next = suspended.front(); + suspended.pop_front(); + return next; + } + void ThreadManager::erase_suspension(Thread* t) + { + for (auto it = suspended.begin(); it != suspended.end();) + { + if (*it == t) { + it = suspended.erase(it); + } + else { + ++it; + } + } + } } extern "C" void __thread_suspend_and_yield(void* next_instr, void* stack) { // don't go through the ardous yielding process when alone - if (kernel::suspended.empty()) return; + if (kernel::ThreadManager::get().suspended.empty()) return; // suspend current Thread auto* Thread = kernel::get_thread(); Thread->suspend(next_instr, stack); diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index c343892d54..6f5b37b45a 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -87,6 +87,7 @@ void init_SMP() auto& system = smp_system.at(cpu.id); system.main_thread = t; system.main_thread_id = tid; + kernel::ThreadManager::get().migrate(tid, cpu.id); } // turn on CPUs From 9b97e83edb095b1a0eaa6a8f4b49048f342282fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 1 Dec 2019 23:10:52 +0100 Subject: [PATCH 52/81] threads: Fix bug when yielding with no suspended --- src/arch/x86_64/threads.asm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/arch/x86_64/threads.asm b/src/arch/x86_64/threads.asm index 48528cbc22..21cd4e3df8 100644 --- a/src/arch/x86_64/threads.asm +++ b/src/arch/x86_64/threads.asm @@ -29,9 +29,13 @@ __thread_yield: ;; align stack sub rsp, 8 call __thread_suspend_and_yield + ;; restore early (no yield happened) + add rsp, 8 + jmp __thread_restore2 __thread_restore: mov rsp, rsi +__thread_restore2: ;; restore saved registers pop r15 pop r14 From 46fbe62d15467196591a4f8fd7f9c914a596fa8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 2 Dec 2019 01:07:47 +0100 Subject: [PATCH 53/81] test: Verify that yield works with only 1 thread --- test/kernel/integration/threads/service.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/kernel/integration/threads/service.cpp b/test/kernel/integration/threads/service.cpp index 5398097764..9310fdd19e 100644 --- a/test/kernel/integration/threads/service.cpp +++ b/test/kernel/integration/threads/service.cpp @@ -71,6 +71,9 @@ void Service::start() pthread_t t; int res; + printf("*** Testing yielding from single-threaded...\n"); + sched_yield(); // should return immediately + printf("*** Testing pthread_create and sched_yield...\n"); res = pthread_create(&t, NULL, thread_function1, &x); if (res < 0) { From 58f2cd8485dab494803f07e021ccf02e42f0383a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 2 Dec 2019 01:42:09 +0100 Subject: [PATCH 54/81] threads: Improve thread migration, fixes --- api/kernel/threads.hpp | 31 +++---- src/kernel/threads.cpp | 118 +++++++++++++++++--------- src/platform/x86_pc/apic_revenant.cpp | 4 +- 3 files changed, 98 insertions(+), 55 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 85d8c13d41..fafdf63ae4 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -16,26 +16,27 @@ namespace kernel struct Thread { Thread* self; Thread* parent = nullptr; - long tid; - void* my_tls; - void* my_stack; + long tid; + void* my_tls; + void* my_stack; // for returning to this Thread - void* stored_stack = nullptr; - void* stored_nexti = nullptr; - bool yielded = false; + void* stored_stack = nullptr; + void* stored_nexti = nullptr; + bool yielded = false; // address zeroed when exiting - void* clear_tid = nullptr; + void* clear_tid = nullptr; // children, detached when exited std::vector children; - void init(int tid); + void init(long tid); void yield(); void exit(); void suspend(void* ret_instr, void* ret_stack); void activate(void* newtls); void resume(); + void detach(); + void attach(Thread* parent); private: - void store_return(void* ret_instr, void* ret_stack); void libc_store_this(); }; @@ -43,7 +44,7 @@ namespace kernel { std::map threads; std::deque suspended; - Thread main_thread; + Thread* main_thread = nullptr; static ThreadManager& get() noexcept; static ThreadManager& get(int cpu); @@ -60,15 +61,15 @@ namespace kernel inline Thread* get_thread() { - Thread* Thread; + Thread* thread; # ifdef ARCH_x86_64 - asm("movq %%fs:(0x10), %0" : "=r" (Thread)); + asm("movq %%fs:(0x10), %0" : "=r" (thread)); # elif defined(ARCH_i686) - asm("movq %%gs:(0x08), %0" : "=r" (Thread)); + asm("movq %%gs:(0x08), %0" : "=r" (thread)); # else #error "Implement me?" # endif - return Thread; + return thread; } Thread* get_thread(long tid); /* or nullptr */ @@ -86,7 +87,7 @@ namespace kernel void resume(long tid); - void setup_main_thread() noexcept; + void setup_main_thread(long tid = 0) noexcept; } extern "C" { diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index 57894dc6c9..fe94371ed6 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -4,6 +4,7 @@ #include #include #include +#include extern "C" { void __thread_yield(); @@ -21,6 +22,7 @@ struct libc_internal { namespace kernel { static long thread_counter = 1; + static Thread core0_main_thread; inline long generate_new_thread_id() noexcept { return __sync_fetch_and_add(&thread_counter, 1); @@ -37,7 +39,7 @@ namespace kernel return thread_managers.at(cpu); } - void Thread::init(int tid) + void Thread::init(long tid) { this->self = this; this->tid = tid; @@ -48,13 +50,6 @@ namespace kernel auto* s = (libc_internal*) this->my_tls; s->kthread = this; } - void Thread::store_return(void* ret_instr, void* ret_stack) - { - THPRINT("Thread %ld storing return point %p with stack %p\n", - this->tid, ret_instr, ret_stack); - this->stored_nexti = ret_instr; - this->stored_stack = ret_stack; - } void Thread::activate(void* newtls) { this->my_tls = newtls; @@ -65,15 +60,18 @@ namespace kernel void Thread::suspend(void* ret_instr, void* ret_stack) { - this->store_return(ret_instr, ret_stack); + THPRINT("Thread %ld storing return point %p with stack %p\n", + this->tid, ret_instr, ret_stack); + this->stored_nexti = ret_instr; + this->stored_stack = ret_stack; // add to suspended (NB: can throw) ThreadManager::get().suspend(this); } void Thread::yield() { - // resume a waiting Thread + // resume a waiting thread auto* next = ThreadManager::get().wakeup_next(); - // resume next Thread + // resume next thread this->yielded = true; next->resume(); } @@ -84,39 +82,51 @@ namespace kernel assert(this->parent != nullptr); // detach children for (auto* child : this->children) { - child->parent = &ThreadManager::get().main_thread; + child->parent = ThreadManager::get().main_thread; } // remove myself from parent - auto& pcvec = this->parent->children; - for (auto it = pcvec.begin(); it != pcvec.end(); ++it) { - if (*it == this) { - pcvec.erase(it); break; - } - } + this->detach(); // temporary copy of parent Thread pointer auto* next = this->parent; // CLONE_CHILD_CLEARTID: set userspace TID value to zero if (this->clear_tid) { THPRINT("Clearing child value at %p\n", this->clear_tid); - *(pthread_t*) this->clear_tid = 0; + *(pid_t*) this->clear_tid = 0; } - // delete this Thread + // delete this thread ThreadManager::get().erase_thread_safely(this); - // free Thread resources + // free thread resources delete this; - // resume parent Thread + // resume parent thread if (exiting_myself) { ThreadManager::get().erase_suspension(next); next->resume(); } } + void Thread::detach() + { + assert(this->parent != nullptr); + auto& pcvec = this->parent->children; + for (auto it = pcvec.begin(); it != pcvec.end(); ++it) { + if (*it == this) { + pcvec.erase(it); + break; + } + } + this->parent = nullptr; + } + void Thread::attach(Thread* parent) + { + this->parent = parent; + parent->children.push_back(this); + } void Thread::resume() { THPRINT("Returning to tid=%ld tls=%p nexti=%p stack=%p\n", this->tid, this->my_tls, this->stored_nexti, this->stored_stack); - // NOTE: the RAX return value here is CHILD Thread id, not this + // NOTE: the RAX return value here is CHILD thread id, not this if (this->yielded == false) { set_thread_area(this->my_tls); __clone_return(this->stored_nexti, this->stored_stack); @@ -132,7 +142,7 @@ namespace kernel Thread* thread_create(Thread* parent, int flags, void* ctid, void* stack) noexcept { - const int tid = generate_new_thread_id(); + const long tid = generate_new_thread_id(); try { auto* thread = new struct Thread; thread->init(tid); @@ -156,14 +166,25 @@ namespace kernel } } - void setup_main_thread() noexcept + void setup_main_thread(long tid) noexcept { - int stack_value; - auto& main_thread = ThreadManager::get().main_thread; - main_thread.init(0); - main_thread.my_stack = (void*) &stack_value; - // allow exiting in main Thread - main_thread.activate(get_thread_area()); + int stack_value; + if (tid == 0) + { + core0_main_thread.init(0); + core0_main_thread.my_stack = (void*) &stack_value; + // allow exiting in main thread + core0_main_thread.activate(get_thread_area()); + // make threadmanager0 use this main thread + // NOTE: don't use SMP-aware function here + ThreadManager::get(0).main_thread = &core0_main_thread; + } + else + { + auto* main_thread = get_thread(tid); + assert(main_thread->parent == nullptr); + ThreadManager::get().main_thread = main_thread; + } } void* get_thread_area() @@ -196,9 +217,24 @@ namespace kernel void ThreadManager::migrate(long tid, int cpu) { auto* thread = get_thread(tid); - assert(thread != nullptr); + // can't migrate missing thread + assert(thread != nullptr && "Could not find given thread id"); + // can't migrate the main thread + assert(thread != ThreadManager::get().main_thread); + // can't migrate the thread you are in + auto* current = get_thread(); + assert(current != thread && "Can't migrate current thread"); + // start migration + if (thread->parent != nullptr) { + thread->detach(); + } this->erase_thread_safely(thread); - ThreadManager::get(cpu).insert_thread(thread); + auto& tman = ThreadManager::get(cpu); + tman.insert_thread(thread); + // attach this thread to the managers main thread + if (tman.main_thread) { + thread->attach(tman.main_thread); + } } void ThreadManager::insert_thread(Thread* thread) { @@ -240,12 +276,16 @@ extern "C" void __thread_suspend_and_yield(void* next_instr, void* stack) { // don't go through the ardous yielding process when alone - if (kernel::ThreadManager::get().suspended.empty()) return; - // suspend current Thread - auto* Thread = kernel::get_thread(); - Thread->suspend(next_instr, stack); - // resume some other Thread - Thread->yield(); + if (kernel::ThreadManager::get().suspended.empty()) { + THPRINT("Nothing to yield to. Returning... nexti=%p stack=%p\n", + next_instr, stack); + return; + } + // suspend current thread + auto* thread = kernel::get_thread(); + thread->suspend(next_instr, stack); + // resume some other thread + thread->yield(); } extern "C" diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index dd471a2811..daa35f1125 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -129,8 +129,10 @@ void revenant_main(int cpu) ist_initialize_for_cpu(cpu, this_stack); #endif - // resume APs main thread auto& system = PER_CPU(smp_system); + // setup main thread + kernel::setup_main_thread(system.main_thread_id); + // resume APs main thread kernel::resume(system.main_thread_id); __builtin_unreachable(); } From f8f05f301f8c2fdec79349f32133041d49d7428b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 2 Dec 2019 17:51:02 +0100 Subject: [PATCH 55/81] threads: Fix missing parent when exiting, new init function --- api/kernel/threads.hpp | 5 ++--- src/kernel/threads.cpp | 31 ++++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index fafdf63ae4..cff56f6bc4 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -14,9 +14,8 @@ namespace kernel { struct Thread { - Thread* self; - Thread* parent = nullptr; long tid; + Thread* parent; void* my_tls; void* my_stack; // for returning to this Thread @@ -28,7 +27,7 @@ namespace kernel // children, detached when exited std::vector children; - void init(long tid); + void init(long tid, Thread* parent, void* stack); void yield(); void exit(); void suspend(void* ret_instr, void* ret_stack); diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index fe94371ed6..91a2bd51d1 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -39,10 +39,15 @@ namespace kernel return thread_managers.at(cpu); } - void Thread::init(long tid) + void Thread::init(long tid, Thread* parent, void* stack) { - this->self = this; - this->tid = tid; + this->tid = tid; + this->parent = parent; + this->my_stack = stack; + if (this->parent) { + this->parent->children.push_back(this); + } + } void Thread::libc_store_this() @@ -84,10 +89,10 @@ namespace kernel for (auto* child : this->children) { child->parent = ThreadManager::get().main_thread; } - // remove myself from parent - this->detach(); - // temporary copy of parent Thread pointer + // temporary copy of parent thread pointer auto* next = this->parent; + // remove myself from parent + this->detach(); // CLONE_CHILD_CLEARTID: set userspace TID value to zero if (this->clear_tid) { THPRINT("Clearing child value at %p\n", this->clear_tid); @@ -145,10 +150,7 @@ namespace kernel const long tid = generate_new_thread_id(); try { auto* thread = new struct Thread; - thread->init(tid); - thread->parent = parent; - thread->parent->children.push_back(thread); - thread->my_stack = stack; + thread->init(tid, parent, stack); // flag for write child TID if (flags & CLONE_CHILD_SETTID) { @@ -171,8 +173,7 @@ namespace kernel int stack_value; if (tid == 0) { - core0_main_thread.init(0); - core0_main_thread.my_stack = (void*) &stack_value; + core0_main_thread.init(0, nullptr, (void*) &stack_value); // allow exiting in main thread core0_main_thread.activate(get_thread_area()); // make threadmanager0 use this main thread @@ -209,9 +210,9 @@ namespace kernel void resume(long tid) { - auto* Thread = get_thread(tid); - assert(Thread); - Thread->resume(); + auto* thread = get_thread(tid); + assert(thread); + thread->resume(); } void ThreadManager::migrate(long tid, int cpu) From 2200e6be1dc001cadc4f2ccaeea7c65a184d0b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 2 Dec 2019 18:49:28 +0100 Subject: [PATCH 56/81] test: SMP test redesign for debugging purposes --- test/kernel/integration/smp/service.cpp | 69 ++++++++++++++----------- test/kernel/integration/smp/vm.json | 2 +- 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index bc2ec13d9c..db5f2d772c 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -78,26 +78,6 @@ void smp_advanced_test() SMP::signal(); } -static void random_irq_handler() -{ - SMP::global_lock(); - irq_times++; - bool done = (irq_times == SMP::cpu_count()-1); - SMP::global_unlock(); - - if (done) { - SMP::global_lock(); - printf("Random IRQ handler called %d times\n", irq_times); - SMP::global_unlock(); - } -} - -static const uint8_t IRQ = 110; -void SMP::init_task() -{ - Events::get().subscribe(IRQ, random_irq_handler); -} - #include static struct { std::vector buffers; @@ -120,11 +100,34 @@ static int smpprintf(const char* fmt, ...) { return len; } + +static void random_irq_handler() +{ + SMP::global_lock(); + irq_times++; + bool done = (irq_times == SMP::cpu_count()-1); + SMP::global_unlock(); + + if (done) { + smpprintf("Random IRQ handler called %d times\n", irq_times); + } +} + +static const uint8_t IRQ = 110; +void SMP::init_task() +{ + Events::get().subscribe(IRQ, random_irq_handler); +} + #include +extern "C" void kprintf(const char* format, ...); +#include +extern "C" ssize_t write(int, const void*, size_t); +extern "C" void __serial_print1(const char* cstr); +__attribute__((noinline)) static void task_main(int cpu) { - smpprintf("CPU %d (%d) running task \n", cpu, SMP::cpu_id()); - messages.barry.increment(); + kprintf("CPU %d running task\n", SMP::cpu_id()); } void Service::start() @@ -137,28 +140,36 @@ void Service::start() for (const int i : SMP::active_cpus()) { - smpprintf("CPU %i active \n", i); + // adding work and signalling CPU=0 is the same as broadcasting to + // all active CPUs, and giving work to the first free CPU + if (i == 0) continue; // we don't want to do that here, for this test + printf("CPU %d active\n", i); SMP::add_task( [cpu = i] { - //auto* t = new std::thread(&task_main, i); - //t->join(); - smpprintf("CPU %d (%d) running task \n", cpu, SMP::cpu_id()); + __serial_print1("__serial_print1 works\n"); + const char buffer[] = "os::print works\n"; + os::default_stdout(buffer, sizeof(buffer)-1); + os::print(buffer, sizeof(buffer)-1); + auto* t = new std::thread(&task_main, cpu); + t->join(); + smpprintf("CPU %d running task (thread=%p)\n", SMP::cpu_id(), kernel::get_thread()); messages.barry.increment(); }, i); SMP::signal(i); } - // trigger interrupt - SMP::signal(); // wait for idiots to finish - messages.barry.spin_wait(SMP::cpu_count()); + messages.barry.spin_wait(SMP::cpu_count()-1); for (const auto& msg : messages.buffers) { printf("%.*s", (int) msg.size(), msg.data()); } messages.buffers.clear(); + // trigger interrupt + SMP::broadcast(IRQ); + printf("SUCCESS\n"); // the rest diff --git a/test/kernel/integration/smp/vm.json b/test/kernel/integration/smp/vm.json index b207f208e9..989ed1be3d 100644 --- a/test/kernel/integration/smp/vm.json +++ b/test/kernel/integration/smp/vm.json @@ -1,4 +1,4 @@ { "image" : "service.img", - "smp" : 4 + "smp" : 2 } From 214c562efa52130d911e890cb1867ff29dbcc738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 2 Dec 2019 20:26:47 +0100 Subject: [PATCH 57/81] system_log: Move it back from highmem to physical --- src/kernel/system_log.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/system_log.cpp b/src/kernel/system_log.cpp index 336a691213..3e3955b9d5 100644 --- a/src/kernel/system_log.cpp +++ b/src/kernel/system_log.cpp @@ -20,7 +20,7 @@ struct Log_buffer { static FixedRingBuffer<16384> temp_mrb; #define MRB_AREA_SIZE (65536) // 64kb #define MRB_LOG_SIZE (MRB_AREA_SIZE - sizeof(MemoryRingBuffer) - sizeof(Log_buffer)) -#define VIRTUAL_MOVE +//#define VIRTUAL_MOVE static MemoryRingBuffer* mrb = nullptr; static inline RingBuffer* get_mrb() { @@ -33,7 +33,7 @@ inline static char* get_system_log_loc() #if defined(ARCH_x86_64) && defined(VIRTUAL_MOVE) return (char*) ((1ull << 45) - MRB_AREA_SIZE); #else - return (char*) kernel::liveupdate_storage_area() - MRB_AREA_SIZE; + return (char*) kernel::state().liveupdate_phys - MRB_AREA_SIZE; #endif } inline static auto* get_ringbuffer_data() From 6944de0ececd7e842d7a050afcb8300765750a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 2 Dec 2019 21:41:32 +0100 Subject: [PATCH 58/81] smp: Add SYSCALL support for CPUs --- src/arch/x86_64/apic_longmode.asm | 14 +++++++++++--- src/kernel/threads.cpp | 4 ++-- src/platform/x86_pc/apic_revenant.cpp | 7 +++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/arch/x86_64/apic_longmode.asm b/src/arch/x86_64/apic_longmode.asm index 042f06a169..832f8475b8 100644 --- a/src/arch/x86_64/apic_longmode.asm +++ b/src/arch/x86_64/apic_longmode.asm @@ -3,6 +3,14 @@ extern __gdt64_base_pointer extern revenant_main %define P4_TAB 0x1000 +;; Extended Feature Enable Register (MSR) +%define IA32_EFER_MSR 0xC0000080 +;; EFER Longmode bit +%define LONGMODE_ENABLE 0x100 +;; EFER Execute Disable bit +%define NX_ENABLE 0x800 +;; EFER Syscall enable bit +%define SYSCALL_ENABLE 0x1 [BITS 32] __apic_trampoline: @@ -17,10 +25,10 @@ __apic_trampoline: or eax, 1 << 5 mov cr4, eax - ;; enable long mode - mov ecx, 0xC0000080 ; EFER MSR + ;; enable long mode + mov ecx, IA32_EFER_MSR rdmsr - or eax, 1 << 8 ; Long Mode bit + or eax, (LONGMODE_ENABLE | NX_ENABLE | SYSCALL_ENABLE) wrmsr ;; enable paging diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index 91a2bd51d1..ff061ea667 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -204,8 +204,8 @@ namespace kernel Thread* get_thread(long tid) { auto& threads = ThreadManager::get().threads; auto it = threads.find(tid); - if (it == threads.end()) return nullptr; - return it->second; + if (it != threads.end()) return it->second; + return nullptr; } void resume(long tid) diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index daa35f1125..ad4d872dcd 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -3,6 +3,7 @@ #include "apic_timer.hpp" #include "clocks.hpp" #include "idt.hpp" +#include "init_libc.hpp" #include #include #include @@ -127,6 +128,12 @@ void revenant_main(int cpu) #ifdef ARCH_x86_64 // interrupt stack tables ist_initialize_for_cpu(cpu, this_stack); + + const uint64_t star_kernel_cs = 8ull << 32; + const uint64_t star_user_cs = 8ull << 48; + const uint64_t star = star_kernel_cs | star_user_cs; + x86::CPU::write_msr(IA32_STAR, star); + x86::CPU::write_msr(IA32_LSTAR, (uintptr_t)&__syscall_entry); #endif auto& system = PER_CPU(smp_system); From 230e76680b3227d1d7b4d489dd508701c615c97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Mon, 2 Dec 2019 21:50:04 +0100 Subject: [PATCH 59/81] test: Improve SMP test, test heap --- test/kernel/integration/smp/service.cpp | 49 +++++-------------------- test/kernel/integration/smp/vm.json | 2 +- 2 files changed, 11 insertions(+), 40 deletions(-) diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index db5f2d772c..3a28b35cf3 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -47,6 +47,7 @@ void smp_advanced_test() if (SMP::cpu_count() == 1) printf("SUCCESS\n"); } + SMP::global_lock(); volatile void* test = calloc(4, 128u); assert(test); __sw_barrier(); @@ -54,6 +55,7 @@ void smp_advanced_test() assert(test); __sw_barrier(); free((void*) test); + SMP::global_unlock(); }); // have one CPU enter an event loop @@ -80,37 +82,19 @@ void smp_advanced_test() #include static struct { - std::vector buffers; - spinlock_t spinner; minimal_barrier_t barry; } messages; -__attribute__((format (printf, 1, 2))) -static int smpprintf(const char* fmt, ...) { - char buffer[4096]; - // printf format -> buffer - va_list va; - va_start(va, fmt); - int len = vsnprintf(buffer, sizeof(buffer), fmt, va); - va_end(va); - // serialized append buffer - scoped_spinlock { messages.spinner }; - messages.buffers.emplace_back(buffer, buffer + len); - // return message length - return len; -} - - static void random_irq_handler() { SMP::global_lock(); irq_times++; bool done = (irq_times == SMP::cpu_count()-1); - SMP::global_unlock(); if (done) { - smpprintf("Random IRQ handler called %d times\n", irq_times); + printf("Random IRQ handler called %d times\n", irq_times); } + SMP::global_unlock(); } static const uint8_t IRQ = 110; @@ -120,14 +104,13 @@ void SMP::init_task() } #include -extern "C" void kprintf(const char* format, ...); #include -extern "C" ssize_t write(int, const void*, size_t); -extern "C" void __serial_print1(const char* cstr); __attribute__((noinline)) static void task_main(int cpu) { - kprintf("CPU %d running task\n", SMP::cpu_id()); + SMP::global_lock(); + printf("CPU %d TID %ld running task\n", SMP::cpu_id(), kernel::get_tid()); + SMP::global_unlock(); } void Service::start() @@ -143,17 +126,12 @@ void Service::start() // adding work and signalling CPU=0 is the same as broadcasting to // all active CPUs, and giving work to the first free CPU if (i == 0) continue; // we don't want to do that here, for this test - printf("CPU %d active\n", i); SMP::add_task( [cpu = i] { - __serial_print1("__serial_print1 works\n"); - const char buffer[] = "os::print works\n"; - os::default_stdout(buffer, sizeof(buffer)-1); - os::print(buffer, sizeof(buffer)-1); auto* t = new std::thread(&task_main, cpu); t->join(); - smpprintf("CPU %d running task (thread=%p)\n", SMP::cpu_id(), kernel::get_thread()); + messages.barry.increment(); }, i); @@ -162,16 +140,9 @@ void Service::start() // wait for idiots to finish messages.barry.spin_wait(SMP::cpu_count()-1); - for (const auto& msg : messages.buffers) { - printf("%.*s", (int) msg.size(), msg.data()); - } - messages.buffers.clear(); // trigger interrupt - SMP::broadcast(IRQ); - - printf("SUCCESS\n"); - + //SMP::broadcast(IRQ+32); // the rest - //smp_advanced_test(); + smp_advanced_test(); } diff --git a/test/kernel/integration/smp/vm.json b/test/kernel/integration/smp/vm.json index 989ed1be3d..91db568db0 100644 --- a/test/kernel/integration/smp/vm.json +++ b/test/kernel/integration/smp/vm.json @@ -1,4 +1,4 @@ { "image" : "service.img", - "smp" : 2 + "smp" : 8 } From 6acf05d5af83fe47ba4959b134be9ad2fa09843b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Tue, 3 Dec 2019 00:16:27 +0100 Subject: [PATCH 60/81] smp: Reduce revenant early stack to 16kb --- src/platform/x86_pc/smp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index 6f5b37b45a..f5dcea8445 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -19,7 +19,7 @@ extern "C" { } static const uintptr_t BOOTLOADER_LOCATION = 0x10000; -static const uint32_t REV_STACK_SIZE = 1 << 19; // 512kb +static const uint32_t REV_STACK_SIZE = 1 << 14; // 16kb static_assert((BOOTLOADER_LOCATION & 0xfff) == 0, "Must be page-aligned"); struct apic_boot { From 1ecbbd4883372065ecdd3f4a94a249300a10a236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Tue, 3 Dec 2019 00:16:56 +0100 Subject: [PATCH 61/81] threads: Handle suspension properly for thread migration --- src/kernel/threads.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index ff061ea667..a186f5d561 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -230,11 +230,14 @@ namespace kernel thread->detach(); } this->erase_thread_safely(thread); + this->erase_suspension(thread); auto& tman = ThreadManager::get(cpu); tman.insert_thread(thread); // attach this thread to the managers main thread if (tman.main_thread) { thread->attach(tman.main_thread); + // add to suspended list (since not a main thread) + tman.suspended.push_back(thread); } } void ThreadManager::insert_thread(Thread* thread) From c99807b5bac69c2d242d20a99cb0763069535002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Tue, 3 Dec 2019 00:36:13 +0100 Subject: [PATCH 62/81] smp: Cleanup revenant startup --- src/platform/x86_pc/apic_revenant.cpp | 2 +- src/platform/x86_pc/smp.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index ad4d872dcd..354aca2e67 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -74,7 +74,7 @@ void revenant_thread_main(int cpu) { int stack; while (SMP::cpu_id() != cpu) { - INFO2("AP %d yielding from revenant main", cpu); + THPRINT("AP %d yielding from revenant main", cpu); sched_yield(); } diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index f5dcea8445..dfe603a930 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -78,11 +78,9 @@ void init_SMP() for (const auto& cpu : ACPI::get_cpus()) { if (cpu.id == apic.get_id()) continue; - //printf("Creating main thread for CPU %d\n", cpu.id); // thread should immediately yield auto* t = new std::thread(&revenant_thread_main, cpu.id); const long tid = kernel::get_last_thread_id(); - //printf("Back at the main thread, last thread: %ld\n", tid); // store thread info in SMP structure auto& system = smp_system.at(cpu.id); system.main_thread = t; From 542b4e1eb397ebcbeedaa65ca7dda88adb9131d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 4 Dec 2019 21:29:53 +0100 Subject: [PATCH 63/81] smp: Fix crash when booting APs --- src/platform/x86_pc/apic_revenant.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index 354aca2e67..4ecee322aa 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -72,15 +72,17 @@ static void revenant_task_handler() void revenant_thread_main(int cpu) { - int stack; - while (SMP::cpu_id() != cpu) { - THPRINT("AP %d yielding from revenant main", cpu); - sched_yield(); - } + sched_yield(); + uintptr_t this_stack = smp_main.stack_base + cpu * smp_main.stack_size; + +#ifdef ARCH_x86_64 + // interrupt stack tables + ist_initialize_for_cpu(cpu, this_stack); +#endif // show we are online, and verify CPU ID is correct SMP::global_lock(); - INFO2("AP %d started at %p", SMP::cpu_id(), &stack); + INFO2("AP %d started at %p", SMP::cpu_id(), (void*) this_stack); SMP::global_unlock(); Expects(cpu == SMP::cpu_id()); @@ -117,7 +119,6 @@ void revenant_thread_main(int cpu) void revenant_main(int cpu) { - uintptr_t this_stack = smp_main.stack_base + cpu * smp_main.stack_size; // enable Local APIC x86::APIC::get().smp_enable(); // setup GDT & per-cpu feature @@ -126,9 +127,6 @@ void revenant_main(int cpu) x86::idt_initialize_for_cpu(cpu); #ifdef ARCH_x86_64 - // interrupt stack tables - ist_initialize_for_cpu(cpu, this_stack); - const uint64_t star_kernel_cs = 8ull << 32; const uint64_t star_user_cs = 8ull << 48; const uint64_t star = star_kernel_cs | star_user_cs; From 92204e9a51db6e68739ae94f8ddfeb7ca186b52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 4 Dec 2019 21:30:23 +0100 Subject: [PATCH 64/81] threads: Add CPU member for verification --- api/kernel/threads.hpp | 1 + src/kernel/threads.cpp | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index cff56f6bc4..42c0d443b3 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -16,6 +16,7 @@ namespace kernel struct Thread { long tid; Thread* parent; + int my_cpu; void* my_tls; void* my_stack; // for returning to this Thread diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index a186f5d561..52bb2ecf94 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include @@ -43,6 +42,7 @@ namespace kernel { this->tid = tid; this->parent = parent; + this->my_cpu = SMP::cpu_id(); this->my_stack = stack; if (this->parent) { this->parent->children.push_back(this); @@ -211,8 +211,11 @@ namespace kernel void resume(long tid) { auto* thread = get_thread(tid); + if (thread != nullptr) { + thread->resume(); + } + kprintf("Could not resume thread, missing: %ld\n", tid); assert(thread); - thread->resume(); } void ThreadManager::migrate(long tid, int cpu) @@ -225,12 +228,14 @@ namespace kernel // can't migrate the thread you are in auto* current = get_thread(); assert(current != thread && "Can't migrate current thread"); - // start migration + // remove from old thread manager if (thread->parent != nullptr) { thread->detach(); } this->erase_thread_safely(thread); this->erase_suspension(thread); + // insert into new thread manager + thread->my_cpu = cpu; auto& tman = ThreadManager::get(cpu); tman.insert_thread(thread); // attach this thread to the managers main thread From d89b92339b63bedfa7e4a08b89c097fcda7d6be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 4 Dec 2019 21:30:38 +0100 Subject: [PATCH 65/81] smp: Remove unused stuff from SMP header --- api/smp | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/api/smp b/api/smp index 098e08d271..c4c16cd69d 100644 --- a/api/smp +++ b/api/smp @@ -38,11 +38,6 @@ public: // Return the indices of all initialized CPU cores static const std::vector& active_cpus(); - static int active_cpus(int index){ - return active_cpus().at(index); - } - - // implement this function to execute something on all APs at init static void init_task(); @@ -69,22 +64,6 @@ public: static void global_unlock() noexcept; }; -//#define SMP_DEBUG 1 - -// SMP serialized print helpers -#define SMP_ALWAYS_PRINT(fmt, ...) \ - SMP::global_lock(); \ - printf(fmt, ##__VA_ARGS__); \ - SMP::global_unlock(); - -#ifdef SMP_DEBUG -#define SMP_PRINT(fmt, ...) SMP_ALWAYS_PRINT(fmt, ##__VA_ARGS__) -#define CPULOG(X,...) SMP_PRINT("[C%i]" X,SMP::cpu_id(),##__VA_ARGS__) -#else -#define SMP_PRINT(fmt, ...) /** fmt **/ -#define CPULOG(X,...) ; -#endif - #include #ifdef INCLUDEOS_SMP_ENABLE template From 6c459ecdb818526ad9e6106f59f3582cfe9af838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 4 Dec 2019 21:30:57 +0100 Subject: [PATCH 66/81] system_log: Spin on writes and sequentialize --- src/kernel/system_log.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kernel/system_log.cpp b/src/kernel/system_log.cpp index 3e3955b9d5..243f868bca 100644 --- a/src/kernel/system_log.cpp +++ b/src/kernel/system_log.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include struct Log_buffer { uint64_t magic; @@ -18,6 +18,7 @@ struct Log_buffer { }; static FixedRingBuffer<16384> temp_mrb; +static spinlock_t syslog_spinner = 0; #define MRB_AREA_SIZE (65536) // 64kb #define MRB_LOG_SIZE (MRB_AREA_SIZE - sizeof(MemoryRingBuffer) - sizeof(Log_buffer)) //#define VIRTUAL_MOVE @@ -62,6 +63,7 @@ void SystemLog::clear_flags() void SystemLog::write(const char* buffer, size_t length) { + scoped_spinlock { syslog_spinner }; size_t free = get_mrb()->free_space(); if (free < length) { get_mrb()->discard(length - free); @@ -71,6 +73,7 @@ void SystemLog::write(const char* buffer, size_t length) std::vector SystemLog::copy() { + scoped_spinlock { syslog_spinner }; const auto* buffer = get_mrb()->sequentialize(); return {buffer, buffer + get_mrb()->size()}; } From af8c8239f92442ac3c0f6cc29cb93d42cd44a5fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 4 Dec 2019 21:56:53 +0100 Subject: [PATCH 67/81] smp: Fix memory-related issues, avoid scoped_spinlock --- src/kernel/system_log.cpp | 9 ++++++--- src/musl/brk.cpp | 3 ++- src/musl/futex.cpp | 7 +++---- src/musl/mmap.cpp | 8 ++++++-- src/musl/munmap.cpp | 2 -- src/platform/x86_pc/apic_revenant.cpp | 9 ++++----- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/kernel/system_log.cpp b/src/kernel/system_log.cpp index 243f868bca..890efbfcbe 100644 --- a/src/kernel/system_log.cpp +++ b/src/kernel/system_log.cpp @@ -63,19 +63,22 @@ void SystemLog::clear_flags() void SystemLog::write(const char* buffer, size_t length) { - scoped_spinlock { syslog_spinner }; + lock(syslog_spinner); size_t free = get_mrb()->free_space(); if (free < length) { get_mrb()->discard(length - free); } get_mrb()->write(buffer, length); + unlock(syslog_spinner); } std::vector SystemLog::copy() { - scoped_spinlock { syslog_spinner }; + lock(syslog_spinner); const auto* buffer = get_mrb()->sequentialize(); - return {buffer, buffer + get_mrb()->size()}; + std::vector copy {buffer, buffer + get_mrb()->size()}; + unlock(syslog_spinner); + return copy; } void SystemLog::initialize() diff --git a/src/musl/brk.cpp b/src/musl/brk.cpp index 75f5bddf6b..92cbb291e5 100644 --- a/src/musl/brk.cpp +++ b/src/musl/brk.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include static uintptr_t brk_begin = 0; static uintptr_t brk_current_end = 0; @@ -30,6 +30,7 @@ size_t brk_bytes_free() { static uintptr_t sys_brk(void* addr) { + scoped_spinlock { mr_spinny.memory }; if (addr == nullptr or (uintptr_t)addr > brk_begin + brk_max or (uintptr_t)addr < brk_begin) { diff --git a/src/musl/futex.cpp b/src/musl/futex.cpp index c51c770e73..ed049a3eac 100644 --- a/src/musl/futex.cpp +++ b/src/musl/futex.cpp @@ -1,6 +1,5 @@ #include "stub.hpp" #include -#include #include #define FUTEX_WAIT 0 @@ -16,14 +15,14 @@ #define FUTEX_PRIVATE 128 #define FUTEX_CLOCK_REALTIME 256 -extern void print_backtrace(); - static int sys_futex(int *uaddr, int futex_op, int val, const struct timespec *timeout, int /*val3*/) { if ((futex_op & 0xF) == FUTEX_WAIT) { - THPRINT("FUTEX: Waiting for unlock... uaddr=%d val=%d\n", *uaddr, val); + if (*uaddr != val) return -EAGAIN; + // we have to yield here because of cooperative threads + // TODO: potential for sleeping here while (*uaddr == val) __thread_yield(); } return 0; diff --git a/src/musl/mmap.cpp b/src/musl/mmap.cpp index b692b44f21..6f36b08dbb 100644 --- a/src/musl/mmap.cpp +++ b/src/musl/mmap.cpp @@ -28,12 +28,17 @@ uintptr_t __init_mmap(uintptr_t addr_begin, size_t size) extern "C" __attribute__((weak)) void* kalloc(size_t size) { Expects(kernel::heap_ready()); - return alloc->allocate(size); + lock(mr_spinny.memory); + auto* data = alloc->allocate(size); + unlock(mr_spinny.memory); + return data; } extern "C" __attribute__((weak)) void kfree (void* ptr, size_t size) { + lock(mr_spinny.memory); alloc->deallocate(ptr, size); + unlock(mr_spinny.memory); } size_t mmap_bytes_used() { @@ -61,7 +66,6 @@ static void* sys_mmap(void *addr, size_t length, int /*prot*/, int /*flags*/, return MAP_FAILED; } - scoped_spinlock { mr_spinny.memory }; auto* res = kalloc(length); if (UNLIKELY(res == nullptr)) diff --git a/src/musl/munmap.cpp b/src/musl/munmap.cpp index c1e253b176..89c56eaa5d 100644 --- a/src/musl/munmap.cpp +++ b/src/musl/munmap.cpp @@ -1,5 +1,4 @@ #include "common.hpp" -#include extern "C" void kfree(void* addr, size_t length); @@ -8,7 +7,6 @@ static long sys_munmap(void *addr, size_t length) if(UNLIKELY(length == 0)) return -EINVAL; - scoped_spinlock { mr_spinny.memory }; kfree(addr, length); return 0; } diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index 4ecee322aa..3794d6ae17 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -75,11 +75,6 @@ void revenant_thread_main(int cpu) sched_yield(); uintptr_t this_stack = smp_main.stack_base + cpu * smp_main.stack_size; -#ifdef ARCH_x86_64 - // interrupt stack tables - ist_initialize_for_cpu(cpu, this_stack); -#endif - // show we are online, and verify CPU ID is correct SMP::global_lock(); INFO2("AP %d started at %p", SMP::cpu_id(), (void*) this_stack); @@ -127,6 +122,10 @@ void revenant_main(int cpu) x86::idt_initialize_for_cpu(cpu); #ifdef ARCH_x86_64 + // interrupt stack tables + uintptr_t this_stack = smp_main.stack_base + cpu * smp_main.stack_size; + ist_initialize_for_cpu(cpu, this_stack); + const uint64_t star_kernel_cs = 8ull << 32; const uint64_t star_user_cs = 8ull << 48; const uint64_t star = star_kernel_cs | star_user_cs; From 9a0b268e60f167c80151275807a66a4cdbfc2565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 4 Dec 2019 21:57:19 +0100 Subject: [PATCH 68/81] kernel: Don't use uninitialized fixed vectors anymore --- src/kernel/kernel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/kernel/kernel.cpp b/src/kernel/kernel.cpp index 164dace86d..ec1e31877d 100644 --- a/src/kernel/kernel.cpp +++ b/src/kernel/kernel.cpp @@ -35,8 +35,7 @@ util::KHz os::cpu_freq() { } // stdout redirection -using Print_vec = Fixed_vector; -static Print_vec os_print_handlers(Fixedvector_Init::UNINIT); +static Fixed_vector os_print_handlers; // Plugins struct Plugin_desc { @@ -45,7 +44,7 @@ struct Plugin_desc { os::Plugin func; const char* name; }; -static Fixed_vector plugins(Fixedvector_Init::UNINIT); +static Fixed_vector plugins; const char* os::cmdline_args() noexcept { return kernel::cmdline(); From 429652b0a24b6c5e229e384ce941a67208b6b183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 4 Dec 2019 23:27:43 +0100 Subject: [PATCH 69/81] threads: Remove stray kprint --- src/kernel/threads.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index 52bb2ecf94..bb43901dad 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -3,7 +3,6 @@ #include #include #include -#include extern "C" { void __thread_yield(); @@ -214,8 +213,8 @@ namespace kernel if (thread != nullptr) { thread->resume(); } - kprintf("Could not resume thread, missing: %ld\n", tid); - assert(thread); + THPRINT("Could not resume thread, missing: %ld\n", tid); + assert(thread && "Could not find thread id"); } void ThreadManager::migrate(long tid, int cpu) From 9edccd2db1b313762a69c1de8bcbc712a61598e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Wed, 4 Dec 2019 23:56:41 +0100 Subject: [PATCH 70/81] smp: Remove global functions, add smp_spinlock class --- api/kernel/mrspinny.hpp | 3 +- api/net/buffer_store.hpp | 9 ++---- api/smp_utils | 40 ++++++++++++--------------- api/util/statman.hpp | 4 +-- src/kernel/system_log.cpp | 10 +++---- src/musl/brk.cpp | 10 +++++-- src/musl/mmap.cpp | 8 +++--- src/net/buffer_store.cpp | 9 +++--- src/platform/x86_pc/apic_revenant.cpp | 10 +++---- src/platform/x86_pc/apic_revenant.hpp | 4 +-- src/platform/x86_pc/smp.cpp | 22 +++++++-------- src/util/statman.cpp | 30 ++++++++++---------- 12 files changed, 78 insertions(+), 81 deletions(-) diff --git a/api/kernel/mrspinny.hpp b/api/kernel/mrspinny.hpp index b8e3cbbf25..7ad3d639ba 100644 --- a/api/kernel/mrspinny.hpp +++ b/api/kernel/mrspinny.hpp @@ -2,7 +2,6 @@ #include struct struct_spinny { - spinlock_t memory = 0; - + smp_spinlock memory; }; extern struct_spinny mr_spinny; diff --git a/api/net/buffer_store.hpp b/api/net/buffer_store.hpp index ce7cdf2b48..a67ae6dad9 100644 --- a/api/net/buffer_store.hpp +++ b/api/net/buffer_store.hpp @@ -68,10 +68,8 @@ namespace net int index = -1; std::vector available_; std::vector pools_; -#ifdef INCLUDEOS_SMP_ENABLE // has strict alignment reqs, so put at end - spinlock_t plock = 0; -#endif + smp_spinlock plock; BufferStore(BufferStore&) = delete; BufferStore(BufferStore&&) = delete; BufferStore& operator=(BufferStore&) = delete; @@ -82,10 +80,9 @@ namespace net { auto* buff = (uint8_t*) addr; if (LIKELY(this->is_valid(buff))) { -#ifdef INCLUDEOS_SMP_ENABLE - scoped_spinlock spinlock(this->plock); -#endif + plock.lock(); this->available_.push_back(buff); + plock.unlock(); return; } throw std::runtime_error("Buffer did not belong"); diff --git a/api/smp_utils b/api/smp_utils index 8bddac6e4e..3bcd3eddcf 100644 --- a/api/smp_utils +++ b/api/smp_utils @@ -6,38 +6,34 @@ #include -/// x86-related locking stuff /// -#if defined(ARCH_x86) // Intel 3a 8.10.6.7: 128-byte boundary typedef unsigned int spinlock_t __attribute__((aligned(128))); +struct smp_spinlock +{ + smp_spinlock() = default; + #ifdef INCLUDEOS_SMP_ENABLE -inline void lock(spinlock_t& lock) { - while (!__sync_bool_compare_and_swap(&lock, 0, 1)) { - while (lock) asm("pause"); + inline void lock() { + while (!__sync_bool_compare_and_swap(&m_value, 0, 1)) { + while (m_value) asm("pause"); + } + } + inline void unlock() { + __sync_lock_release(&m_value, 0); } -} -inline void unlock(spinlock_t& lock) { - __sync_lock_release(&lock, 0); // barrier -} #else -inline void lock(spinlock_t&) {} -inline void unlock(spinlock_t&) {} + inline void lock() {} + inline void unlock() {} #endif -struct scoped_spinlock -{ - scoped_spinlock(spinlock_t& ref) noexcept : spinlock(ref) { - //asm("" : : : "memory"); - lock(this->spinlock); - } - ~scoped_spinlock() noexcept { - unlock(spinlock); // barrier - } private: - spinlock_t& spinlock; + spinlock_t m_value; }; +/// x86-related locking stuff /// +#if defined(ARCH_x86) + struct minimal_barrier_t { void increment() noexcept @@ -47,7 +43,7 @@ struct minimal_barrier_t void spin_wait(int max) noexcept { - asm("mfence"); + asm("mfence"); // TODO: fences are standard now while (this->val < max) { asm("pause; nop;"); } diff --git a/api/util/statman.hpp b/api/util/statman.hpp index e7f3f191af..a8e0af521d 100644 --- a/api/util/statman.hpp +++ b/api/util/statman.hpp @@ -138,9 +138,7 @@ class Statman { Statman(); private: std::deque m_stats; -#ifdef INCLUDEOS_SMP_ENABLE - mutable spinlock_t stlock = 0; -#endif + mutable smp_spinlock stlock; ssize_t find_free_stat() const noexcept; uint32_t& unused_stats(); diff --git a/src/kernel/system_log.cpp b/src/kernel/system_log.cpp index 890efbfcbe..bf02fb4248 100644 --- a/src/kernel/system_log.cpp +++ b/src/kernel/system_log.cpp @@ -18,7 +18,7 @@ struct Log_buffer { }; static FixedRingBuffer<16384> temp_mrb; -static spinlock_t syslog_spinner = 0; +static smp_spinlock syslog_lock; #define MRB_AREA_SIZE (65536) // 64kb #define MRB_LOG_SIZE (MRB_AREA_SIZE - sizeof(MemoryRingBuffer) - sizeof(Log_buffer)) //#define VIRTUAL_MOVE @@ -63,21 +63,21 @@ void SystemLog::clear_flags() void SystemLog::write(const char* buffer, size_t length) { - lock(syslog_spinner); + syslog_lock.lock(); size_t free = get_mrb()->free_space(); if (free < length) { get_mrb()->discard(length - free); } get_mrb()->write(buffer, length); - unlock(syslog_spinner); + syslog_lock.unlock(); } std::vector SystemLog::copy() { - lock(syslog_spinner); + syslog_lock.lock(); const auto* buffer = get_mrb()->sequentialize(); std::vector copy {buffer, buffer + get_mrb()->size()}; - unlock(syslog_spinner); + syslog_lock.unlock(); return copy; } diff --git a/src/musl/brk.cpp b/src/musl/brk.cpp index 92cbb291e5..02ebe79545 100644 --- a/src/musl/brk.cpp +++ b/src/musl/brk.cpp @@ -30,11 +30,13 @@ size_t brk_bytes_free() { static uintptr_t sys_brk(void* addr) { - scoped_spinlock { mr_spinny.memory }; + mr_spinny.memory.lock(); if (addr == nullptr or (uintptr_t)addr > brk_begin + brk_max or (uintptr_t)addr < brk_begin) { - return brk_current_end; + uintptr_t retval = brk_current_end; + mr_spinny.memory.unlock(); + return retval; } brk_current_end = (uintptr_t)addr; @@ -44,7 +46,9 @@ static uintptr_t sys_brk(void* addr) brk_initialized = brk_current_end; } - return brk_current_end; + uintptr_t retval = brk_current_end; + mr_spinny.memory.unlock(); + return retval; } extern "C" diff --git a/src/musl/mmap.cpp b/src/musl/mmap.cpp index 6f36b08dbb..f4cda3f3a4 100644 --- a/src/musl/mmap.cpp +++ b/src/musl/mmap.cpp @@ -28,17 +28,17 @@ uintptr_t __init_mmap(uintptr_t addr_begin, size_t size) extern "C" __attribute__((weak)) void* kalloc(size_t size) { Expects(kernel::heap_ready()); - lock(mr_spinny.memory); + mr_spinny.memory.lock(); auto* data = alloc->allocate(size); - unlock(mr_spinny.memory); + mr_spinny.memory.unlock(); return data; } extern "C" __attribute__((weak)) void kfree (void* ptr, size_t size) { - lock(mr_spinny.memory); + mr_spinny.memory.lock(); alloc->deallocate(ptr, size); - unlock(mr_spinny.memory); + mr_spinny.memory.unlock(); } size_t mmap_bytes_used() { diff --git a/src/net/buffer_store.cpp b/src/net/buffer_store.cpp index 8a876ddb2b..be74b84795 100644 --- a/src/net/buffer_store.cpp +++ b/src/net/buffer_store.cpp @@ -43,21 +43,22 @@ namespace net { uint8_t* BufferStore::get_buffer() { -#ifdef INCLUDEOS_SMP_ENABLE - scoped_spinlock spinlock(this->plock); -#endif + plock.lock(); if (UNLIKELY(available_.empty())) { if (this->growth_enabled()) this->create_new_pool(); - else + else { + plock.unlock(); throw std::runtime_error("This BufferStore has run out of buffers"); + } } auto* addr = available_.back(); available_.pop_back(); BSD_PRINT("%d: Gave away %p, %zu buffers remain\n", this->index, addr, available()); + plock.unlock(); return addr; } diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index 3794d6ae17..c08aaff13e 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -21,10 +21,10 @@ using namespace x86; static bool revenant_task_doer(smp_system_stuff& system) { // grab hold on task list - lock(system.tlock); + system.tlock.lock(); if (system.tasks.empty()) { - unlock(system.tlock); + system.tlock.unlock(); // try again return false; } @@ -33,7 +33,7 @@ static bool revenant_task_doer(smp_system_stuff& system) std::vector tasks; system.tasks.swap(tasks); - unlock(system.tlock); + system.tlock.unlock(); for (auto& task : tasks) { @@ -44,9 +44,9 @@ static bool revenant_task_doer(smp_system_stuff& system) if (task.done) { // NOTE: specifically pushing to 'smp' here, and not 'system' - lock(PER_CPU(smp_system).flock); + PER_CPU(smp_system).flock.lock(); PER_CPU(smp_system).completed.push_back(std::move(task.done)); - unlock(PER_CPU(smp_system).flock); + PER_CPU(smp_system).flock.unlock(); // signal home PER_CPU(smp_system).work_done = true; } diff --git a/src/platform/x86_pc/apic_revenant.hpp b/src/platform/x86_pc/apic_revenant.hpp index 179aa46f12..7e11bebf40 100644 --- a/src/platform/x86_pc/apic_revenant.hpp +++ b/src/platform/x86_pc/apic_revenant.hpp @@ -36,8 +36,8 @@ extern smp_stuff smp_main; struct smp_system_stuff { - spinlock_t tlock = 0; - spinlock_t flock = 0; + smp_spinlock tlock; + smp_spinlock flock; std::vector tasks; std::vector completed; bool work_done = false; diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index dfe603a930..bdcc7f1ed2 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -124,9 +124,9 @@ void init_SMP() smp_main.bitmap.atomic_reset(next); // get jobs from other CPU std::vector done; - lock(smp_system[next].flock); + smp_system[next].flock.lock(); smp_system[next].completed.swap(done); - unlock(smp_system[next].flock); + smp_system[next].flock.unlock(); // execute all tasks for (auto& func : done) func(); @@ -175,9 +175,9 @@ void SMP::init_task() void SMP::add_task(smp_task_func task, smp_done_func done, int cpu) { #ifdef INCLUDEOS_SMP_ENABLE - lock(smp_system[cpu].tlock); + smp_system[cpu].tlock.lock(); smp_system[cpu].tasks.emplace_back(std::move(task), std::move(done)); - unlock(smp_system[cpu].tlock); + smp_system[cpu].tlock.unlock(); #else assert(cpu == 0); task(); done(); @@ -186,9 +186,9 @@ void SMP::add_task(smp_task_func task, smp_done_func done, int cpu) void SMP::add_task(smp_task_func task, int cpu) { #ifdef INCLUDEOS_SMP_ENABLE - lock(smp_system[cpu].tlock); + smp_system[cpu].tlock.lock(); smp_system[cpu].tasks.emplace_back(std::move(task), nullptr); - unlock(smp_system[cpu].tlock); + smp_system[cpu].tlock.unlock(); #else assert(cpu == 0); task(); @@ -199,9 +199,9 @@ void SMP::add_bsp_task(smp_done_func task) #ifdef INCLUDEOS_SMP_ENABLE // queue job auto& system = PER_CPU(smp_system); - lock(system.flock); + system.flock.lock(); system.completed.push_back(std::move(task)); - unlock(system.flock); + system.flock.unlock(); // set this CPU bit smp_main.bitmap.atomic_set(SMP::cpu_id()); // call home @@ -239,13 +239,13 @@ void SMP::unicast(int cpu, uint8_t irq) x86::APIC::get().send_ipi(cpu, IRQ_BASE + irq); } -static spinlock_t __global_lock = 0; +static smp_spinlock g_global_lock; void SMP::global_lock() noexcept { - lock(__global_lock); + g_global_lock.lock(); } void SMP::global_unlock() noexcept { - unlock(__global_lock); + g_global_lock.unlock(); } diff --git a/src/util/statman.cpp b/src/util/statman.cpp index f0828186d6..ebc15922cd 100644 --- a/src/util/statman.cpp +++ b/src/util/statman.cpp @@ -58,51 +58,54 @@ Statman::Statman() { Stat& Statman::create(const Stat::Stat_type type, const std::string& name) { -#ifdef INCLUDEOS_SMP_ENABLE - volatile scoped_spinlock lock(this->stlock); -#endif + stlock.lock(); if (name.empty()) throw Stats_exception("Cannot create Stat with no name"); const ssize_t idx = this->find_free_stat(); if (idx < 0) { m_stats.emplace_back(type, name); - return m_stats.back(); + auto& retval = m_stats.back(); + stlock.unlock(); + return retval; } // note: we have to create this early in case it throws auto& stat = *new (&m_stats[idx]) Stat(type, name); unused_stats()--; // decrease unused stats + stlock.unlock(); return stat; } Stat& Statman::get(const Stat* st) { -#ifdef INCLUDEOS_SMP_ENABLE - volatile scoped_spinlock lock(this->stlock); -#endif + stlock.lock(); for (auto& stat : this->m_stats) { if (&stat == st) { - if (stat.unused() == false) + if (stat.unused() == false) { + stlock.unlock(); return stat; + } + stlock.unlock(); throw Stats_exception("Accessing deleted stat"); } } + stlock.unlock(); throw std::out_of_range("Not a valid stat in this statman instance"); } Stat& Statman::get_by_name(const char* name) { -#ifdef INCLUDEOS_SMP_ENABLE - volatile scoped_spinlock lock(this->stlock); -#endif + stlock.lock(); for (auto& stat : this->m_stats) { if (stat.unused() == false) { if (strncmp(stat.name(), name, Stat::MAX_NAME_LEN) == 0) + stlock.unlock(); return stat; } } + stlock.unlock(); throw std::out_of_range("No stat found with exact given name"); } @@ -123,12 +126,11 @@ Stat& Statman::get_or_create(const Stat::Stat_type type, const std::string& name void Statman::free(void* addr) { auto& stat = this->get((Stat*) addr); -#ifdef INCLUDEOS_SMP_ENABLE - volatile scoped_spinlock lock(this->stlock); -#endif + stlock.lock(); // delete entry new (&stat) Stat(Stat::FLOAT, ""); unused_stats()++; // increase unused stats + stlock.unlock(); } ssize_t Statman::find_free_stat() const noexcept From f8a1a1cd88240b228d99f447fe7088d729dee6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Thu, 5 Dec 2019 17:49:47 +0100 Subject: [PATCH 71/81] test: Update the SMP test, add heap checks --- test/kernel/integration/smp/service.cpp | 21 +++++++++++++++++++-- test/kernel/integration/smp/vm.json | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index 3a28b35cf3..8ca4921342 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -109,7 +109,8 @@ __attribute__((noinline)) static void task_main(int cpu) { SMP::global_lock(); - printf("CPU %d TID %ld running task\n", SMP::cpu_id(), kernel::get_tid()); + printf("CPU %d (%d) TID %ld running task\n", + SMP::cpu_id(), cpu, kernel::get_tid()); SMP::global_unlock(); } @@ -132,6 +133,22 @@ void Service::start() auto* t = new std::thread(&task_main, cpu); t->join(); + const char TC = kernel::get_tid() & 0xFF; + volatile void* test = calloc(4, 128u); + assert(test); + __sw_barrier(); + for (int i = 0; i < 128; i++) { + ((char*)test)[i] = TC; + } + __sw_barrier(); + test = realloc((void*) test, 128u); + assert(test); + __sw_barrier(); + for (int i = 0; i < 128; i++) { + assert(((char*)test)[i] == TC); + } + free((void*) test); + messages.barry.increment(); }, i); @@ -142,7 +159,7 @@ void Service::start() messages.barry.spin_wait(SMP::cpu_count()-1); // trigger interrupt - //SMP::broadcast(IRQ+32); + SMP::broadcast(IRQ); // the rest smp_advanced_test(); } diff --git a/test/kernel/integration/smp/vm.json b/test/kernel/integration/smp/vm.json index 91db568db0..96bc16da35 100644 --- a/test/kernel/integration/smp/vm.json +++ b/test/kernel/integration/smp/vm.json @@ -1,4 +1,4 @@ { "image" : "service.img", - "smp" : 8 + "smp" : 16 } From 6b7bc5300125108c1fc6e9f57fee90103da9df6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 7 Dec 2019 01:15:19 +0100 Subject: [PATCH 72/81] threads: Add automatic thread migration support --- api/kernel/threads.hpp | 14 ++- api/smp_utils | 2 +- src/arch/x86_64/__syscall_entry.asm | 16 ++- src/arch/x86_64/syscall_entry.cpp | 31 +++++- src/kernel/threads.cpp | 123 ++++++++++++++++++------ src/platform/x86_pc/smp.cpp | 4 +- test/kernel/integration/smp/service.cpp | 37 ++++++- 7 files changed, 184 insertions(+), 43 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 42c0d443b3..2e4f16c9e5 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -1,5 +1,6 @@ #pragma once #include +#include #include #include #include @@ -16,7 +17,6 @@ namespace kernel struct Thread { long tid; Thread* parent; - int my_cpu; void* my_tls; void* my_stack; // for returning to this Thread @@ -32,10 +32,11 @@ namespace kernel void yield(); void exit(); void suspend(void* ret_instr, void* ret_stack); - void activate(void* newtls); + void set_tls(void* newtls); void resume(); void detach(); void attach(Thread* parent); + void stack_push(uintptr_t value); private: void libc_store_this(); }; @@ -45,17 +46,23 @@ namespace kernel std::map threads; std::deque suspended; Thread* main_thread = nullptr; + Thread* next_migration_thread = nullptr; + + delegate on_new_thread = nullptr; static ThreadManager& get() noexcept; static ThreadManager& get(int cpu); - void migrate(long tid, int cpu); + Thread* detach(long tid); + void attach(Thread* thread); + bool has_thread(long tid) const noexcept { return threads.find(tid) != threads.end(); } void insert_thread(Thread* thread); void erase_thread_safely(Thread* thread); void erase_suspension(Thread* t); void suspend(Thread* t) { suspended.push_back(t); } + void finish_migration_to(Thread* next); Thread* wakeup_next(); }; @@ -88,6 +95,7 @@ namespace kernel void resume(long tid); void setup_main_thread(long tid = 0) noexcept; + void setup_automatic_thread_multiprocessing(); } extern "C" { diff --git a/api/smp_utils b/api/smp_utils index 3bcd3eddcf..9e97688493 100644 --- a/api/smp_utils +++ b/api/smp_utils @@ -49,7 +49,7 @@ struct minimal_barrier_t } } - void reset(int val) noexcept + void reset(int val = 0) noexcept { asm volatile("mfence"); this->val = val; diff --git a/src/arch/x86_64/__syscall_entry.asm b/src/arch/x86_64/__syscall_entry.asm index b4debb5534..2e14c75ede 100644 --- a/src/arch/x86_64/__syscall_entry.asm +++ b/src/arch/x86_64/__syscall_entry.asm @@ -1,6 +1,7 @@ global __syscall_entry:function global __clone_helper:function global __clone_return:function +global __migrate_resume:function extern syscall_entry ;; x86_64 / System V ABI calling convention @@ -84,6 +85,7 @@ __clone_helper: call syscall_clone ;; remove old rsp add rsp, 0x18 +__clone_resume: ;; return value preserved POPAQ PUSHAQ @@ -98,11 +100,19 @@ __clone_helper: jmp QWORD rcx __clone_return: - mov rbx, rdi - mov rsp, rsi + mov rsp, rdi pop rax ;; restore thread id pop rbp POPAQ ;; - jmp QWORD rbx + jmp QWORD rcx + +__migrate_resume: + mov rsp, rdi + + ;; restore saved registers + POPAQ + ;; rax zero (child thread) + xor rax, rax + jmp QWORD rcx diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index 731e07f551..e83fda5533 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -8,6 +8,7 @@ extern "C" { long syscall_SYS_set_thread_area(void* u_info); + void __clone_return(void* stack); } #define ARCH_SET_GS 0x1001 @@ -70,11 +71,31 @@ pthread_t syscall_clone(void* next_instr, kprintf("-> callback: "); print_symbol(callback); #endif - // suspend parent thread - parent->suspend(next_instr, old_stack); - // activate new TLS location - thread->activate(newtls); - return thread->tid; + // set TLS location (and set self) + thread->set_tls(newtls); + + auto& tman = kernel::ThreadManager::get(); + if (tman.on_new_thread != nullptr) { + // push 8 values onto new stack, as the old stack will get + // used immediately by the returning thread + constexpr int STV = 8; + for (int i = 0; i < STV; i++) { + thread->stack_push(*((uintptr_t*) old_stack + STV + 1 - i)); + } + // potentially get child stolen by migration callback + thread = tman.on_new_thread(tman, thread); + } + + if (thread) { + // suspend parent thread + parent->suspend(next_instr, old_stack); + // continue on child + kernel::set_thread_area(thread->my_tls); + return thread->tid; + } + // continue with parent + __clone_return(old_stack); + __builtin_unreachable(); } extern "C" diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index bb43901dad..94d4fdf4cf 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -3,13 +3,16 @@ #include #include #include +#include extern "C" { void __thread_yield(); void __thread_restore(void* nexti, void* stack); - void __clone_return(void* nexti, void* stack); + void __clone_return(void* stack); + long __migrate_resume(void* stack); long syscall_SYS_set_thread_area(void* u_info); } +static constexpr bool PRIORITIZE_PARENT = true; struct libc_internal { void* self; @@ -41,25 +44,26 @@ namespace kernel { this->tid = tid; this->parent = parent; - this->my_cpu = SMP::cpu_id(); this->my_stack = stack; if (this->parent) { this->parent->children.push_back(this); } - } - + void Thread::stack_push(uintptr_t value) + { + this->my_stack = (void*) ((uintptr_t) this->my_stack - sizeof(uintptr_t)); + *((uintptr_t*) this->my_stack) = value; + } void Thread::libc_store_this() { auto* s = (libc_internal*) this->my_tls; s->kthread = this; } - void Thread::activate(void* newtls) + void Thread::set_tls(void* newtls) { this->my_tls = newtls; // store ourselves in the guarded libc structure this->libc_store_this(); - set_thread_area(this->my_tls); } void Thread::suspend(void* ret_instr, void* ret_stack) @@ -73,20 +77,21 @@ namespace kernel } void Thread::yield() { + this->yielded = true; // resume a waiting thread auto* next = ThreadManager::get().wakeup_next(); // resume next thread - this->yielded = true; next->resume(); } void Thread::exit() { const bool exiting_myself = (get_thread() == this); + auto& tman = ThreadManager::get(); assert(this->parent != nullptr); // detach children for (auto* child : this->children) { - child->parent = ThreadManager::get().main_thread; + child->parent = tman.main_thread; } // temporary copy of parent thread pointer auto* next = this->parent; @@ -98,14 +103,21 @@ namespace kernel *(pid_t*) this->clear_tid = 0; } // delete this thread - ThreadManager::get().erase_thread_safely(this); + tman.erase_thread_safely(this); // free thread resources delete this; // resume parent thread if (exiting_myself) { - ThreadManager::get().erase_suspension(next); - next->resume(); + if constexpr (PRIORITIZE_PARENT) { + // only resume this thread if its on this CPU + if (tman.has_thread(next->tid)) { + tman.erase_suspension(next); + next->resume(); + } + } + next = tman.wakeup_next(); + next->resume(); } } void Thread::detach() @@ -133,7 +145,7 @@ namespace kernel // NOTE: the RAX return value here is CHILD thread id, not this if (this->yielded == false) { set_thread_area(this->my_tls); - __clone_return(this->stored_nexti, this->stored_stack); + __clone_return(this->stored_stack); } else { this->yielded = false; @@ -173,8 +185,9 @@ namespace kernel if (tid == 0) { core0_main_thread.init(0, nullptr, (void*) &stack_value); + ThreadManager::get(0).insert_thread(&core0_main_thread); // allow exiting in main thread - core0_main_thread.activate(get_thread_area()); + core0_main_thread.set_tls(get_thread_area()); // make threadmanager0 use this main thread // NOTE: don't use SMP-aware function here ThreadManager::get(0).main_thread = &core0_main_thread; @@ -186,6 +199,33 @@ namespace kernel ThreadManager::get().main_thread = main_thread; } } + void setup_automatic_thread_multiprocessing() + { + ThreadManager::get().on_new_thread = + [] (ThreadManager& man, Thread* thread) -> Thread* { + auto* kthread = man.detach(thread->tid); + SMP::add_task( + [kthread] () { +#ifdef THREADS_DEBUG + SMP::global_lock(); + THPRINT("CPU %d resuming migrated thread %ld (RIP=%p, Stack=%p)\n", + SMP::cpu_id(), kthread->tid, + (void*) kthread->stored_nexti, + (void*) kthread->my_stack); + SMP::global_unlock(); +#endif + // attach this thread on this core + ThreadManager::get().attach(kthread); + // set kthread as the next thread after yield + ThreadManager::get().finish_migration_to(kthread); + // NOTE: returns here!! + }, nullptr); + // signal that work exists in the global queue + SMP::signal(); + // indicate that the thread has been detached + return nullptr; + }; + } void* get_thread_area() { @@ -217,7 +257,7 @@ namespace kernel assert(thread && "Could not find thread id"); } - void ThreadManager::migrate(long tid, int cpu) + Thread* ThreadManager::detach(long tid) { auto* thread = get_thread(tid); // can't migrate missing thread @@ -233,15 +273,16 @@ namespace kernel } this->erase_thread_safely(thread); this->erase_suspension(thread); + // return the free, detached thread + return thread; + } + void ThreadManager::attach(Thread* thread) + { // insert into new thread manager - thread->my_cpu = cpu; - auto& tman = ThreadManager::get(cpu); - tman.insert_thread(thread); + this->insert_thread(thread); // attach this thread to the managers main thread - if (tman.main_thread) { - thread->attach(tman.main_thread); - // add to suspended list (since not a main thread) - tman.suspended.push_back(thread); + if (this->main_thread) { + thread->attach(this->main_thread); } } void ThreadManager::insert_thread(Thread* thread) @@ -278,22 +319,46 @@ namespace kernel } } } + void ThreadManager::finish_migration_to(Thread* thread) + { + // special migration-yield to next thread + this->next_migration_thread = thread; + __thread_yield(); // NOTE: function returns!! + } } extern "C" void __thread_suspend_and_yield(void* next_instr, void* stack) { - // don't go through the ardous yielding process when alone - if (kernel::ThreadManager::get().suspended.empty()) { + auto& man = kernel::ThreadManager::get(); + // don't go through the ardous yielding process when alone + if (man.suspended.empty() && man.next_migration_thread == nullptr) { THPRINT("Nothing to yield to. Returning... nexti=%p stack=%p\n", - next_instr, stack); + next_instr, stack); return; } - // suspend current thread - auto* thread = kernel::get_thread(); - thread->suspend(next_instr, stack); - // resume some other thread - thread->yield(); + // suspend current thread + auto* thread = kernel::get_thread(); + thread->suspend(next_instr, stack); + thread->yielded = true; + + if (man.next_migration_thread == nullptr) + { + // resume some other thread + thread->yield(); + } + else + { + // resume migrated thread + auto* kthread = man.next_migration_thread; + man.next_migration_thread = nullptr; + // resume the thread on this core + kernel::set_thread_area(kthread->my_tls); + assert(kernel::get_thread() == kthread); + + __migrate_resume(kthread->my_stack); + } + __builtin_unreachable(); } extern "C" diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index bdcc7f1ed2..edf147ced3 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -85,7 +85,9 @@ void init_SMP() auto& system = smp_system.at(cpu.id); system.main_thread = t; system.main_thread_id = tid; - kernel::ThreadManager::get().migrate(tid, cpu.id); + // migrate thread to its CPU + auto* kthread = kernel::ThreadManager::get().detach(tid); + kernel::ThreadManager::get(cpu.id).attach(kthread); } // turn on CPUs diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index 8ca4921342..349f833d62 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -34,7 +34,7 @@ void smp_advanced_test() if (PER_CPU(testing).value == SMP::cpu_id()) __sync_fetch_and_or(&job, 1 << i); }, - [i] { + [] { // job completion completed++; @@ -113,6 +113,14 @@ static void task_main(int cpu) SMP::cpu_id(), cpu, kernel::get_tid()); SMP::global_unlock(); } +static void multiprocess_task(int cpu) +{ + SMP::global_lock(); + printf("CPU %d (%d) TID %ld running automatic multi-processing task\n", + SMP::cpu_id(), cpu, kernel::get_tid()); + SMP::global_unlock(); + messages.barry.increment(); +} void Service::start() { @@ -156,7 +164,34 @@ void Service::start() } // wait for idiots to finish + SMP::global_lock(); + printf("Waiting for %zu tasks from TID=%ld\n", + SMP::cpu_count()-1, kernel::get_tid()); + SMP::global_unlock(); messages.barry.spin_wait(SMP::cpu_count()-1); + messages.barry.reset(); + + // threads will now be migrated to free CPUs + kernel::setup_automatic_thread_multiprocessing(); + + std::vector mpthreads; + for (unsigned i = 0; i < SMP::active_cpus().size() - 1; i++) + { + mpthreads.push_back( + new std::thread(&multiprocess_task, i) + ); + } + + SMP::global_lock(); + printf("Waiting for %zu multi-processing threads from TID=%ld\n", + mpthreads.size(), kernel::get_tid()); + SMP::global_unlock(); + messages.barry.spin_wait(mpthreads.size()); + + printf("Joining %zu threads\n", mpthreads.size()); + for (auto* t : mpthreads) { + t->join(); + } // trigger interrupt SMP::broadcast(IRQ); From cf24c6a607d5a2d0474aba1e6daf2e1c0b31c010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 7 Dec 2019 10:49:59 +0100 Subject: [PATCH 73/81] test: Join the multi-processing threads immediately --- test/kernel/integration/smp/service.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index 349f833d62..e9c948e45e 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -183,15 +183,14 @@ void Service::start() } SMP::global_lock(); - printf("Waiting for %zu multi-processing threads from TID=%ld\n", - mpthreads.size(), kernel::get_tid()); + printf("Joining %zu threads\n", mpthreads.size()); SMP::global_unlock(); - messages.barry.spin_wait(mpthreads.size()); - printf("Joining %zu threads\n", mpthreads.size()); for (auto* t : mpthreads) { t->join(); } + // the dead threads should have already made this barrier complete! + messages.barry.spin_wait(SMP::cpu_count()-1); // trigger interrupt SMP::broadcast(IRQ); From 8ab1e7ff5a75d4df6b6a12d4355eb52fe9ccd7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 7 Dec 2019 11:28:36 +0100 Subject: [PATCH 74/81] threads: Remove Thread::yield(), move sched_setscheduler to sched_yield --- api/kernel/threads.hpp | 1 - src/kernel/threads.cpp | 23 +++++------------------ src/musl/sched_yield.cpp | 7 +++++++ 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 2e4f16c9e5..375fc1aa65 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -29,7 +29,6 @@ namespace kernel std::vector children; void init(long tid, Thread* parent, void* stack); - void yield(); void exit(); void suspend(void* ret_instr, void* ret_stack); void set_tls(void* newtls); diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index 94d4fdf4cf..12008c2113 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -75,14 +75,6 @@ namespace kernel // add to suspended (NB: can throw) ThreadManager::get().suspend(this); } - void Thread::yield() - { - this->yielded = true; - // resume a waiting thread - auto* next = ThreadManager::get().wakeup_next(); - // resume next thread - next->resume(); - } void Thread::exit() { @@ -216,7 +208,7 @@ namespace kernel #endif // attach this thread on this core ThreadManager::get().attach(kthread); - // set kthread as the next thread after yield + // resume kthread after yielding this thread ThreadManager::get().finish_migration_to(kthread); // NOTE: returns here!! }, nullptr); @@ -344,8 +336,10 @@ void __thread_suspend_and_yield(void* next_instr, void* stack) if (man.next_migration_thread == nullptr) { - // resume some other thread - thread->yield(); + // resume some other thread + auto* next = man.wakeup_next(); + // resume next thread + next->resume(); } else { @@ -360,10 +354,3 @@ void __thread_suspend_and_yield(void* next_instr, void* stack) } __builtin_unreachable(); } - -extern "C" -long syscall_SYS_sched_setscheduler(pid_t /*pid*/, int /*policy*/, - const struct sched_param* /*param*/) -{ - return 0; -} diff --git a/src/musl/sched_yield.cpp b/src/musl/sched_yield.cpp index c3dd5f48ee..63772f0e31 100644 --- a/src/musl/sched_yield.cpp +++ b/src/musl/sched_yield.cpp @@ -12,3 +12,10 @@ extern "C" long syscall_SYS_sched_yield() { return strace(sys_sched_yield, "sched_yield"); } + +extern "C" +long syscall_SYS_sched_setscheduler(pid_t /*pid*/, int /*policy*/, + const struct sched_param* /*param*/) +{ + return 0; +} From 03c72875946c30e913c4bd2ca1713320e3062501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 7 Dec 2019 12:46:40 +0100 Subject: [PATCH 75/81] threads: Remove nexti member, make yielding explicit --- api/kernel/threads.hpp | 5 ++--- src/arch/x86_64/syscall_entry.cpp | 6 +++--- src/arch/x86_64/threads.asm | 5 ++--- src/kernel/threads.cpp | 32 +++++++++++++++---------------- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 375fc1aa65..4dc601f8cd 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -7,7 +7,7 @@ //#define THREADS_DEBUG 1 #ifdef THREADS_DEBUG -#define THPRINT(fmt, ...) kprintf(fmt, ##__VA_ARGS__) +#define THPRINT(fmt, ...) { SMP::global_lock(); kprintf(fmt, ##__VA_ARGS__); SMP::global_unlock(); } #else #define THPRINT(fmt, ...) /* fmt */ #endif @@ -21,7 +21,6 @@ namespace kernel void* my_stack; // for returning to this Thread void* stored_stack = nullptr; - void* stored_nexti = nullptr; bool yielded = false; // address zeroed when exiting void* clear_tid = nullptr; @@ -30,7 +29,7 @@ namespace kernel void init(long tid, Thread* parent, void* stack); void exit(); - void suspend(void* ret_instr, void* ret_stack); + void suspend(bool yielded, void* ret_stack); void set_tls(void* newtls); void resume(); void detach(); diff --git a/src/arch/x86_64/syscall_entry.cpp b/src/arch/x86_64/syscall_entry.cpp index e83fda5533..7dca7b6a31 100644 --- a/src/arch/x86_64/syscall_entry.cpp +++ b/src/arch/x86_64/syscall_entry.cpp @@ -58,7 +58,7 @@ pthread_t syscall_clone(void* next_instr, auto* parent = kernel::get_thread(); auto* thread = kernel::thread_create(parent, flags, ctid, stack); -#ifdef THREADS_DEBUG +#ifdef VERBOSE_CLONE_SYSCALL kprintf("clone syscall creating thread %ld\n", thread->tid); kprintf("-> nexti: "); print_symbol(next_instr); kprintf("-> flags: %#lx\n", flags); @@ -87,8 +87,8 @@ pthread_t syscall_clone(void* next_instr, } if (thread) { - // suspend parent thread - parent->suspend(next_instr, old_stack); + // suspend parent thread (not yielded) + parent->suspend(false, old_stack); // continue on child kernel::set_thread_area(thread->my_tls); return thread->tid; diff --git a/src/arch/x86_64/threads.asm b/src/arch/x86_64/threads.asm index 21cd4e3df8..c2808a6f46 100644 --- a/src/arch/x86_64/threads.asm +++ b/src/arch/x86_64/threads.asm @@ -24,8 +24,7 @@ __thread_yield: push r14 push r15 ;; now save this thread - mov rdi, __thread_restore - mov rsi, rsp ;; my stack + mov rdi, rsp ;; my stack ;; align stack sub rsp, 8 call __thread_suspend_and_yield @@ -34,7 +33,7 @@ __thread_yield: jmp __thread_restore2 __thread_restore: - mov rsp, rsi + mov rsp, rdi __thread_restore2: ;; restore saved registers pop r15 diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index 12008c2113..a0ebfd0e1e 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -7,7 +7,7 @@ extern "C" { void __thread_yield(); - void __thread_restore(void* nexti, void* stack); + void __thread_restore(void* stack); void __clone_return(void* stack); long __migrate_resume(void* stack); long syscall_SYS_set_thread_area(void* u_info); @@ -66,11 +66,11 @@ namespace kernel this->libc_store_this(); } - void Thread::suspend(void* ret_instr, void* ret_stack) + void Thread::suspend(bool yielded, void* ret_stack) { - THPRINT("Thread %ld storing return point %p with stack %p\n", - this->tid, ret_instr, ret_stack); - this->stored_nexti = ret_instr; + THPRINT("Thread %ld suspended, yielded=%d stack=%p\n", + this->tid, yielded, ret_stack); + this->yielded = yielded; this->stored_stack = ret_stack; // add to suspended (NB: can throw) ThreadManager::get().suspend(this); @@ -98,7 +98,7 @@ namespace kernel tman.erase_thread_safely(this); // free thread resources delete this; - // resume parent thread + // NOTE: cannot deref this after this if (exiting_myself) { if constexpr (PRIORITIZE_PARENT) { @@ -132,8 +132,8 @@ namespace kernel void Thread::resume() { - THPRINT("Returning to tid=%ld tls=%p nexti=%p stack=%p\n", - this->tid, this->my_tls, this->stored_nexti, this->stored_stack); + THPRINT("Returning to tid=%ld tls=%p stack=%p\n", + this->tid, this->my_tls, this->stored_stack); // NOTE: the RAX return value here is CHILD thread id, not this if (this->yielded == false) { set_thread_area(this->my_tls); @@ -142,7 +142,7 @@ namespace kernel else { this->yielded = false; set_thread_area(this->my_tls); - __thread_restore(this->stored_nexti, this->stored_stack); + __thread_restore(this->stored_stack); } __builtin_unreachable(); } @@ -200,9 +200,8 @@ namespace kernel [kthread] () { #ifdef THREADS_DEBUG SMP::global_lock(); - THPRINT("CPU %d resuming migrated thread %ld (RIP=%p, Stack=%p)\n", + THPRINT("CPU %d resuming migrated thread %ld (stack=%p)\n", SMP::cpu_id(), kthread->tid, - (void*) kthread->stored_nexti, (void*) kthread->my_stack); SMP::global_unlock(); #endif @@ -319,20 +318,19 @@ namespace kernel } } +// called from __thread_yield assembly, cannot return extern "C" -void __thread_suspend_and_yield(void* next_instr, void* stack) +void __thread_suspend_and_yield(void* stack) { auto& man = kernel::ThreadManager::get(); // don't go through the ardous yielding process when alone if (man.suspended.empty() && man.next_migration_thread == nullptr) { - THPRINT("Nothing to yield to. Returning... nexti=%p stack=%p\n", - next_instr, stack); + THPRINT("Nothing to yield to. Returning... stack=%p\n", stack); return; } - // suspend current thread + // suspend current thread (yielded) auto* thread = kernel::get_thread(); - thread->suspend(next_instr, stack); - thread->yielded = true; + thread->suspend(true, stack); if (man.next_migration_thread == nullptr) { From 3bbbb47a2c5d0f419f6d966f1d1b35ba6612ff7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 7 Dec 2019 15:25:02 +0100 Subject: [PATCH 76/81] smp: Make sure IST runs serialized (for now) --- api/kernel/threads.hpp | 2 +- src/arch/x86_64/apic_longmode.asm | 10 ++++++---- src/arch/x86_64/ist.cpp | 14 ++++++++------ src/kernel/threads.cpp | 17 ++++++++++------- src/platform/x86_pc/apic_revenant.cpp | 4 ++-- test/kernel/integration/smp/service.cpp | 6 +++--- 6 files changed, 30 insertions(+), 23 deletions(-) diff --git a/api/kernel/threads.hpp b/api/kernel/threads.hpp index 4dc601f8cd..9c6bb62b27 100644 --- a/api/kernel/threads.hpp +++ b/api/kernel/threads.hpp @@ -92,7 +92,7 @@ namespace kernel void resume(long tid); - void setup_main_thread(long tid = 0) noexcept; + Thread* setup_main_thread(long tid = 0); void setup_automatic_thread_multiprocessing(); } diff --git a/src/arch/x86_64/apic_longmode.asm b/src/arch/x86_64/apic_longmode.asm index 832f8475b8..c5d09a837b 100644 --- a/src/arch/x86_64/apic_longmode.asm +++ b/src/arch/x86_64/apic_longmode.asm @@ -36,6 +36,12 @@ __apic_trampoline: or eax, 1 << 31 mov cr0, eax ; Set control register 0 to the A-register. + ;; retrieve CPU id -> rbx + mov eax, 1 + cpuid + shr ebx, 24 + ;; TODO: load a proper GDT here instead of a shared one + ;; load 64-bit GDT lgdt [__gdt64_base_pointer] jmp 0x8:long_mode ;; 0x8 = code seg @@ -52,10 +58,6 @@ long_mode: ;; align stack and rsp, -16 - ;; retrieve CPU id - mov rax, 1 - cpuid - shr rbx, 24 ;; geronimo! mov rdi, rbx call revenant_main diff --git a/src/arch/x86_64/ist.cpp b/src/arch/x86_64/ist.cpp index 1d047d4473..b4b96434cf 100644 --- a/src/arch/x86_64/ist.cpp +++ b/src/arch/x86_64/ist.cpp @@ -60,19 +60,17 @@ static stack create_stack_virt(size_t size, const char* name) stacks_begin += util::bits::roundto<4096>(size) + GUARD_SIZE; // Align stack pointer to bottom of stack minus a pop - auto sp = map.lin + size - 8; - sp &= ~uintptr_t(0xf); + auto sp = map.lin + size; // Force page fault if mapped area isn't writable - ((char*)sp)[0] = '!'; + ((char*)sp)[-1] = '!'; return {(void*) sp, phys}; } static stack create_stack_simple(size_t size, const char* /*name*/) { auto* phys = (char*)memalign(4096, size); - uintptr_t sp = (uintptr_t) phys + size - 8; - sp &= ~uintptr_t(0xf); + uintptr_t sp = (uintptr_t) phys + size; return {(void*) sp, phys}; } @@ -95,8 +93,11 @@ namespace x86 if (cpu > 0) create_stack = create_stack_simple; auto& ist = lm_ist.at(cpu); - memset(&ist.tss, 0, sizeof(AMD64_TSS)); + std::memset(&ist.tss, 0, sizeof(AMD64_TSS)); + // have to do this for now + // FIXME: find out why we need to do this +SMP::global_lock(); auto st = create_stack(INTR_SIZE, "Intr stack"); ist.tss.ist1 = (uintptr_t) st.sp; ist.intr = st.phys; @@ -126,5 +127,6 @@ namespace x86 tgd->td_hibase = tss_addr >> 24; __amd64_load_tr(8 * 3); +SMP::global_unlock(); } } diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index a0ebfd0e1e..b98f3886f7 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -132,16 +132,15 @@ namespace kernel void Thread::resume() { - THPRINT("Returning to tid=%ld tls=%p stack=%p\n", - this->tid, this->my_tls, this->stored_stack); + set_thread_area(this->my_tls); + THPRINT("Returning to tid=%ld tls=%p stack=%p thread=%p\n", + this->tid, this->my_tls, this->stored_stack, get_thread()); // NOTE: the RAX return value here is CHILD thread id, not this if (this->yielded == false) { - set_thread_area(this->my_tls); __clone_return(this->stored_stack); } else { this->yielded = false; - set_thread_area(this->my_tls); __thread_restore(this->stored_stack); } __builtin_unreachable(); @@ -171,7 +170,7 @@ namespace kernel } } - void setup_main_thread(long tid) noexcept + Thread* setup_main_thread(long tid) { int stack_value; if (tid == 0) @@ -183,12 +182,14 @@ namespace kernel // make threadmanager0 use this main thread // NOTE: don't use SMP-aware function here ThreadManager::get(0).main_thread = &core0_main_thread; + return &core0_main_thread; } else { auto* main_thread = get_thread(tid); - assert(main_thread->parent == nullptr); + assert(main_thread->parent == nullptr && "Must be a detached thread"); ThreadManager::get().main_thread = main_thread; + return main_thread; } } void setup_automatic_thread_multiprocessing() @@ -243,6 +244,7 @@ namespace kernel auto* thread = get_thread(tid); if (thread != nullptr) { thread->resume(); + __builtin_unreachable(); } THPRINT("Could not resume thread, missing: %ld\n", tid); assert(thread && "Could not find thread id"); @@ -325,7 +327,8 @@ void __thread_suspend_and_yield(void* stack) auto& man = kernel::ThreadManager::get(); // don't go through the ardous yielding process when alone if (man.suspended.empty() && man.next_migration_thread == nullptr) { - THPRINT("Nothing to yield to. Returning... stack=%p\n", stack); + THPRINT("Nothing to yield to. Returning... thread=%p stack=%p\n", + kernel::get_thread(), stack); return; } // suspend current thread (yielded) diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index c08aaff13e..96b91d4224 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -135,8 +135,8 @@ void revenant_main(int cpu) auto& system = PER_CPU(smp_system); // setup main thread - kernel::setup_main_thread(system.main_thread_id); + auto* kthread = kernel::setup_main_thread(system.main_thread_id); // resume APs main thread - kernel::resume(system.main_thread_id); + kthread->resume(); __builtin_unreachable(); } diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index e9c948e45e..0d312cf6b4 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -113,11 +113,11 @@ static void task_main(int cpu) SMP::cpu_id(), cpu, kernel::get_tid()); SMP::global_unlock(); } -static void multiprocess_task(int cpu) +static void multiprocess_task(int task) { SMP::global_lock(); - printf("CPU %d (%d) TID %ld running automatic multi-processing task\n", - SMP::cpu_id(), cpu, kernel::get_tid()); + printf("CPU %d TASK %d TID %ld running automatic multi-processing task\n", + SMP::cpu_id(), task, kernel::get_tid()); SMP::global_unlock(); messages.barry.increment(); } From c53e82da280080cc92a94d3bcdef3fb5ed3fa99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 7 Dec 2019 15:54:32 +0100 Subject: [PATCH 77/81] smp: Make primitives platform independent, fix IST startup phase --- api/smp_utils | 38 ++++--------------------- src/arch/x86_64/ist.cpp | 10 ++++--- src/kernel/CMakeLists.txt | 1 + src/kernel/smp_utils.cpp | 21 ++++++++++++++ src/platform/x86_pc/apic_revenant.hpp | 2 +- test/kernel/integration/smp/service.cpp | 2 +- 6 files changed, 36 insertions(+), 38 deletions(-) create mode 100644 src/kernel/smp_utils.cpp diff --git a/api/smp_utils b/api/smp_utils index 9e97688493..b27a5a442e 100644 --- a/api/smp_utils +++ b/api/smp_utils @@ -4,54 +4,30 @@ #ifndef API_SMP_UTILS_HEADER #define API_SMP_UTILS_HEADER -#include - // Intel 3a 8.10.6.7: 128-byte boundary typedef unsigned int spinlock_t __attribute__((aligned(128))); struct smp_spinlock { - smp_spinlock() = default; - -#ifdef INCLUDEOS_SMP_ENABLE - inline void lock() { - while (!__sync_bool_compare_and_swap(&m_value, 0, 1)) { - while (m_value) asm("pause"); - } - } - inline void unlock() { - __sync_lock_release(&m_value, 0); - } -#else - inline void lock() {} - inline void unlock() {} -#endif + void lock(); + void unlock(); private: - spinlock_t m_value; + volatile spinlock_t m_value = 0; }; -/// x86-related locking stuff /// -#if defined(ARCH_x86) - -struct minimal_barrier_t +struct smp_barrier { void increment() noexcept { __sync_fetch_and_add(&val, 1); } - void spin_wait(int max) noexcept - { - asm("mfence"); // TODO: fences are standard now - while (this->val < max) { - asm("pause; nop;"); - } - } + void spin_wait(int max) noexcept; void reset(int val = 0) noexcept { - asm volatile("mfence"); + __sync_synchronize(); this->val = val; } @@ -59,6 +35,4 @@ private: volatile int val = 0; }; -#endif // arch - #endif // hdr diff --git a/src/arch/x86_64/ist.cpp b/src/arch/x86_64/ist.cpp index b4b96434cf..c2ea459156 100644 --- a/src/arch/x86_64/ist.cpp +++ b/src/arch/x86_64/ist.cpp @@ -12,6 +12,7 @@ #endif extern "C" void __amd64_load_tr(uint16_t); +extern "C" void* kalloc(size_t size); struct gdtr64 { uint16_t limit; @@ -45,7 +46,7 @@ static stack create_stack_virt(size_t size, const char* name) static uintptr_t stacks_begin = stack_area + GUARD_SIZE; // Allocate physical memory - auto* phys = (char*)memalign(4096, size); + auto* phys = (char*) kalloc(size); IST_PRINT("* Creating stack '%s' @ %p (%p phys) \n", name, (void*)stacks_begin, phys); @@ -69,7 +70,7 @@ static stack create_stack_virt(size_t size, const char* name) } static stack create_stack_simple(size_t size, const char* /*name*/) { - auto* phys = (char*)memalign(4096, size); + auto* phys = (char*) kalloc(size); uintptr_t sp = (uintptr_t) phys + size; return {(void*) sp, phys}; } @@ -97,7 +98,6 @@ namespace x86 // have to do this for now // FIXME: find out why we need to do this -SMP::global_lock(); auto st = create_stack(INTR_SIZE, "Intr stack"); ist.tss.ist1 = (uintptr_t) st.sp; ist.intr = st.phys; @@ -114,6 +114,8 @@ SMP::global_lock(); ist.tss.rsp1 = stack; ist.tss.rsp2 = stack; + static smp_spinlock gdtspinner; + gdtspinner.lock(); auto tss_addr = (uintptr_t) &ist.tss; // entry #3 in the GDT is the Task selector @@ -127,6 +129,6 @@ SMP::global_lock(); tgd->td_hibase = tss_addr >> 24; __amd64_load_tr(8 * 3); -SMP::global_unlock(); + gdtspinner.unlock(); } } diff --git a/src/kernel/CMakeLists.txt b/src/kernel/CMakeLists.txt index be3e3f6b56..626ec6c8bc 100644 --- a/src/kernel/CMakeLists.txt +++ b/src/kernel/CMakeLists.txt @@ -11,6 +11,7 @@ set(SRCS profile.cpp service_stub.cpp #scoped_profiler.cpp + smp_utils.cpp # elf.cpp # fiber.cpp # profile.cpp diff --git a/src/kernel/smp_utils.cpp b/src/kernel/smp_utils.cpp new file mode 100644 index 0000000000..c8a0c79c98 --- /dev/null +++ b/src/kernel/smp_utils.cpp @@ -0,0 +1,21 @@ +#include +#include + +void smp_spinlock::lock() +{ + while (!__sync_bool_compare_and_swap(&m_value, 0, 1)) { + while (m_value) _mm_pause(); + } +} +void smp_spinlock::unlock() +{ + __sync_lock_release(&m_value, 0); +} + +void smp_barrier::spin_wait(int max) noexcept +{ + __sync_synchronize(); + while (this->val < max) { + _mm_pause(); + } +} diff --git a/src/platform/x86_pc/apic_revenant.hpp b/src/platform/x86_pc/apic_revenant.hpp index 7e11bebf40..ed4bf5b69f 100644 --- a/src/platform/x86_pc/apic_revenant.hpp +++ b/src/platform/x86_pc/apic_revenant.hpp @@ -27,7 +27,7 @@ struct smp_stuff { uintptr_t stack_base; uintptr_t stack_size; - minimal_barrier_t boot_barrier; + smp_barrier boot_barrier; std::vector initialized_cpus {0}; std::array bmp_storage = {0}; MemBitmap bitmap{bmp_storage.data(), bmp_storage.size()}; diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index 0d312cf6b4..043c01741c 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -82,7 +82,7 @@ void smp_advanced_test() #include static struct { - minimal_barrier_t barry; + smp_barrier barry; } messages; static void random_irq_handler() From 1565b1078bf4063566f69d769991a29572c65154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sat, 7 Dec 2019 17:57:23 +0100 Subject: [PATCH 78/81] smp: Add GDT tasks covering all CPUs --- src/arch/x86_64/arch_start.asm | 3 +-- src/arch/x86_64/ist.cpp | 10 +++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/arch/x86_64/arch_start.asm b/src/arch/x86_64/arch_start.asm index c0c187a449..0579597d22 100644 --- a/src/arch/x86_64/arch_start.asm +++ b/src/arch/x86_64/arch_start.asm @@ -176,8 +176,7 @@ GDT64: db 00000000b ; Granularity. db 0 ; Base (high). .Task: equ $ - GDT64 ; TSS descriptor. - dq 0 - dq 0 + resq 2*256 ; make room for 256 CPUs dw 0x0 ;; alignment padding __gdt64_base_pointer: diff --git a/src/arch/x86_64/ist.cpp b/src/arch/x86_64/ist.cpp index c2ea459156..edb7a953d3 100644 --- a/src/arch/x86_64/ist.cpp +++ b/src/arch/x86_64/ist.cpp @@ -96,8 +96,6 @@ namespace x86 auto& ist = lm_ist.at(cpu); std::memset(&ist.tss, 0, sizeof(AMD64_TSS)); - // have to do this for now - // FIXME: find out why we need to do this auto st = create_stack(INTR_SIZE, "Intr stack"); ist.tss.ist1 = (uintptr_t) st.sp; ist.intr = st.phys; @@ -114,12 +112,11 @@ namespace x86 ist.tss.rsp1 = stack; ist.tss.rsp2 = stack; - static smp_spinlock gdtspinner; - gdtspinner.lock(); auto tss_addr = (uintptr_t) &ist.tss; // entry #3 in the GDT is the Task selector - auto* tgd = (AMD64_TS*) &__gdt64_base_pointer.location[8 * 3]; + const int task_offset = 8 * (3 + cpu); + auto* tgd = (AMD64_TS*) &__gdt64_base_pointer.location[task_offset]; memset(tgd, 0, sizeof(AMD64_TS)); tgd->td_type = 0x9; tgd->td_present = 1; @@ -128,7 +125,6 @@ namespace x86 tgd->td_lobase = tss_addr & 0xFFFFFF; tgd->td_hibase = tss_addr >> 24; - __amd64_load_tr(8 * 3); - gdtspinner.unlock(); + __amd64_load_tr(task_offset); } } From c887b44232cb0f0161ee9fb1b742b2f54febb8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 8 Dec 2019 02:10:28 +0100 Subject: [PATCH 79/81] Refactor SMP to use dynamic arrays and be always ON --- api/common | 18 +---- api/kernel/events.hpp | 9 +-- api/kernel/fiber.hpp | 4 +- api/smp | 95 +++++++++++++------------ src/arch/x86_64/ist.cpp | 7 +- src/drivers/virtionet.cpp | 3 +- src/drivers/vmxnet3.cpp | 1 + src/kernel/events.cpp | 12 +--- src/kernel/fiber.cpp | 4 +- src/kernel/panic.cpp | 13 +++- src/kernel/rng.cpp | 4 +- src/kernel/threads.cpp | 3 +- src/kernel/timers.cpp | 18 ++--- src/platform/kvm/kvmclock.cpp | 3 +- src/platform/kvm/pv_eoi.cpp | 2 +- src/platform/x86_pc/apic_revenant.cpp | 2 +- src/platform/x86_pc/apic_revenant.hpp | 2 +- src/platform/x86_pc/apic_timer.cpp | 3 +- src/platform/x86_pc/idt.cpp | 2 +- src/platform/x86_pc/init_libc.cpp | 4 -- src/platform/x86_pc/kernel_start.cpp | 2 + src/platform/x86_pc/os.cpp | 13 ++-- src/platform/x86_pc/platform.cpp | 25 +++++-- src/platform/x86_pc/smp.cpp | 48 +++---------- test/kernel/integration/smp/service.cpp | 13 ++-- test/kernel/integration/smp/vm.json | 3 +- 26 files changed, 142 insertions(+), 171 deletions(-) diff --git a/api/common b/api/common index 7d7dcd11d0..e5183bdb2f 100644 --- a/api/common +++ b/api/common @@ -36,23 +36,7 @@ static_assert(sizeof(void*) == 8, "Pointer must match arch"); #undef Expects #undef Ensures - -#ifdef INCLUDEOS_SMP_ENABLE -#include -#endif - -#include -inline void __expect_fail(const char *expr, const char *file, int line, const char *func){ -#ifdef INCLUDEOS_SMP_ENABLE - SMP::global_lock(); -#endif - fprintf(stderr, "%s:%i:%s\n>>> %s\n",file, line, func, expr); - fflush(NULL); -#ifdef INCLUDEOS_SMP_ENABLE - SMP::global_unlock(); -#endif - os::panic(expr); -} +extern void __expect_fail(const char*, const char*, int line, const char*); #define Expects(x) ((void)((x) || (__expect_fail("Expects failed: "#x, __FILE__, __LINE__, __func__),0))) #define Ensures(x) ((void)((x) || (__expect_fail("Ensures failed: "#x, __FILE__, __LINE__, __func__),0))) diff --git a/api/kernel/events.hpp b/api/kernel/events.hpp index 8ae541933d..167e3e39e0 100644 --- a/api/kernel/events.hpp +++ b/api/kernel/events.hpp @@ -49,17 +49,12 @@ class alignas(SMP_ALIGN) Events { Events() = default; private: - Events(Events&) = delete; - Events(Events&&) = delete; - Events& operator=(Events&&) = delete; - Events& operator=(Events&) = delete; - event_callback callbacks[NUM_EVENTS]; std::array received_array; std::array handled_array; - std::array event_subs; - std::array event_pend; + std::array event_subs {}; + std::array event_pend {}; // using deque because vector resize causes invalidation of ranged for // when something subscribes during processing of events std::deque sublist; diff --git a/api/kernel/fiber.hpp b/api/kernel/fiber.hpp index 74cd675d47..dd0df9ad1c 100644 --- a/api/kernel/fiber.hpp +++ b/api/kernel/fiber.hpp @@ -205,8 +205,8 @@ class Fiber { #else static int next_id_; #endif - static SMP::Array main_; - static SMP::Array current_; + static std::vector main_; + static std::vector current_; // Uniquely identify return target (yield / exit) // first stack frame and yield will use this to identify next stack diff --git a/api/smp b/api/smp index c4c16cd69d..ea53b1faa6 100644 --- a/api/smp +++ b/api/smp @@ -8,27 +8,15 @@ #include #include -#ifndef SMP_MAX_CORES -# ifdef INCLUDEOS_SMP_ENABLE -# define SMP_MAX_CORES 32 -# else -# define SMP_MAX_CORES 1 -# endif -#endif - -#define SMP_ALIGN 64 +// access a container of T by current CPU id +#define PER_CPU(x) x.at(SMP::cpu_id()) -// access a std::array of T by current CPU id -#define PER_CPU(x) (per_cpu_help(x)) class SMP { public: using task_func = delegate; using done_func = delegate; - template - using Array = std::array; - // return the current CPU id static int cpu_id() noexcept; @@ -41,50 +29,69 @@ public: // implement this function to execute something on all APs at init static void init_task(); - // execute @func on another CPU core - // call @done back on main CPU when task returns - // use signal() to broadcast work should begin - static void add_task(task_func func, done_func done, int cpu = 0); - static void add_task(task_func func, int cpu = 0); + // execute @task on another CPU core + // call @done back on main CPU after running task + // use signal() to broadcast when work should begin + static void add_task(task_func task, done_func done, int cpu = 0); + static void add_task(task_func task, int cpu = 0); // execute a function on the main cpu - static void add_bsp_task(done_func func); + static void add_bsp_task(done_func done); // call this to signal that tasks are queued up - // if cpu == 0, broadcast signal to all + // if cpu == 0, broadcast signal to all CPUs static void signal(int cpu = 0); static void signal_bsp(); - // trigger interrupt on specified CPU + // trigger single interrupt on specified CPU static void unicast(int cpu, uint8_t intr); - // broadcast-trigger interrupt on all waiting APs + // broadcast-trigger interrupt on all CPUs static void broadcast(uint8_t intr); - // a global spinlock to synchronize text output (and other things) + // a global spinlock to synchronize text output (primarily) static void global_lock() noexcept; static void global_unlock() noexcept; + + // during startup we can use this function to size up dynamic arrays + static size_t early_cpu_total() noexcept; }; -#include -#ifdef INCLUDEOS_SMP_ENABLE - template - inline T& per_cpu_help(std::array& array) - { - unsigned cpuid; -# ifdef ARCH_x86_64 - asm("movl %%gs:(0x0), %0" : "=r" (cpuid)); -# elif defined(ARCH_i686) - asm("movl %%fs:(0x0), %0" : "=r" (cpuid)); -# else - #error "Implement me?" -# endif - return array.at(cpuid); - } +inline int SMP::cpu_id() noexcept +{ + int cpuid; +#ifdef ARCH_x86_64 + asm("movl %%gs:(0x0), %0" : "=r" (cpuid)); +#elif defined(ARCH_i686) + asm("movl %%fs:(0x0), %0" : "=r" (cpuid)); #else - template - inline T& per_cpu_help(std::array& array) - { - return array[0]; - } + #error "Implement me?" #endif + return cpuid; +} + +#include +template +inline T& per_cpu_help(std::array& array) +{ + return array.at(SMP::cpu_id()); +} + +#include +namespace kernel { + extern Fixed_vector, 64> smp_global_init; +} +#define SMP_RESIZE_GCTOR(x) \ + static struct smp_gctor_##x { \ + smp_gctor_##x() { \ + kernel::smp_global_init.push_back( \ + [] () { \ + x.resize(SMP::early_cpu_total()); \ + }); \ + } \ + } smp_gctor_##x_instance; + + +#define SMP_ALIGN 64 +#define SMP_MAX_CORES 256 + #endif diff --git a/src/arch/x86_64/ist.cpp b/src/arch/x86_64/ist.cpp index edb7a953d3..1d70553682 100644 --- a/src/arch/x86_64/ist.cpp +++ b/src/arch/x86_64/ist.cpp @@ -85,13 +85,16 @@ namespace x86 AMD64_TSS tss; }; - static std::array lm_ist; + static std::vector lm_ist; + SMP_RESIZE_GCTOR(lm_ist); void ist_initialize_for_cpu(int cpu, uintptr_t stack) { typedef struct stack (*create_stack_func_t) (size_t, const char*); create_stack_func_t create_stack = create_stack_virt; - if (cpu > 0) create_stack = create_stack_simple; + if (cpu > 0) { + create_stack = create_stack_simple; + } auto& ist = lm_ist.at(cpu); std::memset(&ist.tss, 0, sizeof(AMD64_TSS)); diff --git a/src/drivers/virtionet.cpp b/src/drivers/virtionet.cpp index 6e49f3b08a..423a4db25c 100644 --- a/src/drivers/virtionet.cpp +++ b/src/drivers/virtionet.cpp @@ -34,7 +34,8 @@ struct alignas(SMP_ALIGN) smp_deferred_kick std::vector devs; uint8_t irq; }; -static std::array deferred_devs; +static std::vector deferred_devs; +SMP_RESIZE_GCTOR(deferred_devs); #endif using namespace net; diff --git a/src/drivers/vmxnet3.cpp b/src/drivers/vmxnet3.cpp index dd3ae8a3e2..984248b51a 100644 --- a/src/drivers/vmxnet3.cpp +++ b/src/drivers/vmxnet3.cpp @@ -4,6 +4,7 @@ #include "vmxnet3_queues.hpp" #include +#include #include #include #include diff --git a/src/kernel/events.cpp b/src/kernel/events.cpp index d48b960985..010c0d25da 100644 --- a/src/kernel/events.cpp +++ b/src/kernel/events.cpp @@ -1,21 +1,18 @@ #include +#include #include #include #include #include //#define DEBUG_SMP -static SMP::Array managers; +static std::vector managers; +SMP_RESIZE_GCTOR(managers); Events& Events::get(int cpuid) { -#ifdef INCLUDEOS_SMP_ENABLE return managers.at(cpuid); -#else - (void) cpuid; - return managers[0]; -#endif } Events& Events::get() { @@ -24,9 +21,6 @@ Events& Events::get() void Events::init_local() { - std::memset(event_subs.data(), 0, sizeof(event_subs)); - std::memset(event_pend.data(), 0, sizeof(event_pend)); - if (SMP::cpu_id() == 0) { // prevent legacy IRQs from being free for taking diff --git a/src/kernel/fiber.cpp b/src/kernel/fiber.cpp index 0cffb03e9b..cc633da3c3 100644 --- a/src/kernel/fiber.cpp +++ b/src/kernel/fiber.cpp @@ -14,8 +14,8 @@ std::atomic Fiber::next_id_{0}; int Fiber::next_id_{0}; #endif -SMP::Array Fiber::main_ = {{nullptr}}; -SMP::Array Fiber::current_ {{nullptr}}; +std::vector Fiber::main_ = {{nullptr}}; +std::vector Fiber::current_ {{nullptr}}; extern "C" { void __fiber_jumpstart(volatile void* th_stack, volatile Fiber* f, volatile void* parent_stack); diff --git a/src/kernel/panic.cpp b/src/kernel/panic.cpp index 796063c5b6..177847c2f7 100644 --- a/src/kernel/panic.cpp +++ b/src/kernel/panic.cpp @@ -22,7 +22,9 @@ struct alignas(SMP_ALIGN) context_buffer { std::array buffer; }; -static SMP::Array contexts; +static std::vector contexts; +SMP_RESIZE_GCTOR(contexts); + // NOTE: panics cannot be per-cpu because it might not be ready yet // NOTE: it's also used by OS::is_panicking(), used by OS::print(...) @@ -174,6 +176,15 @@ void panic_epilogue(const char* why) __builtin_unreachable(); } +void __expect_fail(const char *expr, const char *file, int line, const char *func) +{ + SMP::global_lock(); + fprintf(stderr, "%s:%i:%s\n>>> %s\n",file, line, func, expr); + fflush(NULL); + SMP::global_unlock(); + os::panic(expr); +} + // Shutdown the machine when one of the exit functions are called void kernel::default_exit() { __arch_poweroff(); diff --git a/src/kernel/rng.cpp b/src/kernel/rng.cpp index a0721a322b..72e0fbab1f 100644 --- a/src/kernel/rng.cpp +++ b/src/kernel/rng.cpp @@ -15,7 +15,8 @@ struct alignas(SMP_ALIGN) rng_state int32_t reseed_rounds = 0; delegate reseed_callback = nullptr; }; -static SMP::Array rng; +static std::array rng; // DO NOT EDIT + // every RESEED_RATE bytes entropy is refilled static const int RESEED_RATE = 4096; @@ -158,6 +159,7 @@ void rng_extract(void* output, size_t bytes) } } +#include void rng_reseed_init(delegate func, int rounds) { PER_CPU(rng).reseed_callback = func; diff --git a/src/kernel/threads.cpp b/src/kernel/threads.cpp index b98f3886f7..c78fe12b68 100644 --- a/src/kernel/threads.cpp +++ b/src/kernel/threads.cpp @@ -32,7 +32,8 @@ namespace kernel return thread_counter-1; } - SMP::Array thread_managers; + std::vector thread_managers; + SMP_RESIZE_GCTOR(thread_managers); ThreadManager& ThreadManager::get() noexcept { return PER_CPU(thread_managers); } diff --git a/src/kernel/timers.cpp b/src/kernel/timers.cpp index 7ea917ad68..15ee6f8abf 100644 --- a/src/kernel/timers.cpp +++ b/src/kernel/timers.cpp @@ -64,6 +64,8 @@ static bool signal_ready = false; struct alignas(SMP_ALIGN) timer_system { + timer_system() = default; + timer_system(timer_system&&) = default; void free_timer(Timers::id_t); void sched_timer(duration_t when, Timers::id_t); @@ -76,16 +78,14 @@ struct alignas(SMP_ALIGN) timer_system // timers sorted by timestamp std::multimap scheduled; /** Stats */ - union { - int64_t i64 = 0; - uint32_t u32; - } dummy; - int64_t* oneshot_started = &dummy.i64; - int64_t* oneshot_stopped = &dummy.i64; - uint32_t* periodic_started = &dummy.u32; - uint32_t* periodic_stopped = &dummy.u32; + int64_t stat64 = 0; + int64_t* oneshot_started = &stat64; + int64_t* oneshot_stopped = &stat64; + uint32_t* periodic_started = (uint32_t*) &stat64; + uint32_t* periodic_stopped = (uint32_t*) &stat64; }; -static SMP::Array systems; +static std::vector systems; +SMP_RESIZE_GCTOR(systems); void timer_system::free_timer(Timers::id_t id) { diff --git a/src/platform/kvm/kvmclock.cpp b/src/platform/kvm/kvmclock.cpp index a2410001e3..ddde69b679 100644 --- a/src/platform/kvm/kvmclock.cpp +++ b/src/platform/kvm/kvmclock.cpp @@ -20,7 +20,8 @@ struct alignas(4096) pvclock_vcpu_time_info { unsigned char flags; unsigned char pad[2]; }__attribute__((packed)); -static SMP::Array vcpu_time; +static std::vector vcpu_time; +SMP_RESIZE_GCTOR(vcpu_time); struct alignas(4096) pvclock_wall_clock { uint32_t version; diff --git a/src/platform/kvm/pv_eoi.cpp b/src/platform/kvm/pv_eoi.cpp index ae32190416..201dbb36f5 100644 --- a/src/platform/kvm/pv_eoi.cpp +++ b/src/platform/kvm/pv_eoi.cpp @@ -24,7 +24,7 @@ struct alignas(SMP_ALIGN) pv_eoi { uint32_t eoi_word = 0; }; -static SMP::Array exitless_eoi; +static std::array exitless_eoi; extern "C" void kvm_pv_eoi() diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index 96b91d4224..01917b37bf 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -12,7 +12,7 @@ namespace x86 { extern void initialize_cpu_tables_for_cpu(int); smp_stuff smp_main; - SMP::Array smp_system; + std::vector smp_system; } #define INFO(FROM, TEXT, ...) printf("%13s ] " TEXT "\n", "[ " FROM, ##__VA_ARGS__) diff --git a/src/platform/x86_pc/apic_revenant.hpp b/src/platform/x86_pc/apic_revenant.hpp index ed4bf5b69f..2880b41946 100644 --- a/src/platform/x86_pc/apic_revenant.hpp +++ b/src/platform/x86_pc/apic_revenant.hpp @@ -45,7 +45,7 @@ struct smp_system_stuff std::thread* main_thread = nullptr; long main_thread_id = 0; }; - extern SMP::Array smp_system; + extern std::vector smp_system; } #endif diff --git a/src/platform/x86_pc/apic_timer.cpp b/src/platform/x86_pc/apic_timer.cpp index de412a3e0d..740aaf7a1b 100644 --- a/src/platform/x86_pc/apic_timer.cpp +++ b/src/platform/x86_pc/apic_timer.cpp @@ -29,7 +29,8 @@ namespace x86 int intr; bool intr_enabled = false; }; - static SMP::Array timerdata; + static std::vector timerdata; + SMP_RESIZE_GCTOR(timerdata); #define GET_TIMER() PER_CPU(timerdata) diff --git a/src/platform/x86_pc/idt.cpp b/src/platform/x86_pc/idt.cpp index 9344199ea6..7bca3fce79 100644 --- a/src/platform/x86_pc/idt.cpp +++ b/src/platform/x86_pc/idt.cpp @@ -1,9 +1,9 @@ #include "idt.hpp" #include #include -#include #include #include +#include #include #define RING0_CODE_SEG 0x8 diff --git a/src/platform/x86_pc/init_libc.cpp b/src/platform/x86_pc/init_libc.cpp index d3da48041c..3f327b0bda 100644 --- a/src/platform/x86_pc/init_libc.cpp +++ b/src/platform/x86_pc/init_libc.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -54,9 +53,6 @@ int kernel_main(int, char * *, char * *) PRATTLE(" OS start\n"); - // setup main thread after global ctors - kernel::setup_main_thread(); - // Initialize early OS, platform and devices #if defined(PLATFORM_x86_pc) kernel::start(grub_magic, grub_addr); diff --git a/src/platform/x86_pc/kernel_start.cpp b/src/platform/x86_pc/kernel_start.cpp index 8ce7546068..7a5ac77eea 100644 --- a/src/platform/x86_pc/kernel_start.cpp +++ b/src/platform/x86_pc/kernel_start.cpp @@ -87,6 +87,7 @@ void kernel_start(uint32_t magic, uint32_t addr) // Begin portable HAL initialization __machine->init(); + PRATTLE("* Early RNG init\n"); { PROFILE("RNG init") // TODO: Move more stuff into Machine::init @@ -99,5 +100,6 @@ void kernel_start(uint32_t magic, uint32_t addr) PRATTLE("* Init CPU exceptions\n"); x86::idt_initialize_for_cpu(0); + PRATTLE("* Init libc\n"); x86::init_libc(magic, addr); } diff --git a/src/platform/x86_pc/os.cpp b/src/platform/x86_pc/os.cpp index d5dcca847c..d6fed60e08 100644 --- a/src/platform/x86_pc/os.cpp +++ b/src/platform/x86_pc/os.cpp @@ -15,20 +15,14 @@ //#define ENABLE_PROFILERS #include -extern "C" void* get_cpu_esp(); -extern uintptr_t _start; -extern uintptr_t _end; -extern uintptr_t _ELF_START_; -extern uintptr_t _TEXT_START_; -extern uintptr_t _LOAD_START_; -extern uintptr_t _ELF_END_; // in kernel/os.cpp extern bool os_default_stdout; struct alignas(SMP_ALIGN) OS_CPU { uint64_t cycles_hlt = 0; }; -static SMP::Array os_per_cpu; +static std::vector os_per_cpu; +SMP_RESIZE_GCTOR(os_per_cpu); uint64_t os::cycles_asleep() noexcept { return PER_CPU(os_per_cpu).cycles_hlt; @@ -79,7 +73,8 @@ void kernel::start(uint32_t boot_magic, uint32_t boot_addr) // Print a fancy header CAPTION("#include // Literally"); - MYINFO("Stack: %p", get_cpu_esp()); + int stack; + MYINFO("Stack: %p", &stack); MYINFO("Boot magic: 0x%x, addr: 0x%x", boot_magic, boot_addr); // PAGING // diff --git a/src/platform/x86_pc/platform.cpp b/src/platform/x86_pc/platform.cpp index 87743f3e8f..dc7fd2137a 100644 --- a/src/platform/x86_pc/platform.cpp +++ b/src/platform/x86_pc/platform.cpp @@ -8,6 +8,7 @@ #include "smp.hpp" #include #include +#include #include #include #include @@ -25,12 +26,15 @@ struct alignas(64) smp_table int cpuid; /** put more here **/ }; -static SMP::Array cpu_tables; +static std::vector cpu_tables; namespace x86 { void initialize_cpu_tables_for_cpu(int cpu); void register_deactivation_function(delegate); } +namespace kernel { + Fixed_vector, 64> smp_global_init(Fixedvector_Init::UNINIT); +} void __platform_init() { @@ -40,6 +44,12 @@ void __platform_init() x86::ACPI::init(); } + // resize up all PER-CPU structures + for (auto lambda : kernel::smp_global_init) { lambda(); } + + // setup main thread after PER-CPU ctors + kernel::setup_main_thread(0); + // read SMBIOS tables { PROFILE("SMBIOS init"); @@ -82,12 +92,10 @@ void __platform_init() } // initialize and start registered APs found in ACPI-tables -#ifdef INCLUDEOS_SMP_ENABLE -{ - PROFILE("SMP init"); - x86::init_SMP(); -} -#endif + { + PROFILE("SMP init"); + x86::init_SMP(); + } // Setup kernel clocks MYINFO("Setting up kernel clock sources"); @@ -141,6 +149,9 @@ static x86::GDT gdt; void x86::initialize_cpu_tables_for_cpu(int cpu) { + if (cpu == 0) { + cpu_tables.resize(SMP::early_cpu_total()); + } cpu_tables[cpu].cpuid = cpu; #ifdef ARCH_x86_64 diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index edf147ced3..be489836a4 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -37,10 +37,10 @@ namespace x86 void init_SMP() { const uint32_t CPUcount = ACPI::get_cpus().size(); - if (CPUcount <= 1) return; - assert(CPUcount <= SMP_MAX_CORES); // avoid heap usage during AP init x86::smp_main.initialized_cpus.reserve(CPUcount); + x86::smp_system.resize(CPUcount); + if (CPUcount <= 1) return; // copy our bootloader to APIC init location const char* start = &_binary_apic_boot_bin_start; @@ -77,7 +77,7 @@ void init_SMP() // massage musl to create a main thread for each AP for (const auto& cpu : ACPI::get_cpus()) { - if (cpu.id == apic.get_id()) continue; + if (cpu.id == apic.get_id() || cpu.id >= CPUcount) continue; // thread should immediately yield auto* t = new std::thread(&revenant_thread_main, cpu.id); const long tid = kernel::get_last_thread_id(); @@ -94,7 +94,7 @@ void init_SMP() INFO("SMP", "Initializing APs"); for (const auto& cpu : ACPI::get_cpus()) { - if (cpu.id == apic.get_id()) continue; + if (cpu.id == apic.get_id() || cpu.id >= CPUcount) continue; debug("-> CPU %u ID %u fl 0x%x\n", cpu.cpu, cpu.id, cpu.flags); apic.ap_init(cpu.id); @@ -105,7 +105,7 @@ void init_SMP() INFO("SMP", "Starting APs"); for (const auto& cpu : ACPI::get_cpus()) { - if (cpu.id == apic.get_id()) continue; + if (cpu.id == apic.get_id() || cpu.id >= CPUcount) continue; // Send SIPI with start page at BOOTLOADER_LOCATION apic.ap_start(cpu.id, BOOTLOADER_LOCATION >> 12); apic.ap_start(cpu.id, BOOTLOADER_LOCATION >> 12); @@ -144,29 +144,15 @@ void init_SMP() using namespace x86; /// implementation of the SMP interface /// -int SMP::cpu_id() noexcept -{ -#ifdef INCLUDEOS_SMP_ENABLE - int cpuid; -#ifdef ARCH_x86_64 - asm("movl %%gs:(0x0), %0" : "=r" (cpuid)); -#elif defined(ARCH_i686) - asm("movl %%fs:(0x0), %0" : "=r" (cpuid)); -#else - #error "Implement me?" -#endif - return cpuid; -#else - return 0; -#endif -} - int SMP::cpu_count() noexcept { return x86::smp_main.initialized_cpus.size(); } const std::vector& SMP::active_cpus() { return x86::smp_main.initialized_cpus; } +size_t SMP::early_cpu_total() noexcept { + return ACPI::get_cpus().size(); +} __attribute__((weak)) void SMP::init_task() @@ -176,29 +162,18 @@ void SMP::init_task() void SMP::add_task(smp_task_func task, smp_done_func done, int cpu) { -#ifdef INCLUDEOS_SMP_ENABLE smp_system[cpu].tlock.lock(); smp_system[cpu].tasks.emplace_back(std::move(task), std::move(done)); smp_system[cpu].tlock.unlock(); -#else - assert(cpu == 0); - task(); done(); -#endif } void SMP::add_task(smp_task_func task, int cpu) { -#ifdef INCLUDEOS_SMP_ENABLE smp_system[cpu].tlock.lock(); smp_system[cpu].tasks.emplace_back(std::move(task), nullptr); smp_system[cpu].tlock.unlock(); -#else - assert(cpu == 0); - task(); -#endif } void SMP::add_bsp_task(smp_done_func task) { -#ifdef INCLUDEOS_SMP_ENABLE // queue job auto& system = PER_CPU(smp_system); system.flock.lock(); @@ -208,14 +183,10 @@ void SMP::add_bsp_task(smp_done_func task) smp_main.bitmap.atomic_set(SMP::cpu_id()); // call home x86::APIC::get().send_bsp_intr(); -#else - task(); -#endif } void SMP::signal(int cpu) { -#ifdef INCLUDEOS_SMP_ENABLE // broadcast that there is work to do // 0: Broadcast to everyone except BSP if (cpu == 0) @@ -223,9 +194,6 @@ void SMP::signal(int cpu) // 1-xx: Unicast specific vCPU else x86::APIC::get().send_ipi(cpu, 0x20); -#else - (void) cpu; -#endif } void SMP::signal_bsp() { diff --git a/test/kernel/integration/smp/service.cpp b/test/kernel/integration/smp/service.cpp index 043c01741c..994bd5c4a8 100644 --- a/test/kernel/integration/smp/service.cpp +++ b/test/kernel/integration/smp/service.cpp @@ -12,7 +12,7 @@ struct alignas(SMP_ALIGN) per_cpu_test int value; }; -static SMP::Array testing; +static std::array testing; #include void smp_advanced_test() @@ -44,8 +44,6 @@ void smp_advanced_test() printf("bits = %#x\n", job); SMP::global_unlock(); assert(job = 0xffffffff && "All 32 bits must be set"); - if (SMP::cpu_count() == 1) - printf("SUCCESS\n"); } SMP::global_lock(); volatile void* test = calloc(4, 128u); @@ -72,6 +70,7 @@ void smp_advanced_test() if (times == SMP::cpu_count()-1 && irq_times == SMP::cpu_count()-1) { printf("SUCCESS!\n"); + SMP::add_bsp_task(os::shutdown); } SMP::global_unlock(); }); @@ -124,11 +123,9 @@ static void multiprocess_task(int task) void Service::start() { -#ifdef INCLUDEOS_SMP_ENABLE - printf("SMP is enabled\n"); -#else - static_assert(false, "SMP is not enabled"); -#endif + if (SMP::active_cpus().size() < 2) { + throw std::runtime_error("Need at least 2 CPUs to run this test!"); + } for (const int i : SMP::active_cpus()) { diff --git a/test/kernel/integration/smp/vm.json b/test/kernel/integration/smp/vm.json index 96bc16da35..10e810413e 100644 --- a/test/kernel/integration/smp/vm.json +++ b/test/kernel/integration/smp/vm.json @@ -1,4 +1,5 @@ { "image" : "service.img", - "smp" : 16 + "smp" : 32, + "mem" : 256 } From e2ab6f78614de45c8d8a2b33178b2c5308f93d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 8 Dec 2019 15:14:31 +0100 Subject: [PATCH 80/81] smp: Move common SMP task handling to kernel, make RNG shared --- api/kernel/rng.hpp | 2 + api/kernel/smp_common.hpp | 45 ++++++++++++++ src/kernel/CMakeLists.txt | 1 + src/kernel/rng.cpp | 39 ++++++++----- src/kernel/smp_common.cpp | 83 ++++++++++++++++++++++++++ src/platform/x86_pc/apic_revenant.cpp | 84 ++++++--------------------- src/platform/x86_pc/apic_revenant.hpp | 44 -------------- src/platform/x86_pc/smp.cpp | 75 ++++++++++-------------- src/platform/x86_pc/smp.hpp | 3 - 9 files changed, 204 insertions(+), 172 deletions(-) create mode 100644 api/kernel/smp_common.hpp create mode 100644 src/kernel/smp_common.cpp diff --git a/api/kernel/rng.hpp b/api/kernel/rng.hpp index a5cd2fdbae..768ca1abf9 100644 --- a/api/kernel/rng.hpp +++ b/api/kernel/rng.hpp @@ -4,6 +4,8 @@ #ifndef KERNEL_RNG_HPP #define KERNEL_RNG_HPP +#define INCLUDEOS_RNG_IS_SHARED + #include #include #include diff --git a/api/kernel/smp_common.hpp b/api/kernel/smp_common.hpp new file mode 100644 index 0000000000..cdd18dd3ed --- /dev/null +++ b/api/kernel/smp_common.hpp @@ -0,0 +1,45 @@ +#pragma once +#include +#include +#include +#include +#include + +namespace smp +{ + struct task { + task(SMP::task_func a, + SMP::done_func b) + : func(a), done(b) {} + + SMP::task_func func; + SMP::done_func done; + }; + + void task_done_handler(); + void smp_task_handler(); + + struct smp_main_system + { + uintptr_t stack_base; + uintptr_t stack_size; + smp_barrier boot_barrier; + std::vector initialized_cpus {0}; + // used to determine which worker has posted done-tasks + std::array bmp_storage = {0}; + MemBitmap bitmap{bmp_storage.data(), bmp_storage.size()}; + }; + extern smp_main_system main_system; + + struct smp_worker_system + { + smp_spinlock tlock; + smp_spinlock flock; + std::deque tasks; + std::vector completed; + bool work_done = false; + // main thread on this vCPU + long main_thread_id = 0; + }; + extern std::vector systems; +} diff --git a/src/kernel/CMakeLists.txt b/src/kernel/CMakeLists.txt index 626ec6c8bc..b3d6d735bf 100644 --- a/src/kernel/CMakeLists.txt +++ b/src/kernel/CMakeLists.txt @@ -11,6 +11,7 @@ set(SRCS profile.cpp service_stub.cpp #scoped_profiler.cpp + smp_common.cpp smp_utils.cpp # elf.cpp # fiber.cpp diff --git a/src/kernel/rng.cpp b/src/kernel/rng.cpp index 72e0fbab1f..ed4813a9c5 100644 --- a/src/kernel/rng.cpp +++ b/src/kernel/rng.cpp @@ -15,7 +15,20 @@ struct alignas(SMP_ALIGN) rng_state int32_t reseed_rounds = 0; delegate reseed_callback = nullptr; }; +#ifdef INCLUDEOS_RNG_IS_SHARED +static rng_state shared_rng; +#else static std::array rng; // DO NOT EDIT +#endif + +inline rng_state& local_rng() noexcept +{ +#ifdef INCLUDEOS_RNG_IS_SHARED + return shared_rng; +#else + return PER_CPU(rng); +#endif +} // every RESEED_RATE bytes entropy is refilled static const int RESEED_RATE = 4096; @@ -120,20 +133,20 @@ void rng_absorb(const void* input, size_t bytes) size_t absorbing = std::min(bytes - absorbed, SHAKE_128_RATE); xor_bytes(static_cast(input) + absorbed, - reinterpret_cast(PER_CPU(rng).state), + reinterpret_cast(local_rng().state), absorbing); - keccak_1600_p(PER_CPU(rng).state); + keccak_1600_p(local_rng().state); absorbed += absorbing; } - PER_CPU(rng).reseed_counter += RESEED_RATE * bytes; + local_rng().reseed_counter += RESEED_RATE * bytes; } static void reseed_now() { uint64_t value; - for (int i = 0; i < PER_CPU(rng).reseed_rounds; i++) { - PER_CPU(rng).reseed_callback(&value); + for (int i = 0; i < local_rng().reseed_rounds; i++) { + local_rng().reseed_callback(&value); rng_absorb(&value, sizeof(value)); } } @@ -145,16 +158,16 @@ void rng_extract(void* output, size_t bytes) while(copied < bytes) { size_t copying = std::min(bytes - copied, SHAKE_128_RATE); - memcpy(static_cast(output) + copied, PER_CPU(rng).state, copying); - keccak_1600_p(PER_CPU(rng).state); + memcpy(static_cast(output) + copied, local_rng().state, copying); + keccak_1600_p(local_rng().state); copied += copying; } // don't reseed if no callback to do so - if (PER_CPU(rng).reseed_callback == nullptr) return; - PER_CPU(rng).reseed_counter -= bytes; + if (local_rng().reseed_callback == nullptr) return; + local_rng().reseed_counter -= bytes; // reseed when below certain entropy - if (PER_CPU(rng).reseed_counter < 0) { - PER_CPU(rng).reseed_counter = 0; + if (local_rng().reseed_counter < 0) { + local_rng().reseed_counter = 0; reseed_now(); } } @@ -162,7 +175,7 @@ void rng_extract(void* output, size_t bytes) #include void rng_reseed_init(delegate func, int rounds) { - PER_CPU(rng).reseed_callback = func; - PER_CPU(rng).reseed_rounds = rounds; + local_rng().reseed_callback = func; + local_rng().reseed_rounds = rounds; reseed_now(); } diff --git a/src/kernel/smp_common.cpp b/src/kernel/smp_common.cpp new file mode 100644 index 0000000000..738fb129f7 --- /dev/null +++ b/src/kernel/smp_common.cpp @@ -0,0 +1,83 @@ +#include + +namespace smp +{ +smp_main_system main_system; +std::vector systems; + +void task_done_handler() +{ + int next = smp::main_system.bitmap.first_set(); + while (next != -1) + { + // remove bit + smp::main_system.bitmap.atomic_reset(next); + // get jobs from other CPU + std::vector done; + auto& system = smp::systems[next]; + system.flock.lock(); + system.completed.swap(done); + system.flock.unlock(); + + // execute all tasks + for (auto& func : done) func(); + + // get next set bit + next = smp::main_system.bitmap.first_set(); + } +} + +static bool smp_task_doer(smp_worker_system& system) +{ + // early return check, as there is no point in locking when its empty + if (system.tasks.empty()) return false; + + // grab hold on task list + system.tlock.lock(); + + if (system.tasks.empty()) { + system.tlock.unlock(); + // don't try again + return false; + } + + // pick up a task + smp::task task = std::move(system.tasks.front()); + system.tasks.pop_front(); + + system.tlock.unlock(); + + // execute actual task + task.func(); + + // add done function to completed list (only if its callable) + if (task.done != nullptr) + { + // NOTE: specifically pushing to this cpu here, and not main system + auto& system = PER_CPU(smp::systems); + system.flock.lock(); + system.completed.push_back(std::move(task.done)); + system.flock.unlock(); + // signal home + system.work_done = true; + } + return true; +} +void smp_task_handler() +{ + auto& system = PER_CPU(smp::systems); + system.work_done = false; + // cpu-specific tasks + while (smp_task_doer(system)); + // global tasks (by taking from index 0) + while (smp_task_doer(systems[0])); + // if we did any work with done functions, signal back + if (system.work_done) { + // set bit for this CPU + smp::main_system.bitmap.atomic_set(SMP::cpu_id()); + // signal main CPU + SMP::signal_bsp(); + } +} + +} diff --git a/src/platform/x86_pc/apic_revenant.cpp b/src/platform/x86_pc/apic_revenant.cpp index 01917b37bf..8be2cf0dd3 100644 --- a/src/platform/x86_pc/apic_revenant.cpp +++ b/src/platform/x86_pc/apic_revenant.cpp @@ -7,73 +7,18 @@ #include #include #include +#include #include namespace x86 { extern void initialize_cpu_tables_for_cpu(int); - smp_stuff smp_main; - std::vector smp_system; } #define INFO(FROM, TEXT, ...) printf("%13s ] " TEXT "\n", "[ " FROM, ##__VA_ARGS__) -using namespace x86; - -static bool revenant_task_doer(smp_system_stuff& system) -{ - // grab hold on task list - system.tlock.lock(); - - if (system.tasks.empty()) { - system.tlock.unlock(); - // try again - return false; - } - - // create local vector which holds tasks - std::vector tasks; - system.tasks.swap(tasks); - - system.tlock.unlock(); - - for (auto& task : tasks) - { - // execute actual task - task.func(); - - // add done function to completed list (only if its callable) - if (task.done) - { - // NOTE: specifically pushing to 'smp' here, and not 'system' - PER_CPU(smp_system).flock.lock(); - PER_CPU(smp_system).completed.push_back(std::move(task.done)); - PER_CPU(smp_system).flock.unlock(); - // signal home - PER_CPU(smp_system).work_done = true; - } - } - return true; -} -static void revenant_task_handler() -{ - auto& system = PER_CPU(smp_system); - system.work_done = false; - // cpu-specific tasks - while(revenant_task_doer(PER_CPU(smp_system))); - // global tasks (by taking from index 0) - while (revenant_task_doer(smp_system[0])); - // if we did any work with done functions, signal back - if (system.work_done) { - // set bit for this CPU - smp_main.bitmap.atomic_set(SMP::cpu_id()); - // signal main CPU - x86::APIC::get().send_bsp_intr(); - } -} - void revenant_thread_main(int cpu) { sched_yield(); - uintptr_t this_stack = smp_main.stack_base + cpu * smp_main.stack_size; + uintptr_t this_stack = smp::main_system.stack_base + cpu * smp::main_system.stack_size; // show we are online, and verify CPU ID is correct SMP::global_lock(); @@ -84,25 +29,28 @@ void revenant_thread_main(int cpu) auto& ev = Events::get(cpu); ev.init_local(); // subscribe to task and timer interrupts - ev.subscribe(0, revenant_task_handler); - ev.subscribe(1, APIC_Timer::start_timers); + ev.subscribe(0, smp::smp_task_handler); + ev.subscribe(1, x86::APIC_Timer::start_timers); // enable interrupts asm volatile("sti"); // init timer system - APIC_Timer::init(); + x86::APIC_Timer::init(); // initialize clocks - Clocks::init(); - // seed RNG + x86::Clocks::init(); +#ifndef INCLUDEOS_RNG_IS_SHARED + // NOTE: its faster if we can steal RNG from main CPU, but not scaleable + // perhaps its just better to do it like this, or even share RNG RNG::get().init(); +#endif // allow programmers to do stuff on each core at init SMP::init_task(); // signal that the revenant has started - smp_main.boot_barrier.increment(); + smp::main_system.boot_barrier.increment(); SMP::global_lock(); - x86::smp_main.initialized_cpus.push_back(cpu); + smp::main_system.initialized_cpus.push_back(cpu); SMP::global_unlock(); while (true) { @@ -112,6 +60,7 @@ void revenant_thread_main(int cpu) __builtin_unreachable(); } +extern "C" void revenant_main(int cpu) { // enable Local APIC @@ -123,8 +72,9 @@ void revenant_main(int cpu) #ifdef ARCH_x86_64 // interrupt stack tables - uintptr_t this_stack = smp_main.stack_base + cpu * smp_main.stack_size; - ist_initialize_for_cpu(cpu, this_stack); + uintptr_t this_stack = + smp::main_system.stack_base + cpu * smp::main_system.stack_size; + x86::ist_initialize_for_cpu(cpu, this_stack); const uint64_t star_kernel_cs = 8ull << 32; const uint64_t star_user_cs = 8ull << 48; @@ -133,7 +83,7 @@ void revenant_main(int cpu) x86::CPU::write_msr(IA32_LSTAR, (uintptr_t)&__syscall_entry); #endif - auto& system = PER_CPU(smp_system); + auto& system = PER_CPU(smp::systems); // setup main thread auto* kthread = kernel::setup_main_thread(system.main_thread_id); // resume APs main thread diff --git a/src/platform/x86_pc/apic_revenant.hpp b/src/platform/x86_pc/apic_revenant.hpp index 2880b41946..301253c76f 100644 --- a/src/platform/x86_pc/apic_revenant.hpp +++ b/src/platform/x86_pc/apic_revenant.hpp @@ -1,51 +1,7 @@ - #pragma once #ifndef X86_APIC_REVENANT_HPP #define X86_APIC_REVENANT_HPP -#include "smp.hpp" -#include -#include -#include -#include -#include - -extern "C" void revenant_main(int); extern void revenant_thread_main(int cpu); -namespace x86 { -struct smp_task { - smp_task(SMP::task_func a, - SMP::done_func b) - : func(a), done(b) {} - - SMP::task_func func; - SMP::done_func done; -}; - -struct smp_stuff -{ - uintptr_t stack_base; - uintptr_t stack_size; - smp_barrier boot_barrier; - std::vector initialized_cpus {0}; - std::array bmp_storage = {0}; - MemBitmap bitmap{bmp_storage.data(), bmp_storage.size()}; -}; -extern smp_stuff smp_main; - -struct smp_system_stuff -{ - smp_spinlock tlock; - smp_spinlock flock; - std::vector tasks; - std::vector completed; - bool work_done = false; - // main thread on this vCPU - std::thread* main_thread = nullptr; - long main_thread_id = 0; -}; - extern std::vector smp_system; -} - #endif diff --git a/src/platform/x86_pc/smp.cpp b/src/platform/x86_pc/smp.cpp index be489836a4..ced57b5d47 100644 --- a/src/platform/x86_pc/smp.cpp +++ b/src/platform/x86_pc/smp.cpp @@ -6,6 +6,7 @@ #include "pit.hpp" #include #include +#include #include #include #include @@ -38,8 +39,8 @@ void init_SMP() { const uint32_t CPUcount = ACPI::get_cpus().size(); // avoid heap usage during AP init - x86::smp_main.initialized_cpus.reserve(CPUcount); - x86::smp_system.resize(CPUcount); + smp::main_system.initialized_cpus.reserve(CPUcount); + smp::systems.resize(CPUcount); if (CPUcount <= 1) return; // copy our bootloader to APIC init location @@ -49,8 +50,8 @@ void init_SMP() // allocate revenant main stacks void* stack = memalign(4096, CPUcount * REV_STACK_SIZE); - smp_main.stack_base = (uintptr_t) stack; - smp_main.stack_size = REV_STACK_SIZE; + smp::main_system.stack_base = (uintptr_t) stack; + smp::main_system.stack_size = REV_STACK_SIZE; // modify bootloader to support our cause auto* boot = (apic_boot*) BOOTLOADER_LOCATION; @@ -62,28 +63,29 @@ void init_SMP() #else #error "Unimplemented arch" #endif - boot->stack_base = (uint32_t) smp_main.stack_base; + boot->stack_base = (uint32_t) smp::main_system.stack_base; // add to start at top of each stack, remove to offset cpu 1 to idx 0 boot->stack_base -= 16; - boot->stack_size = smp_main.stack_size; + boot->stack_size = smp::main_system.stack_size; debug("APIC stack base: %#x size: %u main size: %u\n", boot->stack_base, boot->stack_size, sizeof(boot->worker_addr)); assert((boot->stack_base & 15) == 0); // reset barrier - smp_main.boot_barrier.reset(1); + smp::main_system.boot_barrier.reset(1); auto& apic = x86::APIC::get(); // massage musl to create a main thread for each AP for (const auto& cpu : ACPI::get_cpus()) { if (cpu.id == apic.get_id() || cpu.id >= CPUcount) continue; - // thread should immediately yield - auto* t = new std::thread(&revenant_thread_main, cpu.id); + // this thread will immediately yield back here + new std::thread(&revenant_thread_main, cpu.id); + // the last thread id will be the above threads kernel id + // alternatively, we can extract this threads last-created childs id const long tid = kernel::get_last_thread_id(); // store thread info in SMP structure - auto& system = smp_system.at(cpu.id); - system.main_thread = t; + auto& system = smp::systems.at(cpu.id); system.main_thread_id = tid; // migrate thread to its CPU auto* kthread = kernel::ThreadManager::get().detach(tid); @@ -113,30 +115,11 @@ void init_SMP() //PIT::blocking_cycles(1); // wait for all APs to start - smp_main.boot_barrier.spin_wait(CPUcount); + smp::main_system.boot_barrier.spin_wait(CPUcount); INFO("SMP", "All %u APs are online now\n", CPUcount); // subscribe to IPIs - Events::get().subscribe(BSP_LAPIC_IPI_IRQ, - [] { - int next = smp_main.bitmap.first_set(); - while (next != -1) - { - // remove bit - smp_main.bitmap.atomic_reset(next); - // get jobs from other CPU - std::vector done; - smp_system[next].flock.lock(); - smp_system[next].completed.swap(done); - smp_system[next].flock.unlock(); - - // execute all tasks - for (auto& func : done) func(); - - // get next set bit - next = smp_main.bitmap.first_set(); - } - }); + Events::get().subscribe(BSP_LAPIC_IPI_IRQ, smp::task_done_handler); } } // x86 @@ -145,10 +128,10 @@ using namespace x86; /// implementation of the SMP interface /// int SMP::cpu_count() noexcept { - return x86::smp_main.initialized_cpus.size(); + return smp::main_system.initialized_cpus.size(); } const std::vector& SMP::active_cpus() { - return x86::smp_main.initialized_cpus; + return smp::main_system.initialized_cpus; } size_t SMP::early_cpu_total() noexcept { return ACPI::get_cpus().size(); @@ -160,27 +143,29 @@ void SMP::init_task() /* do nothing */ } -void SMP::add_task(smp_task_func task, smp_done_func done, int cpu) +void SMP::add_task(SMP::task_func task, SMP::done_func done, int cpu) { - smp_system[cpu].tlock.lock(); - smp_system[cpu].tasks.emplace_back(std::move(task), std::move(done)); - smp_system[cpu].tlock.unlock(); + auto& system = PER_CPU(smp::systems); + system.tlock.lock(); + system.tasks.emplace_back(std::move(task), std::move(done)); + system.tlock.unlock(); } -void SMP::add_task(smp_task_func task, int cpu) +void SMP::add_task(SMP::task_func task, int cpu) { - smp_system[cpu].tlock.lock(); - smp_system[cpu].tasks.emplace_back(std::move(task), nullptr); - smp_system[cpu].tlock.unlock(); + auto& system = PER_CPU(smp::systems); + system.tlock.lock(); + system.tasks.emplace_back(std::move(task), nullptr); + system.tlock.unlock(); } -void SMP::add_bsp_task(smp_done_func task) +void SMP::add_bsp_task(SMP::done_func task) { // queue job - auto& system = PER_CPU(smp_system); + auto& system = PER_CPU(smp::systems); system.flock.lock(); system.completed.push_back(std::move(task)); system.flock.unlock(); // set this CPU bit - smp_main.bitmap.atomic_set(SMP::cpu_id()); + smp::main_system.bitmap.atomic_set(SMP::cpu_id()); // call home x86::APIC::get().send_bsp_intr(); } diff --git a/src/platform/x86_pc/smp.hpp b/src/platform/x86_pc/smp.hpp index 91b7cae437..2ef5bf0dc8 100644 --- a/src/platform/x86_pc/smp.hpp +++ b/src/platform/x86_pc/smp.hpp @@ -7,9 +7,6 @@ #include #include -typedef SMP::task_func smp_task_func; -typedef SMP::done_func smp_done_func; - namespace x86 { extern void init_SMP(); From 80149ab0a88abfd64ec40659f529327f6fae510a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alf-Andr=C3=A9=20Walla?= Date: Sun, 8 Dec 2019 17:26:23 +0100 Subject: [PATCH 81/81] x86: Enable XSAVE/AVX on APs as well --- src/arch/x86_64/apic_longmode.asm | 17 ++++++++++++++++- src/platform/x86_pc/apic_boot.asm | 13 ------------- src/platform/x86_pc/start.asm | 28 ++++++++++++++-------------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/arch/x86_64/apic_longmode.asm b/src/arch/x86_64/apic_longmode.asm index c5d09a837b..41f7ad723c 100644 --- a/src/arch/x86_64/apic_longmode.asm +++ b/src/arch/x86_64/apic_longmode.asm @@ -2,6 +2,12 @@ global __apic_trampoline:function extern __gdt64_base_pointer extern revenant_main +;; we will be calling these from AP initialization +extern x86_enable_sse +extern x86_enable_fpu_native +extern x86_enable_xsave +extern x86_enable_avx + %define P4_TAB 0x1000 ;; Extended Feature Enable Register (MSR) %define IA32_EFER_MSR 0xC0000080 @@ -14,7 +20,16 @@ extern revenant_main [BITS 32] __apic_trampoline: - pop edi ;; cpuid + ;; enable SSE before we enter C/C++ land + call x86_enable_sse + ;; Enable modern x87 FPU exception handling + call x86_enable_fpu_native + ;; try to enable XSAVE before checking AVX + call x86_enable_xsave + ;; enable AVX if xsave and avx supported on CPU + call x86_enable_avx + + pop edi ;; cpuid ;; use same pagetable as CPU 0 mov eax, P4_TAB diff --git a/src/platform/x86_pc/apic_boot.asm b/src/platform/x86_pc/apic_boot.asm index 9403b50db6..44bef9f8da 100644 --- a/src/platform/x86_pc/apic_boot.asm +++ b/src/platform/x86_pc/apic_boot.asm @@ -75,21 +75,8 @@ protected_mode: mov ebp, eax mov esp, ebp - ; enable SSE - call enable_sse - push ebx call [revenant_main] ; stop execution cli hlt - -enable_sse: - mov eax, cr0 - and ax, 0xFFFB ;clear coprocessor emulation CR0.EM - or ax, 0x2 ;set coprocessor monitoring CR0.MP - mov cr0, eax - mov eax, cr4 - or ax, 3 << 9 ;set CR4.OSFXSR and CR4.OSXMMEXCPT at the same time - mov cr4, eax - ret diff --git a/src/platform/x86_pc/start.asm b/src/platform/x86_pc/start.asm index 006609fb9f..f23886ae7c 100644 --- a/src/platform/x86_pc/start.asm +++ b/src/platform/x86_pc/start.asm @@ -7,6 +7,12 @@ global __multiboot_addr global _start global __xsave_enabled global __avx_enabled +;; we will be calling these from AP initialization +global x86_enable_sse:function +global x86_enable_fpu_native:function +global x86_enable_xsave:function +global x86_enable_avx:function + %define MB_MAGIC 0x1BADB002 %define MB_FLAGS 0x3 ;; ALIGN + MEMINFO @@ -39,10 +45,6 @@ section .multiboot %define code_segment 0x08 section .data -__xsave_enabled: - dw 0x0 -__avx_enabled: - dw 0x0 __multiboot_magic: dd 0x0 __multiboot_addr: @@ -73,13 +75,13 @@ rock_bottom: mov ebp, esp ;; enable SSE before we enter C/C++ land - call enable_sse + call x86_enable_sse ;; Enable modern x87 FPU exception handling - call enable_fpu_native + call x86_enable_fpu_native ;; try to enable XSAVE before checking AVX - call enable_xsave + call x86_enable_xsave ;; enable AVX if xsave and avx supported on CPU - call enable_avx + call x86_enable_avx ;; Save multiboot params mov DWORD [__multiboot_magic], eax @@ -88,7 +90,7 @@ rock_bottom: call __arch_start jmp __start_panic -enable_fpu_native: +x86_enable_fpu_native: push eax mov eax, cr0 or eax, 0x20 @@ -96,7 +98,7 @@ enable_fpu_native: pop eax ret -enable_sse: +x86_enable_sse: push eax ;preserve eax for multiboot mov eax, cr0 and ax, 0xFFFB ;clear coprocessor emulation CR0.EM @@ -108,7 +110,7 @@ enable_sse: pop eax ret -enable_xsave: +x86_enable_xsave: push eax push ebx ; check for XSAVE support @@ -123,13 +125,12 @@ enable_xsave: mov eax, cr4 or eax, 0x40000 mov cr4, eax - mov WORD [__xsave_enabled], 0x1 xsave_not_supported: pop ebx pop eax ret -enable_avx: +x86_enable_avx: push eax push ebx ;; assuming cpuid with eax=1 supported @@ -145,7 +146,6 @@ enable_avx: xgetbv or eax, 0x7 xsetbv - mov WORD [__avx_enabled], 0x1 avx_not_supported: pop ebx pop eax