Changeset 232e3ec7 in mainline for arch/ia32/src/acpi/madt.c
- Timestamp:
- 2005-07-19T15:10:27Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0970f43
- Parents:
- a26ddd1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/acpi/madt.c
ra26ddd1 r232e3ec7 28 28 29 29 #include <arch/types.h> 30 #include <typedefs.h> 30 31 #include <arch/acpi/acpi.h> 31 32 #include <arch/acpi/madt.h> 32 33 #include <arch/smp/apic.h> 34 #include <arch/smp/smp.h> 33 35 #include <mm/page.h> 34 36 #include <panic.h> 37 #include <debug.h> 38 #include <config.h> 35 39 36 40 struct acpi_madt *acpi_madt = NULL; … … 65 69 "PLATFORM_INTR_SRC" 66 70 }; 71 72 /* 73 * ACPI MADT Implementation of SMP configuration interface. 74 */ 75 static count_t madt_cpu_count(void); 76 static bool madt_cpu_enabled(index_t i); 77 static bool madt_cpu_bootstrap(index_t i); 78 static __u8 madt_cpu_apic_id(index_t i); 79 80 struct smp_config_operations madt_config_operations = { 81 .cpu_count = madt_cpu_count, 82 .cpu_enabled = madt_cpu_enabled, 83 .cpu_bootstrap = madt_cpu_bootstrap, 84 .cpu_apic_id = madt_cpu_apic_id 85 }; 86 87 static count_t madt_cpu_count(void) 88 { 89 return madt_l_apic_entry_cnt; 90 } 91 92 static bool madt_cpu_enabled(index_t i) 93 { 94 ASSERT(i < madt_l_apic_entry_cnt); 95 return madt_l_apic_entries[i].flags & 0x1; 96 } 97 98 static bool madt_cpu_bootstrap(index_t i) 99 { 100 ASSERT(i < madt_l_apic_entry_cnt); 101 return madt_l_apic_entries[i].apic_id == l_apic_id(); 102 } 103 104 static __u8 madt_cpu_apic_id(index_t i) 105 { 106 ASSERT(i < madt_l_apic_entry_cnt); 107 return madt_l_apic_entries[i].apic_id; 108 } 67 109 68 110 void acpi_madt_parse(void) … … 106 148 } 107 149 150 if (madt_l_apic_entry_cnt) 151 config.cpu_count = madt_l_apic_entry_cnt; 108 152 } 109 153
Note:
See TracChangeset
for help on using the changeset viewer.