- Timestamp:
- 2011-07-13T22:39:18Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e6910c8
- Parents:
- 5974661 (diff), 8ecef91 (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:
-
- 11 added
- 2 deleted
- 12 edited
-
Makefile (modified) (1 diff)
-
Makefile.common (modified) (2 diffs)
-
Makefile.silo (modified) (1 diff)
-
Makefile.uboot (modified) (2 diffs)
-
arch/amd64/Makefile.inc (modified) (1 diff)
-
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/mips32/Makefile.inc (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)
-
silo/raw/isofs.b (deleted)
-
silo/raw/second.b (deleted)
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
r5974661 re4f8c77 65 65 done 66 66 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" ; \ 67 drv_dir="`dirname "$$drv"`" ; \ 68 drv_name="`basename "$$drv"`" ; \ 69 mkdir -p "$(DIST_PATH)/$(DRVS_PATH)/$$drv_name" ; \ 70 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv_dir/$$drv_name/$$drv_name" "$(DIST_PATH)/$(DRVS_PATH)/$$drv_name/" ; \ 71 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv_dir/$$drv_name/$$drv_name.ma" "$(DIST_PATH)/$(DRVS_PATH)/$$drv_name/" ; \ 70 72 done 71 73 for file in $(RD_DRV_CFG) ; do \ 72 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file" "$(DIST_PATH)/$(DRVS_PATH)/$$file" ; \ 74 file_dir="`dirname "$$file"`" ; \ 75 file_name="`basename "$$file"`" ; \ 76 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file_dir/$$file_name/$$file_name.dev" "$(DIST_PATH)/$(DRVS_PATH)/$$file_name/" ; \ 73 77 done 74 78 75 79 clean: clean_dist 76 80 $(MAKE) -f $(BUILD) clean PRECHECK=$(PRECHECK) -
boot/Makefile.common
r5974661 re4f8c77 86 86 RD_SRVS_ESSENTIAL = \ 87 87 $(USPACE_PATH)/srv/hid/fb/fb \ 88 $(USPACE_PATH)/srv/hid/ kbd/kbd\88 $(USPACE_PATH)/srv/hid/input/input \ 89 89 $(USPACE_PATH)/srv/hid/console/console \ 90 90 $(USPACE_PATH)/srv/fs/devfs/devfs … … 110 110 $(USPACE_PATH)/srv/net/net/net \ 111 111 $(USPACE_PATH)/srv/devman/devman 112 112 113 113 RD_DRVS = \ 114 root \115 rootvirt \116 test 1 \117 test 2 \118 test 3119 120 RD_DRV_CFG = 114 infrastructure/root \ 115 infrastructure/rootvirt \ 116 test/test1 \ 117 test/test2 \ 118 test/test3 119 120 RD_DRV_CFG = 121 121 122 122 RD_LIBS = -
boot/Makefile.silo
r5974661 re4f8c77 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
r5974661 re4f8c77 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
r5974661 re4f8c77 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/include/types.h
r5974661 re4f8c77 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
r5974661 re4f8c77 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
r5974661 re4f8c77 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> 35 37 #include <halt.h> 36 38 #include <printf.h> … … 51 53 #define DEFAULT_SYS_FREQ 100000000ULL /* 100MHz */ 52 54 53 #define EFI_MEMMAP_FREE_MEM 0 54 #define EFI_MEMMAP_IO 1 55 #define EFI_MEMMAP_IO_PORTS 2 55 #define MEMMAP_FREE_MEM 0 56 #define MEMMAP_IO 1 57 #define MEMMAP_IO_PORTS 2 58 59 extern boot_param_t *bootpar; 56 60 57 61 static bootinfo_t bootinfo; 62 63 static void read_efi_memmap(void) 64 { 65 memmap_item_t *memmap = bootinfo.memmap; 66 size_t items = 0; 67 68 if (!bootpar) { 69 /* Fake-up a memory map for simulators. */ 70 memmap[items].base = DEFAULT_MEMORY_BASE; 71 memmap[items].size = DEFAULT_MEMORY_SIZE; 72 memmap[items].type = MEMMAP_FREE_MEM; 73 items++; 74 75 memmap[items].base = DEFAULT_LEGACY_IO_BASE; 76 memmap[items].size = DEFAULT_LEGACY_IO_SIZE; 77 memmap[items].type = MEMMAP_IO_PORTS; 78 items++; 79 } else { 80 char *cur, *mm_base = (char *) bootpar->efi_memmap; 81 size_t mm_size = bootpar->efi_memmap_sz; 82 size_t md_size = bootpar->efi_memdesc_sz; 83 84 /* 85 * Walk the EFI memory map using the V1 memory descriptor 86 * format. The actual memory descriptor can use newer format, 87 * but it must always be backwards compatible with the V1 88 * format. 89 */ 90 for (cur = mm_base; 91 (cur < mm_base + (mm_size - md_size)) && 92 (items < MEMMAP_ITEMS); 93 cur += md_size) { 94 efi_v1_memdesc_t *md = (efi_v1_memdesc_t *) cur; 95 96 switch ((efi_memory_type_t) md->type) { 97 case EFI_CONVENTIONAL_MEMORY: 98 memmap[items].type = MEMMAP_FREE_MEM; 99 break; 100 case EFI_MEMORY_MAPPED_IO: 101 memmap[items].type = MEMMAP_IO; 102 break; 103 case EFI_MEMORY_MAPPED_IO_PORT_SPACE: 104 memmap[items].type = MEMMAP_IO_PORTS; 105 break; 106 default: 107 continue; 108 } 109 110 memmap[items].base = md->phys_start; 111 memmap[items].size = md->pages * EFI_PAGE_SIZE; 112 items++; 113 } 114 } 115 116 bootinfo.memmap_items = items; 117 } 118 119 static void read_sal_configuration(void) 120 { 121 if (!bootpar) { 122 /* Configure default values for simulators. */ 123 bootinfo.freq_scale = DEFAULT_FREQ_SCALE; 124 bootinfo.sys_freq = DEFAULT_SYS_FREQ; 125 } else { 126 /* TODO: read the real values from SAL */ 127 bootinfo.freq_scale = DEFAULT_FREQ_SCALE; 128 bootinfo.sys_freq = DEFAULT_SYS_FREQ; 129 } 130 } 58 131 59 132 void bootstrap(void) … … 113 186 114 187 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 188 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 189 read_efi_memmap(); 190 read_sal_configuration(); 142 191 143 192 printf("Booting the kernel ...\n"); -
boot/arch/mips32/Makefile.inc
r5974661 re4f8c77 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/ppc32/Makefile.inc
r5974661 re4f8c77 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
r5974661 re4f8c77 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
r5974661 re4f8c77 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;
Note:
See TracChangeset
for help on using the changeset viewer.
