- Timestamp:
- 2011-09-04T11:30:58Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 03bc76a
- Parents:
- d2c67e7 (diff), deac215e (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:
-
- 16 added
- 2 deleted
- 15 edited
- 2 moved
-
Makefile (modified) (2 diffs)
-
Makefile.common (modified) (7 diffs)
-
Makefile.silo (modified) (1 diff)
-
Makefile.uboot (modified) (2 diffs)
-
arch/amd64/Makefile.inc (modified) (1 diff)
-
arch/ia64/Makefile.inc (modified) (1 diff)
-
arch/ia64/include/pal.h (moved) (moved from uspace/lib/c/include/devmap_obsolete.h ) (2 diffs)
-
arch/ia64/include/sal.h (added)
-
arch/ia64/include/types.h (modified) (3 diffs)
-
arch/ia64/src/boot.S (modified) (2 diffs)
-
arch/ia64/src/main.c (modified) (3 diffs)
-
arch/ia64/src/pal.c (added)
-
arch/ia64/src/pal_asm.S (added)
-
arch/ia64/src/sal.c (moved) (moved from kernel/genarch/include/ofw/fhc.h ) (2 diffs)
-
arch/ia64/src/sal_asm.S (added)
-
arch/mips32/Makefile.inc (modified) (1 diff)
-
arch/mips32/src/asm.S (modified) (1 diff)
-
arch/mips64/Makefile.inc (added)
-
arch/mips64/_link.ld.in (added)
-
arch/mips64/include/arch.h (added)
-
arch/mips64/include/asm.h (added)
-
arch/mips64/include/main.h (added)
-
arch/mips64/include/regname.h (added)
-
arch/mips64/include/types.h (added)
-
arch/mips64/src/asm.S (added)
-
arch/mips64/src/main.c (added)
-
arch/mips64/src/putchar.c (added)
-
arch/ppc32/Makefile.inc (modified) (1 diff)
-
arch/sparc64/Makefile.inc (modified) (1 diff)
-
arch/sparc64/src/main.c (modified) (1 diff)
-
genarch/include/efi.h (added)
-
genarch/src/efi.c (added)
-
generic/src/printf_core.c (modified) (4 diffs)
-
silo/raw/isofs.b (deleted)
-
silo/raw/second.b (deleted)
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
rd2c67e7 r8ff0bd2 50 50 $(MKFAT) 1048576 $(DIST_PATH) $@ 51 51 endif 52 ifeq ($(RDFMT),ext2fs) 53 $(MKEXT2) 1048576 $(DIST_PATH) $@ 54 endif 52 55 53 56 build_dist: clean_dist … … 65 68 done 66 69 for drv in $(RD_DRVS) ; do \ 67 mkdir -p "$(DIST_PATH)/$(DRVS_PATH)/$$drv" ; \ 68 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv/$$drv" "$(DIST_PATH)/$(DRVS_PATH)/$$drv/$$drv" ; \ 69 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv/$$drv.ma" "$(DIST_PATH)/$(DRVS_PATH)/$$drv/$$drv.ma" ; \ 70 drv_dir="`dirname "$$drv"`" ; \ 71 drv_name="`basename "$$drv"`" ; \ 72 mkdir -p "$(DIST_PATH)/$(DRVS_PATH)/$$drv_name" ; \ 73 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv_dir/$$drv_name/$$drv_name" "$(DIST_PATH)/$(DRVS_PATH)/$$drv_name/" ; \ 74 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv_dir/$$drv_name/$$drv_name.ma" "$(DIST_PATH)/$(DRVS_PATH)/$$drv_name/" ; \ 70 75 done 71 76 for file in $(RD_DRV_CFG) ; do \ 72 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file" "$(DIST_PATH)/$(DRVS_PATH)/$$file" ; \ 77 file_dir="`dirname "$$file"`" ; \ 78 file_name="`basename "$$file"`" ; \ 79 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file_dir/$$file_name/$$file_name.dev" "$(DIST_PATH)/$(DRVS_PATH)/$$file_name/" ; \ 73 80 done 74 81 75 82 clean: clean_dist 76 83 $(MAKE) -f $(BUILD) clean PRECHECK=$(PRECHECK) -
boot/Makefile.common
rd2c67e7 r8ff0bd2 56 56 MKTMPFS = $(TOOLS_PATH)/mktmpfs.py 57 57 MKFAT = $(TOOLS_PATH)/mkfat.py 58 MKEXT2 = $(TOOLS_PATH)/mkext2.py 58 59 MKUIMAGE = $(TOOLS_PATH)/mkuimage.py 59 60 … … 72 73 $(USPACE_PATH)/srv/loader/loader \ 73 74 $(USPACE_PATH)/app/init/init \ 74 $(USPACE_PATH)/srv/ devmap/devmap\75 $(USPACE_PATH)/srv/loc/loc \ 75 76 $(USPACE_PATH)/srv/bd/rd/rd \ 76 77 $(USPACE_PATH)/srv/vfs/vfs … … 84 85 endif 85 86 87 ifeq ($(RDFMT),ext2fs) 88 INIT_TASKS += $(USPACE_PATH)/srv/fs/ext2fs/ext2fs 89 endif 90 86 91 RD_SRVS_ESSENTIAL = \ 87 92 $(USPACE_PATH)/srv/hid/fb/fb \ 88 $(USPACE_PATH)/srv/hid/ kbd/kbd\93 $(USPACE_PATH)/srv/hid/input/input \ 89 94 $(USPACE_PATH)/srv/hid/console/console \ 90 $(USPACE_PATH)/srv/fs/ devfs/devfs95 $(USPACE_PATH)/srv/fs/locfs/locfs 91 96 92 97 RD_SRVS_NON_ESSENTIAL = \ … … 98 103 $(USPACE_PATH)/srv/fs/fat/fat \ 99 104 $(USPACE_PATH)/srv/fs/minixfs/mfs \ 105 $(USPACE_PATH)/srv/fs/exfat/exfat \ 100 106 $(USPACE_PATH)/srv/fs/ext2fs/ext2fs \ 101 107 $(USPACE_PATH)/srv/taskmon/taskmon \ … … 111 117 $(USPACE_PATH)/srv/net/net/net \ 112 118 $(USPACE_PATH)/srv/devman/devman 113 119 114 120 RD_DRVS = \ 115 root \116 rootvirt \117 test 1 \118 test 2 \119 test 3120 121 RD_DRV_CFG = 121 infrastructure/root \ 122 infrastructure/rootvirt \ 123 test/test1 \ 124 test/test2 \ 125 test/test3 126 127 RD_DRV_CFG = 122 128 123 129 RD_LIBS = … … 139 145 $(USPACE_PATH)/app/blkdump/blkdump \ 140 146 $(USPACE_PATH)/app/bnchmark/bnchmark \ 147 $(USPACE_PATH)/app/devctl/devctl \ 141 148 $(USPACE_PATH)/app/dltest/dltest \ 142 149 $(USPACE_PATH)/app/dltest2/dltest2 \ … … 146 153 $(USPACE_PATH)/app/kill/kill \ 147 154 $(USPACE_PATH)/app/killall/killall \ 155 $(USPACE_PATH)/app/locinfo/locinfo \ 148 156 $(USPACE_PATH)/app/mkfat/mkfat \ 149 157 $(USPACE_PATH)/app/mkminix/mkminix \ -
boot/Makefile.silo
rd2c67e7 r8ff0bd2 31 31 include Makefile.common 32 32 33 ifeq ($(CONFIG_AOUT_ISOFS_B),y) 34 SILO_PACKAGE = a.out 35 else 36 SILO_PACKAGE = raw 37 endif 33 SILO_PACKAGE = a.out 38 34 39 35 ISOFS_B = silo/$(SILO_PACKAGE)/isofs.b -
boot/Makefile.uboot
rd2c67e7 r8ff0bd2 31 31 include Makefile.common 32 32 33 IMAGE_NAME =HelenOS-$(RELEASE)34 BIN_OUTPUT =image.bin33 IMAGE_NAME = HelenOS-$(RELEASE) 34 BIN_OUTPUT = image.bin 35 35 36 36 all: $(POST_OUTPUT) … … 40 40 41 41 $(POST_OUTPUT): $(BIN_OUTPUT) 42 $(MKUIMAGE) -name "$(IMAGE_NAME)" -laddr 0x30008000 -saddr 0x30008000 \ 43 $< $@ 42 $(MKUIMAGE) -name "$(IMAGE_NAME)" -laddr 0x30008000 -saddr 0x30008000 $< $@ 44 43 45 44 clean: -
boot/arch/amd64/Makefile.inc
rd2c67e7 r8ff0bd2 35 35 36 36 RD_SRVS_NON_ESSENTIAL += \ 37 $(USPACE_PATH)/srv/bd/ata_bd/ata_bd \ 38 $(USPACE_PATH)/srv/hid/char_mouse/char_ms 37 $(USPACE_PATH)/srv/bd/ata_bd/ata_bd 39 38 40 39 RD_DRVS += \ 41 rootpc \42 pciintel \43 isa \44 ns8250 \45 ehci_hcd\46 ohci \47 uhci_hcd\48 uhci_rhd\49 usbflbk \50 usbhub \51 usbhid \52 usbmast \53 usbmid \54 usbmouse \55 vhc40 infrastructure/rootpc \ 41 bus/pci/pciintel \ 42 bus/isa \ 43 char/ns8250 \ 44 bus/usb/ehci\ 45 bus/usb/ohci \ 46 bus/usb/uhci \ 47 bus/usb/uhcirh \ 48 bus/usb/usbflbk \ 49 bus/usb/usbhub \ 50 bus/usb/usbhid \ 51 bus/usb/usbmast \ 52 bus/usb/usbmid \ 53 bus/usb/usbmouse \ 54 bus/usb/vhc 56 55 57 56 RD_DRV_CFG += \ 58 isa/isa.dev57 bus/isa 59 58 60 59 BOOT_OUTPUT = $(ROOT_PATH)/image.iso -
boot/arch/ia64/Makefile.inc
rd2c67e7 r8ff0bd2 45 45 arch/$(BARCH)/src/asm.S \ 46 46 arch/$(BARCH)/src/main.c \ 47 arch/$(BARCH)/src/sal.c \ 48 arch/$(BARCH)/src/sal_asm.S \ 49 arch/$(BARCH)/src/pal.c \ 50 arch/$(BARCH)/src/pal_asm.S \ 47 51 arch/$(BARCH)/src/putchar.c \ 48 52 $(COMPS_C) \ 53 genarch/src/efi.c \ 49 54 genarch/src/division.c \ 50 55 generic/src/balloc.c \ -
boot/arch/ia64/include/pal.h
rd2c67e7 r8ff0bd2 1 1 /* 2 * Copyright (c) 20 09 Jiri Svoboda2 * Copyright (c) 2011 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libc 30 * @{ 29 #ifndef BOOT_ia64_PAL_H_ 30 #define BOOT_ia64_PAL_H_ 31 32 #include <arch/types.h> 33 #include <typedefs.h> 34 35 /* 36 * Essential PAL procedures' IDs 31 37 */ 32 /** @file 33 */ 38 #define PAL_FREQ_RATIOS 14 34 39 35 #ifndef LIBC_DEVMAP_OBSOLETE_H_ 36 #define LIBC_DEVMAP_OBSOLETE_H_ 40 extern uint64_t pal_proc_freq_ratio(void); 37 41 38 #include <ipc/devmap.h> 39 #include <async.h> 40 #include <bool.h> 42 #define pal_static_call_0_1(id, ret1) \ 43 pal_static_call((id), 0, 0, 0, (ret1), NULL, NULL) 41 44 42 extern int devmap_obsolete_get_phone(devmap_interface_t, unsigned int); 43 extern void devmap_obsolete_hangup_phone(devmap_interface_t iface); 44 45 extern int devmap_obsolete_device_connect(devmap_handle_t, unsigned int); 45 extern uint64_t pal_static_call(uint64_t, uint64_t, uint64_t, uint64_t, 46 uint64_t *, uint64_t *, uint64_t *); 46 47 47 48 #endif 48 49 /** @}50 */ -
boot/arch/ia64/include/types.h
rd2c67e7 r8ff0bd2 30 30 #define BOOT_ia64_TYPES_H_ 31 31 32 #include <arch/common.h> 33 32 34 #define TASKMAP_MAX_RECORDS 32 33 35 #define BOOTINFO_TASK_NAME_BUFLEN 32 34 #define MEMMAP_ITEMS 128 36 #define MEMMAP_ITEMS 128 35 37 36 38 typedef uint64_t size_t; … … 53 55 unsigned long base; 54 56 unsigned long size; 55 } efi_memmap_item_t;57 } memmap_item_t; 56 58 57 59 typedef struct { 58 60 binit_t taskmap; 59 61 60 efi_memmap_item_t memmap[MEMMAP_ITEMS];62 memmap_item_t memmap[MEMMAP_ITEMS]; 61 63 unsigned int memmap_items; 62 64 … … 65 67 unsigned long freq_scale; 66 68 unsigned int wakeup_intno; 67 int hello_configured;68 69 } bootinfo_t; 69 70 71 /** This is a minimal ELILO-compatible boot parameter structure. */ 72 typedef struct { 73 uint64_t cmd_line; 74 uint64_t efi_system_table; 75 uint64_t efi_memmap; 76 uint64_t efi_memmap_sz; 77 uint64_t efi_memdesc_sz; 78 } boot_param_t; 79 70 80 #endif -
boot/arch/ia64/src/boot.S
rd2c67e7 r8ff0bd2 37 37 38 38 # 39 # Save the boot parameter structure address passed from the 40 # ELILO-compatible EFI loader. 41 # 42 movl r8 = bootpar ;; 43 st8 [r8] = r28 44 45 # 39 46 # Initialize the register stack to some sane value. 40 47 # … … 62 69 .bss 63 70 71 .global bootpar 72 bootpar: 73 .quad 0 74 64 75 .align STACK_SIZE 65 76 initial_stack: -
boot/arch/ia64/src/main.c
rd2c67e7 r8ff0bd2 30 30 31 31 #include <arch/main.h> 32 #include <arch/types.h> 32 33 #include <arch/arch.h> 33 34 #include <arch/asm.h> 34 35 #include <arch/_components.h> 36 #include <genarch/efi.h> 37 #include <arch/sal.h> 38 #include <arch/pal.h> 35 39 #include <halt.h> 36 40 #include <printf.h> … … 51 55 #define DEFAULT_SYS_FREQ 100000000ULL /* 100MHz */ 52 56 53 #define EFI_MEMMAP_FREE_MEM 0 54 #define EFI_MEMMAP_IO 1 55 #define EFI_MEMMAP_IO_PORTS 2 57 #define MEMMAP_FREE_MEM 0 58 #define MEMMAP_IO 1 59 #define MEMMAP_IO_PORTS 2 60 61 extern boot_param_t *bootpar; 56 62 57 63 static bootinfo_t bootinfo; 64 65 static void read_efi_memmap(void) 66 { 67 memmap_item_t *memmap = bootinfo.memmap; 68 size_t items = 0; 69 70 if (!bootpar) { 71 /* Fake-up a memory map for simulators. */ 72 memmap[items].base = DEFAULT_MEMORY_BASE; 73 memmap[items].size = DEFAULT_MEMORY_SIZE; 74 memmap[items].type = MEMMAP_FREE_MEM; 75 items++; 76 77 memmap[items].base = DEFAULT_LEGACY_IO_BASE; 78 memmap[items].size = DEFAULT_LEGACY_IO_SIZE; 79 memmap[items].type = MEMMAP_IO_PORTS; 80 items++; 81 } else { 82 char *cur, *mm_base = (char *) bootpar->efi_memmap; 83 size_t mm_size = bootpar->efi_memmap_sz; 84 size_t md_size = bootpar->efi_memdesc_sz; 85 86 /* 87 * Walk the EFI memory map using the V1 memory descriptor 88 * format. The actual memory descriptor can use newer format, 89 * but it must always be backwards compatible with the V1 90 * format. 91 */ 92 for (cur = mm_base; 93 (cur < mm_base + (mm_size - md_size)) && 94 (items < MEMMAP_ITEMS); 95 cur += md_size) { 96 efi_v1_memdesc_t *md = (efi_v1_memdesc_t *) cur; 97 98 switch ((efi_memory_type_t) md->type) { 99 case EFI_CONVENTIONAL_MEMORY: 100 memmap[items].type = MEMMAP_FREE_MEM; 101 break; 102 case EFI_MEMORY_MAPPED_IO: 103 memmap[items].type = MEMMAP_IO; 104 break; 105 case EFI_MEMORY_MAPPED_IO_PORT_SPACE: 106 memmap[items].type = MEMMAP_IO_PORTS; 107 break; 108 default: 109 continue; 110 } 111 112 memmap[items].base = md->phys_start; 113 memmap[items].size = md->pages * EFI_PAGE_SIZE; 114 items++; 115 } 116 } 117 118 bootinfo.memmap_items = items; 119 } 120 121 static void read_pal_configuration(void) 122 { 123 if (bootpar) { 124 bootinfo.freq_scale = pal_proc_freq_ratio(); 125 } else { 126 /* Configure default values for simulators. */ 127 bootinfo.freq_scale = DEFAULT_FREQ_SCALE; 128 } 129 } 130 131 static void read_sal_configuration(void) 132 { 133 if (bootpar && bootpar->efi_system_table) { 134 efi_guid_t sal_guid = SAL_SYSTEM_TABLE_GUID; 135 sal_system_table_header_t *sal_st; 136 137 sal_st = efi_vendor_table_find( 138 (efi_system_table_t *) bootpar->efi_system_table, sal_guid); 139 140 sal_system_table_parse(sal_st); 141 142 bootinfo.sys_freq = sal_base_clock_frequency(); 143 } else { 144 /* Configure default values for simulators. */ 145 bootinfo.sys_freq = DEFAULT_SYS_FREQ; 146 } 147 } 58 148 59 149 void bootstrap(void) … … 113 203 114 204 printf(".\n"); 115 116 if (!bootinfo.hello_configured) { /* XXX */ 117 /* 118 * Load configuration defaults for simulators. 119 */ 120 bootinfo.memmap_items = 0; 121 122 bootinfo.memmap[bootinfo.memmap_items].base = 123 DEFAULT_MEMORY_BASE; 124 bootinfo.memmap[bootinfo.memmap_items].size = 125 DEFAULT_MEMORY_SIZE; 126 bootinfo.memmap[bootinfo.memmap_items].type = 127 EFI_MEMMAP_FREE_MEM; 128 bootinfo.memmap_items++; 129 130 bootinfo.memmap[bootinfo.memmap_items].base = 131 DEFAULT_LEGACY_IO_BASE; 132 bootinfo.memmap[bootinfo.memmap_items].size = 133 DEFAULT_LEGACY_IO_SIZE; 134 bootinfo.memmap[bootinfo.memmap_items].type = 135 EFI_MEMMAP_IO_PORTS; 136 bootinfo.memmap_items++; 137 138 bootinfo.freq_scale = DEFAULT_FREQ_SCALE; 139 bootinfo.sys_freq = DEFAULT_SYS_FREQ; 140 } 141 205 206 read_efi_memmap(); 207 read_sal_configuration(); 208 read_pal_configuration(); 142 209 143 210 printf("Booting the kernel ...\n"); -
boot/arch/ia64/src/sal.c
rd2c67e7 r8ff0bd2 1 1 /* 2 * Copyright (c) 20 06Jakub Jermar2 * Copyright (c) 2011 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #i fndef KERN_FHC_H_30 # define KERN_FHC_H_29 #include <arch/sal.h> 30 #include <arch/types.h> 31 31 32 #include <genarch/ofw/ofw_tree.h> 33 #include <typedefs.h> 34 #include <ddi/irq.h> 35 #include <typedefs.h> 32 static sal_ap_wakeup_desc_t *sal_ap_wakeup; 36 33 37 typedef struct { 38 uint64_t addr; 39 uint32_t size; 40 } __attribute__ ((packed)) ofw_fhc_reg_t; 34 extern uint64_t pal_proc; 41 35 42 typedef struct { 43 uint64_t child_base; 44 uint64_t parent_base; 45 uint32_t size; 46 } __attribute__ ((packed)) ofw_fhc_range_t; 36 uint64_t sal_proc = 0; 37 uint64_t sal_proc_gp = 0; 47 38 48 typedef struct { 49 uint64_t addr; 50 uint 32_t size;51 } __attribute__ ((packed)) ofw_central_reg_t;39 void sal_system_table_parse(sal_system_table_header_t *sst) 40 { 41 uint8_t *cur = (uint8_t *) &sst[1]; 42 uint16_t entry; 52 43 53 typedef struct { 54 uint64_t child_base; 55 uint64_t parent_base; 56 uint32_t size; 57 } __attribute__ ((packed)) ofw_central_range_t; 44 for (entry = 0; entry < sst->entry_count; entry++) { 45 switch ((sal_sst_type_t) *cur) { 46 case SSTT_ENTRYPOINT_DESC: 47 pal_proc = ((sal_entrypoint_desc_t *) cur)->pal_proc; 48 sal_proc = ((sal_entrypoint_desc_t *) cur)->sal_proc; 49 sal_proc_gp = ((sal_entrypoint_desc_t *) cur)->sal_proc_gp; 50 cur += sizeof(sal_entrypoint_desc_t); 51 break; 52 case SSTT_MEMORY_DESC: 53 cur += sizeof(sal_memory_desc_t); 54 break; 55 case SSTT_PLATFORM_FEATURES_DESC: 56 cur += sizeof(sal_platform_features_desc_t); 57 break; 58 case SSTT_TR_DESC: 59 cur += sizeof(sal_tr_desc_t); 60 break; 61 case SSTT_PTC_COHERENCE_DOMAIN_DESC: 62 cur += sizeof(sal_ptc_coherence_domain_desc_t); 63 break; 64 case SSTT_AP_WAKEUP_DESC: 65 sal_ap_wakeup = (sal_ap_wakeup_desc_t *) cur; 66 cur += sizeof(sal_ap_wakeup_desc_t); 67 break; 68 default: 69 return; 70 } 71 } 72 } 58 73 59 extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *, ofw_fhc_reg_t *, 60 uintptr_t *); 61 extern bool ofw_central_apply_ranges(ofw_tree_node_t *, ofw_central_reg_t *, 62 uintptr_t *); 63 64 extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *, 65 uint32_t, int *, cir_t *, void **); 66 67 #endif 74 uint64_t sal_base_clock_frequency(void) 75 { 76 uint64_t freq; 77 78 sal_call_1_1(SAL_FREQ_BASE, 0, &freq); 79 80 return freq; 81 } -
boot/arch/mips32/Makefile.inc
rd2c67e7 r8ff0bd2 30 30 BITS = 32 31 31 PAGE_SIZE = 16384 32 EXTRA_CFLAGS = -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 33 34 RD_SRVS_ESSENTIAL += 32 EXTRA_CFLAGS = -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=32 35 33 36 34 RD_SRVS_NON_ESSENTIAL += \ -
boot/arch/mips32/src/asm.S
rd2c67e7 r8ff0bd2 44 44 * Setup the CP0 configuration 45 45 * - Disable 64-bit kernel addressing mode 46 * - D Isable 64-bit supervisor adressing mode46 * - Disable 64-bit supervisor adressing mode 47 47 * - Disable 64-bit user addressing mode 48 48 */ -
boot/arch/ppc32/Makefile.inc
rd2c67e7 r8ff0bd2 43 43 $(USPACE_PATH)/srv/hw/bus/cuda_adb/cuda_adb 44 44 45 RD_ SRVS_NON_ESSENTIAL+= \46 $(USPACE_PATH)/srv/hid/adb_mouse/adb_ms45 RD_DRVS += \ 46 infrastructure/rootmac 47 47 48 48 SOURCES = \ -
boot/arch/sparc64/Makefile.inc
rd2c67e7 r8ff0bd2 43 43 44 44 RD_SRVS_ESSENTIAL += \ 45 $(USPACE_PATH)/srv/hw/irc/fhc/fhc \46 45 $(USPACE_PATH)/srv/hw/irc/obio/obio 47 46 -
boot/arch/sparc64/src/main.c
rd2c67e7 r8ff0bd2 182 182 * of the "/memory" node to find out which parts of memory 183 183 * are used by OBP and redesign the algorithm of copying 184 * kernel/init tasks/ramdisk from the bootable image to memory 185 * (which we must do anyway because of issues with claiming the memory 186 * on Serengeti). 187 * 184 * kernel/init tasks/ramdisk from the bootable image to memory. 188 185 */ 189 186 bootinfo.physmem_start += OBP_BIAS; -
boot/generic/src/printf_core.c
rd2c67e7 r8ff0bd2 70 70 */ 71 71 #define PRINT_NUMBER_BUFFER_SIZE (64 + 5) 72 73 /** Get signed or unsigned integer argument */ 74 #define PRINTF_GET_INT_ARGUMENT(type, ap, flags) \ 75 ({ \ 76 unsigned type res; \ 77 \ 78 if ((flags) & __PRINTF_FLAG_SIGNED) { \ 79 signed type arg = va_arg((ap), signed type); \ 80 \ 81 if (arg < 0) { \ 82 res = -arg; \ 83 (flags) |= __PRINTF_FLAG_NEGATIVE; \ 84 } else \ 85 res = arg; \ 86 } else \ 87 res = va_arg((ap), unsigned type); \ 88 \ 89 res; \ 90 }) 72 91 73 92 /** Enumeration of possible arguments types. … … 171 190 } 172 191 173 return (int) (counter + 1);192 return (int) (counter); 174 193 } 175 194 … … 698 717 size_t size; 699 718 uint64_t number; 719 700 720 switch (qualifier) { 701 721 case PrintfQualifierByte: 702 722 size = sizeof(unsigned char); 703 number = (uint64_t) va_arg(ap, unsigned int);723 number = PRINTF_GET_INT_ARGUMENT(int, ap, flags); 704 724 break; 705 725 case PrintfQualifierShort: 706 726 size = sizeof(unsigned short); 707 number = (uint64_t) va_arg(ap, unsigned int);727 number = PRINTF_GET_INT_ARGUMENT(int, ap, flags); 708 728 break; 709 729 case PrintfQualifierInt: 710 730 size = sizeof(unsigned int); 711 number = (uint64_t) va_arg(ap, unsigned int);731 number = PRINTF_GET_INT_ARGUMENT(int, ap, flags); 712 732 break; 713 733 case PrintfQualifierLong: 714 734 size = sizeof(unsigned long); 715 number = (uint64_t) va_arg(ap, unsigned long);735 number = PRINTF_GET_INT_ARGUMENT(long, ap, flags); 716 736 break; 717 737 case PrintfQualifierLongLong: 718 738 size = sizeof(unsigned long long); 719 number = (uint64_t) va_arg(ap, unsigned long long);739 number = PRINTF_GET_INT_ARGUMENT(long long, ap, flags); 720 740 break; 721 741 case PrintfQualifierPointer: … … 732 752 counter = -counter; 733 753 goto out; 734 }735 736 if (flags & __PRINTF_FLAG_SIGNED) {737 if (number & (0x1 << (size * 8 - 1))) {738 flags |= __PRINTF_FLAG_NEGATIVE;739 740 if (size == sizeof(uint64_t)) {741 number = -((int64_t) number);742 } else {743 number = ~number;744 number &=745 ~(0xFFFFFFFFFFFFFFFFll <<746 (size * 8));747 number++;748 }749 }750 754 } 751 755
Note:
See TracChangeset
for help on using the changeset viewer.
