Skip to contentSkip to conversation

insmod problem

DISCUSSION Marco Schramel 12 participants 23 messages May 13, 2005 – Jun 10, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

we use a custom mpc8270 system. Everything works fine.
Now i have to handle some float values in a device driver. If i insert the compiled module my target prints out

insmod: unresolved symbol __addsf3
insmod: unresolved symbol __floatsisf

Are there any missing libraries ?

Any other ideas?

Best regards

Marco

Signature · 2 lines
---------
Marco Schramel
#1 lore raw
Quoted 8 lines · Marco Schramel

Hi,

we use a custom mpc8270 system. Everything works fine.
Now i have to handle some float values in a device driver. If i insert the compiled module my target prints out

insmod: unresolved symbol __addsf3
insmod: unresolved symbol __floatsisf

Quoted 9 lines

Are there any missing libraries ?

Any other ideas?

Best regards

Marco

You're using floating arithmetic in the kernel.

That's not supported.

Regards

Pantelis

#2 lore raw
Quoted 10 lines

You're using floating arithmetic in the kernel.

That's not supported.

Regards

Pantelis

Just for my edification: Is floating point itself not supported (floating point register
corruption or something like that) or just linking to user space libraries?

Mark Chambers

#3 lore raw
Quoted 8 lines · Mark Chambers
Quoted 8 lines

You're using floating arithmetic in the kernel.

That's not supported.

Regards

Quoted 8 lines
Quoted 2 lines

Pantelis

Just for my edification:=A0 Is floating point itself not supported=20 (floating
point register
corruption or something like that) or just linking to user space=20
libraries?

Use of floating point registers and instructions. Its possible to use=20=

FP in rare cases inside the kernel buts its extremely discouraged.

- kumar

#4 lore raw

MPC885 - USB HCI drivers.

Hi,

Is there any driver for the USB host controller interface built-in the MPC885 processors. Does anyone have any experience with it ?

Thanks.
Guillaume.

Signature · 7 lines
=======================================
Guillaume Autran
Senior Software Engineer
MRV Communications, Inc.
Tel: (978) 952-4932 office
E-mail: [email protected]
======================================= 
#22 lore raw

floating point in kernel (Re: insmod problem)

In reply to Kumar Gala
Quoted 9 lines · Kumar Gala
Quoted 8 lines · Mark Chambers
Quoted 7 lines

You're using floating arithmetic in the kernel.

That's not supported.

Regards

Pantelis

Quoted 9 lines
Quoted 5 lines

Just for my edification:=A0 Is floating point itself not supported (floating
point register
corruption or something like that) or just linking to user space
libraries?

Use of floating point registers and instructions. Its possible to use FP in rare cases inside the kernel buts its extremely discouraged.

The kernel is doing lazy saving of FP registers, only saving for user=20 processes that uses them. And especially avoiding to save for every interrupt!

So if you like to use any FP (registers) in kernel you have to:
=2D disable kernel preemption (YES)
=2D save previous value
=2D do your stuff
=2D restore
=2D enable preemption

I remember a preemption bug caused by using MMX/SSE to copy memory uncached.

/RogerL

#5 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Guillaume Autran

Guillaume,

There is a driver in the linux-2.4 tree at denx.de, although I have no experience with it. Here's info on the cvs repository:=20
http://www.denx.de/e/solution-se.php. Look in drivers/usb for m8xxhci.[ch] This code is not in the 2.4/2.6 trees on kernel.org, not sure if patches have been submitted. I don't know the history here.

I will shortly be in need of a 2.6-based driver for the mpc8555e, but haven't found any patches. I'll probably look to port this driver, so if you need to modify it, please post patches.

Cheers,
Kylo

Quoted 11 lines · Guillaume Autran

Hi,
=20
Is there any driver for the USB host controller interface built-in the MPC885 processors.
Does anyone have any experience with it ?
=20
Thanks.
Guillaume.
=20
-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Quoted 6 lines

Guillaume Autran
Senior Software Engineer
MRV Communications, Inc.
Tel: (978) 952-4932 office
E-mail: [email protected] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Quoted 6 lines

=20
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

#6 lore raw

Re: MPC885 - USB HCI drivers.

Dear Kylo,

Quoted 2 lines · in message <[email protected]> you wrote:

There is a driver in the linux-2.4 tree at denx.de, although I have no

No, there is not!

Quoted 4 lines

experience with it. Here's info on the cvs repository:
http://www.denx.de/e/solution-se.php. Look in drivers/usb for m8xxhci.[ch] This code is not in the 2.4/2.6 trees on kernel.org, not sure if patches have been submitted. I don't know the history here.

This code will NOT work on a MPC885. It was written for the old MPC823/850 processors, and it NEVER worked really reliably on these systems either.

My advice: use a _real_ USB controller.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
For those who like this sort of thing, this is the sort of thing they
like.                                               - Abraham Lincoln
#7 lore raw

Re: MPC885 - USB HCI drivers.

Quoted 3 lines · Wolfgang Denk

This code will NOT work on a MPC885. It was written for the old MPC823/850 processors, and it NEVER worked really reliably on these systems either.

=20
Ok, thanks. Good to know! Do you know of a driver for the 885, or for the 8555E?

Quoted 1 line

My advice: use a _real_ USB controller.

Are there known problems with CPM-based USB controllers? I'm completely new to the subject, but we are designing a board assuming we can use the USB controller on an MPC8555E.

Thanks for any comments. If there are gotchas here, I'd love to find out about them sooner rather than later.

Cheers,
Kylo

#8 lore raw

Re: MPC885 - USB HCI drivers.

Quoted 1 line · Kylo Ginsberg

Are there known problems with CPM-based USB controllers?

The original CPM USB controller was only supposed to be a device side controller. With some software hacks, CPM microcode downloads, and even some hardware modifications, you can often get it to work as a host in some static situations. It doesn't have a built in root hub, you usually concentrate on making it work with one specific device for a particular product. You may find some application notes on the Freescale web site, but I haven't seem them lately.

Take Wolfgang's advice, it's easier to find a way to attach a real USB controller than to make this one work as you probably expect.

Thanks.

	-- Dan
#10 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Kylo Ginsberg
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines

My advice: use a _real_ USB controller.

Are there known problems with CPM-based USB controllers? I'm

Ummmm... yes, there are. Especially if you want to use it as a host comtroller (which is never was designed for). Even more, if there might be other periopherals in your system that might need a bit a CPM performance. Or ...

No, I better stop here. Please ask your Freecale sales representa- tive. He may know better. [Or not, maybe.]

Quoted 2 lines

completely new to the subject, but we are designing a board assuming we can use the USB controller on an MPC8555E.

You can do that. Anything can be done. But in this case I don't know of an efficient way to do it. But my knowledge is limited, obviously.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Man did not weave the web of life; he  is  merely  a  strand  in  it.
Whatever he does to the web, he does to himself.     - Seattle [1854]
#11 lore raw

Re: MPC885 - USB HCI drivers.

Quoted 6 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:
Quoted 3 lines

My advice: use a _real_ USB controller.

Quoted 11 lines
Quoted 3 lines

Are there known problems with CPM-based USB controllers? I'm

Ummmm... yes, there are. Especially if you want to use it as a host comtroller (which is never was designed for). Even more, if there might be other periopherals in your system that might need a bit a CPM performance. Or ...

Do you know if the same is applicable to CPM2 USB controllers present for example on mpc8247?

Quoted 4 lines

No, I better stop here. Please ask your Freecale sales representa- tive. He may know better. [Or not, maybe.]

The Freescale sales representative we work with actually says that CPM2 USB host controller is working well.

Quoted 5 lines

Best regards,

Wolfgang Denk

Signature · 2 lines
Sincerely yours,
Mike
#9 lore raw

RE: MPC885 - USB HCI drivers.

In reply to Dan Malek

CPM USB controllers have their quirks and erratas, but they do work. Most erratas are documented but I'm not sure all are - we identified a couple and reported them back to Freescale, but I don't know if they've updated their web site in this regard.

I'm not sure what "software hacks" means but they don't require CPM downloads or hardware modifications to work. It is also not true that they can only support one device at a time (though yes, you do need an external hub).

Bottom line: it's not easy getting them to work, but I can assure you that there are software packages that do so (we have one). They're not free - but neither are the USB controllers. Your choice!

Jonathan Masel

Quoted 1 line · Kylo Ginsberg

Are there known problems with CPM-based USB controllers?

The original CPM USB controller was only supposed to be a device side controller. With some software hacks, CPM microcode downloads, and even some hardware modifications, you can often get it to work as a host in some static situations. It doesn't have a built in root hub, you usually concentrate on making it work with one specific device for a particular product. You may find some application notes on the Freescale web site, but I haven't seem them lately.

Take Wolfgang's advice, it's easier to find a way to attach a real USB controller than to make this one work as you probably expect.

Thanks.

	-- Dan
#12 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Mike Rapoport

Dear Mike,

Quoted 3 lines · in message <[email protected]> you wrote:

Do you know if the same is applicable to CPM2 USB controllers present for example on mpc8247?

Sorry, I don't know from personal experience. But from what I heard there might be some "surprises", too.

Quoted 2 lines

The Freescale sales representative we work with actually says that CPM2 USB host controller is working well.

Of course they do. They say the same for the 850 and 823 :-(

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
I haven't lost my mind -- it's backed up on tape somewhere.
#13 lore raw

Re: MPC885 - USB HCI drivers.

Quoted 11 lines · Wolfgang Denk

Dear Mike,

Quoted 1 line · in message <[email protected]> you wrote:

Do you know if the same is applicable to CPM2 USB controllers present for example on mpc8247?

Sorry, I don't know from personal experience. But from what I heard there might be some "surprises", too.

Quoted 9 lines
Quoted 1 line

The Freescale sales representative we work with actually says that CPM2 USB host controller is working well.

Of course they do. They say the same for the 850 and 823 :-(

Best regards,

Wolfgang Denk

Well I have USB host drivers for both 8xx & 82xx working.

It was not a piece of cake exactly to get them to work but they seem to work fine even under heavy traffic.

However I use them connected to a specific peripheral so I don't know how well they fare when used as a PC style USB host controller.

YMMV

Regards

Pantelis

#15 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Bryan O'Donoghue
Quoted 12 lines · Bryan O'Donoghue
Quoted 1 line · Pantelis Antoniou

Well I have USB host drivers for both 8xx & 82xx working.

Speaking of which... would it not be a good idea, to get these comitted to the 2.6 tree... at some stage ... at least to stop people periodically posting to this list... saying "Dear all have spent 2 months, writing code for m8xx_hci drivers", when it's a needless replication of effort ?

Well, they are too hideous for human eyes :)

Quoted 6 lines
Quoted 4 lines

However I use them connected to a specific peripheral so I don't know how well they fare when used as a PC style USB host controller.

Quoted 9 lines

Also, one easy way to find out, how well or badly said code performs, in hetrogenous environments, is to... suck it and see.

As I was attempting to intimate above, I'm sure there'd be a legion of eager people to debug, modify and recode such drivers, if there lived in an obvious place... in the 2.6 tree.

Just my €0.02.

Also they're 2.4 only :)

I'll try to clean them up and post them sometime this week.

But I don't have time left to hack them for 2.6. I'll need vict^H^H^Holunteers to do it...

Regards

Pantelis

Quoted 6 lines

--

Best,
Bryan

#14 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Pantelis Antoniou
Quoted 1 line · Pantelis Antoniou

Well I have USB host drivers for both 8xx & 82xx working.

Speaking of which... would it not be a good idea, to get these comitted to the 2.6 tree... at some stage ... at least to stop people periodically posting to this list... saying "Dear all have spent 2 months, writing code for m8xx_hci drivers", when it's a needless replication of effort ?

Quoted 3 lines

However I use them connected to a specific peripheral so I don't know how well they fare when used as a PC style USB host controller.

Also, one easy way to find out, how well or badly said code performs, in hetrogenous environments, is to... suck it and see.

As I was attempting to intimate above, I'm sure there'd be a legion of eager people to debug, modify and recode such drivers, if there lived in an obvious place... in the 2.6 tree.

Just my €0.02.

--

Best,
Bryan

#16 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Pantelis Antoniou
Quoted 11 lines · Pantelis Antoniou

Also they're 2.4 only :)

I'll try to clean them up and post them sometime this week.

But I don't have time left to hack them for 2.6. I'll need vict^H^H^Holunteers to do it...

Regards

Pantelis

I think you've found one _vict^H^H^Holunteer_ :)
I've started to port the m82xxhci to 2.6. For now it is get compiled (mostly). :))

Signature · 2 lines
Sincerely yours,
Mike
#20 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Pantelis Antoniou

Hi Pantelis,

Are your drivers compatible with linux kernel 2.6.x ? I'll be interested to have a look at them if you don't mind.

Also, do you think an USB bus analyzer is a *must have* in order to work on the drivers ?

Regards,
Guillaume.

Quoted 45 lines · Pantelis Antoniou
Quoted 16 lines · Wolfgang Denk

Dear Mike,

Quoted 1 line · in message <[email protected]> you wrote:

Do you know if the same is applicable to CPM2 USB controllers present for example on mpc8247?

Sorry, I don't know from personal experience. But from what I heard there might be some "surprises", too.

Quoted 1 line

The Freescale sales representative we work with actually says that CPM2 USB host controller is working well.

Quoted 6 lines

Of course they do. They say the same for the 850 and 823 :-(

Best regards,

Wolfgang Denk

Well I have USB host drivers for both 8xx & 82xx working.

It was not a piece of cake exactly to get them to work but they seem to work fine even under heavy traffic.

However I use them connected to a specific peripheral so I don't know how well they fare when used as a PC style USB host controller.

YMMV

Regards

Pantelis

_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Signature · 7 lines
=======================================
Guillaume Autran
Senior Software Engineer
MRV Communications, Inc.
Tel: (978) 952-4932 office
E-mail: [email protected]
======================================= 
#17 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Mike Rapoport
Quoted 9 lines · Mike Rapoport
Quoted 7 lines · Pantelis Antoniou

Also they're 2.4 only :)

I'll try to clean them up and post them sometime this week.

But I don't have time left to hack them for 2.6. I'll need vict^H^H^Holunteers to do it...

Quoted 7 lines
Quoted 4 lines

Regards

Pantelis

I think you've found one _vict^H^H^Holunteer_ :)
I've started to port the m82xxhci to 2.6. For now it is get compiled (mostly). :))

Add me to the list !

Signature · 7 lines
=======================================
Guillaume Autran
Senior Software Engineer
MRV Communications, Inc.
Tel: (978) 952-4932 office
E-mail: [email protected]
======================================= 
#21 lore raw

Re: MPC885 - USB HCI drivers.

In reply to Wolfgang Denk
Quoted 9 lines · Wolfgang Denk

Dear Mike,
=20

Quoted 3 lines · in message <[email protected]> you wrote:

Do you know if the same is applicable to CPM2 USB controllers present for example on mpc8247?

=20
Sorry, I don't know from personal experience. But from what I heard there might be some "surprises", too.

Thanks for all the feedback. If we set our sights lower and only aim to use the CPM USB as a device (specifically an alternative serial console), similar warnings of "surprises"? Any source out there for this purpose? (I'm inclined to just use a 232-usb converter off a uart and make it transparent to the target s/w.)

Also, I failed to find app notes or usb-specific errata on the freescale site. Perhaps they're tucked away under a specific processor without a suggestive title?

Kylo

#18 lore raw

linux/drivers/net/fec_8xx/* vs. linux/arch/ppc/8xx_io/fec.c

In reply to Bryan O'Donoghue

Can anyone tell me what is the difference between:
linux/arch/ppc/8xx_io/fec.c
and
linux/drivers/net/fec_8xx/fec_*

They both seem to be mpc8xx fec drivers....

Thanks.
Guillaume.

Signature · 7 lines
=======================================
Guillaume Autran
Senior Software Engineer
MRV Communications, Inc.
Tel: (978) 952-4932 office
E-mail: [email protected]
======================================= 
#19 lore raw

Re: linux/drivers/net/fec_8xx/* vs. linux/arch/ppc/8xx_io/fec.c

Quoted 3 lines · Guillaume Autran

Can anyone tell me what is the difference between:

   linux/arch/ppc/8xx_io/fec.c

Old driver (AFAIK doesn't work on 2.6)

Quoted 2 lines

and
linux/drivers/net/fec_8xx/fec_*

The new driver for 2.6 (for now).

Quoted 6 lines

They both seem to be mpc8xx fec drivers....

Thanks.
Guillaume.

Regards

Pantelis