Reactos

[HALX86] Rearrange files in x86 HAL

- Rename UP -> PIC. The "up" folder in fact contains the code for
managing the Intel 8259 PIC chip
- Move amd64/processor.c -> apic/processor.c. The code is not tied to
amd64
- Remove platform from "halinit*" files. They already reside in the
corresponding folder

+50 -55
+4 -6
hal/halx86/CMakeLists.txt
··· 44 44 include(generic.cmake) 45 45 include(acpi.cmake) 46 46 include(apic.cmake) 47 + include(up.cmake) 47 48 48 49 if(ARCH STREQUAL "i386") 49 50 include(pcidata.cmake) 50 51 include(legacy.cmake) 51 - include(up.cmake) 52 52 include(pic.cmake) 53 53 include(xbox.cmake) 54 54 include(pc98.cmake) ··· 58 58 remove_definitions(-DSARCH_PC98) 59 59 60 60 # hal 61 - add_hal(hal SOURCES up/halup.rc COMPONENTS generic legacy up pic) 61 + add_hal(hal SOURCES pic/halpic.rc COMPONENTS generic legacy up pic) 62 62 add_hal(halacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi up pic) 63 63 add_hal(halapic SOURCES acpi/halacpi.rc COMPONENTS generic legacy up apic) 64 64 add_hal(halaacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi up apic) ··· 73 73 elseif(ARCH STREQUAL "amd64") 74 74 75 75 list(APPEND HAL_SOURCE 76 - generic/spinlock.c 77 76 amd64/x86bios.c 78 - amd64/halinit.c 79 - amd64/processor.c) 77 + amd64/halinit.c) 80 78 81 - add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi apic) 79 + add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi up apic) 82 80 target_link_libraries(hal fast486) 83 81 84 82 endif()
+4 -5
hal/halx86/amd64/processor.c hal/halx86/apic/processor.c
··· 1 1 /* 2 - * PROJECT: ReactOS HAL 3 - * LICENSE: GPL - See COPYING in the top level directory 4 - * FILE: hal/halx86/amd64/processor.c 5 - * PURPOSE: HAL Processor Routines 6 - * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org) 2 + * PROJECT: ReactOS Hardware Abstraction Layer 3 + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 + * PURPOSE: HAL Processor Routines 5 + * COPYRIGHT: Copyright 2010 Timo Kreuzer <timo.kreuzer@reactos.org> 7 6 */ 8 7 9 8 /* INCLUDES ******************************************************************/
+2 -1
hal/halx86/apic.cmake
··· 6 6 list(APPEND HAL_APIC_SOURCE 7 7 apic/apic.c 8 8 apic/apictimer.c 9 - apic/halinit_apic.c 9 + apic/halinit.c 10 + apic/processor.c 10 11 apic/rtctimer.c 11 12 apic/tsc.c) 12 13
+4 -5
hal/halx86/apic/halinit_apic.c hal/halx86/apic/halinit.c
··· 1 1 /* 2 - * COPYRIGHT: See COPYING in the top level directory 3 - * PROJECT: ReactOS kernel 4 - * FILE: hal/halx86/apic/halinit_apic.c 5 - * PURPOSE: Initialize the x86 hal 6 - * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) 2 + * PROJECT: ReactOS Hardware Abstraction Layer 3 + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 + * PURPOSE: Initialize the x86 HAL 5 + * COPYRIGHT: Copyright 2011 Timo Kreuzer <timo.kreuzer@reactos.org> 7 6 */ 8 7 9 8 /* INCLUDES *****************************************************************/
+4 -4
hal/halx86/minihal/CMakeLists.txt
··· 17 17 ../generic/sysinfo.c 18 18 ../generic/timer.c 19 19 ../generic/usage.c 20 - ../up/halinit_mini.c 21 - ../up/pic.c 22 - ../up/processor.c 23 - ../include/hal.h) 20 + ../pic/pic.c 21 + ../pic/processor.c 22 + ../include/hal.h 23 + halinit.c) 24 24 25 25 if(SARCH STREQUAL "xbox") 26 26 list(APPEND MINI_HAL_SOURCE
+4 -3
hal/halx86/pc98.cmake
··· 27 27 list(APPEND HAL_PC98_SOURCE 28 28 pc98/irql.c 29 29 generic/timer.c 30 - up/halinit_up.c 31 - up/pic.c) 30 + pic/halinit.c 31 + pic/pic.c 32 + pic/processor.c) 32 33 33 34 list(APPEND HAL_PC98_ASM_SOURCE 34 35 generic/trap.S 35 - up/pic.S) 36 + pic/pic.S) 36 37 37 38 # Legacy 38 39 list(APPEND HAL_PC98_SOURCE
+5 -4
hal/halx86/pic.cmake
··· 2 2 list(APPEND HAL_PIC_ASM_SOURCE 3 3 generic/systimer.S 4 4 generic/trap.S 5 - up/pic.S) 5 + pic/pic.S) 6 6 7 7 list(APPEND HAL_PIC_SOURCE 8 8 generic/clock.c 9 9 generic/profil.c 10 10 generic/timer.c 11 - up/halinit_up.c 12 - up/irql.c 13 - up/pic.c) 11 + pic/halinit.c 12 + pic/irql.c 13 + pic/pic.c 14 + pic/processor.c) 14 15 15 16 add_asm_files(lib_hal_pic_asm ${HAL_PIC_ASM_SOURCE}) 16 17 add_library(lib_hal_pic OBJECT ${HAL_PIC_SOURCE} ${lib_hal_pic_asm})
+5
hal/halx86/pic/halpic.rc
··· 1 + #define REACTOS_VERSION_DLL 2 + #define REACTOS_STR_FILE_DESCRIPTION "X86 Uniprocessor Hardware Abstraction Layer" 3 + #define REACTOS_STR_INTERNAL_NAME "halpic" 4 + #define REACTOS_STR_ORIGINAL_FILENAME "halpic.dll" 5 + #include <reactos/version.rc>
+1 -2
hal/halx86/up.cmake
··· 1 1 2 2 list(APPEND HAL_UP_SOURCE 3 - generic/spinlock.c 4 - up/processor.c) 3 + generic/spinlock.c) 5 4 6 5 add_library(lib_hal_up OBJECT ${HAL_UP_SOURCE}) 7 6 add_dependencies(lib_hal_up bugcodes xdk)
+4 -7
hal/halx86/up/halinit_mini.c hal/halx86/minihal/halinit.c
··· 1 1 /* 2 - * COPYRIGHT: See COPYING in the top level directory 3 - * PROJECT: ReactOS kernel 4 - * FILE: hal/halx86/up/halinit_mini.c 5 - * PURPOSE: Initialize the x86 hal 6 - * PROGRAMMER: David Welch (welch@cwcom.net) 7 - * UPDATE HISTORY: 8 - * 11/06/98: Created 2 + * PROJECT: ReactOS Mini-HAL 3 + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 + * PURPOSE: Initialize the x86 HAL 5 + * COPYRIGHT: Copyright 1998 David Welch <welch@cwcom.net> 9 6 */ 10 7 11 8 /* INCLUDES *****************************************************************/
hal/halx86/up/halinit_up.c hal/halx86/pic/halinit.c
-5
hal/halx86/up/halup.rc
··· 1 - #define REACTOS_VERSION_DLL 2 - #define REACTOS_STR_FILE_DESCRIPTION "X86 Uniprocessor Hardware Abstraction Layer" 3 - #define REACTOS_STR_INTERNAL_NAME "halup" 4 - #define REACTOS_STR_ORIGINAL_FILENAME "halup.dll" 5 - #include <reactos/version.rc>
hal/halx86/up/irql.c hal/halx86/pic/irql.c
+4 -4
hal/halx86/up/pic.S hal/halx86/pic/pic.S
··· 1 1 /* 2 - * FILE: hal/halx86/up/pic.S 3 - * COPYRIGHT: See COPYING in the top level directory 4 - * PURPOSE: HAL PIC Management and Control Code 5 - * PROGRAMMER: Thomas Faber (thomas.faber@reactos.org) 2 + * PROJECT: ReactOS Hardware Abstraction Layer 3 + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 + * PURPOSE: HAL PIC Management and Control Code 5 + * COPYRIGHT: Copyright 2016-2018 Thomas Faber <thomas.faber@reactos.org> 6 6 */ 7 7 8 8 /* INCLUDES ******************************************************************/
hal/halx86/up/pic.c hal/halx86/pic/pic.c
+4 -5
hal/halx86/up/processor.c hal/halx86/pic/processor.c
··· 1 1 /* 2 - * PROJECT: ReactOS HAL 3 - * LICENSE: GPL - See COPYING in the top level directory 4 - * FILE: hal/halx86/up/processor.c 5 - * PURPOSE: HAL Processor Routines 6 - * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) 2 + * PROJECT: ReactOS Hardware Abstraction Layer 3 + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 + * PURPOSE: HAL Processor Routines 5 + * COPYRIGHT: Copyright 2006 Alex Ionescu <alex.ionescu@reactos.org> 7 6 */ 8 7 9 8 /* INCLUDES ******************************************************************/
+5 -4
hal/halx86/xbox.cmake
··· 3 3 generic/systimer.S 4 4 generic/trap.S 5 5 generic/v86.S 6 - up/pic.S) 6 + pic/pic.S) 7 7 8 8 list(APPEND HAL_XBOX_SOURCE 9 9 generic/beep.c ··· 34 34 generic/timer.c 35 35 xbox/clock.c 36 36 xbox/part_xbox.c 37 - xbox/halinit_xbox.c 37 + xbox/halinit.c 38 38 xbox/reboot.c 39 - up/irql.c 40 - up/pic.c) 39 + pic/irql.c 40 + pic/pic.c 41 + pic/processor.c) 41 42 42 43 add_asm_files(lib_hal_xbox_asm ${HAL_XBOX_ASM_SOURCE}) 43 44 add_library(lib_hal_xbox OBJECT ${HAL_XBOX_SOURCE} ${lib_hal_xbox_asm})
hal/halx86/xbox/halinit_xbox.c hal/halx86/xbox/halinit.c