Changeset 125


Ignore:
Timestamp:
Jul 3, 2017, 2:45:44 PM (9 years ago)
Author:
max@…
Message:

implement hal_time_stamp and hal_fence

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

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_cpu.S

    r99 r125  
    9191        ret
    9292
     93ASM_ENTRY(mfence)
     94        mfence
     95        ret
     96
    9397ASM_ENTRY(rcr2)
    9498        movq    %cr2,%rax
  • trunk/hal/x86_64/core/hal_internal.h

    r116 r125  
    4040uint64_t rdmsr(uint32_t);
    4141void wrmsr(uint32_t, uint64_t);
     42void mfence();
    4243vaddr_t rcr2(void);
    4344
  • trunk/hal/x86_64/core/hal_special.c

    r124 r125  
    7676}
    7777
     78cycle_t hal_time_stamp()
     79{
     80        return rdtsc();
     81}
     82
    7883uint64_t hal_get_cycles()
    7984{
     
    144149void hal_fence()
    145150{
    146         x86_panic((char *)__func__);
     151        mfence();
    147152}
    148153
Note: See TracChangeset for help on using the changeset viewer.