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

Update work area size from 3064 to 3264 #2073

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

will-v-pi
Copy link
Contributor

Currently the descriptions for rom_load_partition_table, rom_pick_ab_partition, rom_get_uf2_target_partition and rom_chain_image document the minimum workarea size as 3064, with 3K recommended. This is too small, as the actual size required is 3264, so 3.25K should be recommended instead.

The minimum size was obtained with the following for loop in a binary:

for (int i=0xc00; i <= 0x1000; i++) {
    uint8_t* workarea = malloc(i);
    int ret = rom_load_partition_table(workarea, i, true);
    free(workarea);
    if (ret != -13) {
        printf("PT Load Ret %d, size %d\n", ret, i);
        break;
    }
}

@kilograham kilograham merged commit 74db3c2 into raspberrypi:develop Nov 20, 2024
4 checks passed
@lurch
Copy link
Contributor

lurch commented Nov 20, 2024

Currently the descriptions for rom_load_partition_table, rom_pick_ab_partition, rom_get_uf2_target_partition and rom_chain_image document the minimum workarea size

I forgot to ask earlier - do each of these four functions definitely have the same minimum workarea size?

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.

3 participants