Unable to display on screen after enabling paging
Posted: Mon Aug 29, 2011 10:01 am
Hi
Following are the constants, of load addr and virtual addr,
I am trying to write on address SCREEN_MEM_ADDR which is identity maped after enabling paging but its not working. when I write all zeros on above memory it was not got cleared. it still displays grub command line messages.
I thought because of TLB there may be problem, so after removing mapping of 4 table and added mapping to 0 table I reloaded cr3 with same dir address. but still its not working. there is no page fault Identity map was successful. following is clear screen function.
Please help.
Following are the constants, of load addr and virtual addr,
Code: Select all
#define KERNEL_VIRTUAL_ADDR 0xC0000000 /* This is 3 GB */
#define KERNEL_LOAD_ADDR 0x01000000 /* This is 16 MB */
#define PAGE_SIZE 4096
#define SCREEN_MAX_X 80
#define SCREEN_MAX_Y 24
#define SCREEN_MEM_ADDR (0xB8000 )
I thought because of TLB there may be problem, so after removing mapping of 4 table and added mapping to 0 table I reloaded cr3 with same dir address. but still its not working. there is no page fault Identity map was successful. following is clear screen function.
Code: Select all
void kcls()
{
int i;
volatile char *v = (volatile char *) SCREEN_MEM_ADDR;
for(i = 0; i < (SCREEN_MAX_X * SCREEN_MAX_Y * 2); i++)
{
v[i] = 0;
}
screen_x = screen_y = 0;
update_curssor();
}