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

td-shim: correct MPWK mailbox version #597

Merged
merged 1 commit into from
Sep 13, 2023
Merged
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
5 changes: 3 additions & 2 deletions td-shim/src/bin/td-shim/mp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const NUM_8259_IRQS: usize = 16;

const ACPI_1_0_PROCESSOR_LOCAL_APIC: u8 = 0x00;
const ACPI_MADT_MPWK_STRUCT_TYPE: u8 = 0x10;
const ACPI_MADT_MPWK_MAILBOX_VERSION: u16 = 0x00;

pub struct Madt {
pub data: [u8; MADT_MAX_SIZE],
Expand Down Expand Up @@ -84,7 +85,7 @@ pub fn create_madt(vmm_madt: &[u8], mailbox_base: u64) -> Option<Madt> {
let mpwk = MadtMpwkStruct {
r#type: ACPI_MADT_MPWK_STRUCT_TYPE,
length: size_of::<MadtMpwkStruct>() as u8,
mail_box_version: 1,
mail_box_version: ACPI_MADT_MPWK_MAILBOX_VERSION,
reserved: 0,
mail_box_address: mailbox_base,
};
Expand Down Expand Up @@ -131,7 +132,7 @@ pub fn create_madt_default(cpu_num: u32, mailbox_base: u64) -> Option<Madt> {
let mpwk = MadtMpwkStruct {
r#type: ACPI_MADT_MPWK_STRUCT_TYPE,
length: size_of::<MadtMpwkStruct>() as u8,
mail_box_version: 1,
mail_box_version: ACPI_MADT_MPWK_MAILBOX_VERSION,
reserved: 0,
mail_box_address: mailbox_base,
};
Expand Down
Loading