source: mainline/kernel/genarch/Makefile.inc@ 84176f3

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 84176f3 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: 4.7 KB
Line 
1# Copyright (c) 2005 Martin Decky
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7#
8# - Redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer.
10# - Redistributions in binary form must reproduce the above copyright
11# notice, this list of conditions and the following disclaimer in the
12# documentation and/or other materials provided with the distribution.
13# - The name of the author may not be used to endorse or promote products
14# derived from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27
28## Accepted configuration directives
29#
30
31ifeq ($(CONFIG_ACPI),y)
32GENARCH_SOURCES += \
33 genarch/src/acpi/acpi.c \
34 genarch/src/acpi/madt.c
35endif
36
37ifeq ($(CONFIG_PAGE_PT),y)
38GENARCH_SOURCES += \
39 genarch/src/mm/page_pt.c \
40 genarch/src/mm/as_pt.c
41endif
42
43ifeq ($(CONFIG_PAGE_HT),y)
44GENARCH_SOURCES += \
45 genarch/src/mm/page_ht.c \
46 genarch/src/mm/as_ht.c
47endif
48
49ifeq ($(CONFIG_ASID),y)
50GENARCH_SOURCES += \
51 genarch/src/mm/asid.c
52endif
53
54ifeq ($(CONFIG_ASID_FIFO),y)
55GENARCH_SOURCES += \
56 genarch/src/mm/asid_fifo.c
57endif
58
59ifeq ($(CONFIG_SOFTINT),y)
60GENARCH_SOURCES += \
61 genarch/src/softint/division.c \
62 genarch/src/softint/multiplication.c
63endif
64
65ifeq ($(CONFIG_FB),y)
66GENARCH_SOURCES += \
67 genarch/src/fb/font-8x16.c \
68 genarch/src/fb/fb.c \
69 genarch/src/fb/bfb.c
70endif
71
72ifeq ($(CONFIG_DSRLNIN),y)
73GENARCH_SOURCES += \
74 genarch/src/drivers/dsrln/dsrlnin.c
75endif
76
77ifeq ($(CONFIG_DSRLNOUT),y)
78GENARCH_SOURCES += \
79 genarch/src/drivers/dsrln/dsrlnout.c
80endif
81
82ifeq ($(CONFIG_I8042),y)
83GENARCH_SOURCES += \
84 genarch/src/drivers/i8042/i8042.c
85endif
86
87ifeq ($(CONFIG_I8259),y)
88GENARCH_SOURCES += \
89 genarch/src/drivers/i8259/i8259.c
90endif
91
92ifeq ($(CONFIG_NS16550),y)
93GENARCH_SOURCES += \
94 genarch/src/drivers/ns16550/ns16550.c
95endif
96
97ifeq ($(CONFIG_PL011_UART),y)
98GENARCH_SOURCES += \
99 genarch/src/drivers/pl011/pl011.c
100endif
101
102ifeq ($(CONFIG_S3C24XX_IRQC),y)
103GENARCH_SOURCES += \
104 genarch/src/drivers/s3c24xx/irqc.c
105endif
106
107ifeq ($(CONFIG_S3C24XX_UART),y)
108GENARCH_SOURCES += \
109 genarch/src/drivers/s3c24xx/uart.c
110endif
111
112ifeq ($(CONFIG_OMAP_UART),y)
113GENARCH_SOURCES += \
114 genarch/src/drivers/omap/uart.c
115endif
116
117ifeq ($(CONFIG_AM335X_TIMERS),y)
118GENARCH_SOURCES += \
119 genarch/src/drivers/am335x/timer.c
120endif
121
122ifeq ($(CONFIG_BCM2835_MAILBOX),y)
123GENARCH_SOURCES += \
124 genarch/src/drivers/bcm2835/irc.c \
125 genarch/src/drivers/bcm2835/mbox.c \
126 genarch/src/drivers/bcm2835/timer.c
127endif
128
129ifeq ($(CONFIG_GICV2), y)
130GENARCH_SOURCES += \
131 genarch/src/drivers/gicv2/gicv2.c
132endif
133
134ifeq ($(CONFIG_VIA_CUDA),y)
135GENARCH_SOURCES += \
136 genarch/src/drivers/via-cuda/cuda.c
137endif
138
139ifeq ($(CONFIG_PC_KBD),y)
140GENARCH_SOURCES += \
141 genarch/src/kbrd/kbrd.c \
142 genarch/src/kbrd/scanc_pc.c
143endif
144
145ifeq ($(CONFIG_AT_KBD),y)
146GENARCH_SOURCES += \
147 genarch/src/kbrd/kbrd_at.c \
148 genarch/src/kbrd/scanc_at.c
149endif
150
151ifeq ($(CONFIG_SUN_KBD),y)
152GENARCH_SOURCES += \
153 genarch/src/kbrd/kbrd.c \
154 genarch/src/kbrd/scanc_sun.c
155endif
156
157ifeq ($(CONFIG_MAC_KBD),y)
158GENARCH_SOURCES += \
159 genarch/src/kbrd/kbrd.c \
160 genarch/src/kbrd/scanc_mac.c
161endif
162
163ifeq ($(CONFIG_SRLN),y)
164GENARCH_SOURCES += \
165 genarch/src/srln/srln.c
166endif
167
168ifeq ($(CONFIG_OFW_TREE),y)
169GENARCH_SOURCES += \
170 genarch/src/ofw/ofw_tree.c
171endif
172
173ifeq ($(CONFIG_OFW_PCI),y)
174GENARCH_SOURCES += \
175 genarch/src/ofw/ebus.c \
176 genarch/src/ofw/pci.c \
177 genarch/src/ofw/sbus.c \
178 genarch/src/ofw/upa.c
179endif
180
181ifeq ($(CONFIG_MULTIBOOT), y)
182GENARCH_SOURCES += \
183 genarch/src/multiboot/common.c \
184 genarch/src/multiboot/multiboot.c \
185 genarch/src/multiboot/multiboot2.c
186
187GENARCH_AUTOCHECK_HEADERS += \
188 genarch/include/genarch/multiboot/multiboot_memmap_struct.h \
189 genarch/include/genarch/multiboot/multiboot_info_struct.h
190endif
191
192ifeq ($(CONFIG_EGA), y)
193GENARCH_SOURCES += \
194 genarch/src/drivers/ega/ega.c
195endif
196
197ifeq ($(CONFIG_IOMAP_BITMAP), y)
198GENARCH_SOURCES += \
199 genarch/src/ddi/ddi-bitmap.c
200endif
201
202ifeq ($(CONFIG_IOMAP_DUMMY), y)
203GENARCH_SOURCES += \
204 genarch/src/ddi/ddi-dummy.c
205endif
206
Note: See TracBrowser for help on using the repository browser.