Sound Open Firmware
Loading...
Searching...
No Matches
fw_reg.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2021 Intel Corporation. All rights reserved.
4 */
5
6/*
7 * This file contains structures that are exact copies of an existing ABI used
8 * by IOT middleware. They are Intel specific and will be used by one middleware.
9 *
10 * Some of the structures may contain programming implementations that makes them
11 * unsuitable for generic use and general usage.
12 *
13 * This code is mostly copied "as-is" from existing C++ interface files hence the use of
14 * different style in places. The intention is to keep the interface as close as possible to
15 * original so it's easier to track changes with IPC host code.
16 */
17
25#ifndef __IPC4_FW_REG_H__
26#define __IPC4_FW_REG_H__
27
28#include <stdint.h>
29#include <ipc4/error_status.h>
30#include <ipc4/module.h>
31#include <sof/lib/cpu.h>
32
39 uint32_t module : 3;
41} __attribute__((packed, aligned(4)));
42
47typedef uint32_t ipc4_last_error;
48
54 uint32_t curr_astate : 4;
56 uint32_t curr_fstate : 3;
57 uint32_t wake_tick_period : 5;
59 uint32_t rsvd0 : 13;
60} __attribute__((packed, aligned(4)));
61
82} __attribute__((packed, aligned(8)));
83
85#define IPC4_PV_MAX_SUPPORTED_CHANNELS 8
86
96
102 uint32_t llp_l;
103 uint32_t llp_u;
104 uint32_t wclk_l;
105 uint32_t wclk_u;
106} __attribute__((packed, aligned(4)));
107
114 uint32_t tpd_low;
115 uint32_t tpd_high;
116} __attribute__((packed, aligned(4)));
117
123 uint32_t node_id;
125} __attribute__((packed, aligned(4)));
126
132 struct {
133 uint32_t fuse_values: 8;
134 uint32_t load_method: 1;
141 uint32_t reserved : 4;
143 struct {
144 uint32_t rsvd1: 16;
145 uint32_t type: 12;
146 uint32_t rsvd2: 4;
148} __attribute__((packed, aligned(4)));
149
151#define IPC4_MAX_SUPPORTED_ADSP_CORES 8
152
154#define IPC4_MAX_PIPELINE_REG_SLOTS 16
155
157#define IPC4_MAX_PEAK_VOL_REG_SLOTS 16
158
160#define IPC4_MAX_LLP_GPDMA_READING_SLOTS 24
161
163#define IPC4_MAX_LLP_SNDW_READING_SLOTS 16
164
166#define IPC4_FW_REGS_ABI_VER 1
167
189
190#endif
CPU header file.
IPC4 status codes, error codes, and IXC return values.
#define IPC4_MAX_PIPELINE_REG_SLOTS
Number of pipeline register slots in firmware register table.
Definition fw_reg.h:154
#define IPC4_MAX_SUPPORTED_ADSP_CORES
Maximum number of DSP cores supported in firmware register table.
Definition fw_reg.h:151
#define IPC4_PV_MAX_SUPPORTED_CHANNELS
Maximum audio channels supported in PeakVol telemetry registers.
Definition fw_reg.h:85
#define IPC4_MAX_PEAK_VOL_REG_SLOTS
Number of PeakVol register slots in firmware register table.
Definition fw_reg.h:157
#define IPC4_MAX_LLP_SNDW_READING_SLOTS
Number of Aggregated SoundWire reading slots in firmware register table.
Definition fw_reg.h:163
#define IPC4_MAX_LLP_GPDMA_READING_SLOTS
Number of GPDMA LLP reading slots in firmware register table.
Definition fw_reg.h:160
uint32_t ipc4_last_error
Last error code reported by ROM or Base FW.
Definition fw_reg.h:47
IPC4 module instantiation, binding, pin configuration, and parameter definitions.
Firmware power and clock status register (offset 0x8 in Mailbox Window 0).
Definition fw_reg.h:53
uint32_t wake_tick_period
Wake tick period configuration.
Definition fw_reg.h:57
uint32_t cached_imr_usage_status
Cached IMR usage status from previous D0i3.
Definition fw_reg.h:55
uint32_t curr_astate
Currently active A-state index.
Definition fw_reg.h:54
uint32_t curr_fstate
Currently active F-state index.
Definition fw_reg.h:56
uint32_t active_pipelines_count
Number of currently active pipelines.
Definition fw_reg.h:58
uint32_t rsvd0
Reserved padding bits.
Definition fw_reg.h:59
Mailbox Window 0 firmware register layout exposed to host driver.
Definition fw_reg.h:172
uint32_t lnec
Last Native Error Code from external library (at offset 0xC).
Definition fw_reg.h:176
struct ipc4_fw_pwr_status fps
Current DSP power / clock status (at offset 0x8).
Definition fw_reg.h:175
uint32_t abi_ver
Layout version (IPC4_FW_REGS_ABI_VER at offset 0x1C).
Definition fw_reg.h:180
union ipc4_rom_info rom_info
ROM version and load capabilities (at offset 0x18).
Definition fw_reg.h:179
struct ipc4_llp_reading_slot llp_evad_reading_slot
EVAD gateway LLP reading.
Definition fw_reg.h:187
uint8_t slave_core_sts[IPC4_MAX_SUPPORTED_ADSP_CORES]
Status byte per secondary core.
Definition fw_reg.h:181
struct ipc4_pipeline_registers pipeline_regs[IPC4_MAX_PIPELINE_REG_SLOTS]
Pipeline LPIB offsets.
Definition fw_reg.h:183
struct ipc4_fw_status_reg fsr
Current ROM / FW status (at offset 0x0).
Definition fw_reg.h:173
ipc4_last_error lec
Last ROM / FW error code (at offset 0x4).
Definition fw_reg.h:174
uint32_t rsvd0
Reserved padding.
Definition fw_reg.h:178
uint32_t rsvd2[6]
Reserved padding.
Definition fw_reg.h:182
uint32_t ltr
Copy of LTRC hardware register value (at offset 0x10).
Definition fw_reg.h:177
struct ipc4_llp_reading_slot llp_sndw_reading_slots[IPC4_MAX_LLP_SNDW_READING_SLOTS - 1]
SoundWire LLP readings.
Definition fw_reg.h:186
struct ipc4_peak_volume_regs peak_vol_regs[IPC4_MAX_PEAK_VOL_REG_SLOTS]
Peak meter telemetry.
Definition fw_reg.h:184
struct ipc4_llp_reading_slot llp_gpdma_reading_slots[IPC4_MAX_LLP_GPDMA_READING_SLOTS]
GPDMA LLP readings.
Definition fw_reg.h:185
Firmware Status Register (FSR) located at offset 0x0 in Mailbox Window 0.
Definition fw_reg.h:37
uint32_t
Last module ID that updated FSR.
Definition fw_reg.h:39
uint32_t state
Current firmware execution / boot state.
Definition fw_reg.h:38
uint32_t running
DSP core active execution flag (1 = running).
Definition fw_reg.h:40
Extended Link Linear Position reading with total processed data bytes.
Definition fw_reg.h:112
struct ipc4_llp_reading llp_reading
Base LLP and wallclock reading.
Definition fw_reg.h:113
uint32_t tpd_low
Lower 32 bits of total processed data bytes.
Definition fw_reg.h:114
uint32_t tpd_high
Upper 32 bits of total processed data bytes.
Definition fw_reg.h:115
Mailbox Window 0 reading slot for a single gateway.
Definition fw_reg.h:122
struct ipc4_llp_reading reading
Corresponding LLP position reading.
Definition fw_reg.h:124
uint32_t node_id
Audio gateway connector node ID.
Definition fw_reg.h:123
Link Linear Position (LLP) and wallclock snapshot.
Definition fw_reg.h:101
uint32_t wclk_l
Lower 32 bits of 64-bit DSP wallclock.
Definition fw_reg.h:104
uint32_t llp_l
Lower 32 bits of 64-bit Link Linear Position.
Definition fw_reg.h:102
uint32_t wclk_u
Upper 32 bits of 64-bit DSP wallclock.
Definition fw_reg.h:105
uint32_t llp_u
Upper 32 bits of 64-bit Link Linear Position.
Definition fw_reg.h:103
Peak volume and meter registers for low-latency host inspection.
Definition fw_reg.h:91
uint32_t current_volume[IPC4_PV_MAX_SUPPORTED_CHANNELS]
Current attenuated volume levels.
Definition fw_reg.h:93
uint32_t peak_meter[IPC4_PV_MAX_SUPPORTED_CHANNELS]
Real-time per-channel peak meter values.
Definition fw_reg.h:92
uint32_t target_volume[IPC4_PV_MAX_SUPPORTED_CHANNELS]
Target ramping volume levels.
Definition fw_reg.h:94
Pipeline DMA tracking registers in Mailbox Window 0.
Definition fw_reg.h:66
uint64_t stream_end_offset
Stream end offset (LPIB) reported by mixin module allocated on pipeline attached to Host Output Gatew...
Definition fw_reg.h:81
uint64_t stream_start_offset
Stream start offset (LPIB) reported by mixin module allocated on pipeline attached to Host Output Gat...
Definition fw_reg.h:73
ROM build, version, and load capability information.
Definition fw_reg.h:131
uint32_t downlink_IPC_use_DMA
1 if downlink IPC uses DMA buffer.
Definition fw_reg.h:135
uint32_t reserved
Reserved padding bits.
Definition fw_reg.h:141
uint32_t implementation_version_min
Minor implementation version.
Definition fw_reg.h:139
uint32_t type
Platform architecture type identifier.
Definition fw_reg.h:145
uint32_t rsvd1
Reserved bits.
Definition fw_reg.h:144
uint32_t rsvd2
Reserved bits.
Definition fw_reg.h:146
uint32_t fuse_values
Hardware fuse configuration values.
Definition fw_reg.h:133
uint32_t load_method
Image loading method (DMA or memory).
Definition fw_reg.h:134
struct ipc4_rom_info::@13 bits
Bitfield layout.
uint32_t implementation_revision_min
Minor implementation revision.
Definition fw_reg.h:137
uint32_t implementation_revision_maj
Major implementation revision.
Definition fw_reg.h:138
struct ipc4_rom_info::@14 platform
Platform interpretation.
uint32_t load_method_reserved
Reserved load bits.
Definition fw_reg.h:136
uint32_t implementation_version_maj
Major implementation version.
Definition fw_reg.h:140