Documentation ¶
Index ¶
- Constants
- Variables
- func Dmap_init()
- func Dmaplen(p Pa_t, l int) []uint8
- func Dmaplen32(p uintptr, l int) []uint32
- type Bytepg_t
- type Kent_t
- type Mmapinfo_t
- type Pa_t
- type Page_i
- type Pg_t
- type Physmem_t
- func (phys *Physmem_t) Dec_pmap(p_pmap Pa_t)
- func (phys *Physmem_t) Dmap(p Pa_t) *Pg_t
- func (phys *Physmem_t) Dmap8(p Pa_t) []uint8
- func (phys *Physmem_t) Dmap_v2p(v *Pg_t) Pa_t
- func (phys *Physmem_t) Pgcount() (int, int, []int, []int)
- func (phys *Physmem_t) Pmap_new() (*Pmap_t, Pa_t, bool)
- func (phys *Physmem_t) Refaddr(p_pg Pa_t) (*int32, uint32)
- func (phys *Physmem_t) Refcnt(p_pg Pa_t) int
- func (phys *Physmem_t) Refdown(p_pg Pa_t) bool
- func (phys *Physmem_t) Refpg_new() (*Pg_t, Pa_t, bool)
- func (phys *Physmem_t) Refpg_new_nozero() (*Pg_t, Pa_t, bool)
- func (phys *Physmem_t) Refup(p_pg Pa_t)
- func (phys *Physmem_t) Tlbaddr(p_pg Pa_t) *uint64
- type Physpg_t
- type Pmap_t
- type Unpin_i
Constants ¶
View Source
const DMAPLEN int = 1 << 39
View Source
const PGSHIFT uint = 12
View Source
const PGSIZE int = 1 << PGSHIFT
View Source
const USERMIN int = VUSER << 39
View Source
const VDIRECT int = 0x44
View Source
const VEND int = 0x50
View Source
const VREC int = 0x42
View Source
const VUSER int = 0x59
Variables ¶
View Source
var Kents = make([]Kent_t, 0, 5)
View Source
var Physmem = &Physmem_t{}
View Source
var Vdirect = uintptr(VDIRECT << 39)
Functions ¶
Types ¶
type Mmapinfo_t ¶
type Pa_t ¶
type Pa_t uintptr
const PGOFFSET Pa_t = 0xfff
const PTE_G Pa_t = 1 << 8
const PTE_P Pa_t = 1 << 0
const PTE_PCD Pa_t = 1 << 4
const PTE_PS Pa_t = 1 << 7
const PTE_U Pa_t = 1 << 2
const PTE_W Pa_t = 1 << 1
var P_zeropg Pa_t
type Physmem_t ¶
type Physmem_t struct { Pgs []Physpg_t sync.Mutex Dmapinit bool // contains filtered or unexported fields }
func (*Physmem_t) Dec_pmap ¶
decrease ref count of pml4, freeing it if no CPUs have it loaded into cr3.
func (*Physmem_t) Dmap ¶
returns a page-aligned virtual address for the given physical address using the direct mapping
func (*Physmem_t) Dmap8 ¶
returns a byte aligned virtual address for the physical address as slice of uint8s
Click to show internal directories.
Click to hide internal directories.