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

elfloader: Add generic-timer driver #168

Merged
merged 6 commits into from
Feb 19, 2024
Merged

Conversation

kent-mcleod
Copy link
Member

@kent-mcleod kent-mcleod commented May 30, 2023

This driver just sets CNTVOFF_El2 to 0 if possible.
This can only be done if the elfloader is in hyp-mode, otherwise nothing
happens.

This allows us to replace most of the platform-specific code in the elfloader.

This originally came up with #73 (comment)

@axel-h
Copy link
Member

axel-h commented May 30, 2023

I wonder, do we want keep the empty platform_init.c files, as they may get content in the future again? I remember a discussion somewhere else, where this was the recommended.

@kent-mcleod
Copy link
Member Author

I wonder, do we want keep the empty platform_init.c files, as they may get content in the future again? I remember a discussion somewhere else, where this was the recommended.

If possible we want to support platforms without having to add empty files for each one

@kent-mcleod kent-mcleod force-pushed the kent/elfloader branch 7 times, most recently from 9449166 to b318dd0 Compare February 15, 2024 13:30
Copy link

@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.

Overall a good improvement.

I think merging this without also merging seL4/seL4#1047 will break things, so both need to be used together.

elfloader-tool/src/drivers/driver.c Show resolved Hide resolved
elfloader-tool/src/drivers/driver.c Outdated Show resolved Hide resolved
elfloader-tool/src/arch-arm/smp_boot.c Outdated Show resolved Hide resolved
elfloader-tool/src/drivers/driver.c Outdated Show resolved Hide resolved
elfloader-tool/src/drivers/driver.c Outdated Show resolved Hide resolved
@kent-mcleod kent-mcleod force-pushed the kent/elfloader branch 2 times, most recently from e3d0927 to b70ec4a Compare February 15, 2024 20:54
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 to see so much removed code..

elfloader-tool/src/drivers/driver.c Outdated Show resolved Hide resolved
This is to support core-specific driver init handling.

Signed-off-by: Kent McLeod <kent@kry10.com>
This driver just sets CNTVOFF_El2 to 0 if possible.
This can only be done if the elfloader is in hyp-mode, otherwise nothing
happens.

Signed-off-by: Kent McLeod <kent@kry10.com>
These calls can now be implemented via binding the /timer driver in the
elfloader's device tree configuration (located in the kernel's platform
directory).

Signed-off-by: Kent McLeod <kent@kry10.com>
RISC-V platforms don't use any extension drivers currently so it's not
useful to compile and link them in when not building for arm.

Signed-off-by: Kent McLeod <kent@kry10.com>
This was previously added to handle per-core initialization of the
generic timer. Now that a generic driver mechanism is used to perform
this initialization the old interface is redundant.

Signed-off-by: Kent McLeod <kent@kry10.com>
Device initialization returns early if an error is encountered. Handle
this error by printing an Error message and aborting the booting
process.

Signed-off-by: Kent McLeod <kent@kry10.com>
@Indanz Indanz merged commit 24a7eca into seL4:master Feb 19, 2024
20 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.

4 participants