Changeset 84176f3 in mainline for abi/include


Ignore:
Timestamp:
2019-04-10T15:04:17Z (7 years ago)
Author:
Jakub Jermář <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8df0306
Parents:
b58728f
git-author:
Petr Pavlu <setup@…> (2019-03-31 14:09:57)
git-committer:
Jakub Jermář <jakub@…> (2019-04-10 15:04:17)
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
  • abi/include/abi/elf.h

    rb58728f r84176f3  
    7777        EM_IA_64       = 50,   /* IA-64 */
    7878        EM_X86_64      = 62,   /* AMD64/EMT64 */
     79        EM_AARCH64     = 183,  /* ARM 64-bit architecture */
    7980        EM_RISCV       = 243,  /* RISC-V */
    8081};
     
    515516typedef struct elf32_rel elf_rel_t;
    516517typedef struct elf32_rela elf_rela_t;
     518#define ELF_R_TYPE(i)  ELF32_R_TYPE(i)
    517519#endif
    518520
     
    526528typedef struct elf64_rel elf_rel_t;
    527529typedef struct elf64_rela elf_rela_t;
     530#define ELF_R_TYPE(i)  ELF64_R_TYPE(i)
    528531#endif
    529532
Note: See TracChangeset for help on using the changeset viewer.