Address error
Leon Pollak
leonp at plris.com
Wed Sep 3 09:02:49 UTC 2003
Thomas,
You are great!!!!!!
I don't know how to thank you - I brake my head already for the second day,
but do not see this simple difference in declarations!
1001 of thanks to you!!!
On Wednesday 03 September 2003 11:35, Thomas Doerfler wrote:
> Hello Loen,
>
> maybe the answer is in the definition of your _output_char
> function.
>
> AFAIK "BSP_output_char" should be a pointer to a output
> function, like:
>
> BSP_output_char_function_type BSP_output_char;
>
> Initially it should point to a dummy function that performs
> nothing. When your serial I/O is up and running, you can move
> the pointer to the corresponding function.
>
> void my_output_char_fnc(char c)
> {
> /* output my character */
> }
>
> void console_init( blablabla)
> {
> ...
> /* init my output device */
> ...
> BSP_output_char = my_output_char_fnc;
> ...
> }
>
>
> I guess you have named your output function as
> "BSP_output_char", but printk assumes this "label" is a
> pointer to the function, not the fucntion code itself.
>
> Does this fit your problem?
>
> wkr,
> Thomas.
>
> > Hello,
> > I see that my first mail was formulated unclear.
> > Here is the next attempt :-))
> >
> > I have RH9 running the last tools and snapshot, my own BSP derived form
> > mbx860 via bdm.
> > The printk function tries to call my BSP_output_char via vprintk. The
> > map shows that BSP_output_char resides at 0x34330.
> >
> > Below is the assembler of the call:
> >
> > 0x17a14 <vprintk+1056>: lis r11,3 R11=0x30000
> > 0x17a18 <vprintk+1060>: lwz r9,8(r31)
> > 0x17a1c <vprintk+1064>: lbz r0,0(r9)
> > 0x17a20 <vprintk+1068>: clrlwi r0,r0,24
> > 0x17a24 <vprintk+1072>: lwz r11,17200(r11) R11=0x9421ffe0 ?????
> > 0x17a28 <vprintk+1076>: mtctr r11
> > 0x17a2c <vprintk+1080>: mr r3,r0
> > 0x17a30 <vprintk+1084>: bctrl
> >
> > The address which is put into CTRL register is 0x9421ffe0. It is the
> > content of 0x34330 (assembler commands of BSP_output_char ).
> > The question is why the code tries to call THIS function indirectly,
> > while the calling address is direct?
> >
> >
> > Any help will be VERY highly appreciated...
> >
> > --
> > leonp at plris dot com
>
> --------------------------------------------
> IMD Ingenieurbuero fuer Microcomputertechnik
> Thomas Doerfler Herbststrasse 8
> D-82178 Puchheim Germany
> email: Thomas.Doerfler at imd-systems.de
> PGP public key available at: http://www.imd-
> systems.de/pgp_keys.htm
--
Dr.Leon M.Pollak
Director
PLR Information Systems Ltd.
leonp at plris dot com
More information about the users
mailing list