#include "../drivers.h"#include "../libdriver/driver.h"#include <sys/ioc_memory.h>#include "../../kernel/const.h"#include "../../kernel/config.h"#include "../../kernel/type.h"#include <sys/vm.h>#include "assert.h"#include "local.h"Include dependency graph for memory.c:

Go to the source code of this file.
Defines | |
| #define | NR_DEVS 7 |
| #define | ZERO_BUF_SIZE 1024 |
| #define | click_to_round_k(n) ((unsigned) ((((unsigned long) (n) << CLICK_SHIFT) + 512) / 1024)) |
Functions | |
| FORWARD | _PROTOTYPE (char *m_name,(void)) |
| FORWARD | _PROTOTYPE (struct device *m_prepare,(int device)) |
| FORWARD | _PROTOTYPE (int m_transfer,(int proc_nr, int opcode, off_t position, iovec_t *iov, unsigned nr_req)) |
| FORWARD | _PROTOTYPE (int m_do_open,(struct driver *dp, message *m_ptr)) |
| FORWARD | _PROTOTYPE (void m_init,(void)) |
| FORWARD | _PROTOTYPE (void m_geometry,(struct partition *entry)) |
| PUBLIC int | main (void) |
| PRIVATE char * | m_name () |
| PRIVATE struct device * | m_prepare (int device) |
| PRIVATE int | m_transfer (int proc_nr, int opcode, off_t position, iovec_t *iov, unsigned nr_req) |
| PRIVATE int | m_do_open (struct driver *dp, message *m_ptr) |
| PRIVATE void | m_init () |
| PRIVATE int | m_ioctl (struct driver *dp, message *m_ptr) |
| PRIVATE void | m_geometry (struct partition *entry) |
Variables | |
| PRIVATE struct device | m_geom [NR_DEVS] |
| PRIVATE int | m_seg [NR_DEVS] |
| PRIVATE int | m_device |
| PRIVATE struct kinfo | kinfo |
| PRIVATE struct machine | machine |
| int | errno |
| PRIVATE struct driver | m_dtab |
| PRIVATE char | dev_zero [ZERO_BUF_SIZE] |
|
|
Definition at line 71 of file memory.c. Referenced by memmap_dmp(), and proctab_dmp(). |
|
|
|
|
|
Definition at line 68 of file memory.c. Referenced by m_init(), and m_transfer(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 226 of file memory.c. References ENXIO, m_device, m_prepare(), MEM_DEV, NIL_DEV, OK, printf, r, and sys_enable_iop(). |
|
|
Definition at line 429 of file memory.c. References div64u(), m_device, m_geom, and SECTOR_SIZE. |
|
|
Definition at line 250 of file memory.c. References _taskcall(), BOOT_DEV, kinfo::bootdev_base, kinfo::bootdev_size, cvul64(), DS_PROC_NR, DS_RETRIEVE, device::dv_base, device::dv_size, i, IMGRD_DEV, imgrd_size, kinfo, kinfo::kmem_base, KMEM_DEV, kinfo::kmem_size, m, m_geom, m_seg, MEMORY_MAJOR, OK, panic, printf, RAM_DEV, s, sys_getkinfo, sys_segctl(), and ZERO_BUF_SIZE. Referenced by main(). |
|
||||||||||||
|
Definition at line 331 of file memory.c. References _taskcall(), allocmem, cvul64(), D, do_diocntl(), DS_PROC_NR, DS_PUBLISH, device::dv_base, device::dv_size, EINVAL, ENOMEM, ENOTTY, ENXIO, EPERM, errno, m, m_device, m_dtab, m_prepare(), m_seg, MEM_DEV, MEMORY_MAJOR, MIOCMAP, MIOCRAMSIZE, MIOCUNMAP, NIL_DEV, OK, panic, printf, r, RAM_DEV, report(), s, SELF, sys_segctl(), sys_vircopy(), and sys_vm_map(). |
|
|
|
|
|
Definition at line 105 of file memory.c. References m_device, m_geom, NIL_DEV, and NR_DEVS. Referenced by m_do_open(), and m_ioctl(). |
|
||||||||||||||||||||||||
|
Definition at line 118 of file memory.c. References BOOT_DEV, chunk, count, cv64ul(), D, DEV_GATHER, device::dv_base, device::dv_size, EINVAL, imgrd, IMGRD_DEV, iovec_t::iov_addr, iovec_t::iov_size, KMEM_DEV, left(), m_device, m_geom, m_seg, MEM_DEV, NONE, NULL_DEV, OK, PHYS_SEG, RAM_DEV, report(), s, seg, SELF, sys_physcopy(), sys_vircopy(), user_vir, ZERO_BUF_SIZE, and ZERO_DEV. |
|
|
Definition at line 77 of file memory.c. References driver_task(), errno, m_dtab, m_init(), OK, panic, SIG_MESS, sigaction, sigemptyset, and SIGTERM. |
|
|
|
|
|
|
|
|
Definition at line 35 of file memory.c. Referenced by do_getsysinfo(), kenv_dmp(), m_init(), main(), sched_dmp(), and uname(). |
|
|
Definition at line 34 of file memory.c. Referenced by m_do_open(), m_geometry(), m_ioctl(), m_prepare(), m_transfer(), r_geometry(), r_prepare(), and r_transfer(). |
|
|
Initial value: {
m_name,
m_do_open,
do_nop,
m_ioctl,
m_prepare,
m_transfer,
nop_cleanup,
m_geometry,
nop_signal,
nop_alarm,
nop_cancel,
nop_select,
NULL,
NULL
}
|
|
|
Definition at line 32 of file memory.c. Referenced by m_geometry(), m_init(), m_prepare(), m_transfer(), r_geometry(), r_prepare(), and r_transfer(). |
|
|
Definition at line 33 of file memory.c. Referenced by m_init(), m_ioctl(), and m_transfer(). |
|
|
Definition at line 36 of file memory.c. Referenced by addstring(), get_mem_chunks(), kenv_dmp(), and main(). |
1.4.6