lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
Last change
on this file since 2fff3c4 was 84176f3, checked in by Jakub Jermář <jakub@…>, 6 years ago |
arm64: Add support for the architecture
This changeset adds basic support to run HelenOS on AArch64, targeting
the QEMU virt platform.
Boot:
- Boot relies on the EDK II firmware, GRUB2 for EFI and the HelenOS
bootloader (UEFI application). EDK II loads GRUB2 from a CD, GRUB2
loads the HelenOS bootloader (via UEFI) which loads OS components.
- UEFI applications use the PE/COFF format and must be relocatable. The
first problem is solved by manually having the PE/COFF headers and
tables written in assembler. The relocatable requirement is addressed
by compiling the code with -fpic and having the bootloader relocate
itself at its startup.
Kernel:
- Kernel code for AArch64 consists mostly of stubbing out various
architecture-specific hooks: virtual memory management, interrupt and
exception handling, context switching (including FPU lazy switching),
support for virtual timer, atomic sequences and barriers, cache and
TLB maintenance, thread and process initialization.
- The patch adds a kernel driver for GICv2 (interrupt controller).
- The PL011 kernel driver is extended to allow userspace to take
ownership of the console.
- The current code is not able to dynamically obtain information about
available devices on the underlying machine. The port instead
implements a machine-func interface similar to the one implemented by
arm32. It defines a machine for the QEMU AArch64 virt platform. The
configuration (device addresses and IRQ numbers) is then baked into
the machine definition.
User space:
- Uspace code for AArch64 similarly mostly implements
architecture-specific hooks: context saving/restoring, syscall
support, TLS support.
The patchset allows to boot the system but user interaction with the OS
is not yet possible.
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /*
|
---|
2 | * ARM64 linker script
|
---|
3 | *
|
---|
4 | * kernel text
|
---|
5 | * kernel data
|
---|
6 | *
|
---|
7 | */
|
---|
8 |
|
---|
9 | #include <arch/boot/boot.h>
|
---|
10 | #include <arch/mm/km.h>
|
---|
11 |
|
---|
12 | #define LOAD_ADDRESS_V (KM_ARM64_IDENTITY_START + BOOT_OFFSET)
|
---|
13 | #define LOAD_ADDRESS_P BOOT_OFFSET
|
---|
14 |
|
---|
15 | OUTPUT_ARCH(aarch64)
|
---|
16 | ENTRY(kernel_image_start)
|
---|
17 |
|
---|
18 | SECTIONS {
|
---|
19 | kernel_load_address = LOAD_ADDRESS_V;
|
---|
20 |
|
---|
21 | .image (LOAD_ADDRESS_V + SIZEOF_HEADERS) : AT (LOAD_ADDRESS_P + SIZEOF_HEADERS) {
|
---|
22 | . = ALIGN(16);
|
---|
23 | ktext_start = .;
|
---|
24 | *(K_TEXT_START)
|
---|
25 | *(.text .text.*);
|
---|
26 | ktext_end = .;
|
---|
27 |
|
---|
28 | kdata_start = .;
|
---|
29 | *(K_DATA_START)
|
---|
30 | *(.data); /* initialized data */
|
---|
31 | *(.bss); /* uninitialized static variables */
|
---|
32 | *(COMMON); /* global variables */
|
---|
33 |
|
---|
34 | *(.rodata*);
|
---|
35 | . = ALIGN(8);
|
---|
36 | symbol_table = .;
|
---|
37 | *(symtab.*);
|
---|
38 |
|
---|
39 | kdata_end = .;
|
---|
40 | }
|
---|
41 |
|
---|
42 | #ifdef CONFIG_LINE_DEBUG
|
---|
43 | .comment 0 : { *(.comment); }
|
---|
44 | .debug_abbrev 0 : { *(.debug_abbrev); }
|
---|
45 | .debug_aranges 0 : { *(.debug_aranges); }
|
---|
46 | .debug_frame 0 : { *(.debug_frame); }
|
---|
47 | .debug_info 0 : { *(.debug_info); }
|
---|
48 | .debug_line 0 : { *(.debug_line); }
|
---|
49 | .debug_loc 0 : { *(.debug_loc); }
|
---|
50 | .debug_macinfo 0 : { *(.debug_macinfo); }
|
---|
51 | .debug_pubnames 0 : { *(.debug_pubnames); }
|
---|
52 | .debug_pubtypes 0 : { *(.debug_pubtypes); }
|
---|
53 | .debug_ranges 0 : { *(.debug_ranges); }
|
---|
54 | .debug_str 0 : { *(.debug_str); }
|
---|
55 | #endif
|
---|
56 |
|
---|
57 | /DISCARD/ : {
|
---|
58 | *(*);
|
---|
59 | }
|
---|
60 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.