Ticket #5368: arm-beagle.diff
File arm-beagle.diff, 6.3 KB (added by , 14 years ago) |
---|
-
build/jam/board/beagle/BoardSetup
1 # BeagleBoard board-specific definitions 2 3 HAIKU_BOARD_DESCRIPTION = "BeagleBoard" ; 4 5 6 # 7 # Various hardcoded addresses 8 # 9 10 # load address for haiku_loader 11 HAIKU_BOARD_LOADER_BASE = 0x80008000 ; 12 # entry points (raw binary, and netbsd loader emulation) 13 HAIKU_BOARD_LOADER_ENTRY_RAW = 0x80008000 ; 14 HAIKU_BOARD_LOADER_ENTRY_NBSD = 0x80008008 ; 15 16 # load address for haiku_loader uimage 17 # (must be different than real load address) 18 HAIKU_BOARD_LOADER_UIBASE = 0x84000000 ; 19 20 HAIKU_BOARD_LOADER_STACK_BASE = 0x84000000 ; 21 22 # 23 # Flash image 24 # 25 26 # u-boot binary image filename, to build the flash image 27 # XXX: Locate it somehow (for now just put it in generated/) 28 HAIKU_BOARD_UBOOT_IMAGE ?= u-boot.bin ; 29 HAIKU_BOARD_UBOOT_IMAGE_URL = 30 http://www.angstrom-distribution.org/demo/beagleboard/u-boot.bin ; 31 32 # 33 # mmc/SD image 34 # 35 36 # in MB 37 HAIKU_BOARD_SDIMAGE_SIZE = 64 ; 38 39 # in MB 40 HAIKU_BOARD_SDIMAGE_FAT_SIZE = 32 ; 41 42 # offset in blocks XXX: FIXME 43 # (autodetect from sfdisk or use cylinder count for fat size) 44 HAIKU_BOARD_SDIMAGE_BFS_OFFSET = ; 45 46 # autoboot script 47 HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME = beagle-factory.script ; 48 HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT = "\ 49 setenv bootargs debug_screen true; \ 50 if mmc init; then \ 51 fatload mmc 0 $(HAIKU_BOARD_LOADER_UIBASE) haiku_loader.ub; \ 52 bootm $(HAIKU_BOARD_LOADER_UIBASE); \ 53 fi" ; 54 55 HAIKU_BOARD_SDIMAGE_FILES = 56 haiku_loader 57 haiku_loader.ub 58 haiku_loader_nbsd.ub 59 $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) 60 ; 61 62 63 # 64 # gcc flags for the specific cpu 65 # 66 67 TARGET_KERNEL_CCFLAGS += -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=soft ; 68 TARGET_KERNEL_C++FLAGS += -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=soft ; 69 TARGET_CCFLAGS += -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=soft ; 70 TARGET_C++FLAGS += -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=soft ; 71 72 -
src/system/boot/platform/u-boot/mmu.cpp
17 17 #include <arm_mmu.h> 18 18 #include <kernel.h> 19 19 20 #include <board_config.h> 21 20 22 #include <OS.h> 21 23 22 24 #include <string.h> … … 99 101 100 102 101 103 //memory used by the loader that should be identity mapped 102 /* 104 #ifdef BOARD_CPU_OMAP3 105 103 106 static struct memblock LOADER_MEMORYMAP[] = { 104 107 { 105 " vectors\0",//interrupt vectors106 0x 00000000,107 0x 00000fff,108 "RAM_internal\0",//internal ram/interrupt vectors 109 0x40200000, 110 0x4020ffff, 108 111 MMU_L2_FLAG_AP_RW|MMU_L2_FLAG_B, 109 112 }, 110 113 { 111 114 "devices\0", 112 115 0x48000000, 113 0x4 8FFFFFF,114 MMU_L2_FLAG_AP_RW |MMU_L2_FLAG_B,116 0x490FFFFF, 117 MMU_L2_FLAG_AP_RW, //|MMU_L2_FLAG_B, 115 118 }, 119 // TODO: also sgx, dsp and whatnot 116 120 { 117 121 "RAM_image\0",//15MB for the initrd should be enough.. 118 122 0x80000000, … … 138 142 MMU_L2_FLAG_AP_RW|MMU_L2_FLAG_C, 139 143 }, 140 144 145 146 { 147 "RAM_fb\0",//2MB framebuffer ram 148 0x88000000, 149 0x88200000, 150 MMU_L2_FLAG_AP_RW|MMU_L2_FLAG_C, 151 }, 152 153 141 154 }; 142 */ 155 156 #else 157 143 158 static struct memblock LOADER_MEMORYMAP[] = { 144 159 { 145 160 "vectors\0",//interrupt vectors … … 191 206 }, 192 207 193 208 }; 209 #endif 194 210 195 211 196 212 … … 200 216 201 217 202 218 203 204 219 //static const uint32 kDefaultPageTableFlags = MMU_FLAG_READWRITE; // not cached not buffered, R/W 205 220 static const size_t kMaxKernelSize = 0x200000; // 2 MB for the kernel 206 221 … … 322 337 asm volatile("MCR p15, 0, %[c1in], c3, c0, 0"::[c1in] "r" (value)); 323 338 } 324 339 325 326 340 static uint32 * 327 341 get_next_page_table(uint32 type) 328 342 { … … 350 364 void 351 365 init_page_directory() 352 366 { 367 uint32 smalltype; 368 369 // see if subpages disabled 370 if (mmu_read_C1() & (1<<23)) 371 smalltype = MMU_L2_TYPE_SMALLNEW; 372 else 373 smalltype = MMU_L2_TYPE_SMALLEXT; 374 353 375 TRACE(("init_page_directory\n")); 354 376 355 377 gKernelArgs.arch_args.phys_pgdir = (uint32)sPageDirectory; … … 368 390 addr_t pos = LOADER_MEMORYMAP[i].start; 369 391 int c=0; 370 392 while(pos< LOADER_MEMORYMAP[i].end){ 371 pageTable[c]=pos | LOADER_MEMORYMAP[i].flags | MMU_L2_TYPE_SMALLEXT;393 pageTable[c]=pos | LOADER_MEMORYMAP[i].flags | smalltype; 372 394 // TRACE(("PAGE TABLE: %lx = [%lx] \n",c, pageTable[c])); 373 395 c++; 374 396 if(c>255){ //we filled a pagetable => we need a new one -
src/system/boot/platform/u-boot/video.cpp
88 88 return; 89 89 90 90 //XXX: not yet, DISABLED 91 return;91 //return; 92 92 93 93 status_t err; 94 94 … … 118 118 #warning ARM:TODO 119 119 arch_probe_video_mode(); 120 120 //XXX for testing 121 //platform_switch_to_logo();121 platform_switch_to_logo(); 122 122 //return arch_probe_video_mode(); 123 //return B_OK;123 return B_OK; 124 124 } 125 125 -
headers/private/kernel/arch/arm/arm_mmu.h
37 37 */ 38 38 39 39 #define MMU_L2_TYPE_SMALLEXT 0x3 40 /* for new format entries (cortex-a8) */ 41 #define MMU_L2_TYPE_SMALLNEW 0x2 42 40 43 // for B C and TEX see ARM arm B4-11 41 44 #define MMU_L2_FLAG_B 0x4 42 45 #define MMU_L2_FLAG_C 0x8 -
headers/private/kernel/arch/arm/board/beagle/board_config.h
1 /* 2 * Copyright 2009 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _BOARD_OVERO_BOARD_CONFIG_H 6 #define _BOARD_OVERO_BOARD_CONFIG_H 7 8 #define BOARD_NAME_PRETTY "Beagle Board" 9 10 #define BOARD_CPU_TYPE_OMAP 1 11 #define BOARD_CPU_OMAP3 1 12 13 #include <arch/arm/omap3.h> 14 15 #define BOARD_UART1_BASE OMAP_UART1_BASE 16 #define BOARD_UART2_BASE OMAP_UART2_BASE 17 #define BOARD_UART3_BASE OMAP_UART3_BASE 18 19 #define BOARD_DEBUG_UART 2 20 21 #endif /* _BOARD_OVERO_BOARD_CONFIG_H */