Changeset 088b334 in mainline
- Timestamp:
- 2013-02-24T11:24:16Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8ab339e, b42c8d8
- Parents:
- df64dbc (diff), 9ad289d (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. - Files:
-
- 18 added
- 14 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rdf64dbc r088b334 64 64 @ "gta02" GTA02 / Neo FreeRunner 65 65 @ "integratorcp" Integratorcp 66 @ "beagleboardxm" BeogleBoard-xM 66 @ "beagleboardxm" BeagleBoard-xM 67 @ "beaglebone" BeagleBone 67 68 ! [PLATFORM=arm32] MACHINE (choice) 68 69 … … 88 89 % CPU type 89 90 @ "cortex_a8" ARM Cortex A-8 90 ! [PLATFORM=arm32& MACHINE=beagleboardxm] PROCESSOR (choice)91 ! [PLATFORM=arm32&(MACHINE=beagleboardxm|MACHINE=beaglebone)] PROCESSOR (choice) 91 92 92 93 % CPU type … … 441 442 % Output device class 442 443 @ "generic" Monitor or serial line 443 ! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm )] CONFIG_HID_OUT (choice)444 ! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm|MACHINE=beaglebone)] CONFIG_HID_OUT (choice) 444 445 445 446 % Output device class … … 488 489 ! [PLATFORM=arm32&MACHINE=gta02] CONFIG_S3C24XX_IRQC (y) 489 490 490 % Support for TI AMDM37X on-chip UART 491 % Support for TI AM335x on-chip UART 492 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=beaglebone] CONFIG_AM335X_UART (y/n) 493 494 % Support for TI AM335x timers support 495 ! [PLATFORM=arm32&MACHINE=beaglebone] CONFIG_AM335X_TIMERS (y) 496 497 % Support for TI AMDM37x on-chip UART 491 498 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=beagleboardxm] CONFIG_AMDM37X_UART (y/n) 492 499 … … 510 517 511 518 % Serial line input module 512 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_ARM926_UART=y)|(PLATFORM=arm32&MACHINE=beaglebo ardxm&CONFIG_AMDM37X_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y)519 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_ARM926_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_AM335X_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_AMDM37X_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y) 513 520 514 521 % EGA support … … 623 630 % uImage OS type 624 631 @ "2" NetBSD stage 2 boot loader 625 ! [PLATFORM=arm32& MACHINE=beagleboardxm] UIMAGE_OS (choice)632 ! [PLATFORM=arm32&(MACHINE=beagleboardxm|MACHINE=beaglebone)] UIMAGE_OS (choice) 626 633 627 634 % uImage OS type 628 635 @ "5" Linux kernel 629 ! [PLATFORM=arm32&MACHINE!=beagleboardxm ] UIMAGE_OS (choice)636 ! [PLATFORM=arm32&MACHINE!=beagleboardxm&MACHINE!=beaglebone] UIMAGE_OS (choice) -
boot/arch/arm32/Makefile.inc
rdf64dbc r088b334 35 35 endif 36 36 37 ifeq ($(MACHINE), beagleboardxm)37 ifeq ($(MACHINE), $(filter $(MACHINE),beagleboardxm beaglebone)) 38 38 BOOT_OUTPUT = image.boot 39 39 POST_OUTPUT = $(ROOT_PATH)/uImage.bin -
boot/arch/arm32/include/arch.h
rdf64dbc r088b334 44 44 #elif defined MACHINE_beagleboardxm 45 45 #define BOOT_BASE 0x80000000 46 #elif defined MACHINE_beaglebone 47 #define BOOT_BASE 0x80000000 46 48 #else 47 49 #define BOOT_BASE 0x00000000 … … 51 53 52 54 #ifdef MACHINE_beagleboardxm 55 #define PA_OFFSET 0 56 #elif defined MACHINE_beaglebone 53 57 #define PA_OFFSET 0 54 58 #else -
boot/arch/arm32/include/main.h
rdf64dbc r088b334 51 51 #define BBXM_THR_FULL 0x00000001 52 52 53 /** Beaglebone UART register addresses 54 * 55 * This is UART0 of AM335x CPU 56 */ 57 #define BBONE_SCONS_THR 0x44E09000 58 #define BBONE_SCONS_SSR 0x44E09044 59 60 /** Check this bit before writing (tx fifo full) */ 61 #define BBONE_TXFIFO_FULL 0x00000001 53 62 54 63 /** GTA02 serial console UART register addresses. -
boot/arch/arm32/include/mm.h
rdf64dbc r088b334 63 63 #define BBXM_RAM_END 0xc0000000 64 64 65 /** Start of ram memory on AM335x */ 66 #define AM335x_RAM_START 0x80000000 67 /** End of ram memory on AM335x */ 68 #define AM335x_RAM_END 0xC0000000 69 65 70 66 71 /* Page table level 0 entry - "section" format is used … … 76 81 unsigned int access_permission_0 : 2; 77 82 unsigned int tex : 3; 78 unsigned int access_permission_1 : 2; 83 unsigned int access_permission_1 : 1; 84 unsigned int shareable : 1; 79 85 unsigned int non_global : 1; 80 86 unsigned int should_be_zero_2 : 1; -
boot/arch/arm32/src/mm.c
rdf64dbc r088b334 38 38 #include <arch/mm.h> 39 39 40 /** Disable the MMU */ 41 static void disable_paging(void) 42 { 43 asm volatile ( 44 "mrc p15, 0, r0, c1, c0, 0\n" 45 "bic r0, r0, #1\n" 46 "mcr p15, 0, r0, c1, c0, 0\n" 47 ::: "r0" 48 ); 49 } 50 40 51 /** Check if caching can be enabled for a given memory section. 41 52 * … … 59 70 const unsigned long address = section << PTE_SECTION_SHIFT; 60 71 if (address >= BBXM_RAM_START && address < BBXM_RAM_END) 72 return 1; 73 #elif defined MACHINE_beaglebone 74 const unsigned long address = section << PTE_SECTION_SHIFT; 75 if (address >= AM335x_RAM_START && address < AM335x_RAM_END) 61 76 return 1; 62 77 #endif … … 88 103 pte->tex = 0; 89 104 pte->access_permission_1 = 0; 105 pte->shareable = 0; 90 106 pte->non_global = 0; 91 107 pte->should_be_zero_2 = 0; … … 102 118 for (page = 0; page < split_page; page++) 103 119 init_ptl0_section(&boot_pt[page], page); 104 105 /*106 * Create 1:1 virtual-physical mapping in kernel space107 * (upper 2 GB), physical addresses start from 0.108 */109 /* BeagleBoard-xM (DM37x) memory starts at 2GB border,110 * thus mapping only lower 2GB is not not enough.111 * Map entire AS 1:1 instead and hope it works. */112 for (page = split_page; page < PTL0_ENTRIES; page++)113 #ifndef MACHINE_beagleboardxm114 init_ptl0_section(&boot_pt[page], page - split_page);115 #else116 init_ptl0_section(&boot_pt[page], page);117 #endif118 120 119 121 asm volatile ( … … 132 134 "ldr r0, =0x55555555\n" 133 135 "mcr p15, 0, r0, c3, c0, 0\n" 134 136 135 137 /* Current settings */ 136 138 "mrc p15, 0, r0, c1, c0, 0\n" … … 143 145 144 146 "orr r0, r0, r1\n" 147 148 /* Invalidate the TLB content before turning on the MMU. 149 * ARMv7-A Reference manual, B3.10.3 150 */ 151 "mcr p15, 0, r0, c8, c7, 0\n" 145 152 146 /* Store settings */153 /* Store settings, enable the MMU */ 147 154 "mcr p15, 0, r0, c1, c0, 0\n" 148 155 ::: "r0", "r1" … … 152 159 /** Start the MMU - initialize page table and enable paging. */ 153 160 void mmu_start() { 161 disable_paging(); 154 162 init_boot_pt(); 155 163 enable_paging(); -
boot/arch/arm32/src/putchar.c
rdf64dbc r088b334 40 40 #include <putchar.h> 41 41 #include <str.h> 42 43 #ifdef MACHINE_beaglebone 44 45 /** Send a byte to the am335x serial console. 46 * 47 * @param byte Byte to send. 48 */ 49 static void scons_sendb_bbone(uint8_t byte) 50 { 51 volatile uint32_t *thr = 52 (volatile uint32_t *) BBONE_SCONS_THR; 53 volatile uint32_t *ssr = 54 (volatile uint32_t *) BBONE_SCONS_SSR; 55 56 /* Wait until transmitter is empty */ 57 while (*ssr & BBONE_TXFIFO_FULL); 58 59 /* Transmit byte */ 60 *thr = (uint32_t) byte; 61 } 62 63 #endif 42 64 43 65 #ifdef MACHINE_beagleboardxm … … 106 128 static void scons_sendb(uint8_t byte) 107 129 { 130 #ifdef MACHINE_beaglebone 131 scons_sendb_bbone(byte); 132 #endif 108 133 #ifdef MACHINE_beagleboardxm 109 134 scons_sendb_bbxm(byte); -
kernel/arch/arm32/Makefile.inc
rdf64dbc r088b334 85 85 endif 86 86 87 ifeq ($(MACHINE),beaglebone) 88 ARCH_SOURCES += arch/$(KARCH)/src/mach/beaglebone/beaglebone.c 89 endif 90 87 91 ifeq ($(CONFIG_PL050),y) 88 92 ARCH_SOURCES += genarch/src/drivers/pl050/pl050.c -
kernel/arch/arm32/_link.ld.in
rdf64dbc r088b334 10 10 #define KERNEL_LOAD_ADDRESS 0xb0a08000 11 11 #elif defined MACHINE_beagleboardxm 12 #define KERNEL_LOAD_ADDRESS 0x80a00000 13 #elif define MACHINE_beaglebone 12 14 #define KERNEL_LOAD_ADDRESS 0x80a00000 13 15 #else -
kernel/arch/arm32/include/mm/frame.h
rdf64dbc r088b334 56 56 #define BOOT_PAGE_TABLE_ADDRESS 0x80008000 57 57 58 #elif defined MACHINE_beaglebone 59 60 #define PHYSMEM_START_ADDR 0x80000000 61 #define BOOT_PAGE_TABLE_ADDRESS 0x80008000 62 58 63 #else 59 64 … … 65 70 #define BOOT_PAGE_TABLE_START_FRAME (BOOT_PAGE_TABLE_ADDRESS >> FRAME_WIDTH) 66 71 #define BOOT_PAGE_TABLE_SIZE_IN_FRAMES (BOOT_PAGE_TABLE_SIZE >> FRAME_WIDTH) 67 68 72 69 73 extern void frame_low_arch_init(void); -
kernel/arch/arm32/include/mm/page.h
rdf64dbc r088b334 46 46 #define PAGE_SIZE FRAME_SIZE 47 47 48 #if def MACHINE_beagleboardxm48 #if (defined MACHINE_beagleboardxm) || (defined MACHINE_beaglebone) 49 49 #ifndef __ASM__ 50 50 # define KA2PA(x) ((uintptr_t) (x)) -
kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c
rdf64dbc r088b334 35 35 #include <arch/exception.h> 36 36 #include <arch/mach/beagleboardxm/beagleboardxm.h> 37 #include <genarch/drivers/amdm37x _irc/amdm37x_irc.h>38 #include <genarch/drivers/amdm37x _uart/amdm37x_uart.h>39 #include <genarch/drivers/amdm37x _gpt/amdm37x_gpt.h>37 #include <genarch/drivers/amdm37x/uart.h> 38 #include <genarch/drivers/amdm37x/irc.h> 39 #include <genarch/drivers/amdm37x/gpt.h> 40 40 #include <genarch/fb/fb.h> 41 41 #include <genarch/srln/srln.h> -
kernel/arch/arm32/src/machine_func.c
rdf64dbc r088b334 42 42 #include <arch/mach/integratorcp/integratorcp.h> 43 43 #include <arch/mach/beagleboardxm/beagleboardxm.h> 44 #include <arch/mach/beaglebone/beaglebone.h> 44 45 45 46 /** Pointer to machine_ops structure being used. */ … … 55 56 #elif defined(MACHINE_beagleboardxm) 56 57 machine_ops = &bbxm_machine_ops; 58 #elif defined(MACHINE_beaglebone) 59 machine_ops = &bbone_machine_ops; 57 60 #else 58 61 #error Machine type not defined. -
kernel/genarch/Makefile.inc
rdf64dbc r088b334 106 106 endif 107 107 108 ifeq ($(CONFIG_AM335X_UART),y) 109 GENARCH_SOURCES += \ 110 genarch/src/drivers/am335x/uart.c 111 endif 112 113 ifeq ($(CONFIG_AM335X_TIMERS),y) 114 GENARCH_SOURCES += \ 115 genarch/src/drivers/am335x/timer.c 116 endif 117 108 118 ifeq ($(CONFIG_AMDM37X_UART),y) 109 119 GENARCH_SOURCES += \ 110 genarch/src/drivers/amdm37x _uart/amdm37x_uart.c120 genarch/src/drivers/amdm37x/uart.c 111 121 endif 112 122 -
kernel/genarch/include/drivers/amdm37x/uart_regs.h
rdf64dbc r088b334 31 31 /** 32 32 * @file 33 * @brief Texas Instruments AMDM37x on-chip interrupt controller driver.33 * @brief Texas Instruments AMDM37x UART memory mapped registers. 34 34 */ 35 35 … … 40 40 #include <console/chardev.h> 41 41 #include <ddi/irq.h> 42 43 /* AMDM37x TRM p. 2950 */44 #define AMDM37x_UART1_BASE_ADDRESS 0x4806a00045 #define AMDM37x_UART1_SIZE 102446 #define AMDM37x_UART1_IRQ 72 /* AMDM37x TRM p. 2418 */47 48 #define AMDM37x_UART2_BASE_ADDRESS 0x4806b00049 #define AMDM37x_UART2_SIZE 102450 #define AMDM37x_UART2_IRQ 73 /* AMDM37x TRM p. 2418 */51 52 #define AMDM37x_UART3_BASE_ADDRESS 0x4902000053 #define AMDM37x_UART3_SIZE 102454 #define AMDM37x_UART3_IRQ 74 /* AMDM37x TRM p. 2418 */55 56 #define AMDM37x_UART4_BASE_ADDRESS 0x4904200057 #define AMDM37x_UART4_SIZE 102458 #define AMDM37x_UART4_IRQ 80 /* AMDM37x TRM p. 2418 */59 42 60 43 typedef struct { … … 343 326 344 327 /** BOF control register (IrDA only) */ 345 ioport32_t blr; /* UART3 s epcific */328 ioport32_t blr; /* UART3 specific */ 346 329 #define AMDM37x_IRDA_BLR_XBOF_TYPE_FLAG (1 << 6) 347 330 #define AMDM37x_IRDA_BLR_STS_FIFO_RESET (1 << 7) … … 442 425 } amdm37x_uart_regs_t; 443 426 444 typedef struct {445 amdm37x_uart_regs_t *regs;446 indev_t *indev;447 outdev_t outdev;448 irq_t irq;449 } amdm37x_uart_t;450 451 452 bool amdm37x_uart_init(amdm37x_uart_t *, inr_t, uintptr_t, size_t);453 void amdm37x_uart_input_wire(amdm37x_uart_t *, indev_t *);454 455 427 #endif 456 428 -
kernel/genarch/src/drivers/amdm37x/uart.c
rdf64dbc r088b334 34 34 */ 35 35 36 #include <genarch/drivers/amdm37x _uart/amdm37x_uart.h>36 #include <genarch/drivers/amdm37x/uart.h> 37 37 #include <ddi/device.h> 38 38 #include <str.h>
Note:
See TracChangeset
for help on using the changeset viewer.