If the selector lever will not move from P using the proper shift procedure, continue to hold down the brake pedal.

Take the vehicle to an Authorized Mazda Dealer to have the system checked.
Shift-Lock System
Manual Shift ModeHeadlight Auto Leveling System Initialization
CAUTION:
If the headlight auto leveling initial setting is not stored correctly, the
headlight auto leveling system may not operate normally. To store the initial
setting correctly, perform the initial setting with the vehicle under the following
conditions:
No occupant ...
Generator Removal/Installation [Mzr 2.0, Mzr 2.5]
WARNING:
Remove and install all parts when the engine is cold, otherwise they can
cause severe burns or serious injury.
When the battery cables are connected, touching the vehicle body with generator
terminal B will generate sparks. This can cause personal injury, fire, and ...
Automatic Transaxle Shift Mechanism Removal/Installation
Selector Lever Removal/Installation
1. Remove the battery cover..
2. Disconnect the negative battery cable..
3. Remove in the order indicated in the table.
4. Install in the reverse order of removal.
1
Upper panel
(See UPPER PANEL REMOVAL/INSTALLATION.)
...