From c6381d90139612541791c791ab95bc1af4561100 Mon Sep 17 00:00:00 2001 From: evilbinary Date: Sat, 3 Sep 2022 12:57:04 +0800 Subject: [PATCH] fix mp enable --- arch/arch.h | 1 + boot/arm/config.h | 4 ++-- kernel/config.h | 3 --- platform/platform.h | 4 ++++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arch.h b/arch/arch.h index 2da3d3ea..52deb358 100644 --- a/arch/arch.h +++ b/arch/arch.h @@ -15,6 +15,7 @@ #include "libs/include/kernel/elf.h" #include "interrupt.h" #include "lock.h" +#include "platform/platform.h" void arch_init(boot_info_t* boot,int cpu_id); diff --git a/boot/arm/config.h b/boot/arm/config.h index 14764cac..1e2fb73c 100644 --- a/boot/arm/config.h +++ b/boot/arm/config.h @@ -1,5 +1,5 @@ #ifndef BOOT/ARM/CONFIG_H #define BOOT/ARM/CONFIG_H -#define KERNEL_BLOCK_SIZE 194 -#define KERNEL_SIZE 197672 +#define KERNEL_BLOCK_SIZE 169 +#define KERNEL_SIZE 172948 #endif diff --git a/kernel/config.h b/kernel/config.h index fa00175f..ccc51b6c 100644 --- a/kernel/config.h +++ b/kernel/config.h @@ -27,8 +27,6 @@ #define PAGE_SIZE 0x1000 -#define MP_ENABLE 1 //多cpu - #elif defined(ARMV7) #define MAX_FD_NUMBER 50 @@ -68,7 +66,6 @@ #define THREAD_STACK_SIZE 4096*4 #define PAGE_SIZE 0x1000 -#define MP_ENABLE 1 //多cpu #endif diff --git a/platform/platform.h b/platform/platform.h index 045df256..03cdd94c 100644 --- a/platform/platform.h +++ b/platform/platform.h @@ -13,6 +13,8 @@ #define ISR_SYSCALL 2 #define ISR_MOUSE 0x2c +#define MP_ENABLE 1 //多cpu + #elif defined(X86) #define ISR_TIMER 0x20 @@ -20,6 +22,8 @@ #define ISR_SYSCALL 0x30 #define ISR_MOUSE 0x2c +#define MP_ENABLE 1 //多cpu + #elif defined(STM32F4XX) #define ISR_TIMER 50