Changeset 686 for trunk/hal/x86_64


Ignore:
Timestamp:
Jan 13, 2021, 12:47:53 AM (4 years ago)
Author:
alain
Message:

cosmetic

Location:
trunk/hal/x86_64/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_context.c

    r457 r686  
    109109        /* Switch the VM space */
    110110        if (newproc != oldproc) {
    111                 lcr3((uint64_t)newproc->vmm.gpt.ppn << CONFIG_PPM_PAGE_SHIFT);
     111                lcr3((uint64_t)newproc->vmm.gpt.ppn << CONFIG_PPM_PAGE_ORDER);
    112112        }
    113113
  • trunk/hal/x86_64/core/hal_exception.c

    r457 r686  
    9595
    9696                        error = vmm_handle_page_fault(process,
    97                             bad_vaddr >> CONFIG_PPM_PAGE_SHIFT);
     97                            bad_vaddr >> CONFIG_PPM_PAGE_ORDER);
    9898
    9999                        x86_printf("VA=%Z ERROR=%Z\n", bad_vaddr, (uint64_t)error);
  • trunk/hal/x86_64/core/hal_gpt.c

    r635 r686  
    301301        L4dst = (pt_entry_t *)ppm_page2base(page_xp);
    302302        memcpy(&L4dst[256], &L4src[256], 256 * sizeof(pt_entry_t));
    303         L4dst[L4_SLOT_PTE] = (ppm_page2ppn(page_xp) << CONFIG_PPM_PAGE_SHIFT) |
     303        L4dst[L4_SLOT_PTE] = (ppm_page2ppn(page_xp) << CONFIG_PPM_PAGE_ORDER) |
    304304            PG_V | PG_KW | PG_NX;
    305305
     
    324324error_t hal_gpt_set_pte(gpt_t *gpt, vpn_t vpn, uint32_t attr, ppn_t ppn)
    325325{
    326         vaddr_t va = vpn << CONFIG_PPM_PAGE_SHIFT;
     326        vaddr_t va = vpn << CONFIG_PPM_PAGE_ORDER;
    327327        paddr_t pa;
    328328        kmem_req_t req;
     
    384384        }
    385385
    386         pa = ppn << CONFIG_PPM_PAGE_SHIFT;
     386        pa = ppn << CONFIG_PPM_PAGE_ORDER;
    387387        L1_BASE[pl1_i(va)] = pa | hal_gpt_attr_to_pte(attr);
    388388
     
    392392void hal_gpt_get_pte(gpt_t *gpt, vpn_t vpn, uint32_t *attr, ppn_t *ppn)
    393393{
    394         vaddr_t va = vpn << CONFIG_PPM_PAGE_SHIFT;
     394        vaddr_t va = vpn << CONFIG_PPM_PAGE_ORDER;
    395395
    396396        *attr = 0;
     
    408408                /* large page */
    409409                *attr = hal_gpt_pte_to_attr(&L2_BASE[pl2_i(va)]);
    410                 *ppn = (L2_BASE[pl2_i(va)] & PG_2MFRAME) >> CONFIG_PPM_PAGE_SHIFT;
     410                *ppn = (L2_BASE[pl2_i(va)] & PG_2MFRAME) >> CONFIG_PPM_PAGE_ORDER;
    411411        } else {
    412412                /* small page */
    413413                *attr = hal_gpt_pte_to_attr(&L1_BASE[pl1_i(va)]);
    414                 *ppn = (L1_BASE[pl1_i(va)] & PG_FRAME) >> CONFIG_PPM_PAGE_SHIFT;
     414                *ppn = (L1_BASE[pl1_i(va)] & PG_FRAME) >> CONFIG_PPM_PAGE_ORDER;
    415415        }
    416416
  • trunk/hal/x86_64/core/hal_ppm.c

    r457 r686  
    6868
    6969        // compute number of pages required to store page descriptor array
    70         uint32_t pages_tbl_nr = bytes >> CONFIG_PPM_PAGE_SHIFT;
     70        uint32_t pages_tbl_nr = bytes >> CONFIG_PPM_PAGE_ORDER;
    7171
    7272        // compute total number of reserved pages (kernel code & pages_tbl[])
Note: See TracChangeset for help on using the changeset viewer.