Search found 38 matches
- Sun Oct 18, 2009 5:58 pm
- Forum: Advanced OS Development
- Topic: Page Fault Handling
- Replies: 0
- Views: 69885
Page Fault Handling
So I setup a page-fault handler, but after the page-fault occurs and my handler runs a GPF occurs. Is this happening because the page isn't properly mapped? Also, if you have a non present page stored in a page file, how do figure out where in the page file is the page you want to map when a page fa...
- Tue Oct 06, 2009 8:54 pm
- Forum: Beginning OS Development
- Topic: negative used blocks with vmware in demo 11
- Replies: 11
- Views: 49542
Re: negative used blocks with vmware in demo 11
I think the problem may be in display.c, change: case 'i': { c = va_arg (args, int); char str[32]={0}; itoa_s (c, 10, str); Puts (str); i++; // go to next character break; } to case 'i': { c = va_arg (args, int); char str[32]={0}; itoa (c, 10, str); Puts (str); i++; // go to next character break; }
- Thu Oct 01, 2009 11:27 pm
- Forum: Beginning OS Development
- Topic: Paging Confusion
- Replies: 2
- Views: 16986
Re: Paging Confusion
Thanks that cleared that up! 

- Tue Sep 29, 2009 1:21 am
- Forum: Beginning OS Development
- Topic: Paging Confusion
- Replies: 2
- Views: 16986
Paging Confusion
On PTEs and PDEs the bits reserved for the frame address are only 20-bits. So you can really only represent addresses up to 1MB. So is the frame address really multiplied by 4K to get the physical address? So like if the frame address is 1 it represents the page at 4096-8191?
- Fri Sep 25, 2009 10:59 pm
- Forum: Beginning OS Development
- Topic: GDT Problem
- Replies: 12
- Views: 51687
Re: GDT Problem
I don't see a memory hole between 15-16MB? 0x0-0x9f000 (total size 0x9f000) 0x9f000-0xa0000 (total size 0x1000) non contiguous by 0x48000 bytes 0xe8000-0x100000 (total size 0x18000) 0x100000-0x7ff0000 (total size 0x7ef0000) non contiguous by 0xf7fd0000 bytes 0xfffc0000-0x100000000 (total size 0x4000...
- Fri Sep 25, 2009 12:01 am
- Forum: Beginning OS Development
- Topic: GDT Problem
- Replies: 12
- Views: 51687
Re: GDT Problem
Thanks! I have a question about the memory detection though. What is it really detecting? I thought it was detecting the total amount of RAM installed in the system, and then certain areas were available and some were reserved (as designated by the memory map). But it seems that it's getting some ra...
- Thu Sep 24, 2009 8:43 pm
- Forum: Beginning OS Development
- Topic: GDT Problem
- Replies: 12
- Views: 51687
Re: GDT Problem
Lol...ok, can anyone look at that memory problem though?
- Thu Sep 24, 2009 2:11 pm
- Forum: Beginning OS Development
- Topic: GDT Problem
- Replies: 12
- Views: 51687
Re: GDT Problem
Bit 7 (Bit 47 in GDT): Used to indicate the segment is in memory (Used with virtual memory). Set to zero for now, since we are not using virtual memory yet
- Wed Sep 23, 2009 10:46 pm
- Forum: Beginning OS Development
- Topic: GDT Problem
- Replies: 12
- Views: 51687
Re: GDT Problem
Yeah. EDIT: Fixed it...set the present bit in the GDT entries...not sure why that's a problem though. The tutorial describes that bit as only being used in Virtual Memory and just to ignore it and set it to 0. Oh well. Although, I'm having a problem with the memory maps , if anyone could take a look...
- Wed Sep 23, 2009 2:26 pm
- Forum: Beginning OS Development
- Topic: GDT Problem
- Replies: 12
- Views: 51687
Re: GDT Problem
Ok. from gdt.h // gdt entry structure struct gdt_entry { unsigned short limit_low; unsigned short base_low; unsigned char base_middle; unsigned char access; unsigned char granularity; unsigned char base_high; }; // pointer to gdt (needed for lgdt instruction) struct gdt_ptr { unsigned short limit; u...
- Wed Sep 23, 2009 2:18 am
- Forum: Beginning OS Development
- Topic: GDT Problem
- Replies: 12
- Views: 51687
GDT Problem
Ever since I put in code for the GDT I've had problems. Eventually I decided, temporarily, it'd just be easier to use the GDT setup by the bootloader. But now I'm coming towards the point where having a GDT is necessary, but I just don't know what's going on. I tried using the GDT code from the demo...
- Mon Sep 21, 2009 2:54 am
- Forum: Beginning OS Development
- Topic: Getting a negative amount of memory?
- Replies: 4
- Views: 23786
Re: Getting a negative amount of memory?
I see. Well for whatever reason I seem to be getting the amount of memory in bytes, no biggie lol. EDIT: Nevermind...I have no idea what I'm getting. I just realized Bochs default memory is 32MB, and Virtual Box's is 64MB, and it was reporting around 38MB of RAM...also noticed that the amount of ava...
- Sun Sep 20, 2009 4:15 pm
- Forum: Beginning OS Development
- Topic: Getting a negative amount of memory?
- Replies: 4
- Views: 23786
Re: Getting a negative amount of memory?
Oh right, I remember I had a similar problem on hexadecimal numbers, thanks Andy. I still have some questions. Is the memory being returned in KB or bytes, because the amount seems too big to possibly be in KB. And also, how come in 14th demo (with the virtual memory manager) we initialize the physi...
- Sun Sep 20, 2009 7:20 am
- Forum: Beginning OS Development
- Topic: Getting a negative amount of memory?
- Replies: 4
- Views: 23786
Getting a negative amount of memory?
I'm using the code from the tutorials to get the amount of memory on the system, but it's returning a negative number:
Any idea on what's going on?
Code: Select all
Memory Size: -268370093KB
- Sat Sep 05, 2009 11:40 pm
- Forum: Beginning OS Development
- Topic: Trying to make my Kernel an Executable
- Replies: 40
- Views: 149714
Re: Trying to make my Kernel an Executable
After a long discussion with Andy we fixed the problem! Woot haha.