| View previous topic :: View next topic |
| Author |
Message |
scorp
Joined: 09 Oct 2007 Posts: 4
|
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Thu Oct 11, 2007 6:20 am Post subject: |
|
|
| I'm confused... why are you using inline asm rather than just calling lv1_set_vmx_graphics_mode directly? Are you trying to do this from userspace? I don't think that will work. |
|
| Back to top |
|
 |
urchin
Joined: 02 Jun 2005 Posts: 121
|
Posted: Thu Oct 11, 2007 3:54 pm Post subject: |
|
|
| Trying to call hypervisor functions from userspace should result in a return code of LV1_NO_PRIVILEGE (-3). You'll need to call the hypervisor function from a kernel module (called by your userspace program) for the call to be allowed. |
|
| Back to top |
|
 |
ralferoo
Joined: 03 Mar 2007 Posts: 122
|
Posted: Thu Oct 11, 2007 9:43 pm Post subject: Re: setting the "grap_md" bit of the HID1 register |
|
|
should be | Code: |
li 11,H_EX
li 3,1
sc 1
|
As urchin says, -3 is the normal return value from userland. | Quote: |
but i get as return-value: -20 = LV1_NOT_IMPLEMENTED
| Probably because r11 is set to some random value and that function isn't implemented. |
|
| Back to top |
|
 |
scorp
Joined: 09 Oct 2007 Posts: 4
|
Posted: Thu Oct 11, 2007 10:34 pm Post subject: |
|
|
thx for the replies.
yes,i tried to call the hypervisor from userland and got with correct call
| Code: |
li 11,H_EX
li 3,1
sc 1
|
also the return value: -3
So i think i have to do it from a kernel module like you said.
I've never wrote such a kernel module. Does anyone have one, which a can use / rewrite to my function?
I will try to find out myself also. |
|
| Back to top |
|
 |
ralferoo
Joined: 03 Mar 2007 Posts: 122
|
Posted: Fri Oct 12, 2007 6:12 am Post subject: |
|
|
| scorp wrote: | | I've never wrote such a kernel module. Does anyone have one, which a can use / rewrite to my function? |
A good example of adding a pseudo-file to /proc is at http://www.captain.at/programming/kernel-2.6/ |
|
| Back to top |
|
 |
scorp
Joined: 09 Oct 2007 Posts: 4
|
Posted: Fri Oct 12, 2007 6:20 am Post subject: |
|
|
thx for your help.
i'll check it. |
|
| Back to top |
|
 |
ralferoo
Joined: 03 Mar 2007 Posts: 122
|
Posted: Mon Oct 15, 2007 3:21 am Post subject: |
|
|
| scorp wrote: | | I've never wrote such a kernel module. Does anyone have one, which a can use / rewrite to my function? |
I know I sent you an example before, but to solve a similar problem I knocked up a quick module module as a patch. I've commented out the vmx_graphics stuff in this example because you'll need to add it to lv1call.h, and I didn't actually need it for what I was doing. But, it's pretty much a case of uncommenting and adding the appropriate definition to lv1call.h.
http://python-ps3.svn.sourceforge.net/viewvc/python-ps3/bootable/patches/01-hypervisor-panic.patch?revision=479&view=markup |
|
| Back to top |
|
 |
scorp
Joined: 09 Oct 2007 Posts: 4
|
Posted: Mon Oct 15, 2007 6:50 pm Post subject: |
|
|
I have the Kernelversion: 2.6.16-20061110.ydl.2ps3, but if i include <lv1call.h> the compiler use the header from the version /2.6.16-20070425.ydl.3ps3.
Do i have to update the kernel first to use your patch?
How do i install such a kernel patch ? I think you have to run
| Code: | | patch -p1 [patchfile] |
in /usr/scr/linux -> ydl: /usr/src/yellowdog ?
Sorry, my linux knowledge isn't very good, cause i had to use it only to develop some c-code. I don't want to do things which crash or detroy the system due to my unexperience. |
|
| Back to top |
|
 |
|