/SPARTAN/trunk/arch/ia32/src/asm.s |
---|
444,7 → 444,7 |
.long utext_end - utext |
.section K_DATA_START |
#.section K_DATA_START |
.global interrupt_handler_size |
interrupt_handler_size: .long (h_end-h_start)/IDT_ITEMS |
/SPARTAN/trunk/arch/ia32/src/mm/page.c |
---|
35,6 → 35,7 |
#include <arch/interrupt.h> |
#include <arch/asm.h> |
#include <synch/spinlock.h> |
#include <debug.h> |
/* |
* Note. |
53,7 → 54,7 |
__u32 i; |
if (config.cpu_active == 1) { |
dba = KA2PA(frame_alloc(FRAME_KA | FRAME_PANIC)); |
dba = frame_alloc(FRAME_KA | FRAME_PANIC); |
memsetb(dba, PAGE_SIZE, 0); |
bootstrap_dba = dba; |
68,7 → 69,7 |
} |
trap_register(14, page_fault); |
cpu_write_dba(dba); |
cpu_write_dba(KA2PA(dba)); |
} |
else { |
81,7 → 82,7 |
dba = frame_alloc(FRAME_KA | FRAME_PANIC); |
memcopy(bootstrap_dba, dba, PAGE_SIZE); |
cpu_write_dba(dba); |
cpu_write_dba(KA2PA(dba)); |
} |
paging_on(); |
121,16 → 122,16 |
* There is currently no page table for this address. Allocate |
* frame for the page table and clean it. |
*/ |
newpt = KA2PA(frame_alloc(FRAME_KA)); |
pd[pde].frame_address = newpt >> 12; |
newpt = frame_alloc(FRAME_KA); |
pd[pde].frame_address = KA2PA(newpt) >> 12; |
memsetb(newpt, PAGE_SIZE, 0); |
pd[pde].present = 1; |
pd[pde].uaccessible = 1; |
} |
if (copy) { |
newpt = KA2PA(frame_alloc(FRAME_KA)); |
newpt = frame_alloc(FRAME_KA); |
memcopy(pd[pde].frame_address << 12, newpt, PAGE_SIZE); |
pd[pde].frame_address = newpt >> 12; |
pd[pde].frame_address = KA2PA(newpt) >> 12; |
} |
pt = (struct page_specifier *) (pd[pde].frame_address << 12); |
/SPARTAN/trunk/arch/ia32/src/userspace.c |
---|
52,7 → 52,7 |
"pushl %3\n" |
"pushl %4\n" |
"iret" |
: : "i" (selector(UDATA_DES) | PL_USER), "i" (USTACK_ADDRESS+THREAD_STACK_SIZE-1000), "r" (pri), "i" (selector(UTEXT_DES) | PL_USER), "i" (UTEXT_ADDRESS)); |
: : "i" (selector(UDATA_DES) | PL_USER), "i" (USTACK_ADDRESS+(THREAD_STACK_SIZE-1)), "r" (pri), "i" (selector(UTEXT_DES) | PL_USER), "i" (UTEXT_ADDRESS)); |
/* Unreachable */ |
for(;;); |
/SPARTAN/trunk/arch/ia32/src/drivers/ega.c |
---|
47,7 → 47,7 |
{ |
__u8 hi, lo; |
map_page_to_frame(VIDEORAM, VIDEORAM, PAGE_NOT_CACHEABLE, 0); |
map_page_to_frame(PA2KA(VIDEORAM), VIDEORAM, PAGE_NOT_CACHEABLE, 0); |
outb(0x3d4,0xe); |
hi = inb(0x3d5); |
outb(0x3d4,0xf); |
58,7 → 58,7 |
void ega_display_char(char ch) |
{ |
__u8 *vram = (__u8 *) VIDEORAM; |
__u8 *vram = (__u8 *) PA2KA(VIDEORAM); |
vram[ega_cursor*2] = ch; |
} |
71,8 → 71,8 |
if (ega_cursor < SCREEN) |
return; |
memcopy(VIDEORAM + ROW*2, VIDEORAM, (SCREEN - ROW)*2); |
memsetw(VIDEORAM + (SCREEN - ROW)*2, ROW, 0x0720); |
memcopy(PA2KA(VIDEORAM) + ROW*2, PA2KA(VIDEORAM), (SCREEN - ROW)*2); |
memsetw(PA2KA(VIDEORAM) + (SCREEN - ROW)*2, ROW, 0x0720); |
ega_cursor = ega_cursor - ROW; |
} |