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

Handle case where mem_size_actual is 0 #363

Closed
wants to merge 1 commit into from

Conversation

dberlin
Copy link
Contributor

@dberlin dberlin commented Dec 1, 2023

Handle case of no mem_size_actual

On newer machines, mem_size_actual is 0.
In this case, we need to use mem_size and mask to a page boundary.

This fixes MMU crash/hang on m3

src/memory.c Outdated Show resolved Hide resolved
On newer machines, mem_size_actual is 0.
This patch cooks up a value when that is the case, and shoves it in the
right place.

Without this MMU/etc hang on M3 due to not mapping the right region.

Signed-off-by: Daniel Berlin <[email protected]>
@dberlin
Copy link
Contributor Author

dberlin commented Dec 4, 2023

This should now be correct

@jannau
Copy link
Member

jannau commented Mar 8, 2024

on j504 (M3 Macbook Pro 14-inch) I see mem_size_actual at 0x478 instead of 0x2d8. All data zero so no idea what the additional 416 bytes are used for.

@marcan marcan force-pushed the main branch 3 times, most recently from 4f95305 to 95d67cf Compare April 9, 2024 03:58
@marcan
Copy link
Member

marcan commented Oct 30, 2024

Looks like this is an issue with bootargs version/size then?

@marcan
Copy link
Member

marcan commented Oct 30, 2024

Should be supeseded by #403.

@marcan marcan closed this Oct 30, 2024
@jannau
Copy link
Member

jannau commented Oct 30, 2024

Looks like this is an issue with bootargs version/size then?

yes, it was. Complicated by the fact that early iboot versions on M3 devices did use revision 2 but used the longer command line length. Missing from #403 is updating BootArgs in proxyclient/m1n1/tgtypes.py

@mildsunrise
Copy link

also missing from #403 is replicating the correction of mem_size_actual (which I understand is for these old iBoot versions) in python side, since we're no longer patching the original bootargs and python sees 0

mildsunrise added a commit to mildsunrise/m1n1 that referenced this pull request Nov 9, 2024
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.

4 participants