- Timestamp:
- 2011-05-12T16:49:44Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36787d7
- Parents:
- e80329d6 (diff), 750636a (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:
- boot
- Files:
-
- 27 edited
-
Makefile (modified) (2 diffs)
-
Makefile.build (modified) (1 diff)
-
Makefile.common (modified) (5 diffs)
-
arch/amd64/Makefile.inc (modified) (2 diffs)
-
arch/arm32/src/main.c (modified) (1 diff)
-
arch/ia64/Makefile.inc (modified) (1 diff)
-
arch/ia64/_link.ld.in (modified) (2 diffs)
-
arch/ia64/include/types.h (modified) (2 diffs)
-
arch/ia64/src/boot.S (modified) (1 diff)
-
arch/ia64/src/main.c (modified) (1 diff)
-
arch/mips32/include/arch.h (modified) (1 diff)
-
arch/mips32/src/asm.S (modified) (3 diffs)
-
arch/mips32/src/main.c (modified) (2 diffs)
-
arch/ppc32/include/types.h (modified) (1 diff)
-
arch/ppc32/src/main.c (modified) (1 diff)
-
arch/sparc64/Makefile.inc (modified) (1 diff)
-
arch/sparc64/include/arch.h (modified) (1 diff)
-
arch/sparc64/include/types.h (modified) (1 diff)
-
arch/sparc64/src/asm.S (modified) (1 diff)
-
arch/sparc64/src/main.c (modified) (5 diffs)
-
genarch/include/ofw.h (modified) (1 diff)
-
genarch/src/ofw.c (modified) (5 diffs)
-
generic/include/printf.h (modified) (1 diff)
-
generic/include/stdint.h (modified) (1 diff)
-
generic/include/typedefs.h (modified) (2 diffs)
-
generic/src/balloc.c (modified) (1 diff)
-
generic/src/printf_core.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
re80329d6 rb5e68c8 55 55 cp "$$file" "$(DIST_PATH)/srv/" ; \ 56 56 done 57 for file in $(RD_LIBS) ; do \ 58 cp "$$file" "$(DIST_PATH)/lib/" ; \ 59 done 57 60 for file in $(RD_APPS) ; do \ 58 61 cp "$$file" "$(DIST_PATH)/app/" ; \ … … 83 86 rm -f $(USPACE_PATH)/dist/srv/* 84 87 rm -rf $(USPACE_PATH)/dist/drv/* 88 rm -f $(USPACE_PATH)/dist/lib/* 85 89 rm -f $(USPACE_PATH)/dist/app/* 86 90 rm -f $(USPACE_PATH)/dist/cfg/net/* -
boot/Makefile.build
re80329d6 rb5e68c8 111 111 112 112 $(RAW): $(OBJECTS) $(COMPONENT_OBJECTS) $(LINK) 113 $(LD) - N$(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(COMPONENT_OBJECTS) $(OBJECTS)113 $(LD) -n $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(COMPONENT_OBJECTS) $(OBJECTS) 114 114 115 115 $(LINK): $(LINK).comp $(DEPEND) -
boot/Makefile.common
re80329d6 rb5e68c8 98 98 $(USPACE_PATH)/srv/fs/fat/fat \ 99 99 $(USPACE_PATH)/srv/taskmon/taskmon \ 100 $(USPACE_PATH)/srv/hw/netif/ dp8390/dp8390 \100 $(USPACE_PATH)/srv/hw/netif/ne2000/ne2000 \ 101 101 $(USPACE_PATH)/srv/net/netif/lo/lo \ 102 $(USPACE_PATH)/srv/net/nil/eth/eth \ 103 $(USPACE_PATH)/srv/net/nil/nildummy/nildummy \ 102 104 $(USPACE_PATH)/srv/net/il/arp/arp \ 103 105 $(USPACE_PATH)/srv/net/il/ip/ip \ … … 106 108 $(USPACE_PATH)/srv/net/tl/tcp/tcp \ 107 109 $(USPACE_PATH)/srv/net/net/net \ 108 $(USPACE_PATH)/srv/net/netstart/netstart \109 110 $(USPACE_PATH)/srv/devman/devman 110 111 111 112 RD_DRVS = \ 112 root 113 root \ 114 rootvirt \ 115 test1 \ 116 test2 113 117 114 118 RD_DRV_CFG = 115 119 116 ifneq ($(CONFIG_NETIF_NIL_BUNDLE),y) 117 RD_SRVS_NON_ESSENTIAL += \ 118 $(USPACE_PATH)/srv/net/nil/eth/eth \ 119 $(USPACE_PATH)/srv/net/nil/nildummy/nildummy 120 RD_LIBS = 121 122 ifeq ($(CONFIG_BUILD_SHARED_LIBS), y) 123 RD_LIBS += \ 124 $(USPACE_PATH)/lib/c/libc.so0 \ 125 $(USPACE_PATH)/lib/softint/libsofti.so0 126 RD_APPS += \ 127 $(USPACE_PATH)/app/dltest/dltest 120 128 endif 121 129 … … 126 134 127 135 RD_APPS_NON_ESSENTIAL = \ 136 $(USPACE_PATH)/app/dltest/dltest \ 137 $(USPACE_PATH)/app/dltest2/dltest2 \ 138 $(USPACE_PATH)/app/dload/dload \ 128 139 $(USPACE_PATH)/app/edit/edit \ 140 $(USPACE_PATH)/app/kill/kill \ 141 $(USPACE_PATH)/app/killall/killall \ 129 142 $(USPACE_PATH)/app/mkfat/mkfat \ 130 143 $(USPACE_PATH)/app/sbi/sbi \ … … 132 145 $(USPACE_PATH)/app/taskdump/taskdump \ 133 146 $(USPACE_PATH)/app/tester/tester \ 134 $(USPACE_PATH)/app/test_serial/test_serial \135 147 $(USPACE_PATH)/app/tetris/tetris \ 136 148 $(USPACE_PATH)/app/trace/trace \ … … 140 152 $(USPACE_PATH)/app/ping/ping \ 141 153 $(USPACE_PATH)/app/stats/stats \ 142 $(USPACE_PATH)/app/tasks/tasks \ 143 $(USPACE_PATH)/app/top/top 154 $(USPACE_PATH)/app/top/top \ 155 $(USPACE_PATH)/app/sysinfo/sysinfo \ 156 $(USPACE_PATH)/app/websrv/websrv 144 157 145 158 ifneq ($(CONFIG_BAREBONE),y) -
boot/arch/amd64/Makefile.inc
re80329d6 rb5e68c8 30 30 31 31 RD_SRVS_ESSENTIAL += \ 32 $(USPACE_PATH)/srv/hw/char/i8042/i8042 32 $(USPACE_PATH)/srv/hw/char/i8042/i8042 \ 33 $(USPACE_PATH)/srv/hw/irc/apic/apic \ 34 $(USPACE_PATH)/srv/hw/irc/i8259/i8259 33 35 34 36 RD_SRVS_NON_ESSENTIAL += \ … … 37 39 38 40 RD_DRVS += \ 39 root ia32\41 rootpc \ 40 42 pciintel \ 41 43 isa \ 42 44 ns8250 43 45 44 46 RD_DRV_CFG += \ 45 47 isa/isa.dev -
boot/arch/arm32/src/main.c
re80329d6 rb5e68c8 61 61 printf(" %p|%p: bootstrap page table\n", &boot_pt, &boot_pt); 62 62 printf(" %p|%p: boot info structure\n", &bootinfo, &bootinfo); 63 printf(" %p|%p: kernel entry point\n", PA2KA(BOOT_OFFSET), BOOT_OFFSET); 63 printf(" %p|%p: kernel entry point\n", 64 (void *) PA2KA(BOOT_OFFSET), (void *) BOOT_OFFSET); 64 65 65 66 size_t i; -
boot/arch/ia64/Makefile.inc
re80329d6 rb5e68c8 34 34 ENDIANESS = LE 35 35 PAGE_SIZE = 16384 36 EXTRA_CFLAGS = -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic 36 EXTRA_CFLAGS = -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -mno-sdata 37 37 38 38 RD_SRVS_NON_ESSENTIAL += -
boot/arch/ia64/_link.ld.in
re80329d6 rb5e68c8 11 11 *(.rodata); 12 12 *(.rodata.*); 13 *(.data );/* initialized data */14 _ got= . ;13 *(.data .data.*); /* initialized data */ 14 __gp = . ; 15 15 *(.got .got.*); 16 16 *(.bss); /* uninitialized static variables */ … … 20 20 21 21 /DISCARD/ : { 22 *(.comment); 23 *(.note*); 22 *(.*); 24 23 } 25 24 } -
boot/arch/ia64/include/types.h
re80329d6 rb5e68c8 35 35 36 36 typedef uint64_t size_t; 37 typedef uint64_t unative_t;37 typedef uint64_t sysarg_t; 38 38 typedef uint64_t uintptr_t; 39 39 … … 61 61 unsigned int memmap_items; 62 62 63 unative_t *sapic;63 sysarg_t *sapic; 64 64 unsigned long sys_freq; 65 65 unsigned long freq_scale; -
boot/arch/ia64/src/boot.S
re80329d6 rb5e68c8 34 34 .global start 35 35 start: 36 movl gp = LOADER_ADDRESS36 movl gp = __gp 37 37 38 38 # -
boot/arch/ia64/src/main.c
re80329d6 rb5e68c8 62 62 63 63 printf(" %p|%p: boot info structure\n", &bootinfo, &bootinfo); 64 printf(" %p|%p: kernel entry point\n", KERNEL_ADDRESS, KERNEL_ADDRESS); 65 printf(" %p|%p: loader entry point\n", LOADER_ADDRESS, LOADER_ADDRESS); 64 printf(" %p|%p: kernel entry point\n", 65 (void *) KERNEL_ADDRESS, (void *) KERNEL_ADDRESS); 66 printf(" %p|%p: loader entry point\n", 67 (void *) LOADER_ADDRESS, (void *) LOADER_ADDRESS); 66 68 67 69 size_t i; 68 70 for (i = 0; i < COMPONENTS; i++) 69 printf(" %p|%p: %s image (% u/%u bytes)\n", components[i].start,71 printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start, 70 72 components[i].start, components[i].name, 71 73 components[i].inflated, components[i].size); -
boot/arch/mips32/include/arch.h
re80329d6 rb5e68c8 40 40 41 41 #define MSIM_VIDEORAM_ADDRESS 0xb0000000 42 #define MSIM_DORDER_ADDRESS 0xb0000 00442 #define MSIM_DORDER_ADDRESS 0xb0000100 43 43 44 44 #ifndef __ASM__ -
boot/arch/mips32/src/asm.S
re80329d6 rb5e68c8 41 41 42 42 start: 43 /* Setup CPU map (on msim this code 44 is executed in parallel on all CPUs, 45 but it not an issue) */ 43 /* 44 * Setup the CP0 configuration 45 * - Disable 64-bit kernel addressing mode 46 * - DIsable 64-bit supervisor adressing mode 47 * - Disable 64-bit user addressing mode 48 */ 49 mfc0 $a0, $status 50 la $a1, 0xffffff1f 51 and $a0, $a1, $a0 52 mtc0 $a0, $status 53 54 /* 55 * Setup CPU map (on msim this code 56 * is executed in parallel on all CPUs, 57 * but it not an issue). 58 */ 46 59 la $a0, PA2KA(CPUMAP_OFFSET) 47 60 … … 94 107 lw $k1, ($k0) 95 108 96 /* If we are not running on BSP 97 then end in an infinite loop */ 109 /* 110 * If we are not running on BSP 111 * then end in an infinite loop. 112 */ 98 113 beq $k1, $zero, bsp 99 114 nop … … 127 142 128 143 jump_to_kernel: 129 # 130 # TODO: 131 # Make sure that the I-cache, D-cache and memory are mutually coherent 132 # before passing control to the copied code. 133 # 144 /* 145 * TODO: 146 * 147 * Make sure that the I-cache, D-cache and memory are mutually 148 * coherent before passing control to the copied code. 149 */ 134 150 j $a0 135 151 nop -
boot/arch/mips32/src/main.c
re80329d6 rb5e68c8 51 51 52 52 printf("\nMemory statistics\n"); 53 printf(" %p|%p: CPU map\n", PA2KA(CPUMAP_OFFSET), CPUMAP_OFFSET); 54 printf(" %p|%p: bootstrap stack\n", PA2KA(STACK_OFFSET), STACK_OFFSET); 55 printf(" %p|%p: boot info structure\n", PA2KA(BOOTINFO_OFFSET), BOOTINFO_OFFSET); 56 printf(" %p|%p: kernel entry point\n", PA2KA(BOOT_OFFSET), BOOT_OFFSET); 57 printf(" %p|%p: bootloader entry point\n", PA2KA(LOADER_OFFSET), LOADER_OFFSET); 53 printf(" %p|%p: CPU map\n", (void *) PA2KA(CPUMAP_OFFSET), 54 (void *) CPUMAP_OFFSET); 55 printf(" %p|%p: bootstrap stack\n", (void *) PA2KA(STACK_OFFSET), 56 (void *) STACK_OFFSET); 57 printf(" %p|%p: boot info structure\n", 58 (void *) PA2KA(BOOTINFO_OFFSET), (void *) BOOTINFO_OFFSET); 59 printf(" %p|%p: kernel entry point\n", (void *) PA2KA(BOOT_OFFSET), 60 (void *) BOOT_OFFSET); 61 printf(" %p|%p: bootloader entry point\n", 62 (void *) PA2KA(LOADER_OFFSET), (void *) LOADER_OFFSET); 58 63 59 64 size_t i; 60 65 for (i = 0; i < COMPONENTS; i++) 61 printf(" %p|%p: %s image (% u/%u bytes)\n", components[i].start,62 KSEG2PA(components[i].start), components[i].name,66 printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start, 67 (void *) KSEG2PA(components[i].start), components[i].name, 63 68 components[i].inflated, components[i].size); 64 69 … … 91 96 if (tail >= ((void *) PA2KA(LOADER_OFFSET))) { 92 97 printf("\n%s: Image too large to fit (%p >= %p), halting.\n", 93 components[i].name, tail, PA2KA(LOADER_OFFSET));98 components[i].name, tail, (void *) PA2KA(LOADER_OFFSET)); 94 99 halt(); 95 100 } -
boot/arch/ppc32/include/types.h
re80329d6 rb5e68c8 35 35 typedef uint32_t size_t; 36 36 typedef uint32_t uintptr_t; 37 typedef uint32_t unative_t;37 typedef uint32_t sysarg_t; 38 38 typedef int32_t native_t; 39 39 -
boot/arch/ppc32/src/main.c
re80329d6 rb5e68c8 68 68 printf(" %p|%p: real mode trampoline\n", &real_mode, real_mode_pa); 69 69 printf(" %p|%p: boot info structure\n", &bootinfo, bootinfo_pa); 70 printf(" %p|%p: kernel entry point\n", PA2KA(BOOT_OFFSET), BOOT_OFFSET); 71 printf(" %p|%p: loader entry point\n", LOADER_ADDRESS, loader_address_pa); 70 printf(" %p|%p: kernel entry point\n", 71 (void *) PA2KA(BOOT_OFFSET), (void *) BOOT_OFFSET); 72 printf(" %p|%p: loader entry point\n", 73 (void *) LOADER_ADDRESS, loader_address_pa); 72 74 73 75 size_t i; 74 76 for (i = 0; i < COMPONENTS; i++) 75 printf(" %p|%p: %s image (% u/%u bytes)\n", components[i].start,77 printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start, 76 78 ofw_translate(components[i].start), components[i].name, 77 79 components[i].inflated, components[i].size); -
boot/arch/sparc64/Makefile.inc
re80329d6 rb5e68c8 43 43 44 44 RD_SRVS_ESSENTIAL += \ 45 $(USPACE_PATH)/srv/hw/ cir/fhc/fhc \46 $(USPACE_PATH)/srv/hw/ cir/obio/obio45 $(USPACE_PATH)/srv/hw/irc/fhc/fhc \ 46 $(USPACE_PATH)/srv/hw/irc/obio/obio 47 47 48 48 SOURCES = \ -
boot/arch/sparc64/include/arch.h
re80329d6 rb5e68c8 41 41 #define STACK_BIAS 2047 42 42 #define STACK_WINDOW_SAVE_AREA_SIZE (16 * 8) 43 #define STACK_ARG_SAVE_AREA_SIZE (6 * 8) 43 44 44 45 #define NWINDOWS 8 -
boot/arch/sparc64/include/types.h
re80329d6 rb5e68c8 35 35 typedef uint64_t size_t; 36 36 typedef uint64_t uintptr_t; 37 typedef uint64_t unative_t;37 typedef uint64_t sysarg_t; 38 38 typedef int64_t native_t; 39 39 -
boot/arch/sparc64/src/asm.S
re80329d6 rb5e68c8 152 152 .global ofw 153 153 ofw: 154 save %sp, - STACK_WINDOW_SAVE_AREA_SIZE, %sp154 save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp 155 155 set ofw_cif, %l0 156 156 ldx [%l0], %l0 -
boot/arch/sparc64/src/main.c
re80329d6 rb5e68c8 190 190 bootinfo.memmap.zones[0].start += OBP_BIAS; 191 191 bootinfo.memmap.zones[0].size -= OBP_BIAS; 192 bootinfo.memmap.total -= OBP_BIAS; 192 193 } 193 194 … … 204 205 bootinfo.physmem_start = ofw_get_physmem_start(); 205 206 ofw_memmap(&bootinfo.memmap); 207 208 if (arch == ARCH_SUN4V) 209 sun4v_fixups(); 206 210 207 211 void *bootinfo_pa = ofw_translate(&bootinfo); … … 209 213 void *loader_address_pa = ofw_translate((void *) LOADER_ADDRESS); 210 214 211 printf("\nMemory statistics (total %llu MB, starting at %p)\n", 212 bootinfo.memmap.total >> 20, bootinfo.physmem_start); 213 printf(" %p|%p: boot info structure\n", &bootinfo, bootinfo_pa); 214 printf(" %p|%p: kernel entry point\n", KERNEL_ADDRESS, kernel_address_pa); 215 printf(" %p|%p: loader entry point\n", LOADER_ADDRESS, loader_address_pa); 215 printf("\nMemory statistics (total %" PRIu64 " MB, starting at %p)\n", 216 bootinfo.memmap.total >> 20, (void *) bootinfo.physmem_start); 217 printf(" %p|%p: boot info structure\n", &bootinfo, (void *) bootinfo_pa); 218 printf(" %p|%p: kernel entry point\n", 219 (void *) KERNEL_ADDRESS, (void *) kernel_address_pa); 220 printf(" %p|%p: loader entry point\n", 221 (void *) LOADER_ADDRESS, (void *) loader_address_pa); 216 222 217 223 size_t i; 218 224 for (i = 0; i < COMPONENTS; i++) 219 printf(" %p|%p: %s image (% u/%u bytes)\n", components[i].start,225 printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start, 220 226 ofw_translate(components[i].start), components[i].name, 221 227 components[i].inflated, components[i].size); … … 251 257 252 258 /* 253 * At this point, we claim the physical memory that we are254 * going to use. We should be safe in case of the virtual259 * At this point, we claim and map the physical memory that we 260 * are going to use. We should be safe in case of the virtual 255 261 * address space because the OpenFirmware, according to its 256 * SPARC binding, should restrict its use of virtual memory 257 * to addresses from [0xffd00000; 0xffefffff] and 258 * [0xfe000000; 0xfeffffff]. 259 * 260 * We don't map this piece of memory. We simply rely on 261 * SILO to have it done for us already in this case. 262 * 263 * XXX SILO only maps 8 MB for us here. We should improve 264 * this code to be totally independent on the behavior 265 * of SILO. 266 * 262 * SPARC binding, should restrict its use of virtual memory to 263 * addresses from [0xffd00000; 0xffefffff] and [0xfe000000; 264 * 0xfeffffff]. 267 265 */ 268 266 ofw_claim_phys(bootinfo.physmem_start + dest[i - 1], 269 267 ALIGN_UP(components[i - 1].inflated, PAGE_SIZE)); 268 269 ofw_map(bootinfo.physmem_start + dest[i - 1], dest[i - 1], 270 ALIGN_UP(components[i - 1].inflated, PAGE_SIZE), -1); 270 271 271 272 int err = inflate(components[i - 1].start, components[i - 1].size, … … 302 303 sun4u_smp(); 303 304 304 if (arch == ARCH_SUN4V)305 sun4v_fixups();306 307 305 printf("Booting the kernel ...\n"); 308 306 jump_to_kernel(bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo, subarch, -
boot/genarch/include/ofw.h
re80329d6 rb5e68c8 40 40 #define OFW_TREE_PROPERTY_MAX_VALUELEN 64 41 41 42 typedef unative_t ofw_arg_t;42 typedef sysarg_t ofw_arg_t; 43 43 typedef native_t ofw_ret_t; 44 44 typedef uint32_t ofw_prop_t; -
boot/genarch/src/ofw.c
re80329d6 rb5e68c8 243 243 void *addr = ofw_claim_virt_internal(virt, len, 0); 244 244 if (addr != virt) { 245 printf("Error: Unable to claim virtual memory %p (size % u), halting.\n",245 printf("Error: Unable to claim virtual memory %p (size %zu), halting.\n", 246 246 virt, len); 247 247 halt(); … … 254 254 255 255 if (addr == NULL) { 256 printf("Error: Unable to claim % u bytes in virtual memory, halting.\n",256 printf("Error: Unable to claim %zu bytes in virtual memory, halting.\n", 257 257 len); 258 258 halt(); … … 305 305 void *addr = ofw_claim_phys_internal(phys, len, 0); 306 306 if (addr != phys) { 307 printf("Error: Unable to claim physical memory %p (size % u), halting.\n",307 printf("Error: Unable to claim physical memory %p (size %zu), halting.\n", 308 308 phys, len); 309 309 halt(); … … 315 315 void *addr = ofw_claim_phys_internal(NULL, len, alignment); 316 316 if (addr == NULL) { 317 printf("Error: Unable to claim % u bytes in physical memory, halting.\n",317 printf("Error: Unable to claim %zu bytes in physical memory, halting.\n", 318 318 len); 319 319 halt(); … … 343 343 344 344 if (ret != 0) { 345 printf("Error: Unable to map %p to %p (size % u), halting.\n",345 printf("Error: Unable to map %p to %p (size %zu), halting.\n", 346 346 virt, phys, size); 347 347 halt(); -
boot/generic/include/printf.h
re80329d6 rb5e68c8 36 36 #include <stdarg.h> 37 37 38 #ifndef NVERIFY_PRINTF 39 40 #define PRINTF_ATTRIBUTE(start, end) \ 41 __attribute__((format(gnu_printf, start, end))) 42 43 #else /* NVERIFY_PRINTF */ 44 45 #define PRINTF_ATTRIBUTE(start, end) 46 47 #endif /* NVERIFY_PRINTF */ 48 38 49 #define EOF (-1) 39 50 40 51 extern int puts(const char *); 41 extern int printf(const char *, ...); 52 extern int printf(const char *, ...) 53 PRINTF_ATTRIBUTE(1, 2); 42 54 extern int vprintf(const char *, va_list); 43 55 -
boot/generic/include/stdint.h
re80329d6 rb5e68c8 33 33 #define BOOT_STDINT_H_ 34 34 35 #define INT8_MIN (0x80)36 #define INT8_MAX (0x7F)35 #define INT8_MIN INT8_C(0x80) 36 #define INT8_MAX INT8_C(0x7F) 37 37 38 #define UINT8_MIN (0u)39 #define UINT8_MAX (0xFFu)38 #define UINT8_MIN UINT8_C(0) 39 #define UINT8_MAX UINT8_C(0xFF) 40 40 41 #define INT16_MIN (0x8000)42 #define INT16_MAX (0x7FFF)41 #define INT16_MIN INT16_C(0x8000) 42 #define INT16_MAX INT16_C(0x7FFF) 43 43 44 #define UINT16_MIN (0u)45 #define UINT16_MAX (0xFFFFu)44 #define UINT16_MIN UINT16_C(0) 45 #define UINT16_MAX UINT16_C(0xFFFF) 46 46 47 #define INT32_MIN (0x80000000l)48 #define INT32_MAX (0x7FFFFFFFl)47 #define INT32_MIN INT32_C(0x80000000) 48 #define INT32_MAX INT32_C(0x7FFFFFFF) 49 49 50 #define UINT32_MIN (0ul)51 #define UINT32_MAX (0xFFFFFFFFul)50 #define UINT32_MIN UINT32_C(0) 51 #define UINT32_MAX UINT32_C(0xFFFFFFFF) 52 52 53 #define INT64_MIN (0x8000000000000000ll)54 #define INT64_MAX (0x7FFFFFFFFFFFFFFFll)53 #define INT64_MIN INT64_C(0x8000000000000000) 54 #define INT64_MAX INT64_C(0x7FFFFFFFFFFFFFFF) 55 55 56 #define UINT64_MIN (0ull)57 #define UINT64_MAX (0xFFFFFFFFFFFFFFFFull)56 #define UINT64_MIN UINT64_C(0) 57 #define UINT64_MAX UINT64_C(0xFFFFFFFFFFFFFFFF) 58 58 59 59 #endif -
boot/generic/include/typedefs.h
re80329d6 rb5e68c8 37 37 #include <arch/types.h> 38 38 39 #define NULL 039 #define NULL ((void *) 0) 40 40 41 41 #define false 0 … … 43 43 44 44 typedef uint8_t bool; 45 typedef int32_t wchar_t;46 45 47 46 #endif -
boot/generic/src/balloc.c
re80329d6 rb5e68c8 65 65 void *balloc_rebase(void *ptr) 66 66 { 67 return (void *) (( uintptr_t) ptr - phys_base+ ballocs->base);67 return (void *) (((uintptr_t) ptr - phys_base) + ballocs->base); 68 68 } -
boot/generic/src/printf_core.c
re80329d6 rb5e68c8 79 79 PrintfQualifierLong, 80 80 PrintfQualifierLongLong, 81 PrintfQualifierPointer 81 PrintfQualifierPointer, 82 PrintfQualifierSize 82 83 } qualifier_t; 83 84 … … 431 432 * - "" Signed or unsigned int (default value).@n 432 433 * - "l" Signed or unsigned long int.@n 433 * If conversion is "c", the character is wchar_t (wide character).@n434 * If conversion is "s", the string is wchar_t * (wide string).@n435 434 * - "ll" Signed or unsigned long long int.@n 436 435 * … … 612 611 } 613 612 break; 613 case 'z': 614 qualifier = PrintfQualifierSize; 615 i = nxt; 616 uc = str_decode(fmt, &nxt, STR_NO_LIMIT); 617 break; 614 618 default: 615 619 /* Default type */ … … 720 724 number = (uint64_t) (uintptr_t) va_arg(ap, void *); 721 725 break; 726 case PrintfQualifierSize: 727 size = sizeof(size_t); 728 number = (uint64_t) va_arg(ap, size_t); 729 break; 722 730 default: 723 731 /* Unknown qualifier */
Note:
See TracChangeset
for help on using the changeset viewer.
