Ticket #5368: haiku-beagle-2.diff
File haiku-beagle-2.diff, 5.8 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 # OMAP x-loader image, must be first file on FAT partition 27 HAIKU_BOARD_MLO_IMAGE ?= MLO ; 28 HAIKU_BOARD_MLO_IMAGE_URL = 29 http://www.angstrom-distribution.org/demo/beagleboard/MLO ; 30 31 # u-boot binary image filename, to build the flash image 32 # XXX: Locate it somehow (for now just put it in generated/) 33 HAIKU_BOARD_UBOOT_IMAGE ?= u-boot.bin ; 34 HAIKU_BOARD_UBOOT_IMAGE_URL = 35 http://www.angstrom-distribution.org/demo/beagleboard/u-boot.bin ; 36 37 # 38 # mmc/SD image 39 # 40 41 # in MB 42 HAIKU_BOARD_SDIMAGE_SIZE = 64 ; 43 44 # in MB 45 HAIKU_BOARD_SDIMAGE_FAT_SIZE = 32 ; 46 47 # offset in blocks XXX: FIXME 48 # (autodetect from sfdisk or use cylinder count for fat size) 49 HAIKU_BOARD_SDIMAGE_BFS_OFFSET = ; 50 51 HAIKU_BOARD_SDIMAGE_FILES = 52 $(HAIKU_BOARD_MLO_IMAGE) 53 $(HAIKU_BOARD_UBOOT_IMAGE) 54 haiku_loader_nbsd.ub 55 ; 56 57 58 # 59 # gcc flags for the specific cpu 60 # 61 62 TARGET_KERNEL_CCFLAGS += -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=soft ; 63 TARGET_KERNEL_C++FLAGS += -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=soft ; 64 TARGET_CCFLAGS += -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=soft ; 65 TARGET_C++FLAGS += -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=soft ; 66 67 -
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 … … 350 366 void 351 367 init_page_directory() 352 368 { 369 uint32 smalltype; 370 371 // see if subpages disabled 372 if (mmu_read_C1() & (1<<23)) 373 smalltype = MMU_L2_TYPE_SMALLNEW; 374 else 375 smalltype = MMU_L2_TYPE_SMALLEXT; 376 353 377 TRACE(("init_page_directory\n")); 354 378 355 379 gKernelArgs.arch_args.phys_pgdir = (uint32)sPageDirectory; … … 368 392 addr_t pos = LOADER_MEMORYMAP[i].start; 369 393 int c=0; 370 394 while(pos< LOADER_MEMORYMAP[i].end){ 371 pageTable[c]=pos | LOADER_MEMORYMAP[i].flags | MMU_L2_TYPE_SMALLEXT;395 pageTable[c]=pos | LOADER_MEMORYMAP[i].flags | smalltype; 372 396 // TRACE(("PAGE TABLE: %lx = [%lx] \n",c, pageTable[c])); 373 397 c++; 374 398 if(c>255){ //we filled a pagetable => we need a new one -
src/system/boot/platform/u-boot/Jamfile
196 197 $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT) ; 197 198 } 198 199 200 if $(HAIKU_BOARD_MLO_IMAGE) && $(HAIKU_BOARD_MLO_IMAGE_URL) { 201 DownloadFile $(HAIKU_BOARD_MLO_IMAGE) $(HAIKU_BOARD_MLO_IMAGE_URL) ; 202 } 203 199 204 if $(HAIKU_BOARD_UBOOT_IMAGE) && $(HAIKU_BOARD_UBOOT_IMAGE_URL) { 200 205 # Download the u-boot binary file. 201 206 DownloadFile $(HAIKU_BOARD_UBOOT_IMAGE) $(HAIKU_BOARD_UBOOT_IMAGE_URL) ; -
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 */