seL4_tools icon indicating copy to clipboard operation
seL4_tools copied to clipboard

elfloader: improve stability

Open andybui01 opened this issue 1 year ago • 5 comments

As mentioned in https://github.com/seL4/seL4_tools/pull/190, this is the series of commits that do general touch-ups in the elfloader.

This should reduce the Jetson Orin PR to 1 commit, and the aarch64 booting sequence PR (these commits rely on each other) to 6 commits, which should be more manageable, although I'll prepare those PRs are this passes (hopefully).

andybui01 avatar Feb 28 '24 04:02 andybui01

The simulation on ARMv8 fails now, could you have a look at this? Maybe you should split this PR even further up, so we can merge the trivial things faster.

axel-h avatar Mar 06 '24 09:03 axel-h

The simulation on ARMv8 fails now, could you have a look at this?

The failure is due to the following reason: as it stands, the elfloader creates the boot page table by mapping 2 regions:

  1. The kernel region (kernel_info->virt_region_start) as MT_NORMAL memory.
  2. A bulk 512 GiB 1:1 mapping (used by the elfloader) that is strongly-ordered.

The final commit (https://github.com/seL4/seL4_tools/pull/191/commits/3166422ebc96ecc068df8ca854da589e31fd567c) erroneously assumes that this is region is for device memory, that is not correct. Instead, this commit will be part of the page table PR to follow, which splits the boot page table into distinct regions (elfloader - normal, kernel - normal, uart mmio - strongly ordered).

andybui01 avatar Mar 21 '24 05:03 andybui01

As mentioned in #190, this is the series of commits that do general touch-ups in the elfloader.

This PR seems to not contain one of the touch up commits: https://github.com/seL4/seL4_tools/commit/0108b774b0511bc81e4ccb86aae69aba36468aea

And contains an additional commit that is not a touch up commit and changes behavior: https://github.com/seL4/seL4_tools/pull/191/commits/7e410f094417edcbbcb25b9148ae44cb21f70a63

Is this intentional?

kent-mcleod avatar Mar 22 '24 21:03 kent-mcleod

As mentioned in #190, this is the series of commits that do general touch-ups in the elfloader.

This PR seems to not contain one of the touch up commits: 0108b77

And contains an additional commit that is not a touch up commit and changes behavior: 7e410f0

Is this intentional?

Yeah, the first one makes less sense to me without the other commits that all attempt to solve a problem (stabilize aarch64 booting for the Orin).

As for the second, I think its impact is low enough to be included here? It doesn't seem to be that big of a behavioral change.

andybui01 avatar Mar 25 '24 00:03 andybui01

@axel-h A re-review would be appreciated if you can spare some time. Also the failing HW tests are passing when I check the log, as they reach the end but the message "All is well in the universe" becomes truncated.

andybui01 avatar Apr 10 '24 01:04 andybui01