Home
last modified time | relevance | path

Searched refs:memh (Results 1 – 25 of 65) sorted by relevance

123

/openbsd/src/sys/arch/alpha/tc/
Dtc_bus_mem.c263 tc_mem_unmap(v, memh, memsize) in tc_mem_unmap() argument
265 bus_space_handle_t memh;
273 tc_mem_subregion(v, memh, offset, size, nmemh) in tc_mem_subregion() argument
275 bus_space_handle_t memh, *nmemh;
283 if ((memh & TC_SPACE_SPARSE) != 0)
284 *nmemh = memh + (offset << 1);
286 *nmemh = memh + offset;
345 tc_mem_read_1(v, memh, off) in tc_mem_read_1() argument
347 bus_space_handle_t memh;
354 if ((memh & TC_SPACE_SPARSE) != 0)
[all …]
/openbsd/src/sys/arch/alpha/pci/
Dpci_swiz_bus_mem_chipdep.c393 __C(CHIP,_xlate_dense_handle_to_addr)(v, memh, memaddrp)
395 bus_space_handle_t memh; variable
399 memh = ALPHA_K0SEG_TO_PHYS(memh);
402 if (memh >= CHIP_D_MEM_W1_SYS_START(v) &&
403 memh <= CHIP_D_MEM_W1_SYS_END(v)) {
405 (memh - CHIP_D_MEM_W1_SYS_START(v));
450 __C(CHIP,_xlate_sparse_handle_to_addr)(v, memh, memaddrp)
452 bus_space_handle_t memh; variable
456 memh = ALPHA_K0SEG_TO_PHYS(memh << 5) >> 5;
459 if ((memh << 5) >= CHIP_S_MEM_W1_SYS_START(v) &&
[all …]
Dpci_bwx_bus_mem_chipdep.c327 __C(CHIP,_mem_unmap)(v, memh, memsize)
329 bus_space_handle_t memh; variable
336 printf("mem: freeing handle 0x%lx for 0x%lx\n", memh, memsize);
338 memaddr = memh - ALPHA_PHYS_TO_K0SEG(CHIP_MEM_SYS_START(v));
356 __C(CHIP,_mem_subregion)(v, memh, offset, size, nmemh)
358 bus_space_handle_t memh, *nmemh; variable
362 *nmemh = memh + offset;
440 __C(CHIP,_mem_read_1)(v, memh, off)
442 bus_space_handle_t memh; variable
447 addr = memh + off;
[all …]
/openbsd/src/sys/dev/ic/
Dpcdisplay_subr.c57 bus_space_handle_t memh; in pcdisplay_cursor_init() local
71 memh = scr->hdl->ph_memh; in pcdisplay_cursor_init()
75 scr->cursortmp = bus_space_read_2(memt, memh, off); in pcdisplay_cursor_init()
76 bus_space_write_2(memt, memh, off, scr->cursortmp ^ 0x7700); in pcdisplay_cursor_init()
89 bus_space_handle_t memh = scr->hdl->ph_memh; in pcdisplay_cursor() local
97 bus_space_write_2(memt, memh, scr->dispoffset + off * 2, in pcdisplay_cursor()
112 scr->cursortmp = bus_space_read_2(memt, memh, off); in pcdisplay_cursor()
113 bus_space_write_2(memt, memh, off, scr->cursortmp ^ 0x7700); in pcdisplay_cursor()
152 bus_space_handle_t memh = scr->hdl->ph_memh; in pcdisplay_putchar() local
160 bus_space_write_2(memt, memh, scr->dispoffset + off * 2, in pcdisplay_putchar()
[all …]
Dsti.c1544 #define ngle_bt458_write(memt, memh, r, v) \ argument
1545 bus_space_write_4(memt, memh, NGLE_REG_RAMDAC + ((r) << 2), (v) << 24)
1552 bus_space_handle_t memh = rom->regh[2]; in ngle_artist_setupfb() local
1556 ngle_setup_hw(memt, memh); in ngle_artist_setupfb()
1557 ngle_setup_fb(memt, memh, scr->reg10_value); in ngle_artist_setupfb()
1561 ngle_setup_hw(memt, memh); in ngle_artist_setupfb()
1562 bus_space_write_4(memt, memh, NGLE_REG_21, in ngle_artist_setupfb()
1563 bus_space_read_4(memt, memh, NGLE_REG_21) | 0x0a000000); in ngle_artist_setupfb()
1564 bus_space_write_4(memt, memh, NGLE_REG_27, in ngle_artist_setupfb()
1565 bus_space_read_4(memt, memh, NGLE_REG_27) | 0x00800000); in ngle_artist_setupfb()
[all …]
/openbsd/src/sys/arch/powerpc64/dev/
Dpci_machdep.c50 bus_space_tag_t memt, bus_space_handle_t *memh) in pci_msix_table_map() argument
68 bus_space_map(memt, base + offset, tblsz * 16, 0, memh)) in pci_msix_table_map()
76 bus_space_tag_t memt, bus_space_handle_t memh) in pci_msix_table_unmap() argument
85 bus_space_unmap(memt, memh, tblsz * 16); in pci_msix_table_unmap()
92 bus_space_handle_t memh; in pci_msix_enable() local
102 if (pci_msix_table_map(pc, tag, memt, &memh)) in pci_msix_enable()
105 bus_space_write_4(memt, memh, PCI_MSIX_MA(vec), addr); in pci_msix_enable()
106 bus_space_write_4(memt, memh, PCI_MSIX_MAU32(vec), addr >> 32); in pci_msix_enable()
107 bus_space_write_4(memt, memh, PCI_MSIX_MD(vec), data); in pci_msix_enable()
108 bus_space_barrier(memt, memh, PCI_MSIX_MA(vec), 16, in pci_msix_enable()
[all …]
/openbsd/src/sys/arch/riscv64/dev/
Dpci_machdep.c50 bus_space_tag_t memt, bus_space_handle_t *memh) in pci_msix_table_map() argument
68 bus_space_map(memt, base + offset, tblsz * 16, 0, memh)) in pci_msix_table_map()
76 bus_space_tag_t memt, bus_space_handle_t memh) in pci_msix_table_unmap() argument
85 bus_space_unmap(memt, memh, tblsz * 16); in pci_msix_table_unmap()
92 bus_space_handle_t memh; in pci_msix_enable() local
102 if (pci_msix_table_map(pc, tag, memt, &memh)) in pci_msix_enable()
105 bus_space_write_4(memt, memh, PCI_MSIX_MA(vec), addr); in pci_msix_enable()
106 bus_space_write_4(memt, memh, PCI_MSIX_MAU32(vec), addr >> 32); in pci_msix_enable()
107 bus_space_write_4(memt, memh, PCI_MSIX_MD(vec), data); in pci_msix_enable()
108 bus_space_barrier(memt, memh, PCI_MSIX_MA(vec), 16, in pci_msix_enable()
[all …]
/openbsd/src/sys/arch/arm64/dev/
Dpci_machdep.c79 bus_space_tag_t memt, bus_space_handle_t *memh) in pci_msix_table_map() argument
97 bus_space_map(memt, base + offset, tblsz * 16, 0, memh)) in pci_msix_table_map()
105 bus_space_tag_t memt, bus_space_handle_t memh) in pci_msix_table_unmap() argument
114 bus_space_unmap(memt, memh, tblsz * 16); in pci_msix_table_unmap()
121 bus_space_handle_t memh; in pci_msix_enable() local
131 if (pci_msix_table_map(pc, tag, memt, &memh)) in pci_msix_enable()
134 bus_space_write_4(memt, memh, PCI_MSIX_MA(vec), addr); in pci_msix_enable()
135 bus_space_write_4(memt, memh, PCI_MSIX_MAU32(vec), addr >> 32); in pci_msix_enable()
136 bus_space_write_4(memt, memh, PCI_MSIX_MD(vec), data); in pci_msix_enable()
137 bus_space_barrier(memt, memh, PCI_MSIX_MA(vec), 16, in pci_msix_enable()
[all …]
/openbsd/src/sys/dev/isa/
Dpcdisplay.c127 bus_space_handle_t memh, ioh_6845; in pcdisplay_probe_col() local
130 if (bus_space_map(memt, 0xb8000, 0x8000, 0, &memh)) in pcdisplay_probe_col()
132 oldval = bus_space_read_2(memt, memh, 0); in pcdisplay_probe_col()
133 bus_space_write_2(memt, memh, 0, 0xa55a); in pcdisplay_probe_col()
134 val = bus_space_read_2(memt, memh, 0); in pcdisplay_probe_col()
135 bus_space_write_2(memt, memh, 0, oldval); in pcdisplay_probe_col()
136 bus_space_unmap(memt, memh, 0x8000); in pcdisplay_probe_col()
150 bus_space_handle_t memh, ioh_6845; in pcdisplay_probe_mono() local
153 if (bus_space_map(memt, 0xb0000, 0x8000, 0, &memh)) in pcdisplay_probe_mono()
155 oldval = bus_space_read_2(memt, memh, 0); in pcdisplay_probe_mono()
[all …]
Dif_ec.c135 bus_space_handle_t nich, asich, memh; in ec_probe() local
190 if (bus_space_map(memt, ia->ia_maddr, memsize, 0, &memh)) in ec_probe()
231 bus_space_unmap(memt, memh, memsize); in ec_probe()
242 bus_space_handle_t nich, asich, memh; in ec_attach() local
275 if (bus_space_map(memt, ia->ia_maddr, memsize, 0, &memh)) { in ec_attach()
288 sc->sc_bufh = memh; in ec_attach()
508 bus_space_handle_t memh = sc->sc_bufh; in ec_test_mem() local
513 bus_space_set_region_2(memt, memh, 0, 0, memsize >> 1); in ec_test_mem()
515 bus_space_set_region_1(memt, memh, 0, 0, memsize); in ec_test_mem()
519 if (bus_space_read_2(memt, memh, i) != 0) in ec_test_mem()
[all …]
Di82365_isa.c91 bus_space_handle_t ioh, memh; in pcic_isa_probe() local
106 if (bus_space_map(memt, ia->ia_maddr, ia->ia_msize, 0, &memh)) { in pcic_isa_probe()
108 !bus_space_map(memt, ia->ia_maddr, PCIC_MEMSIZE, 0, &memh)) in pcic_isa_probe()
141 bus_space_unmap(memt, memh, msize); in pcic_isa_probe()
160 bus_space_handle_t memh; in pcic_isa_attach() local
170 if (bus_space_map(memt, ia->ia_maddr, ia->ia_msize, 0, &memh)) { in pcic_isa_attach()
184 sc->memh = memh; in pcic_isa_attach()
Dif_we.c194 bus_space_handle_t asich, memh; in we_match() local
275 memh = ia->ia_memh; in we_match()
277 if (bus_space_map(memt, ia->ia_maddr, memsize, 0, &memh)) in we_match()
327 bus_space_unmap(memt, memh, memsize); in we_match()
338 bus_space_handle_t nich, asich, memh; in we_attach() local
377 memh = ia->ia_memh; in we_attach()
378 else if (bus_space_map(memt, ia->ia_maddr, ia->ia_msize, 0, &memh)) { in we_attach()
399 sc->sc_bufh = memh; in we_attach()
552 bus_space_handle_t memh = sc->sc_bufh; in we_test_mem() local
557 bus_space_set_region_2(memt, memh, 0, 0, memsize >> 1); in we_test_mem()
[all …]
Dcy_isa.c65 bus_space_handle_t memh; in cy_isa_probe() local
74 if (bus_space_map(memt, ia->ia_maddr, 0x2000, 0, &memh) != 0) in cy_isa_probe()
77 ret = cy_probe_common(memt, memh, CY_BUSTYPE_ISA); in cy_isa_probe()
78 bus_space_unmap(memt, memh, 0x2000); in cy_isa_probe()
Dtcic2_isa.c144 bus_space_handle_t ioh, memh; in tcic_isa_probe() local
157 if (bus_space_map(ia->ia_memt, ia->ia_maddr, ia->ia_msize, 0, &memh)) in tcic_isa_probe()
179 bus_space_unmap(ia->ia_memt, memh, ia->ia_msize); in tcic_isa_probe()
198 bus_space_handle_t memh; in tcic_isa_attach() local
207 if (bus_space_map(memt, ia->ia_maddr, ia->ia_msize, 0, &memh)) { in tcic_isa_attach()
222 sc->memh = memh; in tcic_isa_attach()
Di82365_isapnp.c108 bus_space_handle_t memh; in pcic_isapnp_attach() local
142 if (bus_space_map(memt, ipa->ia_maddr, ipa->ia_msize, 0, &memh)) { in pcic_isapnp_attach()
156 sc->memh = memh; in pcic_isapnp_attach()
/openbsd/src/sys/arch/amd64/pci/
Dpci_machdep.c280 bus_space_tag_t memt, bus_space_handle_t *memh) in pci_msix_table_map() argument
298 _bus_space_map(memt, base + offset, tblsz * 16, 0, memh)) in pci_msix_table_map()
306 bus_space_tag_t memt, bus_space_handle_t memh) in pci_msix_table_unmap() argument
315 _bus_space_unmap(memt, memh, tblsz * 16, NULL); in pci_msix_table_unmap()
580 bus_space_handle_t memh; in msix_hwmask() local
591 if (pci_msix_table_map(pc, tag, memt, &memh)) in msix_hwmask()
594 ctrl = bus_space_read_4(memt, memh, PCI_MSIX_VC(entry)); in msix_hwmask()
595 bus_space_write_4(memt, memh, PCI_MSIX_VC(entry), in msix_hwmask()
598 pci_msix_table_unmap(pc, tag, memt, memh); in msix_hwmask()
606 bus_space_handle_t memh; in msix_hwunmask() local
[all …]
/openbsd/src/sys/dev/pci/bktr/
Dbktr_reg.h450 __v = bus_space_read_1((sc)->memt, (sc)->memh, (o)); \
451 bus_space_barrier((sc)->memt, (sc)->memh, (o), 1, \
457 __v = bus_space_read_2((sc)->memt, (sc)->memh, (o)); \
458 bus_space_barrier((sc)->memt, (sc)->memh, (o), 4, \
464 __v = bus_space_read_4((sc)->memt, (sc)->memh, (o)); \
465 bus_space_barrier((sc)->memt, (sc)->memh, (o), 4, \
470 bus_space_write_1((sc)->memt, (sc)->memh, (o), (v)); \
471 bus_space_barrier((sc)->memt, (sc)->memh, (o), 1, \
475 bus_space_write_2((sc)->memt, (sc)->memh, (o), (v)); \
476 bus_space_barrier((sc)->memt, (sc)->memh, (o), 2, \
[all …]
/openbsd/src/sys/dev/pci/
Di82365_pci.c104 bus_space_handle_t memh; in pcic_pci_attach() local
125 if (bus_space_map(memt, 0xd0000, 0x10000, 0, &memh)) { in pcic_pci_attach()
144 sc->memh = memh; in pcic_pci_attach()
175 bus_space_unmap(memt, memh, 0x10000); in pcic_pci_attach()
Dif_sf_pci.c94 bus_space_handle_t ioh, memh; in sf_pci_attach() local
109 reg, 0, &memt, &memh, &memsize, NULL, 0) == 0); in sf_pci_attach()
123 sc->sc_sh = memh; in sf_pci_attach()
165 bus_space_unmap(memt, memh, memsize); in sf_pci_attach()
Dautri.c80 #define TWRITE1(sc, r, x) bus_space_write_1((sc)->memt, (sc)->memh, (r), (x))
81 #define TWRITE2(sc, r, x) bus_space_write_2((sc)->memt, (sc)->memh, (r), (x))
82 #define TWRITE4(sc, r, x) bus_space_write_4((sc)->memt, (sc)->memh, (r), (x))
83 #define TREAD1(sc, r) bus_space_read_1((sc)->memt, (sc)->memh, (r))
84 #define TREAD2(sc, r) bus_space_read_2((sc)->memt, (sc)->memh, (r))
85 #define TREAD4(sc, r) bus_space_read_4((sc)->memt, (sc)->memh, (r))
178 bus_space_write_1(sc->memt, sc->memh, no, in autri_reg_set_1()
179 (bus_space_read_1(sc->memt, sc->memh, no) | mask)); in autri_reg_set_1()
185 bus_space_write_1(sc->memt, sc->memh, no, in autri_reg_clear_1()
186 (bus_space_read_1(sc->memt, sc->memh, no) & ~mask)); in autri_reg_clear_1()
[all …]
Dif_wi_pci.c314 bus_space_handle_t localh, ioh, memh; in wi_pci_plx_attach() local
322 &memt, &memh, NULL, &memsize, 0) != 0) { in wi_pci_plx_attach()
327 sc->wi_lhandle = memh; in wi_pci_plx_attach()
332 bus_space_unmap(memt, memh, memsize); in wi_pci_plx_attach()
357 bus_space_unmap(memt, memh, memsize); in wi_pci_plx_attach()
379 bus_space_unmap(memt, memh, memsize); in wi_pci_plx_attach()
400 bus_space_write_1(memt, memh, WI_PLX_COR_OFFSET, WI_COR_IOMODE); in wi_pci_plx_attach()
418 bus_space_unmap(memt, memh, memsize); in wi_pci_plx_attach()
Dif_epic_pci.c134 bus_space_handle_t ioh, memh; in epic_pci_attach() local
147 &memt, &memh, NULL, NULL, 0) == 0); in epic_pci_attach()
151 sc->sc_sh = memh; in epic_pci_attach()
/openbsd/src/sys/arch/sparc64/sparc64/
Dofw_machdep.c58 static u_int mmuh = -1, memh = -1; variable
88 if (OF_getprop(chosen, "memory", &memh, sizeof(memh)) == -1) { in get_memory_handle()
92 return memh; in get_memory_handle()
372 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in prom_alloc_phys()
380 args.ihandle = HDL2CELL(memh); in prom_alloc_phys()
411 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in prom_claim_phys()
419 args.ihandle = HDL2CELL(memh); in prom_claim_phys()
448 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in prom_free_phys()
456 args.ihandle = HDL2CELL(memh); in prom_free_phys()
486 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in prom_get_msgbuf()
[all …]
/openbsd/src/sys/arch/sparc64/dev/
Dpci_machdep.c565 bus_space_handle_t memh; in pci_msix_enable() local
583 bus_space_map(memt, base + offset, tblsz * 16, 0, &memh)) in pci_msix_enable()
586 bus_space_write_4(memt, memh, PCI_MSIX_MA(vec), addr); in pci_msix_enable()
587 bus_space_write_4(memt, memh, PCI_MSIX_MAU32(vec), addr >> 32); in pci_msix_enable()
588 bus_space_write_4(memt, memh, PCI_MSIX_MD(vec), data); in pci_msix_enable()
589 bus_space_barrier(memt, memh, PCI_MSIX_MA(vec), 16, in pci_msix_enable()
591 ctrl = bus_space_read_4(memt, memh, PCI_MSIX_VC(vec)); in pci_msix_enable()
592 bus_space_write_4(memt, memh, PCI_MSIX_VC(vec), in pci_msix_enable()
595 bus_space_unmap(memt, memh, tblsz * 16); in pci_msix_enable()
602 bus_space_tag_t memt, bus_space_handle_t *memh) in pci_msix_table_map() argument
[all …]
/openbsd/src/sys/arch/luna88k/cbus/
Di82365_cbus.c173 bus_space_handle_t ioh, memh; local
197 if (bus_space_map(memt, caa->ca_maddr, msize, 0, &memh))
228 bus_space_unmap(memt, memh, msize);
248 bus_space_handle_t memh; local
261 if (bus_space_map(memt, caa->ca_maddr, caa->ca_msize, 0, &memh)) {
275 sc->memh = memh;

123