Skip to content

Conversation

@JDuchniewicz
Copy link
Contributor

This fixes the seL4/util_libs#171 issue where in order to have sel4test pass in Release mode for RPi4 one had to comment out GPIO setting. This stems from having just one available allocation to our disposal while we are in serial_utspace_record == true phase (when the serial driver is being set up).

Since there are 2 allocations happening - one for GPIO in uart_gpio_configure using MAP_IF_NULL macro (here), and the other one for UART being done in bcm_uart_init (here). We are running out of available allocations specified by NUM_ALLOC_AT_TO_TRACK.

Copy link
Member

@lsf37 lsf37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thank you for tracking that down.

After this is merged, we should enable those tests in ci-actions.

Copy link
Contributor

@Indanz Indanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only costs a little bit of data to have more than the bare minimum and the define is a maximum, not an exact count.

@Indanz
Copy link
Contributor

Indanz commented Dec 4, 2025

As for avoiding the same problem in the future: The only way is to add extra margin and initialise UARTs first before other devices, so the error print works.

Signed-off-by: Jakub Duchniewicz <[email protected]>
Copy link
Contributor

@Indanz Indanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you rename it, you have to update all users too of course.

  /github/workspace/projects/sel4test/apps/sel4test-driver/src/main.c:515:45: error: ‘NUM_ALLOC_AT_TO_TRACK’ undeclared (first use in this function); did you mean ‘MAX_ALLOC_AT_TO_TRACK’?
    515 |     static uspace_alloc_at_args_t args_prev[NUM_ALLOC_AT_TO_TRACK] = {};
        |                                             ^~~~~~~~~~~~~~~~~~~~~
        |                                             MAX_ALLOC_AT_TO_TRACK

Signed-off-by: Jakub Duchniewicz <[email protected]>
@Indanz Indanz merged commit 0bbb0c6 into seL4:master Dec 5, 2025
24 checks passed
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