mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
Merge branch 'devel' into path2rs
This commit is contained in:
commit
4c69558de2
6 changed files with 35 additions and 26 deletions
|
@ -6,7 +6,9 @@ env:
|
|||
global:
|
||||
- PATH=$PATH:~/.cargo/bin
|
||||
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
|
||||
|
@ -27,7 +29,9 @@ notifications:
|
|||
slack: hermitcore:UtcfeEXkbpx3WyIDK2Wm2beS
|
||||
|
||||
deploy:
|
||||
on: master
|
||||
on:
|
||||
branch: master
|
||||
condition: "$CC = gcc"
|
||||
provider: bintray
|
||||
file: .bintray_descriptor.json
|
||||
user:
|
||||
|
|
|
@ -17,14 +17,33 @@ 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 -fno-builtin -nostdlib -nostdinc -mno-sse -mno-avx -mno-mmx -mno-3dnow)
|
||||
|
||||
target_link_libraries(arch_x86_loader
|
||||
arch_x86_loader_asm
|
||||
"-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 -static)
|
||||
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()
|
||||
|
||||
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} <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||
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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue