| /openbmc/qemu/hw/usb/ |
| H A D | desc-msos.c | 57 int length = sizeof(*hdr); in usb_desc_msos_compat() local 60 func = (void *)(dest + length); in usb_desc_msos_compat() 67 length += sizeof(*func); in usb_desc_msos_compat() 70 hdr->dwLength = cpu_to_le32(length); in usb_desc_msos_compat() 76 return length; in usb_desc_msos_compat() 117 int length = wcslen(name) + 1; in usb_desc_msos_prop_name() local 120 prop->dwPropertyNameLength_lo = usb_lo(length*2); in usb_desc_msos_prop_name() 121 prop->dwPropertyNameLength_hi = usb_hi(length*2); in usb_desc_msos_prop_name() 122 for (i = 0; i < length; i++) { in usb_desc_msos_prop_name() 126 return length*2; in usb_desc_msos_prop_name() [all …]
|
| /openbmc/qemu/tests/qemu-iotests/ |
| H A D | 146.out | 5 [{ "start": 0, "length": 136363130880, "depth": 0, "present": true, "zero": true, "data": false, "c… 9 [{ "start": 0, "length": 136365211648, "depth": 0, "present": true, "zero": true, "data": false, "c… 13 [{ "start": 0, "length": 136363130880, "depth": 0, "present": true, "zero": true, "data": false, "c… 17 [{ "start": 0, "length": 136365211648, "depth": 0, "present": true, "zero": true, "data": false, "c… 21 [{ "start": 0, "length": 136365211648, "depth": 0, "present": true, "zero": true, "data": false, "c… 25 [{ "start": 0, "length": 136363130880, "depth": 0, "present": true, "zero": true, "data": false, "c… 29 [{ "start": 0, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "compre… 30 { "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "c… 31 { "start": 4194304, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "c… 32 { "start": 6291456, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "c… [all …]
|
| H A D | 179.out | 16 [{ "start": 0, "length": 2097152, "depth": 0, "present": false, "zero": true, "data": false, "compr… 17 { "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "c… 18 { "start": 4194304, "length": 2097152, "depth": 0, "present": false, "zero": true, "data": false, "… 19 { "start": 6291456, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "c… 20 { "start": 8388608, "length": 58720256, "depth": 0, "present": false, "zero": true, "data": false, … 34 [{ "start": 0, "length": 2097152, "depth": 0, "present": false, "zero": true, "data": false, "compr… 35 { "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "c… 36 { "start": 4194304, "length": 2097152, "depth": 0, "present": false, "zero": true, "data": false, "… 37 { "start": 6291456, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "c… 38 { "start": 8388608, "length": 2097152, "depth": 0, "present": false, "zero": true, "data": false, "… [all …]
|
| /openbmc/qemu/system/ |
| H A D | memory_mapping.c | 42 ram_addr_t length) in create_new_memory_mapping() argument 49 memory_mapping->length = length; in create_new_memory_mapping() 59 return phys_addr == map->phys_addr + map->length && in mapping_contiguous() 60 virt_addr == map->virt_addr + map->length; in mapping_contiguous() 69 ram_addr_t length) in mapping_have_same_region() argument 71 return !(phys_addr + length < map->phys_addr || in mapping_have_same_region() 72 phys_addr >= map->phys_addr + map->length); in mapping_have_same_region() 94 ram_addr_t length) in mapping_merge() argument 97 map->length += map->virt_addr - virt_addr; in mapping_merge() 101 if ((virt_addr + length) > in mapping_merge() [all …]
|
| /openbmc/qemu/include/qemu/ |
| H A D | bitops.h | 27 #define MAKE_64BIT_MASK(shift, length) \ argument 28 (((~0ULL) >> (64 - (length))) << (shift)) 515 static inline uint32_t extract32(uint32_t value, int start, int length) in extract32() argument 517 assert(start >= 0 && length > 0 && length <= 32 - start); in extract32() 518 return (value >> start) & (~0U >> (32 - length)); in extract32() 534 static inline uint8_t extract8(uint8_t value, int start, int length) in extract8() argument 536 assert(start >= 0 && length > 0 && length <= 8 - start); in extract8() 537 return extract32(value, start, length); in extract8() 553 static inline uint16_t extract16(uint16_t value, int start, int length) in extract16() argument 555 assert(start >= 0 && length > 0 && length <= 16 - start); in extract16() [all …]
|
| /openbmc/u-boot/lib/ |
| H A D | lz4.c | 110 size_t length; in LZ4_decompress_generic() local 115 if ((length=(token>>ML_BITS)) == RUN_MASK) in LZ4_decompress_generic() 121 length += s; in LZ4_decompress_generic() 124 …if ((safeDecode) && unlikely((size_t)(op+length)<(size_t)(op))) goto _output_error; /* overflow … in LZ4_decompress_generic() 125 …if ((safeDecode) && unlikely((size_t)(ip+length)<(size_t)(ip))) goto _output_error; /* overflow … in LZ4_decompress_generic() 129 cpy = op+length; in LZ4_decompress_generic() 130 …if (((endOnInput) && ((cpy>(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+LASTLITER… in LZ4_decompress_generic() 136 …if ((endOnInput) && (ip+length > iend)) goto _output_error; /* Error : read attempt beyond end o… in LZ4_decompress_generic() 141 …if ((endOnInput) && ((ip+length != iend) || (cpy > oend))) goto _output_error; /* Error : input … in LZ4_decompress_generic() 143 memcpy(op, ip, length); in LZ4_decompress_generic() [all …]
|
| H A D | tpm-common.c | 25 size_t offset = 0, length = 0; in pack_byte_string() local 35 length = 1; in pack_byte_string() 40 length = 2; in pack_byte_string() 45 length = 4; in pack_byte_string() 50 length = va_arg(args, u32); in pack_byte_string() 58 if (offset + length > size) { in pack_byte_string() 74 memcpy(str + offset, data, length); in pack_byte_string() 86 size_t offset = 0, length = 0; in unpack_byte_string() local 97 length = 1; in unpack_byte_string() 102 length = 2; in unpack_byte_string() [all …]
|
| /openbmc/qemu/hw/uefi/ |
| H A D | var-service-vars.c | 270 uint64_t length; in uefi_vars_mm_get_variable() local 272 length = sizeof(*mvar) + sizeof(*va); in uefi_vars_mm_get_variable() 273 if (mhdr->length < length) { in uefi_vars_mm_get_variable() 283 if (uadd64_overflow(length, va->name_size, &length)) { in uefi_vars_mm_get_variable() 286 if (mhdr->length < length) { in uefi_vars_mm_get_variable() 307 if (uadd64_overflow(length, va->data_size, &length)) { in uefi_vars_mm_get_variable() 310 if (uv->buf_size < length) { in uefi_vars_mm_get_variable() 317 length -= va->data_size; in uefi_vars_mm_get_variable() 324 return length; in uefi_vars_mm_get_variable() 334 uint64_t length; in uefi_vars_mm_get_next_variable() local [all …]
|
| /openbmc/phosphor-ipmi-flash/tools/ |
| H A D | io.cpp | 16 bool DevMemDevice::read(const std::size_t offset, const std::size_t length, in read() argument 28 const std::size_t alignedSize = length + alignedDiff; in read() 36 offset, length); in read() 45 std::memcpy(destination, alignedSource, length); in read() 48 sys->munmap(devMemMapped, length); in read() 54 bool DevMemDevice::write(const std::size_t offset, const std::size_t length, in write() argument 67 const std::size_t alignedSize = length + alignedDiff; in write() 76 offset, length); in write() 85 std::memcpy(alignedDestination, source, length); in write() 88 sys->munmap(devMemMapped, length); in write() [all …]
|
| /openbmc/libpldm/src/oem/ibm/ |
| H A D | file_io.c | 11 uint32_t *length, uint64_t *address) in decode_rw_file_memory_req() argument 14 length == NULL || address == NULL) { in decode_rw_file_memory_req() 27 *length = le32toh(request->length); in decode_rw_file_memory_req() 35 uint8_t completion_code, uint32_t length, in encode_rw_file_memory_resp() argument 56 response->length = htole32(length); in encode_rw_file_memory_resp() 65 uint32_t length, uint64_t address, in encode_rw_file_memory_req() argument 86 req->length = htole32(length); in encode_rw_file_memory_req() 94 uint32_t *length) in decode_rw_file_memory_resp() argument 96 if (msg == NULL || length == NULL || completion_code == NULL) { in decode_rw_file_memory_resp() 108 *length = le32toh(response->length); in decode_rw_file_memory_resp() [all …]
|
| /openbmc/qemu/hw/cxl/ |
| H A D | cxl-cdat.c | 18 assert(hdr->length); in cdat_len_check() 23 assert(hdr->length == sizeof(CDATDsmas)); in cdat_len_check() 26 assert(hdr->length == sizeof(CDATDslbis)); in cdat_len_check() 29 assert(hdr->length == sizeof(CDATDsmscis)); in cdat_len_check() 32 assert(hdr->length == sizeof(CDATDsis)); in cdat_len_check() 35 assert(hdr->length == sizeof(CDATDsemts)); in cdat_len_check() 38 assert(hdr->length >= sizeof(CDATSslbisHeader)); in cdat_len_check() 39 assert((hdr->length - sizeof(CDATSslbisHeader)) % in cdat_len_check() 86 cdat_st[ent].length = hdr->length; in ct3_build_cdat() 88 cdat_header->length += hdr->length; in ct3_build_cdat() [all …]
|
| /openbmc/pldm/oem/ibm/libpldmresponder/ |
| H A D | file_io_by_type.cpp | 35 uint32_t& length, uint64_t address) in transferFileData() argument 38 while (length > dma::maxSize) in transferFileData() 47 length -= dma::maxSize; in transferFileData() 51 xdmaInterface.transferDataHost(fd, offset, length, address, upstream); in transferFileData() 55 int FileHandler::transferFileDataToSocket(int32_t fd, uint32_t& length, in transferFileDataToSocket() argument 59 while (length > dma::maxSize) in transferFileDataToSocket() 67 length -= dma::maxSize; in transferFileDataToSocket() 70 auto rc = xdmaInterface.transferHostDataToSocket(fd, length, address); in transferFileDataToSocket() 75 uint32_t offset, uint32_t& length, in transferFileData() argument 96 if (offset + length > fileSize) in transferFileData() [all …]
|
| H A D | file_io.cpp | 50 int DMA::transferHostDataToSocket(int fd, uint32_t length, uint64_t address) in transferHostDataToSocket() argument 53 uint32_t numPages = length / pageSize; in transferHostDataToSocket() 56 if (length > pageAlignedLength) in transferHostDataToSocket() 96 xdmaOp.len = length; in transferHostDataToSocket() 104 "RC", rc, "ADDRESS", address, "LENGTH", length); in transferHostDataToSocket() 109 length); in transferHostDataToSocket() 122 int DMA::transferDataHost(int fd, uint32_t offset, uint32_t length, in transferDataHost() argument 126 uint32_t numPages = length / pageSize; in transferDataHost() 129 if (length > pageAlignedLength) in transferDataHost() 190 rc = read(fd, buffer.data(), length); in transferDataHost() [all …]
|
| H A D | file_io_by_type.hpp | 31 virtual int writeFromMemory(uint32_t offset, uint32_t length, 45 virtual int readIntoMemory(uint32_t offset, uint32_t length, 57 virtual int read(uint32_t offset, uint32_t& length, Response& response, 68 virtual int write(const char* buffer, uint32_t offset, uint32_t& length, 80 virtual int newFileAvailable(uint64_t length) = 0; 90 uint32_t& length, Response& response); 121 uint32_t offset, uint32_t& length, 125 uint32_t& length, uint64_t address); 127 virtual int transferFileDataToSocket(int fd, uint32_t& length, 142 uint64_t length, uint32_t metaDataValue1, uint32_t metaDataValue2,
|
| /openbmc/u-boot/drivers/mtd/nand/raw/ |
| H A D | fsmc_nand.c | 49 {.offset = 15, .length = 3}, 50 {.offset = 31, .length = 3}, 51 {.offset = 47, .length = 3}, 52 {.offset = 63, .length = 3}, 53 {.offset = 79, .length = 3}, 54 {.offset = 95, .length = 3}, 55 {.offset = 111, .length = 3}, 56 {.offset = 127, .length = 1} 85 {.offset = 15, .length = 3}, 86 {.offset = 31, .length = 3}, [all …]
|
| /openbmc/libpldm/include/libpldm/oem/ibm/ |
| H A D | file_io.h | 110 uint32_t length; //!< Number of bytes to be read/write member 121 uint32_t length; //!< Number of bytes read/written member 138 uint32_t *length, uint64_t *address); 153 uint8_t completion_code, uint32_t length, 171 uint32_t length, uint64_t address, 185 uint32_t *length); 288 uint32_t length; //!< Bytes to be read member 297 uint32_t length; //!< Number of bytes read member 308 uint32_t length; //!< Bytes to be written member 318 uint32_t length; //!< Bytes written member [all …]
|
| /openbmc/u-boot/arch/x86/lib/ |
| H A D | acpi_table.c | 40 rsdp->length = sizeof(struct acpi_rsdp); in acpi_write_rsdp() 78 header->length = sizeof(struct acpi_rsdt); in acpi_write_rsdt() 94 header->length = sizeof(struct acpi_xsdt); in acpi_write_xsdt() 137 rsdt->header.length = sizeof(struct acpi_table_header) + in acpi_add_table() 143 rsdt->header.length); in acpi_add_table() 154 xsdt->header.length = sizeof(struct acpi_table_header) + in acpi_add_table() 160 xsdt->header.length); in acpi_add_table() 169 facs->length = sizeof(struct acpi_facs); in acpi_create_facs() 183 lapic->length = sizeof(struct acpi_madt_lapic); in acpi_create_madt_lapic() 188 return lapic->length; in acpi_create_madt_lapic() [all …]
|
| /openbmc/pldm/oem/ibm/test/ |
| H A D | libpldmresponder_fileio_test.cpp | 103 MOCK_METHOD5(transferDataHost, int(int fd, uint32_t offset, uint32_t length, 127 uint32_t length = minSize; in TEST() local 128 EXPECT_CALL(dmaObj, transferDataHost(_, 0, length, 0, true)).Times(1); in TEST() 130 path, 0, length, 0, true, 0); in TEST() 134 &length, sizeof(length))); in TEST() 137 length = maxSize; in TEST() 138 EXPECT_CALL(dmaObj, transferDataHost(_, 0, length, 0, true)).Times(1); in TEST() 140 0, length, 0, true, 0); in TEST() 144 &length, sizeof(length))); in TEST() 147 length = maxSize + minSize; in TEST() [all …]
|
| /openbmc/ipmbbridge/ |
| H A D | ipmbutils.cpp | 27 bool ipmbChecksumValidate(uint8_t* data, uint8_t length) in ipmbChecksumValidate() argument 32 for (uint8_t idx = 0; idx < length; idx++) in ipmbChecksumValidate() 50 uint8_t ipmbChecksumCompute(uint8_t* data, uint8_t length) in ipmbChecksumCompute() argument 55 for (uint8_t idx = 0; idx < length; idx++) in ipmbChecksumCompute() 72 inline bool ipmbDataChecksumValidate(IPMB_HEADER* ipmbHeader, uint8_t length) in ipmbDataChecksumValidate() argument 76 (length - ipmbConnectionHeaderLength)); in ipmbDataChecksumValidate() 79 bool isFrameValid(IPMB_HEADER* frame, uint8_t length) in isFrameValid() argument 89 return ipmbDataChecksumValidate(frame, length); in isFrameValid()
|
| /openbmc/u-boot/fs/jffs2/ |
| H A D | mini_inflate.c | 108 unsigned int length; in decompress_none() local 111 length = *(stream->data++); in decompress_none() 112 length += *(stream->data++) << 8; in decompress_none() 115 stream->decoded += length; in decompress_none() 116 stream->memcpy(dest, stream->data, length); in decompress_none() 117 stream->data += length; in decompress_none() 144 int symbol, length, dist, i; in decompress_huffman() local 154 if (symbol < 265) length = symbol - 254; in decompress_huffman() 155 else if (symbol == 285) length = 258; in decompress_huffman() 157 length = pull_bits(stream, (symbol - 261) >> 2); in decompress_huffman() [all …]
|
| /openbmc/u-boot/drivers/net/fm/ |
| H A D | fdt.c | 23 unsigned int length; in fdt_fixup_fman_firmware() local 47 length = fdt32_to_cpu(hdr->length); in fdt_fixup_fman_firmware() 56 if (length > CONFIG_SYS_QE_FMAN_FW_LENGTH) { in fdt_fixup_fman_firmware() 58 fmanfw, length); in fdt_fixup_fman_firmware() 62 length -= sizeof(u32); /* Subtract the size of the CRC */ in fdt_fixup_fman_firmware() 63 crc = fdt32_to_cpu(*(u32 *)((void *)fmanfw + length)); in fdt_fixup_fman_firmware() 64 if (crc != crc32_no_comp(0, (void *)fmanfw, length)) { in fdt_fixup_fman_firmware() 69 length += sizeof(u32); in fdt_fixup_fman_firmware() 72 rc = fdt_increase_size(blob, length); in fdt_fixup_fman_firmware() 105 rc = fdt_setprop(blob, fwnode, "fsl,firmware", fmanfw, length); in fdt_fixup_fman_firmware()
|
| /openbmc/qemu/hw/char/ |
| H A D | sclpconsole-lm.c | 47 uint32_t length; /* length of byte stream in buffer */ member 90 if (scon->length == SIZE_CONSOLE_BUFFER) { in chr_read() 94 scon->buf[scon->length] = *buf; in chr_read() 95 scon->length += 1; in chr_read() 132 len = cons->length; in get_console_data() 140 cons->length = 0; in get_console_data() 169 oc->message_unit.mdmsu.length = cpu_to_be16(sizeof(struct MDMSU)); in read_event_data() 172 oc->message_unit.cpmsu.length = in read_event_data() 176 oc->message_unit.text_command.length = in read_event_data() 180 oc->message_unit.self_def_text_message.length = in read_event_data() [all …]
|
| /openbmc/qemu/util/ |
| H A D | userfaultfd.c | 158 int uffd_register_memory(int uffd_fd, void *addr, uint64_t length, in uffd_register_memory() argument 164 uffd_register.range.len = length; in uffd_register_memory() 168 trace_uffd_register_memory_failed(addr, length, mode, errno); in uffd_register_memory() 187 int uffd_unregister_memory(int uffd_fd, void *addr, uint64_t length) in uffd_unregister_memory() argument 192 uffd_range.len = length; in uffd_unregister_memory() 195 trace_uffd_unregister_memory_failed(addr, length, errno); in uffd_unregister_memory() 213 int uffd_change_protection(int uffd_fd, void *addr, uint64_t length, in uffd_change_protection() argument 219 uffd_writeprotect.range.len = length; in uffd_change_protection() 229 " mode=%" PRIx64 " errno=%i", addr, length, in uffd_change_protection() 252 uint64_t length, bool dont_wake) in uffd_copy_page() argument [all …]
|
| /openbmc/libpldm/tests/oem/ibm/ |
| H A D | fileio.cpp | 21 uint32_t length = 0x13245768; in TEST() local 25 uint32_t lengthLe = htole32(length); in TEST() 54 ASSERT_EQ(length, retLength); in TEST() 62 uint32_t length = 0; in TEST() local 66 auto rc = decode_rw_file_memory_req(NULL, 0, &fileHandle, &offset, &length, in TEST() 77 &fileHandle, &offset, &length, NULL); in TEST() 81 rc = decode_rw_file_memory_req(request, 0, &fileHandle, &offset, &length, in TEST() 90 uint32_t length = 0xff00ee11; in TEST() local 91 uint32_t lengthLe = htole32(length); in TEST() 97 PLDM_SUCCESS, length, response); in TEST() [all …]
|
| /openbmc/bios-bmc-smm-error-logger/src/ |
| H A D | pci_handler.cpp | 28 const uint32_t length) in read() argument 30 if (offset > regionSize || length == 0) in read() 35 offset, regionSize, length); in read() 41 (offset + length < regionSize) ? length : regionSize - offset; in read() 61 const size_t length = bytes.size(); in write() local 62 if (offset > regionSize || length == 0) in write() 67 offset, regionSize, length); in write() 73 (offset + length < regionSize) ? length : regionSize - offset; in write()
|