Changeset 6b7c36f in mainline
- Timestamp:
- 2005-07-18T11:23:39Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a26ddd1
- Parents:
- b4a4c5e3
- Location:
- arch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/acpi/madt.c
rb4a4c5e3 r6b7c36f 31 31 #include <arch/acpi/madt.h> 32 32 #include <arch/smp/apic.h> 33 #include <mm/page.h> 34 #include <panic.h> 33 35 34 36 struct acpi_madt *acpi_madt = NULL; 35 37 36 38 #ifdef __SMP__ 39 40 /* 41 * NOTE: it is currently not completely clear to the authors of SPARTAN whether 42 * MADT can exist in such a form that entries of the same type are not consecutive. 43 * Because of this uncertainity, some entry types are explicitly checked for 44 * being consecutive with other entries of the same kind. 45 */ 46 47 static void madt_l_apic_entry(struct madt_l_apic *la, __u8 prev_type); 48 static void madt_io_apic_entry(struct madt_io_apic *ioa, __u8 prev_type); 49 50 struct madt_l_apic *madt_l_apic_entries = NULL; 51 struct madt_io_apic *madt_io_apic_entries = NULL; 52 53 int madt_l_apic_entry_cnt = 0; 54 int madt_io_apic_entry_cnt = 0; 37 55 38 56 char *entry[] = { … … 52 70 struct madt_apic_header *end = (struct madt_apic_header *) (((__u8 *) acpi_madt) + acpi_madt->header.length); 53 71 struct madt_apic_header *h = &acpi_madt->apic_header[0]; 72 __u8 prev_type = 0; /* used to detect incosecutive entries */ 73 54 74 55 75 l_apic = (__u32 *) acpi_madt->l_apic_address; … … 58 78 switch (h->type) { 59 79 case MADT_L_APIC: 80 madt_l_apic_entry((struct madt_l_apic *) h, prev_type); 81 break; 60 82 case MADT_IO_APIC: 83 madt_io_apic_entry((struct madt_io_apic *) h, prev_type); 84 break; 61 85 case MADT_INTR_SRC_OVRD: 62 86 case MADT_NMI_SRC: … … 78 102 break; 79 103 } 104 prev_type = h->type; 80 105 h = (struct madt_apic_header *) (((__u8 *) h) + h->length); 81 106 } 82 107 83 108 } 109 110 void madt_l_apic_entry(struct madt_l_apic *la, __u8 prev_type) 111 { 112 /* check for consecutiveness */ 113 if (madt_l_apic_entry_cnt && prev_type != MADT_L_APIC) 114 panic("%s entries are not consecuitve\n", entry[MADT_L_APIC]); 115 116 if (!madt_l_apic_entry_cnt++) 117 madt_l_apic_entries = la; 118 119 if (!(la->flags & 0x1)) { 120 /* Processor is unusable, skip it. */ 121 return; 122 } 123 124 apic_id_mask |= 1<<la->apic_id; 125 } 126 127 void madt_io_apic_entry(struct madt_io_apic *ioa, __u8 prev_type) 128 { 129 /* check for consecutiveness */ 130 if (madt_io_apic_entry_cnt && prev_type != MADT_IO_APIC) 131 panic("%s entries are not consecuitve\n", entry[MADT_IO_APIC]); 132 133 if (!madt_io_apic_entry_cnt++) { 134 madt_io_apic_entries = ioa; 135 io_apic = (__u32 *) ioa->io_apic_address; 136 map_page_to_frame((__address) io_apic, (__address) io_apic, PAGE_NOT_CACHEABLE, 0); 137 } 138 else { 139 /* currently not supported */ 140 return; 141 } 142 } 143 84 144 85 145 #endif /* __SMP__ */ -
arch/mips/src/mm/asid.c
rb4a4c5e3 r6b7c36f 1 1 /* 2 * Copyright (C) 2005 HelenOS Project2 * Copyright (C) 2005 Martin Decky 3 3 * All rights reserved. 4 4 *
Note:
See TracChangeset
for help on using the changeset viewer.