Changeset b4ca0a9c in mainline for kernel/arch/ia32
- Timestamp:
- 2012-07-10T11:53:50Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1e01a35
- Parents:
- a33706e (diff), 33fc3ae (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/arch/ia32
- Files:
-
- 5 edited
-
Makefile.inc (modified) (2 diffs)
-
include/mm/page.h (modified) (2 diffs)
-
src/mm/page.c (modified) (1 diff)
-
src/smp/apic.c (modified) (3 diffs)
-
src/userspace.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/Makefile.inc
ra33706e rb4ca0a9c 38 38 GCC_CFLAGS += $(CMN1) 39 39 ICC_CFLAGS += $(CMN1) 40 SUNCC_CFLAGS += $(CMN1)41 40 CLANG_CFLAGS += $(CMN1) 42 41 … … 50 49 ifeq ($(PROCESSOR),athlon_xp) 51 50 CMN2 = -march=athlon-xp 52 SUNCC_CFLAGS += -xarch=ssea53 51 endif 54 52 55 53 ifeq ($(PROCESSOR),athlon_mp) 56 54 CMN2 = -march=athlon-mp 57 SUNCC_CFLAGS += xarch=ssea58 55 endif 59 56 60 57 ifeq ($(PROCESSOR),pentium3) 61 58 CMN2 = -march=pentium3 62 SUNCC_CFLAGS += -xarch=sse63 59 endif 64 60 65 61 ifeq ($(PROCESSOR),pentium4) 66 62 CMN2 = -march=pentium4 67 SUNCC_CFLAGS += -xarch=sse268 63 endif 69 64 70 65 ifeq ($(PROCESSOR),core) 71 66 CMN2 = -march=prescott 72 SUNCC_CFLAGS += -xarch=sse373 67 endif 74 68 -
kernel/arch/ia32/include/mm/page.h
ra33706e rb4ca0a9c 115 115 set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) 116 116 117 /* Set PTE present bit accessors for each level. */ 118 #define SET_PTL1_PRESENT_ARCH(ptl0, i) \ 119 set_pt_present((pte_t *) (ptl0), (size_t) (i)) 120 #define SET_PTL2_PRESENT_ARCH(ptl1, i) 121 #define SET_PTL3_PRESENT_ARCH(ptl2, i) 122 #define SET_FRAME_PRESENT_ARCH(ptl3, i) \ 123 set_pt_present((pte_t *) (ptl3), (size_t) (i)) 124 117 125 /* Macros for querying the last level entries. */ 118 126 #define PTE_VALID_ARCH(p) \ … … 194 202 } 195 203 204 NO_TRACE static inline void set_pt_present(pte_t *pt, size_t i) 205 { 206 pte_t *p = &pt[i]; 207 208 p->present = 1; 209 } 210 196 211 extern void page_arch_init(void); 197 212 extern void page_fault(unsigned int, istate_t *); -
kernel/arch/ia32/src/mm/page.c
ra33706e rb4ca0a9c 71 71 for (cur = 0; cur < min(config.identity_size, config.physmem_end); 72 72 cur += FRAME_SIZE) { 73 flags = PAGE_CACHEABLE | PAGE_WRITE; 74 if ((PA2KA(cur) >= config.base) && 75 (PA2KA(cur) < config.base + config.kernel_size)) 76 flags |= PAGE_GLOBAL; 73 flags = PAGE_GLOBAL | PAGE_CACHEABLE | PAGE_WRITE | PAGE_READ; 77 74 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); 78 75 } -
kernel/arch/ia32/src/smp/apic.c
ra33706e rb4ca0a9c 259 259 } 260 260 261 #define DELIVS_PENDING_SILENT_RETRIES 4 262 263 static void l_apic_wait_for_delivery(void) 264 { 265 icr_t icr; 266 unsigned retries = 0; 267 268 do { 269 if (retries++ > DELIVS_PENDING_SILENT_RETRIES) { 270 retries = 0; 271 #ifdef CONFIG_DEBUG 272 printf("IPI is pending.\n"); 273 #endif 274 delay(20); 275 } 276 icr.lo = l_apic[ICRlo]; 277 } while (icr.delivs == DELIVS_PENDING); 278 279 } 280 261 281 /** Send all CPUs excluding CPU IPI vector. 262 282 * … … 279 299 280 300 l_apic[ICRlo] = icr.lo; 281 282 icr.lo = l_apic[ICRlo]; 283 if (icr.delivs == DELIVS_PENDING) { 284 #ifdef CONFIG_DEBUG 285 printf("IPI is pending.\n"); 286 #endif 287 } 301 302 l_apic_wait_for_delivery(); 288 303 289 304 return apic_poll_errors(); … … 327 342 return 0; 328 343 344 l_apic_wait_for_delivery(); 345 329 346 icr.lo = l_apic[ICRlo]; 330 if (icr.delivs == DELIVS_PENDING) {331 #ifdef CONFIG_DEBUG332 printf("IPI is pending.\n");333 #endif334 }335 336 347 icr.delmod = DELMOD_INIT; 337 348 icr.destmod = DESTMOD_PHYS; -
kernel/arch/ia32/src/userspace.c
ra33706e rb4ca0a9c 63 63 64 64 "pushl %[udata_des]\n" 65 "pushl %[stack_ size]\n"65 "pushl %[stack_top]\n" 66 66 "pushl %[ipl]\n" 67 67 "pushl %[utext_des]\n" … … 75 75 : 76 76 : [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 77 [stack_size] "r" ((uint8_t *) kernel_uarg->uspace_stack + STACK_SIZE), 77 [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack + 78 kernel_uarg->uspace_stack_size), 78 79 [ipl] "r" (ipl), 79 80 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),
Note:
See TracChangeset
for help on using the changeset viewer.
