Lines Matching +full:ipa +full:- +full:shared

1 /* SPDX-License-Identifier: GPL-2.0 */
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2024 Linaro Ltd.
13 struct ipa;
17 * DOC: IPA Local Memory
19 * The IPA has a block of shared memory, divided into regions used for
22 * The regions within the shared block are bounded by an offset (relative to
23 * the "ipa-shared" memory range) and size found in the IPA_SHARED_MEM_SIZE
26 * Each region is optionally preceded by one or more 32-bit "canary" values.
27 * These are meant to detect out-of-range writes (if they become corrupted).
29 * of canaries for all IPA hardware versions. Still, the number used is
34 * - a zero offset and zero size represents and undefined region
35 * - a region's size does not include space for its "canary" values
36 * - a region's offset is defined to be *past* all "canary" values
37 * - offset must be large enough to account for all canaries
38 * - a region's size may be zero, but may still have canaries
39 * - all offsets must be 8-byte aligned
40 * - most sizes must be a multiple of 8
41 * - modem memory size must be a multiple of 4
42 * - the microcontroller ring offset must be a multiple of 1024
48 /* IPA-resident memory region ids */
66 IPA_MEM_PDN_CONFIG, /* 0/2 canaries (IPA v4.0+) */
67 IPA_MEM_STATS_QUOTA_MODEM, /* 2/4 canaries (IPA v4.0+) */
68 IPA_MEM_STATS_QUOTA_AP, /* 0 canaries, optional (IPA v4.0+) */
69 IPA_MEM_STATS_TETHERING, /* 0 canaries, optional (IPA v4.0+) */
70 IPA_MEM_STATS_DROP, /* 0 canaries, optional (IPA v4.0+) */
72 IPA_MEM_STATS_V4_FILTER, /* 0 canaries (IPA v4.0-v4.2) */
73 IPA_MEM_STATS_V6_FILTER, /* 0 canaries (IPA v4.0-v4.2) */
74 IPA_MEM_STATS_V4_ROUTE, /* 0 canaries (IPA v4.0-v4.2) */
75 IPA_MEM_STATS_V6_ROUTE, /* 0 canaries (IPA v4.0-v4.2) */
76 IPA_MEM_AP_V4_FILTER, /* 2 canaries (IPA v5.0) */
77 IPA_MEM_AP_V6_FILTER, /* 0 canaries (IPA v5.0) */
78 IPA_MEM_STATS_FILTER_ROUTE, /* 0 canaries (IPA v4.5+) */
79 IPA_MEM_NAT_TABLE, /* 4 canaries, optional (IPA v4.5+) */
85 * struct ipa_mem - IPA local memory region description
87 * @offset: offset in IPA memory space to base of the region
89 * @canary_count: Number of 32-bit "canary" values that precede region
98 const struct ipa_mem *ipa_mem_find(struct ipa *ipa, enum ipa_mem_id mem_id);
100 int ipa_mem_config(struct ipa *ipa);
101 void ipa_mem_deconfig(struct ipa *ipa);
103 int ipa_mem_setup(struct ipa *ipa); /* No ipa_mem_teardown() needed */
105 int ipa_mem_zero_modem(struct ipa *ipa);
107 int ipa_mem_init(struct ipa *ipa, struct platform_device *pdev,
109 void ipa_mem_exit(struct ipa *ipa);