summaryrefslogtreecommitdiff
path: root/arch/microblaze
Commit message (Collapse)AuthorAgeLines
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* microblaze: Consolidate cache codeMichal Simek2010-04-16-44/+28
| | | | | | | Merge cpu and lib cache code. Flush cache before disabling. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Flush cache before jumping to kernelMichal Simek2010-04-16-0/+8
| | | | | | | There is used max cache size on system which doesn't define cache size. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Support system with WB cacheMichal Simek2010-04-16-1/+1
| | | | | | | | | | WB cache use different instruction that WT cache but the major code is that same. That means that wdc.flush on system with WT cache do the same thing as before. You need newer toolchain with wdc.flush support. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Change initialization sequenceMichal Simek2010-04-16-3/+12
| | | | | | | env_relocation should be called first. Added stdio_init too. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Change cache report messagesMichal Simek2010-04-16-2/+2
| | | | | | It is more accurate to show that caches are OFF instead of FAIL. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Fix interrupt handler codeMichal Simek2010-04-16-17/+11
| | | | | | | It is better to read ivr and react on it than do long parsing from two regs. Interrupt controller returs actual irq number. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Move FSL initialization to board.cMichal Simek2010-04-16-8/+6
| | | | | | Move FSL out of interrupt controller. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Move timer initialization to board.cMichal Simek2010-04-16-7/+9
| | | | | | | I would like to handle case where system doesn't contain intc that's why I need timer initialization out of intc code. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Fix irq.S codeMichal Simek2010-04-16-120/+62
| | | | | | | It is ancient code. There is possible to save several instructions just if we use offset instead of addik Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Add FDT supportArun Bhanu2010-04-16-5/+34
| | | | | | | | | | This patch adds FDT (flattened device tree) support to microblaze arch. Tested with Linux arch/microblaze kernels with and without compiled in FDT on Xilinx ML506 board. Signed-off-by: Arun Bhanu <arun@bhanu.net> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Move cpu/microblaze/* to arch/microblaze/cpu/*Peter Tyser2010-04-13-0/+824
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Move architecture-specific includes to arch/$ARCH/include/asmPeter Tyser2010-04-13-0/+1390
| | | | | | | | This helps to clean up the include/ directory so that it only contains non-architecture-specific headers and also matches Linux's directory layout which many U-Boot developers are already familiar with. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Move lib_$ARCH directories to arch/$ARCH/libPeter Tyser2010-04-13-0/+383
Also move lib_$ARCH/config.mk to arch/$ARCH/config.mk This change is intended to clean up the top-level directory structure and more closely mimic Linux's directory organization. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>