hrev53545 adds 1 changeset to branch 'master'
old head: e3c74f400eb110f300b7e6063123fdd027b94d93
new head: 761ddb2c4f8b58d27a88a2f6e93484baf980e26d
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=761ddb2c4f8b+%5Ee3c74f400eb1
----------------------------------------------------------------------------
761ddb2c4f8b: EFI: Break smp into arch subpath
Change-Id: Ia9438777f1da8ca32f93e0d85229230c809e6711
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1918
Reviewed-by: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
[ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev53545
Commit: 761ddb2c4f8b58d27a88a2f6e93484baf980e26d
URL: https://git.haiku-os.org/haiku/commit/?id=761ddb2c4f8b
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Tue Oct 15 14:45:26 2019 UTC
Committer: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
Commit-Date: Wed Oct 16 21:21:15 2019 UTC
----------------------------------------------------------------------------
4 files changed, 42 insertions(+), 17 deletions(-)
src/system/boot/platform/efi/Jamfile | 24 ++++++++--------
src/system/boot/platform/efi/arch/x86_64/Jamfile | 29 ++++++++++++++++++++
.../boot/platform/efi/arch/x86_64/arch_smp.cpp | 4 +--
src/system/boot/platform/efi/arch/x86_64/entry.S | 2 --
----------------------------------------------------------------------------
diff --git a/src/system/boot/platform/efi/Jamfile
b/src/system/boot/platform/efi/Jamfile
index abdd96e840..7e9fb76208 100644
--- a/src/system/boot/platform/efi/Jamfile
+++ b/src/system/boot/platform/efi/Jamfile
@@ -37,14 +37,7 @@ local platform_src =
support.S
;
-local arch_src =
- arch_mmu.cpp
- arch_smp.cpp
- relocation_func.cpp
- entry.S
- ;
-
-Includes [ FGristFiles $(efi_glue_src) $(platform_src) $(arch_src) ]
+Includes [ FGristFiles $(efi_glue_src) $(platform_src) ]
:
[ BuildFeatureAttribute gnuefi : headers ]
[ BuildFeatureAttribute gnuefi : headersProtocol ]
@@ -55,21 +48,26 @@ local platform ;
for platform in [ MultiBootSubDirSetup efi ] {
on $(platform) {
- BootMergeObject boot_platform_efi.o :
+ BootMergeObject boot_platform_efi_common.o :
$(efi_glue_src)
$(platform_src)
- $(arch_src)
:
: boot_platform_generic_efi.a
;
- SEARCH on [ FGristFiles $(arch_src) ]
- = [ FDirName $(SUBDIR) arch $(TARGET_ARCH) ] ;
+ BootMergeObject boot_platform_efi.o :
+ : :
+ boot_platform_efi_$(TARGET_ARCH).o
+ boot_platform_efi_common.o
+ ;
+
LOCATE on [ FGristFiles $(efi_glue_src) ]
= [ BuildFeatureAttribute gnuefi : libdir : path ] ;
Depends [ FGristFiles $(efi_glue_src) ]
: [ BuildFeatureAttribute gnuefi : libdir ] ;
- Depends [ FGristFiles $(platform_src) $(arch_src) ]
+ Depends [ FGristFiles $(platform_src) ]
: [ BuildFeatureAttribute gnuefi : headers ] ;
}
}
+
+SubInclude HAIKU_TOP src system boot platform efi arch $(TARGET_ARCH) ;
diff --git a/src/system/boot/platform/efi/arch/x86_64/Jamfile
b/src/system/boot/platform/efi/arch/x86_64/Jamfile
new file mode 100644
index 0000000000..1497069661
--- /dev/null
+++ b/src/system/boot/platform/efi/arch/x86_64/Jamfile
@@ -0,0 +1,29 @@
+SubDir HAIKU_TOP src system boot platform efi arch x86_64 ;
+
+SubDirHdrs $(HAIKU_TOP) src system boot platform efi ;
+
+UsePrivateHeaders [ FDirName kernel boot platform efi ] ;
+UseBuildFeatureHeaders gnuefi ;
+UseBuildFeatureHeaders gnuefi : headersProtocol ;
+UseBuildFeatureHeaders gnuefi : headersArch ;
+
+local arch_src =
+ entry.S
+ relocation_func.cpp
+ arch_smp.cpp
+ arch_mmu.cpp
+ ;
+
+BootMergeObject boot_platform_efi_x86_64.o :
+ $(arch_src)
+ ;
+
+Includes [ FGristFiles $(arch_src) ]
+ :
+ [ BuildFeatureAttribute gnuefi : headers ]
+ [ BuildFeatureAttribute gnuefi : headersProtocol ]
+ [ BuildFeatureAttribute gnuefi : headersArch ]
+ ;
+
+Depends [ FGristFiles $(arch_src) ]
+ : [ BuildFeatureAttribute gnuefi : libdir ] ;
diff --git a/src/system/boot/platform/efi/arch/x86_64/arch_smp.cpp
b/src/system/boot/platform/efi/arch/x86_64/arch_smp.cpp
index 0dd65e7d61..5d79d8193f 100644
--- a/src/system/boot/platform/efi/arch/x86_64/arch_smp.cpp
+++ b/src/system/boot/platform/efi/arch/x86_64/arch_smp.cpp
@@ -72,14 +72,14 @@ struct trampoline_args {
};
-static uint32
+uint32
apic_read(uint32 offset)
{
return *(volatile uint32 *)((addr_t)gKernelArgs.arch_args.apic_phys +
offset);
}
-static void
+void
apic_write(uint32 offset, uint32 data)
{
*(volatile uint32 *)((addr_t)gKernelArgs.arch_args.apic_phys + offset)
= data;
diff --git a/src/system/boot/platform/efi/arch/x86_64/entry.S
b/src/system/boot/platform/efi/arch/x86_64/entry.S
index 0d874e3b6e..e518f9ff9a 100644
--- a/src/system/boot/platform/efi/arch/x86_64/entry.S
+++ b/src/system/boot/platform/efi/arch/x86_64/entry.S
@@ -9,8 +9,6 @@
#include <arch/x86/descriptors.h>
-#include "mmu.h"
-
#define GDT_LIMIT 0x800