Changeset b52da8d7 in mainline
- Timestamp:
- 2005-08-29T11:57:26Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c245372b
- Parents:
- 229d5fc1
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/barrier.h
r229d5fc1 rb52da8d7 33 33 #define CS_LEAVE_BARRIER() __asm__ volatile ("" ::: "memory") 34 34 35 #define memory_barrier() 36 #define read_barrier() 37 #define write_barrier() 38 35 39 #endif -
arch/ia32/include/asm.h
r229d5fc1 rb52da8d7 32 32 #include <arch/types.h> 33 33 #include <typedefs.h> 34 #include < mm/page.h>34 #include <config.h> 35 35 #include <synch/spinlock.h> 36 36 #include <arch/boot/memmap.h> -
arch/ia32/include/barrier.h
r229d5fc1 rb52da8d7 44 44 #define CS_LEAVE_BARRIER() __asm__ volatile ("" ::: "memory") 45 45 46 #define memory_barrier() __asm__ volatile ("mfence\n" ::: "memory") 47 #define read_barrier() __asm__ volatile ("sfence\n" ::: "memory") 48 #define write_barrier() __asm__ volatile ("lfence\n" ::: "memory") 49 46 50 #endif -
arch/ia32/src/boot/boot.S
r229d5fc1 rb52da8d7 48 48 call memmap_arch_init 49 49 50 lgdt gdtr 50 lgdt gdtr # initialize Global Descriptor Table register 51 lidt idtr # initialize Interrupt Descriptor Table register 52 51 53 movl %cr0,%eax 52 54 orl $0x1,%eax 53 movl %eax,%cr0 55 movl %eax,%cr0 # switch to protected mode 54 56 jmpl $8,$meeting_point 55 57 meeting_point: … … 63 65 movw %ax,%ss 64 66 65 lidt idtr 66 67 call map_kernel 67 call map_kernel # map kernel and turn paging on 68 68 69 69 movl $_hardcoded_ktext_size, hardcoded_ktext_size … … 95 95 movl %eax, %cr3 96 96 97 # turn on paging97 # turn paging on 98 98 movl %cr0, %ebx 99 99 orl $(1<<31), %ebx -
arch/ia32/src/mm/frame.c
r229d5fc1 rb52da8d7 35 35 #include <print.h> 36 36 37 /*38 * TODO: use the memory map obtained from BIOS39 */40 37 void frame_arch_init(void) 41 38 { -
arch/ia32/src/smp/ap.S
r229d5fc1 rb52da8d7 51 51 movw %ax,%ds 52 52 53 lgdt gdtr 53 lgdt gdtr # initialize Global Descriptor Table register 54 lidt idtr # initialize Interrupt Descriptor Table register 55 54 56 movl %cr0,%eax 55 57 orl $1,%eax 56 movl %eax,%cr0 58 movl %eax,%cr0 # switch to protected mode 57 59 jmpl $KTEXT,$jump_to_kernel 58 60 jump_to_kernel: … … 66 68 subl $0x80000000,%esp # KA2PA(ctx.sp) 67 69 68 lidt idtr 69 70 call map_kernel 70 call map_kernel # map kernel and turn paging on 71 71 72 72 jmpl $KTEXT,$main_ap -
arch/ia64/include/barrier.h
r229d5fc1 rb52da8d7 36 36 #define CS_LEAVE_BARRIER() __asm__ volatile ("" ::: "memory") 37 37 38 #define memory_barrier() 39 #define read_barrier() 40 #define write_barrier() 41 38 42 #endif -
arch/mips/include/barrier.h
r229d5fc1 rb52da8d7 36 36 #define CS_LEAVE_BARRIER() __asm__ volatile ("" ::: "memory") 37 37 38 #define memory_barrier() 39 #define read_barrier() 40 #define write_barrier() 41 38 42 #endif -
arch/mips/include/cpu.h
r229d5fc1 rb52da8d7 30 30 #define __mips_CPU_H__ 31 31 32 #include <typedefs.h>33 34 32 #define CPU_ID_ARCH 0 35 33 -
arch/mips/include/mm/page.h
r229d5fc1 rb52da8d7 34 34 #include <arch/mm/frame.h> 35 35 #include <arch/types.h> 36 #include <arch.h>37 36 38 37 #define PAGE_SIZE FRAME_SIZE -
arch/ppc/include/barrier.h
r229d5fc1 rb52da8d7 33 33 #define CS_LEAVE_BARRIER() __asm__ volatile ("" ::: "memory") 34 34 35 #define memory_barrier() 36 #define read_barrier() 37 #define write_barrier() 38 35 39 #endif -
include/arch.h
r229d5fc1 rb52da8d7 35 35 #include <cpu.h> 36 36 #include <arch/cpu.h> 37 #include <arch/asm.h> 38 39 #include <proc/thread.h> 40 #include <proc/task.h> 37 41 38 42 /* … … 59 63 }; 60 64 65 #define THE ((the_t *)(get_stack_base())) 66 61 67 extern void arch_pre_mm_init(void); 62 68 extern void arch_post_mm_init(void); -
include/cpu.h
r229d5fc1 rb52da8d7 31 31 32 32 #include <arch/cpu.h> 33 #include <proc/thread.h>34 #include <proc/task.h>35 33 #include <proc/scheduler.h> 36 #include <time/clock.h>37 34 #include <synch/spinlock.h> 38 35 #include <synch/waitq.h> … … 41 38 #include <arch/context.h> 42 39 #include <config.h> 40 #include <list.h> 43 41 44 42 #define CPU_STACK_SIZE STACK_SIZE -
include/proc/task.h
r229d5fc1 rb52da8d7 32 32 #include <typedefs.h> 33 33 #include <synch/spinlock.h> 34 #include <proc/thread.h>35 #include <mm/vm.h>36 34 #include <list.h> 37 35 -
include/proc/thread.h
r229d5fc1 rb52da8d7 31 31 32 32 #include <arch/thread.h> 33 #include <proc/task.h>34 33 #include <synch/spinlock.h> 35 34 #include <arch/context.h> … … 39 38 #include <time/timeout.h> 40 39 #include <synch/rwlock.h> 41 #include <mm/page.h>42 40 #include <config.h> 43 41 #include <list.h> -
src/main/main.c
r229d5fc1 rb52da8d7 98 98 config.cpu_count = 1; 99 99 config.cpu_active = 1; 100 size_t size, delta; 101 102 /* 103 * Calculate 'size' that kernel and heap occupies in memory. 104 */ 105 size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE; 106 107 /* 108 * We need the boot stack to start on page boundary. 109 * That is why 'delta' is calculated. 110 */ 111 delta = PAGE_SIZE - ((hardcoded_load_address + size) % PAGE_SIZE); 112 delta = (delta == PAGE_SIZE) ? 0 : delta; 113 114 size += delta; 100 115 101 116 config.base = hardcoded_load_address; 102 117 config.memory_size = get_memory_size(); 103 config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE+ CONFIG_STACK_SIZE;118 config.kernel_size = size + CONFIG_STACK_SIZE; 104 119 105 120 context_save(&ctx); 106 context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE, CONFIG_STACK_SIZE);121 context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + size, CONFIG_STACK_SIZE); 107 122 context_restore(&ctx); 108 123 /* not reached */ -
src/preempt/preemption.c
r229d5fc1 rb52da8d7 29 29 #include <preemption.h> 30 30 #include <arch.h> 31 #include <arch/a tomic.h>31 #include <arch/asm.h> 32 32 #include <arch/barrier.h> 33 #include <debug.h> 33 34 34 35 void preemption_disable(void) 35 36 { 37 THE->preemption_disabled++; 38 memory_barrier(); 36 39 } 37 40 38 41 void preemption_enable(void) 39 42 { 43 ASSERT(THE->preemption_disabled); 44 memory_barrier(); 45 THE->preemption_disabled--; 40 46 }
Note:
See TracChangeset
for help on using the changeset viewer.