Skip to content

Conversation

@mgudaram
Copy link
Contributor

@mgudaram mgudaram commented Sep 4, 2025

This commit adds OneShot APIC timer support. APIC divider (DCR) set to 1.

@mgudaram mgudaram requested a review from jyao1 as a code owner September 4, 2025 17:13
pub const DIVIDE_CONFIGURATION_REGISTER: u32 = 0xfee0_03e0;

// APIC Frequency
pub const APIC_FREQUENCY: u32 = 200000000;
Copy link
Member

@jyao1 jyao1 Sep 5, 2025

Choose a reason for hiding this comment

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

why we need to define it here? It is NOT used anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Jiewen, I am using this to calculate oneshot timer "initialcount/duration" in the migtd timer driver code. I have defined it here to maintain all definitions at one place in TDSHIM. Just now, I created PR for MigTD as well. Thanks!

Copy link
Member

@jyao1 jyao1 Sep 9, 2025

Choose a reason for hiding this comment

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

APIC_FREQUENCY is not defined in SDM spec.
If APIC_FREQUENCY is only for MigTD, I suggest to move this definition to MigTD project.

The rest is OK, because they are following the SDM spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, I have updated the branch and moved APIC frequency to MigTD.

@jyao1
Copy link
Member

jyao1 commented Sep 5, 2025

Please add "Signed-off-by:" tag to pass the DCO.

@mgudaram
Copy link
Contributor Author

mgudaram commented Sep 5, 2025

Please add "Signed-off-by:" tag to pass the DCO.

Thanks Jiewen, I have fixed it and pushed the change.

@jyao1 jyao1 merged commit 2e0f7d2 into confidential-containers:main Sep 9, 2025
24 checks passed
@mgudaram mgudaram deleted the APIC branch October 15, 2025 22:17
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