thadwarf88
User
 Fresh Osdever
| Posts: 2 |   | Karma: 0
|
VBE 3.0 - 2005/02/12 05:41
Hello,
I was programming my OS, but when I want to find the Protected Mode entrypoint for vbe 3.0 I can't find the signature Here is my source code:
<div class='indent'> #include "include/vbe.h" #include "include/types.h" #include "include/gdt.h" #include "include/console.h" #include "include/x86.h" #include "include/gdt.h" #include "include/error.h" #include "include/libc/cstring.h"
extern con console; extern GDTManager gdt_mgr;
#define VBE_BIOS_SIZE 0x8000 // 32 Kb
char bios[VBE_BIOS_SIZE]; // this holds our bios
typedef struct __PMInfoBlock { byte Signature[4]; word EntryPoint; word PMInitialize; word BIOSDataSel; word A0000Sel; word B0000Sel; word B8000Sel; word CodeSegSel; byte InProtectMode; byte Cheksum; } PMInfoBlock, *lpPMInfoBlock;
void init_vbe() { console.write("Loading VBE 3.0 Module...");
// copy BIOS into buffer memcpy(bios, (char*)0xc0000, VBE_BIOS_SIZE);
char* bios_search_ptr = (char*)&bios; // pointer to our BIOS buffer PMInfoBlock pmode_block; // our info block char pmid[] = "PMID"; // Signature to look for
// lookup the buffer: for(int i = 0; i < (VBE_BIOS_SIZE - sizeof(PMInfoBlock)) - 1; i++) { // fill pmode_block memcpy((char*)&pmode_block, bios_search_ptr, sizeof(PMInfoBlock));
// if they are the same we have found the block if(memcmp((char*)pmid, (char*)&pmode_block.Signature, 4) == 0) { console.write(" block found"); }
// increase the pointer to scan the next PMInfoBlock bios_search_ptr++; }
console.write(" done\n"); } </div>
I hope someone can help me.
|