It seems that whatever bug or config mistake gave us .got entries back then has
since been resolved. Also add a sanity check to recognize should this happen
again.
The LLVM assembler apparently causes the .equ directive to create symbols
instead of just a local and temporary variable.
Work around this by using const operands with global_asm!.
* README.ES.md
I added a spanish translation for the README.md file, and modified the README.md to add my github profile and to add the link to README.ES.md file
* Slightly reorganize translation overview
* README.ES.md These changes are in response to PR comments
* Update README.ES.md
* README.ES.md -> 00_before_we_start
* Updating README.ES.md
I corrected a few mistakes in both README.ES.md files.
* README.ES.md for 00 These changes are in response to PR comments
* README.ES.md -> 01_wait_forever
* README.ES.md -> 02_runtime_init
* README.md for 01 & 02 with corrections/improvements
* Update 01_wait_forever/README.ES.md
* Update 02_runtime_init/README.ES.md
Co-authored-by: zanez <zanez@protonmail.com>
Co-authored-by: Andre Richter <andre-richter@users.noreply.github.com>
Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
This patch refactors big chunks of the memory subsystem code.
Most of all, it does away with the the design being based around the raw pointer
type "*const Page". While raw pointers to an actual page seemed like a
compelling idea, in practice it turned out difficult. Rust feels a bit
inconsistent with respect to raw pointers. While it is safe to create them out
of nowhere (only dereferencing is unsafe), it gets weird when multi-threading
comes into picture.
For example, wrapping them into synchronization primitives caused issues because
they don't implement Send. For this reason, we switch to the PageAddress type
which is based on usize, which makes things a lot easier.
Other changes/benefits include:
- Gets rid of unsafe code in the removed PageSlice type.
- Decouple the translation table code and MMIO VA allocation.
- For the translation table tool, make better use of what the ELF format already
provides with respect to memory segmentation and translation. For example, the
tool now queries the ELF file for VA->PA translations and other segment
attributes. This has also the added benefit of reduced BSP code and more
generic code in the tool.
- Packs rbelftools in the Docker image now (used by translation table tool).
- In tutorials 14/15/16, rearrange the PA and VA layout.
It is too risky to rely on the compiler to not insert any operations using the
stack.
Having a stack-setting call in Rust using the cortex-a crate as the first action
in a Rust-only _start() function does not work if you're subsequently using the
stack, because the compiler often inserts the operations to make room on the
stack to prepare a function call BEFORE the call to set the stack, which crashes
the boot process.
Hence, keep on using a small piece of assembly boot code throughout.
- Don't wildcard-import from arch modules. Make it explicit.
- Put translation table code into its own module.
- Put boot code in boot.rs instead of cpu.rs
- Other minor changes, most memory subsystem.
The GCC versions of `objdump` and `nm` seem to have better out-of-the-box
support (for AArch64). Demangling works better, and instructions in objdump are
presented as 4 bytes instead of 4 * 1 bytes, which helps a lot.
Hence, switch to the GCC versions for now until LLVM has caught up.