Changeset f4c2b6a in mainline
- Timestamp:
- 2008-06-03T14:59:48Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4fb51
- Parents:
- b63f8569
- Location:
- kernel
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/debugger.c
rb63f8569 rf4c2b6a 107 107 unsigned int i; 108 108 char *symbol; 109 110 if (sizeof(void *) == 4) { 111 printf("# Count Address In symbol\n"); 112 printf("-- ----- ---------- ---------\n"); 113 } else { 114 printf("# Count Address In symbol\n"); 115 printf("-- ----- ------------------ ---------\n"); 116 } 109 110 #ifdef __32_BITS__ 111 printf("# Count Address In symbol\n"); 112 printf("-- ----- ---------- ---------\n"); 113 #endif 114 115 #ifdef __64_BITS__ 116 printf("# Count Address In symbol\n"); 117 printf("-- ----- ------------------ ---------\n"); 118 #endif 117 119 118 120 for (i = 0; i < BKPOINTS_MAX; i++) 119 121 if (breakpoints[i].address) { 120 122 symbol = get_symtab_entry(breakpoints[i].address); 121 122 if (sizeof(void *) == 4) 123 printf("%-2u %-5d %#10zx %s\n", i, breakpoints[i].counter, 124 breakpoints[i].address, symbol); 125 else 126 printf("%-2u %-5d %#18zx %s\n", i, breakpoints[i].counter, 127 breakpoints[i].address, symbol); 123 124 #ifdef __32_BITS__ 125 printf("%-2u %-5d %#10zx %s\n", i, breakpoints[i].counter, 126 breakpoints[i].address, symbol); 127 #endif 128 129 #ifdef __64_BITS__ 130 printf("%-2u %-5d %#18zx %s\n", i, breakpoints[i].counter, 131 breakpoints[i].address, symbol); 132 #endif 133 128 134 } 129 135 return 1; … … 163 169 ; 164 170 } else { 165 if (sizeof(int) == 4) 166 dr7 |= ((unative_t) 0x3) << (18 + 4*curidx); 167 else /* 8 */ 168 dr7 |= ((unative_t) 0x2) << (18 + 4*curidx); 171 172 #ifdef __32_BITS__ 173 dr7 |= ((unative_t) 0x3) << (18 + 4 * curidx); 174 #endif 175 176 #ifdef __64_BITS__ 177 dr7 |= ((unative_t) 0x2) << (18 + 4 * curidx); 178 #endif 169 179 170 180 if ((flags & BKPOINT_WRITE)) 171 dr7 |= ((unative_t) 0x1) << (16 + 4 *curidx);181 dr7 |= ((unative_t) 0x1) << (16 + 4 * curidx); 172 182 else if ((flags & BKPOINT_READ_WRITE)) 173 dr7 |= ((unative_t) 0x3) << (16 + 4 *curidx);183 dr7 |= ((unative_t) 0x3) << (16 + 4 * curidx); 174 184 } 175 185 -
kernel/arch/amd64/src/proc/thread.c
rb63f8569 rf4c2b6a 47 47 */ 48 48 t->arch.syscall_rsp[SYSCALL_KSTACK_RSP] = 49 (uintptr_t) &t->kstack[PAGE_SIZE - sizeof(uint64_t)];49 (uintptr_t) &t->kstack[PAGE_SIZE - sizeof(uint64_t)]; 50 50 } 51 51 -
kernel/arch/ia32/include/mm/page.h
rb63f8569 rf4c2b6a 129 129 #include <mm/mm.h> 130 130 #include <arch/interrupt.h> 131 #include <arch/types.h> 132 #include <typedefs.h> 131 133 132 134 /* Page fault error codes. */ -
kernel/arch/ia32/include/smp/apic.h
rb63f8569 rf4c2b6a 106 106 107 107 /** Interrupt Command Register. */ 108 #define ICRlo (0x300 /sizeof(uint32_t))109 #define ICRhi (0x310 /sizeof(uint32_t))108 #define ICRlo (0x300 / sizeof(uint32_t)) 109 #define ICRhi (0x310 / sizeof(uint32_t)) 110 110 typedef struct { 111 111 union { … … 134 134 135 135 /* End Of Interrupt. */ 136 #define EOI (0x0b0 /sizeof(uint32_t))136 #define EOI (0x0b0 / sizeof(uint32_t)) 137 137 138 138 /** Error Status Register. */ 139 #define ESR (0x280 /sizeof(uint32_t))139 #define ESR (0x280 / sizeof(uint32_t)) 140 140 typedef union { 141 141 uint32_t value; … … 155 155 156 156 /* Task Priority Register */ 157 #define TPR (0x080 /sizeof(uint32_t))157 #define TPR (0x080 / sizeof(uint32_t)) 158 158 typedef union { 159 159 uint32_t value; … … 165 165 166 166 /** Spurious-Interrupt Vector Register. */ 167 #define SVR (0x0f0 /sizeof(uint32_t))167 #define SVR (0x0f0 / sizeof(uint32_t)) 168 168 typedef union { 169 169 uint32_t value; … … 177 177 178 178 /** Time Divide Configuration Register. */ 179 #define TDCR (0x3e0 /sizeof(uint32_t))179 #define TDCR (0x3e0 / sizeof(uint32_t)) 180 180 typedef union { 181 181 uint32_t value; … … 187 187 188 188 /* Initial Count Register for Timer */ 189 #define ICRT (0x380 /sizeof(uint32_t))189 #define ICRT (0x380 / sizeof(uint32_t)) 190 190 191 191 /* Current Count Register for Timer */ 192 #define CCRT (0x390 /sizeof(uint32_t))192 #define CCRT (0x390 / sizeof(uint32_t)) 193 193 194 194 /** LVT Timer register. */ 195 #define LVT_Tm (0x320 /sizeof(uint32_t))195 #define LVT_Tm (0x320 / sizeof(uint32_t)) 196 196 typedef union { 197 197 uint32_t value; … … 208 208 209 209 /** LVT LINT registers. */ 210 #define LVT_LINT0 (0x350 /sizeof(uint32_t))211 #define LVT_LINT1 (0x360 /sizeof(uint32_t))210 #define LVT_LINT0 (0x350 / sizeof(uint32_t)) 211 #define LVT_LINT1 (0x360 / sizeof(uint32_t)) 212 212 typedef union { 213 213 uint32_t value; … … 226 226 227 227 /** LVT Error register. */ 228 #define LVT_Err (0x370 /sizeof(uint32_t))228 #define LVT_Err (0x370 / sizeof(uint32_t)) 229 229 typedef union { 230 230 uint32_t value; … … 240 240 241 241 /** Local APIC ID Register. */ 242 #define L_APIC_ID (0x020 /sizeof(uint32_t))242 #define L_APIC_ID (0x020 / sizeof(uint32_t)) 243 243 typedef union { 244 244 uint32_t value; … … 250 250 251 251 /** Local APIC Version Register */ 252 #define LAVR (0x030 /sizeof(uint32_t))252 #define LAVR (0x030 / sizeof(uint32_t)) 253 253 #define LAVR_Mask 0xff 254 #define is_local_apic(x) (((x) &LAVR_Mask&0xf0)==0x1)255 #define is_82489DX_apic(x) ((((x) &LAVR_Mask&0xf0)==0x0))256 #define is_local_xapic(x) (((x) &LAVR_Mask)==0x14)254 #define is_local_apic(x) (((x) & LAVR_Mask & 0xf0) == 0x1) 255 #define is_82489DX_apic(x) ((((x) & LAVR_Mask & 0xf0) == 0x0)) 256 #define is_local_xapic(x) (((x) & LAVR_Mask) == 0x14) 257 257 258 258 /** Logical Destination Register. */ 259 #define LDR (0x0d0 /sizeof(uint32_t))259 #define LDR (0x0d0 / sizeof(uint32_t)) 260 260 typedef union { 261 261 uint32_t value; … … 267 267 268 268 /** Destination Format Register. */ 269 #define DFR (0x0e0 /sizeof(uint32_t))269 #define DFR (0x0e0 / sizeof(uint32_t)) 270 270 typedef union { 271 271 uint32_t value; … … 277 277 278 278 /* IO APIC */ 279 #define IOREGSEL (0x00 /sizeof(uint32_t))280 #define IOWIN (0x10 /sizeof(uint32_t))279 #define IOREGSEL (0x00 / sizeof(uint32_t)) 280 #define IOWIN (0x10 / sizeof(uint32_t)) 281 281 282 282 #define IOAPICID 0x00 -
kernel/arch/ia32/src/debug/panic.s
rb63f8569 rf4c2b6a 31 31 32 32 panic_printf: 33 movl $halt, (%esp) # fake stack to make printf return to halt33 movl $halt, (%esp) # fake stack to make printf return to halt 34 34 jmp printf -
kernel/arch/ia32xen/src/smp/smp.c
rb63f8569 rf4c2b6a 143 143 * Prepare new GDT for CPU in question. 144 144 */ 145 if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS *sizeof(struct descriptor), FRAME_ATOMIC)))145 if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS * sizeof(struct descriptor), FRAME_ATOMIC))) 146 146 panic("couldn't allocate memory for GDT\n"); 147 147 -
kernel/arch/mips32/src/debugger.c
rb63f8569 rf4c2b6a 153 153 154 154 /* Check, that the breakpoints do not conflict */ 155 for (i =0; i<BKPOINTS_MAX; i++) {155 for (i = 0; i < BKPOINTS_MAX; i++) { 156 156 if (breakpoints[i].address == (uintptr_t)argv->intval) { 157 157 printf("Duplicate breakpoint %d.\n", i); … … 315 315 /* Reinst only breakpoint */ 316 316 if ((breakpoints[i].flags & BKPOINT_REINST) \ 317 && (fireaddr == breakpoints[i].address+sizeof(unative_t))) {317 && (fireaddr == breakpoints[i].address + sizeof(unative_t))) { 318 318 cur = &breakpoints[i]; 319 319 break; -
kernel/arch/mips32/src/exception.c
rb63f8569 rf4c2b6a 162 162 */ 163 163 #ifdef CONFIG_DEBUG 164 printf("cpu% d: spurious interrupt (inum=%d)\n", CPU->id, i);164 printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, i); 165 165 #endif 166 166 } -
kernel/arch/ppc32/include/boot/boot.h
rb63f8569 rf4c2b6a 39 39 40 40 /* Temporary stack size for boot process */ 41 #define TEMP_STACK_SIZE 0x100 41 #define TEMP_STACK_SIZE 0x1000 42 42 43 43 #define TASKMAP_MAX_RECORDS 32 -
kernel/arch/ppc32/include/drivers/cuda.h
rb63f8569 rf4c2b6a 37 37 38 38 #include <arch/types.h> 39 #include <typedefs.h> 39 40 40 41 extern void cuda_init(devno_t devno, uintptr_t base, size_t size); -
kernel/arch/ppc32/include/exception.h
rb63f8569 rf4c2b6a 83 83 istate->pc = retaddr; 84 84 } 85 85 86 /** Return true if exception happened while in userspace */ 86 87 #include <panic.h> … … 90 91 return 0; 91 92 } 93 92 94 static inline unative_t istate_get_pc(istate_t *istate) 93 95 { -
kernel/arch/ppc32/include/mm/tlb.h
rb63f8569 rf4c2b6a 37 37 38 38 #include <arch/interrupt.h> 39 #include <arch/types.h> 40 #include <typedefs.h> 39 41 40 42 typedef struct { -
kernel/arch/ppc32/src/interrupt.c
rb63f8569 rf4c2b6a 81 81 */ 82 82 #ifdef CONFIG_DEBUG 83 printf("cpu% d: spurious interrupt (inum=%d)\n", CPU->id, inum);83 printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, inum); 84 84 #endif 85 85 } -
kernel/arch/ppc32/src/mm/page.c
rb63f8569 rf4c2b6a 49 49 { 50 50 if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) 51 panic("Unable to map physical memory %p (% dbytes)", physaddr, size)51 panic("Unable to map physical memory %p (%" PRIs " bytes)", physaddr, size) 52 52 53 53 uintptr_t virtaddr = PA2KA(last_frame); -
kernel/arch/ppc64/include/exception.h
rb63f8569 rf4c2b6a 83 83 istate->pc = retaddr; 84 84 } 85 85 86 /** Return true if exception happened while in userspace */ 86 87 #include <panic.h> … … 90 91 return 0; 91 92 } 93 92 94 static inline unative_t istate_get_pc(istate_t *istate) 93 95 { -
kernel/arch/ppc64/src/cpu/cpu.c
rb63f8569 rf4c2b6a 54 54 void cpu_print_report(cpu_t *m) 55 55 { 56 printf("cpu% d: version=%d, revision=%d\n", m->id, m->arch.version, m->arch.revision);56 printf("cpu%u: version=%d, revision=%d\n", m->id, m->arch.version, m->arch.revision); 57 57 } 58 58 -
kernel/arch/ppc64/src/interrupt.c
rb63f8569 rf4c2b6a 81 81 */ 82 82 #ifdef CONFIG_DEBUG 83 printf("cpu% d: spurious interrupt (inum=%d)\n", CPU->id, inum);83 printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, inum); 84 84 #endif 85 85 } -
kernel/arch/ppc64/src/mm/page.c
rb63f8569 rf4c2b6a 290 290 { 291 291 if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) 292 panic("Unable to map physical memory %p (% dbytes)", physaddr, size)292 panic("Unable to map physical memory %p (%" PRIs " bytes)", physaddr, size) 293 293 294 294 uintptr_t virtaddr = PA2KA(last_frame); -
kernel/arch/sparc64/include/asm.h
rb63f8569 rf4c2b6a 38 38 #include <arch/arch.h> 39 39 #include <arch/types.h> 40 #include <typedefs.h> 40 41 #include <align.h> 41 42 #include <arch/register.h> -
kernel/arch/sparc64/include/cpu.h
rb63f8569 rf4c2b6a 37 37 38 38 #include <arch/types.h> 39 #include <typedefs.h> 39 40 #include <arch/register.h> 40 41 #include <arch/asm.h> -
kernel/arch/sparc64/src/cpu/cpu.c
rb63f8569 rf4c2b6a 136 136 } 137 137 138 printf("cpu%d: manuf=%s, impl=%s, mask=%d (%d MHz)\n", m->id, manuf,138 printf("cpu%d: manuf=%s, impl=%s, mask=%d (%d MHz)\n", m->id, manuf, 139 139 impl, m->arch.ver.mask, m->arch.clock_frequency / 1000000); 140 140 } -
kernel/arch/sparc64/src/smp/smp.c
rb63f8569 rf4c2b6a 100 100 101 101 if (waitq_sleep_timeout(&ap_completion_wq, 1000000, SYNCH_FLAGS_NONE) == ESYNCH_TIMEOUT) 102 printf("%s: waiting for processor (mid = % d) timed out\n",102 printf("%s: waiting for processor (mid = %" PRIu32 ") timed out\n", 103 103 __func__, mid); 104 104 } -
kernel/arch/sparc64/src/trap/exception.c
rb63f8569 rf4c2b6a 46 46 void dump_istate(istate_t *istate) 47 47 { 48 printf("TSTATE=%# llx\n", istate->tstate);49 printf("TPC=%# llx(%s)\n", istate->tpc, get_symtab_entry(istate->tpc));50 printf("TNPC=%# llx(%s)\n", istate->tnpc, get_symtab_entry(istate->tnpc));48 printf("TSTATE=%#" PRIx64 "\n", istate->tstate); 49 printf("TPC=%#" PRIx64 " (%s)\n", istate->tpc, get_symtab_entry(istate->tpc)); 50 printf("TNPC=%#" PRIx64 " (%s)\n", istate->tnpc, get_symtab_entry(istate->tnpc)); 51 51 } 52 52 -
kernel/arch/sparc64/src/trap/interrupt.c
rb63f8569 rf4c2b6a 98 98 */ 99 99 #ifdef CONFIG_DEBUG 100 printf("cpu% d: spurious interrupt (intrcv=%#llx, "101 " data0=%#llx)\n", CPU->id, intrcv, data0);100 printf("cpu%u: spurious interrupt (intrcv=%#" PRIx64 101 ", data0=%#" PRIx64 ")\n", CPU->id, intrcv, data0); 102 102 #endif 103 103 } -
kernel/genarch/include/ofw/ofw_tree.h
rb63f8569 rf4c2b6a 31 31 32 32 #include <arch/types.h> 33 #include <typedefs.h> 33 34 34 35 #define OFW_TREE_PROPERTY_MAX_NAMELEN 32 -
kernel/genarch/src/acpi/acpi.c
rb63f8569 rf4c2b6a 106 106 goto next; 107 107 *signature_map[j].sdt_ptr = h; 108 printf("% #zp: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);108 printf("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); 109 109 } 110 110 } … … 127 127 goto next; 128 128 *signature_map[j].sdt_ptr = h; 129 printf("% #zp: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);129 printf("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); 130 130 } 131 131 } … … 161 161 162 162 rsdp_found: 163 printf("% #zp: ACPI Root System Description Pointer\n", acpi_rsdp);163 printf("%p: ACPI Root System Description Pointer\n", acpi_rsdp); 164 164 165 165 acpi_rsdt = (struct acpi_rsdt *) (unative_t) acpi_rsdp->rsdt_address; … … 170 170 171 171 if (acpi_rsdt && !acpi_sdt_check((uint8_t *) acpi_rsdt)) { 172 printf("RSDT: %s\n", "bad checksum");172 printf("RSDT: bad checksum\n"); 173 173 return; 174 174 } 175 175 if (acpi_xsdt && !acpi_sdt_check((uint8_t *) acpi_xsdt)) { 176 printf("XSDT: %s\n", "bad checksum");176 printf("XSDT: bad checksum\n"); 177 177 return; 178 178 } -
kernel/genarch/src/acpi/madt.c
rb63f8569 rf4c2b6a 127 127 int madt_irq_to_pin(unsigned int irq) 128 128 { 129 ASSERT(irq < sizeof(isa_irq_map) /sizeof(int));129 ASSERT(irq < sizeof(isa_irq_map) / sizeof(int)); 130 130 return isa_irq_map[irq]; 131 131 } … … 185 185 case MADT_L_SAPIC: 186 186 case MADT_PLATFORM_INTR_SRC: 187 printf("MADT: skipping %s entry (type=% zd)\n", entry[h->type], h->type);187 printf("MADT: skipping %s entry (type=%" PRIu8 ")\n", entry[h->type], h->type); 188 188 break; 189 189 190 190 default: 191 191 if (h->type >= MADT_RESERVED_SKIP_BEGIN && h->type <= MADT_RESERVED_SKIP_END) { 192 printf("MADT: skipping reserved entry (type=% zd)\n", h->type);192 printf("MADT: skipping reserved entry (type=%" PRIu8 ")\n", h->type); 193 193 } 194 194 if (h->type >= MADT_RESERVED_OEM_BEGIN) { 195 printf("MADT: skipping OEM entry (type=% zd)\n", h->type);195 printf("MADT: skipping OEM entry (type=%" PRIu8 ")\n", h->type); 196 196 } 197 197 break; … … 234 234 void madt_intr_src_ovrd_entry(struct madt_intr_src_ovrd *override, uint32_t index) 235 235 { 236 ASSERT(override->source < sizeof(isa_irq_map) /sizeof(int));237 printf("MADT: ignoring %s entry: bus=% zd, source=%zd, global_int=%zd, flags=%#hx\n",236 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 238 entry[override->header.type], override->bus, override->source, 239 239 override->global_int, override->flags);
Note:
See TracChangeset
for help on using the changeset viewer.