Commit e5b97bb3 authored by vbordone's avatar vbordone
Browse files

arreglo id map task

parent 9739dcf2
This diff is collapsed.
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -147,6 +147,7 @@ restaurar_cr3:
mov cr3, eax
pop eax
copiar:
xchg bx, bx
push 0x101000 ;src
push 0x100000 ;dst
call copy_page
......
No preview for this file type
No preview for this file type
No preview for this file type
0x00001271 ..@16.ciclo_cadena
0x000012d8 ..@18.ciclo_cadena
0x00001432 ..@21.ciclo_cadena
0x00001419 ..@21.sigo
0x00001499 ..@22.ciclo_cadena
0x00001480 ..@22.sigo
0x000014d8 ..@23.ciclo_cadena
0x000014bf ..@23.sigo
0x0000153f ..@24.ciclo_cadena
0x00001526 ..@24.sigo
0x00001591 ..@25.ciclo_cadena
0x00001578 ..@25.sigo
0x000015ef ..@26.ciclo_cadena
0x000015d6 ..@26.sigo
0x0000162b ..@27.ciclo_cadena
0x00001612 ..@27.sigo
0x00002c26 ..@71.ciclo_cadena
0x0000155d A20_check
0x00001648 A20_check.exit
0x000015fe A20_check.falla
0x00001638 A20_check.sigue
0x00001403 A20_disable
0x000014a9 A20_enable
0x0000154f A20_wait
0x00001556 A20_wait2
0x00001435 ..@21.ciclo_cadena
0x0000141c ..@21.sigo
0x0000149c ..@22.ciclo_cadena
0x00001483 ..@22.sigo
0x000014db ..@23.ciclo_cadena
0x000014c2 ..@23.sigo
0x00001542 ..@24.ciclo_cadena
0x00001529 ..@24.sigo
0x00001594 ..@25.ciclo_cadena
0x0000157b ..@25.sigo
0x000015f2 ..@26.ciclo_cadena
0x000015d9 ..@26.sigo
0x0000162e ..@27.ciclo_cadena
0x00001615 ..@27.sigo
0x00002c36 ..@71.ciclo_cadena
0x00001560 A20_check
0x0000164b A20_check.exit
0x00001601 A20_check.falla
0x0000163b A20_check.sigue
0x00001406 A20_disable
0x000014ac A20_enable
0x00001552 A20_wait
0x00001559 A20_wait2
0x00001351 antes_de_init_task_dir
0x0000138d antes_de_pic
0x00001381 armar_idt
0x000069b8 __bss_start
0x00001390 antes_de_pic
0x00001384 armar_idt
0x000069b4 __bss_start
0x00000017 check_len
0x000013e1 check_msg
0x000013e4 check_msg
0x00006140 code2exception
0x00001401 contadorlineas
0x00001404 contadorlineas
0x00001370 copiar
0x00003042 copy_page
0x00003053 copy_page
0x000069a0 curr_column
0x000069a4 curr_row
0x0000133d desmapear
0x0000135e despues_de_task_dir
0x00000017 disable_len
0x000013ca disable_msg
0x000069b8 _edata
0x000013cd disable_msg
0x000069b4 _edata
0x00000017 enable_len
0x000013b3 enable_msg
0x000069b8 _end
0x000013b6 enable_msg
0x000069b4 _end
0x00000006 fail_len
0x000013fb fail_msg
0x00002cc1 fix_rowcol
0x000013fe fail_msg
0x00002cd1 fix_rowcol
0x00006020 gdt
0x00006000 GDT_DESC
0x000061a0 idt
0x00006198 IDT_DESC
0x00001d91 idt_init
0x00001d94 idt_init
0x00001354 init_task_dir
0x0000139b int
0x00002600 _isr0
0x00002637 _isr0.ring0_exception
0x00002645 _isr1
0x000028b0 _isr10
0x000028e5 _isr10.ring0_exception
0x000028f3 _isr11
0x00002928 _isr11.ring0_exception
0x00002936 _isr12
0x0000296b _isr12.ring0_exception
0x00002979 _isr13
0x000029ae _isr13.ring0_exception
0x000029bc _isr14
0x000029f1 _isr14.ring0_exception
0x000029ff _isr15
0x00002a36 _isr15.ring0_exception
0x00002a44 _isr16
0x00002a7b _isr16.ring0_exception
0x00002a89 _isr17
0x00002abe _isr17.ring0_exception
0x00002acc _isr18
0x00002b03 _isr18.ring0_exception
0x00002b11 _isr19
0x00002b48 _isr19.ring0_exception
0x0000267c _isr1.ring0_exception
0x0000268a _isr2
0x00002b56 _isr20
0x00002b8d _isr20.ring0_exception
0x000026c1 _isr2.ring0_exception
0x000026cf _isr3
0x00002b9b _isr32
0x00002ba8 _isr33
0x00002706 _isr3.ring0_exception
0x00002714 _isr4
0x0000274b _isr4.ring0_exception
0x00002759 _isr5
0x00002790 _isr5.ring0_exception
0x0000279e _isr6
0x000027d5 _isr6.ring0_exception
0x000027e3 _isr7
0x0000281a _isr7.ring0_exception
0x00002828 _isr8
0x00002bb9 _isr88
0x0000285d _isr8.ring0_exception
0x0000286b _isr9
0x00002bc4 _isr98
0x000028a2 _isr9.ring0_exception
0x00002bd6 isrClock
0x00002bd2 isrNumber
0x0000139e int
0x00002610 _isr0
0x00002647 _isr0.ring0_exception
0x00002655 _isr1
0x000028c0 _isr10
0x000028f5 _isr10.ring0_exception
0x00002903 _isr11
0x00002938 _isr11.ring0_exception
0x00002946 _isr12
0x0000297b _isr12.ring0_exception
0x00002989 _isr13
0x000029be _isr13.ring0_exception
0x000029cc _isr14
0x00002a01 _isr14.ring0_exception
0x00002a0f _isr15
0x00002a46 _isr15.ring0_exception
0x00002a54 _isr16
0x00002a8b _isr16.ring0_exception
0x00002a99 _isr17
0x00002ace _isr17.ring0_exception
0x00002adc _isr18
0x00002b13 _isr18.ring0_exception
0x00002b21 _isr19
0x00002b58 _isr19.ring0_exception
0x0000268c _isr1.ring0_exception
0x0000269a _isr2
0x00002b66 _isr20
0x00002b9d _isr20.ring0_exception
0x000026d1 _isr2.ring0_exception
0x000026df _isr3
0x00002bab _isr32
0x00002bb8 _isr33
0x00002716 _isr3.ring0_exception
0x00002724 _isr4
0x0000275b _isr4.ring0_exception
0x00002769 _isr5
0x000027a0 _isr5.ring0_exception
0x000027ae _isr6
0x000027e5 _isr6.ring0_exception
0x000027f3 _isr7
0x0000282a _isr7.ring0_exception
0x00002838 _isr8
0x00002bc9 _isr88
0x0000286d _isr8.ring0_exception
0x0000287b _isr9
0x00002bd4 _isr98
0x000028b2 _isr9.ring0_exception
0x00002be6 isrClock
0x00002be2 isrNumber
0x0000699c is_shift_pressed
0x00002570 kernel_exception
0x000069b4 kpd
0x00002573 kernel_exception
0x000069b0 kpt
0x00001306 mapear
0x00002edf mmu_init
0x00002f04 mmu_init_kernel_dir
0x000030a4 mmu_init_task_dir
0x00002f88 mmu_map_page
0x00002ee0 mmu_next_free_kernel_page
0x00002ef2 mmu_next_free_user_page
0x00003007 mmu_unmap_page
0x00002eef mmu_init
0x00002f14 mmu_init_kernel_dir
0x000030b5 mmu_init_task_dir
0x00002f99 mmu_map_page
0x00002ef0 mmu_next_free_kernel_page
0x00002f02 mmu_next_free_user_page
0x00003018 mmu_unmap_page
0x0000129a modo_protegido
0x00002de2 move_down
0x00002e10 move_left
0x00002e27 move_right
0x00002df9 move_up
0x00002e3e new_line
0x00002bda next_clock
0x00002bfb next_clock.ok
0x00002df2 move_down
0x00002e20 move_left
0x00002e37 move_right
0x00002e09 move_up
0x00002e4e new_line
0x00002bea next_clock
0x00002c0b next_clock.ok
0x000069ac next_free_kernel_page
0x000069a8 next_free_user_page
0x00000003 ok_len
0x000013f8 ok_msg
0x000013fb ok_msg
0x000012e9 paginacion
0x00002caf pic_disable
0x00002c9d pic_enable
0x00002c34 pic_finish1
0x00002c40 pic_finish2
0x00002c52 pic_reset
0x00001650 print
0x000016b3 print_dec
0x00001a7e print_exception_template
0x0000174b print_hex
0x000018df print_regs
0x00002e87 process_scancode
0x00002d5e put
0x00002d7f put_marker
0x00002cbf pic_disable
0x00002cad pic_enable
0x00002c44 pic_finish1
0x00002c50 pic_finish2
0x00002c62 pic_reset
0x00001653 print
0x000016b6 print_dec
0x00001a81 print_exception_template
0x0000174e print_hex
0x000018e2 print_regs
0x00002e97 process_scancode
0x00002d6e put
0x00002d8f put_marker
0x00001367 restaurar_cr3
0x00002dac restore_marker
0x00002dbc restore_marker
0x000042c0 scancode_defs
0x00001842 screen_draw_box
0x00001897 screen_draw_layout
0x00001845 screen_draw_box
0x0000189a screen_draw_layout
0x000044c0 special_scancodes
0x00001241 start
0x00000022 start_pm_len
0x0000121f start_pm_msg
0x0000001d start_rm_len
0x00001202 start_rm_msg
0x00002dcf toggle_shift
0x00002ddf toggle_shift
0x00006998 under_marker
0x00002e5f unrecognized_scancode
0x00002e6f unrecognized_scancode
No preview for this file type
......@@ -192,38 +192,35 @@ void copy_page(paddr_t dst_addr, paddr_t src_addr) {
paddr_t mmu_init_task_dir(paddr_t phy_start) {
/* // Pedimos memoria para un directorio */
/* // Armamos el nuevo contenido del CR3 */
// Si esto no funciona, quizas haya
// que tomarlo con el define
paddr_t new_cr3 = mmu_next_free_kernel_page();
paddr_t new_table = mmu_next_free_kernel_page();
zero_page(new_cr3);
kpd = (pd_entry_t*) new_cr3;
kpt = (pt_entry_t*) new_table;
mmu_init_kernel_dir();
/* // Limpiamos la página */
/* /\* mmu_map_page(new_cr3, (vaddr_t) TASK_CODE_VIRT_ADDR_START, phy_start, page_attributes_global_present); *\/ */
/* // Primer página */
/* // Atributos de páginas de código Global = 0, R/W = 0, U/S = 1, Present = 1 */
uint32_t page_attributes_global_present = 0x005;
mmu_map_page(new_cr3, TASK_CODE_VIRT_ADDR_START, phy_start, page_attributes_global_present);
/* // Segunda página */
paddr_t next_page_phy = (phy_start + PAGE_SIZE);
vaddr_t next_page_virt = (TASK_CODE_VIRT_ADDR_START + PAGE_SIZE);
mmu_map_page(new_cr3, next_page_virt, next_page_phy, page_attributes_global_present);
/* // Página stack, atributos Global = 0, R/W = 1, U/S=1, Present = 1. */
uint32_t page_attributes_global_present_read_write = 0x007;
paddr_t stack_mem_phy = mmu_next_free_user_page();
mmu_map_page(new_cr3, TASK_STACK_VIRT_ADDR_START, stack_mem_phy, page_attributes_global_present_read_write);
/* // Llamamos a tlbflush porque modificamos directorios */
/* // y tablas de página. */
tlbflush();
return new_cr3;
/* // Pedimos memoria para un directorio */
/* // Armamos el nuevo contenido del CR3 */
paddr_t new_cr3 = mmu_next_free_kernel_page();
zero_page(new_cr3);
paddr_t id_map_phy = 0x0;
for(int i = 0; i < 1024; i++){
mmu_map_page(new_cr3, id_map_phy, id_map_phy, 0x003);
id_map_phy += 0x1000;
}
/* // Primer página */
/* // Atributos de páginas de código Global = 0, R/W = 0, U/S = 1, Present = 1 */
uint32_t page_attributes_us_present = 0x005;
mmu_map_page(new_cr3, TASK_CODE_VIRT_ADDR_START, phy_start, page_attributes_us_present);
/* // Segunda página */
paddr_t next_page_phy = (phy_start + PAGE_SIZE);
vaddr_t next_page_virt = (TASK_CODE_VIRT_ADDR_START + PAGE_SIZE);
mmu_map_page(new_cr3, next_page_virt, next_page_phy, page_attributes_us_present);
/* // Página stack, atributos Global = 0, R/W = 1, U/S=1, Present = 1. */
uint32_t page_attributes_rw_us_present = 0x007;
paddr_t stack_mem_phy = mmu_next_free_user_page();
mmu_map_page(new_cr3, TASK_STACK_VIRT_ADDR_START, stack_mem_phy, page_attributes_rw_us_present);
/* // Llamamos a tlbflush porque modificamos directorios */
/* // y tablas de página. */
tlbflush();
return new_cr3;
}
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment