forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to set Kernel mode in asm ?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
mad3d



Joined: 18 May 2006
Posts: 6

PostPosted: Thu Mar 22, 2007 11:50 am    Post subject: How to set Kernel mode in asm ? Reply with quote

Is there any source out there that I could check?
Back to top
View user's profile Send private message
Saotome



Joined: 03 Apr 2004
Posts: 182

PostPosted: Thu Mar 22, 2007 5:34 pm    Post subject: Reply with quote

Does it have to be asm?

from ps2cam_rpc.c :
Code:

...
        DI();
        ee_kmode_enter();
       
        iop_addr = (int *)(0xbc000000+ret[1]);

        memcpy(&campacket[0],iop_addr, ret[0]);
               
        ee_kmode_exit();
        EI();
...

_________________
infj
Back to top
View user's profile Send private message
mad3d



Joined: 18 May 2006
Posts: 6

PostPosted: Fri Mar 23, 2007 9:31 am    Post subject: Reply with quote

thanks a lot
but Im looking for asm way.
Back to top
View user's profile Send private message
cloudhunter



Joined: 17 Aug 2006
Posts: 86

PostPosted: Fri Mar 23, 2007 9:41 am    Post subject: Reply with quote

mad3d wrote:
thanks a lot
but Im looking for asm way.


Forgive me if this isn't possible, but why not compile some code setting to kernel mode, and then disassemble it to see what it looks like in ASM?

Why does it specifically need to be in asm anyway? The PS2 SDK supports ASM embedded inside the C++ code.

Cloudy
_________________
:)
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Mar 23, 2007 4:31 pm    Post subject: Reply with quote

Go look at ee_kmode_enter, it's all inline asm anyway.
ps2sdk/ee/kernel/include/kernel.h
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group