| /freebsd/sys/contrib/ncsw/user/env/ |
| H A D | xx.c | 1 /*- 76 (((x) + MALLOCSMART_SLICE_SIZE - 1) / MALLOCSMART_SLICE_SIZE) 152 XX_MallocSmartMapCheck(unsigned int start, unsigned int slices) in XX_MallocSmartMapCheck() argument 157 for (i = start; i < start + slices; i++) in XX_MallocSmartMapCheck() 164 XX_MallocSmartMapSet(unsigned int start, unsigned int slices) in XX_MallocSmartMapSet() argument 170 for (i = start; i < start + slices; i++) in XX_MallocSmartMapSet() 171 XX_MallocSmartMap[i] = ((i == start) ? slices : -1); in XX_MallocSmartMapSet() 175 XX_MallocSmartMapClear(unsigned int start, unsigned int slices) in XX_MallocSmartMapClear() argument 181 for (i = start; i < start + slices; i++) in XX_MallocSmartMapClear() 243 unsigned int start, slices; in XX_FreeSmart() local [all …]
|
| /freebsd/sys/arm/arm/ |
| H A D | gic.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 104 ((_sc->typer & GICD_TYPER_SECURITYEXT) == GICD_TYPER_SECURITYEXT) 117 /* be used for MSI/MSI-X interrupts */ 118 #define GI_FLAG_MSI_USED (1 << 2) /* This irq is already allocated */ 119 /* for a MSI/MSI-X interrupt */ 127 static u_int sgi_to_ipi[GIC_LAST_SGI - GIC_FIRST_SGI + 1]; 131 #define GIC_INTR_ISRC(sc, irq) (&sc->gic_irqs[irq].gi_isrc) argument 137 { -1, 0 } 153 bus_read_4((_sc)->gic_res[GIC_RES_CPU], (_reg)) [all …]
|
| H A D | nexus.c | 1 /*- 214 resource_list_init(&ndev->nx_resources); in nexus_add_child() 263 nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, in nexus_config_intr() argument 292 nexus_describe_intr(device_t dev, device_t child, struct resource *irq, in nexus_describe_intr() argument 296 return (intr_describe_irq(child, irq, cookie, descr)); in nexus_describe_intr() 301 nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu) in nexus_bind_intr() argument 304 return (intr_bind_irq(child, irq, cpu)); in nexus_bind_intr() 337 rman_res_t length, start; in nexus_map_resource() local 353 error = resource_validate_map_request(r, argsp, &args, &start, &length); in nexus_map_resource() 358 error = bus_space_map(fdtbus_bs_tag, start, length, 0, in nexus_map_resource() [all …]
|
| /freebsd/sys/arm64/arm64/ |
| H A D | gic_v3.c | 1 /*- 2 * Copyright (c) 2015-2016 The FreeBSD Foundation 112 static u_int sgi_to_ipi[GIC_LAST_SGI - GIC_FIRST_SGI + 1]; 144 /* MSI/MSI-X */ 166 * Driver-specific definitions. 173 /* Destination registers, either Distributor or Re-Distributor */ 185 /* be used for MSI/MSI-X interrupts */ 186 #define GI_FLAG_MSI_USED (1 << 2) /* This irq is already allocated */ 187 /* for a MSI/MSI-X interrupt */ 226 rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; in gic_r_read_4() [all …]
|
| H A D | nexus.c | 1 /*- 87 "Force all devices to use non-posted device memory"); 220 resource_list_init(&ndev->nx_resources); in nexus_add_child() 250 rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) in nexus_alloc_resource() argument 259 * the start/end values. in nexus_alloc_resource() 261 if (RMAN_IS_DEFAULT_RANGE(start, end) && (count == 1)) { in nexus_alloc_resource() 264 rle = resource_list_find(&ndev->nx_resources, type, *rid); in nexus_alloc_resource() 267 start = rle->start; in nexus_alloc_resource() 268 end = rle->end; in nexus_alloc_resource() 269 count = rle->count; in nexus_alloc_resource() [all …]
|
| /freebsd/sys/x86/x86/ |
| H A D | nexus.c | 1 /*- 185 int irq; in nexus_init_resources() local 190 * - IRQ resource creation should be moved to the PIC/APIC driver. in nexus_init_resources() 191 * - DRQ resource creation should be moved to the DMAC driver. in nexus_init_resources() 192 * - The above should be sorted to probe earlier than any child buses. in nexus_init_resources() 194 * - Leave I/O and memory creation here, as child probes may need them. in nexus_init_resources() 199 * IRQ's are on the mainboard on old systems, but on the ISA part in nexus_init_resources() 200 * of PCI->ISA bridges. There would be multiple sets of IRQs on in nexus_init_resources() 201 * multi-ISA-bus systems. PCI interrupts are routed to the ISA in nexus_init_resources() 208 irq_rman.rm_end = num_io_irqs - 1; in nexus_init_resources() [all …]
|
| /freebsd/sys/dev/acpica/ |
| H A D | acpi_resource.c | 1 /*- 59 u_int irq; member 91 switch (res->Type) { in acpi_lookup_irq_handler() 93 irqnum = res->Data.Irq.InterruptCount; in acpi_lookup_irq_handler() 95 if (res->Data.Irq.Interrupts[i] == req->irq) { in acpi_lookup_irq_handler() 101 trig = res->Data.Irq.Triggering; in acpi_lookup_irq_handler() 102 pol = res->Data.Irq.Polarity; in acpi_lookup_irq_handler() 105 irqnum = res->Data.ExtendedIrq.InterruptCount; in acpi_lookup_irq_handler() 107 if (res->Data.ExtendedIrq.Interrupts[i] == req->irq) { in acpi_lookup_irq_handler() 113 trig = res->Data.ExtendedIrq.Triggering; in acpi_lookup_irq_handler() [all …]
|
| /freebsd/sys/dev/atkbdc/ |
| H A D | atkbdc_isa.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 53 int type, int *rid, rman_res_t start, rman_res_t end, 99 rman_res_t start; in atkbdc_isa_probe() local 121 * (0x60 and 0x64). Some brain-damaged ACPI BIOS has reversed in atkbdc_isa_probe() 129 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0) in atkbdc_isa_probe() 131 if (start == IO_KBD + KBD_STATUS_PORT) { in atkbdc_isa_probe() 132 start = IO_KBD; in atkbdc_isa_probe() 135 if (count > 1) /* adjust the count and/or start port */ in atkbdc_isa_probe() [all …]
|
| /freebsd/sys/contrib/dev/mediatek/mt76/mt7915/ |
| H A D | coredump.c | 1 // SPDX-License-Identifier: ISC 16 .start = 0xe003b400, 24 .start = 0x00800000, 29 .start = 0x00900000, 34 .start = 0x02200000, 39 .start = 0x02300000, 44 .start = 0x00400000, 49 .start = 0xe0000000, 57 .start = 0x00800000, 62 .start = 0x00900000, [all …]
|
| /freebsd/sys/powerpc/powermac/ |
| H A D | uninorth.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 168 if (dinfo->udi_ninterrupts >= 6) { in unin_chip_add_intr() 175 if (nintr == -1) { in unin_chip_add_intr() 178 if (nintr == -1) in unin_chip_add_intr() 182 if (intr[0] == -1) in unin_chip_add_intr() 185 if (OF_getprop(devnode, "interrupt-parent", &iparent, sizeof(iparent)) in unin_chip_add_intr() 189 if (OF_searchprop(iparent, "#interrupt-cells", &icells, sizeof(icells)) in unin_chip_add_intr() 194 u_int irq = MAP_IRQ(iparent, intr[i]); in unin_chip_add_intr() local 196 resource_list_add(&dinfo->udi_resources, SYS_RES_IRQ, in unin_chip_add_intr() [all …]
|
| /freebsd/sys/dev/glxiic/ |
| H A D | glxiic.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 36 * The driver is implemented as an interrupt-driven state machine, 63 /* CS5536 PCI-ISA ID. */ 141 int irq_rid; /* IRQ resource ID. */ 142 struct resource *irq_res; /* IRQ resource. */ 143 void *irq_handler; /* IRQ handler cookie. */ 144 int old_irq; /* IRQ mapped by board firmware. */ 168 #define GLXIIC_LOCK(_sc) mtx_lock(&_sc->mtx) 169 #define GLXIIC_UNLOCK(_sc) mtx_unlock(&_sc->mtx) [all …]
|
| /freebsd/sys/dev/bhnd/cores/chipc/ |
| H A D | chipc_subr.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 5 * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org> 40 * Return a human-readable name for the given flash @p type. 150 /* Configure child resource with offset-adjusted values */ in chipc_init_child_resource() 164 * Map an interrupt line to an IRQ, and then register a corresponding SYS_RES_IRQ 182 KASSERT(device_get_parent(child) == sc->dev, ("not a direct child")); in chipc_set_irq_resource() 185 /* We currently only support a single IRQ mapping */ in chipc_set_irq_resource() 186 if (dinfo->irq_mapped) { in chipc_set_irq_resource() 187 device_printf(sc->dev, "irq already mapped for child\n"); in chipc_set_irq_resource() [all …]
|
| /freebsd/sys/powerpc/mpc85xx/ |
| H A D | pci_mpc85xx.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 4 * Copyright 2006-2007 by Juniper Networks. 94 #define REG_PITAR(n) (0x0e00 - 0x20 * (n)) 95 #define REG_PIWBAR(n) (0x0e08 - 0x20 * (n)) 96 #define REG_PIWBEAR(n) (0x0e0c - 0x20 * (n)) 97 #define REG_PIWAR(n) (0x0e10 - 0x20 * (n)) 139 #define PCI_SLOT_FIRST 0x1 /* used to be 0x11 but qemu-ppce500 starts from 0x1 */ 163 uint8_t sc_pcie_capreg; /* PCI-E Capability Reg Set */ 227 static int fsl_pcib_alloc_msix(device_t dev, device_t child, int *irq); [all …]
|
| /freebsd/sys/riscv/riscv/ |
| H A D | nexus.c | 1 /*- 32 * This code implements a `root nexus' for RISC-V Architecture 201 resource_list_init(&ndev->nx_resources); in nexus_add_child() 230 rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) in nexus_alloc_resource() argument 239 * the start/end values. in nexus_alloc_resource() 241 if (RMAN_IS_DEFAULT_RANGE(start, end) && (count == 1)) { in nexus_alloc_resource() 244 rle = resource_list_find(&ndev->nx_resources, type, *rid); in nexus_alloc_resource() 247 start = rle->start; in nexus_alloc_resource() 248 end = rle->end; in nexus_alloc_resource() 249 count = rle->count; in nexus_alloc_resource() [all …]
|
| /freebsd/sys/powerpc/ps3/ |
| H A D | ps3bus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 50 #include "ps3-hvcall.h" 62 int type, int *rid, rman_res_t start, rman_res_t end, 178 uint64_t irq_type, irq, outlet; in ps3bus_resources_init() local 184 resource_list_init(&dinfo->resources); in ps3bus_resources_init() 187 thread = 32 - fls(mfctrl()); in ps3bus_resources_init() 194 lv1_repository_string("intr") | i, 0, &irq_type, &irq); in ps3bus_resources_init() 204 lv1_connect_interrupt_event_receive_port(dinfo->bus, in ps3bus_resources_init() 205 dinfo->dev, outlet, irq); in ps3bus_resources_init() [all …]
|
| /freebsd/sys/isa/ |
| H A D | isa_common.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause AND MIT 115 * in *config and return the regions in *result. Returns non-zero if 134 result->ic_nmem = config->ic_nmem; in isa_find_memory() 135 for (i = 0; i < config->ic_nmem; i++) { in isa_find_memory() 136 uint32_t start, end, size, align; in isa_find_memory() local 138 size = config->ic_mem[i].ir_size; in isa_find_memory() 142 result->ic_mem[i].ir_start = 0; in isa_find_memory() 143 result->ic_mem[i].ir_end = 0; in isa_find_memory() 144 result->ic_mem[i].ir_size = 0; in isa_find_memory() [all …]
|
| /freebsd/sys/dev/dpaa2/ |
| H A D | dpaa2_mc.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright © 2021-2022 Dmitry Salychev 34 * hardware objects used in network-oriented packet processing applications. 73 #define mcreg_read_4(_sc, _r) bus_read_4(&(_sc)->map[1], (_r)) 74 #define mcreg_write_4(_sc, _r, _v) bus_write_4(&(_sc)->map[1], (_r), (_v)) 137 sc->dev = dev; in dpaa2_mc_attach() 138 sc->msi_allocated = false; in dpaa2_mc_attach() 139 sc->msi_owner = NULL; in dpaa2_mc_attach() 141 error = bus_alloc_resources(sc->dev, dpaa2_mc_spec, sc->res); in dpaa2_mc_attach() [all …]
|
| /freebsd/sys/dev/sound/pci/ |
| H A D | csa.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 9 * Copyright (c) 1996-1998 Crystal Semiconductor Corp. 83 rman_res_t start, rman_res_t end, 87 struct resource *irq, int flags, 91 struct resource *irq, void *cookie); 192 subcard = card->cards; in csa_findsubcard() 211 device_set_desc(dev, card->name); in csa_probe() 229 scp->dev = dev; in csa_attach() 234 resp = &scp->res; in csa_attach() [all …]
|
| /freebsd/sys/powerpc/powerpc/ |
| H A D | nexus.c | 1 /*- 215 nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, in nexus_config_intr() argument 219 return (powerpc_config_intr(irq, trig, pol)); in nexus_config_intr() 224 pcell_t *irq) in nexus_ofw_map_intr() argument 226 u_int intr = MAP_IRQ(iparent, irq[0]); in nexus_ofw_map_intr() 228 powerpc_fw_config_intr(intr, irq[1]); in nexus_ofw_map_intr() 250 rman_res_t length, start; in nexus_map_resource() local 267 error = resource_validate_map_request(r, argsp, &args, &start, &length); in nexus_map_resource() 278 map->r_bushandle = start; in nexus_map_resource() 280 map->r_bustag = &bs_le_tag; in nexus_map_resource() [all …]
|
| /freebsd/sys/dev/vmd/ |
| H A D | vmd.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 81 * By default all VMD devices remap children MSI/MSI-X interrupts into their 99 * MSI-X can use different addresses, but we have limited number of MSI-X 104 "Maximum number of MSI-X vectors per device"); 126 for (t = vmd_devs; t->vmd_name != NULL; t++) { in vmd_probe() 127 if (vid == t->vmd_vid && did == t->vmd_did) { in vmd_probe() 128 device_set_desc(dev, t->vmd_name); in vmd_probe() 142 if (sc->psc.bus.rman.rm_end != 0) in vmd_free() 143 rman_fini(&sc->psc.bus.rman); in vmd_free() [all …]
|
| /freebsd/sys/powerpc/powernv/ |
| H A D | opal_pci.c | 1 /*- 2 * Copyright (c) 2015-2016 Nathan Whitehorn 3 * Copyright (c) 2017-2018 Semihalf 84 int *irq); 86 int irq); 88 int irq, uint64_t *addr, uint32_t *data); 94 static void opalpic_pic_enable(device_t dev, u_int irq, u_int vector, void **); 95 static void opalpic_pic_eoi(device_t dev, u_int irq, void *); 163 int base_msi_irq; /* Base IRQ assigned by FreeBSD to this PIC */ 186 if (!OF_hasprop(ofw_bus_get_node(dev), "ibm,opal-phbid")) in opalpci_probe() [all …]
|
| /freebsd/sys/dev/fdt/ |
| H A D | simplebus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 154 * XXX We should attach only to pure' compatible = "simple-bus"', in simplebus_probe() 157 * "syscon", "simple-bus"; is handled by fdt/syscon driver in simplebus_probe() 158 * "simple-mfd", "simple-bus"; is handled by fdt/simple-mfd driver in simplebus_probe() 161 ofw_bus_is_compatible(dev, "simple-mfd")) in simplebus_probe() 165 * FDT data puts a "simple-bus" compatible string on many things that in simplebus_probe() 169 if (!(ofw_bus_is_compatible(dev, "simple-bus") && in simplebus_probe() 188 if ((sc->flags & SB_FLAG_NO_RANGES) == 0 && in simplebus_attach_impl() 189 simplebus_fill_ranges(sc->node, sc) < 0) { in simplebus_attach_impl() [all …]
|
| /freebsd/sys/dev/pci/ |
| H A D | pcib_private.h | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 53 rman_res_t start, rman_res_t end, u_int flags); 55 device_t dev, int type, int *rid, rman_res_t start, 58 device_t dev, struct resource *r, rman_res_t start, 95 * Bridge-specific data. 130 #define PCIB_HP_LOCK(sc) mtx_lock((sc)->pcie_hp_lock) 131 #define PCIB_HP_UNLOCK(sc) mtx_unlock((sc)->pcie_hp_lock) 132 #define PCIB_HP_LOCK_ASSERT(sc) mtx_assert((sc)->pcie_hp_lock, MA_OWNED) 142 rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); [all …]
|
| /freebsd/sys/contrib/device-tree/Bindings/gpio/ |
| H A D | gpio-xgene-sb.txt | 1 APM X-Gene Standby GPIO controller bindings 6 +--------- [all...] |
| /freebsd/sys/x86/iommu/ |
| H A D | iommu_utils.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 101 if (zeroed && (m->flags & PG_ZERO) == 0) in iommu_pgalloc() 127 SLIST_INSERT_HEAD(&entry->pgtbl_free, m, plinks.s.ss); in iommu_pgfree() 164 iommu_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL, in iommu_map_pgtbl() 228 bool edge, bool activehi, int irq, u_int *cookie, uint32_t *hi, in x86_no_iommu_map_ioapic_intr() argument 268 x86_iommu->domain_unload_entry(entry, free, cansleep); in iommu_domain_unload_entry() 275 x86_iommu->domain_unload(iodom, entries, cansleep); in iommu_domain_unload() 282 return (x86_iommu->get_ctx(iommu, dev, rid, id_mapped, rmrr_init)); in iommu_get_ctx() 288 x86_iommu->free_ctx_locked(iommu, context); in iommu_free_ctx_locked() [all …]
|