Home
last modified time | relevance | path

Searched full:block (Results 1 – 25 of 2161) sorted by relevance

12345678910>>...87

/Zephyr-latest/tests/subsys/mem_mgmt/mem_attr_heap/src/
Dmain.c22 void *block, *old_block; in ZTEST() local
40 block = mem_attr_heap_alloc(DT_MEM_SW_ALLOC_CACHE, 0x100); in ZTEST()
41 zassert_not_null(block, "Failed to allocate memory"); in ZTEST()
47 region = mem_attr_heap_get_region(block); in ZTEST()
54 block = mem_attr_heap_alloc(DT_MEM_SW_ALLOC_NON_CACHE, 0x100); in ZTEST()
55 zassert_not_null(block, "Failed to allocate memory"); in ZTEST()
61 region = mem_attr_heap_get_region(block); in ZTEST()
68 block = mem_attr_heap_alloc(DT_MEM_SW_ALLOC_DMA, 0x100); in ZTEST()
69 zassert_not_null(block, "Failed to allocate memory"); in ZTEST()
75 region = mem_attr_heap_get_region(block); in ZTEST()
[all …]
/Zephyr-latest/subsys/fs/ext2/
Dext2_diskops.h34 * @brief Fetch block into buffer in the inode structure.
37 * @param block Number of inode block to fetch (0 - first block in that inode)
42 int ext2_fetch_inode_block(struct ext2_inode *inode, uint32_t block);
45 * @brief Fetch block group into buffer in fs structure.
50 * @param group Block group number
58 * @brief Fetch one block of inode table into internal buffer
60 * If the block of inode table was already fetched then this function does nothing and returns
63 * @param bg Block group structure
64 * @param block Number of inode table block to fetch (relative to start of the inode table)
69 int ext2_fetch_bg_itable(struct ext2_bgroup *bg, uint32_t block);
[all …]
Dext2_diskops.c25 static int get_level_offsets(struct ext2_data *fs, uint32_t block, uint32_t offsets[4]);
29 /* Array of zeros to be used in inode block calculation */
242 /* Check if block group is cached */ in ext2_fetch_block_group()
257 uint32_t block = group / groups_per_block; in ext2_fetch_block_group() local
259 uint32_t global_block = fs->sblock.s_first_data_block + 1 + block; in ext2_fetch_block_group()
271 /* Drop unused block */ in ext2_fetch_block_group()
293 int ext2_fetch_bg_itable(struct ext2_bgroup *bg, uint32_t block) in ext2_fetch_bg_itable() argument
295 if (bg->inode_table && bg->inode_table_block == block) { in ext2_fetch_bg_itable()
300 uint32_t global_block = bg->bg_inode_table + block; in ext2_fetch_bg_itable()
308 bg->inode_table_block = block; in ext2_fetch_bg_itable()
[all …]
/Zephyr-latest/tests/bluetooth/mesh/blob_io_flash/src/
Dmain.c23 static size_t chunk_size(const struct bt_mesh_blob_block *block, in chunk_size() argument
26 if ((chunk_idx == block->chunk_count - 1) && in chunk_size()
27 (block->size % CHUNK_SIZE)) { in chunk_size()
28 return block->size % CHUNK_SIZE; in chunk_size()
52 struct bt_mesh_blob_block block = { 0 }; in ZTEST() local
98 block.chunk_count = in ZTEST()
101 block.size = remaining > CONFIG_BT_MESH_BLOB_BLOCK_SIZE_MAX in ZTEST()
106 err = blob_flash_stream.io.block_start(&blob_flash_stream.io, &xfer, &block); in ZTEST()
109 /* `block_start` in write mode will erase flash pages that can fit block. in ZTEST()
110 * Assert that at least block size of data was not erased in read mode in ZTEST()
[all …]
/Zephyr-latest/include/zephyr/sys/
Dmem_blocks.h87 uint8_t blk_sz_shift; /* Bit shift for block size */
97 /* Memory block buffer */
104 /* Spinlock guarding access to memory block internals */
120 * @brief Create a memory block object with a providing backing buffer.
122 * @param name Name of the memory block object.
123 * @param blk_sz Size of each memory block (in bytes, power of 2).
126 * @param mbmod Modifier to the memory block struct
142 * @brief Create a memory block object with a new backing buffer.
144 * @param name Name of the memory block object.
145 * @param blk_sz Size of each memory block (in bytes, power of 2).
[all …]
/Zephyr-latest/include/zephyr/bluetooth/mesh/
Dblob.h46 /** The BLOB Transfer Server is waiting for the next block of data. */
60 /** The Block Number field value is not within the range of blocks being
64 /** The block size is smaller than the size indicated by the Min Block
65 * Size Log state or is larger than the size indicated by the Max Block
97 /** BLOB transfer data block. */
99 /** Block size in bytes */
103 /** Block number */
105 /** Number of chunks in block. */
114 /** Offset of the chunk data from the start of the block. */
130 /* Logarithmic representation of the block size. */
[all …]
/Zephyr-latest/doc/kernel/memory_management/
Dslabs.rst24 * The **block size** of each block, measured in bytes.
31 It must be at least "block size" times "number of blocks" bytes long.
36 the block size must also be a multiple of N.
41 A thread that needs to use a memory block simply allocates it from a memory
42 slab. When the thread finishes with a memory block,
43 it must release the block back to the memory slab so the block can be reused.
48 when a memory block becomes available, it is given to the highest-priority
62 the first 4 bytes of each unused block provide the necessary linkage.
76 .. code-block:: c
89 .. code-block:: c
[all …]
/Zephyr-latest/tests/lib/shared_multi_heap/src/
Dmain.c137 void *block; in ZTEST() local
158 block = shared_multi_heap_alloc(SMH_REG_ATTR_CACHEABLE, 0x40); in ZTEST()
159 reg_map = get_region_map(block); in ZTEST()
161 zassert_equal(reg_map->p_addr, RES0_CACHE_ADDR, "block in the wrong memory region"); in ZTEST()
168 block = shared_multi_heap_alloc(SMH_REG_ATTR_CACHEABLE, 0x80); in ZTEST()
169 reg_map = get_region_map(block); in ZTEST()
171 zassert_equal(reg_map->p_addr, RES0_CACHE_ADDR, "block in the wrong memory region"); in ZTEST()
178 block = shared_multi_heap_alloc(SMH_REG_ATTR_CACHEABLE, 0x1200); in ZTEST()
179 reg_map = get_region_map(block); in ZTEST()
181 zassert_equal(reg_map->p_addr, RES2_CACHE_ADDR, "block in the wrong memory region"); in ZTEST()
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab_api/src/
Dtest_mslab_api.c29 void *block[BLK_NUM]; in tmslab_alloc_free() local
31 (void)memset(block, 0, sizeof(block)); in tmslab_alloc_free()
39 zassert_true(k_mem_slab_alloc(pslab, &block[i], K_NO_WAIT) == 0, in tmslab_alloc_free()
42 * TESTPOINT: The block address area pointed at by @a mem is set in tmslab_alloc_free()
43 * to the starting address of the memory block. in tmslab_alloc_free()
45 zassert_not_null(block[i], NULL); in tmslab_alloc_free()
49 k_mem_slab_free(pslab, block[i]); in tmslab_alloc_free()
56 void *block[BLK_NUM]; in tmslab_alloc_align() local
59 zassert_true(k_mem_slab_alloc(pslab, &block[i], K_NO_WAIT) == 0, in tmslab_alloc_align()
62 * TESTPOINT: To ensure that each memory block is similarly in tmslab_alloc_align()
[all …]
/Zephyr-latest/doc/connectivity/networking/api/
Dzperf.rst20 .. code-block:: console
33 .. code-block:: console
39 .. code-block:: console
46 .. code-block:: console
53 .. code-block:: console
61 .. code-block:: console
68 .. code-block:: console
75 .. code-block:: console
82 .. code-block:: console
90 .. code-block:: console
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab/src/
Dmain.c21 * One should ensure that the block is released to the same memory slab from
61 void *ptr[NUMBLOCKS]; /* Pointer to memory block */ in helper_thread()
80 * Free the first memory block. RegressionTask is currently blocked in helper_thread()
81 * waiting (with a timeout) for a memory block. Freeing the memory in helper_thread()
82 * block will unblock RegressionTask. in helper_thread()
84 TC_PRINT("(4) - Free a block in <%s> to unblock the other task " in helper_thread()
87 TC_PRINT("%s: About to free a memory block\n", __func__); in helper_thread()
93 TC_PRINT("(5) <%s> freeing the next block\n", __func__); in helper_thread()
94 TC_PRINT("%s: About to free another memory block\n", __func__); in helper_thread()
115 * Get all blocks from the memory slab. It also tries to get one more block
[all …]
/Zephyr-latest/tests/net/lib/lwm2m/block_transfer/src/
Dmain.c20 "These tests expect to have block transfer enabled.");
28 "The expected number of output block contexts is wrong.");
127 "Block was not filled as expected"); in ZTEST_F()
135 "Default data buffer should be used for sending the block"); in ZTEST_F()
142 "Block was not filled as expected"); in ZTEST_F()
197 zassert_not_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not yet in use"); in ZTEST_F()
201 zassert_equal(ret, 0, "Could not create first block"); in ZTEST_F()
204 zassert_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not in use"); in ZTEST_F()
207 zassert(ret > 0, "block 1 option not set"); in ZTEST_F()
254 zassert_not_equal(msg->msg_data, msg->cpkt.data, "Buffer for block data is not yet in use"); in ZTEST_F()
[all …]
/Zephyr-latest/dts/bindings/mtd/
Datmel,sam-flash.yaml7 The Atmel SAM flash area varies in write-block-size, memory area,
13 | 8 Kbytes | erase block size = 2048
15 | 8 Kbytes | erase block size = 2048
17 | 48 Kbytes | erase block size = 4096
19 | 64 Kbytes | erase block size = 4096
24 (1024 * 1024 bytes) with a write-block-size of 8 bytes. The first
41 #erase-block-cells = <2>;
46 write-block-size = <8>;
47 erase-block-size = <4096>;
96 write-block-size:
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Dblob.h45 * Used to determine the log2 representation of the block size, which
50 * According to MshMBTv1.0, the block size cannot be larger than 2^20,
59 /* Log2 representation of the minimum block size */
61 /* Log2 representation of the maximum block size */
72 #define BLOB_BLOCK_REPORT_STATUS_MSG_MAXLEN sizeof(((struct bt_mesh_blob_srv *)0)->block.missing)
73 #define BLOB_BLOCK_STATUS_MSG_MAXLEN (5 + sizeof(((struct bt_mesh_blob_srv *)0)->block.missing))
107 static inline void blob_chunk_missing_set_all(struct bt_mesh_blob_block *block) in blob_chunk_missing_set_all() argument
109 size_t bytes = block->chunk_count / 8; in blob_chunk_missing_set_all()
111 memset(block->missing, 0xff, bytes); in blob_chunk_missing_set_all()
112 if (block->chunk_count % 8) { in blob_chunk_missing_set_all()
[all …]
Dblob_io_flash.c61 const struct bt_mesh_blob_block *block) in block_start() argument
81 flash->offset + block->offset, &page); in block_start()
86 erase_size = page.size * DIV_ROUND_UP(block->size, page.size); in block_start()
88 erase_size = block->size; in block_start()
91 return flash_area_flatten(flash->area, flash->offset + block->offset, in block_start()
97 const struct bt_mesh_blob_block *block, in rd_chunk() argument
103 flash->offset + block->offset + chunk->offset, in rd_chunk()
109 const struct bt_mesh_blob_block *block, in wr_chunk() argument
116 flash->offset + block->offset + chunk->offset, in wr_chunk()
121 off_t area_offset = flash->offset + block->offset + chunk->offset; in wr_chunk()
[all …]
/Zephyr-latest/soc/intel/intel_adsp/common/include/
Dintel_adsp_hda.h107 * @param base Base address of the IP register block
108 * @param regblock_size Register block size
132 * @param base Base address of the IP register block
150 * @param base Base address of the IP register block
151 * @param regblock_size Register block size
209 * @param base Base address of the IP register block
210 * @param regblock_size Register block size
225 * @param base Base address of the IP register block
226 * @param regblock_size Register block size
242 * @param base Base address of the IP register block
[all …]
/Zephyr-latest/subsys/fs/
DKconfig.littlefs31 int "Minimum size of a block read"
37 int "Minimum size of a block program"
43 int "Size of block caches in bytes"
46 Each cache buffers a portion of a block in RAM. The littlefs
51 device, and a factor of the block size.
63 int "Number of erase cycles before moving data to another block"
67 is moved to another block. Set to a non-positive value to
98 we need to take into account overhead caused per block allocation.
99 For the purpose of heap size calculation the size of each cache block
116 bool "Support for littlefs on block devices"
[all …]
/Zephyr-latest/include/zephyr/debug/
Dgdbstub.h88 * @brief Check if a memory block can be read.
90 * This checks if the specified memory block can be read.
92 * @param[in] addr Starting address of the memory block
93 * @param[in] len Size of memory block
96 * @return True if memory block can be read, false otherwise.
101 * @brief Check if a memory block can be written into.
103 * This checks if the specified memory block can be written into.
105 * @param[in] addr Starting address of the memory block
106 * @param[in] len Size of memory block
109 * @return True if GDB stub can write to the block, false otherwise.
/Zephyr-latest/include/zephyr/mem_mgmt/
Dmem_attr_heap.h38 * Allocates a block of memory of the specified size in bytes and with a
42 * @param attr capability / attribute requested for the memory block.
53 * Allocates a block of memory of the specified size in bytes and with a
57 * @param attr capability / attribute requested for the memory block.
69 * Used to free the passed block of memory that must be the return value of a
73 * @param block block to free, must be a pointer to a block allocated by
76 void mem_attr_heap_free(void *block);
83 * @param addr address to be found, must be a pointer to a block allocated by
/Zephyr-latest/boards/nxp/mimxrt1062_fmurt6/
DCMakeLists.txt10 # No flash configuration block exists for the RT1060 with HyperFlash in
11 # the SDK, but we can reuse the block for the RT1050 as FMURT6 also uses
19 # Include flash configuration block for RT1050 EVK from NXP's HAL.
20 # This configuration block may need modification if another flash chip is
28 # Include device configuration data block for RT1050 EVK from NXP's HAL.
29 # This configuration block may need modification if another SDRAM chip
/Zephyr-latest/drivers/dma/
Ddma_silabs_ldma.c90 struct dma_block_config *block, LDMA_Descriptor_t *desc) in dma_silabs_block_to_descriptor() argument
94 if (block->dest_scatter_count || block->source_gather_count || in dma_silabs_block_to_descriptor()
95 block->source_gather_interval || block->dest_scatter_interval || in dma_silabs_block_to_descriptor()
96 block->dest_reload_en || block->source_reload_en) { in dma_silabs_block_to_descriptor()
100 if ((block->source_gather_en || block->dest_scatter_en) && config->block_count == 1) { in dma_silabs_block_to_descriptor()
122 if (block->block_size % config->source_data_size) { in dma_silabs_block_to_descriptor()
123 xfer_count = block->block_size / config->source_data_size; in dma_silabs_block_to_descriptor()
125 xfer_count = block->block_size / config->source_data_size - 1; in dma_silabs_block_to_descriptor()
146 * in the list (block for zephyr) in dma_silabs_block_to_descriptor()
150 desc->xfer.ignoreSrec = block->flow_control_mode; in dma_silabs_block_to_descriptor()
[all …]
/Zephyr-latest/samples/shields/npm6001_ek/doc/
Dindex.rst52 .. code-block:: bash
63 .. code-block:: bash
73 .. code-block:: bash
80 .. code-block:: bash
93 .. code-block:: bash
100 .. code-block:: bash
106 .. code-block:: bash
120 .. code-block:: bash
137 .. code-block:: bash
142 .. code-block:: bash
[all …]
/Zephyr-latest/drivers/video/
Dvideo_common.c18 #define VIDEO_COMMON_FREE(block) shared_multi_heap_free(block) argument
23 #define VIDEO_COMMON_FREE(block) k_heap_free(&video_buffer_pool, block) argument
37 struct mem_block *block; in video_buffer_aligned_alloc() local
44 block = &video_block[i]; in video_buffer_aligned_alloc()
54 block->data = VIDEO_COMMON_HEAP_ALLOC(align, size, timeout); in video_buffer_aligned_alloc()
55 if (block->data == NULL) { in video_buffer_aligned_alloc()
59 vbuf->buffer = block->data; in video_buffer_aligned_alloc()
73 struct mem_block *block = NULL; in video_buffer_release() local
76 /* vbuf to block */ in video_buffer_release()
79 block = &video_block[i]; in video_buffer_release()
[all …]
/Zephyr-latest/samples/subsys/shell/fs/
DREADME.rst35 .. code-block:: console
53 .. code-block:: console
101 .. code-block:: console
110 .. code-block:: console
124 .. code-block:: console
130 .. code-block:: console
146 .. code-block:: console
155 .. code-block:: console
164 .. code-block:: console
173 .. code-block:: console
[all …]
/Zephyr-latest/lib/mem_blocks/
Dmem_blocks.c26 /* Find an unallocated block */ in alloc_blocks()
46 /* Calculate the start address of the newly allocated block */ in alloc_blocks()
60 /* Make sure incoming block is within the mem_block buffer */ in free_blocks()
298 int sys_mem_blocks_free_contiguous(sys_mem_blocks_t *mem_block, void *block, size_t count) in sys_mem_blocks_free_contiguous() argument
316 ret = free_blocks(mem_block, block, count); in sys_mem_blocks_free_contiguous()
323 block, count << mem_block->info.blk_sz_shift); in sys_mem_blocks_free_contiguous()
463 struct sys_mem_blocks *block; in sys_mem_blocks_stats_raw() local
466 block = CONTAINER_OF(obj_core, struct sys_mem_blocks, obj_core); in sys_mem_blocks_stats_raw()
468 key = k_spin_lock(&block->lock); in sys_mem_blocks_stats_raw()
470 memcpy(stats, &block->info, sizeof(block->info)); in sys_mem_blocks_stats_raw()
[all …]

12345678910>>...87