This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Im looking for some feedback on this one... At first I was going to integrate virtual memory management and physical memory management all in one tutorial. After concluding that this is bad, I decided to split them in two.
Im looking for some feedback on both the tutorial itself as well as demo code which builds from the last tutorials. Specifically, I am looking for suggestions on the physical memory manager itself. ie; is there any problems with its design? What would you like to add to it? If there are any errors please let me know so it can be fixed.
I also would like to cover stack based memory allocation as well. I may cover that a little later though.
Demo should work with all optimization levels in MSVC++, Bochs, and VirtualPC. I havnt checked it in other emulators. If you try it in another emulator, please let me know if it works or not.
Thanks for any feedback
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
cr2 wrote:I just TRIED to compile your code in MSVC++ 2008. I get an error stating that there is an unresolved external symbol, __aulshr, in i86_install_ir
Can you please post the exact error for me and optimization level? (__aulshr or __aurllshr? __aulshr doesnt seem to exist.. ) I cant replicate that error so I need something to go by. Thanks for trying it for me
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
3|fatal error LNK1120: 1 unresolved externals||KRNL32.EXE
1|error LNK2019: unresolved external symbol __aulshr referenced in function "int __cdecl i86_install_ir(unsigned int,unsigned short,void (__cdecl*)(void))" (?i86_install_ir@@YAHIGGP6AXXZ@Z)||Hal.lib
2|error LNK2001: unresolved external symbol __aulshr||Hal.lib
Optimization: Custom
Inline Function Expansion: Default
Enable Istrinsic Functions: No
Favor Size or Speed: Neither
Omit Frame Pointers: Yes(/Oy)
Enable Fiber-safe Optimizations: No
Whole Program Optimization: No
Last edited by cr2 on Sun Sep 28, 2008 2:06 pm, edited 1 time in total.
OS-LUX V0.0
Working on...
Memory management: the Pool
After writing my own version of _aullshr() I was able to get it working with my copy of VC++ 2008 on all optimization levels. I suspect _aulshr() may work as well.
Copy this in cstd.cpp right after _ftol2_sse() and please see if it helps. Try both the _aullshr and _aulshr names.
A. panics
B. triple faults("running in bogus memory")
<update>
when I take out the code that has to do with the vs_printf call, it works(ok...it still panics, but no triple fault). Well...it was a GPF.
</update>
OS-LUX V0.0
Working on...
Memory management: the Pool
Ah, you know what? I just tried it with "custom" optimization level and it GPFs. Im going to have to fix that :p
Does it run with any other optimization level? (*edit: It seems like it works with every one but Optimization: Disabled and custom levels. Im going to have to look into those...)
Last edited by neon on Sun Sep 28, 2008 6:41 pm, edited 1 time in total.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Hi Neon. I'm really liking this tutorial, and basically I'm just going through it and modifying a few things that I want to do differently. Thanks for explaining a lot of these things in such detail. I started an OS project years ago, but had to put it on hold for a while and I'm just getting back into it. The problem is that a lot of stuff that used to be around seems to have disappeared now. Was glad to see this site was still up and running though.