Changeset 0ab362c in mainline for boot


Ignore:
Timestamp:
2012-11-22T14:36:04Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e32720ff
Parents:
1f7753a (diff), 0f2c80a (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.
Message:

Merge support for BeagleBoard-xM (armv7).

Most of the changes outside arm arch are pio_* stuff (addition of pio_trace capability, header consolidation)

Location:
boot
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.uboot

    r1f7753a r0ab362c  
    4040
    4141$(POST_OUTPUT): $(BIN_OUTPUT)
    42         $(MKUIMAGE) -name "$(IMAGE_NAME)" -laddr 0x30008000 -saddr 0x30008000 $< $@
     42        $(MKUIMAGE) -name "$(IMAGE_NAME)" -laddr $(LADDR) -saddr $(SADDR) -ostype $(UIMAGE_OS) $< $@
    4343
    4444clean:
  • boot/arch/arm32/Makefile.inc

    r1f7753a r0ab362c  
    3030        BOOT_OUTPUT = image.boot
    3131        POST_OUTPUT = $(ROOT_PATH)/uImage.bin
     32        LADDR = 0x30008000
     33        SADDR = 0x30008000
     34        POSTBUILD = Makefile.uboot
     35endif
     36
     37ifeq ($(MACHINE), beagleboardxm)
     38        BOOT_OUTPUT = image.boot
     39        POST_OUTPUT = $(ROOT_PATH)/uImage.bin
     40        LADDR = 0x80000000
     41        SADDR = 0x80000000
    3242        POSTBUILD = Makefile.uboot
    3343endif
     
    3949BITS = 32
    4050ENDIANESS = LE
    41 EXTRA_CFLAGS = -march=armv4
     51EXTRA_CFLAGS = -march=$(subst _,-,$(PROCESSOR)) -mno-unaligned-access
    4252
     53ifeq ($(MACHINE), gta02)
    4354RD_SRVS_ESSENTIAL += \
    4455        $(USPACE_PATH)/srv/hid/s3c24xx_ts/s3c24xx_ts \
    4556        $(USPACE_PATH)/srv/hw/char/s3c24xx_uart/s3c24xx_uart
     57endif
    4658
     59ifeq ($(MACHINE), gxemul)
    4760RD_SRVS_NON_ESSENTIAL += \
    4861        $(USPACE_PATH)/srv/bd/gxe_bd/gxe_bd
     62endif
     63
     64RD_DRVS += \
     65        infrastructure/rootamdm37x \
     66        bus/usb/ehci \
     67        bus/usb/ohci \
     68        bus/usb/usbflbk \
     69        bus/usb/usbhub \
     70        bus/usb/usbhid \
     71        bus/usb/usbmast \
     72        bus/usb/usbmid
    4973
    5074SOURCES = \
  • boot/arch/arm32/include/arch.h

    r1f7753a r0ab362c  
    4242#ifdef MACHINE_gta02
    4343#define BOOT_BASE       0x30008000
     44#elif defined MACHINE_beagleboardxm
     45#define BOOT_BASE       0x80000000
    4446#else
    4547#define BOOT_BASE       0x00000000
     
    4850#define BOOT_OFFSET     (BOOT_BASE + 0xa00000)
    4951
     52#ifdef MACHINE_beagleboardxm
     53        #define PA_OFFSET 0
     54#else
     55        #define PA_OFFSET 0x80000000
     56#endif
     57
    5058#ifndef __ASM__
    51         #define PA2KA(addr)  (((uintptr_t) (addr)) + 0x80000000)
     59        #define PA2KA(addr)  (((uintptr_t) (addr)) + PA_OFFSET)
    5260#else
    53         #define PA2KA(addr)  ((addr) + 0x80000000)
     61        #define PA2KA(addr)  ((addr) + PA_OFFSET)
    5462#endif
     63
    5564
    5665#endif
  • boot/arch/arm32/include/main.h

    r1f7753a r0ab362c  
    4040/** Address where characters to be printed are expected. */
    4141
     42
     43/** BeagleBoard-xM UART register address
     44 *
     45 * This is UART3 of AM/DM37x CPU
     46 */
     47#define BBXM_SCONS_THR          0x49020000
     48#define BBXM_SCONS_SSR          0x49020044
     49
     50/* Check this bit before writing (tx fifo full) */
     51#define BBXM_THR_FULL           0x00000001
     52
     53
    4254/** GTA02 serial console UART register addresses.
    4355 *
  • boot/arch/arm32/include/mm.h

    r1f7753a r0ab362c  
    5858        unsigned int bufferable : 1;
    5959        unsigned int cacheable : 1;
    60         unsigned int impl_specific : 1;
     60        unsigned int xn : 1;
    6161        unsigned int domain : 4;
    6262        unsigned int should_be_zero_1 : 1;
    63         unsigned int access_permission : 2;
    64         unsigned int should_be_zero_2 : 8;
     63        unsigned int access_permission_0 : 2;
     64        unsigned int tex : 3;
     65        unsigned int access_permission_1 : 2;
     66        unsigned int non_global : 1;
     67        unsigned int should_be_zero_2 : 1;
     68        unsigned int non_secure : 1;
    6569        unsigned int section_base_addr : 12;
    6670} __attribute__((packed)) pte_level0_section_t;
  • boot/arch/arm32/src/mm.c

    r1f7753a r0ab362c  
    5454{
    5555        pte->descriptor_type = PTE_DESCRIPTOR_SECTION;
    56         pte->bufferable = 0;
     56        pte->bufferable = 1;
    5757        pte->cacheable = 0;
    58         pte->impl_specific = 0;
     58        pte->xn = 0;
    5959        pte->domain = 0;
    6060        pte->should_be_zero_1 = 0;
    61         pte->access_permission = PTE_AP_USER_NO_KERNEL_RW;
     61        pte->access_permission_0 = PTE_AP_USER_NO_KERNEL_RW;
     62        pte->tex = 0;
     63        pte->access_permission_1 = 0;
     64        pte->non_global = 0;
    6265        pte->should_be_zero_2 = 0;
     66        pte->non_secure = 0;
    6367        pte->section_base_addr = frame;
    6468}
     
    6771static void init_boot_pt(void)
    6872{
    69         pfn_t split_page = 0x800;
    70        
     73        const pfn_t split_page = PTL0_ENTRIES;
    7174        /* Create 1:1 virtual-physical mapping (in lower 2 GB). */
    7275        pfn_t page;
     
    7881         * (upper 2 GB), physical addresses start from 0.
    7982         */
     83        /* BeagleBoard-xM (DM37x) memory starts at 2GB border,
     84         * thus mapping only lower 2GB is not not enough.
     85         * Map entire AS 1:1 instead and hope it works. */
    8086        for (page = split_page; page < PTL0_ENTRIES; page++)
     87#ifndef MACHINE_beagleboardxm
    8188                init_ptl0_section(&boot_pt[page], page - split_page);
     89#else
     90                init_ptl0_section(&boot_pt[page], page);
     91#endif
    8292       
    8393        asm volatile (
     
    95105                /* Behave as a client of domains */
    96106                "ldr r0, =0x55555555\n"
    97                 "mcr p15, 0, r0, c3, c0, 0\n" 
     107                "mcr p15, 0, r0, c3, c0, 0\n"
    98108               
     109#ifdef PROCESSOR_armv7_a
     110                /* Read Auxiliary control register */
     111                "mrc p15, 0, r0, c1, c0, 1\n"
     112                /* Mask to enable L2 cache */
     113                "ldr r1, =0x00000002\n"
     114                "orr r0, r0, r1\n"
     115                /* Store Auxiliary control register */
     116                "mrc p15, 0, r0, c1, c0, 1\n"
     117#endif
    99118                /* Current settings */
    100119                "mrc p15, 0, r0, c1, c0, 0\n"
    101120               
     121#ifdef PROCESSOR_armv7_a
     122                /* Mask to enable paging, caching */
     123                "ldr r1, =0x00000005\n"
     124#else
    102125                /* Mask to enable paging */
    103126                "ldr r1, =0x00000001\n"
     127#endif
    104128                "orr r0, r0, r1\n"
    105129               
  • boot/arch/arm32/src/putchar.c

    r1f7753a r0ab362c  
    4040#include <putchar.h>
    4141#include <str.h>
     42
     43#ifdef MACHINE_beagleboardxm
     44
     45/** Send a byte to the amdm37x serial console.
     46 *
     47 * @param byte          Byte to send.
     48 */
     49static void scons_sendb_bbxm(uint8_t byte)
     50{
     51        volatile uint32_t *thr =
     52            (volatile uint32_t *)BBXM_SCONS_THR;
     53        volatile uint32_t *ssr =
     54            (volatile uint32_t *)BBXM_SCONS_SSR;
     55
     56        /* Wait until transmitter is empty. */
     57        while ((*ssr & BBXM_THR_FULL) == 1) ;
     58
     59        /* Transmit byte. */
     60        *thr = (uint32_t) byte;
     61}
     62
     63#endif
    4264
    4365#ifdef MACHINE_gta02
     
    97119static void scons_sendb(uint8_t byte)
    98120{
     121#ifdef MACHINE_beagleboardxm
     122        scons_sendb_bbxm(byte);
     123#endif
    99124#ifdef MACHINE_gta02
    100125        scons_sendb_gta02(byte);
Note: See TracChangeset for help on using the changeset viewer.