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 ModeElectric Power Steering Oil Pump Component Disassembly/Assembly
CAUTION:
The internal parts of the EHPAS control module and motor could be damaged
if they receive an impact. Be careful when handling the EHPAS control module
and motor to prevent the component from getting hit. Replace the electric power
steering oil pump component if it has recei ...
Manual Transaxle Shift Mechanism Removal/Installation [A26 M R]
1. Remove the battery cover..
2. Disconnect the negative battery cable.
3. Remove the battery and battery tray..
4. Remove the air cleaner and air inlet hose..
5. Remove the aerodynamic under cover NO.2..
6. Remove the tunnel member (rear)..
7. Remove the upper panel..
8. Remove the sh ...
EGR Valve Inspection [Mzr 2.0, Mzr 2.5]
Resistance Inspection
1. Remove the battery cover..
2. Disconnect the negative battery cable..
3. Disconnect the EGR valve connector.
4. Measure the resistance between the EGR valve terminals.
EGR valve terminal
Resistance inspection (ohm)
...