Changeset 6ac14a70 in mainline for boot/arch


Ignore:
Timestamp:
2009-07-28T12:47:31Z (16 years ago)
Author:
Vineeth Pillai <vineethrp@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5e73815
Parents:
7038f55
Message:

ARM port for development board integratorcp(ARM926EJ core module).

Location:
boot/arch/arm32
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/Makefile.inc

    r7038f55 r6ac14a70  
    3636
    3737arch/$(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)
    3939
    4040clean:
  • boot/arch/arm32/loader/Makefile

    r7038f55 r6ac14a70  
    4242TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm/bin
    4343
     44ifeq ($(MACHINE), testarm)
     45        DMACHINE = MACHINE_GXEMUL_TESTARM
     46endif
     47
     48ifeq ($(MACHINE), integratorcp)
     49        DMACHINE = MACHINE_ICP
     50endif
     51
     52
    4453ifeq ($(COMPILER),gcc_native)
    4554        CC = gcc
     
    6574        asm.S \
    6675        mm.c \
    67         print/gxemul.c \
     76        print/print.c \
    6877        _components.c \
    6978        ../../../generic/printf.c \
     
    93102        $(USPACEDIR)/srv/fs/tmpfs/tmpfs \
    94103        $(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
     105ifeq ($(MACHINE), testarm)
     106        RD_SRVS += \
     107                $(USPACEDIR)/srv/bd/gxe_bd/gxe_bd
     108endif
    97109
    98110RD_APPS = \
     
    149161
    150162%.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  
    1818                *(.reginfo);
    1919
     20                . = 0x2000;
     21                *(ST);                  /* bootloader stack section */
     22
    2023                . = 0x4000;
    2124                *(PT);                  /* page table placed at 0x4000 */
  • boot/arch/arm32/loader/boot.S

    r7038f55 r6ac14a70  
    3535.global jump_to_kernel
    3636.global page_table
     37.global boot_stack
    3738
    3839start:
     40        ldr sp, =boot_stack
    3941        b bootstrap
    4042
     
    4749        bx r0
    4850
     51#bootloader stack
     52.section ST
     53        .space 4096
     54boot_stack:
    4955
    5056# place page_table to PT section
  • boot/arch/arm32/loader/main.c

    r7038f55 r6ac14a70  
    6868static void version_print(void)
    6969{
    70         printf("HelenOS ARM32 Bootloader\nRelease %s%s%s\nCopyright (c) 2007 HelenOS project\n",
     70        printf("HelenOS ARM32 Bootloader\nRelease %s%s%s\nCopyright (c) 2009 HelenOS project\n",
    7171                release, revision, timestamp);
    7272}
     
    9292        unsigned int i, j;
    9393        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);
    9694                top = ALIGN_UP(top, KERNEL_PAGE_SIZE);
    9795                if (i > 0) {
     
    107105
    108106        printf("\nCopying components\n");
    109 
     107        printf("Component\tAddress\t\tSize (Bytes)\n");
     108        printf("============================================\n");
    110109        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);
    112111                memcpy((void *)bootinfo.tasks[j].addr, components[i].start,
    113112                    components[i].size);
    114                 printf("done.\n");
    115113        }
    116        
    117         printf("\nCopying kernel...");
     114        printf("KERNEL\t\t0x%x\t%d\n", KERNEL_VIRTUAL_ADDRESS, components[0].size);
     115
    118116        memcpy((void *)KERNEL_VIRTUAL_ADDRESS, components[0].start,
    119117            components[0].size);
    120         printf("done.\n");
    121118
    122119        printf("\nBooting the kernel...\n");
  • boot/arch/arm32/loader/print/print.c

    r7038f55 r6ac14a70  
    11/*
    22 * Copyright (c) 2007 Michal Kebrt
     3 * Copyright (c) 2009 Vineeth Pillai
    34 * All rights reserved.
    45 *
     
    3233 */
    3334/** @file
    34  *  @brief GXemul specific code.
     35 *  @brief bootloader output logic
    3536 */
    3637
     
    4041
    4142/** Address where characters to be printed are expected. */
     43#ifdef MACHINE_GXEMUL_TESTARM
    4244#define PUTC_ADDRESS    0x10000000
     45#endif
     46#ifdef MACHINE_ICP
     47#define  PUTC_ADDRESS    0x16000000
     48#endif
     49
    4350
    4451
     
    4956static void putc(char ch)
    5057{
     58        if (ch == '\n')
     59                *((volatile char *) PUTC_ADDRESS) = '\r';
    5160        *((volatile char *) PUTC_ADDRESS) = ch;
    5261}
Note: See TracChangeset for help on using the changeset viewer.