| /openbmc/qemu/hw/hyperv/ |
| H A D | hv-balloon-page_range_tree.c | 38 uint64_t start, uint64_t count) in page_range_tree_insert_new() argument 43 assert(count > 0); in page_range_tree_insert_new() 46 range->count = count; in page_range_tree_insert_new() 52 uint64_t start, uint64_t count, in hvb_page_range_tree_insert() argument 60 assert(!SUM_OVERFLOW_U64(start, count)); in hvb_page_range_tree_insert() 61 if (count == 0) { in hvb_page_range_tree_insert() 75 intersection = page_range_intersection_size(range, start, count); in hvb_page_range_tree_insert() 76 joinable = page_range_joinable_right(range, start, count); in hvb_page_range_tree_insert() 88 node = page_range_tree_insert_new(tree, start, count); in hvb_page_range_tree_insert() 101 count += start - range->start; in hvb_page_range_tree_insert() [all …]
|
| H A D | hv-balloon-page_range_tree.h | 17 uint64_t count; member 24 uint64_t endr = range->start + range->count; in page_range_part_before() 29 out->count = end - out->start; in page_range_part_before() 31 out->count = 0; in page_range_part_before() 37 uint64_t start, uint64_t count, in page_range_part_after() argument 40 uint64_t end = range->start + range->count; in page_range_part_after() 41 uint64_t ends = start + count; in page_range_part_after() 45 out->count = end - out->start; in page_range_part_after() 47 out->count = 0; in page_range_part_after() 52 uint64_t start, uint64_t count, in page_range_intersect() argument [all …]
|
| /openbmc/qemu/tests/unit/ |
| H A D | test-fifo.c | 27 uint32_t count; in test_fifo8_pop_bufptr_wrap() local 40 buf = fifo8_pop_bufptr(&fifo, 2, &count); in test_fifo8_pop_bufptr_wrap() 46 g_assert(count == 2); in test_fifo8_pop_bufptr_wrap() 54 buf = fifo8_pop_bufptr(&fifo, 8, &count); in test_fifo8_pop_bufptr_wrap() 60 g_assert(count == 6); in test_fifo8_pop_bufptr_wrap() 73 uint32_t count; in test_fifo8_pop_bufptr() local 86 buf = fifo8_pop_bufptr(&fifo, 2, &count); in test_fifo8_pop_bufptr() 92 g_assert(count == 2); in test_fifo8_pop_bufptr() 105 uint32_t count; in test_fifo8_peek_bufptr_wrap() local 118 buf = fifo8_peek_bufptr(&fifo, 2, &count); in test_fifo8_peek_bufptr_wrap() [all …]
|
| /openbmc/qemu/include/fpu/ |
| H A D | softfloat-macros.h | 128 static inline void shift32RightJamming(uint32_t a, int count, uint32_t *zPtr) in shift32RightJamming() argument 132 if ( count == 0 ) { in shift32RightJamming() 135 else if ( count < 32 ) { in shift32RightJamming() 136 z = ( a>>count ) | ( ( a<<( ( - count ) & 31 ) ) != 0 ); in shift32RightJamming() 154 static inline void shift64RightJamming(uint64_t a, int count, uint64_t *zPtr) in shift64RightJamming() argument 158 if ( count == 0 ) { in shift64RightJamming() 161 else if ( count < 64 ) { in shift64RightJamming() 162 z = ( a>>count ) | ( ( a<<( ( - count ) & 63 ) ) != 0 ); in shift64RightJamming() 190 uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr) in shift64ExtraRightJamming() argument 193 int8_t negCount = ( - count ) & 63; in shift64ExtraRightJamming() [all …]
|
| /openbmc/qemu/util/ |
| H A D | lockcnt.c | 35 lockcnt->count = 0; in qemu_lockcnt_init() 66 *val = qatomic_cmpxchg(&lockcnt->count, expected, new_if_free); in qemu_lockcnt_cmpxchg_or_wait() 86 *val = qatomic_cmpxchg(&lockcnt->count, expected, new); in qemu_lockcnt_cmpxchg_or_wait() 96 qemu_futex_wait(&lockcnt->count, *val); in qemu_lockcnt_cmpxchg_or_wait() 97 *val = qatomic_read(&lockcnt->count); in qemu_lockcnt_cmpxchg_or_wait() 110 qemu_futex_wake_single(&lockcnt->count); in lockcnt_wake() 115 int val = qatomic_read(&lockcnt->count); in qemu_lockcnt_inc() 121 val = qatomic_cmpxchg(&lockcnt->count, val, in qemu_lockcnt_inc() 148 qatomic_sub(&lockcnt->count, QEMU_LOCKCNT_COUNT_STEP); in qemu_lockcnt_dec() 157 int val = qatomic_read(&lockcnt->count); in qemu_lockcnt_dec_and_lock() [all …]
|
| H A D | hbitmap.c | 65 uint64_t count; member 196 int64_t hbitmap_next_dirty(const HBitmap *hb, int64_t start, int64_t count) in hbitmap_next_dirty() argument 202 assert(start >= 0 && count >= 0); in hbitmap_next_dirty() 204 if (start >= hb->orig_size || count == 0) { in hbitmap_next_dirty() 208 end = count > hb->orig_size - start ? hb->orig_size : start + count; in hbitmap_next_dirty() 220 int64_t hbitmap_next_zero(const HBitmap *hb, int64_t start, int64_t count) in hbitmap_next_zero() argument 229 assert(start >= 0 && count >= 0); in hbitmap_next_zero() 231 if (start >= hb->orig_size || count == 0) { in hbitmap_next_zero() 235 end_bit = count > hb->orig_size - start ? in hbitmap_next_zero() 237 ((start + count - 1) >> hb->granularity) + 1; in hbitmap_next_zero() [all …]
|
| H A D | qdist.c | 49 void qdist_add(struct qdist *dist, double x, long count) in qdist_add() argument 61 entry->count += count; in qdist_add() 72 entry->count = count; in qdist_add() 114 if (dist->entries[0].count) { in qdist_pr_internal() 123 min = dist->entries[0].count; in qdist_pr_internal() 128 if (e->count < min) { in qdist_pr_internal() 129 min = e->count; in qdist_pr_internal() 131 if (e->count > max) { in qdist_pr_internal() 132 max = e->count; in qdist_pr_internal() 141 if (e->count) { in qdist_pr_internal() [all …]
|
| /openbmc/u-boot/drivers/misc/ |
| H A D | jz4780_efuse.c | 35 static void jz4780_efuse_read_chunk(size_t addr, size_t count, u8 *buf) in jz4780_efuse_read_chunk() argument 43 ((count - 1) << EFUSE_EFUCTRL_LEN_BIT) | in jz4780_efuse_read_chunk() 53 if ((count % 4) == 0) { in jz4780_efuse_read_chunk() 54 for (i = 0; i < count / 4; i++) { in jz4780_efuse_read_chunk() 60 if (count > 2) in jz4780_efuse_read_chunk() 62 if (count > 1) in jz4780_efuse_read_chunk() 68 static inline int jz4780_efuse_chunk_size(size_t count) in jz4780_efuse_chunk_size() argument 70 if (count >= 32) in jz4780_efuse_chunk_size() 72 else if ((count / 4) > 0) in jz4780_efuse_chunk_size() 73 return (count / 4) * 4; in jz4780_efuse_chunk_size() [all …]
|
| /openbmc/qemu/tests/qtest/ |
| H A D | pnv-xive2-nvpg_bar.c | 39 uint32_t count = 0; in nvpg_backlog_op() local 61 count = qtest_readw(qts, addr + offset); in nvpg_backlog_op() 63 return count; in nvpg_backlog_op() 77 uint32_t count, delta; in test_nvpg_bar() local 108 count = nvpg_backlog_op(qts, READ_x, NVP, nvp_target, i, 0); in test_nvpg_bar() 109 g_assert_cmpuint(count, ==, vp_count[i]); in test_nvpg_bar() 111 count = nvpg_backlog_op(qts, READ_y, NVG, group_target, i, 0); in test_nvpg_bar() 112 g_assert_cmpuint(count, ==, group_count[i]); in test_nvpg_bar() 120 count = nvpg_backlog_op(qts, INCR_LOAD, NVP, nvp_target, vp_priority, 0); in test_nvpg_bar() 121 g_assert_cmpuint(count, ==, vp_count[vp_priority]); in test_nvpg_bar() [all …]
|
| H A D | npcm7xx_timer-test.c | 163 static int64_t tim_calculate_step(uint32_t count, uint32_t prescale) in tim_calculate_step() argument 165 return (1000000000LL / TIM_REF_HZ) * count * (prescale + 1); in tim_calculate_step() 240 unsigned int count = 256; in test_oneshot_ps5() local 245 tim_write_ticr(td, count); in test_oneshot_ps5() 248 g_assert_cmpuint(tim_read_tdr(td), ==, count); in test_oneshot_ps5() 250 clock_step(tim_calculate_step(count, ps) - 1); in test_oneshot_ps5() 253 g_assert_cmpuint(tim_read_tdr(td), <, count); in test_oneshot_ps5() 259 g_assert_cmpuint(tim_read_tdr(td), ==, count); in test_oneshot_ps5() 269 clock_step(2 * tim_calculate_step(count, ps)); in test_oneshot_ps5() 278 unsigned int count = 1; in test_oneshot_ps0() local [all …]
|
| /openbmc/u-boot/lib/ |
| H A D | string.c | 95 char * strncpy(char * dest,const char *src,size_t count) in strncpy() argument 99 while (count-- && (*dest++ = *src++) != '\0') in strncpy() 160 char * strncat(char *dest, const char *src, size_t count) in strncat() argument 164 if (count) { in strncat() 168 if (--count == 0) { in strncat() 205 int strncmp(const char * cs,const char * ct,size_t count) in strncmp() argument 209 while (count) { in strncmp() 212 count--; in strncmp() 280 size_t strnlen(const char * s, size_t count) in strnlen() argument 284 for (sc = s; count-- && *sc != '\0'; ++sc) in strnlen() [all …]
|
| /openbmc/phosphor-fan-presence/monitor/ |
| H A D | power_off_cause.hpp | 37 PowerOffCause(size_t count, const std::string& name) : in PowerOffCause() argument 38 _count(count), _name(std::to_string(count) + " " + name) in PowerOffCause() 100 explicit MissingFanFRUCause(size_t count) : in MissingFanFRUCause() argument 101 PowerOffCause(count, "Missing Fan FRUs") in MissingFanFRUCause() 112 size_t count = std::count_if( in satisfied() local 117 return count >= _count; in satisfied() 143 explicit NonfuncFanRotorCause(size_t count) : in NonfuncFanRotorCause() argument 144 PowerOffCause(count, "Nonfunctional Fan Rotors") in NonfuncFanRotorCause() 155 size_t count = std::accumulate( in satisfied() local 165 return count >= _count; in satisfied() [all …]
|
| /openbmc/openbmc/poky/meta/recipes-devtools/syslinux/syslinux/ |
| H A D | 0001-Add-extra-sector-count-from-section-entry-for-EFI-ca.patch | 4 Subject: [PATCH] Add extra sector count from section entry for EFI catalogue 7 CD-ROM Format Specification [1]. The sector count tooks 2 byte which 8 means max sector count is 0xffff (65535), for 512-byte sector, the 15 This patch extend efi_count, mac_count and count to 4 byte int, if 16 Yocto defines `Selection criteria type = 2', add extra sector count 17 to original sector count as total count; for other situation, still use 18 original sector count as usual 46 -read_efi_catalogue(const uint8_t *buf, uint16_t *count, uint32_t *lba) 47 +read_efi_catalogue(const uint8_t *buf, uint32_t *count, uint32_t *lba) 54 - memcpy(count, buf, 2); [all …]
|
| /openbmc/u-boot/common/ |
| H A D | kgdb.c | 133 mem2hex(char *mem, char *buf, int count) in mem2hex() argument 142 tmp = buf + count; in mem2hex() 145 memcpy(tmp, mem, count); in mem2hex() 147 while (count-- > 0) { in mem2hex() 161 hex2mem(char *buf, char *mem, int count) in hex2mem() argument 170 tmp_raw = buf + count * 2; in hex2mem() 187 memcpy(mem, tmp_raw, count); in hex2mem() 189 kgdb_flush_cache_range((void *)mem, (void *)(mem+count)); in hex2mem() 230 int count; in getpacket() local 247 count = 0; in getpacket() [all …]
|
| H A D | s_record.c | 13 int srec_decode (char *input, int *count, ulong *addr, char *data) in srec_decode() argument 38 if ((*count = hex2_bin(input)) < 0) { in srec_decode() 42 chksum += *count; in srec_decode() 49 *count -= 3; /* - checksum and addr */ in srec_decode() 53 *count -= 3; /* - checksum and addr */ in srec_decode() 57 *count -= 4; /* - checksum and addr */ in srec_decode() 61 *count -= 5; /* - checksum and addr */ in srec_decode() 66 *count = 0; /* no data */ in srec_decode() 71 *count -= 5; /* - checksum and addr */ in srec_decode() 75 *count -= 4; /* - checksum and addr */ in srec_decode() [all …]
|
| /openbmc/openbmc/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/ |
| H A D | rescan-wf-bic | 5 count=0 23 while [ $count -lt 12 ]; do 33 count=$((count + 1)) 36 count=0 37 while [ $count -lt 3 ]; do 52 echo "WF BIC ready (status: $wf_ready), count=$count" 62 echo "WF BIC not ready (status: $wf_ready), count=$count" 63 count=$((count + 1))
|
| /openbmc/qemu/tests/qtest/libqos/ |
| H A D | sdhci-cmd.c | 21 static ssize_t read_fifo(QTestState *qts, uint64_t reg, char *msg, size_t count) in read_fifo() argument 27 while (index < count) { in read_fifo() 28 size = count - index; in read_fifo() 46 size_t count) in write_fifo() argument 52 while (index < count) { in write_fifo() 53 size = count - index; in write_fifo() 67 static void fill_block(QTestState *qts, uint64_t reg, int count) in fill_block() argument 69 while (--count >= 0) { in fill_block() 86 size_t count) in sdhci_read_cmd() argument 88 sdhci_cmd_regs(qts, base_addr, count, 1, 0, in sdhci_read_cmd() [all …]
|
| /openbmc/u-boot/tools/ |
| H A D | file2include.c | 30 size_t count, i, j; in main() local 49 count = ftell(file); in main() 50 if (!count) { in main() 56 buf = malloc(count); in main() 61 count = fread(buf, 1, count, file); in main() 70 printf("#define EFI_ST_DISK_IMG { 0x%08zx, { \\\n", count); in main() 72 for (i = 0; i < count; i += BLOCK_SIZE) { in main() 75 for (j = i; j < i + BLOCK_SIZE && j < count; ++j) { in main() 82 for (j = i; j < i + BLOCK_SIZE && j < count; ++j) in main() 85 for (j = i; j < i + BLOCK_SIZE && j < count; ++j) { in main()
|
| /openbmc/phosphor-gpio-monitor/test/ |
| H A D | utest.cpp | 80 int count = 0; in TEST_F() local 81 while (count < 3) in TEST_F() 85 if (!sd_event_run(eventP.get(), sleepTime.count())) in TEST_F() 87 count++; in TEST_F() 93 EXPECT_EQ(3, count); in TEST_F() 109 int count = 0; in TEST_F() local 110 while (count < 2 && !completed) in TEST_F() 112 if (count == 1) in TEST_F() 120 if (!sd_event_run(eventP.get(), sleepTime.count())) in TEST_F() 122 count++; in TEST_F() [all …]
|
| /openbmc/u-boot/lib/efi_selftest/ |
| H A D | efi_selftest_manageprotocols.c | 48 efi_status_t find_in_buffer(efi_handle_t handle, size_t count, in find_in_buffer() argument 53 for (i = 0; i < count; ++i) { in find_in_buffer() 140 efi_uintn_t count = 0; in execute() local 166 &count, &buffer); in execute() 171 buffer_size = count; in execute() 172 ret = find_in_buffer(handle1, count, buffer); in execute() 177 ret = find_in_buffer(handle2, count, buffer); in execute() 220 count = buffer_size; in execute() 222 &count, &buffer); in execute() 227 if (count != 2) { in execute() [all …]
|
| H A D | efi_selftest_controllers.c | 42 efi_uintn_t *count) in count_child_controllers() argument 48 *count = 0; in count_child_controllers() 58 ++*count; in count_child_controllers() 203 efi_uintn_t count; in stop() local 222 &entry_buffer, &count); in stop() 227 while (count) { in stop() 228 if (entry_buffer[--count].attributes & in stop() 232 entry_buffer[count].agent_handle); in stop() 312 efi_uintn_t count; in execute() local 322 &count); in execute() [all …]
|
| /openbmc/qemu/hw/timer/ |
| H A D | i8254_common.c | 56 out = (d >= s->count); in pit_get_out() 59 if ((d % s->count) == 0 && d != 0) { in pit_get_out() 66 out = (d % s->count) < ((s->count + 1) >> 1); in pit_get_out() 70 out = (d == s->count); in pit_get_out() 88 if (d < s->count) { in pit_get_next_transition_time() 89 next_time = s->count; in pit_get_next_transition_time() 95 base = QEMU_ALIGN_DOWN(d, s->count); in pit_get_next_transition_time() 97 next_time = base + s->count; in pit_get_next_transition_time() 99 next_time = base + s->count + 1; in pit_get_next_transition_time() 103 base = QEMU_ALIGN_DOWN(d, s->count); in pit_get_next_transition_time() [all …]
|
| /openbmc/u-boot/arch/powerpc/lib/ |
| H A D | _ashrdi3.S | 34 srw r4,r4,r5 # LSW = count > 31 ? 0 : LSW >> count 36 slw r6,r3,r6 # t1 = count > 31 ? 0 : MSW << (32-count) 37 rlwinm r8,r7,0,32 # t3 = (count < 32) ? 32 : 0 38 sraw r7,r3,r7 # t2 = MSW >> (count-32) 40 slw r7,r7,r8 # t2 = (count < 32) ? 0 : t2 41 sraw r3,r3,r5 # MSW = MSW >> count
|
| /openbmc/qemu/hw/ppc/ |
| H A D | fdt.c | 21 int i, j, count; in ppc_create_page_sizes_prop() local 30 for (count = 0; count < PPC_PAGE_SIZES_MAX_SZ; count++) { in ppc_create_page_sizes_prop() 31 if (sps->enc[count].page_shift == 0) { in ppc_create_page_sizes_prop() 35 if ((p - prop) >= (maxcells - 3 - count * 2)) { in ppc_create_page_sizes_prop() 40 *(p++) = cpu_to_be32(count); in ppc_create_page_sizes_prop() 41 for (j = 0; j < count; j++) { in ppc_create_page_sizes_prop()
|
| /openbmc/qemu/target/i386/emulate/ |
| H A D | x86_emu.c | 762 uint8_t count; in exec_shl() local 767 count = decode->op[1].val; in exec_shl() 768 count &= 0x1f; /* count is masked to 5 bits*/ in exec_shl() 769 if (!count) { in exec_shl() 777 if (count <= 8) { in exec_shl() 778 res = (decode->op[0].val << count); in exec_shl() 779 cf = (decode->op[0].val >> (8 - count)) & 0x1; in exec_shl() 793 if (count <= 16) { in exec_shl() 794 res = (decode->op[0].val << count); in exec_shl() 795 cf = (decode->op[0].val >> (16 - count)) & 0x1; in exec_shl() [all …]
|