Setting Up the IDT from C
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Setting Up the IDT from C
hmm ... weird. Maybe you could check the IDT structure has the expected size (i.e. sizeof(IDTR)==6) ... Sometimes the C compiler may decide to add padding to have integer aligned ... i can't remember whether there is a flag to set to prevent him from doing this...
Re:Setting Up the IDT from C
Well I would try that, but my bootloader is acting up so ill have to come back to the kernel later... ( before i wasnt using a FS, so i had to keep modifying the size to load.. then it became more than a track.. disaster... )
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Setting Up the IDT from C
maybe something like this (in c) will help out?
as for your fs support in the bootloader:
keep track of logical sectors in some kind of fat (or inode) and have them be translated to chs by some function that feeds the floppy/harddisk-read/write function you may be have?
what does it say in the result phase?
Code: Select all
typedef struct{
unsigned short limit;
unsigned int base;
}__attribute__((PACKED)) idtr_t;
keep track of logical sectors in some kind of fat (or inode) and have them be translated to chs by some function that feeds the floppy/harddisk-read/write function you may be have?
what does it say in the result phase?
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image