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

merge arm9linuxfw into this repo #18

Open
nickdesaulniers opened this issue Apr 15, 2021 · 4 comments
Open

merge arm9linuxfw into this repo #18

nickdesaulniers opened this issue Apr 15, 2021 · 4 comments

Comments

@nickdesaulniers
Copy link
Member

I don't think there's a need to have two separate code bases for the arm9 code? I guess that would tightly couple the fw to our bootloader, but unless we're planning additional bootloader support, or somehow moving the fw into the Linux kernel I don't see the point of keeping them separate. cc @Wolfvak

@Wolfvak
Copy link
Member

Wolfvak commented Apr 15, 2021

We can definitely merge the code tree and use the common routines but not merge them into a single source code, it's too hardcoded to be its own thing, the easiest way to go would be to generate the TCM-specific binary and relocate that from the bootloader

@Wolfvak
Copy link
Member

Wolfvak commented May 2, 2021

Recently I've had the idea of just ditching arm9linuxfw as a separate project and instead have a super simple "command processor" that just reads and writes raw data, that way the ARM11 can easily access the ARM9 specific peripherals and interact with them. The NDMA controller would also be accessible, helping us avoid unnecessary and expensive read/write ops.

Instead of just doing a raw iowrite* or ioread* from linux you could do a regmap_write or regmap_read and it'd handle these cases transparently. This sounds especially useful to something like the SD controller, where we have duplicated drivers on the ARM11 and ARM9 side. It also reduces the needed ARM9 code to a fairly simple while loop with interrupts.

@iAmInActions
Copy link

That sounds pretty cool. I think it would speed up stuff a lot and reduce the complexity quite a bit.

@ParzivalWolfram
Copy link
Member

Recently I've had the idea of just ditching arm9linuxfw as a separate project and instead have a super simple "command processor" that just reads and writes raw data, that way the ARM11 can easily access the ARM9 specific peripherals and interact with them. The NDMA controller would also be accessible, helping us avoid unnecessary and expensive read/write ops.

Instead of just doing a raw iowrite* or ioread* from linux you could do a regmap_write or regmap_read and it'd handle these cases transparently. This sounds especially useful to something like the SD controller, where we have duplicated drivers on the ARM11 and ARM9 side. It also reduces the needed ARM9 code to a fairly simple while loop with interrupts.

I've got a half-working modification to arm9linuxfw stashed somewhere that does something similar, but it's incredibly unstable (lasts maybe 3 or 4 writes before failing.) I'll see if I can dig it back up, as it would probably be best to be able to write drivers on the ARM11 side where possible.

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

No branches or pull requests

4 participants