Changeset 98000fb in mainline for kernel/arch/ia32
- Timestamp:
- 2009-06-03T19:34:45Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 301ff30
- Parents:
- 69e68e3
- Location:
- kernel/arch/ia32
- Files:
-
- 10 edited
-
include/cpu.h (modified) (1 diff)
-
include/mm/page.h (modified) (4 diffs)
-
include/proc/task.h (modified) (1 diff)
-
include/smp/smp.h (modified) (1 diff)
-
include/types.h (modified) (2 diffs)
-
src/ddi/ddi.c (modified) (3 diffs)
-
src/interrupt.c (modified) (1 diff)
-
src/mm/frame.c (modified) (1 diff)
-
src/mm/tlb.c (modified) (1 diff)
-
src/smp/mps.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/cpu.h
r69e68e3 r98000fb 58 58 tss_t *tss; 59 59 60 count_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */60 size_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ 61 61 } cpu_arch_t; 62 62 -
kernel/arch/ia32/include/mm/page.h
r69e68e3 r98000fb 96 96 /* Get PTE flags accessors for each level. */ 97 97 #define GET_PTL1_FLAGS_ARCH(ptl0, i) \ 98 get_pt_flags((pte_t *) (ptl0), ( index_t) (i))98 get_pt_flags((pte_t *) (ptl0), (size_t) (i)) 99 99 #define GET_PTL2_FLAGS_ARCH(ptl1, i) \ 100 100 PAGE_PRESENT … … 102 102 PAGE_PRESENT 103 103 #define GET_FRAME_FLAGS_ARCH(ptl3, i) \ 104 get_pt_flags((pte_t *) (ptl3), ( index_t) (i))104 get_pt_flags((pte_t *) (ptl3), (size_t) (i)) 105 105 106 106 /* Set PTE flags accessors for each level. */ 107 107 #define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ 108 set_pt_flags((pte_t *) (ptl0), ( index_t) (i), (x))108 set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x)) 109 109 #define SET_PTL2_FLAGS_ARCH(ptl1, i, x) 110 110 #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) 111 111 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ 112 set_pt_flags((pte_t *) (ptl3), ( index_t) (i), (x))112 set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) 113 113 114 114 /* Macros for querying the last level entries. */ … … 146 146 #define PFERR_CODE_RSVD (1 << 3) 147 147 148 static inline int get_pt_flags(pte_t *pt, index_t i)148 static inline int get_pt_flags(pte_t *pt, size_t i) 149 149 { 150 150 pte_t *p = &pt[i]; … … 159 159 } 160 160 161 static inline void set_pt_flags(pte_t *pt, index_t i, int flags)161 static inline void set_pt_flags(pte_t *pt, size_t i, int flags) 162 162 { 163 163 pte_t *p = &pt[i]; -
kernel/arch/ia32/include/proc/task.h
r69e68e3 r98000fb 41 41 typedef struct { 42 42 /** I/O Permission bitmap Generation counter. */ 43 count_t iomapver;43 size_t iomapver; 44 44 /** I/O Permission bitmap. */ 45 45 bitmap_t iomap; -
kernel/arch/ia32/include/smp/smp.h
r69e68e3 r98000fb 40 40 /** SMP config opertaions interface. */ 41 41 struct smp_config_operations { 42 count_t (* cpu_count)(void); /**< Return number of detected processors. */43 bool (* cpu_enabled)( index_t i); /**< Check whether the processor of index i is enabled. */44 bool (*cpu_bootstrap)( index_t i); /**< Check whether the processor of index i is BSP. */45 uint8_t (*cpu_apic_id)( index_t i); /**< Return APIC ID of the processor of index i. */42 size_t (* cpu_count)(void); /**< Return number of detected processors. */ 43 bool (* cpu_enabled)(size_t i); /**< Check whether the processor of index i is enabled. */ 44 bool (*cpu_bootstrap)(size_t i); /**< Check whether the processor of index i is BSP. */ 45 uint8_t (*cpu_apic_id)(size_t i); /**< Return APIC ID of the processor of index i. */ 46 46 int (*irq_to_pin)(unsigned int irq); /**< Return mapping between irq and APIC pin. */ 47 47 }; -
kernel/arch/ia32/include/types.h
r69e68e3 r98000fb 47 47 48 48 typedef uint32_t size_t; 49 typedef uint32_t count_t;50 typedef uint32_t index_t;51 49 52 50 typedef uint32_t uintptr_t; … … 63 61 #define PRIp "x" /**< Format for uintptr_t. */ 64 62 #define PRIs "u" /**< Format for size_t. */ 65 #define PRIc "u" /**< Format for count_t. */66 #define PRIi "u" /**< Format for index_t. */67 63 68 64 #define PRId8 "d" /**< Format for int8_t. */ -
kernel/arch/ia32/src/ddi/ddi.c
r69e68e3 r98000fb 58 58 int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size) 59 59 { 60 count_t bits;60 size_t bits; 61 61 62 62 bits = ioaddr + size; … … 100 100 * Enable the range and we are done. 101 101 */ 102 bitmap_clear_range(&task->arch.iomap, ( index_t) ioaddr, (count_t) size);102 bitmap_clear_range(&task->arch.iomap, (size_t) ioaddr, (size_t) size); 103 103 104 104 /* … … 119 119 void io_perm_bitmap_install(void) 120 120 { 121 count_t bits;121 size_t bits; 122 122 ptr_16_32_t cpugdtr; 123 123 descriptor_t *gdt_p; 124 count_t ver;124 size_t ver; 125 125 126 126 /* First, copy the I/O Permission Bitmap. */ -
kernel/arch/ia32/src/interrupt.c
r69e68e3 r98000fb 102 102 { 103 103 if (TASK) { 104 count_t ver;104 size_t ver; 105 105 106 106 spinlock_lock(&TASK->lock); -
kernel/arch/ia32/src/mm/frame.c
r69e68e3 r98000fb 71 71 #endif 72 72 pfn_t pfn; 73 count_t count;73 size_t count; 74 74 75 75 if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) { -
kernel/arch/ia32/src/mm/tlb.c
r69e68e3 r98000fb 60 60 * @param cnt Number of entries to invalidate. 61 61 */ 62 void tlb_invalidate_pages(asid_t asid __attribute__((unused)), uintptr_t page, count_t cnt)62 void tlb_invalidate_pages(asid_t asid __attribute__((unused)), uintptr_t page, size_t cnt) 63 63 { 64 64 unsigned int i; -
kernel/arch/ia32/src/smp/mps.c
r69e68e3 r98000fb 87 87 * Implementation of IA-32 SMP configuration interface. 88 88 */ 89 static count_t get_cpu_count(void);90 static bool is_cpu_enabled( index_t i);91 static bool is_bsp( index_t i);92 static uint8_t get_cpu_apic_id( index_t i);89 static size_t get_cpu_count(void); 90 static bool is_cpu_enabled(size_t i); 91 static bool is_bsp(size_t i); 92 static uint8_t get_cpu_apic_id(size_t i); 93 93 static int mps_irq_to_pin(unsigned int irq); 94 94 … … 101 101 }; 102 102 103 count_t get_cpu_count(void)103 size_t get_cpu_count(void) 104 104 { 105 105 return processor_entry_cnt; 106 106 } 107 107 108 bool is_cpu_enabled( index_t i)108 bool is_cpu_enabled(size_t i) 109 109 { 110 110 ASSERT(i < processor_entry_cnt); … … 112 112 } 113 113 114 bool is_bsp( index_t i)114 bool is_bsp(size_t i) 115 115 { 116 116 ASSERT(i < processor_entry_cnt); … … 118 118 } 119 119 120 uint8_t get_cpu_apic_id( index_t i)120 uint8_t get_cpu_apic_id(size_t i) 121 121 { 122 122 ASSERT(i < processor_entry_cnt);
Note:
See TracChangeset
for help on using the changeset viewer.
