This is a workaround for gdb complaints of the form:
Dwarf Error: Cannot find DIE at 0x5136b referenced from DIE at 0x57eed
Release builds continue to enable LTO.
BUG: 223253186
Change-Id: I137456045e842b2b93b32e0edd348ff916925c97
GitOrigin-RevId: 8ab2ab4fac615eb2a1a259a5a18aa410a4aae5fb
Cmake's list operator operates on the current scope so we were not
setting --release on the cargo cmd line.
Change-Id: I91aa8489869c3190d60c3f2dee374b3d9388ebda
GitOrigin-RevId: 36fa241862c1cb94b736be89d09e8127fefdfc4d
Without read_volatile the compiler may try to optimize reads, which
causes issues with renode simulation.
Change-Id: I8877798420cdecc2dece97d168db753adfe89163
GitOrigin-RevId: c7b3e2ee5500c993b48d9793f575758cb0c3a0ac
Use RX_FIFO_LEVEL additionally to RX_EMPTY. This improves
performance a bit, as RX_EMPTY register and circular buffer
status don't have to be read for every byte.
Change-Id: Ib56b4c6a0dc5689b63941b449f476f3555421abb
GitOrigin-RevId: f7a46154afaf5be28feab173687cebd8b584e8f4
* changes:
capdl: calculate space used by a specification
kata-os-model: fix MCS support
kata-os-model: mark RISC-V non-executable pages with the NX bit
kata-os-model: simplify & shrink page frame fills
kata-os-model: merge vspace root collection into object creation
kata-os-model: rust version of capdl-loader-app internals
GitOrigin-RevId: 44208d281ea021a671c90dc650389029baf9243e
In order to allocate a frame for the ELF, the seL4 object creation
routine scans through addresses, allocating frame by frame. This is very
slow if the ELF MMIO is sized 0x300000 as it requires a smaller seL4 object
(12 bits). Thus it allocates a 0x1000 frame over and over through the
space from 0x3c40_0000 to 0x4600_0000. Paradoxically if we instead
allocate 0x1000_0000 for the ELF, this scans the address range faster as
it needs a seL4 object of 22 bit size, so it scans the address space by
0x040_0000 increments instead.
Change-Id: Ic989e15eb0b2d65e26b141c7975d28cd611b5f79
GitOrigin-RevId: f1b27cc5b452247f8c15f4cb252a7a49fdcf12b9
Control block moved due to Secure Core PLIC moving.
Change-Id: If3dee2559503ad97e2f9917f416dd6abc9765732
GitOrigin-RevId: 16b0878c8b09c9610dfe0b50264b59d4aec5a2ae
Clears the ITCM in one go before loading an ELF file using the
hardware initialization CSRs.
DTCM is not cleared as it's temporarily larger than the CSRs can fit.
Tested manually.
Change-Id: Ie4620508404cebc8724771eb579c873fcc0cf0ee
GitOrigin-RevId: ef5de7003c22a1871ab0f74a23fce34593b73fe1
There is small caveat, as the scratch register had to be
changed (rbx -> r14) as llvm is using it _for something_.
In practice, it should not change anything, though.
sel4test test suites with MCS disabled are passing.
There is bug in mainline with doesn't allow to compile
seL4 kernel with -DLibSel4FunctionAttributes=public so
MCS enabled kernel cannot be tested.
Change-Id: I66271277ceb6d6242ddec1225590f8911f09e946
GitOrigin-RevId: ca33ffff9ed9e52ed101270feb836d33f7a69d00
Add file with basic definitions needed for aarch64 target and
reorganize ARM files a bit.
Change-Id: I50336b2271bcc9ba63bcf48ca65d79ecca401f13
GitOrigin-RevId: 2b0143ebaaafdabb02a3b68da695d65b17e5a303
This fixes compiling and using sel4-sys for arm32 architecture --
tested on sabrelite seL4 taget. There is some #[cfg(...)] ifology,
but that maybe could be partially moved to Cargo.toml using
feature dependency.
To fix TLS there is need to pass some rustc flags, but it seems that
it's impossible to do with build.rs, so currently it's only passed
by CMake when building for sel4test.
Additionally, the order of XML files had to be changed as the
syscalls identifiers were generated in wrong order.
Change-Id: I94d65284989b0e99d7b1843165ec88aa1a994be3
GitOrigin-RevId: b39b93e534a2df2b0b141f1b0dafa2f963827c28
sel4-config is a build helper for keeping a crate's features in sync
with an seL4 kernel. sel4_config::get_sel4_features parses a gen_config.h
artifact from an seL4 build and returns the intersection of the feature
set with the features listed in the caller's Cargo.toml.
Change sel4-sys to use sel4-config to collect features (instead of
depending only on features from Cargo.toml). sel4-sys finds the directory
with kernel artifacts using an SEL4_OUT_DIR environment variable. If
that's not set it falls back to ${ROOTDIR}/out/kata/kernel.
Change workspace crates to use resolver="2" to deal with cargo's
mishandling of dependent features (target build of serde polluted by
std build-dep indirect through cargo_toml).
While here make sel4-sys fall back to ${ROOTDIR}/kata/kernel when SEL4_DIR
is not set in the environment.
Change-Id: I47cf2eab4aa8cd2e502f741738f587c222e94716
GitOrigin-RevId: b661f0b78c0bfe70861965a420d25add8a128cb7
- add a default TARGET argument for RustAddLibrary and remove TARGET
params from the calls--we were already overriding any specified
TARGET and all the specified TARGETS had bitrot'd
- make CARGO_OPTIONS a CACHE variable so it's scope-independent and
set the variable to avoid duplicate options (which cargo rejects)
Change-Id: I37eaa421d99834deeb87242aa9acea7e49bed8e3
GitOrigin-RevId: c667372e2961cd052b358abce9602cc888e46daf
Rust's tls-model must be consistent with what CAmkES uses or the ipc
buffer used by sel4-sys for system calls will not be found.
Change-Id: I79fde1c08013544959ca7d037c806ce2093391f8
GitOrigin-RevId: 1da18875c28107ca2dab127990cd973b4ffafb6f
- use the static_assertions crate instead of the hand-rolled hack
- set edition (worked before only 'cuz there were no dependencies)
Change-Id: Iad7ee4ec16e7c8a9fd5d97963e0b6b465a18c559
GitOrigin-RevId: 599eb6e6c154118fe4967edd32369bc69c9c4faa
- add missing MCS defs needed by kata-os-rootserver
- add arch object types to seL4_ObjectType so it effectively replaces
seL4_ArchObjectType
- add seL4_ObjectTypeCount so kata-os-rootserver can construct
CDL_ObjectType like the C code
- add trait to convert seL4_ObjectType -> seL4_Word for passing
syscall arguments
- fix feature flag check
Change-Id: Ia4f8656c360aee4e792dca9b55c4d55cac7f43a8
GitOrigin-RevId: 101fe3d373f1179ba8d64d7536f360a7d5723d9e
This change adds the kata-ml-core crate. vc_top is generated
programatically, with the script going to be reviewed next if the format here
looks good. The library replaces the VectorCoreDriver c-code.
Change-Id: Id3f083e2498ea29481db49af5e87d47fe8414a71
GitOrigin-RevId: 40d43b0288e995d215997fc8973e18a41a4d5844
Make the structs generated for shared types expose access to the internal
seL4_Words. This is important for capdl parsing that had no way to
convert CDL_CapData_Guard to an seL4_Word (for passing to the kernel).
While here do some minor cleanups of generated code (there are many
opportunities).
Change-Id: I179df84f3e863da4a82675a989c4faeb38f3f669
GitOrigin-RevId: d5ab16a05ab9e85ee45227278c7a776f77821369
- do not pack struct's, the C code does not
- replace the explicit padding in seL4_UntypedDesc (which was wrong) with the rust alignment idiom
- correct initThreadCNodeSizeBits type
- add extended header defs
Change-Id: I4a3fcbe470dd0a18b3c9b1ccf8af9634076e89fb
GitOrigin-RevId: f99eeed563d2d430381f0ad1a5fbe096a13c68f0
Cannot assigned field numbers to the enum members; must let the
compiler do this based on the kernel configuration. Fixes numbering of
architecture-specific labels (e.g. RISCVUnmap).
Change-Id: Ie38fad38fe66c8cc8ddb460ff7c851140b6b9d25
GitOrigin-RevId: 5f7fc5be679aa9bfed39293cd08dfaead0d3d07a
Didn't find an explanation for why all versions of bare-io were yanked
but core2 has the Cursor support and is by the same author.
Change-Id: Id27adaa568a8e1b7b5825c8f81aa489a96675969
GitOrigin-RevId: 7fb8950938c9536a9c795b246d240fca756b3499
Move getting the return code and fault registers into Rust and out from
the C driver. This means extending the DTCM to cover memory previously
covered by `mem`.
Change-Id: I9d1ad8e9823445ad7dd476ef05f128a29567999b
GitOrigin-RevId: 21bc1ee544d39d6b4a2ff963aaae7c145fdd7fa9
Rather than using the Renode ELF loader, this CL moves that capability
into the ML Coordinator. The ELF is memory mapped in eflash instead. We
create MMIO buffers for the MLCoordinator to access. The ELF information
is gathered from the header. The ITCM and DTCM data is copied over to
the vector core.
Next steps are to integrate the load with the execute and to re-map the
return codes and fault registers into Rust code.
Change-Id: I3fc266feb262966318bb451888df146703a03579
GitOrigin-RevId: 8db55b58f86918b8c37d436f1d9f359afdd2a3ea
- delete the symlink called "seL4"
- remove the manually specified SEL4_DIR environment variable from
Cargo.toml and move to .cargo/config.toml
bug: 202428321
Change-Id: I4f54b730e627a8445560e0e5e7bc056ab7e19062
GitOrigin-RevId: 17743c7034a37ac2dc0d036f405096213888f584
If rx_buf filled during the handling of an rx_watermark with the FIFO
nonempty, the rx_watermark would be acknowledged, and there would be no
subsequent interrupt to post to the semaphore blocking the next receive.
(Non-rate-limited ZMODEM uploads easily caused this condition.)
This change ensures each handling of an rx_watermark interrupt
completely empties the FIFO. It is likely stopgap until the simulated
UART can provide an rx_timeout interrupt.
Change-Id: If828bac470ee0e667e0e011b11a7a9aee1d47210
GitOrigin-RevId: 7123bcb0fcca9e39c35f4b67088b581cdf2fb50d