KolibriOS kernel
memory.inc File Reference

Functions

void alloc_page ()
 
void alloc_pages (dword count)
 
void free_page ()
 
void map_io_mem (dword base, dword size, dword flags)
 
void map_page_table (dword lin_addr, dword phis_addr)
 
void alloc_dma24 ()
 Allocates [.size] bytes so that the target memory block is inside one 64K page for 24-bit DMA controller, that is, somewhere between 00xx0000h and 00xxFFFFh. More...
 
void create_trampoline_pgmap ()
 Allocates a physical page for master page table that duplicates first Mb of OS_BASE at address 0; used for starting APs and for shutting down, where it is important to execute code in trivial-mapped pages. Returns eax = allocated physical page. More...
 
void new_mem_resize (dword new_size)
 
void page_fault_handler ()
 Now it is called from core/sys32exc_c (see stack frame there) More...
 
void map_mem_ipc (dword lin_addr, dword slot, dword ofs, dword buf_size, dword req_access)
 returns number of mapped bytes More...
 
void map_memEx (dword lin_addr, dword slot, dword ofs, dword buf_size, dword req_access)
 
void safe_map_page (dword slot, dword req_access, dword ofs)
 in: esi+edx*4 = pointer to page table entry in: [slot], [req_access], [ofs] on the stack in: edi = linear address to map out: CF cleared <=> failed destroys: only eax More...
 
void sys_ipc_send (dword PID, dword msg_addr, dword msg_size)
 
void load_pe_driver (dword file, dword cmdline)
 
void create_ring_buffer (dword size, dword flags)
 
void print_mem ()
 

Variables

label map_page
 proc map_page stdcall,lin_addr:dword,phis_addr:dword,flags:dword More...
 
label map_space
 not implemented More...
 
label commit_pages
 
label release_pages
 
label unmap_pages
 
db sb16_buffer_allocated
 
dd _size
 
label get_pg_addr
 
dd count
 
dd process
 
label sys_IPC
 
dd dst_slot
 
dd dst_offset
 
dd buf_size
 
dd used_buf
 
label sysfn_meminfo
 
label f68
 
label f68call
 keep this table closer to main code More...
 
dd buf_ptr
 

Function Documentation

◆ alloc_dma24()

void alloc_dma24 ( )

Allocates [.size] bytes so that the target memory block is inside one 64K page for 24-bit DMA controller, that is, somewhere between 00xx0000h and 00xxFFFFh.

Source
core/memory.inc:361

◆ alloc_page()

void alloc_page ( )

◆ alloc_pages()

void alloc_pages ( dword  count)

◆ create_ring_buffer()

void create_ring_buffer ( dword  size,
dword  flags 
)

◆ create_trampoline_pgmap()

void create_trampoline_pgmap ( )

Allocates a physical page for master page table that duplicates first Mb of OS_BASE at address 0; used for starting APs and for shutting down, where it is important to execute code in trivial-mapped pages. Returns eax = allocated physical page.

Source
core/memory.inc:384

◆ free_page()

void free_page ( )

◆ load_pe_driver()

void load_pe_driver ( dword  file,
dword  cmdline 
)

◆ map_io_mem()

void map_io_mem ( dword  base,
dword  size,
dword  flags 
)

◆ map_mem_ipc()

void map_mem_ipc ( dword  lin_addr,
dword  slot,
dword  ofs,
dword  buf_size,
dword  req_access 
)

returns number of mapped bytes

Source
core/memory.inc:701

◆ map_memEx()

void map_memEx ( dword  lin_addr,
dword  slot,
dword  ofs,
dword  buf_size,
dword  req_access 
)

◆ map_page_table()

void map_page_table ( dword  lin_addr,
dword  phis_addr 
)

◆ new_mem_resize()

void new_mem_resize ( dword  new_size)

◆ page_fault_handler()

void page_fault_handler ( )

Now it is called from core/sys32exc_c (see stack frame there)

Source
core/memory.inc:557

◆ print_mem()

void print_mem ( )

◆ safe_map_page()

void safe_map_page ( dword  slot,
dword  req_access,
dword  ofs 
)

in: esi+edx*4 = pointer to page table entry in: [slot], [req_access], [ofs] on the stack in: edi = linear address to map out: CF cleared <=> failed destroys: only eax

Source
core/memory.inc:831

◆ sys_ipc_send()

void sys_ipc_send ( dword  PID,
dword  msg_addr,
dword  msg_size 
)

Variable Documentation

◆ _size

dd _size
Initial value
?
Source
core/memory.inc:367

◆ buf_ptr

dd buf_ptr
Initial value
?
Source
core/memory.inc:1285

◆ buf_size

dd buf_size
Initial value
?
Source
core/memory.inc:960

◆ commit_pages

label commit_pages

◆ count

dd count
Initial value
?
Source
core/memory.inc:703
Initial value
?
Source
core/memory.inc:766

◆ dst_offset

dd dst_offset
Initial value
?
Source
core/memory.inc:959

◆ dst_slot

dd dst_slot
Initial value
?
Source
core/memory.inc:958

◆ f68

◆ f68call

label f68call

keep this table closer to main code

Source
core/memory.inc:1233

◆ get_pg_addr

label get_pg_addr

◆ map_page

label map_page

proc map_page stdcall,lin_addr:dword,phis_addr:dword,flags:dword

Source
core/memory.inc:127

◆ map_space

label map_space

not implemented

Source
core/memory.inc:141

◆ process

dd process
Initial value
?
Source
core/memory.inc:704
Initial value
?
Source
core/memory.inc:767

◆ release_pages

label release_pages

◆ sb16_buffer_allocated

db sb16_buffer_allocated
Initial value
0
Source
core/memory.inc:355

◆ sys_IPC

label sys_IPC

◆ sysfn_meminfo

label sysfn_meminfo

◆ unmap_pages

label unmap_pages

◆ used_buf

dd used_buf
Initial value
?
Source
core/memory.inc:961