mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +00:00
[HAL] Add smp component and build x64 smp hal
Like the up component it contains the spinlock code and now also the HalpBuildType variable.
This commit is contained in:
parent
396167bc7e
commit
400af0cfc5
8 changed files with 30 additions and 14 deletions
|
@ -45,6 +45,7 @@ include(generic.cmake)
|
|||
include(acpi.cmake)
|
||||
include(apic.cmake)
|
||||
include(up.cmake)
|
||||
include(smp.cmake)
|
||||
|
||||
if(ARCH STREQUAL "i386")
|
||||
include(pcidata.cmake)
|
||||
|
@ -73,7 +74,9 @@ elseif(ARCH STREQUAL "amd64")
|
|||
amd64/x86bios.c)
|
||||
|
||||
add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi up apic)
|
||||
#add_hal(halmacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi smp pic)
|
||||
target_link_libraries(hal fast486)
|
||||
|
||||
add_hal(halmp SOURCES ${HAL_SOURCE} COMPONENTS generic acpi smp apic)
|
||||
target_link_libraries(halmp fast486)
|
||||
|
||||
endif()
|
||||
|
|
|
@ -16,10 +16,6 @@ VOID
|
|||
NTAPI
|
||||
ApicInitializeLocalApic(ULONG Cpu);
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
const USHORT HalpBuildType = HAL_BUILD_TYPE;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
VOID
|
||||
|
@ -41,6 +37,9 @@ HalpInitProcessor(
|
|||
VOID
|
||||
HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
DPRINT1("Using HAL: APIC %s %s\n",
|
||||
(HalpBuildType & PRCB_BUILD_UNIPROCESSOR) ? "UP" : "SMP",
|
||||
(HalpBuildType & PRCB_BUILD_DEBUG) ? "DBG" : "REL");
|
||||
|
||||
/* Enable clock interrupt handler */
|
||||
HalpEnableInterruptHandler(IDT_INTERNAL,
|
||||
|
|
14
hal/halx86/generic/buildtype.c
Normal file
14
hal/halx86/generic/buildtype.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Hardware Abstraction Layer
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Defines HalpBuildType for either UP or SMP
|
||||
* COPYRIGHT: Copyright 2021 Timo Kreuzer <timo.kreuzer@reactos.org>
|
||||
*/
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <hal.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
const USHORT HalpBuildType = HAL_BUILD_TYPE;
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
const USHORT HalpBuildType = HAL_BUILD_TYPE;
|
||||
extern BOOLEAN HaliFindSmpConfig(VOID);
|
||||
ULONG_PTR KernelBase;
|
||||
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
const USHORT HalpBuildType = HAL_BUILD_TYPE;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
VOID
|
||||
|
|
8
hal/halx86/smp.cmake
Normal file
8
hal/halx86/smp.cmake
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
list(APPEND HAL_SMP_SOURCE
|
||||
generic/buildtype.c
|
||||
generic/spinlock.c)
|
||||
|
||||
add_library(lib_hal_smp OBJECT ${HAL_SMP_SOURCE})
|
||||
add_dependencies(lib_hal_smp bugcodes xdk)
|
||||
target_compile_definitions(lib_hal_smp PRIVATE CONFIG_SMP)
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
list(APPEND HAL_UP_SOURCE
|
||||
generic/buildtype.c
|
||||
generic/spinlock.c)
|
||||
|
||||
add_library(lib_hal_up OBJECT ${HAL_UP_SOURCE})
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
const USHORT HalpBuildType = HAL_BUILD_TYPE;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
VOID
|
||||
|
|
Loading…
Reference in a new issue