aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2020-01-20 18:17:53 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2020-01-20 18:17:53 +0100
commit7a420a161658106be75746b408db851b30b1e6d2 (patch)
tree00f6b540f88ff1562730695abc3bc8bf5e8aaebe
parent7482e3065d9f3b3db805a7f5cd5b9e8cd2c9dec8 (diff)
downloadrpi-MMU-example-7a420a161658106be75746b408db851b30b1e6d2.tar.gz
rpi-MMU-example-7a420a161658106be75746b408db851b30b1e6d2.zip
make history up-to-date
-rw-r--r--HISTORY.md16
1 files changed, 13 insertions, 3 deletions
diff --git a/HISTORY.md b/HISTORY.md
index c203913..9577ade 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -76,8 +76,18 @@ To known the memory size in runtime, we implemented handling of atags - a struct
Unfortunately, rpi-open-firmware doesn't pass atags to the kernel, so this feature would only be useful in qemu. To otherwise learn the memory size, flattened device tree would need to be parsed - something, that replaced atags in recent years. We did not, however, do it at that time.
-We then wrote code to dynamically allocate, dealocate memory pages and made physical memory section for our only process be obtained that way. This feature would later be needed to implement multiple processes and their management.
+We then wrote code to dynamically allocate, dealocate memory pages and made physical memory section for our only process be obtained dynamically. This feature would later be needed to implement multiple processes and their management.
-<more to come here>
+After doing some minor changes like creating separate stack for supervisor, IRQ and FIQ, rewriting some peripheral addresses definitions or fixing a bug with non-aligned memory accesses in memcpy(), we moved to programming timer interrupts. To our current knowledge there are 3 timers available on the Pi. We first wanted to use the System Timer (one connected the GPU) and wrote some code to configure it and manage the interrupts. It turned out, the interrupts from that timer are not routed to ARM core under rpi-open-firmware. The GPU received the IRQ instead.
+We eventually settled for programming the ARM Timer (AP804-based one) and managed to get an IRQ on ARM core in the last minutes of 2019.
-At that point we rearranged files, as it was becoming pretty unreadable having over 50 files cluttered in one directory so now we could start writing proper docs and modularize project. \ No newline at end of file
+At the same time we starting investigating the uart and how to use it with interrupts.
+
+To make use timer and uart IRQs, we needed some kind of process management. It took bit of thinking and trying different approaches until we wrote a (for now simple, yet extendable) one-process scheduler (it'd be reasonable to rename it to process manager), that integrated well with IRQ and svc handlers. Now, the process could be preempted with a timer interrupt and it's uart io was working in terms of interrupts, without peripheral registers polling.
+
+At that point we rearranged files, as it was becoming pretty unreadable having over 50 files cluttered in one directory. Now we could start writing proper docs and modularize the project. We also refreshed our long-unused TODOs list.
+Another step to make the project cleaner was moving all products of compilation (.o, .elf, .img files) to a separate directory - build/. We came up with a 2-Makefile solution. The main Makefile is placed in build/ and the other one in project's root directory forwards all calls to it. However weird this solution is, thanks to it we avoided having to specify the build directory throughout all the Makefile rules (which, even with the use of variable, would be a bit messy).
+
+We also managed to use patterns for big percent of rules in the main Makefile and make it more readable in general.
+
+We then moved on to writing the proper documentation, which we decided to use markdown for. Finally, we also updated this diary. \ No newline at end of file