<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/cpu/mips, branch v1.3.3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>[MIPS] cpu/mips/cache.S: Fix build warning</title>
<updated>2008-05-06T04:22:52+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>skuribay@ruby.dti.ne.jp</email>
</author>
<published>2008-05-06T04:22:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=49387dba910e485640b575e920ee463b7e611dc3'/>
<id>49387dba910e485640b575e920ee463b7e611dc3</id>
<content type='text'>
Some old GNU assemblers, such as v2.14 (ELDK 3.1.1), v2.16 (ELDK 4.1.0),
warns illegal global symbol references by bal (and jal also) instruction.
This does not happen with the latest binutils v2.18.

Here's an example on gth2_config:

mips_4KC-gcc  -D__ASSEMBLY__ -g  -Os   -D__KERNEL__ -DTEXT_BASE=0x90000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isy
stem /opt/eldk311/usr/bin/../lib/gcc-lib/mips-linux/3.3.3/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4k
c -EB -c -o cache.o cache.S
cache.S: Assembler messages:
cache.S:243: Warning: Pretending global symbol used as branch target is local.
cache.S:250: Warning: Pretending global symbol used as branch target is local.

In principle, gas might be sensitive to global symbol references in PIC
code because they should be processed through GOT (global offset table).
But if `bal' instruction is used, it results in PC-based offset jump.
This is the cause of this warning.

In practice, we know it doesn't matter whether PC-based reference or GOT-
based. As for this case, both will work before/after relocation. But let's
fix the code.

This patch explicitly sets up a target address, then jump there.
Here's an example of disassembled code with/without this patch.

 90000668:       1485ffef        bne     a0,a1,90000628 &lt;mips_cache_reset+0x20&gt;
 9000066c:       ac80fffc        sw      zero,-4(a0)
 90000670:       01402821        move    a1,t2
-90000674:       0411ffba        bal     90000560 &lt;mips_init_icache&gt;
-90000678:       01803021        move    a2,t4
-9000067c:       01602821        move    a1,t3
-90000680:       0411ffcc        bal     900005b4 &lt;mips_init_dcache&gt;
-90000684:       01a03021        move    a2,t5
-90000688:       03000008        jr      t8
-9000068c:       00000000        nop
+90000674:       01803021        move    a2,t4
+90000678:       8f8f83ec        lw      t7,-31764(gp)
+9000067c:       01e0f809        jalr    t7
+90000680:       00000000        nop
+90000684:       01602821        move    a1,t3
+90000688:       01a03021        move    a2,t5
+9000068c:       8f8f81e0        lw      t7,-32288(gp)
+90000690:       01e0f809        jalr    t7
+90000694:       00000000        nop
+90000698:       03000008        jr      t8
+9000069c:       00000000        nop

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some old GNU assemblers, such as v2.14 (ELDK 3.1.1), v2.16 (ELDK 4.1.0),
warns illegal global symbol references by bal (and jal also) instruction.
This does not happen with the latest binutils v2.18.

Here's an example on gth2_config:

mips_4KC-gcc  -D__ASSEMBLY__ -g  -Os   -D__KERNEL__ -DTEXT_BASE=0x90000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isy
stem /opt/eldk311/usr/bin/../lib/gcc-lib/mips-linux/3.3.3/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4k
c -EB -c -o cache.o cache.S
cache.S: Assembler messages:
cache.S:243: Warning: Pretending global symbol used as branch target is local.
cache.S:250: Warning: Pretending global symbol used as branch target is local.

In principle, gas might be sensitive to global symbol references in PIC
code because they should be processed through GOT (global offset table).
But if `bal' instruction is used, it results in PC-based offset jump.
This is the cause of this warning.

In practice, we know it doesn't matter whether PC-based reference or GOT-
based. As for this case, both will work before/after relocation. But let's
fix the code.

This patch explicitly sets up a target address, then jump there.
Here's an example of disassembled code with/without this patch.

 90000668:       1485ffef        bne     a0,a1,90000628 &lt;mips_cache_reset+0x20&gt;
 9000066c:       ac80fffc        sw      zero,-4(a0)
 90000670:       01402821        move    a1,t2
-90000674:       0411ffba        bal     90000560 &lt;mips_init_icache&gt;
-90000678:       01803021        move    a2,t4
-9000067c:       01602821        move    a1,t3
-90000680:       0411ffcc        bal     900005b4 &lt;mips_init_dcache&gt;
-90000684:       01a03021        move    a2,t5
-90000688:       03000008        jr      t8
-9000068c:       00000000        nop
+90000674:       01803021        move    a2,t4
+90000678:       8f8f83ec        lw      t7,-31764(gp)
+9000067c:       01e0f809        jalr    t7
+90000680:       00000000        nop
+90000684:       01602821        move    a1,t3
+90000688:       01a03021        move    a2,t5
+9000068c:       8f8f81e0        lw      t7,-32288(gp)
+90000690:       01e0f809        jalr    t7
+90000694:       00000000        nop
+90000698:       03000008        jr      t8
+9000069c:       00000000        nop

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow building mips versions with ELDK 3.1.1</title>
<updated>2008-05-05T11:24:12+00:00</updated>
<author>
<name>Vlad Lungu</name>
<email>vlad.lungu@windriver.com</email>
</author>
<published>2008-05-05T11:04:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0f8c62a14b523c56874ebcb67c1a16c99aad48b3'/>
<id>0f8c62a14b523c56874ebcb67c1a16c99aad48b3</id>
<content type='text'>
.gpword works only with local symbols on certain binutils versions

Signed-off-by: Vlad Lungu &lt;vlad.lungu@windrvier.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
.gpword works only with local symbols on certain binutils versions

Signed-off-by: Vlad Lungu &lt;vlad.lungu@windrvier.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker</title>
<updated>2008-05-03T04:51:44+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>skuribay@ruby.dti.ne.jp</email>
</author>
<published>2008-05-03T04:51:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=141ba1cad8e6598a2466e7e2976c6a12285df619'/>
<id>141ba1cad8e6598a2466e7e2976c6a12285df619</id>
<content type='text'>
Current trick to pick up GNU assembler minor version uses a dot(.) as a
delimiter, and take the second field to obtain minor version number. But
as can be expected, this doesn't work with a version string which has
dots more than needs.

Here's an example:

$ mips-linux-gnu-as --version | grep 'GNU assembler'
GNU assembler (Sourcery G++ Lite 4.2-129) 2.18.50.20080215
$ mips-linux-gnu-as --version | grep 'GNU assembler' | cut -d. -f2
2-129) 2
$

This patch restricts the version format to 2.XX.XX... This will work
in most cases.

$ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+'
2.18.50.20080215
$ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2
18
$

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current trick to pick up GNU assembler minor version uses a dot(.) as a
delimiter, and take the second field to obtain minor version number. But
as can be expected, this doesn't work with a version string which has
dots more than needs.

Here's an example:

$ mips-linux-gnu-as --version | grep 'GNU assembler'
GNU assembler (Sourcery G++ Lite 4.2-129) 2.18.50.20080215
$ mips-linux-gnu-as --version | grep 'GNU assembler' | cut -d. -f2
2-129) 2
$

This patch restricts the version format to 2.XX.XX... This will work
in most cases.

$ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+'
2.18.50.20080215
$ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2
18
$

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[MIPS] cpu/mips/cache.S: Add dcache_enable</title>
<updated>2008-05-03T04:51:28+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>skuribay@ruby.dti.ne.jp</email>
</author>
<published>2008-05-03T04:51:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ea638951acead7f1086c908c0b9f086beab82a22'/>
<id>ea638951acead7f1086c908c0b9f086beab82a22</id>
<content type='text'>
Recent bootelf command fixes (017e9b7925f74878d0e9475388cca9bda5ef9482,
"allow ports to override bootelf behavior") requires ports to have this
function.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
Acked-by: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recent bootelf command fixes (017e9b7925f74878d0e9475388cca9bda5ef9482,
"allow ports to override bootelf behavior") requires ports to have this
function.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
Acked-by: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use jr as register jump instruction</title>
<updated>2008-04-18T07:47:29+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>skuribay@ruby.dti.ne.jp</email>
</author>
<published>2008-04-17T14:35:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=43c509254fab375c49936498da944658117ed07c'/>
<id>43c509254fab375c49936498da944658117ed07c</id>
<content type='text'>
Current assembler codes are inconsistent in the way of register jump
instruction usage; some use jr, some use j. Of course GNU as allows both
usages, but as can be expected from `Jump Register' the mnemonic `jr' is
more intuitive than `j'. For example, Linux doesn't have `j &lt;reg&gt;' usage
at all.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current assembler codes are inconsistent in the way of register jump
instruction usage; some use jr, some use j. Of course GNU as allows both
usages, but as can be expected from `Jump Register' the mnemonic `jr' is
more intuitive than `j'. For example, Linux doesn't have `j &lt;reg&gt;' usage
at all.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpu/mips/cpu.c: Fix flush_cache bug</title>
<updated>2008-04-17T21:54:23+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>shinya.kuribayashi@necel.com</email>
</author>
<published>2008-04-08T07:20:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=188e94c370621708d13547d58dbc6ed3c5602aa8'/>
<id>188e94c370621708d13547d58dbc6ed3c5602aa8</id>
<content type='text'>
Cache operations have to take line address (addr), not start_addr.
I noticed this bug when debugging ping failure.

Signed-off-by: Shinya Kuribayashi &lt;shinya.kuribayashi@necel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cache operations have to take line address (addr), not start_addr.
I noticed this bug when debugging ping failure.

Signed-off-by: Shinya Kuribayashi &lt;shinya.kuribayashi@necel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[MIPS] Extend MIPS_MAX_CACHE_SIZE upto 64kB</title>
<updated>2008-03-25T12:30:07+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>skuribay@ruby.dti.ne.jp</email>
</author>
<published>2008-03-25T12:30:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=373b16fc0c5ae34d28b9027f809ae3cbf45cdd15'/>
<id>373b16fc0c5ae34d28b9027f809ae3cbf45cdd15</id>
<content type='text'>
Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[MIPS] Fix dcache_status()</title>
<updated>2008-03-25T12:30:07+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>skuribay@ruby.dti.ne.jp</email>
</author>
<published>2008-03-25T12:30:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d98e348e2ed5aab8f7a6471ff628ab0688b8a459'/>
<id>d98e348e2ed5aab8f7a6471ff628ab0688b8a459</id>
<content type='text'>
You can't judge UNCACHED by Config.K0 LSB.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
You can't judge UNCACHED by Config.K0 LSB.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[MIPS] Introduce _machine_restart</title>
<updated>2008-03-25T12:30:07+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>skuribay@ruby.dti.ne.jp</email>
</author>
<published>2008-03-25T12:30:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b0c66af53ec9385ac2d1cc2e5d7d1ecdc81caf34'/>
<id>b0c66af53ec9385ac2d1cc2e5d7d1ecdc81caf34</id>
<content type='text'>
Handles machine specific functions by using weak functions.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handles machine specific functions by using weak functions.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[MIPS] Cleanup CP0 Status initialization</title>
<updated>2008-03-25T12:30:07+00:00</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>skuribay@ruby.dti.ne.jp</email>
</author>
<published>2008-03-25T12:30:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=decaba6f5cf386d569ac3997bebb871b966c6b18'/>
<id>decaba6f5cf386d569ac3997bebb871b966c6b18</id>
<content type='text'>
Add setup_c0_status from Linux. For the moment we disable interrupts, set
CU0, mark the kernel mode, and clear ERL and EXL. This is good enough for
reset-time configuration and will work well across most processors.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add setup_c0_status from Linux. For the moment we disable interrupts, set
CU0, mark the kernel mode, and clear ERL and EXL. This is good enough for
reset-time configuration and will work well across most processors.

Signed-off-by: Shinya Kuribayashi &lt;skuribay@ruby.dti.ne.jp&gt;
</pre>
</div>
</content>
</entry>
</feed>
