From ab27102c487a0375b4a240508485346e4812df61 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 17 Jul 2017 16:35:09 +0200 Subject: [PATCH 01/43] add flag to be sure that the linker creates a static binary --- arch/x86/loader/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/loader/CMakeLists.txt b/arch/x86/loader/CMakeLists.txt index 0d142c166..b9ea11d7e 100644 --- a/arch/x86/loader/CMakeLists.txt +++ b/arch/x86/loader/CMakeLists.txt @@ -24,7 +24,7 @@ target_link_libraries(arch_x86_loader "-T ${CMAKE_CURRENT_LIST_DIR}/link.ld" "-z max-page-size=4096" -Wl,--build-id=none # required because CMake links with gcc, not ld - -nostdlib) + -nostdlib -static) # tools/proxy looks for `ldhermit.elf` set_target_properties(arch_x86_loader PROPERTIES From 99def26ce048402f083f3f9969c7660b80f15a5c Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 26 Jul 2017 22:23:57 +0200 Subject: [PATCH 02/43] remove typo --- arch/x86/kernel/entry.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index 02ee343d2..74658a231 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -199,7 +199,7 @@ Lremap: add rax, 0x200000 add rcx, 0x200000 add rdi, 8 - ; note: the whole code segement muust fit in the first pgd + ; note: the whole code segement have to fit in the first pgd cmp rcx, rsi jnb Lno_pml4_init cmp rcx, QWORD [image_size] From 23a98157b28a1a5ca02a8a1e420a625c5c73ed4d Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 26 Jul 2017 23:47:02 +0200 Subject: [PATCH 03/43] remove stupid typo --- arch/x86/kernel/entry.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index 74658a231..d80c9befc 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -199,7 +199,7 @@ Lremap: add rax, 0x200000 add rcx, 0x200000 add rdi, 8 - ; note: the whole code segement have to fit in the first pgd + ; note: the whole code segement has to fit in the first pgd cmp rcx, rsi jnb Lno_pml4_init cmp rcx, QWORD [image_size] From c7ce8fc81b08f6e52e019014404a9c031672e696 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 27 Jul 2017 11:01:54 +0200 Subject: [PATCH 04/43] avoid memory access by preloading image_size into r11 --- arch/x86/kernel/entry.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index d80c9befc..a4c68e835 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -194,6 +194,7 @@ Lno_mbinfo: xor rcx, rcx mov rsi, 510*0x200000 sub rsi, kernel_start + mov r11, QWORD [image_size] Lremap: mov QWORD [rdi], rax add rax, 0x200000 @@ -202,7 +203,7 @@ Lremap: ; note: the whole code segement has to fit in the first pgd cmp rcx, rsi jnb Lno_pml4_init - cmp rcx, QWORD [image_size] + cmp rcx, r11 jb Lremap Lno_pml4_init: From c1ff763da30f63e84ca526892c72c4dddd716db1 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 27 Jul 2017 18:58:48 +0200 Subject: [PATCH 05/43] increase version number to 0.2.1 --- .bintray_descriptor.json | 2 +- cmake/HermitCore-Configuration.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bintray_descriptor.json b/.bintray_descriptor.json index a066145d1..5d244a4f7 100644 --- a/.bintray_descriptor.json +++ b/.bintray_descriptor.json @@ -13,7 +13,7 @@ }, "version": { - "name": "0.2", + "name": "0.2.1", "desc": "HermitCore's kernel as libOS", "gpgSign": false }, diff --git a/cmake/HermitCore-Configuration.cmake b/cmake/HermitCore-Configuration.cmake index 69876b157..bd5753eef 100644 --- a/cmake/HermitCore-Configuration.cmake +++ b/cmake/HermitCore-Configuration.cmake @@ -1,4 +1,4 @@ -set(PACKAGE_VERSION "0.2" CACHE STRING +set(PACKAGE_VERSION "0.2.1" CACHE STRING "HermitCore current version") set(MAX_CORES "512" CACHE STRING From ac06dec12d3cda60538d4ff959ef82b0e3e9ffc2 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 28 Jul 2017 00:10:00 +0200 Subject: [PATCH 06/43] remove obsolete irq handler --- arch/x86/kernel/timer.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/x86/kernel/timer.c b/arch/x86/kernel/timer.c index f44b49f2e..819adcc26 100644 --- a/arch/x86/kernel/timer.c +++ b/arch/x86/kernel/timer.c @@ -70,10 +70,6 @@ void check_ticks(void) } #endif -static void wakeup_handler(struct state *s) -{ -} - /* * Handles the timer. In this case, it's very simple: We * increment the 'timer_ticks' variable every time the @@ -187,7 +183,6 @@ int timer_init(void) */ irq_install_handler(32, timer_handler); irq_install_handler(123, timer_handler); - irq_install_handler(121, wakeup_handler); #ifdef DYNAMIC_TICKS boot_tsc = has_rdtscp() ? rdtscp(NULL) : rdtsc(); From f8b1d0050a7e4e9542862cbbd3957b1fca0cc57a Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 28 Jul 2017 13:33:30 +0200 Subject: [PATCH 07/43] increasing the readability --- arch/x86/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index d308d6b81..de109c989 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -290,7 +290,7 @@ size_t** irq_handler(struct state *s) size_t** ret = NULL; - if(BUILTIN_EXPECT(s->int_no >= MAX_HANDLERS, 0)) { + if (BUILTIN_EXPECT(s->int_no >= MAX_HANDLERS, 0)) { LOG_ERROR("Invalid IRQ number %d\n", s->int_no); return NULL; } From 640604abb576e8503a920dde6ebae719b6bee692 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 28 Jul 2017 13:33:49 +0200 Subject: [PATCH 08/43] check also in a multikernel env. if HermitCore is sucessfully booted --- lwip | 2 +- tools/proxy.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lwip b/lwip index 3b7c88f0c..51d48fe0c 160000 --- a/lwip +++ b/lwip @@ -1 +1 @@ -Subproject commit 3b7c88f0cb248a647b8edff99793524162ec9083 +Subproject commit 51d48fe0c67131da346c9ef280b2019c77f6e607 diff --git a/tools/proxy.c b/tools/proxy.c index 58aaef55e..d36d01cdc 100644 --- a/tools/proxy.c +++ b/tools/proxy.c @@ -270,7 +270,7 @@ static void wait_hermit_available(void) return; int fd = inotify_init(); - if ( fd < 0 ) { + if (fd < 0) { perror( "inotify_init" ); exit(1); } @@ -522,7 +522,7 @@ static int multi_init(char *path) free(result); // wait until HermitCore is sucessfully booted - //wait_hermit_available(); + wait_hermit_available(); return 0; } From 02944a071da889bd5ac92354131f580335ec70bf Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 29 Jul 2017 02:18:56 +0200 Subject: [PATCH 09/43] update version number --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e212473ce..65cdc03cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,7 @@ set(CPACK_SYSTEM_NAME all) set(CPACK_PACKAGE_VERSION_MAJOR 0) set(CPACK_PACKAGE_VERSION_MINOR 2) -set(CPACK_PACKAGE_VERSION_PATCH 0) +set(CPACK_PACKAGE_VERSION_PATCH 1) set(CPACK_PACKAGE_CONTACT "Stefan Lankes ") From 63a19ececbf1bf9aa6bd585ddb1954fb7d7d7060 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 31 Jul 2017 01:05:45 +0200 Subject: [PATCH 10/43] remove typo (disable timer instead of thermal interrupt) --- arch/x86/kernel/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index e51230846..317ad22f4 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c @@ -176,7 +176,7 @@ static inline void lapic_timer_set_counter(uint32_t counter) static inline void lapic_timer_disable(void) { - lapic_write(APIC_LVT_TSR, 0x10000); + lapic_write(APIC_LVT_T, 0x10000); } static inline void lapic_timer_oneshot(void) From beb86f75a9d585b14daf291ef999b417aeb9742e Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 31 Jul 2017 01:15:25 +0200 Subject: [PATCH 11/43] check supportet LVT level before disabling LVT_TSR & LVT_PMV --- arch/x86/kernel/apic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index 317ad22f4..033ebda04 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c @@ -1063,8 +1063,10 @@ void shutdown_system(void) if (if_bootprocessor) LOG_INFO("Disable APIC\n"); - lapic_write(APIC_LVT_TSR, 0x10000); // disable thermal sensor interrupt - lapic_write(APIC_LVT_PMC, 0x10000); // disable performance counter interrupt + if (max_lvt >= 4) + lapic_write(APIC_LVT_TSR, 0x10000); // disable thermal sensor interrupt + if (max_lvt >= 5) + lapic_write(APIC_LVT_PMC, 0x10000); // disable performance counter interrupt lapic_write(APIC_SVR, 0x00); // disable the apic // disable x2APIC From c3080e0d75935d8a04acc82c420f39efa61e62da Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 31 Jul 2017 01:23:13 +0200 Subject: [PATCH 12/43] determine the current LVT level before checking the level --- arch/x86/kernel/apic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index 033ebda04..1192490b8 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c @@ -1041,6 +1041,7 @@ static void apic_err_handler(struct state *s) void shutdown_system(void) { int if_bootprocessor = (boot_processor == apic_cpu_id()); + uint32_t max_lvt; irq_disable(); @@ -1063,6 +1064,7 @@ void shutdown_system(void) if (if_bootprocessor) LOG_INFO("Disable APIC\n"); + max_lvt = apic_lvt_entries(); if (max_lvt >= 4) lapic_write(APIC_LVT_TSR, 0x10000); // disable thermal sensor interrupt if (max_lvt >= 5) From 8b89b18a966cf327f913094fa49c15ff4e370e26 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 00:07:20 +0200 Subject: [PATCH 13/43] enable support of machine check handling --- arch/x86/include/asm/processor.h | 5 +++++ arch/x86/kernel/processor.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 24ae11b78..15aa50a70 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -52,6 +52,7 @@ extern "C" { #define CPU_FEATURE_PSE (1 << 3) #define CPU_FEATURE_MSR (1 << 5) #define CPU_FEATURE_PAE (1 << 6) +#define CPU_FEATURE_MCE (1 << 7) #define CPU_FEATURE_APIC (1 << 9) #define CPU_FEATURE_SEP (1 << 11) #define CPU_FEATURE_PGE (1 << 13) @@ -308,6 +309,10 @@ inline static uint32_t has_msr(void) { return (cpu_info.feature1 & CPU_FEATURE_MSR); } +inline static uint32_t has_mce(void) { + return (cpu_info.feature1 & CPU_FEATURE_MCE); +} + inline static uint32_t has_apic(void) { return (cpu_info.feature1 & CPU_FEATURE_APIC); } diff --git a/arch/x86/kernel/processor.c b/arch/x86/kernel/processor.c index 55f6dbdc1..8da294e21 100644 --- a/arch/x86/kernel/processor.c +++ b/arch/x86/kernel/processor.c @@ -472,6 +472,8 @@ int cpu_detection(void) { cr4 |= CR4_PGE; if (has_fsgsbase()) cr4 |= CR4_FSGSBASE; + if (has_mce()) + cr4 |= CR4_MCE; // enable machine check exceptions //if (has_vmx()) // cr4 |= CR4_VMXE; cr4 &= ~CR4_TSD; // => every privilege level is able to use rdtsc From cd6ebf5d8fa122e09968e8b38058f01b7190c4c6 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 00:21:23 +0200 Subject: [PATCH 14/43] add info message if MCE is available --- arch/x86/kernel/processor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/processor.c b/arch/x86/kernel/processor.c index 8da294e21..ca225dd47 100644 --- a/arch/x86/kernel/processor.c +++ b/arch/x86/kernel/processor.c @@ -554,7 +554,7 @@ int cpu_detection(void) { a = b = c = d = 0; cpuid(1, &a, &b, &cpu_info.feature2, &cpu_info.feature1); - LOG_INFO("CPU features: %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", + LOG_INFO("CPU features: %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", has_sse() ? "SSE " : "", has_sse2() ? "SSE2 " : "", has_sse3() ? "SSE3 " : "", @@ -566,6 +566,7 @@ int cpu_detection(void) { has_fma() ? "FMA " : "", has_movbe() ? "MOVBE " : "", has_x2apic() ? "X2APIC " : "", + has_mce() ? "MCE " : "", has_fpu() ? "FPU " : "", has_fxsr() ? "FXSR " : "", has_xsave() ? "XSAVE " : "", From 3cc3cb0a29cd7f85a9cb6fb87c7f875353a8716b Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 00:43:01 +0200 Subject: [PATCH 15/43] increasing the readability --- arch/x86/kernel/gdt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/gdt.c b/arch/x86/kernel/gdt.c index b56f48381..2eca34564 100644 --- a/arch/x86/kernel/gdt.c +++ b/arch/x86/kernel/gdt.c @@ -41,7 +41,7 @@ gdt_ptr_t gp; // currently, our kernel has full access to the ioports static gdt_entry_t gdt[GDT_ENTRIES] = {[0 ... GDT_ENTRIES-1] = {0, 0, 0, 0, 0, 0}}; static tss_t task_state_segments[MAX_CORES] __attribute__ ((aligned (PAGE_SIZE))); -static uint8_t stack_table[MAX_CORES*KERNEL_STACK_SIZE*MAX_IST] __attribute__ ((aligned (PAGE_SIZE))); +static uint8_t stack_table[MAX_CORES][KERNEL_STACK_SIZE*MAX_IST] __attribute__ ((aligned (PAGE_SIZE))); extern const void boot_stack; @@ -149,9 +149,9 @@ void gdt_install(void) for(i=0; i Date: Thu, 3 Aug 2017 07:48:39 +0200 Subject: [PATCH 16/43] remove mwait support to avoid priority inversion --- arch/x86/kernel/tasks.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kernel/tasks.c b/arch/x86/kernel/tasks.c index d063662d8..81d38aeca 100644 --- a/arch/x86/kernel/tasks.c +++ b/arch/x86/kernel/tasks.c @@ -195,6 +195,9 @@ int create_default_frame(task_t* task, entry_point_t ep, void* arg, uint32_t cor void wait_for_task(void) { +#if 1 + HALT; +#else if (!has_mwait()) { HALT; } else { @@ -206,13 +209,16 @@ void wait_for_task(void) monitor(queue, 0, 0); mwait(0x2 /* 0x2 = c3, 0xF = c0 */, 1 /* break on interrupt flag */); } +#endif } void wakeup_core(uint32_t core_id) { +#if 0 // if mwait is available, an IPI isn't required to wakeup the core if (has_mwait()) return; +#endif // no self IPI required if (core_id == CORE_ID) From 3316bb74aabd9e2770d7113c73fe989396e7e7b7 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 07:49:35 +0200 Subject: [PATCH 17/43] add address of the CMCI register --- arch/x86/include/asm/apic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index c613c11b6..b679a06e0 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -48,6 +48,8 @@ extern "C" { #define APIC_SVR 0x00F0 /// Error Status Register #define APIC_ESR 0x0280 +/// Corrected Machine-Check Error Interrupt Register +#define APIC_CMCI 0x02F0 /// Interrupt Command Register [bits 0-31] #define APIC_ICR1 0x0300 /// Interrupt Command Register [bits 32-63] From 080c16088ea56237c9e1590f6b7f20936208d5dc Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 11:52:52 +0200 Subject: [PATCH 18/43] add option to disable mwait support --- arch/x86/kernel/tasks.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/tasks.c b/arch/x86/kernel/tasks.c index 81d38aeca..656dbc820 100644 --- a/arch/x86/kernel/tasks.c +++ b/arch/x86/kernel/tasks.c @@ -193,9 +193,11 @@ int create_default_frame(task_t* task, entry_point_t ep, void* arg, uint32_t cor return 0; } +#define USE_MWAIT + void wait_for_task(void) { -#if 1 +#ifndef USE_MWAIT HALT; #else if (!has_mwait()) { @@ -214,7 +216,7 @@ void wait_for_task(void) void wakeup_core(uint32_t core_id) { -#if 0 +#ifdef USE_MWAIT // if mwait is available, an IPI isn't required to wakeup the core if (has_mwait()) return; From df256cc6c1eaa697824ac69a63907a978691beff Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 13:50:44 +0200 Subject: [PATCH 19/43] use unsigned operation instead of signed --- arch/x86/kernel/entry.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index a4c68e835..4fb92acc2 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -202,9 +202,9 @@ Lremap: add rdi, 8 ; note: the whole code segement has to fit in the first pgd cmp rcx, rsi - jnb Lno_pml4_init + jnl Lno_pml4_init cmp rcx, r11 - jb Lremap + jl Lremap Lno_pml4_init: ; Set CR3 From 901caa81c074b13204465fe48aeec46e3ce4b15f Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 13:54:20 +0200 Subject: [PATCH 20/43] increase kernel stack size --- cmake/HermitCore-Configuration.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/HermitCore-Configuration.cmake b/cmake/HermitCore-Configuration.cmake index bd5753eef..2e6f14874 100644 --- a/cmake/HermitCore-Configuration.cmake +++ b/cmake/HermitCore-Configuration.cmake @@ -13,7 +13,7 @@ set(MAX_ISLE "8" CACHE STRING set(MAX_FNAME "128" CACHE STRING "Define the maximum length of a file name") -set(KERNEL_STACK_SIZE 8192 CACHE STRING +set(KERNEL_STACK_SIZE 16384 CACHE STRING "Kernel stack size in bytes") set(DEFAULT_STACK_SIZE 262144 CACHE STRING From abeae7ac0b760813eb297c877218ceed28badd11 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 15:18:43 +0200 Subject: [PATCH 21/43] remove obsolete global variable "kernel_stack" --- arch/x86/kernel/entry.asm | 1 - arch/x86/kernel/tasks.c | 1 - include/hermit/stddef.h | 3 --- kernel/tasks.c | 3 --- 4 files changed, 8 deletions(-) diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index 4fb92acc2..6375533da 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -416,7 +416,6 @@ extern irq_handler extern get_current_stack extern finish_task_switch extern syscall_handler -extern kernel_stack global getcontext align 64 diff --git a/arch/x86/kernel/tasks.c b/arch/x86/kernel/tasks.c index 656dbc820..4a3a89045 100644 --- a/arch/x86/kernel/tasks.c +++ b/arch/x86/kernel/tasks.c @@ -126,7 +126,6 @@ size_t* get_current_stack(void) else stptr = (stptr + DEFAULT_STACK_SIZE - sizeof(size_t)) & ~0x1F; - set_per_core(kernel_stack, stptr); set_tss(stptr, (size_t) curr_task->ist_addr + KERNEL_STACK_SIZE - 0x10); return curr_task->last_stack_pointer; diff --git a/include/hermit/stddef.h b/include/hermit/stddef.h index 5b1531cbb..818ad5fc8 100644 --- a/include/hermit/stddef.h +++ b/include/hermit/stddef.h @@ -83,9 +83,6 @@ typedef unsigned int tid_t; struct task; DECLARE_PER_CORE(struct task*, current_task); -/* allows fast access to the kernel stack */ -DECLARE_PER_CORE(char*, kernel_stack); - #if MAX_CORES > 1 /* allows fast access to the core id */ DECLARE_PER_CORE(uint32_t, __core_id); diff --git a/kernel/tasks.c b/kernel/tasks.c index 47655cb0d..f886fc0a2 100644 --- a/kernel/tasks.c +++ b/kernel/tasks.c @@ -67,7 +67,6 @@ static readyqueues_t readyqueues[1] = {[0] = {task_table+0, NULL, 0, 0, 0, {[0 . #endif DEFINE_PER_CORE(task_t*, current_task, task_table+0); -DEFINE_PER_CORE(char*, kernel_stack, NULL); #if MAX_CORES > 1 DEFINE_PER_CORE(uint32_t, __core_id, 0); @@ -282,7 +281,6 @@ int multitasking_init(void) task_table[0].prio = IDLE_PRIO; task_table[0].stack = (char*) ((size_t)&boot_stack + core_id * KERNEL_STACK_SIZE); task_table[0].ist_addr = (char*)&boot_ist; - set_per_core(kernel_stack, task_table[0].stack + KERNEL_STACK_SIZE - 0x10); set_per_core(current_task, task_table+0); arch_init_task(task_table+0); @@ -307,7 +305,6 @@ int set_idle_task(void) task_table[i].last_stack_pointer = NULL; task_table[i].stack = (char*) ((size_t)&boot_stack + core_id * KERNEL_STACK_SIZE); task_table[i].ist_addr = create_stack(KERNEL_STACK_SIZE); - set_per_core(kernel_stack, task_table[i].stack + KERNEL_STACK_SIZE - 0x10); task_table[i].prio = IDLE_PRIO; task_table[i].heap = NULL; readyqueues[core_id].idle = task_table+i; From 3d570f744cf6bd29a4e02a0bf7c56ae9ccbdf250 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 19:30:34 +0200 Subject: [PATCH 22/43] reduce kernel stack size to 8 kib --- cmake/HermitCore-Configuration.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/HermitCore-Configuration.cmake b/cmake/HermitCore-Configuration.cmake index 2e6f14874..bd5753eef 100644 --- a/cmake/HermitCore-Configuration.cmake +++ b/cmake/HermitCore-Configuration.cmake @@ -13,7 +13,7 @@ set(MAX_ISLE "8" CACHE STRING set(MAX_FNAME "128" CACHE STRING "Define the maximum length of a file name") -set(KERNEL_STACK_SIZE 16384 CACHE STRING +set(KERNEL_STACK_SIZE 8192 CACHE STRING "Kernel stack size in bytes") set(DEFAULT_STACK_SIZE 262144 CACHE STRING From 4c8c6b00c454f4490470e203666d175721413e59 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 19:33:50 +0200 Subject: [PATCH 23/43] in a multikernel environment we should'nt wait for HermitCore --- tools/proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/proxy.c b/tools/proxy.c index d36d01cdc..8c5adf472 100644 --- a/tools/proxy.c +++ b/tools/proxy.c @@ -522,7 +522,7 @@ static int multi_init(char *path) free(result); // wait until HermitCore is sucessfully booted - wait_hermit_available(); + //wait_hermit_available(); return 0; } From 7f6bdd72b1260396f2e2ea0efde8cfb3ca7f56d4 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 22:30:30 +0200 Subject: [PATCH 24/43] add option to enable e1000 driver --- drivers/net/e1000.c | 4 ++++ drivers/net/e1000.h | 4 ++++ kernel/main.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index c460f96f6..330c16f5c 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -45,6 +45,8 @@ #include #include +#if USE_E1000 + #define RX_BUF_LEN (2048) #define TX_BUF_LEN (1792) @@ -603,3 +605,5 @@ oom: return ERR_MEM; } + +#endif diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h index 08f0d886f..49ade1225 100644 --- a/drivers/net/e1000.h +++ b/drivers/net/e1000.h @@ -32,6 +32,8 @@ #include #include +#ifdef USE_E1000 + #define NUM_RX_DESCRIPTORS 64 #define NUM_TX_DESCRIPTORS 64 @@ -324,3 +326,5 @@ typedef struct e1000if { err_t e1000if_init(struct netif* netif); #endif + +#endif diff --git a/kernel/main.c b/kernel/main.c index d2fe61327..b5c0bf214 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -206,8 +206,10 @@ static int init_netifs(void) goto success; if ((err = netifapi_netif_add(&default_netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw), NULL, rtl8139if_init, ethernet_input)) == ERR_OK) goto success; +#ifdef USE_E1000 if ((err = netifapi_netif_add(&default_netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw), NULL, e1000if_init, ethernet_input)) == ERR_OK) goto success; +#endif LOG_ERROR("Unable to add the network interface: err = %d\n", err); From ba7291314340f26cb00964b5b5c48c58075689f3 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 22:47:08 +0200 Subject: [PATCH 25/43] enable LWIP_CORE_LOCKING_INPUT --- lwip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lwip b/lwip index 51d48fe0c..c21d911aa 160000 --- a/lwip +++ b/lwip @@ -1 +1 @@ -Subproject commit 51d48fe0c67131da346c9ef280b2019c77f6e607 +Subproject commit c21d911aa4f178563dc102f595d1d97dd8471458 From d785b1b89c72e32a7533c288a5fe371110a689d4 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 4 Aug 2017 10:07:07 +0200 Subject: [PATCH 26/43] initialize APIC after the intialization of IDT & GDT - fix problems with Qemu --- arch/x86/kernel/apic.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index 1192490b8..f75d7fff7 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c @@ -905,12 +905,7 @@ extern int set_idle_task(void); #if MAX_CORES > 1 int smp_start(void) { - x2apic_enable(); - - // reset APIC and set id - lapic_reset(); - - LOG_DEBUG("Processor %d (local id %d) is entering its idle task\n", apic_cpu_id(), atomic_int32_read(¤t_boot_id)); + LOG_DEBUG("Try to initialize processor (local id %d)\n", atomic_int32_read(¤t_boot_id)); // use the same gdt like the boot processors gdt_flush(); @@ -921,6 +916,12 @@ int smp_start(void) // enable additional cpu features cpu_detection(); + x2apic_enable(); + + // reset APIC + lapic_reset(); + + LOG_DEBUG("Processor %d (local id %d) is entering its idle task\n", apic_cpu_id(), atomic_int32_read(¤t_boot_id)); LOG_DEBUG("CR0 of core %u: 0x%x\n", atomic_int32_read(¤t_boot_id), read_cr0()); online[atomic_int32_read(¤t_boot_id)] = 1; From 241fa2bfdc561bba6ce1d473a628d2fcdf176039 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 4 Aug 2017 10:12:52 +0200 Subject: [PATCH 27/43] add tests with 2 CPUs --- tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests.sh b/tests.sh index 3cabbadbe..a4e8f0639 100755 --- a/tests.sh +++ b/tests.sh @@ -9,6 +9,8 @@ PROXY=build/local_prefix/opt/hermit/bin/proxy for f in $FILES; do echo "check $f..."; HERMIT_ISLE=qemu HERMIT_CPUS=1 HERMIT_KVM=0 HERMIT_VERBOSE=1 timeout --kill-after=5m 5m $PROXY $f || exit 1; done +for f in $FILES; do echo "check $f..."; HERMIT_ISLE=qemu HERMIT_CPUS=2 HERMIT_KVM=0 HERMIT_VERBOSE=1 timeout --kill-after=5m 5m $PROXY $f || exit 1; done + # test echo server at port 8000 HERMIT_ISLE=qemu HERMIT_CPUS=1 HERMIT_KVM=0 HERMIT_VERBOSE=1 HERMIT_APP_PORT=8000 $PROXY $TDIR/tests/server & sleep 10 From 8016a757a9453d5e2e423f8e9b95c6196081e633 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 4 Aug 2017 10:35:16 +0200 Subject: [PATCH 28/43] increase version number --- .bintray_descriptor.json | 2 +- CMakeLists.txt | 2 +- cmake/HermitCore-Configuration.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bintray_descriptor.json b/.bintray_descriptor.json index 5d244a4f7..ff3e91669 100644 --- a/.bintray_descriptor.json +++ b/.bintray_descriptor.json @@ -13,7 +13,7 @@ }, "version": { - "name": "0.2.1", + "name": "0.2.2", "desc": "HermitCore's kernel as libOS", "gpgSign": false }, diff --git a/CMakeLists.txt b/CMakeLists.txt index 65cdc03cd..7383b462b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,7 @@ set(CPACK_SYSTEM_NAME all) set(CPACK_PACKAGE_VERSION_MAJOR 0) set(CPACK_PACKAGE_VERSION_MINOR 2) -set(CPACK_PACKAGE_VERSION_PATCH 1) +set(CPACK_PACKAGE_VERSION_PATCH 2) set(CPACK_PACKAGE_CONTACT "Stefan Lankes ") diff --git a/cmake/HermitCore-Configuration.cmake b/cmake/HermitCore-Configuration.cmake index bd5753eef..c38566f8c 100644 --- a/cmake/HermitCore-Configuration.cmake +++ b/cmake/HermitCore-Configuration.cmake @@ -1,4 +1,4 @@ -set(PACKAGE_VERSION "0.2.1" CACHE STRING +set(PACKAGE_VERSION "0.2.2" CACHE STRING "HermitCore current version") set(MAX_CORES "512" CACHE STRING From 68a74edda1a78c6820ac9074008e828de973e576 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 08:11:56 +0200 Subject: [PATCH 29/43] use always compiler flags, which are supported by gcc & clang --- arch/x86/loader/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/loader/CMakeLists.txt b/arch/x86/loader/CMakeLists.txt index b9ea11d7e..01db9dc49 100644 --- a/arch/x86/loader/CMakeLists.txt +++ b/arch/x86/loader/CMakeLists.txt @@ -21,7 +21,7 @@ target_compile_options(arch_x86_loader target_link_libraries(arch_x86_loader arch_x86_loader_asm - "-T ${CMAKE_CURRENT_LIST_DIR}/link.ld" + "-Wl,-T -Wl,${CMAKE_CURRENT_LIST_DIR}/link.ld" "-z max-page-size=4096" -Wl,--build-id=none # required because CMake links with gcc, not ld -nostdlib -static) From c059dfde837f29afe0da1850500a8be9d3158e36 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 08:13:02 +0200 Subject: [PATCH 30/43] test also clang support --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 116a34b6e..f80298cfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,9 @@ dist: trusty git: submodules: true language: c -compiler: gcc +compiler: + - clang + - gcc before_install: - echo "deb https://dl.bintray.com/rwth-os/hermitcore vivid main" | sudo tee -a /etc/apt/sources.list - travis_retry sudo apt-get -qq update From e2bcdaf7db38d53eeebfdcb76f484b9b76c5db27 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 09:17:21 +0200 Subject: [PATCH 31/43] remove compiler flags, which aren't supported by clang --- arch/x86/loader/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/loader/CMakeLists.txt b/arch/x86/loader/CMakeLists.txt index 01db9dc49..359b00a0a 100644 --- a/arch/x86/loader/CMakeLists.txt +++ b/arch/x86/loader/CMakeLists.txt @@ -17,7 +17,7 @@ target_include_directories(arch_x86_loader target_compile_options(arch_x86_loader PRIVATE -O2 -Wall -m64 -std=gnu99 -ffreestanding -mno-red-zone - -fstrength-reduce -fomit-frame-pointer -finline-functions) + -fomit-frame-pointer) target_link_libraries(arch_x86_loader arch_x86_loader_asm From a6db4102786edd9d6e46016102f5d3329c444e2c Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 09:26:13 +0200 Subject: [PATCH 32/43] add check for -fstrength-reduce & -finline-functions --- arch/x86/loader/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/x86/loader/CMakeLists.txt b/arch/x86/loader/CMakeLists.txt index 359b00a0a..c65988ac4 100644 --- a/arch/x86/loader/CMakeLists.txt +++ b/arch/x86/loader/CMakeLists.txt @@ -19,6 +19,17 @@ target_compile_options(arch_x86_loader PRIVATE -O2 -Wall -m64 -std=gnu99 -ffreestanding -mno-red-zone -fomit-frame-pointer) +include(CheckCCompilerFlag) +check_c_compiler_flag(-fstrength-reduce HAS_STRENGTH_REDUCE) +if (HAS_STRENGTH_REDUCE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstrength-reduce") +endif() + +check_c_compiler_flag(-finline-functions HAS_INLINE_FUNCTIONS) +if (HAS_INLINE_FUNCTIONS) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -finline-functions") +endif() + target_link_libraries(arch_x86_loader arch_x86_loader_asm "-Wl,-T -Wl,${CMAKE_CURRENT_LIST_DIR}/link.ld" From a5c5f28a6e5e1def5a3af395077f63e8fe4a7cbb Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 09:29:44 +0200 Subject: [PATCH 33/43] fix typo --- arch/x86/loader/include/ctype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/loader/include/ctype.h b/arch/x86/loader/include/ctype.h index c5aa3915b..597c6d286 100644 --- a/arch/x86/loader/include/ctype.h +++ b/arch/x86/loader/include/ctype.h @@ -25,7 +25,7 @@ */ #ifndef __CTYPE_H_ -#define __CYTPE_H_ +#define __CTYPE_H_ /** Returns true if the value of 'c' is an ASCII-charater */ static inline int isascii(int c) From b9aad1757bf4e61b0f7cc1835357bcf037349c3f Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 09:33:28 +0200 Subject: [PATCH 34/43] remove compiler warnings --- arch/x86/loader/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/loader/uart.c b/arch/x86/loader/uart.c index 5d0599843..2437fd2ff 100644 --- a/arch/x86/loader/uart.c +++ b/arch/x86/loader/uart.c @@ -96,7 +96,7 @@ size_t uartport = 0; static inline unsigned char read_from_uart(uint32_t off) { - uint8_t c; + uint8_t c = 0; if (uartport) c = inportb(uartport + off); From 8ec698a7314b86919d1f851d1a2314484d5851ad Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 09:48:57 +0200 Subject: [PATCH 35/43] remove obsolete static array --- arch/x86/loader/page.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/arch/x86/loader/page.c b/arch/x86/loader/page.c index 0cab29437..80c4cdedd 100644 --- a/arch/x86/loader/page.c +++ b/arch/x86/loader/page.c @@ -56,12 +56,6 @@ static size_t * const self[PAGE_LEVELS] = { (size_t *) 0xFFC00000, (size_t *) 0xFFFFF000 }; - -/** An other self-reference for page_map_copy() */ -static size_t * const other[PAGE_LEVELS] = { - (size_t *) 0xFF800000, - (size_t *) 0xFFFFE000 -}; #elif defined(CONFIG_X86_64) /** A self-reference enables direct access to all page tables */ static size_t* const self[PAGE_LEVELS] = { @@ -70,14 +64,6 @@ static size_t* const self[PAGE_LEVELS] = { (size_t *) 0xFFFFFFFFFFE00000, (size_t *) 0xFFFFFFFFFFFFF000 }; - -/** An other self-reference for page_map_copy() */ -static size_t * const other[PAGE_LEVELS] = { - (size_t *) 0xFFFFFF0000000000, - (size_t *) 0xFFFFFFFF80000000, - (size_t *) 0xFFFFFFFFFFC00000, - (size_t *) 0xFFFFFFFFFFFFE000 -}; #endif /** @brief Flush a specific page entry in TLB From f40f9ed51e4eefefc6fdc1b7381127cbc9c6af9b Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 12:14:08 +0200 Subject: [PATCH 36/43] call directly the GNU linker --- arch/x86/loader/CMakeLists.txt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/x86/loader/CMakeLists.txt b/arch/x86/loader/CMakeLists.txt index c65988ac4..daeb29b1d 100644 --- a/arch/x86/loader/CMakeLists.txt +++ b/arch/x86/loader/CMakeLists.txt @@ -30,12 +30,20 @@ if (HAS_INLINE_FUNCTIONS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -finline-functions") endif() -target_link_libraries(arch_x86_loader - arch_x86_loader_asm - "-Wl,-T -Wl,${CMAKE_CURRENT_LIST_DIR}/link.ld" - "-z max-page-size=4096" - -Wl,--build-id=none # required because CMake links with gcc, not ld - -nostdlib -static) +set(CMAKE_LINKER_NAME ld CACHE STRING "Name of the binutils linker") +mark_as_advanced(CMAKE_LINKER_NAME) + +find_program(CMAKE_LINKER ${CMAKE_LINKER_NAME}) +mark_as_advanced(CMAKE_LINKER) + +if(NOT CMAKE_LINKER) + message(FATAL_ERROR "Could not find the GNU LD linker: ${CMAKE_LINKER_NAME}") +endif() + +set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_LINKER} -o ") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -T ${CMAKE_CURRENT_LIST_DIR}/link.ld -z max-page-size=4096 --build-id=none -nostdlib -static") + +target_link_libraries(arch_x86_loader arch_x86_loader_asm) # tools/proxy looks for `ldhermit.elf` set_target_properties(arch_x86_loader PROPERTIES From 8ed44894304680d4dc6c37e65161a85a5dd632b0 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 13:24:17 +0200 Subject: [PATCH 37/43] add debug message --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f80298cfb..3b1c7d670 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ script: - cmake .. - make -j1 package - cd $TRAVIS_BUILD_DIR + - ls -la /home/travis/build/RWTH-OS/HermitCore/build/local_prefix/opt/hermit/bin/ - ./tests.sh notifications: From fa8bc21852bfc7336c38ce7e613efa216d3e994d Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 13:58:43 +0200 Subject: [PATCH 38/43] remove obsolete return type --- tools/uhyve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/uhyve.c b/tools/uhyve.c index da84a3276..64298e1bf 100644 --- a/tools/uhyve.c +++ b/tools/uhyve.c @@ -591,7 +591,7 @@ static void show_registers(int id, struct kvm_regs* regs, struct kvm_sregs* sreg fprintf(stderr, "\n"); } -static int print_registers(void) +static void print_registers(void) { struct kvm_regs regs; struct kvm_sregs sregs; From 597ccb13ace9ccf48fab2b6a50d6de522c3e86ae Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 19:39:22 +0200 Subject: [PATCH 39/43] disable builtin functions --- arch/x86/loader/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/loader/CMakeLists.txt b/arch/x86/loader/CMakeLists.txt index daeb29b1d..f0e23b16e 100644 --- a/arch/x86/loader/CMakeLists.txt +++ b/arch/x86/loader/CMakeLists.txt @@ -17,7 +17,7 @@ target_include_directories(arch_x86_loader target_compile_options(arch_x86_loader PRIVATE -O2 -Wall -m64 -std=gnu99 -ffreestanding -mno-red-zone - -fomit-frame-pointer) + -fomit-frame-pointer -fno-builtin -fnostdlib -nostdinc) include(CheckCCompilerFlag) check_c_compiler_flag(-fstrength-reduce HAS_STRENGTH_REDUCE) From f33db1d51c1ff194c98d1ee09e3d4f6e929597ae Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 19:43:43 +0200 Subject: [PATCH 40/43] fix typo --- arch/x86/loader/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/loader/CMakeLists.txt b/arch/x86/loader/CMakeLists.txt index f0e23b16e..7abe2e9a2 100644 --- a/arch/x86/loader/CMakeLists.txt +++ b/arch/x86/loader/CMakeLists.txt @@ -17,7 +17,7 @@ target_include_directories(arch_x86_loader target_compile_options(arch_x86_loader PRIVATE -O2 -Wall -m64 -std=gnu99 -ffreestanding -mno-red-zone - -fomit-frame-pointer -fno-builtin -fnostdlib -nostdinc) + -fomit-frame-pointer -fno-builtin -nostdlib -nostdinc) include(CheckCCompilerFlag) check_c_compiler_flag(-fstrength-reduce HAS_STRENGTH_REDUCE) From 354ef2c003beba9cc02d4fc97ba8c51668d89086 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 20:35:50 +0200 Subject: [PATCH 41/43] remove debug message --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3b1c7d670..f80298cfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,6 @@ script: - cmake .. - make -j1 package - cd $TRAVIS_BUILD_DIR - - ls -la /home/travis/build/RWTH-OS/HermitCore/build/local_prefix/opt/hermit/bin/ - ./tests.sh notifications: From 576e4867a3582136f9f7b5dbc4d71d3cbb6c71ee Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 20:57:28 +0200 Subject: [PATCH 42/43] avoid the usage of sse & avx --- arch/x86/loader/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/loader/CMakeLists.txt b/arch/x86/loader/CMakeLists.txt index 7abe2e9a2..99bc4081a 100644 --- a/arch/x86/loader/CMakeLists.txt +++ b/arch/x86/loader/CMakeLists.txt @@ -17,7 +17,7 @@ target_include_directories(arch_x86_loader target_compile_options(arch_x86_loader PRIVATE -O2 -Wall -m64 -std=gnu99 -ffreestanding -mno-red-zone - -fomit-frame-pointer -fno-builtin -nostdlib -nostdinc) + -fomit-frame-pointer -fno-builtin -nostdlib -nostdinc -mno-sse -mno-avx -mno-mmx -mno-3dnow) include(CheckCCompilerFlag) check_c_compiler_flag(-fstrength-reduce HAS_STRENGTH_REDUCE) From d9e3df33ba5fca187cb6632860bd046f5f30f7dd Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 7 Aug 2017 21:51:55 +0200 Subject: [PATCH 43/43] deploy only master branch, compiled with the gcc --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f80298cfb..4fee01ba1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,9 @@ notifications: slack: hermitcore:UtcfeEXkbpx3WyIDK2Wm2beS deploy: - on: master + on: + branch: master + condition: "$CC = gcc" provider: bintray file: .bintray_descriptor.json user: