Ignore:
Timestamp:
Jun 22, 2017, 3:13:14 PM (5 years ago)
Author:
max@…
Message:

Parse RSDP->RSDT->MADT, and get the LAPIC PA.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/hal_gpt.c

    r35 r39  
    6464void hal_gpt_enter(vaddr_t va, paddr_t pa)
    6565{
     66        XASSERT((va % PAGE_SIZE == 0));
     67        XASSERT((pa % PAGE_SIZE == 0));
    6668        PTE_BASE[pl1_i(va)] = (pa & PG_FRAME) | PG_V | PG_KW | PG_NX;
     69}
     70
     71void hal_gpt_enter_range(vaddr_t va, paddr_t pa, size_t n)
     72{
     73        size_t i;
     74        for (i = 0; i < n; i++) {
     75                hal_gpt_enter(va + i * PAGE_SIZE, pa + i * PAGE_SIZE);
     76                invlpg(va + i * PAGE_SIZE);
     77        }
    6778}
    6879
Note: See TracChangeset for help on using the changeset viewer.