1.1 --- a/stage2/cpu.c Sun Jan 17 18:50:48 2016 +0100
1.2 +++ b/stage2/cpu.c Sun Jan 17 23:53:12 2016 +0100
1.3 @@ -1,9 +1,10 @@
1.4 /*
1.5 - * CPU-specific routines from U-Boot.
1.6 + * CPU-specific routines originally from U-Boot.
1.7 * See: uboot-xburst/files/arch/mips/cpu/xburst/cpu.c
1.8 * See: u-boot/arch/mips/include/asm/cacheops.h
1.9 *
1.10 * Copyright (C) 2000-2009 Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
1.11 + * Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.12 *
1.13 * This program is free software; you can redistribute it and/or
1.14 * modify it under the terms of the GNU General Public License as
1.15 @@ -122,10 +123,11 @@
1.16 "li $t0, 0x01ffe000\n" /* 16MB */
1.17 "mtc0 $t0, $5\n" /* CP0_PAGEMASK */
1.18 "nop\n"
1.19 - "mtc0 $zero, $6\n" /* CP0_WIRED */
1.20 + "li $t0, 2\n" /* index of first randomly-replaced entry */
1.21 + "mtc0 $t0, $6\n" /* CP0_WIRED */
1.22 "nop\n"
1.23
1.24 - /* 0x80000000..0x81000000 -> 0x00000000..0x01000000 */
1.25 + /* 0x80000000..0x82000000 -> 0x00000000..0x02000000 */
1.26
1.27 "mtc0 $zero, $0\n" /* CP0_INDEX */
1.28 "nop\n"
1.29 @@ -135,7 +137,7 @@
1.30 "li $t0, 0x0000001f\n" /* 0x00000000, C=3, dirty, global, valid */
1.31 "mtc0 $t0, $2\n" /* CP0_ENTRYLO0 */
1.32 "nop\n"
1.33 - "li $t0, 0x0040001f\n" /* 0x00100000, C=3, dirty, global, valid */
1.34 + "li $t0, 0x0004001f\n" /* 0x01000000, C=3, dirty, global, valid */
1.35 "mtc0 $t0, $3\n" /* CP0_ENTRYLO1 */
1.36 "nop\n"
1.37
1.38 @@ -148,7 +150,7 @@
1.39 "tlbwi\n"
1.40 "nop\n"
1.41
1.42 - /* 0x01000000..0x02000000 -> 0x01000000..0x02000000 */
1.43 + /* 0x00000000..0x02000000 -> 0x01000000..0x02000000 */
1.44
1.45 "li $t0, 1\n"
1.46 "mtc0 $t0, $0\n" /* CP0_INDEX */
1.47 @@ -156,16 +158,16 @@
1.48
1.49 /* Set physical address. */
1.50
1.51 - "li $t0, 0x0040001f\n" /* 0x01000000, C=3, dirty, global, valid */
1.52 + "li $t0, 0x0000001f\n" /* 0x00000000, C=3, dirty, global, valid */
1.53 "mtc0 $t0, $2\n" /* CP0_ENTRYLO0 */
1.54 "nop\n"
1.55 - "li $t0, 0x0080001f\n" /* 0x02000000, C=3, dirty, global, valid */
1.56 + "li $t0, 0x0004001f\n" /* 0x01000000, C=3, dirty, global, valid */
1.57 "mtc0 $t0, $3\n" /* CP0_ENTRYLO1 */
1.58 "nop\n"
1.59
1.60 /* Set virtual address. */
1.61
1.62 - "li $t0, 0x01000000\n" /* 0x01000000, ASID=0 */
1.63 + "li $t0, 0x00000000\n" /* 0x00000000, ASID=0 */
1.64 "mtc0 $t0, $10\n" /* CP0_ENTRYHI */
1.65 "nop\n"
1.66
2.1 --- a/stage2/lcd.c Sun Jan 17 18:50:48 2016 +0100
2.2 +++ b/stage2/lcd.c Sun Jan 17 23:53:12 2016 +0100
2.3 @@ -2,7 +2,7 @@
2.4 * Ben NanoNote LCD initialisation, based on uboot-xburst and xburst-tools.
2.5 *
2.6 * Copyright (C) 2001-2002 Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
2.7 - * Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
2.8 + * Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
2.9 *
2.10 * This program is free software: you can redistribute it and/or modify
2.11 * it under the terms of the GNU General Public License as published by
2.12 @@ -39,7 +39,7 @@
2.13 {
2.14 unsigned short v_max = panel_info.vl_row;
2.15 unsigned short h_max = panel_info.vl_col;
2.16 - u32 *pix = (u32 *)lcd_base + 0xa0000000 + v * h_max + h;
2.17 + u32 *pix = (u32 *)lcd_base + v * h_max + h;
2.18
2.19 /* NOTE: Code assumes 32 bits/pixel. */
2.20 #ifdef NORMAL
2.21 @@ -70,7 +70,7 @@
2.22 void clear_pixel(unsigned short h, unsigned short v)
2.23 {
2.24 unsigned short h_max = panel_info.vl_col;
2.25 - u32 *pix = (u32 *)lcd_base + 0xa0000000 + v * h_max + h;
2.26 + u32 *pix = (u32 *)lcd_base + v * h_max + h;
2.27
2.28 *pix = 0;
2.29 }
2.30 @@ -93,7 +93,7 @@
2.31 unsigned short v_max = panel_info.vl_row;
2.32 unsigned short h_max = panel_info.vl_col;
2.33 unsigned short v, h;
2.34 - u32 *pix = (u32 *)lcd_base + 0xa0000000;
2.35 + u32 *pix = (u32 *)lcd_base;
2.36
2.37 for (v = 0; v < v_max; v += 1) {
2.38 for (h = 0; h < h_max; h += 1) {