| db2c86d7 | 13-Jun-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: mips32/cache.S: use v1 register for indirect function calls
Synchronize the code with mips64/cache.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> C
MIPS: mips32/cache.S: use v1 register for indirect function calls
Synchronize the code with mips64/cache.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| ee8b1e29 | 13-Jun-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: mips32/cache.S: store cache line size in t8 register
Synchronize the code with mips64/cache.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Dani
MIPS: mips32/cache.S: store cache line size in t8 register
Synchronize the code with mips64/cache.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| c3259165 | 13-Jun-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: mips32/cache.S: save return address in t9 register
Synchronize the code with mips64/cache.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel
MIPS: mips32/cache.S: save return address in t9 register
Synchronize the code with mips64/cache.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| 691995f9 | 13-Jun-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: mips32/start.S: rework relocation info check
Make it similar to the code in mips64/start.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel
MIPS: mips32/start.S: rework relocation info check
Make it similar to the code in mips64/start.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| 680cb2dc | 13-Jun-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: mips32/start.S: use t8 register for dynamic relocation
Synchronize the code with mips64/start.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Da
MIPS: mips32/start.S: use t8 register for dynamic relocation
Synchronize the code with mips64/start.S, in order to allow further unifications.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| da84f33b | 12-Jun-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: mips32/cache.S: remove superfluous register assignment
The t4 register already holds the cache line size, and the value of the register is not changed in mips_init_icache.
Get the cache line
MIPS: mips32/cache.S: remove superfluous register assignment
The t4 register already holds the cache line size, and the value of the register is not changed in mips_init_icache.
Get the cache line size value from t4 for mips_init_dcache as well and remove the superfluous assignment of t5 register.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
show more ...
|
| c3e4901f | 12-Jun-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: mips32/time.c: fix checkpatch errors/warnings
Checking mips32/time.c with checkpatch.pl shows this:
arch/mips/cpu/mips32/time.c:30: WARNING: line over 80 characters arch/mips/cpu/mips32/t
MIPS: mips32/time.c: fix checkpatch errors/warnings
Checking mips32/time.c with checkpatch.pl shows this:
arch/mips/cpu/mips32/time.c:30: WARNING: line over 80 characters arch/mips/cpu/mips32/time.c:57: ERROR: return is not a function, parentheses are not required total: 1 errors, 1 warnings, 0 checks, 85 lines checked
Fix the code to make checkpatch.pl happy.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| 04380c65 | 12-Feb-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: add dynamic relocation support
The code handles relocation entries with the following relocation types only: mips32: R_MIPS_REL32 mips64: R_MIPS_REL+R_MIPS_64 xburst: R_MIPS_REL32
Other
MIPS: add dynamic relocation support
The code handles relocation entries with the following relocation types only: mips32: R_MIPS_REL32 mips64: R_MIPS_REL+R_MIPS_64 xburst: R_MIPS_REL32
Other relocation entries are skipped without processing. The code must be extended if other relocation types must be supported.
Add -pie to LDFLAGS_FINAL to generate the .rel.dyn fixup table, which will be applied to the relocated image before transferring control to it.
The CONFIG_NEEDS_MANUAL_RELOC is not needed after the patch, so remove that as well.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
show more ...
|
| 696a3b2a | 12-Feb-2013 |
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> |
MIPS: start.S: optimize BSS initialization
Get the start and end address for clearing BSS from the newly introduced symbols __bss_start and __bss_end. After GOT is relocated, those symbols are alrea
MIPS: start.S: optimize BSS initialization
Get the start and end address for clearing BSS from the newly introduced symbols __bss_start and __bss_end. After GOT is relocated, those symbols are already pointing to the correct addresses.
Also optimize the loop by moving the address incrementation to the delay slot to avoid the initial sub instruction.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
show more ...
|
| 025f2b33 | 30-Jan-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: simplify relocated _G_O_T_ address calculation
The difference between the address of the original and the relocated _GLOBAL_OFFSET_TABLE_ is always the same as the relocation offset.
The relo
MIPS: simplify relocated _G_O_T_ address calculation
The difference between the address of the original and the relocated _GLOBAL_OFFSET_TABLE_ is always the same as the relocation offset.
The relocation offset is already computed and it is available in the 's1/t6' register. Use that to adjust the relocated _G_O_T_ address, instead of calculating the offset again from the _gp value.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com> Cc: Xiangfu Liu <xiangfu@openmobilefree.net>
show more ...
|
| 67d80c9f | 24-Jan-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: start.S: don't save flush_cache parameters in advance
Saving the parameters in advance unnecessarily complicates the code. The destination address is already saved in the 's2' register, and th
MIPS: start.S: don't save flush_cache parameters in advance
Saving the parameters in advance unnecessarily complicates the code. The destination address is already saved in the 's2' register, and that register is not clobbered by the copy loop. The size of the copied data can be computed after the copy loop is done.
Change the code to compute the size parameter right before calling flush_cache, and set the destination address parameter in the delay slot of the actuall call.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| 248fe03f | 24-Jan-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: start.S: simplify relocation offset calculation
The current code uses four instructions and a temporary register to calculate the relocation offset and to adjust the gp register.
The relocati
MIPS: start.S: simplify relocation offset calculation
The current code uses four instructions and a temporary register to calculate the relocation offset and to adjust the gp register.
The relocation offset can be calculated directly from the CONFIG_SYS_MONITOR_BASE constant and from the destination address. The resulting offset can be used to adjust the gp pointer.
This approach makes the code a bit simpler because it needs two instructions only.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| b2fe86f8 | 24-Jan-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: start.S: save reused arguments earlier in relocate_code
Save the reused parameters at the beginning of the 'relocate_code' function. This makes the function a bit more readable.
Signed-off-by
MIPS: start.S: save reused arguments earlier in relocate_code
Save the reused parameters at the beginning of the 'relocate_code' function. This makes the function a bit more readable.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| f321b0f9 | 24-Jan-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: start.S: set sp register directly
The current code uses two instructions to load the stack pointer into the 'sp' register.
This results in the following assembly code:
468: 3c088040
MIPS: start.S: set sp register directly
The current code uses two instructions to load the stack pointer into the 'sp' register.
This results in the following assembly code:
468: 3c088040 lui t0,0x8040 46c: 251d0000 addiu sp,t0,0
The first instuction loads the stack pointer into the 't0' register then the value of the 'sp' register is computed by adding zero to the value of the 't0' register. The same issue present on the 64-bit version as well:
56c: 3c0c8040 lui t0,0x8040 570: 659d0000 daddiu sp,t0,0
Change the code to load the stack pointer directly into the 'sp' register. The generated code is functionally equivalent to the previous version but it is simpler.
32-bit: 468: 3c1d8040 lui sp,0x8040
64-bit: 56c: 3c1d8040 lui sp,0x8040
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|