commit | 3c71b665f6c30317bdc2e32571eaf45fbfc036b8 | [log] [tgz] |
---|---|---|
author | Travis Geiselbrecht <geist@foobox.com> | Fri May 10 07:36:29 2024 +0000 |
committer | Travis Geiselbrecht <geist@foobox.com> | Fri May 10 07:36:29 2024 +0000 |
tree | 9dcffbca409f908090c9c8369b362e9f2c49cd70 | |
parent | d54735cf5d48c1f0d2c31feb084e7bd7a9fe230a [diff] |
[platform][arm-qemu] fix issue with uart driver on KVM The accessing method the compiler is emitting for the *REG32 macros on arm32 and arm64 is occasionally generating load/stores with writeback. Though this has worked before, it seems to be rejected with whatever combination of qemu + linux + hardware on this Raspberry Pi 5. Convert the register accessors to inline asm that uses basic load/store instructions, which is really the only correct thing to do now and in the long run. Add a TODO to move this to reg.h and start to revamp how registers are accessed across LK, but for now keep it just here to fix things.
The LK kernel is an SMP-aware kernel designed for small systems ported to a variety of platforms and cpu architectures.
See https://github.com/littlekernel/lk for the latest version.
This will get you a interactive prompt into LK which is running in qemu arm machine ‘virt’ emulation. type ‘help’ for commands.
Note: for ubuntu x86-64: sudo apt-get install gcc-arm-none-eabi or fetch a prebuilt toolchain from https://newos.org/toolchains/x86_64-elf-13.2.0-Linux-x86_64.tar.xz