|
|
@ -421,6 +421,7 @@ extern unsigned long long memorysize_high_n3; |
|
|
|
extern char MipsException[], MipsExceptionEnd[]; |
|
|
|
|
|
|
|
unsigned char hwethadr[6]; |
|
|
|
static unsigned short wdt; |
|
|
|
|
|
|
|
void initmips(unsigned int raw_memsz); |
|
|
|
|
|
|
@ -444,6 +445,7 @@ initmips(unsigned int raw_memsz) |
|
|
|
bcopy(MipsException, (char *)TLB_MISS_EXC_VEC, MipsExceptionEnd - MipsException); |
|
|
|
bcopy(MipsException, (char *)GEN_EXC_VEC, MipsExceptionEnd - MipsException); |
|
|
|
|
|
|
|
CPU_ConfigCache(); |
|
|
|
CPU_FlushCache(); |
|
|
|
|
|
|
|
#ifndef ROM_EXCEPTION |
|
|
@ -1203,7 +1205,7 @@ tgt_devinit() |
|
|
|
} |
|
|
|
|
|
|
|
#if 1 |
|
|
|
CPU_ConfigCache(); |
|
|
|
//CPU_ConfigCache();
|
|
|
|
#else |
|
|
|
{ |
|
|
|
#define CTYPE_HAS_L2 0x100 |
|
|
@ -1979,6 +1981,10 @@ tgt_mapenv(int (*func) __P((char *, char *))) |
|
|
|
nomsg_on_serial=1; |
|
|
|
} |
|
|
|
|
|
|
|
bcopy(&nvram[WDT_OFFS], &wdt, 2); |
|
|
|
sprintf(env, "%d", (wdt==0||wdt==0xffff)?300:wdt); |
|
|
|
(*func)("wdt", env); |
|
|
|
|
|
|
|
#ifndef NVRAM_IN_FLASH |
|
|
|
free(nvram); |
|
|
|
#endif |
|
|
@ -2199,6 +2205,8 @@ tgt_mapenv(int (*func) __P((char *, char *))) |
|
|
|
} |
|
|
|
else if (strcmp("NOMSG_ON_SERIAL", name) == 0) { |
|
|
|
nvramsecbuf[NOMSG_OFFS]=(value[0]=='0')?0xff:0x5a; |
|
|
|
} else if (strcmp("wdt", name) == 0) { |
|
|
|
wdt = strtoul(value,0,0); |
|
|
|
} else { |
|
|
|
ep = nvrambuf+2; |
|
|
|
if(*ep != '\0') { |
|
|
@ -2250,7 +2258,7 @@ tgt_mapenv(int (*func) __P((char *, char *))) |
|
|
|
cksum(nvrambuf, NVRAM_SIZE, 1); |
|
|
|
|
|
|
|
bcopy(hwethadr, &nvramsecbuf[ETHER_OFFS], 6); |
|
|
|
|
|
|
|
bcopy(&wdt, &nvramsecbuf[WDT_OFFS], 2); |
|
|
|
#ifdef NVRAM_IN_FLASH |
|
|
|
if(fl_erase_device(nvram, NVRAM_SECSIZE, FALSE)) { |
|
|
|
printf("Error! Nvram erase failed!\n"); |
|
|
|