https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7601fb549c7a199ae0567…
commit 7601fb549c7a199ae056758ed82ea70c8339b4ce
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Mon Mar 15 02:42:49 2021 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Mon Mar 15 02:48:35 2021 +0300
[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
---
hal/halx86/CMakeLists.txt | 10 ++++------
hal/halx86/apic.cmake | 3 ++-
hal/halx86/apic/{halinit_apic.c => halinit.c} | 9 ++++-----
hal/halx86/{amd64 => apic}/processor.c | 9 ++++-----
hal/halx86/minihal/CMakeLists.txt | 8 ++++----
hal/halx86/{up/halinit_mini.c => minihal/halinit.c} | 11 ++++-------
hal/halx86/pc98.cmake | 7 ++++---
hal/halx86/pic.cmake | 9 +++++----
hal/halx86/{up/halinit_up.c => pic/halinit.c} | 0
hal/halx86/{up/halup.rc => pic/halpic.rc} | 4 ++--
hal/halx86/{up => pic}/irql.c | 0
hal/halx86/{up => pic}/pic.S | 8 ++++----
hal/halx86/{up => pic}/pic.c | 0
hal/halx86/{up => pic}/processor.c | 9 ++++-----
hal/halx86/up.cmake | 3 +--
hal/halx86/xbox.cmake | 9 +++++----
hal/halx86/xbox/{halinit_xbox.c => halinit.c} | 0
17 files changed, 47 insertions(+), 52 deletions(-)
diff --git a/hal/halx86/CMakeLists.txt b/hal/halx86/CMakeLists.txt
index 68d13839dae..890a4b4ebd6 100644
--- a/hal/halx86/CMakeLists.txt
+++ b/hal/halx86/CMakeLists.txt
@@ -44,11 +44,11 @@ endfunction()
include(generic.cmake)
include(acpi.cmake)
include(apic.cmake)
+include(up.cmake)
if(ARCH STREQUAL "i386")
include(pcidata.cmake)
include(legacy.cmake)
- include(up.cmake)
include(pic.cmake)
include(xbox.cmake)
include(pc98.cmake)
@@ -58,7 +58,7 @@ if(ARCH STREQUAL "i386")
remove_definitions(-DSARCH_PC98)
# hal
- add_hal(hal SOURCES up/halup.rc COMPONENTS generic legacy up pic)
+ add_hal(hal SOURCES pic/halpic.rc COMPONENTS generic legacy up pic)
add_hal(halacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi up pic)
add_hal(halapic SOURCES acpi/halacpi.rc COMPONENTS generic legacy up apic)
add_hal(halaacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi up apic)
@@ -73,12 +73,10 @@ if(ARCH STREQUAL "i386")
elseif(ARCH STREQUAL "amd64")
list(APPEND HAL_SOURCE
- generic/spinlock.c
amd64/x86bios.c
- amd64/halinit.c
- amd64/processor.c)
+ amd64/halinit.c)
- add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi apic)
+ add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi up apic)
target_link_libraries(hal fast486)
endif()
diff --git a/hal/halx86/apic.cmake b/hal/halx86/apic.cmake
index 9c0139e3504..10857eeea8f 100644
--- a/hal/halx86/apic.cmake
+++ b/hal/halx86/apic.cmake
@@ -6,7 +6,8 @@ list(APPEND HAL_APIC_ASM_SOURCE
list(APPEND HAL_APIC_SOURCE
apic/apic.c
apic/apictimer.c
- apic/halinit_apic.c
+ apic/halinit.c
+ apic/processor.c
apic/rtctimer.c
apic/tsc.c)
diff --git a/hal/halx86/apic/halinit_apic.c b/hal/halx86/apic/halinit.c
similarity index 84%
rename from hal/halx86/apic/halinit_apic.c
rename to hal/halx86/apic/halinit.c
index cd5e0daf9d6..0ade0fda11c 100644
--- a/hal/halx86/apic/halinit_apic.c
+++ b/hal/halx86/apic/halinit.c
@@ -1,9 +1,8 @@
/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: hal/halx86/apic/halinit_apic.c
- * PURPOSE: Initialize the x86 hal
- * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org)
+ * PROJECT: ReactOS Hardware Abstraction Layer
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: Initialize the x86 HAL
+ * COPYRIGHT: Copyright 2011 Timo Kreuzer <timo.kreuzer(a)reactos.org>
*/
/* INCLUDES *****************************************************************/
diff --git a/hal/halx86/amd64/processor.c b/hal/halx86/apic/processor.c
similarity index 81%
rename from hal/halx86/amd64/processor.c
rename to hal/halx86/apic/processor.c
index f4621190473..c9f370f7459 100644
--- a/hal/halx86/amd64/processor.c
+++ b/hal/halx86/apic/processor.c
@@ -1,9 +1,8 @@
/*
- * PROJECT: ReactOS HAL
- * LICENSE: GPL - See COPYING in the top level directory
- * FILE: hal/halx86/amd64/processor.c
- * PURPOSE: HAL Processor Routines
- * PROGRAMMERS: Timo Kreuzer (timo.kreuzer(a)reactos.org)
+ * PROJECT: ReactOS Hardware Abstraction Layer
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: HAL Processor Routines
+ * COPYRIGHT: Copyright 2010 Timo Kreuzer <timo.kreuzer(a)reactos.org>
*/
/* INCLUDES ******************************************************************/
diff --git a/hal/halx86/minihal/CMakeLists.txt b/hal/halx86/minihal/CMakeLists.txt
index 47708f9247d..94a3e93112f 100644
--- a/hal/halx86/minihal/CMakeLists.txt
+++ b/hal/halx86/minihal/CMakeLists.txt
@@ -17,10 +17,10 @@ list(APPEND MINI_HAL_SOURCE
../generic/sysinfo.c
../generic/timer.c
../generic/usage.c
- ../up/halinit_mini.c
- ../up/pic.c
- ../up/processor.c
- ../include/hal.h)
+ ../pic/pic.c
+ ../pic/processor.c
+ ../include/hal.h
+ halinit.c)
if(SARCH STREQUAL "xbox")
list(APPEND MINI_HAL_SOURCE
diff --git a/hal/halx86/up/halinit_mini.c b/hal/halx86/minihal/halinit.c
similarity index 75%
rename from hal/halx86/up/halinit_mini.c
rename to hal/halx86/minihal/halinit.c
index 3f2ebf94025..5be48fa8e52 100644
--- a/hal/halx86/up/halinit_mini.c
+++ b/hal/halx86/minihal/halinit.c
@@ -1,11 +1,8 @@
/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: hal/halx86/up/halinit_mini.c
- * PURPOSE: Initialize the x86 hal
- * PROGRAMMER: David Welch (welch(a)cwcom.net)
- * UPDATE HISTORY:
- * 11/06/98: Created
+ * PROJECT: ReactOS Mini-HAL
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: Initialize the x86 HAL
+ * COPYRIGHT: Copyright 1998 David Welch <welch(a)cwcom.net>
*/
/* INCLUDES *****************************************************************/
diff --git a/hal/halx86/pc98.cmake b/hal/halx86/pc98.cmake
index 9f04972a212..b88fbe87ddb 100644
--- a/hal/halx86/pc98.cmake
+++ b/hal/halx86/pc98.cmake
@@ -27,12 +27,13 @@ list(APPEND HAL_PC98_ASM_SOURCE
list(APPEND HAL_PC98_SOURCE
pc98/irql.c
generic/timer.c
- up/halinit_up.c
- up/pic.c)
+ pic/halinit.c
+ pic/pic.c
+ pic/processor.c)
list(APPEND HAL_PC98_ASM_SOURCE
generic/trap.S
- up/pic.S)
+ pic/pic.S)
# Legacy
list(APPEND HAL_PC98_SOURCE
diff --git a/hal/halx86/pic.cmake b/hal/halx86/pic.cmake
index d8f151f6071..b6612cc413f 100644
--- a/hal/halx86/pic.cmake
+++ b/hal/halx86/pic.cmake
@@ -2,15 +2,16 @@
list(APPEND HAL_PIC_ASM_SOURCE
generic/systimer.S
generic/trap.S
- up/pic.S)
+ pic/pic.S)
list(APPEND HAL_PIC_SOURCE
generic/clock.c
generic/profil.c
generic/timer.c
- up/halinit_up.c
- up/irql.c
- up/pic.c)
+ pic/halinit.c
+ pic/irql.c
+ pic/pic.c
+ pic/processor.c)
add_asm_files(lib_hal_pic_asm ${HAL_PIC_ASM_SOURCE})
add_library(lib_hal_pic OBJECT ${HAL_PIC_SOURCE} ${lib_hal_pic_asm})
diff --git a/hal/halx86/up/halinit_up.c b/hal/halx86/pic/halinit.c
similarity index 100%
rename from hal/halx86/up/halinit_up.c
rename to hal/halx86/pic/halinit.c
diff --git a/hal/halx86/up/halup.rc b/hal/halx86/pic/halpic.rc
similarity index 59%
rename from hal/halx86/up/halup.rc
rename to hal/halx86/pic/halpic.rc
index 09edeb22851..e1abedb16f3 100644
--- a/hal/halx86/up/halup.rc
+++ b/hal/halx86/pic/halpic.rc
@@ -1,5 +1,5 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "X86 Uniprocessor Hardware Abstraction
Layer"
-#define REACTOS_STR_INTERNAL_NAME "halup"
-#define REACTOS_STR_ORIGINAL_FILENAME "halup.dll"
+#define REACTOS_STR_INTERNAL_NAME "halpic"
+#define REACTOS_STR_ORIGINAL_FILENAME "halpic.dll"
#include <reactos/version.rc>
diff --git a/hal/halx86/up/irql.c b/hal/halx86/pic/irql.c
similarity index 100%
rename from hal/halx86/up/irql.c
rename to hal/halx86/pic/irql.c
diff --git a/hal/halx86/up/pic.S b/hal/halx86/pic/pic.S
similarity index 87%
rename from hal/halx86/up/pic.S
rename to hal/halx86/pic/pic.S
index f93bb972a01..18d92079cb2 100644
--- a/hal/halx86/up/pic.S
+++ b/hal/halx86/pic/pic.S
@@ -1,8 +1,8 @@
/*
- * FILE: hal/halx86/up/pic.S
- * COPYRIGHT: See COPYING in the top level directory
- * PURPOSE: HAL PIC Management and Control Code
- * PROGRAMMER: Thomas Faber (thomas.faber(a)reactos.org)
+ * PROJECT: ReactOS Hardware Abstraction Layer
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: HAL PIC Management and Control Code
+ * COPYRIGHT: Copyright 2016-2018 Thomas Faber <thomas.faber(a)reactos.org>
*/
/* INCLUDES ******************************************************************/
diff --git a/hal/halx86/up/pic.c b/hal/halx86/pic/pic.c
similarity index 100%
rename from hal/halx86/up/pic.c
rename to hal/halx86/pic/pic.c
diff --git a/hal/halx86/up/processor.c b/hal/halx86/pic/processor.c
similarity index 81%
rename from hal/halx86/up/processor.c
rename to hal/halx86/pic/processor.c
index fbbe707c0d6..58bf6e0187e 100644
--- a/hal/halx86/up/processor.c
+++ b/hal/halx86/pic/processor.c
@@ -1,9 +1,8 @@
/*
- * PROJECT: ReactOS HAL
- * LICENSE: GPL - See COPYING in the top level directory
- * FILE: hal/halx86/up/processor.c
- * PURPOSE: HAL Processor Routines
- * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
+ * PROJECT: ReactOS Hardware Abstraction Layer
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: HAL Processor Routines
+ * COPYRIGHT: Copyright 2006 Alex Ionescu <alex.ionescu(a)reactos.org>
*/
/* INCLUDES ******************************************************************/
diff --git a/hal/halx86/up.cmake b/hal/halx86/up.cmake
index 2d40c7da185..d413710240e 100644
--- a/hal/halx86/up.cmake
+++ b/hal/halx86/up.cmake
@@ -1,7 +1,6 @@
list(APPEND HAL_UP_SOURCE
- generic/spinlock.c
- up/processor.c)
+ generic/spinlock.c)
add_library(lib_hal_up OBJECT ${HAL_UP_SOURCE})
add_dependencies(lib_hal_up bugcodes xdk)
diff --git a/hal/halx86/xbox.cmake b/hal/halx86/xbox.cmake
index ffdbbfe8026..9b4a6dfc20f 100644
--- a/hal/halx86/xbox.cmake
+++ b/hal/halx86/xbox.cmake
@@ -3,7 +3,7 @@ list(APPEND HAL_XBOX_ASM_SOURCE
generic/systimer.S
generic/trap.S
generic/v86.S
- up/pic.S)
+ pic/pic.S)
list(APPEND HAL_XBOX_SOURCE
generic/beep.c
@@ -34,10 +34,11 @@ list(APPEND HAL_XBOX_SOURCE
generic/timer.c
xbox/clock.c
xbox/part_xbox.c
- xbox/halinit_xbox.c
+ xbox/halinit.c
xbox/reboot.c
- up/irql.c
- up/pic.c)
+ pic/irql.c
+ pic/pic.c
+ pic/processor.c)
add_asm_files(lib_hal_xbox_asm ${HAL_XBOX_ASM_SOURCE})
add_library(lib_hal_xbox OBJECT ${HAL_XBOX_SOURCE} ${lib_hal_xbox_asm})
diff --git a/hal/halx86/xbox/halinit_xbox.c b/hal/halx86/xbox/halinit.c
similarity index 100%
rename from hal/halx86/xbox/halinit_xbox.c
rename to hal/halx86/xbox/halinit.c