- Timestamp:
- 2012-11-22T14:36:04Z (13 years ago)
- 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. - Location:
- boot
- Files:
-
- 7 edited
-
Makefile.uboot (modified) (1 diff)
-
arch/arm32/Makefile.inc (modified) (2 diffs)
-
arch/arm32/include/arch.h (modified) (2 diffs)
-
arch/arm32/include/main.h (modified) (1 diff)
-
arch/arm32/include/mm.h (modified) (1 diff)
-
arch/arm32/src/mm.c (modified) (4 diffs)
-
arch/arm32/src/putchar.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.uboot
r1f7753a r0ab362c 40 40 41 41 $(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) $< $@ 43 43 44 44 clean: -
boot/arch/arm32/Makefile.inc
r1f7753a r0ab362c 30 30 BOOT_OUTPUT = image.boot 31 31 POST_OUTPUT = $(ROOT_PATH)/uImage.bin 32 LADDR = 0x30008000 33 SADDR = 0x30008000 34 POSTBUILD = Makefile.uboot 35 endif 36 37 ifeq ($(MACHINE), beagleboardxm) 38 BOOT_OUTPUT = image.boot 39 POST_OUTPUT = $(ROOT_PATH)/uImage.bin 40 LADDR = 0x80000000 41 SADDR = 0x80000000 32 42 POSTBUILD = Makefile.uboot 33 43 endif … … 39 49 BITS = 32 40 50 ENDIANESS = LE 41 EXTRA_CFLAGS = -march= armv451 EXTRA_CFLAGS = -march=$(subst _,-,$(PROCESSOR)) -mno-unaligned-access 42 52 53 ifeq ($(MACHINE), gta02) 43 54 RD_SRVS_ESSENTIAL += \ 44 55 $(USPACE_PATH)/srv/hid/s3c24xx_ts/s3c24xx_ts \ 45 56 $(USPACE_PATH)/srv/hw/char/s3c24xx_uart/s3c24xx_uart 57 endif 46 58 59 ifeq ($(MACHINE), gxemul) 47 60 RD_SRVS_NON_ESSENTIAL += \ 48 61 $(USPACE_PATH)/srv/bd/gxe_bd/gxe_bd 62 endif 63 64 RD_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 49 73 50 74 SOURCES = \ -
boot/arch/arm32/include/arch.h
r1f7753a r0ab362c 42 42 #ifdef MACHINE_gta02 43 43 #define BOOT_BASE 0x30008000 44 #elif defined MACHINE_beagleboardxm 45 #define BOOT_BASE 0x80000000 44 46 #else 45 47 #define BOOT_BASE 0x00000000 … … 48 50 #define BOOT_OFFSET (BOOT_BASE + 0xa00000) 49 51 52 #ifdef MACHINE_beagleboardxm 53 #define PA_OFFSET 0 54 #else 55 #define PA_OFFSET 0x80000000 56 #endif 57 50 58 #ifndef __ASM__ 51 #define PA2KA(addr) (((uintptr_t) (addr)) + 0x80000000)59 #define PA2KA(addr) (((uintptr_t) (addr)) + PA_OFFSET) 52 60 #else 53 #define PA2KA(addr) ((addr) + 0x80000000)61 #define PA2KA(addr) ((addr) + PA_OFFSET) 54 62 #endif 63 55 64 56 65 #endif -
boot/arch/arm32/include/main.h
r1f7753a r0ab362c 40 40 /** Address where characters to be printed are expected. */ 41 41 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 42 54 /** GTA02 serial console UART register addresses. 43 55 * -
boot/arch/arm32/include/mm.h
r1f7753a r0ab362c 58 58 unsigned int bufferable : 1; 59 59 unsigned int cacheable : 1; 60 unsigned int impl_specific: 1;60 unsigned int xn : 1; 61 61 unsigned int domain : 4; 62 62 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; 65 69 unsigned int section_base_addr : 12; 66 70 } __attribute__((packed)) pte_level0_section_t; -
boot/arch/arm32/src/mm.c
r1f7753a r0ab362c 54 54 { 55 55 pte->descriptor_type = PTE_DESCRIPTOR_SECTION; 56 pte->bufferable = 0;56 pte->bufferable = 1; 57 57 pte->cacheable = 0; 58 pte-> impl_specific= 0;58 pte->xn = 0; 59 59 pte->domain = 0; 60 60 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; 62 65 pte->should_be_zero_2 = 0; 66 pte->non_secure = 0; 63 67 pte->section_base_addr = frame; 64 68 } … … 67 71 static void init_boot_pt(void) 68 72 { 69 pfn_t split_page = 0x800; 70 73 const pfn_t split_page = PTL0_ENTRIES; 71 74 /* Create 1:1 virtual-physical mapping (in lower 2 GB). */ 72 75 pfn_t page; … … 78 81 * (upper 2 GB), physical addresses start from 0. 79 82 */ 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. */ 80 86 for (page = split_page; page < PTL0_ENTRIES; page++) 87 #ifndef MACHINE_beagleboardxm 81 88 init_ptl0_section(&boot_pt[page], page - split_page); 89 #else 90 init_ptl0_section(&boot_pt[page], page); 91 #endif 82 92 83 93 asm volatile ( … … 95 105 /* Behave as a client of domains */ 96 106 "ldr r0, =0x55555555\n" 97 "mcr p15, 0, r0, c3, c0, 0\n" 107 "mcr p15, 0, r0, c3, c0, 0\n" 98 108 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 99 118 /* Current settings */ 100 119 "mrc p15, 0, r0, c1, c0, 0\n" 101 120 121 #ifdef PROCESSOR_armv7_a 122 /* Mask to enable paging, caching */ 123 "ldr r1, =0x00000005\n" 124 #else 102 125 /* Mask to enable paging */ 103 126 "ldr r1, =0x00000001\n" 127 #endif 104 128 "orr r0, r0, r1\n" 105 129 -
boot/arch/arm32/src/putchar.c
r1f7753a r0ab362c 40 40 #include <putchar.h> 41 41 #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 */ 49 static 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 42 64 43 65 #ifdef MACHINE_gta02 … … 97 119 static void scons_sendb(uint8_t byte) 98 120 { 121 #ifdef MACHINE_beagleboardxm 122 scons_sendb_bbxm(byte); 123 #endif 99 124 #ifdef MACHINE_gta02 100 125 scons_sendb_gta02(byte);
Note:
See TracChangeset
for help on using the changeset viewer.
