| 28875e2c | 12-Feb-2013 |
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> |
MIPS: start.S: use symbol __image_copy_end for U-Boot image relocation
Use the newly introduced symbol __image_copy_end as end address for relocation of U-Boot image. This is needed for dynamic relo
MIPS: start.S: use symbol __image_copy_end for U-Boot image relocation
Use the newly introduced symbol __image_copy_end as end address for relocation of U-Boot image. This is needed for dynamic relocation added in later patches. This patch obsoletes the symbols uboot_end and uboot_end_data which are removed.
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 ...
|
| a52852c5 | 12-Feb-2013 |
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> |
MIPS: u-boot.lds: merge all BSS sections and introduce symbols __bss_[start|end]
These symbols are used in later patches for as addresses for clearing the BSS area in the relocated U-Boot image.
Si
MIPS: u-boot.lds: merge all BSS sections and introduce symbols __bss_[start|end]
These symbols are used in later patches for as addresses for clearing the BSS area in the relocated U-Boot image.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
show more ...
|
| 45397816 | 12-Feb-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: compute num_got_entries from .got section's size
The '__got_start' and '__got_end' symbols are used only in the linker script to compute the value of the 'num_got_entries' symbol.
Remove the
MIPS: compute num_got_entries from .got section's size
The '__got_start' and '__got_end' symbols are used only in the linker script to compute the value of the 'num_got_entries' symbol.
Remove the symbols and use the SIZEOF(.got) command to get the size of the .got section.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|
| cb5dbca8 | 30-Jan-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: add unified u-boot.lds file
The patch adds an unified linker script file which can be used for all currently supported MIPS targets.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel
MIPS: add unified u-boot.lds file
The patch adds an unified linker script file which can be used for all currently supported MIPS targets.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com> Cc: Stefan Roese <sr@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Xiangfu Liu <xiangfu@openmobilefree.net> Acked-by: Stefan Roese <sr@denx.de>
show more ...
|
| 6d862278 | 30-Jan-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: xburst: 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 relocatio
MIPS: xburst: 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> Cc: Xiangfu Liu <xiangfu@openmobilefree.net>
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 ...
|
| 5b7dd816 | 24-Jan-2013 |
Gabor Juhos <juhosg@openwrt.org> |
MIPS: start.S: fix boundary check in relocate_code
The loop code copies more data with one than necessary due to the 'ble' instuction. Use the 'blt' instruction instead to fix that.
Due to the lack
MIPS: start.S: fix boundary check in relocate_code
The loop code copies more data with one than necessary due to the 'ble' instuction. Use the 'blt' instruction instead to fix that.
Due to the lack of suitable hardware the Xburst specific code is compile tested only. However the change is quite obvious.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
show more ...
|