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

Rename away from ROMBASEADDR #136

Open
reticulatedpines opened this issue Mar 4, 2024 · 0 comments
Open

Rename away from ROMBASEADDR #136

reticulatedpines opened this issue Mar 4, 2024 · 0 comments

Comments

@reticulatedpines
Copy link
Owner

ROMBASEADDR is deceptive; it's not a base address, and it's definitely not the base address of the rom. This causes many people to locate their rom dumps at e.g. 0xe004_0000 on Digic 7 cams, when the actual base address is 0xe000_0000.

Currently we label the function at 0xe004_0000 as firmware_entry(). This is not terrible, but also a little deceptive, it's not truly an entry point. On Digic 7 cams the earliest code we know that runs is at 0xe000_0000, which jumps to bootloader like code, which if early checks succeed, jumps to firmware_entry(). We know 0xe004_0000 is the start of a block, it's packaged this way in FIR files.

Rename both of these to be less deceptive, and consistent. Proposal is firmware_start and dryos_start, as 0xe000_0000 and 0xe004_0000 respectively. This differs per cam model, 0xff0c_0000 on D45 would be dryos_start, 0xffff_0000 is firmware_start.

Refactor a bunch of stuff in code, but also docs and comments. Hopefully, ROMBASEADDR can be retired entirely, since we don't tend to care about where the rom itself is loaded.

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

1 participant