mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
	Peter Mamonov <pmamonov@gmail.com>
Subject: [RFC 1/5] WIP: MIPS: configure ebase according CONFIG_MMU
Date: Thu,  9 Jan 2020 10:28:51 +0300	[thread overview]
Message-ID: <20200109072855.14154-2-antonynpavlov@gmail.com> (raw)
In-Reply-To: <20200109072855.14154-1-antonynpavlov@gmail.com>

From: Peter Mamonov <pmamonov@gmail.com>

Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/boot/main_entry.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c
index 2c18bc81c3..41350aad18 100644
--- a/arch/mips/boot/main_entry.c
+++ b/arch/mips/boot/main_entry.c
@@ -34,7 +34,11 @@ static void trap_init(void)
 
 	unsigned long ebase;
 
+#ifdef CONFIG_MMU
+	ebase = CKSEG0;
+#else
 	ebase = CKSEG1;
+#endif
 
 	/*
 	 * Copy the generic exception handlers to their final destination.
@@ -56,6 +60,7 @@ static void trap_init(void)
 	/* FIXME: handle tlb */
 	memcpy((void *)(ebase), &except_vec3_generic, 0x80);
 
+	write_c0_ebase(ebase);
 	/* unset BOOT EXCEPTION VECTOR bit */
 	write_c0_status(read_c0_status() & ~ST0_BEV);
 }
-- 
2.24.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-01-09  7:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  7:28 [RFC 0/5] WIP: MIPS: implement dma mapping functions Antony Pavlov
2020-01-09  7:28 ` Antony Pavlov [this message]
2020-01-13  6:48   ` [RFC 1/5] WIP: MIPS: configure ebase according CONFIG_MMU Oleksij Rempel
2020-01-09  7:28 ` [RFC 2/5] WIP: MIPS: implement dma mapping functions Antony Pavlov
2020-01-13  8:26   ` Oleksij Rempel
2020-01-14 21:03     ` Antony Pavlov
2020-01-09  7:28 ` [RFC 3/5] net: e1000: make it work on MIPS Antony Pavlov
2020-01-13  7:29   ` Oleksij Rempel
2020-01-13 19:06     ` Lucas Stach
2020-01-09  7:28 ` [RFC 4/5] net: rtl8169: make it work on big-endian system Antony Pavlov
2020-01-13  7:21   ` Oleksij Rempel
2020-02-04 14:03   ` Oleksij Rempel
2020-02-09  6:30     ` Antony Pavlov
2020-02-09  8:17       ` Oleksij Rempel
2020-02-28  5:38     ` Antony Pavlov
2020-01-09  7:28 ` [RFC 5/5] MIPS: qemu-malta_defconfig: enable e1000 network driver Antony Pavlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200109072855.14154-2-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pmamonov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox