1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

Merge branch 'devel' of github.com:RWTH-OS/HermitCore into devel

This commit is contained in:
Stefan Lankes 2016-07-19 23:23:29 +02:00
commit 534170354e
14 changed files with 968 additions and 288 deletions

View file

@ -32,7 +32,7 @@ HermitCore is the result of a research project at RWTH Aachen University and is
1. In principle you have to follow the tutorial above. After the configuration (step 2 in the above tutorial) go to the subdirectory `linux`, which contains the source code of the Linux kernel. Configure the kernel with `make menuconfig` for your system. Be sure, that the option `CONFIG_HERMIT_CORE` in `Processor type and features` is enabled.
2. Go back to the root directory of this repository and build with `make` the Linux kernel, the HermitCore kernel, the cross-compiler and the demo applications.
3. Install the Linux kernel and its initial ramdisk on your system (see descriptions of your Linux distribution).
3. Install the Linux kernel and its initial ramdisk on your system (see descriptions of your Linux distribution). We recommend to disable Linux NO_HZ feature by setting the kernel parameter `no_hz=off`. This feature reduces partly the OS noise, but noise sensitive applications should now run on HermitCore.
4. Register the HermitCore loader to your system with following command: `echo ":hermit:M:7:\\x42:/path2proyxy/proxy:" > /proc/sys/fs/binfmt_misc/register`, in which `path2proxy` defines the path to the loader. You find the loader `proxy` after building the HermiCore sources in the subdirectory `hermit/tools` of the directory, which contains this *README*.
5. The IP device between HermitCore and Linux does currently not support IPv6. Consequently, disable IPv6 by adding following line to `/etc/sysctl.conf`: `net.ipv6.conf.mmnif.disable_ipv6 = 1`.
6. Per default, the IP device uses a static IP address range. Linux has to use `162.168.28.1`, where HermitCore isles start with `192.168.28.2` (isle 0). The network manager must be configured accordingly and consequently the file `/etc/sysconfig/network-scripts/ifcfg-mmnif` must be created with following contents:

View file

@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.2.5 Kernel Configuration
# Linux/x86 4.5.6 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@ -11,8 +11,11 @@ CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=28
CONFIG_ARCH_MMAP_RND_BITS_MAX=32
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_HWEIGHT=y
@ -118,7 +121,6 @@ CONFIG_SRCU=y
# CONFIG_TASKS_RCU is not set
CONFIG_RCU_STALL_COMMON=y
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_RCU_NOCB_CPU is not set
# CONFIG_RCU_EXPEDITE_BOOT is not set
CONFIG_BUILD_BIN2C=y
CONFIG_IKCONFIG=y
@ -127,6 +129,7 @@ CONFIG_LOG_BUF_SHIFT=17
CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_ARCH_SUPPORTS_INT128=y
# CONFIG_NUMA_BALANCING is not set
# CONFIG_CGROUPS is not set
@ -170,7 +173,9 @@ CONFIG_PRINTK=y
# CONFIG_SHMEM is not set
# CONFIG_AIO is not set
# CONFIG_ADVISE_SYSCALLS is not set
# CONFIG_USERFAULTFD is not set
CONFIG_PCI_QUIRKS=y
CONFIG_MEMBARRIER=y
# CONFIG_EMBEDDED is not set
CONFIG_HAVE_PERF_EVENTS=y
@ -186,6 +191,7 @@ CONFIG_SLUB_DEBUG=y
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_SLUB_CPU_PARTIAL=y
# CONFIG_SYSTEM_DATA_VERIFICATION is not set
# CONFIG_PROFILING is not set
CONFIG_HAVE_OPROFILE=y
CONFIG_OPROFILE_NMI_TIMER=y
@ -200,7 +206,6 @@ CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
@ -232,6 +237,8 @@ CONFIG_HAVE_ARCH_SOFT_DIRTY=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
CONFIG_ARCH_MMAP_RND_BITS=28
CONFIG_HAVE_COPY_THREAD_TLS=y
#
@ -243,7 +250,6 @@ CONFIG_SLABINFO=y
CONFIG_BASE_SMALL=1
# CONFIG_MODULES is not set
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_BLK_DEV_BSG=y
# CONFIG_BLK_DEV_BSGLIB is not set
@ -288,6 +294,7 @@ CONFIG_QUEUED_RWLOCKS=y
# CONFIG_ZONE_DMA is not set
CONFIG_SMP=y
CONFIG_X86_FEATURE_NAMES=y
CONFIG_X86_FAST_FEATURE_TESTS=y
CONFIG_X86_X2APIC=y
CONFIG_X86_MPPARSE=y
# CONFIG_X86_EXTENDED_PLATFORM is not set
@ -330,6 +337,7 @@ CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
# CONFIG_X86_MCE is not set
# CONFIG_VM86 is not set
# CONFIG_X86_16BIT is not set
CONFIG_X86_VSYSCALL_EMULATION=y
# CONFIG_I8K is not set
@ -365,7 +373,6 @@ CONFIG_ARCH_DISCARD_MEMBLOCK=y
# CONFIG_MOVABLE_NODE is not set
# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
# CONFIG_MEMORY_HOTPLUG is not set
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
CONFIG_COMPACTION=y
@ -387,6 +394,7 @@ CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
# CONFIG_ZSMALLOC is not set
CONFIG_GENERIC_EARLY_IOREMAP=y
CONFIG_ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT=y
# CONFIG_IDLE_PAGE_TRACKING is not set
# CONFIG_X86_PMEM_LEGACY is not set
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
CONFIG_X86_RESERVE_LOW=64
@ -408,6 +416,7 @@ CONFIG_HZ_250=y
CONFIG_HZ=250
# CONFIG_SCHED_HRTICK is not set
# CONFIG_KEXEC is not set
# CONFIG_KEXEC_FILE is not set
# CONFIG_CRASH_DUMP is not set
CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set
@ -416,7 +425,11 @@ CONFIG_HOTPLUG_CPU=y
CONFIG_HERMIT_CORE=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
# CONFIG_LEGACY_VSYSCALL_NATIVE is not set
CONFIG_LEGACY_VSYSCALL_EMULATE=y
# CONFIG_LEGACY_VSYSCALL_NONE is not set
# CONFIG_CMDLINE_BOOL is not set
CONFIG_MODIFY_LDT_SYSCALL=y
CONFIG_HAVE_LIVEPATCH=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
@ -431,6 +444,7 @@ CONFIG_ACPI=y
CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
# CONFIG_ACPI_DEBUGGER is not set
# CONFIG_ACPI_PROCFS_POWER is not set
CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
# CONFIG_ACPI_EC_DEBUGFS is not set
@ -439,6 +453,8 @@ CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_CPU_FREQ_PSS=y
CONFIG_ACPI_PROCESSOR_IDLE=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
@ -547,8 +563,10 @@ CONFIG_BINFMT_SCRIPT=y
CONFIG_BINFMT_MISC=y
# CONFIG_COREDUMP is not set
# CONFIG_IA32_EMULATION is not set
# CONFIG_X86_X32 is not set
CONFIG_X86_DEV_DMA_OPS=y
CONFIG_PMC_ATOM=y
# CONFIG_VMD is not set
CONFIG_NET=y
#
@ -575,7 +593,6 @@ CONFIG_INET=y
# CONFIG_NET_IPVTI is not set
# CONFIG_NET_UDP_TUNNEL is not set
# CONFIG_NET_FOU is not set
# CONFIG_GENEVE_CORE is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
@ -588,6 +605,7 @@ CONFIG_INET_LRO=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_INET_UDP_DIAG is not set
# CONFIG_INET_DIAG_DESTROY is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
@ -624,9 +642,11 @@ CONFIG_HAVE_NET_DSA=y
# CONFIG_MPLS is not set
# CONFIG_HSR is not set
# CONFIG_NET_SWITCHDEV is not set
# CONFIG_NET_L3_MASTER_DEV is not set
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_XPS=y
# CONFIG_SOCK_CGROUP_DATA is not set
CONFIG_NET_RX_BUSY_POLL=y
CONFIG_BQL=y
CONFIG_NET_FLOW_LIMIT=y
@ -649,6 +669,7 @@ CONFIG_NET_9P_VIRTIO=y
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
# CONFIG_NFC is not set
# CONFIG_LWTUNNEL is not set
CONFIG_HAVE_BPF_JIT=y
#
@ -696,7 +717,6 @@ CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_DRBD is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_NVME is not set
# CONFIG_BLK_DEV_SKD is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_RAM is not set
@ -706,6 +726,7 @@ CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_HD is not set
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_BLK_DEV_RSXX is not set
# CONFIG_BLK_DEV_NVME is not set
#
# Misc devices
@ -757,10 +778,15 @@ CONFIG_BLK_DEV=y
#
# SCIF Driver
#
#
# Intel MIC Coprocessor State Management (COSM) Drivers
#
# CONFIG_GENWQE is not set
# CONFIG_ECHO is not set
# CONFIG_CXL_BASE is not set
# CONFIG_CXL_KERNEL_API is not set
# CONFIG_CXL_EEH is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
@ -823,8 +849,8 @@ CONFIG_SCSI_LOWLEVEL=y
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_MPT3SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_UFSHCD is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_VMWARE_PVSCSI is not set
@ -988,6 +1014,7 @@ CONFIG_ETHERNET=y
# CONFIG_NET_VENDOR_AMD is not set
# CONFIG_NET_VENDOR_ARC is not set
# CONFIG_NET_VENDOR_ATHEROS is not set
# CONFIG_NET_VENDOR_AURORA is not set
CONFIG_NET_CADENCE=y
# CONFIG_MACB is not set
# CONFIG_NET_VENDOR_BROADCOM is not set
@ -1008,7 +1035,6 @@ CONFIG_NET_VENDOR_EZCHIP=y
# CONFIG_NET_VENDOR_EXAR is not set
# CONFIG_NET_VENDOR_HP is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_IP1000 is not set
# CONFIG_JME is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MELLANOX is not set
@ -1016,6 +1042,8 @@ CONFIG_NET_VENDOR_EZCHIP=y
# CONFIG_NET_VENDOR_MYRI is not set
# CONFIG_FEALNX is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
CONFIG_NET_VENDOR_NETRONOME=y
# CONFIG_NFP_NETVF is not set
# CONFIG_NET_VENDOR_NVIDIA is not set
# CONFIG_NET_VENDOR_OKI is not set
# CONFIG_ETHOC is not set
@ -1037,6 +1065,7 @@ CONFIG_NET_VENDOR_RENESAS=y
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
CONFIG_NET_VENDOR_SYNOPSYS=y
# CONFIG_NET_VENDOR_TEHUTI is not set
# CONFIG_NET_VENDOR_TI is not set
# CONFIG_NET_VENDOR_VIA is not set
@ -1058,7 +1087,9 @@ CONFIG_NET_VENDOR_RENESAS=y
#
# CONFIG_WAN is not set
# CONFIG_VMXNET3 is not set
# CONFIG_FUJITSU_ES is not set
# CONFIG_ISDN is not set
# CONFIG_NVM is not set
#
# Input device support
@ -1101,6 +1132,7 @@ CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
# CONFIG_USERIO is not set
# CONFIG_GAMEPORT is not set
#
@ -1135,12 +1167,16 @@ CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_FSL is not set
# CONFIG_SERIAL_8250_DW is not set
# CONFIG_SERIAL_8250_RT288X is not set
# CONFIG_SERIAL_8250_FINTEK is not set
# CONFIG_SERIAL_8250_MID is not set
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_UARTLITE is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
@ -1200,7 +1236,7 @@ CONFIG_POWER_SUPPLY=y
# CONFIG_TEST_POWER is not set
# CONFIG_BATTERY_DS2780 is not set
# CONFIG_BATTERY_DS2781 is not set
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_BQ27XXX is not set
# CONFIG_CHARGER_MAX8903 is not set
# CONFIG_POWER_RESET is not set
# CONFIG_POWER_AVS is not set
@ -1220,10 +1256,7 @@ CONFIG_THERMAL_GOV_STEP_WISE=y
# CONFIG_INTEL_POWERCLAMP is not set
# CONFIG_INTEL_SOC_DTS_THERMAL is not set
# CONFIG_INT340X_THERMAL is not set
#
# Texas Instruments thermal drivers
#
# CONFIG_INTEL_PCH_THERMAL is not set
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y
@ -1246,6 +1279,8 @@ CONFIG_BCMA_POSSIBLE=y
# CONFIG_HTC_PASIC3 is not set
# CONFIG_LPC_ICH is not set
# CONFIG_LPC_SCH is not set
# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_MT6397 is not set
@ -1267,10 +1302,6 @@ CONFIG_BCMA_POSSIBLE=y
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
# CONFIG_VGA_SWITCHEROO is not set
#
# Direct Rendering Manager
#
# CONFIG_DRM is not set
#
@ -1314,6 +1345,8 @@ CONFIG_HID_GENERIC=y
# CONFIG_HID_EMS_FF is not set
# CONFIG_HID_ELECOM is not set
# CONFIG_HID_EZKEY is not set
# CONFIG_HID_GEMBIRD is not set
# CONFIG_HID_GFRM is not set
# CONFIG_HID_KEYTOUCH is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_WALTOP is not set
@ -1431,6 +1464,8 @@ CONFIG_IRQ_REMAP=y
# CONFIG_NTB is not set
# CONFIG_VME_BUS is not set
# CONFIG_PWM is not set
CONFIG_ARM_GIC_MAX_NR=1
# CONFIG_TS4800_IRQ is not set
# CONFIG_IPACK_BUS is not set
# CONFIG_RESET_CONTROLLER is not set
# CONFIG_FMC is not set
@ -1444,6 +1479,11 @@ CONFIG_IRQ_REMAP=y
# CONFIG_BCM_KONA_USB2_PHY is not set
# CONFIG_POWERCAP is not set
# CONFIG_MCB is not set
#
# Performance monitor support
#
# CONFIG_RAS is not set
# CONFIG_THUNDERBOLT is not set
#
@ -1451,6 +1491,16 @@ CONFIG_IRQ_REMAP=y
#
# CONFIG_ANDROID is not set
# CONFIG_LIBNVDIMM is not set
# CONFIG_NVMEM is not set
# CONFIG_STM is not set
# CONFIG_STM_DUMMY is not set
# CONFIG_STM_SOURCE_CONSOLE is not set
# CONFIG_INTEL_TH is not set
#
# FPGA Configuration Support
#
# CONFIG_FPGA is not set
#
# Firmware Drivers
@ -1609,6 +1659,7 @@ CONFIG_FRAME_WARN=1024
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
CONFIG_ARCH_WANT_FRAME_POINTERS=y
# CONFIG_FRAME_POINTER is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
@ -1643,6 +1694,7 @@ CONFIG_HAVE_ARCH_KASAN=y
#
# CONFIG_LOCKUP_DETECTOR is not set
# CONFIG_DETECT_HUNG_TASK is not set
# CONFIG_WQ_WATCHDOG is not set
# CONFIG_PANIC_ON_OOPS is not set
CONFIG_PANIC_ON_OOPS_VALUE=0
CONFIG_PANIC_TIMEOUT=0
@ -1681,9 +1733,9 @@ CONFIG_SCHED_DEBUG=y
# CONFIG_TORTURE_TEST is not set
# CONFIG_RCU_TORTURE_TEST is not set
CONFIG_RCU_CPU_STALL_TIMEOUT=21
CONFIG_RCU_CPU_STALL_INFO=y
# CONFIG_RCU_TRACE is not set
# CONFIG_RCU_EQS_DEBUG is not set
# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
@ -1713,6 +1765,7 @@ CONFIG_TRACING_SUPPORT=y
# CONFIG_TEST_HEXDUMP is not set
# CONFIG_TEST_STRING_HELPERS is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_TEST_PRINTF is not set
# CONFIG_TEST_RHASHTABLE is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_DMA_API_DEBUG is not set
@ -1721,10 +1774,14 @@ CONFIG_TRACING_SUPPORT=y
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y
# CONFIG_UBSAN is not set
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
# CONFIG_STRICT_DEVMEM is not set
# CONFIG_X86_VERBOSE_BOOTUP is not set
CONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
# CONFIG_X86_PTDUMP_CORE is not set
# CONFIG_X86_PTDUMP is not set
# CONFIG_DEBUG_RODATA is not set
# CONFIG_DOUBLEFAULT is not set
@ -1766,7 +1823,6 @@ CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
@ -1782,6 +1838,7 @@ CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
# CONFIG_CRYPTO_GF128MUL is not set
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_NULL2=y
# CONFIG_CRYPTO_PCRYPT is not set
CONFIG_CRYPTO_WORKQUEUE=y
# CONFIG_CRYPTO_CRYPTD is not set
@ -1807,6 +1864,7 @@ CONFIG_CRYPTO_ECHAINIV=y
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_KEYWRAP is not set
#
# Hash modes
@ -1826,6 +1884,7 @@ CONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_CRCT10DIF is not set
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_POLY1305 is not set
# CONFIG_CRYPTO_POLY1305_X86_64 is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
@ -1869,6 +1928,7 @@ CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_X86_64 is not set
# CONFIG_CRYPTO_CHACHA20 is not set
# CONFIG_CRYPTO_CHACHA20_X86_64 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set
@ -1908,6 +1968,15 @@ CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_CCP is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
# CONFIG_CRYPTO_DEV_QAT_C62X is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
#
# Certificates for signature checking
#
CONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not set
# CONFIG_BINARY_PRINTF is not set
@ -1969,8 +2038,10 @@ CONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not set
CONFIG_NLATTR=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
# CONFIG_AVERAGE is not set
# CONFIG_CORDIC is not set
# CONFIG_DDR is not set
# CONFIG_IRQ_POLL is not set
# CONFIG_SG_SPLIT is not set
CONFIG_ARCH_HAS_SG_CHAIN=y
CONFIG_ARCH_HAS_PMEM_API=y
CONFIG_ARCH_HAS_MMIO_FLUSH=y

File diff suppressed because it is too large Load diff

View file

@ -625,15 +625,19 @@ inline static void invalid_cache(void) {
asm volatile ("invd");
}
/* Force strict CPU ordering */
typedef void (*func_memory_barrier)(void);
#if 0
// the old way to serialize the store and load operations
static inline void mb(void) { asm volatile ("lock; addl $0,0(%%esp)" ::: "memory", "cc"); }
static inline void rmb(void) { asm volatile ("lock; addl $0,0(%%esp)" ::: "memory", "cc"); }
static inline void wmb(void) { asm volatile ("lock; addl $0,0(%%esp)" ::: "memory", "cc"); }
#else
/// Force strict CPU ordering, serializes load and store operations.
extern func_memory_barrier mb;
static inline void mb(void) { asm volatile("mfence":::"memory"); }
/// Force strict CPU ordering, serializes load operations.
extern func_memory_barrier rmb;
static inline void rmb(void) { asm volatile("lfence":::"memory"); }
/// Force strict CPU ordering, serializes store operations.
extern func_memory_barrier wmb;
static inline void wmb(void) { asm volatile("sfence" ::: "memory"); }
#endif
/** @brief Get Extended Control Register
*

View file

@ -49,11 +49,6 @@ extern void isrsyscall(void);
cpu_info_t cpu_info = { 0, 0, 0, 0, 0};
extern uint32_t cpu_freq;
static void default_mb(void)
{
asm volatile ("lock; addl $0,0(%%esp)" ::: "memory", "cc");
}
static void default_save_fpu_state(union fpu_state* state)
{
asm volatile ("fnsave %0; fwait" : "=m"((*state).fsave) :: "memory");
@ -75,10 +70,6 @@ static void default_fpu_init(union fpu_state* fpu)
fp->fos = 0xffff0000u;
}
func_memory_barrier mb = default_mb;
func_memory_barrier rmb = default_mb;
func_memory_barrier wmb = default_mb;
static void default_writefs(size_t fs)
{
wrmsr(MSR_FS_BASE, fs);
@ -132,9 +123,6 @@ func_read_fsgs readgs = default_readgs;
func_write_fsgs writefs = default_writefs;
func_write_fsgs writegs = default_writegs;
static void mfence(void) { asm volatile("mfence" ::: "memory"); }
static void lfence(void) { asm volatile("lfence" ::: "memory"); }
static void sfence(void) { asm volatile("sfence" ::: "memory"); }
handle_fpu_state save_fpu_state = default_save_fpu_state;
handle_fpu_state restore_fpu_state = default_restore_fpu_state;
handle_fpu_state fpu_init = default_fpu_init;
@ -384,6 +372,8 @@ int cpu_detection(void) {
kprintf("Syscall instruction: %s\n", (cpu_info.feature3 & CPU_FEATURE_SYSCALL) ? "available" : "unavailable");
}
//TODO: add check for SMEP and SMAP
// be sure that AM, NE and MP is enabled
cr0 = read_cr0();
cr0 |= CR0_AM;
@ -469,14 +459,6 @@ int cpu_detection(void) {
set_per_core(__core_id, atomic_int32_read(&current_boot_id));
kprintf("Core id is set to %d\n", CORE_ID);
if (first_time && has_sse())
wmb = sfence;
if (first_time && has_sse2()) {
rmb = lfence;
mb = mfence;
}
if (has_fpu()) {
if (first_time)
kputs("Found and initialized FPU!\n");

View file

@ -80,13 +80,6 @@
#define DEBUG_MMNIF
//#define DEBUG_MMNIF_PACKET
/* Cache line wrappers */
#define CLINE_SHIFT 6
#define CLINE_SIZE (1UL << CLINE_SHIFT)
#define CLINE_MASK (~(CLINE_SIZE - 1))
#define CLINE_ALIGN(_x) (((_x) + CLINE_SIZE - 1) & CLINE_MASK)
//#define CLINE_ALIGN(_x) (_x)
#define MMNIF_AUTO_SOCKET_TIMEOUT 500
#define MMNIF_RX_BUFFERLEN (28*1024)
@ -337,7 +330,6 @@ static size_t mmnif_rxbuff_alloc(uint8_t dest, uint16_t len)
// if ((rb->head - rb->tail < len)&&(rb->tail != rb->head))
// return NULL;
spinlock_irqsave_lock(&locallock); // only one core should call our islelock
islelock_lock(isle_locks + (dest-1));
if (rb->dcount)
{
@ -389,7 +381,6 @@ static size_t mmnif_rxbuff_alloc(uint8_t dest, uint16_t len)
}
}
islelock_unlock(isle_locks + (dest-1));
spinlock_irqsave_unlock(&locallock);
return ret;
}
@ -483,6 +474,8 @@ static err_t mmnif_tx(struct netif *netif, struct pbuf *p)
goto drop_packet;
}
spinlock_irqsave_lock(&locallock); // only one core should call our islelock
/* allocate memory for the packet in the remote buffer */
realloc:
write_address = mmnif_rxbuff_alloc(dest_ip, p->tot_len);
@ -515,6 +508,8 @@ realloc:
mmnif->stats.tx++;
mmnif->stats.tx_bytes += p->tot_len;
spinlock_irqsave_unlock(&locallock);
mmnif_trigger_irq(dest_ip);
return ERR_OK;
@ -808,6 +803,7 @@ anotherpacket:
* note that we did not lock here because we are the only one editing this value
*/
mmnif->rx_buff->desc_table[rdesc].stat = MMNIF_STATUS_PROC;
mb();
/* everything is copied to a new buffer so it's save to release
* the old one for new incoming packets

View file

@ -47,9 +47,9 @@ extern "C" {
/// represents a task identifier
typedef unsigned int tid_t;
#define DECLARE_PER_CORE(type, name) extern type name __attribute__ ((section (".percore")));
#define DEFINE_PER_CORE(type, name, def_value) type name __attribute__ ((section (".percore"))) = def_value;
#define DEFINE_PER_CORE_STATIC(type, name, def_value) static type name __attribute__ ((section (".percore"))) = def_value;
#define DECLARE_PER_CORE(type, name) extern type name __attribute__ ((section (".percore")))
#define DEFINE_PER_CORE(type, name, def_value) type name __attribute__ ((section (".percore"))) = def_value
#define DEFINE_PER_CORE_STATIC(type, name, def_value) static type name __attribute__ ((section (".percore"))) = def_value
/* needed to find the task, which is currently running on this core */
struct task;

View file

@ -230,7 +230,7 @@ void check_ticks(void);
extern volatile uint32_t go_down;
/** @brief shutdown the hole system
/** @brief shutdown the whole system
*/
void shutdown_system(void);

View file

@ -212,7 +212,7 @@ int network_shutdown(void)
#if MAX_CORES > 1
int smp_main(void)
{
int32_t cpu = atomic_int32_inc(&cpu_online);
atomic_int32_inc(&cpu_online);
#ifdef DYNAMIC_TICKS
enable_dynticks();

View file

@ -37,6 +37,7 @@
#include <hermit/syscall.h>
#include <hermit/memory.h>
#include <asm/tss.h>
#include <asm/processor.h>
/*
* Note that linker symbols are not variables, they have no memory allocated for

@ -1 +1 @@
Subproject commit ab9989cc6c0011178ae98286e8529bf4dc825b7a
Subproject commit 942eb238016d8b3aff09a7a542f76ddd02ebd956

View file

@ -229,11 +229,16 @@ int handle_syscalls(int s)
switch(sysnr)
{
case __HERMIT_exit: {
size_t j;
int arg = 0;
sret = read(s, &arg, sizeof(arg));
if (sret < 0)
goto out;
j = 0;
while(j < sizeof(arg)) {
sret = read(s, ((char*)&arg)+j, sizeof(arg)-j);
if (sret < 0)
goto out;
j += sret;
}
close(s);
// already called by fini_env
@ -247,16 +252,25 @@ int handle_syscalls(int s)
}
case __HERMIT_write: {
int fd;
ssize_t j;
size_t j;
size_t len;
char* buff;
sret = read(s, &fd, sizeof(fd));
if (sret < 0)
goto out;
sret = read(s, &len, sizeof(len));
if (sret < 0)
goto out;
j = 0;
while (j < sizeof(fd)) {
sret = read(s, ((char*)&fd)+j, sizeof(fd)-j);
if (sret < 0)
goto out;
j += sret;
}
j = 0;
while (j < sizeof(len)) {
sret = read(s, ((char*)&len)+j, sizeof(len)-j);
if (sret < 0)
goto out;
j += sret;
}
buff = malloc(len);
if (!buff) {
@ -277,7 +291,7 @@ int handle_syscalls(int s)
sret = write(fd, buff, len);
write(s, &sret, sizeof(sret));
} else {
j=0;
j = 0;
while(j < len)
{
sret = write(fd, buff+j, len-j);
@ -295,91 +309,140 @@ int handle_syscalls(int s)
char* fname;
int flags, mode, ret;
sret = read(s, &len, sizeof(len));
if (sret < 0)
goto out;
j = 0;
while (j < sizeof(len))
{
sret = read(s, ((char*)&len)+j, sizeof(len)-j);
if (sret < 0)
goto out;
j += sret;
}
fname = malloc(len);
if (!fname)
goto out;
j = 0;
while(j < len)
while (j < len)
{
sret = read(s, fname+j, len-j);
if (sret < 0)
goto out;
j += sret;
}
sret = read(s, &flags, sizeof(flags));
if (sret < 0)
goto out;
j = 0;
while (j < sizeof(flags))
{
sret = read(s, ((char*)&flags)+j, sizeof(flags)-j);
if (sret < 0)
goto out;
j += sret;
}
sret = read(s, &mode, sizeof(mode));
if (sret < 0)
goto out;
j = 0;
while (j < sizeof(mode))
{
sret = read(s, ((char*)&mode)+j, sizeof(mode)-j);
if (sret < 0)
goto out;
j += sret;
}
//printf("flags 0x%x, mode 0x%x\n", flags, mode);
ret = open(fname, flags, mode);
write(s, &ret, sizeof(ret));
j = 0;
while(j < sizeof(ret))
{
sret = write(s, ((char*)&ret)+j, sizeof(ret)-j);
if (sret < 0)
goto out;
j += sret;
}
free(fname);
break;
}
case __HERMIT_close: {
int fd, ret;
ssize_t j;
sret = read(s, &fd, sizeof(fd));
if (sret < 0)
goto out;
j = 0;
while(j < sizeof(fd))
{
sret = read(s, ((char*)&fd), sizeof(fd)-j);
if (sret < 0)
goto out;
j += sret;
}
if (fd > 2)
ret = close(fd);
else
ret = 0;
sret = write(s, &ret, sizeof(ret));
if (sret < 0)
goto out;
j = 0;
while (j < sizeof(ret))
{
sret = write(s, ((char*)&ret)+j, sizeof(ret)-j);
if (sret < 0)
goto out;
j += sret;
}
break;
}
case __HERMIT_read: {
int fd, flag;
size_t len;
ssize_t j;
size_t len, j;
ssize_t sj;
char* buff;
sret = read(s, &fd, sizeof(fd));
if (sret < 0)
goto out;
j = 0;
while(j < sizeof(fd))
{
sret = read(s, ((char*)&fd)+j, sizeof(fd)-j);
if (sret < 0)
goto out;
j += sret;
}
sret = read(s, &len, sizeof(len));
if (sret < 0)
goto out;
j = 0;
while(j < sizeof(len))
{
sret = read(s, ((char*)&len)+j, sizeof(len)-j);
if (sret < 0)
goto out;
j += sret;
}
buff = malloc(len);
if (!buff)
goto out;
j = read(fd, buff, len);
sj = read(fd, buff, len);
flag = 0;
setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int));
write(s, &j, sizeof(j));
j = 0;
while (j < sizeof(sj))
{
sret = write(s, &sj, sizeof(sj)-j);
if (sret < 0)
goto out;
j += sret;
}
if (j > 0)
if (sj > 0)
{
ssize_t i = 0;
while(i < j)
while (i < sj)
{
sret = write(s, buff+i, j-i);
sret = write(s, buff+i, sj-i);
if (sret < 0)
break;
goto out;
i += sret;
}
@ -394,13 +457,45 @@ int handle_syscalls(int s)
case __HERMIT_lseek: {
int fd, whence;
off_t offset;
size_t j;
read(s, &fd, sizeof(fd));
read(s, &offset, sizeof(offset));
read(s, &whence, sizeof(whence));
j = 0;
while (j < sizeof(fd))
{
sret = read(s, ((char*)&fd)+j, sizeof(fd)-j);
if (sret < 0)
goto out;
j += sret;
}
j = 0;
while (j < sizeof(offset))
{
sret = read(s, ((char*)&offset)+j, sizeof(offset)-j);
if (sret < 0)
goto out;
j += sret;
}
j = 0;
while (j < sizeof(whence))
{
sret = read(s, ((char*)&whence)+j, sizeof(whence)-j);
if (sret < 0)
goto out;
j += sret;
}
offset = lseek(fd, offset, whence);
write(s, &offset, sizeof(offset));
j = 0;
while (j < sizeof(offset))
{
sret = write(s, ((char*)&offset)+j, sizeof(offset)-j);
if (sret < 0)
goto out;
j += sret;
}
break;
}
default:
@ -480,12 +575,17 @@ retry:
{
int len = strlen(argv[i])+1;
ret = write(s, &len, sizeof(len));
if (ret < 0)
goto out;
j = 0;
while (j < sizeof(len))
{
ret = write(s, ((char*)&len)+j, sizeof(len)-j);
if (ret < 0)
goto out;
j += ret;
}
j = 0;
while(j < len)
while (j < len)
{
ret = write(s, argv[i]+j, len-j);
if (ret < 0)
@ -507,12 +607,17 @@ retry:
{
int len = strlen(environ[i])+1;
ret = write(s, &len, sizeof(len));
if (ret < 0)
goto out;
j = 0;
while (j < sizeof(len))
{
ret = write(s, ((char*)&len)+j, sizeof(len)-j);
if (ret < 0)
goto out;
j += ret;
}
j = 0;
while(j < len)
while (j < len)
{
ret = write(s, environ[i]+j, len-j);
if (ret < 0)

View file

@ -57,6 +57,14 @@ int sched_yield(void);
static char* buff[M];
#if 1
inline static unsigned long long rdtsc(void)
{
unsigned long lo, hi;
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi) :: "memory");
return ((unsigned long long) hi << 32ULL | (unsigned long long) lo);
}
#else
inline static unsigned long long rdtsc(void)
{
unsigned int lo, hi;
@ -66,6 +74,7 @@ inline static unsigned long long rdtsc(void)
return ((unsigned long long)hi << 32ULL | (unsigned long long)lo);
}
#endif
int main(int argc, char** argv)
{
@ -74,7 +83,8 @@ int main(int argc, char** argv)
const char str[] = "H";
size_t len = strlen(str);
printf("Determine systems performance\n\n");
printf("Determine systems performance\n");
printf("=============================\n");
// cache warm-up
ret = mygetpid();

View file

@ -50,6 +50,11 @@
#define RTE_MACHINE_CPUFLAG_AVX2
#endif
// gcc defines this macro, if avx is enabled
#ifdef __AVX__
#define RTE_MACHINE_CPUFLAG_AVX
#endif
#ifdef __cplusplus
extern "C" {
#endif
@ -314,7 +319,7 @@ COPY_BLOCK_64_BACK31:
goto COPY_BLOCK_64_BACK31;
}
#else /* RTE_MACHINE_CPUFLAG_AVX2 */
#elif defined(RTE_MACHINE_CPUFLAG_AVX)
/**
* SSE & AVX implementation below
@ -631,7 +636,14 @@ COPY_BLOCK_64_BACK15:
goto COPY_BLOCK_64_BACK15;
}
#endif /* RTE_MACHINE_CPUFLAG_AVX2 */
#else
static inline void * rte_memcpy(void *dst, const void *src, size_t n)
{
return __builtin_memcpy(dst, src, n);
}
#endif
#ifdef __cplusplus
}