Skip to content

seL4Config: remove duplicated constants#547

Merged
midnightveil merged 1 commit into
seL4:mainfrom
au-ts:callumb/improve_config
Jul 10, 2026
Merged

seL4Config: remove duplicated constants#547
midnightveil merged 1 commit into
seL4:mainfrom
au-ts:callumb/improve_config

Conversation

@cazb2

@cazb2 cazb2 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This commit removes some of the duplicated constants definitions that seL4 already exports.

@cazb2 cazb2 force-pushed the callumb/improve_config branch from a0b418b to a5bf957 Compare July 9, 2026 05:34
@cazb2

cazb2 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

style check warning can be ignored or we fix the python/style but I was told not too

Comment thread build_sdk.py
obj_name, size = l.split(": ")
if "-" in size:
lhs, rhs = size.strip("( )").split("-", 1)
size = str(int(lhs.strip(), 0) - int(rhs.strip(), 0))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hrm, having to do math here is slightly weird. I suppose there's no way around it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unless we extract from part of the compiled tu

Comment thread tool/microkit/src/main.rs Outdated
device_regions,
normal_regions,
object_sizes,
object_sizes: Some(object_sizes),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ok, additional cleanup while we're here: can you make this not optional? It's a little silly

@cazb2 cazb2 Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The only benefit of it being an option is testing

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't find that very convincing 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Understandably

@midnightveil

Copy link
Copy Markdown
Collaborator

Your branch is out of date, btw. You need to rebase.

@cazb2 cazb2 force-pushed the callumb/improve_config branch from a5bf957 to eee79fa Compare July 9, 2026 06:26
Comment thread tool/microkit/address_space_constants.h Outdated

page_table_index_bits: seL4_PageTableIndexBits

#ifdef seL4_UserVSpaceTop

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I believe this #ifdef should be unconditional.

@cazb2 cazb2 force-pushed the callumb/improve_config branch from eee79fa to 77ac7e2 Compare July 9, 2026 06:55
Comment thread tool/microkit/src/main.rs
}
};

let object_sizes = {

@midnightveil midnightveil Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason why you removed the existing

let object_sizes = {
  // do stuff to parse
};

pattern here? I can't see what was wrong with it

It's much nicer IMO.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm interesting I don't see the point in the scope, maybe a function would make more sense?

@midnightveil midnightveil Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The scope makes a new namespace, so you can define several variables without populating global scope.

Also, it logically groups things.

It's sort of like a function in that way yes.

BTW, clipppy failed, and you need to rebase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

on it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When I look this commit is alr rebased?

@midnightveil midnightveil Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The parent of 711c607 was 'tests: add test cases for bootinfo prefilling', which is several commits behind latest main.

@midnightveil midnightveil Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, you likely only have the au-ts remote, as tbe parent of that commit is the current au-ts microkit fork. You need to have an additional seL4 remote following seL4/microkit that main tracks: because we work on a fork.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mmmm so a fork can have a different origin main state?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think I understand this a bit now, kinda annoying behaviour

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, they're not linked in any way.

@cazb2 cazb2 force-pushed the callumb/improve_config branch 2 times, most recently from dab6f54 to 711c607 Compare July 9, 2026 23:21
This commit removes some of the duplicated constants definitions that
seL4 already exports.

Signed-off-by: Callum <c.berry@student.unsw.edu.au>
@cazb2 cazb2 force-pushed the callumb/improve_config branch from d12e372 to f13b9ea Compare July 9, 2026 23:45
@midnightveil midnightveil merged commit 7ce6c9f into seL4:main Jul 10, 2026
17 of 21 checks passed
@midnightveil midnightveil deleted the callumb/improve_config branch July 10, 2026 00:50
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.

2 participants