Appendix

Vendor cross-reference

On this page

This page maps the manual’s steps and registers to vendor code, for anyone checking a claim against the vendor image. Addresses are offsets in that image. Names such as mac_irq_handler are annotations from the reverse engineering, not vendor symbols; FUN_ names were never given one.

Start-up

Step Firmware function Vendor routine
Configuration word platform::prepare_main_control 0x0001_64c8
Remap, memory and interrupts platform::prepare_memory_and_interrupts 0x0000_09e0; remap sampling 0x0001_5944
Debug console platform::prepare_high_platform_support 0x0000_0a74, then 0xfff0_19aa
DMA and clocks platform::prepare_dma_and_clocks 0x0000_0bb0, 0x0000_58b6
Wait for the host platform::try_activate_hif 0x0000_0ab4
Timer and AES interrupts platform::register_post_activation_interrupts 0x0000_0c38, 0x0000_0a88; IRQ 21 at 0x0000_0b88
Publish the rings hif::Transport::initialize 0x0000_094c
Packet DMA platform::prepare_packet_dma 0x0000_00f6, with 0x0000_00bc, 0x0000_f608, 0x0000_f4f4, 0x0000_0044
Receive register image platform::prepare_mac_receive_hardware rx_subsystem_init
MAC start-up mac::initialize_startup_state 0x0000_014c, within 0x0001_6d24
Packet controller platform::enable_packet_controller 0x0000_0c80
Startup indication wsm::StartupIndication 0x0001_58a8

The whole sequence is main in src/bin/hif_startup.rs.

Routines and handlers

Subject Vendor routine
MAC event decoding (event word) mac_irq_handler, 0x0000_9eb4
Pipe service (PIPE_SCHEDULER) mac_pipe_irq_service, 0x0000_9b6e–0x0000_9c28
Watchdog pause of COMMAND_FETCH bits 5:2 mac_rx_pause_briefly, 0x0000_030a; the name suggests these bits gate reception
TX ring start-up (Transmit rings) mac_hw_init_pipes
Output descriptor reclaim (Host interface) hif_tx_confirm_drain
AES completion, IRQ 18 and 20 enc_xfer_complete, 0x0000_ea08
IRQ 26, TSF 0x0000_7e3c
IRQ 27, TX error event_send_error_0x34
UART interrupts 0 and 2 0xfff0_19d8, 0xfff0_19e0
Beacon arming and disarming tsf_align_to_beacon_interval, 0x0000_2d38; mac_disable_beacon_hw, 0x0001_0172
BSSID programming mac_program_bssid, 0x0001_0b1a
Command descriptors txp_desc_emit
TSF set-up, 0 then 3 tsf_hw_init
Stopping the PHY’s current operation PHY command 7, pac_phy_stop_op; in this firmware it only resets the PHY operation state
Debug context, base last hif_dbg_ctx_init
Interrupt routing words Instruction stream at 0x0001_64fa

Interrupt routing words

The vendor writes nine words in the PHY window, after subsystem initialization and before it enables interrupts. The firmware does not write them: replaying them changed nothing measurable, and their meaning is unknown. The loader writes two more words in the same window, 0x0abb_0008 = 0x0000_026d and 0x0abb_0078 = 0x0048_0035.

Offset Address Register Type Description
+0x10 0x0abb_0010 ROUTE_10 u32 WO Written 0x000.
+0x14 0x0abb_0014 ROUTE_14 u32 WO Written 0x3fd.
+0x18 0x0abb_0018 ROUTE_18 u32 WO Written 0x3fa.
+0x1c 0x0abb_001c ROUTE_1C u32 WO Written 0x3ff.
+0x20 0x0abb_0020 ROUTE_20 u32 WO Written 0x01b.
+0x24 0x0abb_0024 ROUTE_24 u32 WO Written 0x05b.
+0x28 0x0abb_0028 ROUTE_28 u32 WO Written 0x0b6.
+0x2c 0x0abb_002c ROUTE_2C u32 WO Written 0x10a.
+0x30 0x0abb_0030 ROUTE_30 u32 WO Written 0x12c.

Source: InterruptRouting · 52 bytes

AES transfer classes

The vendor queues AES work through a transfer-class table in DTCM at 0x0400_0804. Classes 6 (flags 0x84) and 7 (flags 0x80) are CCMP encryption and decryption; classes 8 to 10 serve protected management frames and BIP. The vendor completion handler clears the global owner, checks status bit 0 for classes 6 to 9, moves the descriptor to a deferred-completion list, starts the next queued operation and runs callbacks outside interrupt context.

Where the firmware touches each MAC offset

Generated from the constant offsets that functions in src/mac.rs pass to mac_register. An entry records that the function selects the address, not whether it reads or writes it. Computed slot addresses and accesses from other modules are not included.

Show the table
Offset Address Functions in src/mac.rs
+0x003c 0x09c0_003c program_joined_bssid
+0x0040 0x09c0_0040 program_joined_bssid
+0x0044 0x09c0_0044 clear_bssid, program_joined_bssid
+0x0200 0x09c0_0200 prepare_scan_context, program_joined_station_mode, program_scan_station_mode, reprogram_after_channel
+0x0204 0x09c0_0204 program_joined_station_mode, program_scan_station_mode
+0x0210 0x09c0_0210 initialize_startup_state
+0x0270 0x09c0_0270 program_before_scan_channel
+0x0310 0x09c0_0310 program_joined_station_mode, program_scan_station_mode
+0x0314 0x09c0_0314 program_before_scan_channel
+0x0428 0x09c0_0428 program_slot_timings
+0x042c 0x09c0_042c program_slot_timings
+0x0434 0x09c0_0434 program_slot_timings
+0x0438 0x09c0_0438 program_slot_timings
+0x043c 0x09c0_043c program_slot_timings
+0x0440 0x09c0_0440 program_slot_timings
+0x0444 0x09c0_0444 program_slot_timings
+0x0448 0x09c0_0448 program_slot_timings
+0x044c 0x09c0_044c program_slot_timings
+0x0614 0x09c0_0614 program_slot_timings
+0x0618 0x09c0_0618 program_slot_timings
+0x0800 0x09c0_0800 program_before_scan_channel, reprogram_after_channel
+0x0810 0x09c0_0810 program_slot_timings
+0x0a00 0x09c0_0a00 arm_beacon, begin_unjoined_scan_radio_stop, disarm_beacon
+0x0a04 0x09c0_0a04 begin_unjoined_scan_radio_stop, program_joined_station_mode, program_scan_station_mode, set_pipe_enabled
+0x0a08 0x09c0_0a08 configure_response_pipe_slot, program_pipe_slot
+0x0a0c 0x09c0_0a0c configure_response_pipe_slot, program_pipe_slot
+0x0a10 0x09c0_0a10 configure_response_pipe_slot, program_pipe_slot
+0x0a14 0x09c0_0a14 configure_response_pipe_slot
+0x0a18 0x09c0_0a18 configure_response_pipe_slot
+0x0a1c 0x09c0_0a1c program_joined_station_mode, program_scan_station_mode
+0x0a20 0x09c0_0a20 initialize_startup_state
+0x0a28 0x09c0_0a28 begin_unjoined_scan_radio_stop
+0x0c00 0x09c0_0c00 initialize_startup_state
+0x0e08 0x09c0_0e08 arm_beacon, disarm_beacon
+0x0e30 0x09c0_0e30 program_slot_timings
+0x0e38 0x09c0_0e38 tsf
+0x0e3c 0x09c0_0e3c tsf
+0x0e58 0x09c0_0e58 program_slot_timings
+0x0e5c 0x09c0_0e5c program_slot_timings
+0x0e60 0x09c0_0e60 rebuild_pipe_state
+0x0e80 0x09c0_0e80 rebuild_pipe_state
+0x0e88 0x09c0_0e88 rebuild_pipe_state
+0x0e8c 0x09c0_0e8c pause_receive_briefly, rebuild_pipe_state
+0x0e94 0x09c0_0e94 start_beaconing
+0x1400 0x09c0_1400 save_register_context
+0x1404 0x09c0_1404 save_register_context
+0x1408 0x09c0_1408 save_register_context
+0x140c 0x09c0_140c save_register_context
+0x1410 0x09c0_1410 save_register_context