/openbmc/linux/tools/perf/util/intel-pt-decoder/ |
H A D | intel-pt-pkt-decoder.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2013-2014, Intel Corporation. 13 #include "intel-pt-pkt-decoder.h" 77 static int intel_pt_get_long_tnt(const unsigned char *buf, size_t len, in intel_pt_get_long_tnt() argument 83 if (len < 8) in intel_pt_get_long_tnt() 88 for (count = 47; count; count--) { in intel_pt_get_long_tnt() 94 packet->type = INTEL_PT_TNT; in intel_pt_get_long_tnt() 95 packet->count = count; in intel_pt_get_long_tnt() 96 packet->payload = payload << 1; in intel_pt_get_long_tnt() 100 static int intel_pt_get_pip(const unsigned char *buf, size_t len, in intel_pt_get_pip() argument [all …]
|
/openbmc/linux/arch/ia64/lib/ |
H A D | clear_user.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 11 * Copyright (C) 1998, 1999, 2001 Hewlett-Packard Co 22 #define len r33 macro 37 // - we check whether or not the buffer is small, i.e., less than 17 38 // in which case we do the byte by byte loop. 40 // - Otherwise we go progressively from 1 byte store to 8byte store in 41 // the head part, the body is a 16byte store loop and we finish we the 60 cmp.eq p6,p0=r0,len // check for zero length 65 adds tmp=-1,len // br.ctop is repeat/until 66 mov ret0=len // return value is length at this point [all …]
|
H A D | copy_user.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 23 * Copyright (C) 2000-2001 Hewlett-Packard Co 27 * - handle the case where we have more than 16 bytes and the alignment 29 * - more benchmarking 30 * - fix extraneous stop bit introduced by the EX() macro. 39 #define COPY_BREAK 16 // we do byte copy below (must be >=16) 42 #define EPI p[PIPE_DEPTH-1] 49 #define len in2 macro 83 adds len2=-1,len // br.ctop is repeat/until 86 ;; // RAW of cfm when len=0 [all …]
|
/openbmc/linux/arch/xtensa/lib/ |
H A D | strncpy_user.S | 8 * Returns: -EFAULT if exception before terminator, N if the entire 20 * char *__strncpy_user(char *dst, const char *src, size_t len) 40 # a4/ len 53 # a2/ dst, a3/ src, a4/ len 55 beqz a4, .Lret # if len is zero 56 movi a5, MASK0 # mask for byte 0 57 movi a6, MASK1 # mask for byte 1 58 movi a7, MASK2 # mask for byte 2 59 movi a8, MASK3 # mask for byte 3 60 bbsi.l a3, 0, .Lsrc1mod2 # if only 8-bit aligned [all …]
|
H A D | checksum.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 23 * unsigned int csum_partial(const unsigned char *buf, int len, 26 * a3 = len 29 * This function assumes 2- or 4-byte alignment. Other alignments will fail! 32 /* ONES_ADD converts twos-complement math to ones-complement. */ 44 * is aligned on either a 2-byte or 4-byte boundary. 48 bnez a5, 8f /* branch if 2-byte aligned */ 49 /* Fall-through on common case, 4-byte alignment */ 51 srli a5, a3, 5 /* 32-byte chunks */ 57 add a5, a5, a2 /* a5 = end of last 32-byte chunk */ [all …]
|
H A D | strnlen_user.S | 19 * size_t __strnlen_user(const char *s, size_t len) 36 # a3/ len 49 # a2/ s, a3/ len 50 addi a4, a2, -4 # because we overincrement at the end; 52 movi a5, MASK0 # mask for byte 0 53 movi a6, MASK1 # mask for byte 1 54 movi a7, MASK2 # mask for byte 2 55 movi a8, MASK3 # mask for byte 3 56 bbsi.l a2, 0, .L1mod2 # if only 8-bit aligned 57 bbsi.l a2, 1, .L2mod4 # if only 16-bit aligned [all …]
|
/openbmc/linux/drivers/tty/ |
H A D | ehv_bytechan.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* ePAPR hypervisor byte channel device driver 4 * Copyright 2009-2011 Freescale Semiconductor, Inc. 9 * ePAPR hypervisor byte channels. 11 * 1) An early-console (udbg) driver. This provides early console output 12 * through a byte channel. The byte channel handle must be specified in a 15 * 2) A normal console driver. Output is sent to the byte channel designated 19 * 3) A tty driver, which is used to handle user-space input and output. The 20 * byte channel used for the console is designated as the default tty. 43 /* Per-byte channel private data */ [all …]
|
/openbmc/linux/lib/ |
H A D | asn1_encoder.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 * asn1_encode_integer() - encode positive integer to ASN.1 16 * @end_data: end of data pointer, points one beyond last usable byte in @data 27 int data_len = end_data - data; in asn1_encode_integer() 34 return ERR_PTR(-EINVAL); in asn1_encode_integer() 41 return ERR_PTR(-EINVAL); in asn1_encode_integer() 44 data_len -= 2; in asn1_encode_integer() 52 for (i = sizeof(integer); i > 0 ; i--) { in asn1_encode_integer() 53 int byte = integer >> (8 * (i - 1)); in asn1_encode_integer() local 55 if (!found && byte == 0) in asn1_encode_integer() [all …]
|
/openbmc/linux/fs/ntfs/ |
H A D | bitmap.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * bitmap.c - NTFS kernel bitmap handling. Part of the Linux-NTFS project. 5 * Copyright (c) 2004-2005 Anton Altaparmakov 18 * __ntfs_bitmap_set_bits_in_run - set a run of bits in a bitmap to a value 31 * Return 0 on success and -errno on error. 41 int pos, len; in __ntfs_bitmap_set_bits_in_run() local 46 "value %u.%s", vi->i_ino, (unsigned long long)start_bit, in __ntfs_bitmap_set_bits_in_run() 54 * bits, i.e. @start_bit and @start_bit + @cnt - 1, respectively. in __ntfs_bitmap_set_bits_in_run() 57 end_index = (start_bit + cnt - 1) >> (3 + PAGE_SHIFT); in __ntfs_bitmap_set_bits_in_run() 60 mapping = vi->i_mapping; in __ntfs_bitmap_set_bits_in_run() [all …]
|
/openbmc/qemu/util/ |
H A D | unicode.c | 10 * later. See the COPYING file in the top-level directory. 33 * @s: string encoded in modified UTF-8 37 * Convert the modified UTF-8 sequence at the start of @s. Modified 38 * UTF-8 is exactly like UTF-8, except U+0000 is encoded as 41 * If @n is zero or @s points to a zero byte, the sequence is invalid, 44 * If @s points to an impossible byte (0xFE or 0xFF) or a continuation 45 * byte, the sequence is invalid, and @end is set to @s + 1 47 * Else, the first byte determines how many continuation bytes are 50 * sequence is well-formed, and @end is set to @s + 1 + expected 53 * A well-formed sequence is valid unless it encodes a codepoint [all …]
|
/openbmc/u-boot/board/socrates/ |
H A D | nand.c | 1 // SPDX-License-Identifier: GPL-2.0+ 15 static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte); 16 static void sc_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len); 19 static void sc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len); 32 * sc_nand_write_byte - write one byte to the chip 34 * @byte: pointer to data byte to write 36 static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte) in sc_nand_write_byte() argument 38 sc_nand_write_buf(mtd, (const uchar *)&byte, sizeof(byte)); in sc_nand_write_byte() 42 * sc_nand_write_buf - write buffer to chip 45 * @len: number of bytes to write [all …]
|
/openbmc/linux/drivers/parport/ |
H A D | ieee1284_ops.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* IEEE-1284 operations for parport. 5 * they are used by the low-level drivers. If they have a special way 7 * the function pointers in port->ops); if not, they can just use these 31 * One-way data transfer functions. * 36 const void *buffer, size_t len, in parport_ieee1284_write_compat() argument 42 unsigned char byte; in parport_ieee1284_write_compat() local 43 struct pardevice *dev = port->physport->cad; in parport_ieee1284_write_compat() 47 if (port->irq != PARPORT_IRQ_NONE) { in parport_ieee1284_write_compat() 52 port->physport->ieee1284.phase = IEEE1284_PH_FWD_DATA; in parport_ieee1284_write_compat() [all …]
|
/openbmc/linux/drivers/i2c/ |
H A D | i2c-stub.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 i2c-stub.c - I2C/SMBus chip emulator 6 Copyright (C) 2007-2014 Jean Delvare <jdelvare@suse.de> 10 #define pr_fmt(fmt) "i2c-stub: " fmt 47 module_param_array(bank_reg, byte, NULL, S_IRUGO); 51 module_param_array(bank_mask, byte, NULL, S_IRUGO); 55 module_param_array(bank_start, byte, NULL, S_IRUGO); 59 module_param_array(bank_end, byte, NULL, S_IRUGO); 65 u8 len; member 71 u16 words[256]; /* Byte operations use the LSB as per SMBus [all …]
|
H A D | i2c-core-smbus.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * (e.g. smbalert) are handled in a separate i2c-smbus module. 9 * All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl> 16 #include <linux/i2c-smbus.h> 20 #include "i2c-core.h" 42 * i2c_smbus_pec - Incremental CRC8 over the given input data array 59 /* Assume a 7-bit address, which is reasonable for SMBus */ 67 return i2c_smbus_pec(pec, msg->buf, msg->len); in i2c_smbus_msg_pec() 73 msg->buf[msg->len] = i2c_smbus_msg_pec(0, msg); in i2c_smbus_add_pec() 74 msg->len++; in i2c_smbus_add_pec() [all …]
|
/openbmc/linux/drivers/media/usb/cx231xx/ |
H A D | cx231xx-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 cx231xx-i2c.c - driver for Conexant Cx23100/101/102 USB video capture devices 15 #include <linux/i2c-mux.h> 16 #include <media/v4l2-common.h> 20 /* ----------------------------------------------------------- */ 41 dev->name, __func__ , ##args); \ 48 return dev->port_3_switch_enabled ? I2C_1_MUX_3 : I2C_1_MUX_1; in get_real_i2c_port() 55 int i2c_port = get_real_i2c_port(dev, bus->nr); in is_tuner() 57 if (i2c_port != dev->board.tuner_i2c_master) in is_tuner() 60 if (msg->addr != dev->board.tuner_addr) in is_tuner() [all …]
|
/openbmc/linux/net/sunrpc/auth_gss/ |
H A D | gss_krb5_keys.c | 73 * krb5_nfold - n-fold function 79 * This is the n-fold function as described in rfc3961, sec 5.1 86 int byte, i, msbit; in krb5_nfold() local 100 byte = 0; in krb5_nfold() 104 for (i = ulcm-1; i >= 0; i--) { in krb5_nfold() 105 /* compute the msbit in k which gets added into this byte */ in krb5_nfold() 108 * unrotated byte */ in krb5_nfold() 109 ((inbits << 3) - 1) in krb5_nfold() 110 /* then, for each byte, shift to the right in krb5_nfold() 113 /* last, pick out the correct byte within in krb5_nfold() [all …]
|
/openbmc/linux/drivers/infiniband/hw/hfi1/ |
H A D | qsfp.h | 1 /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ 10 /* 128 byte pages, per SFF 8636 rev 2.4 */ 25 /* Reads/writes cannot cross 128 byte boundaries */ 33 /* Byte 0 is Identifier, not checked */ 34 /* Byte 1 is reserved "status MSB" */ 37 #define QSFP_MONITOR_RANGE (QSFP_MONITOR_VAL_END - QSFP_MONITOR_VAL_START + 1) 43 /* Byte 128 is Identifier: must be 0x0c for QSFP, or 0x0d for QSFP+ */ 46 * Byte 129 is "Extended Identifier". 51 /* Byte 130 is Connector type. Not Intel req'd */ 53 /* Byte 139 is encoding. code 0x01 is 8b10b. Not Intel req'd */ [all …]
|
/openbmc/linux/Documentation/netlink/specs/ |
H A D | ovs_flow.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 5 protocol: genetlink-legacy 6 uapi-header: linux/openvswitch.h 12 - 13 name: ovs-header 18 - 19 name: dp-ifindex 24 - 25 name: ovs-flow-stats 28 - [all …]
|
/openbmc/linux/Documentation/hid/ |
H A D | hidraw.rst | 2 HIDRAW - Raw Access to USB and Bluetooth Human Interface Devices 15 Hidraw is also useful for communicating with non-conformant HID devices 19 communication with these non-conformant devices is impossible using hiddev. 21 these non-conformant devices. 31 directly under /dev (eg: /dev/hidraw0). As this location is distribution- 32 and udev rule-dependent, applications should use libudev to locate hidraw 40 --------------- 43 ------- 47 a report available to be read. read() can be made non-blocking, by passing 51 On a device which uses numbered reports, the first byte of the returned data [all …]
|
/openbmc/linux/arch/arm64/lib/ |
H A D | strlen.S | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (c) 2013-2021, Arm Limited. 6 * https://github.com/ARM-software/optimized-routines/blob/98e4d6a5c13c8e54/string/aarch64/strlen.S 11 #include <asm/mte-def.h> 15 * ARMv8-a, AArch64, unaligned accesses, min page size 4k. 22 #define len x0 macro 36 /* NUL detection works on the principle that (X - 1) & (~X) & 0x80 37 (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and 39 (X - 1) & 0x80 is zero for non-NUL ASCII characters, but gives 48 * (16-byte) granularity, and we must ensure that no access straddles this [all …]
|
/openbmc/linux/drivers/nfc/st21nfca/ |
H A D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/crc-ccitt.h> 30 * called byte stuffing has been introduced. 32 * if byte == ST21NFCA_SOF_EOF or ST21NFCA_ESCAPE_BYTE_STUFFING 33 * - insert ST21NFCA_ESCAPE_BYTE_STUFFING (escape byte) 34 * - xor byte with ST21NFCA_BYTE_STUFFING_MASK 84 16, 1, (skb)->data, (skb)->len, 0); \ 98 int i, r = -1; in st21nfca_hci_platform_init() 101 r = i2c_master_send(phy->i2c_dev, reboot_cmd, in st21nfca_hci_platform_init() 111 r = -1; in st21nfca_hci_platform_init() [all …]
|
/openbmc/linux/Documentation/input/devices/ |
H A D | iforce-protocol.rst | 7 Home page at `<http://web.archive.org/web/*/http://www.esil.univ-mrs.fr>`_ 16 specify force effects to I-Force 2.0 devices. None of this information comes 25 send data to your I-Force device based on what you read in this document. 30 All values are hexadecimal with big-endian encoding (msb on the left). Beware, 31 values inside packets are encoded using little-endian. Bytes whose roles are 35 ------------------------ 40 2B OP LEN DATA CS 51 The 2B, LEN and CS fields have disappeared, probably because USB handles 63 LEN= Varies from device to device 64 00 X-Axis lsb [all …]
|
/openbmc/u-boot/drivers/misc/ |
H A D | cros_ec_i2c.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Chromium OS cros_ec driver - I2C interface 28 * byte 0 0xda (EC_COMMAND_PROTOCOL_3) 29 * byte 1-8 struct ec_host_request 30 * byte 10- response data 40 * byte 0 result code 41 * byte 1 packet_length 42 * byte 2-9 struct ec_host_response 43 * byte 10- response data 56 (struct ec_host_request_i2c *)dev->dout; in cros_ec_i2c_packet() [all …]
|
/openbmc/linux/drivers/pci/ |
H A D | syscall.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * stuff - it would probably be preferable on PCs too, but there people 16 unsigned long, off, unsigned long, len, void __user *, buf) in SYSCALL_DEFINE5() argument 19 u8 byte; in SYSCALL_DEFINE5() local 24 err = -EPERM; in SYSCALL_DEFINE5() 29 err = -ENODEV; in SYSCALL_DEFINE5() 34 switch (len) { in SYSCALL_DEFINE5() 36 cfg_ret = pci_user_read_config_byte(dev, off, &byte); in SYSCALL_DEFINE5() 45 err = -EINVAL; in SYSCALL_DEFINE5() 49 err = -EIO; in SYSCALL_DEFINE5() [all …]
|
/openbmc/qemu/tests/qtest/fuzz/ |
H A D | generic_fuzz.c | 2 * Generic Virtual-Device Fuzzing Target 10 * See the COPYING file in the top-level directory. 20 #include "tests/qtest/libqos/pci-pc.h" 25 #include "hw/qdev-core.h" 30 #include "hw/mem/sparse-mem.h" 73 * Example {.index = 1; .stride = 2; .len = 3; .data = "\x00\x01\x02"} 77 uint8_t index; /* Index of a byte to increment by stride */ 78 uint8_t stride; /* Increment each index'th byte by this amount */ 79 size_t len; member 108 if (info->index == 0) { in get_io_address_cb() [all …]
|