add xizi 3588 4 core smp

This commit is contained in:
wty 2024-09-20 13:54:37 +08:00
parent 6bc856b7a6
commit 15aaf708ba
86 changed files with 49 additions and 41 deletions

View File

@ -4,7 +4,7 @@ MAKEFLAGS += --no-print-directory
.PHONY:COMPILE_APP COMPILE_KERNEL .PHONY:COMPILE_APP COMPILE_KERNEL
riscv_support := riscv_support :=
arm_support += imx6q-sabrelite zynq7000-zc702 3568 arm_support += imx6q-sabrelite zynq7000-zc702 3588
emulator_support += emulator_support +=
support := $(riscv_support) $(arm_support) $(emulator_support) support := $(riscv_support) $(arm_support) $(emulator_support)
SRC_DIR := SRC_DIR :=
@ -34,7 +34,7 @@ export UBIQUITOUS_ROOT ?= ..
ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), )
include $(KERNEL_ROOT)/hardkernel/arch/arm/armv7-a/cortex-a9/preboot_for_$(BOARD)/config.mk include $(KERNEL_ROOT)/hardkernel/arch/arm/armv7-a/cortex-a9/preboot_for_$(BOARD)/config.mk
endif endif
ifneq ($(findstring $(BOARD), 3568), ) ifneq ($(findstring $(BOARD), 3588), )
include $(KERNEL_ROOT)/hardkernel/arch/arm/armv8-a/cortex-a55/preboot_for_$(BOARD)/config.mk include $(KERNEL_ROOT)/hardkernel/arch/arm/armv8-a/cortex-a55/preboot_for_$(BOARD)/config.mk
endif endif
export BSP_BUILD_DIR := $(KERNEL_ROOT) export BSP_BUILD_DIR := $(KERNEL_ROOT)

View File

@ -1,5 +1,6 @@
# The following three platforms support compatiable instructions. # The following three platforms support compatiable instructions.
ifneq ($(findstring $(BOARD), 3568), )
ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := armv8-a SRC_DIR := armv8-a
endif endif
ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), )

View File

@ -1,5 +1,6 @@
# The following three platforms support compatiable instructions. # The following three platforms support compatiable instructions.
ifneq ($(findstring $(BOARD), 3568), )
ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := cortex-a55 SRC_DIR := cortex-a55
endif endif

View File

@ -1,7 +1,7 @@
export CROSS_COMPILE ?= aarch64-none-elf- export CROSS_COMPILE ?= aarch64-none-elf-
export DEVICE = -mtune=cortex-a55 -ffreestanding -fno-common -fno-stack-protector -fno-pie -no-pie export DEVICE = -mtune=cortex-a55 -ffreestanding -fno-common -fno-stack-protector -fno-pie -no-pie
export CFLAGS := $(DEVICE) -Wall -Werror -O2 -g -fno-omit-frame-pointer -fPIC export CFLAGS := $(DEVICE) -Wall -Werror -O2 -g -fno-omit-frame-pointer -fPIC
export LFLAGS := $(DEVICE) -Wl,-T -Wl,$(KERNEL_ROOT)/hardkernel/arch/arm/armv8-a/cortex-a55/preboot_for_3568/3568.lds -Wl,--start-group,-lgcc,-lc,--end-group export LFLAGS := $(DEVICE) -Wl,-T -Wl,$(KERNEL_ROOT)/hardkernel/arch/arm/armv8-a/cortex-a55/preboot_for_3588/3588.lds -Wl,--start-group,-lgcc,-lc,--end-group
export CXXFLAGS := export CXXFLAGS :=
export DEFINES := -DHAVE_CCONFIG_H -DCHIP_LS1028 export DEFINES := -DHAVE_CCONFIG_H -DCHIP_LS1028

View File

@ -75,7 +75,7 @@ static struct xizi_smccc_res __invoke_sip_fn_smc(unsigned long function_id,
void cpu_start_secondary(uint8_t cpu_id) void cpu_start_secondary(uint8_t cpu_id)
{ {
__invoke_sip_fn_smc(PSCI_CPUON, cpu_id, (uintptr_t)0xa00000, 0); __invoke_sip_fn_smc(PSCI_CPUON, cpu_id, (uintptr_t)0x200000, 0);
} }
void start_smp_cache_broadcast(int cpu_id) void start_smp_cache_broadcast(int cpu_id)

View File

@ -1,7 +1,10 @@
ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), )
SRC_DIR := cortex-a9 SRC_DIR := cortex-a9
endif endif
ifneq ($(findstring $(BOARD), 3568), ) ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := cortex-a55
endif
ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := cortex-a55 SRC_DIR := cortex-a55
endif endif

View File

@ -1,4 +1,7 @@
ifneq ($(findstring $(BOARD), 3568), ) ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := armv8-a
endif
ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := armv8-a SRC_DIR := armv8-a
endif endif
ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), )

View File

@ -1,4 +1,4 @@
ifneq ($(findstring $(BOARD), 3568), ) ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := cortex-a55 SRC_DIR := cortex-a55
endif endif

View File

@ -1,4 +1,4 @@
ifneq ($(findstring $(BOARD), 3568), ) ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := armv8-a SRC_DIR := armv8-a
endif endif
ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), )

View File

@ -1,6 +1,6 @@
SRC_FILES := trampoline.S $(BOARD)/trap_common.c $(BOARD)/trap.c error_debug.c hard_spinlock.S SRC_FILES := trampoline.S $(BOARD)/trap_common.c $(BOARD)/trap.c error_debug.c hard_spinlock.S
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
SRC_DIR := gicv3 SRC_DIR := gicv3
SRC_FILES += $(BOARD)/ SRC_FILES += $(BOARD)/
endif endif

View File

@ -30,8 +30,8 @@ Modification:
// clang-format off // clang-format off
// interrupt controller GICv3 // interrupt controller GICv3
#define GICV3 MMIO_P2V_WO(0xFD400000ULL) #define GICV3 MMIO_P2V_WO(0xfe600000ULL)
#define GICV3_REDIST MMIO_P2V_WO(0xFD460000ULL) #define GICV3_REDIST MMIO_P2V_WO(0xfe680000ULL)
#define D_CTLR 0x0 #define D_CTLR 0x0
#define D_TYPER 0x4 #define D_TYPER 0x4

View File

@ -1,4 +1,4 @@
ifneq ($(findstring $(BOARD), 3568), ) ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := armv8-a SRC_DIR := armv8-a
endif endif
ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), )

View File

@ -1,5 +1,5 @@
# The following three platforms support compatiable instructions. # The following three platforms support compatiable instructions.
ifneq ($(findstring $(BOARD), 3568), ) ifneq ($(findstring $(BOARD), 3588), )
SRC_DIR := armv8-a SRC_DIR := armv8-a
endif endif
ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), )

View File

@ -9,7 +9,7 @@
#include "mmio_access.h" #include "mmio_access.h"
#include "ns16550.h" #include "ns16550.h"
#define UART_ADDR MMIO_P2V_WO(0xFE660000) #define UART_ADDR MMIO_P2V_WO(0xfeb50000)
// #define UART_ADDR (0xFE660000) // #define UART_ADDR (0xFE660000)
#define UART_LCRVAL UART_LCR_8N1 /* 8 data, 1 stop, no parity */ #define UART_LCRVAL UART_LCR_8N1 /* 8 data, 1 stop, no parity */

View File

@ -38,7 +38,7 @@ KERNELPATHS += \
-I$(KERNEL_ROOT)/hardkernel/cache/L2/pl310/ -I$(KERNEL_ROOT)/hardkernel/cache/L2/pl310/
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
KERNELPATHS += \ KERNELPATHS += \
-I$(KERNEL_ROOT)/hardkernel/clock/arm/armv8-a/cortex-a55/$(BOARD)/include \ -I$(KERNEL_ROOT)/hardkernel/clock/arm/armv8-a/cortex-a55/$(BOARD)/include \
-I$(KERNEL_ROOT)/hardkernel/arch/arm/armv8-a/cortex-a55/preboot_for_$(BOARD)/include \ -I$(KERNEL_ROOT)/hardkernel/arch/arm/armv8-a/cortex-a55/preboot_for_$(BOARD)/include \

View File

@ -10,7 +10,7 @@ cflags = -std=c11 -O2 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -
board_specs = stub.o board_specs = stub.o
#cflags = -Wall -g -std=c11 #cflags = -Wall -g -std=c11
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O2 -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O2 -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -march=armv7-a -std=c11 -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -march=armv7-a -std=c11 -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -181,7 +181,7 @@ typedef struct NS16550* NS16550_t;
/* useful defaults for LCR */ /* useful defaults for LCR */
#define UART_LCR_8N1 0x03 #define UART_LCR_8N1 0x03
#define UART_ADDR (0xFE660000) #define UART_ADDR (0xfeb50000)
#define UART_LCRVAL UART_LCR_8N1 /* 8 data, 1 stop, no parity */ #define UART_LCRVAL UART_LCR_8N1 /* 8 data, 1 stop, no parity */
#define UART_MCRVAL (UART_MCR_DTR | UART_MCR_RTS) /* RTS/DTR */ #define UART_MCRVAL (UART_MCR_DTR | UART_MCR_RTS) /* RTS/DTR */

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -march=armv7-a -std=c11 -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -march=armv7-a -std=c11 -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -9,7 +9,7 @@ user_ldflags = --start-group,-lgcc,-lc,--end-group
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
#cflags = -Wall -g -std=c11 #cflags = -Wall -g -std=c11
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -19,7 +19,7 @@ cflags = -g -std=c11 -mtune=cortex-a72 -nostdlib -nodefaultlibs -fno-pic -stati
board_specs = stub.o board_specs = stub.o
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
@ -35,7 +35,7 @@ c_useropts = -O2
INC_DIR = -I$(KERNEL_ROOT)/services/app \ INC_DIR = -I$(KERNEL_ROOT)/services/app \
-I$(KERNEL_ROOT)/services/boards/$(BOARD) \ -I$(KERNEL_ROOT)/services/boards/$(BOARD) \
-I$(KERNEL_ROOT)/services/lib/serial \ -I$(KERNEL_ROOT)/services/lib/serial \
-I$(KERNEL_ROOT)/services/drivers/3568/include \ -I$(KERNEL_ROOT)/services/drivers/3588/include \
-I$(KERNEL_ROOT)/services/lib/usyscall \ -I$(KERNEL_ROOT)/services/lib/usyscall \
-I$(KERNEL_ROOT)/services/lib/ipc \ -I$(KERNEL_ROOT)/services/lib/ipc \
-I$(KERNEL_ROOT)/services/lib/memory -I$(KERNEL_ROOT)/services/lib/memory

View File

@ -1209,7 +1209,7 @@ struct INTMUX_REG {
#define SPI2_BASE 0xFE630000U /* SPI2 base address */ #define SPI2_BASE 0xFE630000U /* SPI2 base address */
#define SPI3_BASE 0xFE640000U /* SPI3 base address */ #define SPI3_BASE 0xFE640000U /* SPI3 base address */
#define UART1_BASE 0xFE650000U /* UART1 base address */ #define UART1_BASE 0xFE650000U /* UART1 base address */
#define UART2_BASE 0xFE660000U /* UART2 base address */ #define UART2_BASE 0xfeb50000 /* UART2 base address */
#define UART3_BASE 0xFE670000U /* UART3 base address */ #define UART3_BASE 0xFE670000U /* UART3 base address */
#define UART4_BASE 0xFE680000U /* UART4 base address */ #define UART4_BASE 0xFE680000U /* UART4 base address */
#define UART5_BASE 0xFE690000U /* UART5 base address */ #define UART5_BASE 0xFE690000U /* UART5 base address */

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -9,7 +9,7 @@ user_ldflags = --start-group,-lgcc,-lc,--end-group
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
#cflags = -Wall -g -std=c11 #cflags = -Wall -g -std=c11
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N user_ldflags = -N
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -9,7 +9,7 @@ user_ldflags = --start-group,-lgcc,-lc,--end-group
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
#cflags = -Wall -g -std=c11 #cflags = -Wall -g -std=c11
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -17,7 +17,7 @@ cflags = -Wall -g -std=c11 -mtune=cortex-a72 -nostdlib -nodefaultlibs -fno-pic -
board_specs = stub.o board_specs = stub.o
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -18,7 +18,7 @@ cflags = -Wall -g -std=c11 -mtune=cortex-a72 -nostdlib -nodefaultlibs -fno-pic -
board_specs = $(KERNEL_ROOT)/services/app/stub.o board_specs = $(KERNEL_ROOT)/services/app/stub.o
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -9,7 +9,7 @@ user_ldflags = --start-group,-lgcc,-lc,--end-group
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
#cflags = -Wall -g -std=c11 #cflags = -Wall -g -std=c11
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -8,7 +8,7 @@ toolchain ?= arm-xilinx-eabi-
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
endif endif
ifeq ($(BOARD), 3568) ifeq ($(BOARD), 3588)
toolchain ?= aarch64-none-elf- toolchain ?= aarch64-none-elf-
user_ldflags = -N -Ttext 0 user_ldflags = -N -Ttext 0
cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie

View File

@ -67,7 +67,7 @@ int main(void)
ERROR("Failed to create hardkernel owner and softkernel owner.\n"); ERROR("Failed to create hardkernel owner and softkernel owner.\n");
return -1; return -1;
} }
/* init hardkernel */ /* init hardkernel (print need after init hardkernel)*/
if (!hardkernel_init(&hardkernel_tag)) { if (!hardkernel_init(&hardkernel_tag)) {
return -1; return -1;
} }
@ -78,7 +78,7 @@ int main(void)
secondary_cpu_hardkernel_init(cpu_id, &hardkernel_tag); secondary_cpu_hardkernel_init(cpu_id, &hardkernel_tag);
spinlock_unlock(&whole_kernel_lock); spinlock_unlock(&whole_kernel_lock);
} }
LOG_PRINTF("CPU %d coming \n", cpu_id);
spinlock_lock(&whole_kernel_lock); spinlock_lock(&whole_kernel_lock);
if (cpu_id == 0) { if (cpu_id == 0) {
/* init softkernel */ /* init softkernel */

View File

@ -2,7 +2,7 @@
#include $(KERNEL_ROOT)/compiler.mk #include $(KERNEL_ROOT)/compiler.mk
ifneq ($(findstring $(BOARD), 3568), ) ifneq ($(findstring $(BOARD), 3588), )
SRC_FILES := kalloc.c pagetable.c pagetable_level3.c buddy.c object_allocator.c share_page.c SRC_FILES := kalloc.c pagetable.c pagetable_level3.c buddy.c object_allocator.c share_page.c
endif endif
ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), )