[#4223] JUMP in cplb error handler may be too short

Document created by Aaronwu Employee on Aug 29, 2013
Version 1Show Document
  • View in full screen mode

[#4223] JUMP in cplb error handler may be too short

Submitted By: Luke Yang

Open Date

2008-07-06 03:28:13     Close Date

2008-07-18 16:36:50

Priority:

Medium     Assignee:

Michael Hennerich

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2008R1-RC8     Release:

Category:

Kernel Functions     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

App binary format:

N/A     

Summary: JUMP in cplb error handler may be too short

Details:

 

In blackfin/kernel/cplb_nompu/cplbhdr.S

 

.Lcplb_error:

        R1 = sp;

        SP += -12;

        call _panic_cplb_error;

        SP += 12;

        JUMP _handle_bad_cplb;

 

When _handle_bad_cplb is a long jump, you get error:

 

arch/blackfin/kernel/cplb-nompu/built-in.o: In function `_cplb_hdr':

(.text+0xf8): relocation truncated to fit: R_pcrel12_jump_s against symbol `handle_bad_cplb' defined in .text section in arch/blackfin/mach-common/built-in.o

 

Better use an indirect jump here.

 

 

 

Follow-ups

 

--- Robin Getz                                               2008-07-07 00:15:10

Luke:

 

Unless you have modified the kernel - this should be all in the same section,

and short jump will work fine.

 

Can you give more details on how to reproduce?

 

--- Sonic Zhang                                              2008-07-09 00:17:59

Luke deselects the kernel optimization options to move some routines into L1

Sram. He suggests to use jump.l instead of jump.

 

--- Michael Hennerich                                        2008-07-09 03:14:43

I have a fix allredy in my tree - assign to me.

-Michael

 

--- Robin Getz                                               2008-07-09 07:13:42

Sonic:

 

If Luke found a problem - then Luke needs to follow up when we ask for more

information.

 

I would like to understand what options he had selected - can he post is kernel

.config?

 

Thanks

 

--- Michael Hennerich                                        2008-07-09 07:26:30

The same bug triggered while working on the hibernate stuff.

 

We jump from one object file cplbhdr.o into entry.o:handle_bad_cplb since we

don't know how far they are linked apart from each other, it's more fail save to

use a long jump here

 

Fixed.

-Michael  

 

--- Sonic Zhang                                              2008-07-09 22:43:13

Luke is a bit lazy to update the webpage. He told me his steps. He deselects all

options in "Blackfin Kernel Optimizations". He said the second option

"Locate entire ASM lowlevel exception/interrupt - syscall and CPLB handler

in L1 Memory".

 

--- Robin Getz                                               2008-07-18 16:36:45

 

Since Michael fixed - closing.

 

In the future - if people (eg - Luke) are too lazy to monitor the forums - we

should not work on things they report.

 

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes