Porting 32bit IOCTL on 64bit Architecture

2009-03-03 Thread tejas khatiwala
Hello, I am working on a char device driver for which I've implemented bunch of IOCTL commands. It works great under 32bit architecture. It compiles great against 64bit architecture and loads into the kernel without any problems but when I run the (user) program that makes use of those IOCTLs it g

Re: switching from long mode to compatibility mode

2008-06-10 Thread tejas khatiwala
size prefix" in front of "retf" ("o64 retf" in NASM) and it worked fine. Thanks guys, /tejas On Wed, Jun 4, 2008 at 6:34 PM, tejas khatiwala <[EMAIL PROTECTED]> wrote: > Hello, > > I am writing small code that boots, jumps to 32bit protected mode >

switching from long mode to compatibility mode

2008-06-04 Thread tejas khatiwala
Hello, I am writing small code that boots, jumps to 32bit protected mode (no-paging enabled) --> 64bit mode (pml4 paging) --> perform some 64bit test --> jump back to 32bit protected mode (no-paging enabled). I got successful getting into 64bit mode and I'm trying to switch out of it to 32bit pro

Re: Jumping to IA-32e / Long mode

2008-05-27 Thread tejas khatiwala
On Sun, May 25, 2008 at 9:41 AM, Peter Teoh <[EMAIL PROTECTED]> wrote: > I saw this: > > http://www.osdev.org/phpBB2/viewtopic.php?t=11093 Yeah.. i already got that working the same day I posted my question. What is there in this link is what linux does to make transition to long mode. (here is

Fwd: Jumping to IA-32e / Long mode

2008-05-23 Thread tejas khatiwala
Hello, I'm working on a 32-bit BIOS program for some embedded system with 64-bit CPU and I'm trying to test 64-bit mode. The BIOS normally runs in 32-bit mode. It, however, needs to performs some test for the 64-bit mode. So the drill is to jump to Long mode, perform some test (for now, I just wan

Jumping to IA-32e / Long mode

2008-05-22 Thread tejas khatiwala
Hello, I'm working on a 32-bit BIOS program for some embedded system with 64-bit CPU and I'm trying to test 64-bit mode. The BIOS normally runs in 32-bit mode. It, however, needs to performs some test for the 64-bit mode. So the drill is to jump to Long mode, perform some test (for now, I just wan

Re: editing ELF file

2008-05-06 Thread tejas khatiwala
On Tue, May 6, 2008 at 6:17 PM, Peter Teoh <[EMAIL PROTECTED]> wrote: > > > On Wed, May 7, 2008 at 5:20 AM, tejas khatiwala <[EMAIL PROTECTED]> > wrote: > > > > > > > On Tue, May 6, 2008 at 7:34 AM, Peter Teoh <[EMAIL PROTECTED]> > > wrote:

Re: editing ELF file

2008-05-06 Thread tejas khatiwala
st resort and I want to find out some way to be able to compile and link 32-bit and 64-bit mode code together or be able to call 64-bit code (64 or 32-bit ELF header) from 32-bit code (32-bit ELF header). Please help me with this and correct me if I have some misunderstanding about ELF headers.

editing ELF file

2008-05-05 Thread tejas khatiwala
Hello, This is not exactly relevant to Linux kernel but I'm gonna ask any way. Is there any way I can modify a 64-bit ELF object file to make it look like 32-bit ELF object file and link it (using `ld`) with 32-bit ELF file? I tried libelf but was unsuccessful. I had this pretty link http://peop

stuck with driver development

2007-07-24 Thread tejas khatiwala
hi.. I've been trying to learn writing device drivers in linux.. I read bunch of books including ldd3 (cover to cover), other OS books, bunch of net-articles, some network device driver codes etc. I asked for help earlier in this group for some sample manufacturer's specification so th