RE: Okay, I give up. How *do* you use ioremap()?

Ingles, Raymond (Ray.Ingles@fanucrobotics.com)
Sun, 14 Nov 1999 21:56:19 -0500



Okay, I promise to *never* debug code at 3:00am again. Yes,
I figured it out just after sending the last message.

Yeah, "mem_base" was an int *, so when I added an offset it
was multiplied by 4. I changed it to a char * and everything
instantly worked.

Sorry for the pilot error. In the future, I promise to only
debug while well-rested and free of any intoxicants or
medication; and I'll bring my scientific calculator home, too.
At least the rest of the code was actually bug-free, to the
limit of my ability to test with this hardware.

Sincerely, and abashedly,

Ray Ingles (248) 377-7735 ray.ingles@fanucrobotics.com

If all the muscles in your body pulled in the same direction, you
could lift over twenty tons. But you'd walk funny. - L. M. Boyd

-----Original Message-----
From: Ingles, Raymond
[...]

You know, that's actually weird. MEM_SIZE is 0x40000 (262144 bytes),
and LEGACY_CR is 0x2a00c. So that shouldn't be a problem. But where on
earth is it getting that address? I mean, unless I messed up my math,
0xc806b000 + 0x2a00c = 0xc809500c, not 0xc8113030! That would be, uh,
a 0xb8030 offset, which, would be past 0x40000. I swear the code I
posted is what I ran, honest. Where's the address coming from?

I'm going to go add some more printk's, and see if hexadecimal math
is distorted in my region of space or what. I really don't think I'm
stomping on my own data anywhere, and I can't see *how* I could just in
that short stretch of code. :-/
Sincerely,

Ray Ingles (248) 377-7735 ray.ingles@fanucrobotics.com

"One of the main reasons for the downfall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs." - Robert Firth

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/