Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial port of little-kernel to vc4 #259

Draft
wants to merge 101 commits into
base: master
Choose a base branch
from

Conversation

cleverca22
Copy link
Contributor

some parts are copy/pasted from https://github.com/cleverca22/rpi-open-firmware
which itself is a fork of https://github.com/christinaa/rpi-open-firmware

what works:
network booting lk.elf on an rpi4 (just rename to start4.elf and host over tftp)
the full console with line editing and history
serial over pl011 (but no serial init, relies on previous bootloader stage)
reboot command
irq handling for timer compare and uart
one-shot timer
reporting cpu exceptions such as divide by zero

some parts are copy/pasted from https://github.com/cleverca22/rpi-open-firmware
which itself is a fork of https://github.com/christinaa/rpi-open-firmware

what works:
network booting lk.elf on an rpi4 (just rename to start4.elf and host over tftp)
the full console with line editing and history
serial over pl011 (but no serial init, relies on previous bootloader stage)
reboot command
irq handling for timer compare and uart
one-shot timer
reporting cpu exceptions such as divide by zero
@cleverca22 cleverca22 force-pushed the vc4 branch 5 times, most recently from 72e853b to cd49878 Compare January 14, 2020 19:14
cleverca22 and others added 14 commits January 29, 2020 12:57
add sdhost code
add gpio pullup test
fix peripheral address
implement batch gpio pull config changes
fix memory information to be based on boot stage, not model
add rpi4 recovery.bin support
This is a clean rewrite of the OTP routines using new findings.
Based on previous research, this commit implements a write command.

       Use with care!
What is done cannot be undone.
This bit does not tell whether programming was OK, but whether
programming is enabled. Renaming should prevent confusion when
BCM283x support is added.
The OTP chip in BCM283x cannot program a full word in a single
command. Instead, individual bits must be programmed one by one.

There is also a subtle difference in program enable. The magic
sequence must be written to OTP_BITSEL, not OTP_DATA.

Tested on a RPi3 B (no plus).
Get rid of hardcoded values in pll_control.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants