Remove clang-13 from the build list, since it's not present in ubuntu
24.04.
If someone thinks this is an issue, please drop an email and we can see
about adding it back.
This change updates lk.code-workspace to specify
* editor.detectIndentation as false, as otherwise that overrides
the desired editor.tabSize setting.
* editor.insertSpaces as true, since spaces are preferred over tabs.
* editor.formatOnSave as false for C and C++ files, as - in the absence
of a .clang-format file - the clangd extension is likely to default to
choices that don't respect the local style.
Though using the named nmemonics is a generally better idea it has the
unforunate property of not working on older compilers. In this case,
these new registers are for the Sstic extension, which is new enough
that even reasonably recent compilers as GCC 12.1 doesn't understand it.
Fixes issue #410
This loads all sections specified by PE header at the correct memory
location, and executes the entry point function. Only the
OutputString function of text output protocol is implemented,
so the only application we can run is hello world.
Test: th
Bug: 294283461
Change-Id: I786bc8b7db9e1c0a6019b8fe4ba5a8c8ab4f2936
These headers define the API boundary between UEFI loader and
UEFI applications.
Test: th
Bug: 294283461
Change-Id: Idf064563bb033a8bf2b994261bcd77c0ed7aa2d8
Thids adds a uefi_load <block dev name> command, which will
parse the PE header and do some basic validation checks.
Bug: 294283461
Test: uefi_load virtio0
Change-Id: I97393652526bda5be1b995e59647e239c64d31d6
Clang linker would remove apps section even though variable
insied it are marked as "used". Per clang doc, we need to add
"retain" attribute to prevent section gc.
Bug: 294283461
Test: th
Change-Id: I5fc0aee885a419f314de811a2cf92b77af230c0c
Sadly this doesn't really work in all situations and only happens to
work with gcc + binutils for 32bit accesses, presumably because gnu as
replaces a literal 0 with wzr.
Clang doesn't understand it at all.
This reverts commit 6c14941dec.
When dumping_mode_regs() on a fault, avoid printing the stack beyond the
current page. This prevents exceeding the stack base and hitting a
guard page in the case the stack use is < 128 bytes.
Bug: 336957655
Test: crash test, observe double fault fixed
Change-Id: If49b5fe5e1651557d19bf18c4026224cfb038101
For older compilers (gcc 7.5.0 in particular) avoid using
-mgeneral-regs-only to override the floating point switches, since it
doesn't seem to understand that switch.
Instead more properly add the floating point switches for a module or
source file compiled with float. More compatible with all compilers.
Was already added to arm64, but arch/arm hadn't picked up this feature
yet. Uncovered a few places here or there that wasn't marking code as
float/no-float, but this fixes a problem where newer compilers are
starting to sneak in vector code because they can.
Issue #406
It's just a test routine that's using floating point, but since nothing
in cmpctmalloc should be used in interrupt context, it should be okay to
mark this code as using float.
Some routines inside the sensor bus code in dartuino need floating
point, so put those in MODULE_FLOAT_SRCS.
Also mark app/accellerometer as needing float.
This was the driver that triggered the whole thing, since GCC 14.1 was
starting to use more fancier addressing modes that was causing QEMU to
bomb out when using KVM.
To work properly with some hypervisors on various architectures (ARM,
ARM64, x86), add global routines to allow access to MMIO registers via
architecturally defined accessors.
Add accessors for ARM, ARM64, and x86-32/64. Have the other arches
default to just using whatever the compiler emits.
Will need to generally move things off the legacy REG*() accessors
since they're really not safe going forward with what compilers emit.
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.
Add a simple test to validate the filesystem APIs that connect the LK
filesystem layer and the virtualIO 9p devices. The test does the same as
`app/tests/v9p_tests.c` to mount the littlekernel codebase folder as the
`/v9p` on the LK filesystem. Then it tries to read the `LICENSE` file
under the codebase and show the first 1024 bytes of the file.
For example:
```
starting internet servers
starting app shell
entering main console loop
] v9fs_tests
0x80017060: 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 67 68 74 20 |/*. * Copyright
0x80017070: 28 63 29 20 32 30 30 38 2d 32 30 31 35 20 54 72 |(c) 2008-2015 Tr
0x80017080: 61 76 69 73 20 47 65 69 73 65 6c 62 72 65 63 68 |avis Geiselbrech
0x80017090: 74 0a 20 2a 0a 20 2a 20 50 65 72 6d 69 73 73 69 |t. *. * Permissi
0x800170a0: 6f 6e 20 69 73 20 68 65 72 65 62 79 20 67 72 61 |on is hereby gra
...
```
Signed-off-by: Cody Wong <codycswong@google.com>