| 48bfc31b | 11-Jul-2017 |
Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> |
MIPS: bootm: Fix broken boot_env_legacy codepath
This patch fixes 2 bugs introduced by the following commit
2bb5b63 MIPS: bootm: rework and fix broken bootm code
The CONFIG_IS_ENABLED macro prepen
MIPS: bootm: Fix broken boot_env_legacy codepath
This patch fixes 2 bugs introduced by the following commit
2bb5b63 MIPS: bootm: rework and fix broken bootm code
The CONFIG_IS_ENABLED macro prepends 'CONFIG_' Hence, remove CONFIG_ from CONFIG_MIPS_BOOT_ENV_LEGACY usage.
Also, 2bb5b63 reworks bootm so that linux_env_legacy runs before linux_cmdline_legacy. However, linux_env_legacy depends on linux_cmdline_legacy running first as linux_cmdline_init initialilzes linux_argp which linux_env_legacy later depends on during its initialization.
Reorder the code so that linux_cmdline_legacy runs before linux_env_legacy.
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
show more ...
|
| 7a3e0f74 | 26-Sep-2016 |
Paul Burton <paul.burton@imgtec.com> |
MIPS: Use ram_top, not bi_memsize, in arch_lmb_reserve
When calculating the region to reserve for the stack in arch_lmb_reserve, make use of ram_top instead of adding bi_memsize to CONFIG_SYS_SDRAM_
MIPS: Use ram_top, not bi_memsize, in arch_lmb_reserve
When calculating the region to reserve for the stack in arch_lmb_reserve, make use of ram_top instead of adding bi_memsize to CONFIG_SYS_SDRAM_BASE. This avoids overflow if the system has enough memory to reach the end of the address space.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|
| 6c593630 | 09-Jan-2016 |
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> |
MIPS: add handling for generic and EJTAG exceptions
Add exception handlers for generic and EJTAG exceptions. Most of the assembly code is imported from Linux kernel and adapted to U-Boot. The except
MIPS: add handling for generic and EJTAG exceptions
Add exception handlers for generic and EJTAG exceptions. Most of the assembly code is imported from Linux kernel and adapted to U-Boot. The exception vector table will be reserved above the stack before U-Boot is relocated. The exception handlers will be installed and activated after relocation in the initr_traps hook function.
Generic exceptions are handled by showing a CPU register dump similar to Linux kernel. For example:
malta # md 1 00000001: Ooops: $ 0 : 00000000 00000000 00000009 00000004 $ 4 : 8ff7e108 00000000 0000003a 00000000 $ 8 : 00000008 00000001 8ff7cd18 00000004 $12 : 00000002 00000000 00000005 0000003a $16 : 00000004 00000040 00000001 00000001 $20 : 00000000 8fff53c0 00000008 00000004 $24 : ffffffff 8ffdea44 $28 : 90001650 8ff7cd00 00000004 8ffe6818 Hi : 00000000 Lo : 00000004 epc : 8ffe6848 (text bfc28848) ra : 8ffe6818 (text bfc28818) Status: 00000006 Cause : 00000410 (ExcCode 04) BadVA : 8ff9e928 PrId : 00019300 ### ERROR ### Please RESET the board ###
EJTAG exceptions are checked for SDBBP and delegated to the SDBBP handler if necessary. Otherwise the debug mode will simply be exited. The SDBBP handler currently prints the contents of registers c0_depc and c0_debug. This could be extended in the future to handle semi-hosting according to the MIPS UHI specification.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Paul Burton <paul.burton@imgtec.com> Tested-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|
| bd602528 | 09-Jan-2016 |
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> |
MIPS: reserve space for exception vectors
In order to set own exception handlers, a table with the exception vectors must be built in DRAM and the CPU EBase register must be set to the base address
MIPS: reserve space for exception vectors
In order to set own exception handlers, a table with the exception vectors must be built in DRAM and the CPU EBase register must be set to the base address of this table.
Reserve the space above the stack and use gd->irq_sp as storage for the exception base address.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
show more ...
|
| 639200f6 | 21-Sep-2016 |
Paul Burton <paul.burton@imgtec.com> |
MIPS: Ensure cache ops complete in mips_cache_reset
Ensure that cache operations complete before returning from mips_cache_reset by placing a completion barrier (sync instruction) before the return.
MIPS: Ensure cache ops complete in mips_cache_reset
Ensure that cache operations complete before returning from mips_cache_reset by placing a completion barrier (sync instruction) before the return. Without this there is no guarantee that the cache ops will complete before any subsequent memory accesses, since they are indexed cache ops & thus not implicitly ordered with memory accesses.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|
| 7953354b | 21-Sep-2016 |
Paul Burton <paul.burton@imgtec.com> |
MIPS: Join the coherent domain when a CM is present
MIPS Linux expects the bootloader to leave the boot CPU a member of the coherent domain when running on a system with a CM, and we will need to do
MIPS: Join the coherent domain when a CM is present
MIPS Linux expects the bootloader to leave the boot CPU a member of the coherent domain when running on a system with a CM, and we will need to do so if we wish to make use of IOCUs to have cache-coherent DMA in U-Boot (and on some systems there is no choice in that matter). When a CM is present, join the coherent domain after completing cache initialisation.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|
| 4baa0ab6 | 21-Sep-2016 |
Paul Burton <paul.burton@imgtec.com> |
MIPS: L2 cache support
This patch adds support for initialising & maintaining L2 caches on MIPS systems. The L2 cache configuration may be advertised through either coprocessor 0 or the MIPS Coheren
MIPS: L2 cache support
This patch adds support for initialising & maintaining L2 caches on MIPS systems. The L2 cache configuration may be advertised through either coprocessor 0 or the MIPS Coherence Manager depending upon the system, and support for both is included.
If the L2 can be bypassed then we bypass it early in boot & initialise the L1 caches first, such that we can start making use of the L1 instruction cache as early as possible. Otherwise we initialise the L2 first such that the L1s have no opportunity to generate access to the uninitialised L2.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|
| 5c72e5a6 | 21-Sep-2016 |
Paul Burton <paul.burton@imgtec.com> |
MIPS: Define register names for cache init
Define names for registers holding cache sizes throughout mips_cache_reset, in order to make the code easier to read & allow for changing register assignme
MIPS: Define register names for cache init
Define names for registers holding cache sizes throughout mips_cache_reset, in order to make the code easier to read & allow for changing register assignments more easily.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|
| 33b5c9b2 | 21-Sep-2016 |
Paul Burton <paul.burton@imgtec.com> |
MIPS: Enable use of the instruction cache earlier
Enable use of the instruction cache immediately after it has been initialised. This will only take effect if U-Boot was linked to run from kseg0 rat
MIPS: Enable use of the instruction cache earlier
Enable use of the instruction cache immediately after it has been initialised. This will only take effect if U-Boot was linked to run from kseg0 rather than kseg1, but when this is the case the data cache initialisation code will run cached & thus significantly faster.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|
| fb64cda5 | 27-May-2016 |
Paul Burton <paul.burton@imgtec.com> |
MIPS: Abstract cache op loops with a macro
The various cache maintenance routines perform a number of loops over cache lines. Rather than duplicate the code for performing such loops, abstract it ou
MIPS: Abstract cache op loops with a macro
The various cache maintenance routines perform a number of loops over cache lines. Rather than duplicate the code for performing such loops, abstract it out into a new cache_loop macro which performs an arbitrary number of cache ops on a range of addresses. This reduces duplication in the existing L1 cache maintenance code & will allow for not adding further duplication when introducing L2 cache support.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|
| 05e34255 | 29-Jan-2016 |
Paul Burton <paul.burton@imgtec.com> |
MIPS: Support dynamic I/O port base address
The existing mips_io_port_base variable isn't suitable for use early during boot since it will be stored in the .data section which may not be writable pr
MIPS: Support dynamic I/O port base address
The existing mips_io_port_base variable isn't suitable for use early during boot since it will be stored in the .data section which may not be writable pre-relocation. Fix this by moving the I/O port base address into struct arch_global_data. In order to avoid adding this field for all targets, make this dependant upon a new Kconfig entry CONFIG_DYNAMIC_IO_PORT_BASE. Malta is the only board which sets a non-zero I/O port base, so select this option only for Malta.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
show more ...
|