Changeset 8f9d70b in mainline
- Timestamp:
- 2013-03-24T14:55:36Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0dfa93b0
- Parents:
- 119b46e
- Files:
-
- 6 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r119b46e r8f9d70b 66 66 @ "beagleboardxm" BeagleBoard-xM 67 67 @ "beaglebone" BeagleBone 68 @ "raspberrypi" Raspberry Pi 68 69 ! [PLATFORM=arm32] MACHINE (choice) 69 70 … … 99 100 ! [PLATFORM=arm32&MACHINE=integratorcp] PROCESSOR (choice) 100 101 102 % CPU type 103 @ "arm1176" ARM1176 104 ! [PLATFORM=arm32&MACHINE=raspberrypi] PROCESSOR (choice) 101 105 102 106 # Add more ARMv4 CPUs … … 109 113 @ "armv5" ARMv5 110 114 ! [PLATFORM=arm32&(PROCESSOR=arm926ej_s)] PROCESSOR_ARCH (choice) 115 116 # Add more ARMv6 CPUs 117 % CPU arch 118 @ "armv6" ARMv6 119 ! [PLATFORM=arm32&(PROCESSOR=arm1176)] PROCESSOR_ARCH (choice) 111 120 112 121 # Add more ARMv7-A CPUs … … 447 456 % Output device class 448 457 @ "generic" Monitor or serial line 449 ! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm|MACHINE=beaglebone )] CONFIG_HID_OUT (choice)458 ! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm|MACHINE=beaglebone|MACHINE=raspberrypi)] CONFIG_HID_OUT (choice) 450 459 451 460 % Output device class … … 481 490 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=integratorcp] CONFIG_ARM926_UART (y/n) 482 491 492 % Support for BCM2835 on-chip UART 493 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=raspberrypi] CONFIG_BCM2835_UART (y/n) 494 483 495 % Support for Samsung S3C24XX on-chip UART 484 496 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=gta02] CONFIG_S3C24XX_UART (y/n) … … 515 527 516 528 % Serial line input module 517 ! [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)529 ! [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)|(PLATFORM=arm32&MACHINE=raspberrypi&CONFIG_BCM2835_UART=y)] CONFIG_SRLN (y) 518 530 519 531 % EGA support -
boot/arch/arm32/Makefile.inc
r119b46e r8f9d70b 43 43 endif 44 44 45 ifeq ($(MACHINE), raspberrypi) 46 BOOT_OUTPUT = image.boot 47 POST_OUTPUT = $(ROOT_PATH)/uImage.bin 48 LADDR = 0x00008000 49 SADDR = 0x00008000 50 POSTBUILD = Makefile.uboot 51 endif 52 45 53 BFD_NAME = elf32-littlearm 46 54 BFD_OUTPUT = $(BFD_NAME) -
boot/arch/arm32/include/arch.h
r119b46e r8f9d70b 46 46 #elif defined MACHINE_beaglebone 47 47 #define BOOT_BASE 0x80000000 48 #elif defined MACHINE_raspberrypi 49 #define BOOT_BASE 0x00008000 48 50 #else 49 51 #define BOOT_BASE 0x00000000 -
boot/arch/arm32/include/main.h
r119b46e r8f9d70b 75 75 #define ICP_SCONS_ADDR 0x16000000 76 76 77 /** Raspberry PI serial console registers */ 78 #define BCM2835_UART0_BASE 0x20201000 79 #define BCM2835_UART0_DR (BCM2835_UART0_BASE + 0x00) 80 #define BCM2835_UART0_FR (BCM2835_UART0_BASE + 0x18) 81 #define BCM2835_UART0_ILPR (BCM2835_UART0_BASE + 0x20) 82 #define BCM2835_UART0_IBRD (BCM2835_UART0_BASE + 0x24) 83 #define BCM2835_UART0_FBRD (BCM2835_UART0_BASE + 0x28) 84 #define BCM2835_UART0_LCRH (BCM2835_UART0_BASE + 0x2C) 85 #define BCM2835_UART0_CR (BCM2835_UART0_BASE + 0x30) 86 #define BCM2835_UART0_ICR (BCM2835_UART0_BASE + 0x44) 87 88 #define BCM2835_UART0_FR_TXFF (1 << 5) 89 #define BCM2835_UART0_LCRH_FEN (1 << 4) 90 #define BCM2835_UART0_LCRH_WL8 ((1 << 5) | (1 << 6)) 91 #define BCM2835_UART0_CR_UARTEN (1 << 0) 92 #define BCM2835_UART0_CR_TXE (1 << 8) 93 #define BCM2835_UART0_CR_RXE (1 << 9) 94 95 96 77 97 extern void bootstrap(void); 78 98 -
boot/arch/arm32/include/mm.h
r119b46e r8f9d70b 68 68 #define AM335x_RAM_END 0xC0000000 69 69 70 /** Start of ram memory on BCM2835 */ 71 #define BCM2835_RAM_START 0 72 /** End of ram memory on BCM2835 */ 73 #define BCM2835_RAM_END 0x20000000 70 74 71 75 /* Page table level 0 entry - "section" format is used -
boot/arch/arm32/src/mm.c
r119b46e r8f9d70b 75 75 if (address >= AM335x_RAM_START && address < AM335x_RAM_END) 76 76 return 1; 77 #elif defined MACHINE_raspberrypi 78 const unsigned long address = section << PTE_SECTION_SHIFT; 79 if (address < BCM2835_RAM_END) 80 return 1; 77 81 #endif 78 82 return 0; … … 113 117 static void init_boot_pt(void) 114 118 { 119 #if defined MACHINE_raspberrypi 120 const pfn_t split_page = 2048; 121 #else 115 122 const pfn_t split_page = PTL0_ENTRIES; 123 #endif 124 116 125 /* Create 1:1 virtual-physical mapping (in lower 2 GB). */ 117 126 pfn_t page; 118 127 for (page = 0; page < split_page; page++) 119 128 init_ptl0_section(&boot_pt[page], page); 120 129 130 #if defined MACHINE_raspberrypi 131 for (; page < PTL0_ENTRIES; page++) 132 init_ptl0_section(&boot_pt[page], page - split_page); 133 #endif 121 134 asm volatile ( 122 135 "mcr p15, 0, %[pt], c2, c0, 0\n" -
boot/arch/arm32/src/putchar.c
r119b46e r8f9d70b 122 122 #endif 123 123 124 #ifdef MACHINE_raspberrypi 125 126 static int raspi_init; 127 128 static inline void write32(uint32_t addr, uint32_t data) 129 { 130 *(volatile uint32_t *)(addr) = data; 131 } 132 133 static inline uint32_t read32(uint32_t addr) 134 { 135 return *(volatile uint32_t *)(addr); 136 } 137 138 static void scons_init_raspi(void) 139 { 140 write32(BCM2835_UART0_CR, 0x0); /* Disable UART */ 141 write32(BCM2835_UART0_ICR, 0x7f); /* Clear interrupts */ 142 write32(BCM2835_UART0_IBRD, 1); /* Set integer baud rate */ 143 write32(BCM2835_UART0_FBRD, 40); /* Set fractional baud rate */ 144 write32(BCM2835_UART0_LCRH, 145 BCM2835_UART0_LCRH_FEN | /* Enable FIFOs */ 146 BCM2835_UART0_LCRH_WL8); /* Word length: 8 */ 147 write32(BCM2835_UART0_CR, 148 BCM2835_UART0_CR_UARTEN | /* Enable UART */ 149 BCM2835_UART0_CR_TXE | /* Enable TX */ 150 BCM2835_UART0_CR_RXE); /* Enable RX */ 151 } 152 153 static void scons_sendb_raspi(uint8_t byte) 154 { 155 if (!raspi_init) { 156 scons_init_raspi(); 157 raspi_init = 1; 158 } 159 160 while (read32(BCM2835_UART0_FR) & BCM2835_UART0_FR_TXFF); 161 162 write32(BCM2835_UART0_DR, byte); 163 } 164 #endif 165 124 166 /** Send a byte to the serial console. 125 167 * … … 139 181 #ifdef MACHINE_integratorcp 140 182 scons_sendb_icp(byte); 183 #endif 184 #ifdef MACHINE_raspberrypi 185 scons_sendb_raspi(byte); 141 186 #endif 142 187 } -
kernel/arch/arm32/Makefile.inc
r119b46e r8f9d70b 89 89 endif 90 90 91 ifeq ($(MACHINE),raspberrypi) 92 ARCH_SOURCES += arch/$(KARCH)/src/mach/raspberrypi/raspberrypi.c 93 endif 94 91 95 ifeq ($(CONFIG_PL050),y) 92 96 ARCH_SOURCES += genarch/src/drivers/pl050/pl050.c -
kernel/arch/arm32/_link.ld.in
r119b46e r8f9d70b 13 13 #elif defined MACHINE_beaglebone 14 14 #define KERNEL_LOAD_ADDRESS 0x80a00000 15 #elif defined MACHINE_raspberrypi 16 #define KERNEL_LOAD_ADDRESS 0x80a08000 15 17 #else 16 18 #define KERNEL_LOAD_ADDRESS 0x80a00000 -
kernel/arch/arm32/include/arch/cp15.h
r119b46e r8f9d70b 223 223 SCTLR_FAST_IRQ_EN_FLAG = 1 << 21, /* Disable impl. specific feat*/ 224 224 SCTLR_UNALIGNED_EN_FLAG = 1 << 22, /* Must be 1 on armv7 */ 225 SCTLR_EXTENDED_PT_EN_FLAG = 1 << 23, 225 226 SCTLR_IRQ_VECTORS_EN_FLAG = 1 << 24, 226 227 SCTLR_BIG_ENDIAN_EXC_FLAG = 1 << 25, -
kernel/arch/arm32/include/arch/mm/frame.h
r119b46e r8f9d70b 61 61 #define BOOT_PAGE_TABLE_ADDRESS 0x80008000 62 62 63 #elif defined MACHINE_raspberrypi 64 65 #define PHYSMEM_START_ADDR 0x00000000 66 #define BOOT_PAGE_TABLE_ADDRESS 0x00010000 67 63 68 #else 64 69 -
kernel/arch/arm32/src/machine_func.c
r119b46e r8f9d70b 43 43 #include <arch/mach/beagleboardxm/beagleboardxm.h> 44 44 #include <arch/mach/beaglebone/beaglebone.h> 45 #include <arch/mach/raspberrypi/raspberrypi.h> 45 46 46 47 /** Pointer to machine_ops structure being used. */ … … 58 59 #elif defined(MACHINE_beaglebone) 59 60 machine_ops = &bbone_machine_ops; 61 #elif defined(MACHINE_raspberrypi) 62 machine_ops = &raspberrypi_machine_ops; 60 63 #else 61 64 #error Machine type not defined. -
kernel/arch/arm32/src/mm/page.c
r119b46e r8f9d70b 55 55 page_mapping_operations = &pt_mapping_operations; 56 56 57 #ifdef PROCESSOR_ARCH_armv6 58 /* Select ARMv6 and ARMv7 memory model */ 59 SCTLR_write(SCTLR_read() | SCTLR_EXTENDED_PT_EN_FLAG); 60 #endif 57 61 page_table_lock(AS_KERNEL, true); 58 62 -
kernel/genarch/Makefile.inc
r119b46e r8f9d70b 96 96 endif 97 97 98 ifeq ($(CONFIG_BCM2835_UART),y) 99 GENARCH_SOURCES += \ 100 genarch/src/drivers/bcm2835/pl011_uart.c 101 endif 102 98 103 ifeq ($(CONFIG_S3C24XX_IRQC),y) 99 104 GENARCH_SOURCES += \
Note:
See TracChangeset
for help on using the changeset viewer.