Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Ive been working through JamesM's kernel dev tutorials, and am now on step 6. The goal at the end of this chapter is to force a page fault to test if the handler works. I am, however, receiving the error specified in the subject of this post. Here it is again:
#ifndef PAGING_H
#define PAGING_H
#include "common.h"
#include "isr.h"
typedef struct page
{
uint32 present: 1; //page present in memory
uint32 rw: 1; //read only if clear, read/write if set
uint32 user: 1; //supervisor level only if clear
uint32 accessed: 1; //has the page been accessed since last refresh
uint32 dirty: 1; //has the page been written to since last refresh
uint32 unused: 7; //amalgation of unused and reserved bits
uint32 frame: 20; //frame address (shifted right 12 bits)
} page_t;
typedef struct page_table
{
page_t pages[1024];
} page_table_t;
typedef struct page_directory
{
page_table_t *tables[1024];
uint32 tablesPhysical[1024];
uint32 physicalAddr;
} page_directory_t;
//sets up environment and enables paging
void init_paging();
//causes the specified page directory to be loaded into the CR3 register
void switch_page_directory(page_directory_t *new);
//retrieves a pointer to the page required
page_t *get_page(uint32 address, int make, page_directory_t *dir);
//handler for page faults
void page_fault(registers_t regs);
#endif
Could someone please help me understand and fix this error? Thanks in advance.
*facepalm*
Sorry for bothering you with such a stupid question. Adding paging.o to my Makefile is exactly what I didnt do. Thanks for the quick reply though.
At least I know i wont make this mistake again!
The Makefile tutorial shows a Makefile setup that finds all source files by itself. This also has drawbacks (any 'test.c' gets dragged in), but on the whole I found this to be more convenient.
Every good solution is obvious once you've found it.