From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH v7 15/15] MIPS: add documentation
Date: Wed, 20 Jul 2011 01:39:06 +0400 [thread overview]
Message-ID: <1311111546-888-15-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1311111546-888-1-git-send-email-antonynpavlov@gmail.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/architecture.dox | 1 +
arch/mips/mach-mips.dox | 56 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 0 deletions(-)
create mode 100644 arch/mips/mach-mips.dox
diff --git a/arch/architecture.dox b/arch/architecture.dox
index 67e2c38..2d2cf05 100644
--- a/arch/architecture.dox
+++ b/arch/architecture.dox
@@ -86,6 +86,7 @@ TODO
@li @subpage dev_arm_mach
@li @subpage dev_bf_mach
+@li @subpage dev_mips_mach
@li @subpage dev_ppc_mach
@li @subpage dev_x86_mach
diff --git a/arch/mips/mach-mips.dox b/arch/mips/mach-mips.dox
new file mode 100644
index 0000000..0ee3d63
--- /dev/null
+++ b/arch/mips/mach-mips.dox
@@ -0,0 +1,56 @@
+/* This document is intended to provide the developer with information
+ * how to integrate a new CPU (MACH) into this part of the barebox tree
+ */
+
+/** @page dev_mips_mach MIPS based CPU (MACH) into the tree
+
+FIXME
+
+@section mach_mips_reset What's happens when the reset signal is gone
+
+Barebox normally must be linked to RAM region, cached region KSEG0 is preferred.
+This make possible to run fast (because cache used) and skip MMU support.
+
+After reset MIPS CPU starting to fetch instructions from 0xBFC00000.
+
+@note Code running immediately after reset runs at an address it is not linked
+ to: "runtime address != link address". You should only use branches and
+ do not refer to fixed data. This implies the use of assembler code only.
+ After MIPS CPU reset cache and MMU are in random state. They are unusable.
+
+barebox MIPS initialisation sequence:
+
+ * set the CP0 STATUS register to some known and sensible state.
+Now you can load and store reliably in uncached space.
+
+ * call a function \<mach_init_lowlevel\> (if not disabled).
+do some special things required only on specific CPU
+ (e. g. init RAM controller, disable watchdog)
+
+ * call a function \<board_init_lowlevel\> (if not disable).
+do some special things required only on specific board
+ (e. g. setup GPIO to required state).
+
+ ** It is desirable to have some debug code to make some contact
+ with the outside world from assembler code
+(e.g. debug_ll-like functions to write to rs232 console).
+
+ * check integity of barebox RAM execute location;
+ * copy barebox to RAM execute location;
+
+ * configure cache;
+
+ * setup stack;
+
+ ** after ths point you can call a standard C routine.
+
+ * setup exception vectors in RAM;
+ * setup CP0 STATUS to switch exception vector address to RAM;
+
+ * call start_barebox()
+
+Futher reading:
+ * Dominic Sweetman, See MIPS Run, Morgan Kaufmann, 2nd edition, 2006
+ISBN-13: 978-0120884216
+
+*/
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-07-19 21:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 21:38 [PATCH v7 01/15] MIPS: initial commit: add empty but required header files Antony Pavlov
2011-07-19 21:38 ` [PATCH v7 02/15] MIPS: import libgcc-related files from linux-2.6.39 Antony Pavlov
2011-07-19 21:38 ` [PATCH v7 03/15] MIPS: update libgcc-related files for barebox Antony Pavlov
2011-07-20 4:12 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-20 14:11 ` Antony Pavlov
2011-07-21 3:10 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 21:38 ` [PATCH v7 04/15] MIPS: import header files from linux-2.6.39 Antony Pavlov
2011-07-19 21:38 ` [PATCH v7 05/15] MIPS: update io.h for barebox Antony Pavlov
2011-07-19 21:38 ` [PATCH v7 06/15] MIPS: update elf.h " Antony Pavlov
2011-07-19 21:38 ` [PATCH v7 07/15] MIPS: update mipsregs.h " Antony Pavlov
2011-07-19 21:38 ` [PATCH v7 08/15] MIPS: import header files from barebox-2011.06.0 arch/x86 Antony Pavlov
2011-07-19 21:39 ` [PATCH v7 09/15] MIPS: add start.S, CP0 clocksource, linker script and memory layout function Antony Pavlov
2011-07-19 21:39 ` [PATCH v7 10/15] MIPS: add Malta machine support to barebox Antony Pavlov
2011-07-19 21:39 ` [PATCH v7 11/15] MIPS: add qemu malta board " Antony Pavlov
2011-07-19 21:39 ` [PATCH v7 12/15] MIPS: add initial BCM47xx-based boards support Antony Pavlov
2011-07-19 21:39 ` [PATCH v7 13/15] MIPS: add initial D-Link DIR-320 wireless router support Antony Pavlov
2011-07-20 4:11 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-20 14:03 ` Antony Pavlov
2011-07-20 18:55 ` Antony Pavlov
2011-07-19 21:39 ` [PATCH v7 14/15] MIPS: add draft cpuinfo command Antony Pavlov
2011-07-19 21:39 ` Antony Pavlov [this message]
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=1311111546-888-15-git-send-email-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/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