Changeset bd48f4c in mainline for kernel/genarch/src
- Timestamp:
- 2010-07-12T10:53:30Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bd11d3e
- Parents:
- c40e6ef (diff), bee2d4c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- kernel/genarch/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/acpi/acpi.c
rc40e6ef rbd48f4c 33 33 /** 34 34 * @file 35 * @brief 36 */ 37 35 * @brief Advanced Configuration and Power Interface (ACPI) initialization. 36 */ 37 38 38 #include <genarch/acpi/acpi.h> 39 39 #include <genarch/acpi/madt.h> … … 43 43 #include <print.h> 44 44 45 #define RSDP_SIGNATURE 46 #define RSDP_REVISION_OFFS 45 #define RSDP_SIGNATURE "RSD PTR " 46 #define RSDP_REVISION_OFFS 15 47 47 48 48 #define CMP_SIGNATURE(left, right) \ … … 64 64 }; 65 65 66 static int rsdp_check(uint8_t *rsdp) { 67 struct acpi_rsdp *r = (struct acpi_rsdp *) rsdp; 66 static int rsdp_check(uint8_t *_rsdp) { 67 struct acpi_rsdp *rsdp = (struct acpi_rsdp *) _rsdp; 68 uint8_t sum = 0; 69 uint32_t i; 70 71 for (i = 0; i < 20; i++) 72 sum = (uint8_t) (sum + _rsdp[i]); 73 74 if (sum) 75 return 0; /* bad checksum */ 76 77 if (rsdp->revision == 0) 78 return 1; /* ACPI 1.0 */ 79 80 for (; i < rsdp->length; i++) 81 sum = (uint8_t) (sum + _rsdp[i]); 82 83 return !sum; 84 } 85 86 int acpi_sdt_check(uint8_t *sdt) 87 { 88 struct acpi_sdt_header *hdr = (struct acpi_sdt_header *) sdt; 68 89 uint8_t sum = 0; 69 90 unsigned int i; 70 91 71 for (i = 0; i < 20; i++) 72 sum = (uint8_t) (sum + rsdp[i]); 73 74 if (sum) 75 return 0; /* bad checksum */ 76 77 if (r->revision == 0) 78 return 1; /* ACPI 1.0 */ 79 80 for (; i < r->length; i++) 81 sum = (uint8_t) (sum + rsdp[i]); 82 92 for (i = 0; i < hdr->length; i++) 93 sum = (uint8_t) (sum + sdt[i]); 94 83 95 return !sum; 84 85 }86 87 int acpi_sdt_check(uint8_t *sdt)88 {89 struct acpi_sdt_header *h = (struct acpi_sdt_header *) sdt;90 uint8_t sum = 0;91 unsigned int i;92 93 for (i = 0; i < h->length; i++)94 sum = (uint8_t) (sum + sdt[i]);95 96 return !sum;97 96 } 98 97 … … 100 99 { 101 100 page_table_lock(AS_KERNEL, true); 102 page_mapping_insert(AS_KERNEL, (uintptr_t) sdt, (uintptr_t) sdt, PAGE_NOT_CACHEABLE | PAGE_WRITE); 101 page_mapping_insert(AS_KERNEL, (uintptr_t) sdt, (uintptr_t) sdt, 102 PAGE_NOT_CACHEABLE | PAGE_WRITE); 103 103 map_structure((uintptr_t) sdt, sdt->length); 104 104 page_table_unlock(AS_KERNEL, true); … … 107 107 static void configure_via_rsdt(void) 108 108 { 109 unsigned int i, j, cnt = (acpi_rsdt->header.length - sizeof(struct acpi_sdt_header)) / sizeof(uint32_t); 109 size_t i; 110 size_t j; 111 size_t cnt = (acpi_rsdt->header.length - sizeof(struct acpi_sdt_header)) 112 / sizeof(uint32_t); 110 113 111 114 for (i = 0; i < cnt; i++) { 112 for (j = 0; j < sizeof(signature_map) / sizeof(struct acpi_signature_map); j++) { 113 struct acpi_sdt_header *h = (struct acpi_sdt_header *) (unative_t) acpi_rsdt->entry[i]; 114 115 map_sdt(h); 116 if (CMP_SIGNATURE(h->signature, signature_map[j].signature)) { 117 if (!acpi_sdt_check((uint8_t *) h)) 118 goto next; 119 *signature_map[j].sdt_ptr = h; 120 LOG("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); 115 for (j = 0; j < sizeof(signature_map) 116 / sizeof(struct acpi_signature_map); j++) { 117 struct acpi_sdt_header *hdr = 118 (struct acpi_sdt_header *) (unative_t) acpi_rsdt->entry[i]; 119 120 map_sdt(hdr); 121 if (CMP_SIGNATURE(hdr->signature, signature_map[j].signature)) { 122 if (!acpi_sdt_check((uint8_t *) hdr)) 123 break; 124 125 *signature_map[j].sdt_ptr = hdr; 126 LOG("%p: ACPI %s", *signature_map[j].sdt_ptr, 127 signature_map[j].description); 121 128 } 122 129 } 123 next:124 ;125 130 } 126 131 } … … 128 133 static void configure_via_xsdt(void) 129 134 { 130 unsigned int i, j, cnt = (acpi_xsdt->header.length - sizeof(struct acpi_sdt_header)) / sizeof(uint64_t); 135 size_t i; 136 size_t j; 137 size_t cnt = (acpi_xsdt->header.length - sizeof(struct acpi_sdt_header)) 138 / sizeof(uint64_t); 131 139 132 140 for (i = 0; i < cnt; i++) { 133 for (j = 0; j < sizeof(signature_map) / sizeof(struct acpi_signature_map); j++) { 134 struct acpi_sdt_header *h = (struct acpi_sdt_header *) ((uintptr_t) acpi_rsdt->entry[i]); 135 136 map_sdt(h); 137 if (CMP_SIGNATURE(h->signature, signature_map[j].signature)) { 138 if (!acpi_sdt_check((uint8_t *) h)) 139 goto next; 140 *signature_map[j].sdt_ptr = h; 141 LOG("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); 141 for (j = 0; j < sizeof(signature_map) 142 / sizeof(struct acpi_signature_map); j++) { 143 struct acpi_sdt_header *hdr = 144 (struct acpi_sdt_header *) ((uintptr_t) acpi_xsdt->entry[i]); 145 146 map_sdt(hdr); 147 if (CMP_SIGNATURE(hdr->signature, signature_map[j].signature)) { 148 if (!acpi_sdt_check((uint8_t *) hdr)) 149 break; 150 151 *signature_map[j].sdt_ptr = hdr; 152 LOG("%p: ACPI %s", *signature_map[j].sdt_ptr, 153 signature_map[j].description); 142 154 } 143 155 } 144 next: 145 ; 146 } 147 156 } 148 157 } 149 158 … … 151 160 { 152 161 uint8_t *addr[2] = { NULL, (uint8_t *) PA2KA(0xe0000) }; 153 int i, j, length[2] = { 1024, 128*1024 }; 162 unsigned int i; 163 unsigned int j; 164 unsigned int length[2] = { 1024, 128 * 1024 }; 154 165 uint64_t *sig = (uint64_t *) RSDP_SIGNATURE; 155 166 156 167 /* 157 168 * Find Root System Description Pointer … … 159 170 * 2. search 128K starting at 0xe0000 160 171 */ 161 172 162 173 addr[0] = (uint8_t *) PA2KA(ebda); 163 174 for (i = (ebda ? 0 : 1); i < 2; i++) { 164 175 for (j = 0; j < length[i]; j += 16) { 165 if (*((uint64_t *) &addr[i][j]) == *sig && rsdp_check(&addr[i][j])) { 176 if ((*((uint64_t *) &addr[i][j]) == *sig) 177 && (rsdp_check(&addr[i][j]))) { 166 178 acpi_rsdp = (struct acpi_rsdp *) &addr[i][j]; 167 179 goto rsdp_found; … … 169 181 } 170 182 } 171 183 172 184 return; 173 185 174 186 rsdp_found: 175 LOG("%p: ACPI Root System Description Pointer \n", acpi_rsdp);176 177 acpi_rsdt = (struct acpi_rsdt *) ( unative_t) acpi_rsdp->rsdt_address;187 LOG("%p: ACPI Root System Description Pointer", acpi_rsdp); 188 189 acpi_rsdt = (struct acpi_rsdt *) ((uintptr_t) acpi_rsdp->rsdt_address); 178 190 if (acpi_rsdp->revision) 179 191 acpi_xsdt = (struct acpi_xsdt *) ((uintptr_t) acpi_rsdp->xsdt_address); 180 192 181 193 if (acpi_rsdt) 182 194 map_sdt((struct acpi_sdt_header *) acpi_rsdt); 195 183 196 if (acpi_xsdt) 184 197 map_sdt((struct acpi_sdt_header *) acpi_xsdt); 185 186 if ( acpi_rsdt && !acpi_sdt_check((uint8_t *) acpi_rsdt)) {198 199 if ((acpi_rsdt) && (!acpi_sdt_check((uint8_t *) acpi_rsdt))) { 187 200 printf("RSDT: bad checksum\n"); 188 201 return; 189 202 } 190 if (acpi_xsdt && !acpi_sdt_check((uint8_t *) acpi_xsdt)) { 203 204 if ((acpi_xsdt) && (!acpi_sdt_check((uint8_t *) acpi_xsdt))) { 191 205 printf("XSDT: bad checksum\n"); 192 206 return; 193 207 } 194 208 195 209 if (acpi_xsdt) 196 210 configure_via_xsdt(); 197 211 else if (acpi_rsdt) 198 212 configure_via_rsdt(); 199 200 213 } 201 214 -
kernel/genarch/src/acpi/madt.c
rc40e6ef rbd48f4c 27 27 */ 28 28 29 /** @addtogroup genarch 29 /** @addtogroup genarch 30 30 * @{ 31 31 */ 32 32 /** 33 33 * @file 34 * @brief 34 * @brief Multiple APIC Description Table (MADT) parsing. 35 35 */ 36 36 … … 52 52 #ifdef CONFIG_SMP 53 53 54 /** Standard ISA IRQ map; can be overriden by Interrupt Source Override entries of MADT. */ 55 int isa_irq_map[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; 56 57 static void madt_l_apic_entry(struct madt_l_apic *la, uint32_t index); 58 static void madt_io_apic_entry(struct madt_io_apic *ioa, uint32_t index); 59 static void madt_intr_src_ovrd_entry(struct madt_intr_src_ovrd *override, uint32_t index); 60 static int madt_cmp(void * a, void * b); 54 /** 55 * Standard ISA IRQ map; can be overriden by 56 * Interrupt Source Override entries of MADT. 57 */ 58 static int isa_irq_map[] = 59 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; 61 60 62 61 struct madt_l_apic *madt_l_apic_entries = NULL; 63 62 struct madt_io_apic *madt_io_apic_entries = NULL; 64 63 65 size_t madt_l_apic_entry_index = 0; 66 size_t madt_io_apic_entry_index = 0; 67 size_t madt_l_apic_entry_cnt = 0; 68 size_t madt_io_apic_entry_cnt = 0; 69 size_t cpu_count = 0; 70 71 struct madt_apic_header * * madt_entries_index = NULL; 72 unsigned int madt_entries_index_cnt = 0; 64 static size_t madt_l_apic_entry_index = 0; 65 static size_t madt_io_apic_entry_index = 0; 66 static size_t madt_l_apic_entry_cnt = 0; 67 static size_t madt_io_apic_entry_cnt = 0; 68 69 static struct madt_apic_header **madt_entries_index = NULL; 73 70 74 71 const char *entry[] = { … … 84 81 }; 85 82 86 /* 87 * ACPI MADT Implementation of SMP configuration interface. 88 */ 89 static size_t madt_cpu_count(void); 90 static bool madt_cpu_enabled(size_t i); 91 static bool madt_cpu_bootstrap(size_t i); 92 static uint8_t madt_cpu_apic_id(size_t i); 93 static int madt_irq_to_pin(unsigned int irq); 94 83 static uint8_t madt_cpu_apic_id(size_t i) 84 { 85 ASSERT(i < madt_l_apic_entry_cnt); 86 87 return ((struct madt_l_apic *) 88 madt_entries_index[madt_l_apic_entry_index + i])->apic_id; 89 } 90 91 static bool madt_cpu_enabled(size_t i) 92 { 93 ASSERT(i < madt_l_apic_entry_cnt); 94 95 /* 96 * FIXME: The current local APIC driver limits usable 97 * CPU IDs to 8. 98 * 99 */ 100 if (i > 7) 101 return false; 102 103 return ((struct madt_l_apic *) 104 madt_entries_index[madt_l_apic_entry_index + i])->flags & 0x1; 105 } 106 107 static bool madt_cpu_bootstrap(size_t i) 108 { 109 ASSERT(i < madt_l_apic_entry_cnt); 110 111 return ((struct madt_l_apic *) 112 madt_entries_index[madt_l_apic_entry_index + i])->apic_id == 113 bsp_l_apic; 114 } 115 116 static int madt_irq_to_pin(unsigned int irq) 117 { 118 ASSERT(irq < sizeof(isa_irq_map) / sizeof(int)); 119 120 return isa_irq_map[irq]; 121 } 122 123 /** ACPI MADT Implementation of SMP configuration interface. 124 * 125 */ 95 126 struct smp_config_operations madt_config_operations = { 96 .cpu_count = madt_cpu_count,97 127 .cpu_enabled = madt_cpu_enabled, 98 128 .cpu_bootstrap = madt_cpu_bootstrap, … … 101 131 }; 102 132 103 size_t madt_cpu_count(void) 104 { 105 return madt_l_apic_entry_cnt; 106 } 107 108 bool madt_cpu_enabled(size_t i) 109 { 110 ASSERT(i < madt_l_apic_entry_cnt); 111 return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->flags & 0x1; 112 113 } 114 115 bool madt_cpu_bootstrap(size_t i) 116 { 117 ASSERT(i < madt_l_apic_entry_cnt); 118 return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->apic_id == l_apic_id(); 119 } 120 121 uint8_t madt_cpu_apic_id(size_t i) 122 { 123 ASSERT(i < madt_l_apic_entry_cnt); 124 return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->apic_id; 125 } 126 127 int madt_irq_to_pin(unsigned int irq) 128 { 129 ASSERT(irq < sizeof(isa_irq_map) / sizeof(int)); 130 return isa_irq_map[irq]; 131 } 132 133 int madt_cmp(void * a, void * b) 134 { 135 return 136 (((struct madt_apic_header *) a)->type > ((struct madt_apic_header *) b)->type) ? 137 1 : 138 ((((struct madt_apic_header *) a)->type < ((struct madt_apic_header *) b)->type) ? -1 : 0); 139 } 140 141 void acpi_madt_parse(void) 142 { 143 struct madt_apic_header *end = (struct madt_apic_header *) (((uint8_t *) acpi_madt) + acpi_madt->header.length); 144 struct madt_apic_header *h; 145 146 l_apic = (uint32_t *) (unative_t) acpi_madt->l_apic_address; 147 148 /* calculate madt entries */ 149 for (h = &acpi_madt->apic_header[0]; h < end; h = (struct madt_apic_header *) (((uint8_t *) h) + h->length)) { 150 madt_entries_index_cnt++; 151 } 152 153 /* create madt apic entries index array */ 154 madt_entries_index = (struct madt_apic_header * *) malloc(madt_entries_index_cnt * sizeof(struct madt_apic_header * *), FRAME_ATOMIC); 155 if (!madt_entries_index) 156 panic("Memory allocation error."); 157 158 uint32_t index = 0; 159 160 for (h = &acpi_madt->apic_header[0]; h < end; h = (struct madt_apic_header *) (((uint8_t *) h) + h->length)) { 161 madt_entries_index[index++] = h; 162 } 163 164 /* Quicksort MADT index structure */ 165 qsort(madt_entries_index, madt_entries_index_cnt, sizeof(uintptr_t), &madt_cmp); 166 167 /* Parse MADT entries */ 168 if (madt_entries_index_cnt > 0) { 169 for (index = 0; index < madt_entries_index_cnt - 1; index++) { 170 h = madt_entries_index[index]; 171 switch (h->type) { 172 case MADT_L_APIC: 173 madt_l_apic_entry((struct madt_l_apic *) h, index); 174 break; 175 case MADT_IO_APIC: 176 madt_io_apic_entry((struct madt_io_apic *) h, index); 177 break; 178 case MADT_INTR_SRC_OVRD: 179 madt_intr_src_ovrd_entry((struct madt_intr_src_ovrd *) h, index); 180 break; 181 case MADT_NMI_SRC: 182 case MADT_L_APIC_NMI: 183 case MADT_L_APIC_ADDR_OVRD: 184 case MADT_IO_SAPIC: 185 case MADT_L_SAPIC: 186 case MADT_PLATFORM_INTR_SRC: 187 printf("MADT: skipping %s entry (type=%" PRIu8 ")\n", entry[h->type], h->type); 188 break; 189 190 default: 191 if (h->type >= MADT_RESERVED_SKIP_BEGIN && h->type <= MADT_RESERVED_SKIP_END) { 192 printf("MADT: skipping reserved entry (type=%" PRIu8 ")\n", h->type); 193 } 194 if (h->type >= MADT_RESERVED_OEM_BEGIN) { 195 printf("MADT: skipping OEM entry (type=%" PRIu8 ")\n", h->type); 196 } 197 break; 198 } 199 } 200 } 201 202 if (cpu_count) 203 config.cpu_count = cpu_count; 204 } 205 206 207 void madt_l_apic_entry(struct madt_l_apic *la, uint32_t index) 208 { 209 if (!madt_l_apic_entry_cnt++) { 210 madt_l_apic_entry_index = index; 211 } 212 133 static int madt_cmp(void *a, void *b, void *arg) 134 { 135 uint8_t typea = (*((struct madt_apic_header **) a))->type; 136 uint8_t typeb = (*((struct madt_apic_header **) b))->type; 137 138 if (typea > typeb) 139 return 1; 140 141 if (typea < typeb) 142 return -1; 143 144 return 0; 145 } 146 147 static void madt_l_apic_entry(struct madt_l_apic *la, size_t i) 148 { 149 if (madt_l_apic_entry_cnt == 0) 150 madt_l_apic_entry_index = i; 151 152 madt_l_apic_entry_cnt++; 153 213 154 if (!(la->flags & 0x1)) { 214 155 /* Processor is unusable, skip it. */ … … 216 157 } 217 158 218 cpu_count++; 219 apic_id_mask |= 1<<la->apic_id; 220 } 221 222 void madt_io_apic_entry(struct madt_io_apic *ioa, uint32_t index) 223 { 224 if (!madt_io_apic_entry_cnt++) { 225 /* remember index of the first io apic entry */ 226 madt_io_apic_entry_index = index; 159 apic_id_mask |= 1 << la->apic_id; 160 } 161 162 static void madt_io_apic_entry(struct madt_io_apic *ioa, size_t i) 163 { 164 if (madt_io_apic_entry_cnt == 0) { 165 /* Remember index of the first io apic entry */ 166 madt_io_apic_entry_index = i; 227 167 io_apic = (uint32_t *) (unative_t) ioa->io_apic_address; 228 168 } else { 229 /* currently not supported */ 230 return; 231 } 232 } 233 234 void madt_intr_src_ovrd_entry(struct madt_intr_src_ovrd *override, uint32_t index) 169 /* Currently not supported */ 170 } 171 172 madt_io_apic_entry_cnt++; 173 } 174 175 static void madt_intr_src_ovrd_entry(struct madt_intr_src_ovrd *override, 176 size_t i) 235 177 { 236 178 ASSERT(override->source < sizeof(isa_irq_map) / sizeof(int)); 237 printf("MADT: ignoring %s entry: bus=%" PRIu8 ", source=%" PRIu8 ", global_int=%" PRIu32 ", flags=%#" PRIx16 "\n", 238 entry[override->header.type], override->bus, override->source, 239 override->global_int, override->flags); 179 180 printf("MADT: Ignoring %s entry: bus=%" PRIu8 ", source=%" PRIu8 181 ", global_int=%" PRIu32 ", flags=%#" PRIx16 "\n", 182 entry[override->header.type], override->bus, override->source, 183 override->global_int, override->flags); 184 } 185 186 void acpi_madt_parse(void) 187 { 188 struct madt_apic_header *end = (struct madt_apic_header *) 189 (((uint8_t *) acpi_madt) + acpi_madt->header.length); 190 struct madt_apic_header *hdr; 191 192 l_apic = (uint32_t *) (unative_t) acpi_madt->l_apic_address; 193 194 /* Count MADT entries */ 195 unsigned int madt_entries_index_cnt = 0; 196 for (hdr = acpi_madt->apic_header; hdr < end; 197 hdr = (struct madt_apic_header *) (((uint8_t *) hdr) + hdr->length)) 198 madt_entries_index_cnt++; 199 200 /* Create MADT APIC entries index array */ 201 madt_entries_index = (struct madt_apic_header **) 202 malloc(madt_entries_index_cnt * sizeof(struct madt_apic_header *), 203 FRAME_ATOMIC); 204 if (!madt_entries_index) 205 panic("Memory allocation error."); 206 207 size_t i = 0; 208 209 for (hdr = acpi_madt->apic_header; hdr < end; 210 hdr = (struct madt_apic_header *) (((uint8_t *) hdr) + hdr->length)) { 211 madt_entries_index[i] = hdr; 212 i++; 213 } 214 215 /* Sort MADT index structure */ 216 if (!gsort(madt_entries_index, madt_entries_index_cnt, 217 sizeof(struct madt_apic_header *), madt_cmp, NULL)) 218 panic("Sorting error."); 219 220 /* Parse MADT entries */ 221 for (i = 0; i < madt_entries_index_cnt; i++) { 222 hdr = madt_entries_index[i]; 223 224 switch (hdr->type) { 225 case MADT_L_APIC: 226 madt_l_apic_entry((struct madt_l_apic *) hdr, i); 227 break; 228 case MADT_IO_APIC: 229 madt_io_apic_entry((struct madt_io_apic *) hdr, i); 230 break; 231 case MADT_INTR_SRC_OVRD: 232 madt_intr_src_ovrd_entry((struct madt_intr_src_ovrd *) hdr, i); 233 break; 234 case MADT_NMI_SRC: 235 case MADT_L_APIC_NMI: 236 case MADT_L_APIC_ADDR_OVRD: 237 case MADT_IO_SAPIC: 238 case MADT_L_SAPIC: 239 case MADT_PLATFORM_INTR_SRC: 240 printf("MADT: Skipping %s entry (type=%" PRIu8 ")\n", 241 entry[hdr->type], hdr->type); 242 break; 243 default: 244 if ((hdr->type >= MADT_RESERVED_SKIP_BEGIN) 245 && (hdr->type <= MADT_RESERVED_SKIP_END)) 246 printf("MADT: Skipping reserved entry (type=%" PRIu8 ")\n", 247 hdr->type); 248 249 if (hdr->type >= MADT_RESERVED_OEM_BEGIN) 250 printf("MADT: Skipping OEM entry (type=%" PRIu8 ")\n", 251 hdr->type); 252 253 break; 254 } 255 } 256 257 if (madt_l_apic_entry_cnt > 0) 258 config.cpu_count = madt_l_apic_entry_cnt; 240 259 } 241 260 -
kernel/genarch/src/mm/as_pt.c
rc40e6ef rbd48f4c 84 84 */ 85 85 86 ipl_t ipl = interrupts_disable();87 86 mutex_lock(&AS_KERNEL->lock); 88 87 … … 100 99 101 100 mutex_unlock(&AS_KERNEL->lock); 102 interrupts_restore(ipl);103 101 } 104 102 -
kernel/genarch/src/mm/asid.c
rc40e6ef rbd48f4c 126 126 * Get the system rid of the stolen ASID. 127 127 */ 128 tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0);128 ipl_t ipl = tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0); 129 129 tlb_invalidate_asid(asid); 130 tlb_shootdown_finalize( );130 tlb_shootdown_finalize(ipl); 131 131 } else { 132 132 … … 142 142 * Purge the allocated ASID from TLBs. 143 143 */ 144 tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0);144 ipl_t ipl = tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0); 145 145 tlb_invalidate_asid(asid); 146 tlb_shootdown_finalize( );146 tlb_shootdown_finalize(ipl); 147 147 } 148 148 -
kernel/genarch/src/mm/page_ht.c
rc40e6ef rbd48f4c 185 185 }; 186 186 187 ASSERT(interrupts_disabled());188 187 ASSERT(page_table_locked(as)); 189 188 … … 226 225 }; 227 226 228 ASSERT(interrupts_disabled());229 227 ASSERT(page_table_locked(as)); 230 228 … … 254 252 }; 255 253 256 ASSERT(interrupts_disabled());257 254 ASSERT(page_table_locked(as)); 258 255 -
kernel/genarch/src/mm/page_pt.c
rc40e6ef rbd48f4c 72 72 pte_t *ptl0 = (pte_t *) PA2KA((uintptr_t) as->genarch.page_table); 73 73 74 ASSERT(interrupts_disabled());75 74 ASSERT(page_table_locked(as)); 76 75 … … 120 119 void pt_mapping_remove(as_t *as, uintptr_t page) 121 120 { 122 ASSERT(interrupts_disabled());123 121 ASSERT(page_table_locked(as)); 124 122 … … 251 249 pte_t *pt_mapping_find(as_t *as, uintptr_t page) 252 250 { 253 ASSERT(interrupts_disabled());254 251 ASSERT(page_table_locked(as)); 255 252
Note:
See TracChangeset
for help on using the changeset viewer.