- Timestamp:
- 2009-07-28T12:47:31Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5e73815
- Parents:
- 7038f55
- Location:
- boot/arch/arm32
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/Makefile.inc
r7038f55 r6ac14a70 36 36 37 37 arch/$(BARCH)/loader/image.boot: 38 make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) 38 make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) MACHINE=$(MACHINE) 39 39 40 40 clean: -
boot/arch/arm32/loader/Makefile
r7038f55 r6ac14a70 42 42 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm/bin 43 43 44 ifeq ($(MACHINE), testarm) 45 DMACHINE = MACHINE_GXEMUL_TESTARM 46 endif 47 48 ifeq ($(MACHINE), integratorcp) 49 DMACHINE = MACHINE_ICP 50 endif 51 52 44 53 ifeq ($(COMPILER),gcc_native) 45 54 CC = gcc … … 65 74 asm.S \ 66 75 mm.c \ 67 print/ gxemul.c \76 print/print.c \ 68 77 _components.c \ 69 78 ../../../generic/printf.c \ … … 93 102 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 94 103 $(USPACEDIR)/srv/fs/fat/fat \ 95 $(USPACEDIR)/srv/bd/file_bd/file_bd \ 96 $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd 104 $(USPACEDIR)/srv/bd/file_bd/file_bd 105 ifeq ($(MACHINE), testarm) 106 RD_SRVS += \ 107 $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd 108 endif 97 109 98 110 RD_APPS = \ … … 149 161 150 162 %.o: %.c 151 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@163 $(CC) -D$(DMACHINE) $(DEFS) $(CFLAGS) -c $< -o $@ -
boot/arch/arm32/loader/_link.ld.in
r7038f55 r6ac14a70 18 18 *(.reginfo); 19 19 20 . = 0x2000; 21 *(ST); /* bootloader stack section */ 22 20 23 . = 0x4000; 21 24 *(PT); /* page table placed at 0x4000 */ -
boot/arch/arm32/loader/boot.S
r7038f55 r6ac14a70 35 35 .global jump_to_kernel 36 36 .global page_table 37 .global boot_stack 37 38 38 39 start: 40 ldr sp, =boot_stack 39 41 b bootstrap 40 42 … … 47 49 bx r0 48 50 51 #bootloader stack 52 .section ST 53 .space 4096 54 boot_stack: 49 55 50 56 # place page_table to PT section -
boot/arch/arm32/loader/main.c
r7038f55 r6ac14a70 68 68 static void version_print(void) 69 69 { 70 printf("HelenOS ARM32 Bootloader\nRelease %s%s%s\nCopyright (c) 200 7HelenOS project\n",70 printf("HelenOS ARM32 Bootloader\nRelease %s%s%s\nCopyright (c) 2009 HelenOS project\n", 71 71 release, revision, timestamp); 72 72 } … … 92 92 unsigned int i, j; 93 93 for (i = 0; i < COMPONENTS; i++) { 94 printf(" %L: %s image (size %d bytes)\n",95 components[i].start, components[i].name, components[i].size);96 94 top = ALIGN_UP(top, KERNEL_PAGE_SIZE); 97 95 if (i > 0) { … … 107 105 108 106 printf("\nCopying components\n"); 109 107 printf("Component\tAddress\t\tSize (Bytes)\n"); 108 printf("============================================\n"); 110 109 for (i = COMPONENTS - 1; i > 0; i--, j--) { 111 printf(" %s...", components[i].name);110 printf("%s\t\t0x%x\t%d\n", components[i].name, bootinfo.tasks[j].addr, components[i].size); 112 111 memcpy((void *)bootinfo.tasks[j].addr, components[i].start, 113 112 components[i].size); 114 printf("done.\n");115 113 } 116 117 printf("\nCopying kernel..."); 114 printf("KERNEL\t\t0x%x\t%d\n", KERNEL_VIRTUAL_ADDRESS, components[0].size); 115 118 116 memcpy((void *)KERNEL_VIRTUAL_ADDRESS, components[0].start, 119 117 components[0].size); 120 printf("done.\n");121 118 122 119 printf("\nBooting the kernel...\n"); -
boot/arch/arm32/loader/print/print.c
r7038f55 r6ac14a70 1 1 /* 2 2 * Copyright (c) 2007 Michal Kebrt 3 * Copyright (c) 2009 Vineeth Pillai 3 4 * All rights reserved. 4 5 * … … 32 33 */ 33 34 /** @file 34 * @brief GXemul specific code.35 * @brief bootloader output logic 35 36 */ 36 37 … … 40 41 41 42 /** Address where characters to be printed are expected. */ 43 #ifdef MACHINE_GXEMUL_TESTARM 42 44 #define PUTC_ADDRESS 0x10000000 45 #endif 46 #ifdef MACHINE_ICP 47 #define PUTC_ADDRESS 0x16000000 48 #endif 49 43 50 44 51 … … 49 56 static void putc(char ch) 50 57 { 58 if (ch == '\n') 59 *((volatile char *) PUTC_ADDRESS) = '\r'; 51 60 *((volatile char *) PUTC_ADDRESS) = ch; 52 61 }
Note:
See TracChangeset
for help on using the changeset viewer.