Changeset a4bd537 in mainline for HelenOS.config


Ignore:
Timestamp:
2019-04-06T13:39:58Z (5 years ago)
Author:
Petr Pavlu <setup@…>
Children:
f7842ef
Parents:
0d073b8
git-author:
Petr Pavlu <setup@…> (2019-03-31 14:09:57)
git-committer:
Petr Pavlu <setup@…> (2019-04-06 13:39:58)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r0d073b8 ra4bd537  
    3434@ "amd64" AMD64/EM64T 64-bit (PC)
    3535@ "arm32" ARM 32-bit
     36@ "arm64" ARM 64-bit (AArch64)
    3637@ "ia32" IA-32 32-bit (PC)
    3738@ "ia64" IA-64 64-bit
     
    6566! [PLATFORM=arm32] MACHINE (choice)
    6667
     68% Machine type
     69@ "virt" QEMU virt
     70! [PLATFORM=arm64] MACHINE (choice)
     71
    6772% CPU type
    6873@ "pentium4" Pentium 4
     
    160165
    161166% Kernel architecture
     167@ "arm64"
     168! [PLATFORM=arm64] KARCH (choice)
     169
     170% Kernel architecture
    162171@ "ia32"
    163172! [PLATFORM=ia32] KARCH (choice)
     
    207216
    208217% User space architecture
     218@ "arm64"
     219! [PLATFORM=arm64] UARCH (choice)
     220
     221% User space architecture
    209222@ "ia32"
    210223! [PLATFORM=ia32|PLATFORM=ia32xen] UARCH (choice)
     
    252265@ "arm32"
    253266! [PLATFORM=arm32] BARCH (choice)
     267
     268% Boot architecture
     269@ "arm64"
     270! [PLATFORM=arm64] BARCH (choice)
    254271
    255272% Boot architecture
     
    334351
    335352% IOMAP dummy support
    336 ! [PLATFORM=abs32le|PLATFORM=arm32|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=riscv64|PLATFORM=sparc64] CONFIG_IOMAP_DUMMY (y)
     353! [PLATFORM=abs32le|PLATFORM=arm32|PLATFORM=arm64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=riscv64|PLATFORM=sparc64] CONFIG_IOMAP_DUMMY (y)
    337354
    338355% ACPI support
     
    340357
    341358% Hierarchical page tables support
    342 ! [PLATFORM=abs32le|PLATFORM=ia32|PLATFORM=amd64|PLATFORM=arm32|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=riscv64] CONFIG_PAGE_PT (y)
     359! [PLATFORM=abs32le|PLATFORM=ia32|PLATFORM=amd64|PLATFORM=arm32|PLATFORM=arm64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=riscv64] CONFIG_PAGE_PT (y)
    343360
    344361% Page hash table support
     
    349366
    350367% ASID support
    351 ! [PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_ASID (y)
     368! [PLATFORM=arm64|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_ASID (y)
    352369
    353370% ASID FIFO support
    354 ! [PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_ASID_FIFO (y)
     371! [PLATFORM=arm64|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_ASID_FIFO (y)
    355372
    356373% OpenFirmware tree support
     
    364381
    365382% FPU support
    366 ! [PLATFORM=ia32|PLATFORM=amd64|PLATFORM=ia64|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_FPU (y)
     383! [PLATFORM=ia32|PLATFORM=amd64|PLATFORM=arm64|PLATFORM=ia64|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_FPU (y)
    367384
    368385## ARMv7 made FPU hardware compulsory
     
    377394
    378395% Support for SMP
    379 ! [(PLATFORM=ia32&PROCESSOR!=athlon_xp)|PLATFORM=amd64|PLATFORM=sparc64|PLATFORM=ia64|(PLATFORM=mips32&MACHINE=msim)|PLATFORM=abs32le] CONFIG_SMP (y/n)
     396! [(PLATFORM=ia32&PROCESSOR!=athlon_xp)|PLATFORM=amd64|PLATFORM=arm64|PLATFORM=sparc64|PLATFORM=ia64|(PLATFORM=mips32&MACHINE=msim)|PLATFORM=abs32le] CONFIG_SMP (y/n)
    380397
    381398% Debug build
     
    442459% Input device class
    443460@ "generic" Keyboard or serial line
    444 ! [PLATFORM=arm32&MACHINE=integratorcp] CONFIG_HID_IN (choice)
     461! [(PLATFORM=arm32&MACHINE=integratorcp)|PLATFORM=arm64] CONFIG_HID_IN (choice)
    445462
    446463% Input device class
     
    458475% Output device class
    459476@ "generic" Monitor or serial line
    460 ! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm|MACHINE=beaglebone|MACHINE=raspberrypi)] CONFIG_HID_OUT (choice)
     477! [(PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm|MACHINE=beaglebone|MACHINE=raspberrypi))|PLATFORM=arm64] CONFIG_HID_OUT (choice)
    461478
    462479% Output device class
     
    493510
    494511% Support for PL011 UART
    495 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&(MACHINE=integratorcp|MACHINE=raspberrypi)] CONFIG_PL011_UART (y/n)
     512! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&(PLATFORM=arm32&(MACHINE=integratorcp|MACHINE=raspberrypi))] CONFIG_PL011_UART (y/n)
     513
     514% Support for PL011 UART
     515! [CONFIG_HID_OUT=generic|(PLATFORM=arm64&MACHINE=virt)] CONFIG_PL011_UART (y)
    496516
    497517% Support for NS16550 controller (kernel console)
     
    522542! [PLATFORM=arm32&MACHINE=raspberrypi] CONFIG_BCM2835_MAILBOX (y/n)
    523543
     544% Support for ARM GICv2
     545! [PLATFORM=arm64&MACHINE=virt] CONFIG_GICV2 (y)
     546
    524547% Support for i8042 controller
    525548! [CONFIG_PC_KBD=y] CONFIG_I8042 (y)
     
    541564
    542565% Serial line input module
    543 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_PL011_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_OMAP_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_OMAP_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)|(PLATFORM=arm32&MACHINE=raspberrypi&CONFIG_PL011_UART=y)|(PLATFORM=ia32&CONFIG_NS16550=y)|(PLATFORM=amd64&CONFIG_NS16550=y)|(PLATFORM=mips32&CONFIG_NS16550=y)] CONFIG_SRLN (y)
     566! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_PL011_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_OMAP_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_OMAP_UART=y)|(PLATFORM=arm64&CONFIG_PL011_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)|(PLATFORM=arm32&MACHINE=raspberrypi&CONFIG_PL011_UART=y)|(PLATFORM=ia32&CONFIG_NS16550=y)|(PLATFORM=amd64&CONFIG_NS16550=y)|(PLATFORM=mips32&CONFIG_NS16550=y)] CONFIG_SRLN (y)
    544567
    545568% EGA support
     
    588611% Dynamic linking support
    589612! [PLATFORM=amd64|PLATFORM=arm32|PLATFORM=ia32|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_RTLD (y/n)
    590 ! [PLATFORM=abs32le|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=riscv64] CONFIG_RTLD (n)
     613! [PLATFORM=abs32le|PLATFORM=arm64|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=riscv64] CONFIG_RTLD (n)
    591614
    592615% Build shared libraries
     
    651674! [PLATFORM=ia32|PLATFORM=amd64] GRUB_ARCH (choice)
    652675
     676% GRUB boot loader architecture
     677@ "efi" GRUB for UEFI
     678! [PLATFORM=arm64&MACHINE=virt] GRUB_ARCH (choice)
     679
    653680% uImage OS type
    654681@ "2" NetBSD stage 2 boot loader
Note: See TracChangeset for help on using the changeset viewer.