Skip to contentSkip to conversation

Reg Sparc memory addresses

DISCUSSION Shanti Katta 3 participants 6 messages Sep 26, 2002

lore
Share & tools
lore
#0 lore raw

Hi,
I compiled user-mode-linux kernel on Ultrasparc with load address set to 00000000e0000000. But, when I try to debug the kernel, it just says cannot access memory at address 0xa00020b0.
This error message remains the same no matter what I change the load address to. Can anyone guide me on valid memory addresses for userspace on Sparc? and how much different is that from x86 architecture?

-Shanti

#1 lore raw
Quoted 7 lines · Shanti Katta

Hi,
I compiled user-mode-linux kernel on Ultrasparc with load address set to 00000000e0000000. But, when I try to debug the kernel, it just says cannot access memory at address 0xa00020b0.
This error message remains the same no matter what I change the load address to. Can anyone guide me on valid memory addresses for userspace on Sparc? and how much different is that from x86 architecture?

You compiled it on ultrasparc, but I hope you compiled it as a "sparc" target and not "sparc64".

I'm not familiar with how UML runs in user space, but I suspect it needs to think it is sparc and not sparc64 for it to run in 32bit sparc userspace (which is what ultrasparc runs at for most cases).

Signature · 4 lines
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/
#2 lore raw
Quoted 3 lines · [email protected] said:

I'm not familiar with how UML runs in user space, but I suspect it needs to think it is sparc and not sparc64 for it to run in 32bit sparc userspace (which is what ultrasparc runs at for most cases).

It just wants to be a normal executable, except that it loads in a nonstandard location. And it would be OK for it to load in the standard location for the early debugging.

Jeff

#3 lore raw
In reply to Ben Collins
Quoted 11 lines · Ben Collins
Quoted 7 lines · Shanti Katta

Hi,
I compiled user-mode-linux kernel on Ultrasparc with load address set to 00000000e0000000. But, when I try to debug the kernel, it just says cannot access memory at address 0xa00020b0.
This error message remains the same no matter what I change the load address to. Can anyone guide me on valid memory addresses for userspace on Sparc? and how much different is that from x86 architecture?

You compiled it on ultrasparc, but I hope you compiled it as a "sparc" target and not "sparc64".

I compiled UML as "sparc64".

Quoted 4 lines

I'm not familiar with how UML runs in user space, but I suspect it needs to think it is sparc and not sparc64 for it to run in 32bit sparc userspace (which is what ultrasparc runs at for most cases).

So, I guess I need to compile UML as "sparc" target and debug it. I am not sure how much of UML code runs in kernelspace and how much in userspace. So, do I need to compile only the userspace code for UML as "sparc" target or the whole of UML?

-Shanti

#4 lore raw
Quoted 16 lines · Shanti Katta
Quoted 11 lines · Ben Collins
Quoted 7 lines · Shanti Katta

Hi,
I compiled user-mode-linux kernel on Ultrasparc with load address set to 00000000e0000000. But, when I try to debug the kernel, it just says cannot access memory at address 0xa00020b0.
This error message remains the same no matter what I change the load address to. Can anyone guide me on valid memory addresses for userspace on Sparc? and how much different is that from x86 architecture?

You compiled it on ultrasparc, but I hope you compiled it as a "sparc" target and not "sparc64".

I compiled UML as "sparc64".

Quoted 8 lines
Quoted 4 lines

I'm not familiar with how UML runs in user space, but I suspect it needs to think it is sparc and not sparc64 for it to run in 32bit sparc userspace (which is what ultrasparc runs at for most cases).

So, I guess I need to compile UML as "sparc" target and debug it. I am not sure how much of UML code runs in kernelspace and how much in userspace. So, do I need to compile only the userspace code for UML as "sparc" target or the whole of UML?

I believe it all runs in userspace (hence the name user-mode-linux :)

Compiling for sparc64 is the problem I suspect. IIRC, UML uses the asm-<arch> that you choose, which will break when sparc64 headers are used for a sparc32 application.

Signature · 4 lines
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/