Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions libplatsupport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@ config_choice(
mark_as_advanced(CLEAR LibPlatSupportX86ConsoleDevice LibPlatSupportLPTMRclock)

# Some platforms don't have a platform timer.
if(
(KernelPlatformQEMUArmVirt AND NOT (KernelArmExportPCNTUser AND KernelArmExportPTMRUser))
OR KernelPlatformRocketchip
if(KernelPlatformQEMUArmVirt)
Copy link
Copy Markdown
Member

@axel-h axel-h Jul 2, 2025

Choose a reason for hiding this comment

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

As a general question, why are we explicitly checking for KernelPlatformQEMUArmVirt here actually, can't this be made KernelArchARM to make this generic?

Below in line 124 there is this, which make we wonder why we don't check KernelPlatformQuartz64/KernelPlatformIMX93 here then also

if(KernelPlatformQEMUArmVirt OR KernelPlatformQuartz64 OR KernelPlatformIMX93)
    if(KernelArmExportPCNTUser AND KernelArmExportPTMRUser)
        list(APPEND deps src/arch/arm/generic_ltimer.c)
    endif()
endif()

if(KernelArmExportPCNTUser AND KernelArmExportPTMRUser)
set(LibPlatSupportHaveTimer ON)
else()
set(LibPlatSupportHaveTimer OFF)
endif()
elseif(
KernelPlatformRocketchip
OR KernelPlatformRocketchipZCU102
OR KernelPlatformCheshire
OR (SIMULATION AND (KernelArchRiscV OR KernelArchARM))
Expand Down