Skip to content
Snippets Groups Projects
Commit a2220493 authored by Guy Zana's avatar Guy Zana
Browse files

Fixed compilation issue

parent e99fa5a9
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,12 @@ public: ...@@ -10,6 +10,12 @@ public:
virtual void self_ipi(unsigned vector); virtual void self_ipi(unsigned vector);
virtual void ipi(unsigned cpu, unsigned vector); virtual void ipi(unsigned cpu, unsigned vector);
virtual void eoi(); virtual void eoi();
// vector should be above 31, below 15 will fail
// dest_id is the apic id, if using an io_apic.
bool compose_msix(u8 vector, u8 dest_id, u64& out_address, u32& out_data);
protected:
u32 _apic_base_lo;
u32 _apic_base_hi;
}; };
apic_driver::~apic_driver() apic_driver::~apic_driver()
...@@ -56,7 +62,7 @@ void apic_driver::set_lvt(apiclvt source, unsigned vector) ...@@ -56,7 +62,7 @@ void apic_driver::set_lvt(apiclvt source, unsigned vector)
write(static_cast<apicreg>(source), vector); write(static_cast<apicreg>(source), vector);
} }
bool apic_driver::compose_msix(u8 vector, u8 dest_id, u64& out_address, u32& out_data) bool x2apic::compose_msix(u8 vector, u8 dest_id, u64& out_address, u32& out_data)
{ {
if (vector <= 15) { if (vector <= 15) {
return false; return false;
......
...@@ -40,14 +40,14 @@ enum class apiclvt { ...@@ -40,14 +40,14 @@ enum class apiclvt {
lint1 = apicreg::LVT1, lint1 = apicreg::LVT1,
}; };
enum class msi_data_fields { enum msi_data_fields {
MSI_VECTOR = 0, MSI_VECTOR = 0,
MSI_DELIVERY_MODE = 8, MSI_DELIVERY_MODE = 8,
MSI_LEVEL_ASSERTION = 14, MSI_LEVEL_ASSERTION = 14,
MSI_TRIGGER_MODE = 15 MSI_TRIGGER_MODE = 15
}; };
enum class delivery_mode { enum delivery_mode {
FIXED_DELIVERY = 0, FIXED_DELIVERY = 0,
LOWPRI_DELIVERY = 1, LOWPRI_DELIVERY = 1,
SMI_DELIVERY = 2, SMI_DELIVERY = 2,
...@@ -57,12 +57,12 @@ enum class delivery_mode { ...@@ -57,12 +57,12 @@ enum class delivery_mode {
}; };
// Care only if trigger_mode=level // Care only if trigger_mode=level
enum class level_assertion { enum level_assertion {
MSI_DEASSERT = 0, MSI_DEASSERT = 0,
MSI_ASSSERT = 1 MSI_ASSSERT = 1
}; };
enum class trigger_mode { enum trigger_mode {
TRIGGER_MODE_EDGE = 0, TRIGGER_MODE_EDGE = 0,
TRIGGER_MODE_LEVEL = 1 TRIGGER_MODE_LEVEL = 1
}; };
...@@ -75,12 +75,6 @@ public: ...@@ -75,12 +75,6 @@ public:
virtual void eoi() = 0; virtual void eoi() = 0;
virtual void write(apicreg reg, u32 value) = 0; virtual void write(apicreg reg, u32 value) = 0;
void set_lvt(apiclvt reg, unsigned vector); void set_lvt(apiclvt reg, unsigned vector);
// vector should be above 31, below 15 will fail
// dest_id is the apic id, if using an io_apic.
bool compose_msix(u8 vector, u8 dest_id, u64& out_address, u32& out_data);
protected:
u32 _apic_base_lo;
u32 _apic_base_hi;
}; };
extern apic_driver* apic; extern apic_driver* apic;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment