URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 374 to Rev 375
- ↔ Reverse comparison
Rev 374 → Rev 375
/openrisc/trunk/bootloaders/orpmon/include/build.h
1,?rev1len? → ?rev2line?,?rev2len?
#define BUILD_VERSION "Thu Sep 9 18:04:41 CEST 2010" |
#define BUILD_VERSION "Fri Sep 24 16:06:14 BST 2010" |
/openrisc/trunk/bootloaders/orpmon/include/board.h
143,10 → 143,10
|
#elif IPCONFIG==3 // ORSoC LAN |
|
#define BOARD_DEF_IP 0xc0a80003 // 192.168.0.3 |
#define BOARD_DEF_IP 0xc0a80103 // 192.168.1.3 |
#define BOARD_DEF_MASK 0xffffff00 // 255.255.255.0 |
#define BOARD_DEF_GW 0xc0a80002 // 192.168.0.2 |
#define BOARD_DEF_TBOOT_SRVR 0xc0a80108 // 192.168.1.8 |
#define BOARD_DEF_GW 0xc0a80101 // 192.168.1.1 |
#define BOARD_DEF_TBOOT_SRVR 0xc0a80101 // 192.168.1.1 |
#define BOARD_DEF_IMAGE_NAME "boot.img" |
#define BOARD_DEF_LOAD_SPACE 0xa00000 |
#define ETH_MDIOPHYADDR 0x00 |
/openrisc/trunk/bootloaders/orpmon/reset.S
2,19 → 2,13
#include "board.h" |
#include "mc.h" |
|
.extern _reset_support |
.extern _eth_int |
.extern _src_beg |
.extern _dst_beg |
.extern _dst_end |
.extern _c_reset |
.extern _int_main |
.extern _tick_interrupt |
.extern int_main |
.extern tick_interrupt |
.extern _crc32 |
|
/* Used by global.src_addr for default value */ |
.extern _src_addr |
|
.global _align |
.global _calc_mycrc32 |
.global _mycrc32 |
105,14 → 99,13
.endif |
_tickint: |
#define TIMER_RELOAD_VALUE (SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD)) |
//UNHANDLED_EXCEPTION |
/* Simply load timer_ticks variable and increment */ |
.extern _timer_ticks |
l.addi r1, r1, -8 |
l.sw 0(r1), r25 |
l.sw 4(r1), r26 |
l.movhi r25, hi(_timestamp) |
l.ori r25, r25, lo(_timestamp) |
l.movhi r25, hi(timestamp) |
l.ori r25, r25, lo(timestamp) |
l.lwz r26, 0(r25) /* Load variable addr.*/ |
l.addi r26, r26, 1 /* Increment variable */ |
l.sw 0(r25), r26 /* Store variable */ |
123,16 → 116,7
l.lwz r26, 4(r1) |
l.addi r1, r1, 8 |
l.rfe |
/* |
l.addi r1,r1,-128 |
l.sw 0(r1), r2 |
l.addi r2, r1, 128 |
l.sw 0x4(r1),r3 |
l.movhi r3,hi(_tick) |
l.ori r3,r3,lo(_tick) |
l.jr r3 |
l.nop |
*/ |
|
.if IN_FLASH |
.section .vectors, "ax" |
.org 0x600 |
340,83 → 324,11
l.and r1,r1,r2 |
/* l.or r2, r1, r1 - remove this helped with odd UART output problem?!*/ |
|
l.movhi r3,hi(_main) |
l.ori r3,r3,lo(_main) |
l.movhi r3,hi(main) |
l.ori r3,r3,lo(main) |
l.jr r3 |
l.nop |
|
|
_tick: |
|
l.sw 0x8(r1), r4 |
l.sw 0xc(r1), r5 |
l.sw 0x10(r1), r6 |
l.sw 0x14(r1), r7 |
l.sw 0x18(r1), r8 |
l.sw 0x1c(r1), r9 |
l.sw 0x20(r1), r10 |
l.sw 0x24(r1), r11 |
l.sw 0x28(r1), r12 |
l.sw 0x2c(r1), r13 |
l.sw 0x30(r1), r14 |
l.sw 0x34(r1), r15 |
l.sw 0x38(r1), r16 |
l.sw 0x3c(r1), r17 |
l.sw 0x40(r1), r18 |
l.sw 0x44(r1), r19 |
l.sw 0x48(r1), r20 |
l.sw 0x4c(r1), r21 |
l.sw 0x50(r1), r22 |
l.sw 0x54(r1), r23 |
l.sw 0x58(r1), r24 |
l.sw 0x5c(r1), r25 |
l.sw 0x60(r1), r26 |
l.sw 0x64(r1), r27 |
l.sw 0x68(r1), r28 |
l.sw 0x6c(r1), r29 |
l.sw 0x70(r1), r30 |
l.sw 0x74(r1), r31 |
|
l.movhi r3,hi(_tick_interrupt) |
l.ori r3,r3,lo(_tick_interrupt) |
l.jalr r3 |
l.nop |
|
l.lwz r3,0x4(r1) |
l.lwz r4,0x8(r1) |
l.lwz r5,0xc(r1) |
l.lwz r6,0x10(r1) |
l.lwz r7,0x14(r1) |
l.lwz r8,0x18(r1) |
l.lwz r9,0x1c(r1) |
l.lwz r10,0x20(r1) |
l.lwz r11,0x24(r1) |
l.lwz r12,0x28(r1) |
l.lwz r13,0x2c(r1) |
l.lwz r14,0x30(r1) |
l.lwz r15,0x34(r1) |
l.lwz r16,0x38(r1) |
l.lwz r17,0x3c(r1) |
l.lwz r18,0x40(r1) |
l.lwz r19,0x44(r1) |
l.lwz r20,0x48(r1) |
l.lwz r21,0x4c(r1) |
l.lwz r22,0x50(r1) |
l.lwz r23,0x54(r1) |
l.lwz r24,0x58(r1) |
l.lwz r25,0x5c(r1) |
l.lwz r26,0x60(r1) |
l.lwz r27,0x64(r1) |
l.lwz r28,0x68(r1) |
l.lwz r29,0x6c(r1) |
l.lwz r30,0x70(r1) |
l.lwz r31,0x74(r1) |
|
l.lwz r2, 0x0(r1) |
l.addi r1,r1,128 |
l.rfe |
l.nop |
|
_int_wrapper: |
|
l.sw 0x8(r1), r4 |
448,8 → 360,8
l.sw 0x70(r1), r30 |
l.sw 0x74(r1), r31 |
|
l.movhi r3,hi(_int_main) |
l.ori r3,r3,lo(_int_main) |
l.movhi r3,hi(int_main) |
l.ori r3,r3,lo(int_main) |
l.jalr r3 |
l.nop |
|
/openrisc/trunk/bootloaders/orpmon/common/common.c
12,7 → 12,7
#define MAX_COMMANDS 100 |
|
// Value from linker script |
extern unsigned long src_addr; |
extern unsigned long _src_addr; |
|
bd_t bd; |
|
216,6 → 216,10
while(1) |
{ |
c=getc(); |
|
if (c == 0x7f) // Backspace on picocom is showing up as 0x7f |
c = '\b'; |
|
if (c == '\r' || c == '\f' || c == '\n') |
{ |
// Mark end of string |
290,7 → 294,7
} |
|
#if HELP_ENABLED |
extern unsigned long src_addr; // Stack section ends here, will print it out |
extern unsigned long _src_addr; // Stack section ends here, will print it out |
/* Displays help screen */ |
int help_cmd (int argc, char *argv[]) |
{ |
304,7 → 308,7
printf("Frequency\t\t%dMHz\n", IN_CLK/1000000); |
print_or1k_cache_info(); |
printf("\n"); |
printf("Info: Stack section addr 0x%x\n",(unsigned long) &src_addr); |
printf("Info: Stack section addr 0x%x\n",(unsigned long) &_src_addr); |
printf("Build tag: %s", BUILD_VERSION); |
|
return 0; |
329,7 → 333,7
{ |
/* Set defaults */ |
global.erase_method = 2; /* as needed */ |
global.src_addr = (unsigned long)&src_addr; |
global.src_addr = (unsigned long)&_src_addr; |
global.dst_addr = FLASH_BASE_ADDR; |
global.eth_add[0] = ETH_MACADDR0; |
global.eth_add[1] = ETH_MACADDR1; |
/openrisc/trunk/bootloaders/orpmon/config.mk
27,6 → 27,7
XCFLAGS += -Werror-implicit-function-declaration |
#XCFLAGS += -fno-omit-frame-pointer -g |
XCFLAGS += -fno-strength-reduce -O2 -pipe -fno-builtin -fomit-frame-pointer |
# Use all software flags, so is compatible with minimal implementation |
#XCFLAGS += -mhard-mul -mhard-div -msoft-float |
XCFLAGS += -msoft-mul -msoft-div -msoft-float |
XCFLAGS += -nostdlib |
/openrisc/trunk/bootloaders/orpmon/ram.ld
1,12 → 1,22
|
/* Seen 3 bad pages, 180-182 (0xb400-0xb6ff), so put text after these pages */ |
|
MEMORY |
{ |
vectors : ORIGIN = 0x00000000, LENGTH = 0x00002000 |
/* Use all RAM */ |
/* Put all sections into ram */ |
/* |
ram : ORIGIN = 0x00002000, LENGTH = 0x02000000 - 0x00002000 |
*/ |
/* Uncomment the following to work around bad pages in a flash mem */ |
/* Put all sections except data, rodata into ram2 */ |
/* On ORSoC dev board devices, for pages 132-134 (256Byte pages) */ |
ram : ORIGIN = 0x00001200, LENGTH = 0x8400 - 0x1200 |
ram2 : ORIGIN = 0x8700, LENGTH = 0x02000000 - 0x8700 |
|
/* Uncomment the following to work around bad pages in a flash mem */ |
/* Put all sections except data, rodata into ram2 */ |
/* On ORSoC dev board devices, for pages 180-182 (256Byte pages) */ |
/* |
ram : ORIGIN = 0x00001200, LENGTH = 0xB400 - 0x1200 |
ram2 : ORIGIN = 0xb700, LENGTH = 0x02000000 - 0xb700 |
29,7 → 39,7
_text_begin = .; |
*(.text) |
_text_end = .; |
} > ram |
} > ram2 |
|
.data : |
/* AT ( ADDR (.text) + SIZEOF(.text) + SIZEOF(.mytext))*/ |
46,13 → 56,13
.bss : |
{ |
*(.bss) |
} > ram |
} > ram2 |
|
.stack : |
{ |
*(.stack) |
_src_addr = .; |
} > ram |
} > ram2 |
/* |
.monitor : |
{ |