/freebsd/sys/dev/drm2/ |
H A D | drm_context.c | 39 * 2001-11-16 Torsten Duwe <duwe@caldera.de> 44 #include <dev/drm2/drmP.h> 51 * Free a handle from the context bitmap. 53 * \param dev DRM device. 54 * \param ctx_handle context handle. 60 void drm_ctxbitmap_free(struct drm_device * dev, int ctx_handle) in drm_ctxbitmap_free() argument 63 dev->ctx_bitmap == NULL) { in drm_ctxbitmap_free() 64 DRM_ERROR("Attempt to free invalid context handle: %d\n", in drm_ctxbitmap_free() 69 DRM_LOCK(dev); in drm_ctxbitmap_free() 70 clear_bit(ctx_handle, dev->ctx_bitmap); in drm_ctxbitmap_free() [all …]
|
H A D | drm_memory.c | 37 #include <dev/drm2/drmP.h> 39 #define vunmap(handle) argument 43 struct drm_device * dev) in agp_remap() argument 46 * FIXME Linux<->FreeBSD: Not implemented. This is never called in agp_remap() 47 * on FreeBSD anyway, because drm_agp_mem->cant_use_aperture is in agp_remap() 54 void drm_free_agp(DRM_AGP_MEM * handle, int pages) in drm_free_agp() argument 59 if (!agpdev || !handle) in drm_free_agp() 62 agp_free_memory(agpdev, handle); in drm_free_agp() 67 int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start) in drm_bind_agp() argument 72 if (!agpdev || !handle) in drm_bind_agp() [all …]
|
H A D | drm_ioc32.c | 1 /*- 28 #include <dev/drm2/drmP.h> 29 #include <dev/drm2/drm.h> 74 u32 date; /**< User-space buffer to hold date */ 76 u32 desc; /**< User-space buffer to hold desc */ 79 static int compat_drm_version(struct drm_device *dev, void *data, in compat_drm_version() argument 86 version.name_len = v32->name_len; in compat_drm_version() 87 version.name = (void *)(unsigned long)v32->name; in compat_drm_version() 88 version.date_len = v32->date_len; in compat_drm_version() 89 version.date = (void *)(unsigned long)v32->date; in compat_drm_version() [all …]
|
H A D | drm_gem.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 43 #include <dev/drm2/drmP.h> 44 #include <dev/drm2/drm.h> 45 #include <dev/drm2/drm_sarea.h> 69 drm_gem_init(struct drm_device *dev) in drm_gem_init() argument 73 drm_gem_names_init(&dev->object_names); in drm_gem_init() 78 return -ENOMEM; in drm_gem_init() 81 dev->mm_private = mm; in drm_gem_init() 83 if (drm_ht_create(&mm->offset_hash, 19)) { in drm_gem_init() [all …]
|
H A D | drm_agpsupport.c | 35 #include <dev/drm2/drmP.h> 51 int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info) in drm_agp_info() argument 55 if (!dev->agp || !dev->agp->acquired) in drm_agp_info() 56 return -EINVAL; in drm_agp_info() 58 kern = &dev->agp->agp_info; in drm_agp_info() 59 agp_get_info(dev->agp->bridge, kern); in drm_agp_info() 60 info->agp_version_major = 1; in drm_agp_info() 61 info->agp_version_minor = 0; in drm_agp_info() 62 info->mode = kern->ai_mode; in drm_agp_info() 63 info->aperture_base = kern->ai_aperture_base; in drm_agp_info() [all …]
|
H A D | drmP.h | 12 * Copyright (c) 2009-2010, Code Aurora Forum. 89 #include <dev/agp/agpvar.h> 92 #include <dev/pci/pcivar.h> 93 #include <dev/pci/pcireg.h> 97 #include <dev/drm2/drm.h> 98 #include <dev/drm2/drm_sarea.h> 100 #include <dev/drm2/drm_atomic.h> 101 #include <dev/drm2/drm_linux_list.h> 102 #include <dev/drm2/drm_gem_names.h> 104 #include <dev/drm2/drm_os_freebsd.h> [all …]
|
/freebsd/sys/dev/iicbus/ |
H A D | acpi_iicbus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2019-2020 Vladimir Kondratyev <wulf@FreeBSD.org> 39 #include <contrib/dev/acpica/include/acpi.h> 40 #include <contrib/dev/acpica/include/accommon.h> 41 #include <contrib/dev/acpica/include/amlcode.h> 42 #include <dev/acpic 75 ACPI_HANDLE handle; global() member 93 acpi_iicbus_sendb(device_t dev,u_char slave,char byte) acpi_iicbus_sendb() argument 103 acpi_iicbus_recvb(device_t dev,u_char slave,char * byte) acpi_iicbus_recvb() argument 119 acpi_iicbus_write(device_t dev,u_char slave,char cmd,void * buf,uint16_t buflen) acpi_iicbus_write() argument 131 acpi_iicbus_read(device_t dev,u_char slave,char cmd,void * buf,uint16_t buflen) acpi_iicbus_read() argument 155 acpi_iicbus_bwrite(device_t dev,u_char slave,char cmd,u_char count,char * buf) acpi_iicbus_bwrite() argument 170 acpi_iicbus_bread(device_t dev,u_char slave,char cmd,u_char * count,char * buf) acpi_iicbus_bread() argument 221 device_t dev; acpi_iicbus_space_handler() local 324 ACPI_HANDLE handle; acpi_iicbus_install_address_space_handler() local 342 ACPI_HANDLE handle; acpi_iicbus_remove_address_space_handler() local 362 ACPI_HANDLE handle; acpi_iicbus_get_i2cres_cb() local 384 acpi_iicbus_get_i2cres(ACPI_HANDLE handle,ACPI_RESOURCE_I2C_SERIALBUS * sb) acpi_iicbus_get_i2cres() argument 394 device_t dev = context; acpi_iicbus_parse_resources_cb() local 427 acpi_iicbus_parse_resources(ACPI_HANDLE handle,device_t dev) acpi_iicbus_parse_resources() argument 435 acpi_iicbus_dump_res(device_t dev,ACPI_IICBUS_RESOURCE_I2C_SERIALBUS * sb) acpi_iicbus_dump_res() argument 449 acpi_iicbus_add_child(device_t dev,u_int order,const char * name,int unit) acpi_iicbus_add_child() argument 457 acpi_iicbus_enumerate_child(ACPI_HANDLE handle,UINT32 level,void * context,void ** result) acpi_iicbus_enumerate_child() argument 534 acpi_iicbus_enumerate_children(device_t dev) acpi_iicbus_enumerate_children() argument 542 acpi_iicbus_set_power_children(device_t dev,int state,bool all_children) acpi_iicbus_set_power_children() argument 558 acpi_iicbus_probe(device_t dev) acpi_iicbus_probe() argument 560 ACPI_HANDLE handle; acpi_iicbus_probe() local 579 acpi_iicbus_attach(device_t dev) acpi_iicbus_attach() argument 597 acpi_iicbus_detach(device_t dev) acpi_iicbus_detach() argument 609 acpi_iicbus_suspend(device_t dev) acpi_iicbus_suspend() argument 621 acpi_iicbus_resume(device_t dev) acpi_iicbus_resume() argument 645 acpi_iicbus_driver_added(device_t dev,driver_t * driver) acpi_iicbus_driver_added() argument [all...] |
/freebsd/sys/dev/spibus/ |
H A D | acpi_spibus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 40 #include <contrib/dev/acpica/include/acpi.h> 41 #include <contrib/dev/acpica/include/accommon.h> 42 #include <contrib/dev/acpica/include/amlcode.h> 43 #include <dev/acpica/acpivar.h> 45 #include <dev/spibus/spibusvar.h> 65 ACPI_HANDLE handle; member 71 return (res->Type == ACPI_RESOURCE_TYPE_SERIAL_BUS && in acpi_resource_is_spi_serialbus() 72 res->Data.CommonSerialBus.Type == ACPI_RESOURCE_SERIAL_TYPE_SPI); in acpi_resource_is_spi_serialbus() [all …]
|
/freebsd/sys/dev/acpica/ |
H A D | acpi_pci.c | 1 /*- 43 #include <contrib/dev/acpica/include/acpi.h> 44 #include <contrib/dev/acpica/include/accommon.h> 46 #include <dev/acpica/acpivar.h> 47 #include <dev/acpica/acpi_pcivar.h> 50 #include <dev/pci/pcireg.h> 51 #include <dev/pci/pcivar.h> 52 #include <dev/pci/pci_private.h> 54 #include <dev/iommu/iommu.h> 77 static struct pci_devinfo *acpi_pci_alloc_devinfo(device_t dev); [all …]
|
H A D | acpi_dock.c | 1 /*- 2 * Copyright (c) 2005-2006 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 33 #include <contrib/dev/acpica/include/acpi.h> 34 #include <contrib/dev/acpica/include/accommon.h> 36 #include <dev/acpica/acpivar.h> 37 #include <dev/acpica/acpiio.h> 44 #define ACPI_DOCK_STATUS_UNKNOWN -1 49 #define ACPI_DOCK_LOCK 1 /* Prevent dev from being removed */ 72 acpi_dock_get_info(device_t dev) in acpi_dock_get_info() argument 77 sc = device_get_softc(dev); in acpi_dock_get_info() [all …]
|
H A D | acpi_perf.c | 1 /*- 2 * Copyright (c) 2003-2005 Nate Lawson (SDG) 45 #include <contrib/dev/acpica/include/acpi.h> 47 #include <dev/acpica/acpivar.h> 65 /* Offsets in struct cf_setting array for storing driver-specific values. */ 72 device_t dev; member 73 ACPI_HANDLE handle; member 96 static int acpi_perf_probe(device_t dev); 97 static int acpi_perf_attach(device_t dev); 98 static int acpi_perf_detach(device_t dev); [all …]
|
H A D | acpivar.h | 1 /*- 78 struct apm_clone_data *acpi_clone; /* Pseudo-dev for devd(8). */ 111 /* Track device (/dev/{apm,apmctl} and /dev/acpi) notification status. */ 116 #define ACPI_EVF_NONE 0 /* /dev/apm semantics */ 117 #define ACPI_EVF_DEVD 1 /* /dev/acpi is handled via devd(8) */ 153 * Each ACPI device can have its own driver-specific mutex for protecting 154 * shared access to local data. The ACPI_LOCK macros handle mutexes. 160 * ACPI-CA handles its own locking and should not be called with locks held. 163 * GPE -> EC runs _Qxx -> _Qxx reads EC space -> GPE 180 * ACPI CA does not define layers for non-ACPI CA drivers. [all …]
|
H A D | acpi.c | 1 /*- 67 #include <contrib/dev/acpica/include/acpi.h> 68 #include <contrib/dev/acpica/include/accommon.h> 69 #include <contrib/dev/acpica/include/acnamesp.h> 71 #include <dev/acpica/acpivar.h> 72 #include <dev/acpica/acpiio.h> 74 #include <dev/pci/pcivar.h> 113 static void acpi_lookup(void *arg, const char *name, device_t *dev); 154 static void acpi_reserve_resources(device_t dev); 155 static int acpi_sysres_alloc(device_t dev); [all …]
|
H A D | acpi_video.c | 1 /*- 2 * Copyright (c) 2002-2003 Taku YAMAMOTO <taku@cent.saitama-u.ac.jp> 42 #include <contrib/dev/acpica/include/acpi.h> 44 #include <dev/acpica/acpivar.h> 47 #include <dev/evdev/input.h> 48 #include <dev/evdev/evdev.h> 53 ACPI_HANDLE handle; member 78 ACPI_HANDLE handle; member 152 (((1 << DOD_HEAD_ID_BITS) - 282 acpi_video_probe(device_t dev) acpi_video_probe() argument 300 acpi_video_attach(device_t dev) acpi_video_attach() argument 363 acpi_video_detach(device_t dev) acpi_video_detach() argument 389 acpi_video_resume(device_t dev) acpi_video_resume() argument 419 acpi_video_shutdown(device_t dev) acpi_video_shutdown() argument 436 acpi_video_notify_handler(ACPI_HANDLE handle,UINT32 notify,void * context) acpi_video_notify_handler() argument 526 acpi_video_bind_outputs_subr(ACPI_HANDLE handle,UINT32 adr,void * context) acpi_video_bind_outputs_subr() argument 698 acpi_video_vo_bind(struct acpi_video_output * vo,ACPI_HANDLE handle) acpi_video_vo_bind() argument 781 acpi_video_vo_notify_handler(ACPI_HANDLE handle,UINT32 notify,void * context) acpi_video_vo_notify_handler() argument 995 vid_set_switch_policy(ACPI_HANDLE handle,UINT32 policy) vid_set_switch_policy() argument 1013 vid_enum_outputs_subr(ACPI_HANDLE handle,UINT32 level __unused,void * context,void ** retp __unused) vid_enum_outputs_subr() argument 1040 vid_enum_outputs(ACPI_HANDLE handle,void (* callback)(ACPI_HANDLE,UINT32,void *),void * context) vid_enum_outputs() argument 1086 vo_get_brightness_levels(ACPI_HANDLE handle,int ** levelp) vo_get_brightness_levels() argument 1192 vo_get_device_status(ACPI_HANDLE handle) vo_get_device_status() argument 1217 vo_get_graphics_state(ACPI_HANDLE handle) vo_get_graphics_state() argument 1241 vo_set_device_state(ACPI_HANDLE handle,UINT32 state) vo_set_device_state() argument [all...] |
/freebsd/contrib/libfido2/src/ |
H A D | hid_win.c | 2 * Copyright (c) 2019-2022 Yubico AB. All rights reserved. 3 * Use of this source code is governed by a BSD-style 5 * SPDX-License-Identifier: BSD-2-Clause 37 HANDLE dev; member 46 is_fido(HANDLE dev) in is_fido() argument 52 if (HidD_GetPreparsedData(dev, &data) == false) { in is_fido() 71 get_report_len(HANDLE dev, int dir, size_t *report_len) in get_report_len() argument 76 int ok = -1; in get_report_len() 78 if (HidD_GetPreparsedData(dev, &data) == false) { in get_report_len() 107 get_id(HANDLE dev, int16_t *vendor_id, int16_t *product_id) in get_id() argument [all …]
|
/freebsd/contrib/libpcap/ |
H A D | pcap-netfilter-linux.c | 33 #include "pcap-int.h" 34 #include "diag-control.h" 64 * In tcpdump you can disable dropping privileges with -Z root 67 #include "pcap-netfilter-linux.h" 74 typedef enum { OTHER = -1, NFLOG, NFQUEUE } nftype_t; 84 static int nfqueue_send_verdict(const pcap_t *handle, uint16_t group_id, u_int32_t id, u_int32_t ve… 88 netfilter_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user) in netfilter_read_linux() argument 90 struct pcap_netfilter *handlep = handle->priv; in netfilter_read_linux() 98 if (handle->break_loop) { in netfilter_read_linux() 100 * Yes - clear the flag that indicates that it in netfilter_read_linux() [all …]
|
/freebsd/sys/dev/acpi_support/ |
H A D | acpi_panasonic.c | 1 /*- 2 * Copyright (c) 2003 OGAWA Takaya <t-ogawa@triaez.kaisei.org> 39 #include <contrib/dev/acpica/include/acpi.h> 41 #include <dev/acpica/acpivar.h> 64 #define HKEY_LCD_BRIGHTNESS_DIV ((1 << HKEY_LCD_BRIGHTNESS_BITS) - 1) 67 device_t dev; member 68 ACPI_HANDLE handle; member 79 static int acpi_panasonic_probe(device_t dev); 80 static int acpi_panasonic_attach(device_t dev); 81 static int acpi_panasonic_detach(device_t dev); [all …]
|
/freebsd/sys/dev/gpio/ |
H A D | acpi_gpiobus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 34 #include <contrib/dev/acpica/include/acpi.h> 35 #include <dev/acpica/acpivar.h> 37 #include <dev/gpio/gpiobusvar.h> 38 #include <dev/gpio/acpi_gpiobusvar.h> 55 ACPI_HANDLE dev_handle; /* ACPI handle fo 115 ACPI_HANDLE handle; acpi_gpiobus_enumerate_res() local 220 acpi_gpiobus_enumerate(ACPI_HANDLE handle,UINT32 depth,void * context,void ** result) acpi_gpiobus_enumerate() argument 299 acpi_gpiobus_probe(device_t dev) acpi_gpiobus_probe() argument 318 acpi_gpiobus_attach(device_t dev) acpi_gpiobus_attach() argument 322 ACPI_HANDLE handle; acpi_gpiobus_attach() local 366 acpi_gpiobus_detach(device_t dev) acpi_gpiobus_detach() argument 402 acpi_gpiobus_read_ivar(device_t dev,device_t child,int which,uintptr_t * result) acpi_gpiobus_read_ivar() argument [all...] |
/freebsd/sys/dev/atopcase/ |
H A D | atopcase_acpi.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2021-2023 Val Packett <val@packett.cool> 42 #include <contrib/dev/acpica/include/acpi.h> 43 #include <contrib/dev/acpica/include/accommon.h> 44 #include <contrib/dev/acpica/include/acevents.h> 45 #include <dev/acpica/acpivar.h> 46 #include <dev/acpica/acpiio.h> 48 #include <dev/backlight/backlight.h> 50 #include <dev/evdev/input.h> [all …]
|
/freebsd/sys/dev/nvdimm/ |
H A D | nvdimm_acpi.c | 1 /*- 45 #include <contrib/dev/acpica/include/acpi.h> 46 #include <contrib/dev/acpica/include/accommon.h> 47 #include <contrib/dev/acpica/include/acuuid.h> 48 #include <dev/acpica/acpivar.h> 50 #include <dev/nvdimm/nvdimm_var.h> 62 find_dimm(ACPI_HANDLE handle, UINT32 nesting_level, void *context, in find_dimm() argument 69 status = AcpiGetObjectInfo(handle, &device_info); in find_dimm() 72 if (device_info->Address == (uintptr_t)context) { in find_dimm() 73 *(ACPI_HANDLE *)return_value = handle; in find_dimm() [all …]
|
/freebsd/stand/uboot/ |
H A D | uboot_disk.c | 1 /*- 31 * Block storage I/O routines for U-Boot 46 printf("%s%d: ", dev->dd.d_dev->dv_name, dev->dd.d_unit); \ 59 int handle; /* storage device handle */ member 65 #define SI(dev) (stor_info[(dev)->dd.d_unit]) argument 101 printf("No U-Boot devices! Really enumerated?\n"); in stor_init() 102 return (-1); in stor_init() 107 if ((di != NULL) && (di->type & DEV_TYP_STOR)) { in stor_init() 111 return (-1); in stor_init() 113 stor_info[stor_info_no].handle = i; in stor_init() [all …]
|
/freebsd/sys/dev/vmgenc/ |
H A D | vmgenc_acpi.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 33 * https://docs.microsoft.com/en-us/windows/win32/hyperv_v2/virtual-machine-generation-identifier , 34 * https://azure.microsoft.com/en-us/blog/accessing-and-using-azure-vm-unique-id/ 39 * - QEMU: https://bugzilla.redhat.com/show_bug.cgi?id=1118834 40 * - VMware/ESXi: https://kb.vmware.com/s/article/2032586 41 …* - Xen: https://github.com/xenserver/xen-4.5/blob/master/tools/firmware/hvmloader/acpi/dsdt.asl#L… 56 #include <contrib/dev/acpica/include/acpi.h> 58 #include <dev/acpica/acpivar.h> 59 #include <dev/random/random_harvestq.h> [all …]
|
/freebsd/sys/dev/pci/ |
H A D | pci_host_generic_acpi.c | 1 /*- 48 #include <contrib/dev/acpica/include/acpi.h> 49 #include <contrib/dev/acpica/include/accommon.h> 51 #include <dev/acpica/acpivar.h> 52 #include <dev/acpica/acpi_pcibvar.h> 54 #include <dev/pci/pcivar.h> 55 #include <dev/pci/pcireg.h> 56 #include <dev/pci/pcib_private.h> 57 #include <dev/pci/pci_host_generic.h> 58 #include <dev/pci/pci_host_generic_acpi.h> [all …]
|
/freebsd/sys/vm/ |
H A D | device_pager.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 94 static int old_dev_pager_ctor(void *handle, vm_ooffset_t size, vm_prot_t prot, 96 static void old_dev_pager_dtor(void *handle); 115 cdev_pager_lookup(void *handle) in cdev_pager_lookup() argument 121 object = vm_pager_object_lookup(&dev_pager_object_list, handle); in cdev_pager_lookup() 122 if (object != NULL && object->un_pager.devp.handle == NULL) { in cdev_pager_lookup() 123 msleep(&object->un_pager.devp.handle, &dev_pager_mtx, in cdev_pager_lookup() 133 cdev_pager_allocate(void *handle, enum obj_type tp, in cdev_pager_allocate() argument 142 KASSERT(tp == OBJT_MGTDEVICE || ops->cdev_pg_populate == NULL, in cdev_pager_allocate() [all …]
|
/freebsd/sys/dev/dpaa2/ |
H A D | dpaa2_mc_fdt.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright © 2021-2022 Dmitry Salychev 31 * The DPAA2 Management Complex (MC) Bus Driver (FDT-based). 35 * hardware objects used in network-oriented packet processing applications. 49 #include <dev/ofw/ofw_bus.h> 50 #include <dev/ofw/ofw_bus_subr.h> 51 #include <dev/fdt/simplebus.h> 73 compatible = "fsl,qoriq-mc-dpmac"; 76 pcs-handle = <0x15>; [all …]
|