-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #601 from msft-jlange/tdp_intr
platform: implement `SvsmPlatform::is_external_interrupt` for TDP.
- Loading branch information
Showing
4 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-License-Identifier: MIT | ||
// | ||
// Copyright (c) Microsoft Corporation | ||
// | ||
// Author: Jon Lange <jlange@microsoft.com> | ||
|
||
pub const APIC_MSR_EOI: u32 = 0x80B; | ||
pub const APIC_MSR_ISR: u32 = 0x810; | ||
pub const APIC_MSR_ICR: u32 = 0x830; | ||
|
||
// Returns the MSR offset and bitmask to identify a specific vector in an | ||
// APIC register (IRR, ISR, or TMR). | ||
pub fn apic_register_bit(vector: usize) -> (u32, u32) { | ||
let index: u8 = vector as u8; | ||
((index >> 5) as u32, 1 << (index & 0x1F)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
// | ||
// Authors: Thomas Leroy <tleroy@suse.de> | ||
|
||
pub mod apic; | ||
pub mod smap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters