From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipSFY-0005f8-4A for barebox@lists.infradead.org; Thu, 09 Jan 2020 07:29:01 +0000 Received: by mail-lj1-x243.google.com with SMTP id y4so6049008ljj.9 for ; Wed, 08 Jan 2020 23:28:59 -0800 (PST) From: Antony Pavlov Date: Thu, 9 Jan 2020 10:28:51 +0300 Message-Id: <20200109072855.14154-2-antonynpavlov@gmail.com> In-Reply-To: <20200109072855.14154-1-antonynpavlov@gmail.com> References: <20200109072855.14154-1-antonynpavlov@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [RFC 1/5] WIP: MIPS: configure ebase according CONFIG_MMU To: barebox@lists.infradead.org Cc: Oleksij Rempel , Peter Mamonov From: Peter Mamonov Signed-off-by: Peter Mamonov Signed-off-by: Antony Pavlov --- 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