#
81a892ed |
|
04-Jan-2023 |
Alexander von Gluck IV <kallisti5@unixzen.com> |
efi/serial: Refactor EFI bios serial services * Convert x86 direct port I/O to our standard gUART. * sSerial is plainly EFI Serial or EFI Stdout * gUART is plainly hardware serial now Change-Id: I5730fbc0ce3427851e4e2d1d0aa8c55f7765e444 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5982 Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
f6166140 |
|
29-Nov-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
build: Define _BOOT_MODE once and for all in ArchitectureRules+BootRules. Previously it was spread all around the tree, and was not defined consistently for all boot objects (there were a number of boot modules which did not define it, but did include headers which checked for it.) Now, as it is handled in SetupBoot which is invoked for all boot objects, it will be applied consistently throughout. We can thus drop the manual additions of it from all Jamfiles.
|
#
c2dcf106 |
|
29-Sep-2022 |
Alexander von Gluck IV <kallisti5@unixzen.com> |
Revert "boot/efi/x86: enable support for 64-bit ELF" This reverts commit 5897f7b6235d36a58582513ad5db270d9b1ce926. See #17961 for additional information. This breaks the official builds by growing the bios_ia32 loader too much. Change-Id: I63bc0c95839ef681a260efdd6ddf527d6699c1f4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5704 Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
5897f7b6 |
|
22-Sep-2022 |
David Karoly <karolyd577@gmail.com> |
boot/efi/x86: enable support for 64-bit ELF Change-Id: Id3b207444b55041dc83ee1afdd61b467ce13ff70 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5665 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
367beefa |
|
13-Jan-2022 |
David Karoly <karolyd577@gmail.com> |
boot/x86: move HPET initialization to arch folder Change-Id: Iac3f4923f132c4c3328fde5af1dad75af5b2efbd Reviewed-on: https://review.haiku-os.org/c/haiku/+/4864 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
b9a0a023 |
|
17-Dec-2021 |
David Karoly <karolyd577@gmail.com> |
arch/x86: select between 32-bit and 64-bit ELF based on arch and platform arch_elf is reused between the kernel and boot loader No change for kernel mode compilation. How to select 32-bit or 64-bit when building boot loader: * build both when building BIOS loader * build only 32-bit when building 32-bit EFI loader * build only 64-bit when building 64-bit EFI loader Change-Id: I9caa1248c7eb24318911a0c369137cedb638e4e4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4817 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
|
#
89fd39f4 |
|
01-Jul-2020 |
Alexander von Gluck IV <kallisti5@unixzen.com> |
efi: Refactor CPU code to be arch-specific * Migrate some platform agnostic architecture code into boot/arch from efi/arch. This helps to avoid conflicts between kernel and boot sources as well. * Conflicts between arch_cpu in efi and kernel code means bootcode really should *never* directly use kernel arch headers. (other platforms don't, which is why they don't have this same issue) * We carefully thread any needed kernel headers (namely assembly helper macros) into the bootloader headers without mixing in the whole conflicting kernel/arch headers. * ARM now properly get its cpu init code called, and we progress further into the EFI bootloader. Change-Id: If67ec9758b5ce68563ebd9eb45d5196401911c67 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2975 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
7b4d924f |
|
04-Dec-2019 |
Andrej Antunovikj <tunas@cryptolab.net> |
cpu: Extract shared x86 code from efi & bios_ia32 This issue was initially detected by PVS Studio (issue number V547) and fixed as part of Google Code-in 2019. The initial problem was the calculate_cpu_conversion_factor function which had been copied in the BIOS and EFI versions of the boot code. Further investigation led to more duplicated or very similar functions being identified. Introduce an arch_cpu.h for the x86 boot platform to group these things in a single place, and adjust the BIOS and EFI code to call into that. Note that the BIOS and EFI code is still a little platform specific, ideally there should be a boot_arch_cpu_init() function for each architecture as already done for openfirmware and u-boot. Also remove some irrelevant comments from copypasted files for other architectures, as that was filling my git grep with useless noise. Change-Id: I16d815f0bf015cec0b4e03cc14f3cc447c7164c5 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1985 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
1f96a3cb |
|
08-Oct-2018 |
Jessica Hamilton <jessica.l.hamilton@gmail.com> |
system/boot: Add support for multiple bootloaders
|
#
b3e749b0 |
|
28-May-2018 |
Jérôme Duval <jerome.duval@gmail.com> |
kernel,libroot,boot: remove c++11 and gnu++11 flags. * c++14 is the default with current GCC * remove pragmas for x86intrin.h
|
#
04f0d02a |
|
14-Nov-2016 |
Jessica Hamilton <jessica.l.hamilton@gmail.com> |
Jamfiles: fix TARGET_BOOT_PLATFORM tests to use = efi
|
#
c0bdc8be |
|
22-Apr-2016 |
Jessica Hamilton <jessica.l.hamilton@gmail.com> |
bootloader: build objects in $(TARGET_BOOT_PLATFORM) This separates the objects required for the various boot loaders, allowing the build system to be able to build for different targets alongside each other. Currently only done for bios_ia32 vs efi, as both loaders will be needed for the x86_64 images.
|
#
211483cb |
|
14-Apr-2016 |
Fredrik Holmqvist <fredrik.holmqvist@gmail.com> |
EFI: Initial test EFI application * Only set HAIKU_BOOT_PLATFORM to bios_ia32 if not defined * Add gnuefi build feature * Introduce BOOT_LDFLAGS, and move options for passing to linker into ArchitectureSetup * x86_64 compile fixes for warnings in boot loader * loader/elf.cpp: don't include ELF32 support when targeting EFI * relocation_func.cpp: copy of the relocation code from gnuefi to make _relocate extern "C", and avoid including <efilib.h> * boot_loader_efi.ld: copy of gnuefi's elf_x86_64_efi.lds, modified to include support for C++ constructors, etc. Keep in sync with the gnuefi package Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
|
#
4304bb98 |
|
04-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Added arch_cpu.cpp to the x86_64 build. * Some things are currently ifndef'd out completely for x86_64 because they aren't implemented, there's a few other ifdef's to handle x86_64 differences but most of the code works unchanged. * Renamed some i386_* functions to x86_*. * Added a temporary method for setting the current thread on x86_64 (a global variable, not SMP safe). This will be changed to be done via the GS segment but I've not implemented that yet.
|
#
90907c35 |
|
03-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Moved ELF64 relocation functions to x86 arch_elf.cpp.
|
#
da80a050 |
|
02-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Preparation for merge of x86 and x86_64 kernel sources. Since x86 and x86_64 share a lot of common code, x86_64 kernel sources/headers are going to reside under headers/private/kernel/arch/x86 and src/system/kernel/arch/x86 along with the existing x86 code. This commit changes the build system to handle this. A new variable, TARGET_KERNEL_ARCH, has been added. This is the name of the kernel/boot architecture directory name, set to x86 on both x86 and x86_64. This is now used in all places where TARGET_ARCH was used to get to kernel arch sources/headers (I've changed everything necessary as far as I can tell). Kernel won't build for x86_64 at the moment as the sources have not been merged, loader does.
|
#
f6a34444 |
|
24-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Added x86_64 ELF64 relocation functions for the bootloader. All that's left to do now is handle the 64-bit load address properly.
|
#
65ad1ba3 |
|
26-May-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Made it possible to build the bootloader when targetting x86_64. * x86_64 is using the existing *_ia32 boot platforms. * Special flags are required when compiling the loader to get GCC to compile 32-bit code. This adds a new set of rules for compiling boot code rather than using the kernel rules, which compile using the necessary flags. * Some x86_64 private headers have been stubbed by #include'ing the x86 versions. These will be replaced later.
|
#
bd185b41 |
|
01-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
*.c -> *.cpp git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
379ad6d0 |
|
09-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved the arch specific stuff in src/system/kernel/lib into arch/... subdirectories. Also moved the x86 kernel arch_string.S there. * Moved memcpy.c from src/system/libroot/posix/string into the arch/generic subdirectory. * Dealt with the consequences of moving things around. Affected are also the boot loader and runtime loader builds. Adjust the m68k and ppc parts, too, but only the x86 build is tested. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27947 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
34b3b26b |
|
10-Jan-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged branch haiku/branches/developer/bonefish/optimization revision 23139 into trunk, with roughly the following changes (for details svn log the branch): * The int 99 syscall handler is now fully in assembly. * Added a sysenter/sysexit handler and use it on Pentiums that support it (via commpage). * Got rid of i386_handle_trap(). A bit of functionality was moved into the assembly handler which now uses a jump table to call C functions handling the respective interrupt. * Some optimizations to get user debugger support code out of the interrupt handling path. * Introduced a thread::flags fields which allows to skip handling of rare events (signals, user debug enabling/disabling) on the common interrupt handling path. * Got rid of the explicit iframe stack. The iframes can still be retrieved by iterating through the stack frames. * Made the commpage an architecture independent feature. It's used for the real time data stuff (instead of creating a separate area). * The x86 CPU modules can now provide processor optimized versions for common functions (currently memcpy() only). They are used in the kernel and are provided to the userland via commpage entries. * Introduced build system feature allowing easy use of C structure member offsets in assembly code. Changes after merging: * Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp (caused by refactoring and introduction of "call" debugger command). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7986b7e3 |
|
26-Oct-2007 |
François Revol <revol@free.fr> |
Make use of the kernel's elf loader code instead of duplicating it. Add placeholder for m68k. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22748 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
957a1b17 |
|
30-Dec-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced new build system variables {HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the compiler/linker flags specifying the kind of position independence the kernel shall have. For x86 we had and still have -fno-pic, but the PPC kernel has -fPIE (position independent executable) now, as we need to relocate it. * The boot loader relocates the kernel now. Mostly copied the relocation code from the kernel ELF loader. Almost completely rewrote the PPC specific relocation code, though. It's more correct and more complete now (some things are still missing though). * Added boot platform awareness to the kernel. Moved the generic Open Firmware code (openfirmware.c/h) from the boot loader to the kernel. * The kernel PPC serial debug output is sent to the console for the time being. * The PPC boot loader counts the CPUs now and allocates the kernel stacks (made OF device iteration a bit more flexible on the way -- the search can be restricted to subtree). Furthermore we really enter the kernel... (Yay! :-) ... and crash in the first dprintf() (in the atomic_set() called by acquire_spinlock()). kprintf() works, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cc38261b |
|
30-Oct-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Removed "arch" directory, and "makeflop" & "bootmaker" - they are all no longer in use. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14587 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
338b8dc3 |
|
29-Oct-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged changes from branch build_system_redesign at revision 14573. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
718b5114 |
|
13-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
This should fix the build after all the kernel/system renaming. If anything is still broken (and was not before :)), please shout. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5af32e75 |
|
13-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Renamed src/kernel to src/system. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4304bb9894335fe5e5bd667a1f27dc7605c2e5b9 |
|
04-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Added arch_cpu.cpp to the x86_64 build. * Some things are currently ifndef'd out completely for x86_64 because they aren't implemented, there's a few other ifdef's to handle x86_64 differences but most of the code works unchanged. * Renamed some i386_* functions to x86_*. * Added a temporary method for setting the current thread on x86_64 (a global variable, not SMP safe). This will be changed to be done via the GS segment but I've not implemented that yet.
|
#
90907c35ac51e760221470563fdcd90a9232cc51 |
|
03-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Moved ELF64 relocation functions to x86 arch_elf.cpp.
|
#
da80a0500c33176998887bcae22828d9e997477f |
|
02-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Preparation for merge of x86 and x86_64 kernel sources. Since x86 and x86_64 share a lot of common code, x86_64 kernel sources/headers are going to reside under headers/private/kernel/arch/x86 and src/system/kernel/arch/x86 along with the existing x86 code. This commit changes the build system to handle this. A new variable, TARGET_KERNEL_ARCH, has been added. This is the name of the kernel/boot architecture directory name, set to x86 on both x86 and x86_64. This is now used in all places where TARGET_ARCH was used to get to kernel arch sources/headers (I've changed everything necessary as far as I can tell). Kernel won't build for x86_64 at the moment as the sources have not been merged, loader does.
|
#
f6a3444449c452a63e0e0d91e8480f39bca81aed |
|
24-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Added x86_64 ELF64 relocation functions for the bootloader. All that's left to do now is handle the 64-bit load address properly.
|
#
65ad1ba320d945c9626f471c4fb0972ae49440b5 |
|
26-May-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Made it possible to build the bootloader when targetting x86_64. * x86_64 is using the existing *_ia32 boot platforms. * Special flags are required when compiling the loader to get GCC to compile 32-bit code. This adds a new set of rules for compiling boot code rather than using the kernel rules, which compile using the necessary flags. * Some x86_64 private headers have been stubbed by #include'ing the x86 versions. These will be replaced later.
|
#
bd185b4117e06c1674c4d214abc3917acedc560d |
|
01-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
*.c -> *.cpp git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
379ad6d0372d6b3242b4a56925f5b8512d63500f |
|
09-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved the arch specific stuff in src/system/kernel/lib into arch/... subdirectories. Also moved the x86 kernel arch_string.S there. * Moved memcpy.c from src/system/libroot/posix/string into the arch/generic subdirectory. * Dealt with the consequences of moving things around. Affected are also the boot loader and runtime loader builds. Adjust the m68k and ppc parts, too, but only the x86 build is tested. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27947 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
34b3b26b3b8c46ba46ddde037b10dd173f4936d6 |
|
10-Jan-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged branch haiku/branches/developer/bonefish/optimization revision 23139 into trunk, with roughly the following changes (for details svn log the branch): * The int 99 syscall handler is now fully in assembly. * Added a sysenter/sysexit handler and use it on Pentiums that support it (via commpage). * Got rid of i386_handle_trap(). A bit of functionality was moved into the assembly handler which now uses a jump table to call C functions handling the respective interrupt. * Some optimizations to get user debugger support code out of the interrupt handling path. * Introduced a thread::flags fields which allows to skip handling of rare events (signals, user debug enabling/disabling) on the common interrupt handling path. * Got rid of the explicit iframe stack. The iframes can still be retrieved by iterating through the stack frames. * Made the commpage an architecture independent feature. It's used for the real time data stuff (instead of creating a separate area). * The x86 CPU modules can now provide processor optimized versions for common functions (currently memcpy() only). They are used in the kernel and are provided to the userland via commpage entries. * Introduced build system feature allowing easy use of C structure member offsets in assembly code. Changes after merging: * Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp (caused by refactoring and introduction of "call" debugger command). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7986b7e36d3d60f19acd0f0f52d4ecc16244eaca |
|
26-Oct-2007 |
François Revol <revol@free.fr> |
Make use of the kernel's elf loader code instead of duplicating it. Add placeholder for m68k. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22748 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
957a1b17eb9d13d6dbf164145e82997e16742549 |
|
30-Dec-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced new build system variables {HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the compiler/linker flags specifying the kind of position independence the kernel shall have. For x86 we had and still have -fno-pic, but the PPC kernel has -fPIE (position independent executable) now, as we need to relocate it. * The boot loader relocates the kernel now. Mostly copied the relocation code from the kernel ELF loader. Almost completely rewrote the PPC specific relocation code, though. It's more correct and more complete now (some things are still missing though). * Added boot platform awareness to the kernel. Moved the generic Open Firmware code (openfirmware.c/h) from the boot loader to the kernel. * The kernel PPC serial debug output is sent to the console for the time being. * The PPC boot loader counts the CPUs now and allocates the kernel stacks (made OF device iteration a bit more flexible on the way -- the search can be restricted to subtree). Furthermore we really enter the kernel... (Yay! :-) ... and crash in the first dprintf() (in the atomic_set() called by acquire_spinlock()). kprintf() works, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cc38261bf4876c7fd2492852f6619215685abd53 |
|
30-Oct-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Removed "arch" directory, and "makeflop" & "bootmaker" - they are all no longer in use. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14587 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
338b8dc301721b1f472e8297a898d4eaa2f2ee3a |
|
29-Oct-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged changes from branch build_system_redesign at revision 14573. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
718b5114e0613a5602d5d6296afeaa7f3ee4b576 |
|
13-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
This should fix the build after all the kernel/system renaming. If anything is still broken (and was not before :)), please shout. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5af32e752606778be5dd7379f319fe43cb3f6b8c |
|
13-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Renamed src/kernel to src/system. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96
|