Search found 59 matches
- Sat Jun 21, 2014 3:46 am
- Forum: Beginning OS Development
- Topic: FAT16 bootloader question in bochs
- Replies: 1
- Views: 41922
FAT16 bootloader question in bochs
Ok, so I am trying to make a simple FAT16 bootloader using the code from the existing tutorial loader. The only modifications I made were to strip the code pertaining to adjusting the clusters to get the correct 12 bits and the Bios parameter block. I created a bochs hard disk (512 mb) and have it w...
- Mon Jun 16, 2014 6:45 pm
- Forum: Beginning OS Development
- Topic: Mapping higher-half kernel: checking my understanding
- Replies: 0
- Views: 43832
Mapping higher-half kernel: checking my understanding
Ok, so I am trying to understand the mapping of the kernel to the 3gb mark within the series. As I understand it, the boot loader sets up a temporary page directory, copies the kernel to 3gb (1mb physical), and jumps to the image. Here is the relevant code: %define IMAGE_RMODE_BASE 0x3000 %define IM...
- Sat Dec 21, 2013 9:15 pm
- Forum: Beginning OS Development
- Topic: MS VPC Issue
- Replies: 8
- Views: 53136
Re: MS VPC Issue
Update: So I got THIS function to work in VPC by moving the disk reset call below the sector load call, but now for some reason I cannot load the file. The function call to my file loader never returns. I am at work now but will try to post source code for the loader when I get home. BTW, is forum p...
- Sat Dec 14, 2013 6:18 pm
- Forum: Beginning OS Development
- Topic: MS VPC Issue
- Replies: 8
- Views: 53136
MS VPC Issue
Ok all, I am using the following code to get the boot sector of my disk within my stage 2 loader: ;**************************************************************** ; _fat12_Initialize: Initialize the FAT12 device ; Parameters: DL - device number ; Returns: AX = 0 on success, 1 on failure ;**********...
- Tue Dec 03, 2013 2:09 am
- Forum: Beginning OS Development
- Topic: triple fault on file load
- Replies: 3
- Views: 33552
Re: triple fault on file load
Problem solved... long story short, extensively taught myself how to use the bochs debugger today. That section rewrite, along with changing my kernel stub (16-bit load routine test version) to assemble as 16-bit, solved the problem Bochs debugger is officially an AMAZING OS programming tool!
- Mon Dec 02, 2013 3:46 pm
- Forum: Beginning OS Development
- Topic: triple fault on file load
- Replies: 3
- Views: 33552
Re: triple fault on file load
Ok, so I think (untested!) I found the problem. My _LoadRootDir function loads the root directory at (02e0:0000). My _LoadFileTable function is loading the file table to (02c0:0000). I am not sure if the FAT is overwriting my root directory, but if I return without trying to load the file (right aft...
- Mon Dec 02, 2013 12:51 pm
- Forum: Beginning OS Development
- Topic: triple fault on file load
- Replies: 3
- Views: 33552
triple fault on file load
Hello all! It feels like forever since I've been here! Anyways, I started writing a second stage loader and I am having an issue. I am trying to write the code for myself so I can better learn how to do so, and here is the issue I am having. In my FAT12 minidriver for stage 2, I have the following r...
- Fri Jul 13, 2012 3:39 am
- Forum: Assembly Language
- Topic: 16-bit dynamic jump?
- Replies: 1
- Views: 42181
Re: 16-bit dynamic jump?
No sweat guys I solved it! The bootloader loads us to 0050:0000 and then jumps there, setting cs to 0x50. I was using org 0x500 start: xor ax,ax mov ds,ax mov es,ax I changed my origin and segment registers to match the code segment and now it works. I guess if I am going to be jumping to a memory a...
- Fri Jul 13, 2012 1:30 am
- Forum: Beginning OS Development
- Topic: pmmngr memory allocation problem?
- Replies: 6
- Views: 44648
Re: pmmngr memory allocation problem?
The code as I have provided will work with the series bootloader, no problem. But again, as soon as I take that first pmmngr_alloc_block out of the main method I get an error. I don't understand because there are other places where the pmmngr is being called BEFORE this so I don't think it is an all...
- Thu Jul 12, 2012 6:52 pm
- Forum: Assembly Language
- Topic: 16-bit dynamic jump?
- Replies: 1
- Views: 42181
16-bit dynamic jump?
I don't know if this is what you would actually call it but I want to perform a dynamic jump in 16-bit mode assembly, sort of like a c function pointer. Here is an example of the code I am using: mov bx,cmd_addr call word [bx] ret cmd_addr: dw _test_funct _test_funct: mov ax,0x0123 ret This is a ver...
- Wed Jul 11, 2012 11:57 am
- Forum: Beginning OS Development
- Topic: pmmngr memory allocation problem?
- Replies: 6
- Views: 44648
Re: pmmngr memory allocation problem?
Thanks Mike. I did switch back to using the tutorial loader since it works very well with the system as-is. Here is where the pmmngr gets initialized: void InitializeSystem (multiboot_info *boot_inf) { // if we got here we successfully initialized the abstraction layer. We can now initialize interru...
- Tue Jul 10, 2012 3:24 pm
- Forum: Beginning OS Development
- Topic: pmmngr memory allocation problem?
- Replies: 6
- Views: 44648
Re: pmmngr memory allocation problem?
You know what, it seems to be working now! Though if anyone has advice as to what may have gone wrong before I would love to hear it! Thanks :D Edit: AAH!!! I still have the issue. It seems I solved it here in my main routine (which I don't think it should have!!!): int _cdecl main (multiboot_info *...
- Tue Jul 10, 2012 3:16 pm
- Forum: Beginning OS Development
- Topic: pmmngr memory allocation problem?
- Replies: 6
- Views: 44648
pmmngr memory allocation problem?
I have a weird error here. I am attempting to use the pmmngr/vmmngr to make a heap allocator. I used the code from K&R section 8.7 "Example: A Storage Allocator". The storage allocator in the book uses sbrk to get memory from the kernel so instead I rewrote it to use pmmngr_get_block and vmmngr_map_...
- Tue Jul 10, 2012 3:08 pm
- Forum: Beginning OS Development
- Topic: using a non-tutorial bootloader?
- Replies: 4
- Views: 37702
Re: using a non-tutorial bootloader?
OOPS!!!It's supposed to be in the LINKER command-line. If you put it in the Compiler command-line, then that might explain the problem you're having.
- Tue Jul 10, 2012 1:37 pm
- Forum: Beginning OS Development
- Topic: using a non-tutorial bootloader?
- Replies: 4
- Views: 37702
Re: using a non-tutorial bootloader?
Well now the problem is that I am getting an invalid instruction error? And I am using Visual Studio 2008 professional edition. The switch /align:512 is not recognized by the compiler but im not sure why? When do you think you will be releasing the new bootloader (not to rush you lol)?