Searched refs:kd (Results 1 - 25 of 80) sorted by relevance

1234

/openbsd-current/lib/libkvm/
H A Dkvm_m88k.c48 _kvm_freevtop(kvm_t *kd) argument
50 free(kd->vmst);
51 kd->vmst = NULL;
55 _kvm_initvtop(kvm_t *kd) argument
62 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
66 _kvm_err(kd, 0, "vatop not yet implemented!");
71 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
73 _kvm_err(kd, 0, "pa2off not yet implemented!");
H A Dkvm_hppa.c42 _kvm_freevtop(kvm_t *kd) argument
44 free(kd->vmst);
45 kd->vmst = NULL;
49 _kvm_initvtop(kvm_t *kd) argument
55 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
57 if (ISALIVE(kd)) {
58 _kvm_err(kd, 0, "vatop called in live kernel!");
64 return (kd->nbpg - (va & (kd->nbpg - 1)));
71 _kvm_pa2off(kvm_t *kd, paddr_ argument
[all...]
H A Dkvm.c77 kvm_geterr(kvm_t *kd) argument
79 return (kd->errbuf);
86 _kvm_pread(kvm_t *kd, int fd, void *buf, size_t nbytes, off_t offset) argument
93 _kvm_syserr(kd, kd->program, "pread");
102 _kvm_pwrite(kvm_t *kd, int fd, const void *buf, size_t nbytes, off_t offset) argument
109 _kvm_syserr(kd, kd->program, "pwrite");
115 * Report an error using printf style arguments. "program" is kd->program
121 _kvm_err(kvm_t *kd, cons argument
138 _kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...) argument
160 _kvm_malloc(kvm_t *kd, size_t n) argument
170 _kvm_realloc(kvm_t *kd, void *p, size_t n) argument
178 _kvm_open(kvm_t *kd, const char *uf, const char *mf, const char *sf, int flag, char *errout) argument
299 kvm_opennamelist(kvm_t *kd, const char *uf) argument
332 _kvm_get_header(kvm_t *kd) argument
439 kvm_dump_mkheader(kvm_t *kd, off_t dump_off) argument
525 clear_gap(kvm_t *kd, FILE *fp, int size) argument
543 kvm_dump_wrtheader(kvm_t *kd, FILE *fp, int dumpsize) argument
611 kvm_t *kd; local
625 kvm_t *kd; local
636 kvm_close(kvm_t *kd) argument
678 kvm_dbopen(kvm_t *kd, const char *uf) argument
753 kvm_nlist(kvm_t *kd, struct nlist *nl) argument
812 kvm_dump_inval(kvm_t *kd) argument
848 kvm_read(kvm_t *kd, u_long kva, void *buf, size_t len) argument
905 kvm_write(kvm_t *kd, u_long kva, const void *buf, size_t len) argument
[all...]
H A Dkvm_i386.c103 _kvm_freevtop(kvm_t *kd) argument
105 if (kd->vmst != NULL) {
106 free(kd->vmst->PTD);
108 free(kd->vmst);
109 kd->vmst = NULL;
114 _kvm_initvtop(kvm_t *kd) argument
120 vm = _kvm_malloc(kd, sizeof(*vm));
123 kd->vmst = vm;
132 if (kvm_nlist(kd, nl) != 0) {
133 _kvm_err(kd, k
180 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
232 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_sh.c38 _kvm_freevtop(kvm_t *kd) argument
43 _kvm_initvtop(kvm_t *kd) argument
57 #define __PMAP_PTP_PG_N (kd->nbpg / sizeof(pt_entry_t))
59 #define __PMAP_PTP_OFSET(va) ((va / kd->nbpg) & (__PMAP_PTP_PG_N - 1))
62 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
64 cpu_kcore_hdr_t *h = kd->cpu_data;
70 if (ISALIVE(kd)) {
71 _kvm_err(kd, 0, "vatop called in live kernel!");
96 if (_kvm_pread(kd, kd
146 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_arm.c68 _kvm_freevtop(kvm_t *kd) argument
70 free(kd->vmst);
71 kd->vmst = NULL;
75 _kvm_initvtop(kvm_t *kd) argument
86 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
88 cpu_kcore_hdr_t *cpup = kd->cpu_data;
90 if (ISALIVE(kd)) {
91 _kvm_err(kd, 0, "vatop called in live kernel!");
105 return (int)(kd->nbpg - (va & (kd
113 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_arm64.c68 _kvm_freevtop(kvm_t *kd) argument
70 free(kd->vmst);
71 kd->vmst = NULL;
75 _kvm_initvtop(kvm_t *kd) argument
86 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
88 cpu_kcore_hdr_t *cpup = kd->cpu_data;
90 if (ISALIVE(kd)) {
91 _kvm_err(kd, 0, "vatop called in live kernel!");
105 return (int)(kd->nbpg - (va & (kd
113 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_riscv64.c68 _kvm_freevtop(kvm_t *kd) argument
70 free(kd->vmst);
71 kd->vmst = NULL;
75 _kvm_initvtop(kvm_t *kd) argument
86 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
88 cpu_kcore_hdr_t *cpup = kd->cpu_data;
90 if (ISALIVE(kd)) {
91 _kvm_err(kd, 0, "vatop called in live kernel!");
105 return (int)(kd->nbpg - (va & (kd
113 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_alpha.c58 _kvm_freevtop(kvm_t *kd) argument
62 free(kd->vmst);
63 kd->vmst = NULL;
67 _kvm_initvtop(kvm_t *kd) argument
72 vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
76 cpu_kh = kd->cpu_data;
87 kd->vmst = vm;
92 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
100 if (!kd->vmst) {
101 _kvm_err(kd,
190 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_powerpc64.c38 _kvm_freevtop(kvm_t *kd) argument
43 _kvm_initvtop(kvm_t *kd) argument
53 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
55 if (ISALIVE(kd)) {
56 _kvm_err(kd, 0, "vatop called in live kernel!");
60 _kvm_err(kd, 0, "%s not yet implemented", __func__);
69 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
71 _kvm_err(kd, 0, "%s not yet implemented", __func__);
H A Dkvm_powerpc.c56 _kvm_freevtop(kvm_t *kd) argument
58 free(kd->vmst);
59 kd->vmst = NULL;
63 _kvm_initvtop(kvm_t *kd) argument
70 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
72 _kvm_err(kd, 0, "vatop not yet implemented!");
77 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
79 _kvm_err(kd, 0, "pa2off not yet implemented!");
H A Dkvm_amd64.c64 _kvm_freevtop(kvm_t *kd) argument
67 free(kd->vmst);
68 kd->vmst = NULL;
72 _kvm_initvtop(kvm_t *kd) argument
82 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
90 if (ISALIVE(kd)) {
91 _kvm_err(kd, 0, "vatop called in live kernel!");
95 page_off = va & (kd->nbpg - 1);
99 return (int)(kd->nbpg - page_off);
102 cpu_kh = kd
187 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_mips64.c73 _kvm_freevtop(kvm_t *kd) argument
75 free(kd->vmst);
76 kd->vmst = NULL;
80 _kvm_initvtop(kvm_t *kd) argument
86 vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
89 kd->vmst = vm;
96 if (kvm_nlist(kd, nl) != 0) {
97 _kvm_err(kd, kd->program, "bad namelist");
100 if (KREAD(kd, (u_lon
140 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
196 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_sparc64.c73 _kvm_freevtop(kvm_t *kd) argument
75 if (kd->vmst != NULL) {
76 _kvm_err(kd, kd->program, "_kvm_freevtop: internal error");
77 kd->vmst = NULL;
89 _kvm_initvtop(kvm_t *kd) argument
96 * mapping information in kd->vm. Returns the result in pa, and returns
101 _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) argument
103 cpu_kcore_hdr_t *cpup = kd->cpu_data;
133 if (pread(kd
191 _kvm_pa2off(kvm_t *kd, paddr_t pa) argument
[all...]
H A Dkvm_file2.c133 kvm_getfiles(kvm_t *kd, int op, int arg, size_t esize, int *cnt) argument
139 if (ISALIVE(kd)) {
152 if (errno != ESRCH && kd->vmfd != -1)
154 _kvm_syserr(kd, kd->program, "kvm_getfiles");
160 filebase = _kvm_realloc(kd, kd->filebase, size);
164 kd->filebase = filebase;
168 rv = sysctl(mib, 6, kd->filebase, &size, NULL, 0);
170 _kvm_syserr(kd, k
200 kvm_deadfile_byfile(kvm_t *kd, int op, int arg, size_t esize, int *cnt) argument
265 kvm_deadfile_byid(kvm_t *kd, int op, int arg, size_t esize, int *cnt) argument
468 fill_file(kvm_t *kd, struct kinfo_file *kf, struct file *fp, u_long fpaddr, struct vnode *vp, struct process *pr, int fd, pid_t pid) argument
767 ufs_filestat(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
796 ext2fs_filestat(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
825 msdos_filestat(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
851 nfs_filestat(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
871 spec_filestat(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
897 filestat(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
[all...]
H A Dkvm_ntfs.c52 _kvm_stat_ntfs(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
63 if (KREAD(kd, (u_long)VTOF(vp), &fn)) {
64 _kvm_err(kd, kd->program, "can't read fnode at %p", VTOF(vp));
67 if (KREAD(kd, (u_long)FTONT(&fn), &ntnode)) {
68 _kvm_err(kd, kd->program, "can't read ntnode at %p", FTONT(&fn));
71 if (KREAD(kd, (u_long)ntnode.i_mp, &ntm)) {
72 _kvm_err(kd, kd
[all...]
H A Dkvm_getloadavg.c65 kvm_getloadavg(kvm_t *kd, double loadavg[], int nelem) argument
71 if (ISALIVE(kd))
74 if (kvm_nlist(kd, nl) != 0) {
77 _kvm_err(kd, kd->program,
82 if (KREAD(kd, nl[X_AVERUNNABLE].n_value, &loadinfo)) {
83 _kvm_err(kd, kd->program, "can't read averunnable");
91 if (!KREAD(kd, nl[X_FSCALE].n_value, &fscale))
H A Dkvm_private.h90 #define ISALIVE(kd) ((kd)->alive)
93 #define KREAD(kd, addr, obj) \
94 (kvm_read(kd, addr, (void *)(obj), sizeof(*obj)) != sizeof(*obj))
100 void _kvm_err(kvm_t *kd, const char *program, const char *fmt, ...)
105 void *_kvm_malloc(kvm_t *kd, size_t);
106 void *_kvm_realloc(kvm_t *kd, void *, size_t);
108 void *_kvm_reallocarray(kvm_t *kd, void *, size_t, size_t);
109 void _kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...)
H A Dkvm_proc2.c113 kvm_proclist(kvm_t *kd, int op, int arg, struct process *pr, argument
140 if (kvm_nlist(kd, nl) != 0) {
143 _kvm_err(kd, kd->program, "%s: no such symbol", nl[i].n_name);
148 if (KREAD(kd, nl[0].n_value, &realstop.tv_sec)) {
149 _kvm_err(kd, kd->program, "cannot read time_second");
152 if (KREAD(kd, nl[1].n_value, &monostop.tv_sec)) {
153 _kvm_err(kd, kd
424 kvm_getprocs(kvm_t *kd, int op, int arg, size_t esize, int *cnt) argument
[all...]
H A Dkvm_proc.c117 _kvm_findanon(kvm_t *kd, struct vm_amap *amapp, int slot) argument
126 if (KREAD(kd, addr, &amap))
138 if (KREAD(kd, addr, &chunkp))
143 if (KREAD(kd, addr, &chunk))
160 if (KREAD(kd, addr, &anonp))
167 _kvm_ureadm(kvm_t *kd, const struct kinfo_proc *p, u_long va, u_long *cnt) argument
176 if (kd->swapspc == 0) {
177 kd->swapspc = _kvm_malloc(kd, kd
248 _kvm_reallocarray(kvm_t *kd, void *p, size_t i, size_t n) argument
264 kvm_argv(kvm_t *kd, const struct kinfo_proc *p, u_long addr, int narg, int maxcnt, int isenv) argument
410 proc_verify(kvm_t *kd, const struct kinfo_proc *p) argument
432 kvm_doargv(kvm_t *kd, const struct kinfo_proc *p, int nchr, int isenv, void (*info)(struct ps_strings *, u_long *, int *)) argument
471 kvm_arg_sysctl(kvm_t *kd, pid_t pid, int nchr, int isenv) argument
524 kvm_getargv(kvm_t *kd, const struct kinfo_proc *kp, int nchr) argument
532 kvm_getenvv(kvm_t *kd, const struct kinfo_proc *kp, int nchr) argument
543 kvm_ureadm(kvm_t *kd, const struct kinfo_proc *p, u_long uva, char *buf, size_t len) argument
[all...]
H A Dkvm_udf.c75 _kvm_stat_udf(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
81 if (KREAD(kd, (u_long)VTOU(vp), &up)) {
82 _kvm_err(kd, kd->program, "can't read unode at %p", VTOU(vp));
85 if (KREAD(kd, (u_long)up.u_fentry, &fentry)) {
86 _kvm_err(kd, kd->program, "can't read file_entry at %p",
90 if (KREAD(kd, (u_long)up.u_ump, &um)) {
91 _kvm_err(kd, kd
[all...]
H A Dkvm_cd9660.c41 _kvm_stat_cd9660(kvm_t *kd, struct kinfo_file *kf, struct vnode *vp) argument
45 if (KREAD(kd, (u_long)VTOI(vp), &inode)) {
46 _kvm_err(kd, kd->program, "can't read inode at %p", VTOI(vp));
/openbsd-current/sys/dev/
H A Dkcov.c155 struct kcov_dev *kd; local
158 kd = kd_curproc(KCOV_MODE_TRACE_PC);
159 if (kd == NULL)
162 if ((idx = kd_claim(kd, KCOV_STRIDE_TRACE_PC, 1)))
163 kd->kd_buf[idx] = (uintptr_t)__builtin_return_address(0);
175 trace_cmp(struct kcov_dev *kd, uint64_t type, uint64_t arg1, uint64_t arg2, argument
180 if ((idx = kd_claim(kd, KCOV_STRIDE_TRACE_CMP, 1))) {
181 kd->kd_buf[idx] = type;
182 kd->kd_buf[idx + 1] = arg1;
183 kd
247 struct kcov_dev *kd; local
306 struct kcov_dev *kd; local
322 struct kcov_dev *kd; local
351 struct kcov_dev *kd; local
419 struct kcov_dev *kd; local
444 struct kcov_dev *kd; local
481 struct kcov_dev *kd; local
514 kd_init(struct kcov_dev *kd, unsigned long nmemb) argument
556 kd_free(struct kcov_dev *kd) argument
578 struct kcov_dev *kd; local
627 kd_claim(struct kcov_dev *kd, int stride, int nmemb) argument
648 struct kcov_dev *kd; local
786 kcov_remote_attach(struct kcov_dev *kd, struct kio_remote_attach *arg) argument
811 kcov_remote_detach(struct kcov_dev *kd, struct kcov_remote *kr) argument
[all...]
/openbsd-current/regress/sys/arch/amd64/fpu/
H A Dfxproc0.c50 kvm_t *kd; local
72 kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf);
73 if (kd == NULL)
75 if (kvm_nlist(kd, nl) == -1)
76 errx(1, "kvm_nlist: %s", kvm_geterr(kd));
79 fenv_proc(kd, nl[0].n_value);
81 if (kvm_close(kd) == -1)
82 errx(1, "kvm_close: %s", kvm_geterr(kd));
87 fenv_proc(kvm_t *kd, unsigned long p) argument
94 if (kvm_read(kd,
[all...]
/openbsd-current/bin/ps/
H A Dnlist.c66 extern kvm_t *kd;
69 kvm_read(kd, psnl[x].n_value, &v, sizeof v) != sizeof(v)
81 if (kd != NULL && !kvm_sysctl_only) {
82 if (kvm_nlist(kd, psnl)) {
88 warnx("fscale: %s", kvm_geterr(kd));
92 warnx("physmem: %s", kvm_geterr(kd));
96 warnx("ccpu: %s", kvm_geterr(kd));
100 warnx("maxslp: %s", kvm_geterr(kd));

Completed in 307 milliseconds

1234