I have a module loader function, and a test module (hard drive function).
It sets a syscall to a function inside the module and exits. I call the syscall from the main kernel function after the module is loaded, and it calls the correct address (I think) but then it pagefaults, even when the syscall handler has nothing but a for(;;); function.
I looked at the page fault EIP and:
It calls: 0xC0185089
The EIP of the pagefault is: 0xC087FFC9.
The part of actually calling the syscall has the correct address.
The modules is set in mapped memory (with kmalloc()), and is initialized.
The message says "Calling..." and then nothing happens for a second, and then it pagefaults.
And, the the module is loaded to a specific address and the syscall register takes that offset into accout.
I have been trying things for a month, and it don't seem to work.
Can you help?
-JL
Module usage after loading problem
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Module usage after loading problem
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
During the loading call?
I know that works, I've tested it several times.
It's when I do something with the module after I load it that it dies.
-JL
I know that works, I've tested it several times.
It's when I do something with the module after I load it that it dies.
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io