Commit Graph

193 Commits

Author SHA1 Message Date
Berkus Decker 2a4cfd4184 Merge pull-request #20 from metta-systems:feature/init-mmu to develop
Feature/init mmu
Map kernel memory from a statically generated memory map.

DTB support to be included in future versions.

[close #20]
2020-10-15 23:03:33 +03:00
Berkus Decker 458aba6652 Gate QEMU functions behind testing features
At least for now, it's not used anywhere else.
2020-10-15 22:49:31 +03:00
Berkus Decker 408857fcb6 Add documentation 2020-10-15 22:49:31 +03:00
Berkus Decker 4898ad3139 Move global options to main.rs 2020-10-15 22:36:52 +03:00
Berkus Decker 2f663f61de Move stack start constant to linker script 2020-10-15 22:36:52 +03:00
Berkus Decker ded53c16a7 Add MMU init code
Switch to cortex-a git version temporarily
(waiting for PR to be merged) with support
for all necessary registers.
2020-10-15 22:36:52 +03:00
Berkus Decker f85020ef4e Merge pull-request #19 from metta-systems:fix/miscompiled to develop
Fix miscompiled code

[close #19]
2020-10-13 22:38:03 +03:00
Berkus Decker 2ef8999daf Remove not necessary inline attributes
Now with the bug fixed we can optimise this code for size.
2020-10-13 22:16:19 +03:00
Berkus Decker 44ef31ff77 Add missed clobbered registers in asm block
Fixes mis-compilation described in rust-lang/rust#68812.
2020-10-13 22:14:32 +03:00
Berkus Decker 589696a500 Merge pull-request #17 from metta-systems:feature/hopper-disasm to develop
Add hopper make target
hopper is useful for inspecting kernel disassembly.

[close #17]
2020-10-08 02:38:56 +03:00
Berkus Decker 7e4bf75495 Add README section about disasm
Change section headings for better visibility.
2020-10-07 23:11:29 +03:00
Berkus Decker 44037398d4 Add hopper make target
hopper is useful for inspecting kernel disassembly.
2020-10-07 21:23:23 +03:00
Berkus Decker dd2938fa2f Merge pull-request #16 from metta-systems:feature/add-fossa-badge to develop
Add license scan badge
Replaces #3

[close #16]
2020-10-07 14:54:57 +03:00
Berkus Decker bd428133d9 Add license scan badge 2020-10-07 14:53:41 +03:00
Berkus Decker 684ed4e842 Merge pull-request #5 from metta-systems:berkus/gitpod-setup to develop
Add gitpod config
this commit adds support for Gitpod.io, a free automated
dev environment that makes contributing and generally working on GitHub
projects much easier. It allows anyone to start a ready-to-code dev
environment for any branch, issue and pull request with a single click.

[close #5]
2020-10-07 14:39:07 +03:00
Berkus Decker 4f616302d5 Add gitpod config
this commit adds support for Gitpod.io, a free automated
dev environment that makes contributing and generally working on GitHub
projects much easier. It allows anyone to start a ready-to-code dev
environment for any branch, issue and pull request with a single click.
2020-10-07 13:47:26 +03:00
Berkus Decker 91a14f2792 Merge pull-request #15 from metta-systems:fix/bump-dependencies to develop
Bump dependencies
Fixes #11
Fixes #12

[close #15]
2020-10-07 13:38:39 +03:00
Berkus Decker d453d60e19 Bump qemu-exit to version 1.0 2020-10-07 13:00:30 +03:00
Berkus Decker 041c4add0d Bump r0 to version 1.0 2020-10-07 13:00:28 +03:00
Berkus Decker c284b4bd48 Merge pull-request #10 from metta-systems:feature/add-testing-framework to develop
Add testing framework
- Implement enough to be able to run tests in qemu and report the results back.

[close #10]
2020-10-06 19:59:20 +03:00
Berkus Decker 4cc5305dc8 Prepare scripts for windows CI runner 2020-10-06 19:27:50 +03:00
Berkus Decker 50b0613f5c Use rust-objcopy tool
Since cargo-binutils 0.3.1 the `cargo objcopy` causes a build before
copying files, this doesn't work for test-runner.
We only need the actual objcopy tool, not the cargo infra here.
2020-10-06 19:27:50 +03:00
Berkus Decker af1cc83530 Add testing framework
Based on os.phil-opp.com ideas it includes running test framework in
qemu semihosting mode so that tests can indicate pass or fail to calling
process.

GitHub Actions are configured to run these tests and validate acceptance.

Add test-runner target to perform tests in qemu.

Add -nographic for qemu running tests.

Drop serial for qemu tests as well.
2020-10-06 19:27:50 +03:00
Berkus Decker 33722e895f Explain rust version requirements in README 2020-10-06 19:27:49 +03:00
Berkus Decker 9fd9612b77 Fix entry point to always start a binary
Keep vectors table.
Do not keep boot data if not referenced.
2020-09-21 04:01:21 +03:00
Berkus Decker 34115db6f6 Bump minimum required cargo-make version
We use some features that work ok only since 0.32
2020-09-21 04:01:19 +03:00
Berkus Decker 310e59f9b3 Comment out unnecessary panic=abort for tests 2020-09-21 04:01:18 +03:00
Berkus Decker cd16b733e9 Add non-allocating formatted write implementation 2020-09-21 04:01:18 +03:00
Berkus Decker f485629fb6 Add boot code for RPi and QEMU 2020-09-21 04:01:17 +03:00
Berkus Decker be3131f666 Improve cargo makefile 2020-09-21 04:01:16 +03:00
Berkus Decker 8d4c96e437 Merge pull-request #9 from metta-systems:feature/github-workflows to develop
Add GH Actions build workflow
Run builds on CI.

[close #9]
2020-08-10 00:45:19 +03:00
Berkus Decker 668296b8e0 Fix clippy warning 2020-08-10 00:34:49 +03:00
Berkus Decker a4a3289712 Add GH Actions build workflow 2020-08-10 00:34:49 +03:00
Berkus Decker ecec3c96e1 Remove global build-std flags
* Use those flags only in specific commands,
  otherwise building some tools from this directory
  will also fail (cargo picks these flags as global).
2020-08-10 00:34:31 +03:00
Berkus Decker 02107bf297 Merge pull-request #8 from metta-systems:feature/bootable-code to develop
Boot code using cortex-a crate
Init Stack Pointer and start only boot CPU.

[close #8]
2020-08-09 22:02:54 +03:00
Berkus Decker 57e4b81e1c Implement power-efficient sleep after boot-up
* arch-based crates, inspired by Redox
* Do not burn cpu uselessly.
* Start using cortex-a registers.
* Important: initialise stack pointer!
2020-08-09 22:00:36 +03:00
Berkus Decker 8bacc7cfb7 Update build/boot instructions 2020-08-09 22:00:36 +03:00
Berkus Decker 7ad3329978 Merge pull-request #7 from metta-systems:feature/start-code to develop
Add first code
Initial structure and build framework.

[close #7]
2020-08-09 20:13:24 +03:00
Berkus Decker 57fc6e5aa5 Add QEMU configuration 2020-08-09 19:40:57 +03:00
Berkus Decker cb814b353b Add Raspberry Pi target configuration
* Use rlibc for memset/memcpy
* Create linker script for raspberry pi 3
* Add aarch64 target file inspired by Robigalia
* Force bitcode embedding for LTO
2020-08-09 19:35:09 +03:00
Berkus Decker 1e2878dca6 Describe branching strategy 2020-08-09 19:33:34 +03:00
Berkus Decker a57833d2b1 Add basic structure
* Add default License
* Keep a changelog
* Add Code of Conduct
* Build tests as optimized for size ('s')
  * Otherwise boot code goes bonkers in qemu
2020-08-09 19:33:34 +03:00
Berkus Decker 06cce8aa37 Start marker 2018-12-21 19:27:36 +02:00