Changeset a73ebf0 in mainline for boot/arch/sparc32/src/main.c
- Timestamp:
- 2013-10-15T16:34:04Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4d2dba7
- Parents:
- 1f12fab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/sparc32/src/main.c
r1f12fab ra73ebf0 62 62 amba_device_t *uart = ambapp_lookup_first(GAISLER, GAISLER_APBUART); 63 63 amba_uart_base = uart->bars[0].start; 64 bootinfo.uart_base = amba_uart_base; 65 bootinfo.uart_irq = uart->irq; 64 66 67 /* Look up for IRQMP */ 68 amba_device_t *irqmp = ambapp_lookup_first(GAISLER, GAISLER_IRQMP); 69 bootinfo.intc_base = irqmp->bars[0].start; 70 71 /* Look up for timer */ 72 amba_device_t *timer = ambapp_lookup_first(GAISLER, GAISLER_GPTIMER); 73 bootinfo.timer_base = timer->bars[0].start; 74 bootinfo.timer_irq = timer->irq; 75 76 /* Lookp up for memory controller and obtain memory size */ 77 if (ambapp_fake()) { 78 bootinfo.memsize = 64 * 1024 * 1024; // 64MB 79 } else { 80 amba_device_t *mctrl = ambapp_lookup_first(ESA, ESA_MCTRL); 81 volatile mctrl_mcfg2_t *mcfg2 = (volatile mctrl_mcfg2_t *)(mctrl->bars[0].start + 0x4); 82 bootinfo.memsize = (1 << (13 + mcfg2->bank_size)); 83 } 84 65 85 /* Standard output is now initialized */ 66 86 version_print(); … … 73 93 74 94 ambapp_print_devices(); 95 96 printf("Memory size: %dMB\n", bootinfo.memsize >> 20); 75 97 76 98 mmu_init();
Note:
See TracChangeset
for help on using the changeset viewer.