diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/DocBook/.gitignore | 15 | ||||
-rw-r--r-- | doc/DocBook/Makefile | 229 | ||||
-rw-r--r-- | doc/DocBook/docbook.css | 16 | ||||
-rw-r--r-- | doc/DocBook/stylesheet.xsl | 11 | ||||
-rw-r--r-- | doc/README.arm-unaligned-accesses | 122 | ||||
-rw-r--r-- | doc/README.mini2440 | 28 | ||||
-rw-r--r-- | doc/README.rmobile | 65 | ||||
-rw-r--r-- | doc/README.scrapyard | 5 | ||||
-rw-r--r-- | doc/git-mailrc | 2 |
9 files changed, 491 insertions, 2 deletions
diff --git a/doc/DocBook/.gitignore b/doc/DocBook/.gitignore new file mode 100644 index 00000000000..90c1b112a15 --- /dev/null +++ b/doc/DocBook/.gitignore @@ -0,0 +1,15 @@ +*/ +*.xml +*.ps +*.pdf +*.html +*.9.gz +*.9 +*.aux +*.dvi +*.log +*.out +*.png +*.gif +media-indices.tmpl +media-entities.tmpl diff --git a/doc/DocBook/Makefile b/doc/DocBook/Makefile new file mode 100644 index 00000000000..2f2ddfc8657 --- /dev/null +++ b/doc/DocBook/Makefile @@ -0,0 +1,229 @@ +### +# This makefile is used to generate the kernel documentation, +# primarily based on in-line comments in various source files. +# See doc/kernel-doc-nano-HOWTO.txt for instruction in how +# to document the SRC - and how to read it. +# To add a new book the only step required is to add the book to the +# list of DOCBOOKS. + +include $(TOPDIR)/config.mk + +DOCBOOKS := + +### +# The build process is as follows (targets): +# (xmldocs) [by docproc] +# file.tmpl --> file.xml +--> file.ps (psdocs) [by db2ps or xmlto] +# +--> file.pdf (pdfdocs) [by db2pdf or xmlto] +# +--> DIR=file (htmldocs) [by xmlto] +# +--> man/ (mandocs) [by xmlto] + + +# for PDF and PS output you can choose between xmlto and docbook-utils tools +PDF_METHOD = $(prefer-db2x) +PS_METHOD = $(prefer-db2x) + + +### +# The targets that may be used. +PHONY += $(obj).depend xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs + +BOOKS := $(addprefix $(OBJTREE)/doc/DocBook/,$(DOCBOOKS)) +xmldocs: $(BOOKS) +sgmldocs: xmldocs + +PS := $(patsubst %.xml, %.ps, $(BOOKS)) +psdocs: $(PS) + +PDF := $(patsubst %.xml, %.pdf, $(BOOKS)) +pdfdocs: $(PDF) + +HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) +htmldocs: $(HTML) + $(call build_main_index) + $(call build_images) + $(call install_media_images) + +MAN := $(patsubst %.xml, %.9, $(BOOKS)) +mandocs: $(MAN) + +installmandocs: mandocs + mkdir -p /usr/local/man/man9/ + install doc/DocBook/man/*.9.gz /usr/local/man/man9/ + +### +#External programs used +KERNELDOC = $(SRCTREE)/tools/kernel-doc/kernel-doc +DOCPROC = $(OBJTREE)/tools/kernel-doc/docproc + +XMLTOFLAGS = -m $(SRCTREE)/doc/DocBook/stylesheet.xsl +XMLTOFLAGS += --skip-validation + +### +# DOCPROC is used for two purposes: +# 1) To generate a dependency list for a .tmpl file +# 2) To preprocess a .tmpl file and call kernel-doc with +# appropriate parameters. +# The following rules are used to generate the .xml documentation +# required to generate the final targets. (ps, pdf, html). +%.xml: %.tmpl + $(DOCPROC) doc $< >$@ + +ifeq ($@, "cleandocs") +sinclude $(obj).depend +$(obj).depend: $(patsubst %.xml, %.tmpl, $(DOCBOOKS)) + rm -f $(obj).depend ; \ + touch $(obj).depend ; \ + for file in $^ ; do \ + xmlfile=`echo "$${file}" | \ + sed "s/tmpl$$/xml/"` ; \ + echo -n "$${xmlfile}: ">> $(obj).depend ; \ + $(DOCPROC) depend $$file >> $(obj).depend ; \ + echo -e "\n\t$(DOCPROC) doc $< >$${xmlfile} " >> \ + $(obj).depend ; \ + done +endif + +### +# Changes in kernel-doc force a rebuild of all documentation +$(BOOKS): $(KERNELDOC) + +notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ + exit 1 +db2xtemplate = db2TYPE -o $(dir $@) $< +xmltotemplate = xmlto TYPE $(XMLTOFLAGS) -o $(dir $@) $< + +# determine which methods are available +ifeq ($(shell which db2ps >/dev/null 2>&1 && echo found),found) + use-db2x = db2x + prefer-db2x = db2x +else + use-db2x = notfound + prefer-db2x = $(use-xmlto) +endif +ifeq ($(shell which xmlto >/dev/null 2>&1 && echo found),found) + use-xmlto = xmlto + prefer-xmlto = xmlto +else + use-xmlto = notfound + prefer-xmlto = $(use-db2x) +endif + +# the commands, generated from the chosen template +quiet_cmd_db2ps = PS $@ + cmd_db2ps = $(subst TYPE,ps, $($(PS_METHOD)template)) +%.ps : %.xml + $(call cmd_db2ps) + +quiet_cmd_db2pdf = PDF $@ + cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template)) +%.pdf : %.xml + $(call cmd_db2pdf) + + +index = index.html +main_idx = $(index) +build_main_index = rm -rf $(main_idx); \ + echo '<h1>U-Boot Bootloader HTML Documentation</h1>' >> $(main_idx) && \ + echo '<h2>U-Boot Version: $(U_BOOT_VERSION)</h2>' >> $(main_idx) && \ + cat $(HTML) >> $(main_idx) + +# To work around bug [1] in docbook-xsl-stylesheets 1.76.1 , generate only html +# docs instead of xhtml with xmlto. +# [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=654338 +quiet_cmd_db2html = HTML $@ + cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ + echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \ + $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ + +%.html: %.xml + @(which xmlto > /dev/null 2>&1) || \ + (echo "*** You need to install xmlto ***"; \ + exit 1) + @rm -rf $@ $(patsubst %.html,%,$@) + $(call cmd_db2html) + @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \ + cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi + +quiet_cmd_db2man = MAN $@ + cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi +%.9 : %.xml + @(which xmlto > /dev/null 2>&1) || \ + (echo "*** You need to install xmlto ***"; \ + exit 1) + $(Q)mkdir -p $(obj)man + $(call cmd_db2man) + @touch $@ + +### +# Rules to generate postscripts and PNG images from .fig format files +quiet_cmd_fig2eps = FIG2EPS $@ + cmd_fig2eps = fig2dev -Leps $< $@ + +%.eps: %.fig + @(which fig2dev > /dev/null 2>&1) || \ + (echo "*** You need to install transfig ***"; \ + exit 1) + $(call cmd_fig2eps) + +quiet_cmd_fig2png = FIG2PNG $@ + cmd_fig2png = fig2dev -Lpng $< $@ + +%.png: %.fig + @(which fig2dev > /dev/null 2>&1) || \ + (echo "*** You need to install transfig ***"; \ + exit 1) + $(call cmd_fig2png) + +### +# Rule to convert a .c file to inline XML documentation + gen_xml = : + quiet_gen_xml = echo ' GEN $@' +silent_gen_xml = : +%.xml: %.c + @$($(quiet)gen_xml) + @( \ + echo "<programlisting>"; \ + expand --tabs=8 < $< | \ + sed -e "s/&/\\&/g" \ + -e "s/</\\</g" \ + -e "s/>/\\>/g"; \ + echo "</programlisting>") > $@ + +### +# Help targets as used by the top-level makefile +dochelp: + @echo ' U-Boot bootloader internal documentation in different formats:' + @echo ' htmldocs - HTML' + @echo ' pdfdocs - PDF' + @echo ' psdocs - Postscript' + @echo ' xmldocs - XML DocBook' + @echo ' mandocs - man pages' + @echo ' installmandocs - install man pages generated by mandocs' + @echo ' cleandocs - clean all generated DocBook files' + +### +# Temporary files left by various tools +clean-files := $(DOCBOOKS) \ + $(patsubst %.xml, %.dvi, $(DOCBOOKS)) \ + $(patsubst %.xml, %.aux, $(DOCBOOKS)) \ + $(patsubst %.xml, %.tex, $(DOCBOOKS)) \ + $(patsubst %.xml, %.log, $(DOCBOOKS)) \ + $(patsubst %.xml, %.out, $(DOCBOOKS)) \ + $(patsubst %.xml, %.ps, $(DOCBOOKS)) \ + $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \ + $(patsubst %.xml, %.html, $(DOCBOOKS)) \ + $(patsubst %.xml, %.9, $(DOCBOOKS)) \ + $(index) + +clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man + +cleandocs: + @rm -f $(obj).depend + @$(Q)rm -f $(call objectify, $(clean-files)) + @$(Q)rm -rf $(call objectify, $(clean-dirs)) + +# Declare the contents of the .PHONY variable as phony. We keep that +# information in a variable se we can use it in if_changed and friends. + +.PHONY: $(PHONY) diff --git a/doc/DocBook/docbook.css b/doc/DocBook/docbook.css new file mode 100644 index 00000000000..7a79ec54bd2 --- /dev/null +++ b/doc/DocBook/docbook.css @@ -0,0 +1,16 @@ +body { + font-family: sans-serif; +} + +.programlisting { + font-family: monospace; + font-size: 1em; + display: block; + padding: 10px; + border: 1px solid #aaa; + color: #000; + background-color: #eee; + overflow: auto; + margin: 1em 0em; + border-radius: 6px; +} diff --git a/doc/DocBook/stylesheet.xsl b/doc/DocBook/stylesheet.xsl new file mode 100644 index 00000000000..8adce568b60 --- /dev/null +++ b/doc/DocBook/stylesheet.xsl @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0"> +<param name="chunk.quietly">1</param> +<param name="funcsynopsis.style">ansi</param> +<param name="funcsynopsis.tabular.threshold">80</param> +<param name="callout.graphics">0</param> +<!-- <param name="paper.type">A4</param> --> +<param name="generate.section.toc.level">2</param> +<param name="use.id.as.filename">1</param> +<param name="html.stylesheet">../docbook.css</param> +</stylesheet> diff --git a/doc/README.arm-unaligned-accesses b/doc/README.arm-unaligned-accesses new file mode 100644 index 00000000000..c37d1358522 --- /dev/null +++ b/doc/README.arm-unaligned-accesses @@ -0,0 +1,122 @@ +If you are reading this because of a data abort: the following MIGHT +be relevant to your abort, if it was caused by an alignment violation. +In order to determine this, use the PC from the abort dump along with +an objdump -s -S of the u-boot ELF binary to locate the function where +the abort happened; then compare this function with the examples below. +If they match, then you've been hit with a compiler generated unaligned +access, and you should rewrite your code or add -mno-unaligned-access +to the command line of the offending file. + +Note that the PC shown in the abort message is relocated. In order to +be able to match it to an address in the ELF binary dump, you will need +to know the relocation offset. If your target defines CONFIG_CMD_BDI +and if you can get to the prompt and enter commands before the abort +happens, then command "bdinfo" will give you the offset. Otherwise you +will need to try a build with DEBUG set, which will display the offset, +or use a debugger and set a breakpoint at relocate_code() to see the +offset (passed as an argument). + +* + +Since U-Boot runs on a variety of hardware, some only able to perform +unaligned accesses with a strong penalty, some unable to perform them +at all, the policy regarding unaligned accesses is to not perform any, +unless absolutely necessary because of hardware or standards. + +Also, on hardware which permits it, the core is configured to throw +data abort exceptions on unaligned accesses in order to catch these +unallowed accesses as early as possible. + +Until version 4.7, the gcc default for performing unaligned accesses +(-mno-unaligned-access) is to emulate unaligned accesses using aligned +loads and stores plus shifts and masks. Emulated unaligned accesses +will not be caught by hardware. These accesses may be costly and may +be actually unnecessary. In order to catch these accesses and remove +or optimize them, option -munaligned-access is explicitly set for all +versions of gcc which support it. + +From gcc 4.7 onward starting at armv7 architectures, the default for +performing unaligned accesses is to use unaligned native loads and +stores (-munaligned-access), because the cost of unaligned accesses +has dropped on armv7 and beyond. This should not affect U-Boot's +policy of controlling unaligned accesses, however the compiler may +generate uncontrolled unaligned accesses on its own in at least one +known case: when declaring a local initialized char array, e.g. + +function foo() +{ + char buffer[] = "initial value"; +/* or */ + char buffer[] = { 'i', 'n', 'i', 't', 0 }; + ... +} + +Under -munaligned-accesses with optimizations on, this declaration +causes the compiler to generate native loads from the literal string +and native stores to the buffer, and the literal string alignment +cannot be controlled. If it is misaligned, then the core will throw +a data abort exception. + +Quite probably the same might happen for 16-bit array initializations +where the constant is aligned on a boundary which is a multiple of 2 +but not of 4: + +function foo() +{ + u16 buffer[] = { 1, 2, 3 }; + ... +} + +The long term solution to this issue is to add an option to gcc to +allow controlling the general alignment of data, including constant +initialization values. + +However this will only apply to the version of gcc which will have such +an option. For other versions, there are four workarounds: + +a) Enforce as a rule that array initializations as described above + are forbidden. This is generally not acceptable as they are valid, + and usual, C constructs. The only case where they could be rejected + is when they actually equate to a const char* declaration, i.e. the + array is initialized and never modified in the function's scope. + +b) Drop the requirement on unaligned accesses at least for ARMv7, + i.e. do not throw a data abort exception upon unaligned accesses. + But that will allow adding badly aligned code to U-Boot, only for + it to fail when re-used with a stricter target, possibly once the + bad code is already in mainline. + +c) Relax the -munaligned-access rule globally. This will prevent native + unaligned accesses of course, but that will also hide any bug caused + by a bad unaligned access, making it much harder to diagnose it. It + is actually what already happens when building ARM targets with a + pre-4.7 gcc, and it may actually already hide some bugs yet unseen + until the target gets compiled with -munaligned-access. + +d) Relax the -munaligned-access rule only for for files susceptible to + the local initialized array issue and for armv7 architectures and + beyond. This minimizes the quantity of code which can hide unwanted + misaligned accesses. + +The option retained is d). + +Considering that actual occurrences of the issue are rare (as of this +writing, 5 files out of 7840 in U-Boot, or .3%, contain an initialized +local char array which cannot actually be replaced with a const char*), +contributors should not be required to systematically try and detect +the issue in their patches. + +Detecting files susceptible to the issue can be automated through a +filter installed as a hook in .git which recognizes local char array +initializations. Automation should err on the false positive side, for +instance flagging non-local arrays as if they were local if they cannot +be told apart. + +In any case, detection shall not prevent committing the patch, but +shall pre-populate the commit message with a note to the effect that +this patch contains an initialized local char or 16-bit array and thus +should be protected from the gcc 4.7 issue. + +Upon a positive detection, either $(PLATFORM_NO_UNALIGNED) should be +added to CFLAGS for the affected file(s), or if the array is a pseudo +const char*, it should be replaced by an actual one. diff --git a/doc/README.mini2440 b/doc/README.mini2440 new file mode 100644 index 00000000000..311ca52862a --- /dev/null +++ b/doc/README.mini2440 @@ -0,0 +1,28 @@ +U-Boot for FriendlyARM Mini2440 (s3c2440) + +This file contains information for the port of U-Boot to FriendlyARM +mini2440 + +All information about the board can be found on : +http://www.friendlyarm.net/products/mini2440 + +To build u-boot : ./MAKEALL mini2440 + +Overview : +-------- +FriendlyARM Mini 2440 SBC (Single-Board Computer) with 400 MHz Samsung S3C2440 +ARM9 processor. The board measures 100 x 100 mm, ideal for learning about ARM9 +systems. It's a low cost board. + +Boot Methods : +------------ +Mini2440 can boot from NOR or NAND. + +Build : +----- +./MAKEALL mini2440 + +or + +make mini2440_config +make diff --git a/doc/README.rmobile b/doc/README.rmobile new file mode 100644 index 00000000000..7ec63f13cea --- /dev/null +++ b/doc/README.rmobile @@ -0,0 +1,65 @@ +Summary +======= + +This README is about U-Boot support for Renesas's ARM Cortex-A9 based RMOBILE[1] +family of SoCs. Renesas's RMOBILE SoC family contains an ARM Cortex-A9. + +Currently the following boards are supported: + +* KMC KZM-A9-GT [2] + +* Atmark-Techno Armadillo-800-EVA [3] + +Toolchain +========= + +ARM Cortex-A9 support ARM v7 instruction set (-march=armv7a). +But currently we compile with -march=armv5 to allow more compilers to work. +(For U-Boot code this has no performance impact.) +Because there was no compiler which is supporting armv7a not much before. +Currently, ELDK[4], Linaro[5], CodeSourcey[6] and Emdebian[7] supports -march=armv7a +and you can get. + +Build +===== + +* KZM-A9-GT + +make kzm9g_config +make + +* Armadillo-800-EVA + +make armadillo-800eva_config +make + +Links +===== + +[1] Renesas RMOBILE: + +http://am.renesas.com/products/soc/assp/mobile/r_mobile/index.jsp + +[2] KZM-A9-GT + +http://www.kmckk.co.jp/kzma9-gt/index.html + +[3] Armadillo-800-EVA + +http://armadillo.atmark-techno.com/armadillo-800-EVA + +[4] ELDK + +http://www.denx.de/wiki/view/ELDK-5/WebHome#Section_1.6. + +[5] Linaro + +http://www.linaro.org/downloads/ + +[6] CodeSourcey + +http://www.mentor.com/embedded-software/codesourcery + +[7] Emdebian + +http://www.emdebian.org/crosstools.html diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 5929a8e0a08..d0f47164d7e 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,8 +11,9 @@ easily if here is something they might want to dig for... Board Arch CPU removed Commit last known maintainer/contact ============================================================================= -apollon arm omap24xx - 2012-09-06 Kyungmin Park <kyungmin.park@samsung.com> -tb0229 mips mips32 - 2011-12-12 +TQM85xx powerpc MPC85xx - - Stefan Roese <sr@denx.de> +apollon arm omap24xx 535c74f 2012-09-18 Kyungmin Park <kyungmin.park@samsung.com> +tb0229 mips mips32 3f3110d 2011-12-12 rmu powerpc MPC850 fb82fd7 2011-12-07 Wolfgang Denk <wd@denx.de> OXC powerpc MPC8240 309a292 2011-12-07 BAB7xx powerpc MPC740/MPC750 c53043b 2011-12-07 Frank Gottschling <fgottschling@eltec.de> diff --git a/doc/git-mailrc b/doc/git-mailrc index d7fc3c8cfe8..7f60ef134ab 100644 --- a/doc/git-mailrc +++ b/doc/git-mailrc @@ -46,6 +46,7 @@ alias imx uboot, sbabic alias kirkwood uboot, prafulla alias omap ti alias pxa uboot, marex +alias rmobile uboot, iwamatsu alias s3c samsung alias s5pc samsung alias samsung uboot, prom @@ -95,6 +96,7 @@ alias x86 uboot, gruss # Subsystem aliases alias cfi uboot, stroese +alias kerneldoc uboot, marex alias fdt uboot, Jerry Van Baren <vanbaren@cideas.com> alias i2c uboot, hs alias mmc uboot, afleming |