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 ModeHome screen
Icon
Function
Applications
Information such as average fuel economy, maintenance, and warnings can
be verified.
Depending on the grade and specification, the screen display may
differ.
Entertainment
Operates audio such as the radio ...
Neutral Switch Removal/Installation [G35 M R]
1. Remove the battery cover..
2. Disconnect the negative battery cable.
3. Remove the battery component. (ex: battery, battery tray and PCM component)(See
BATTERY REMOVAL/INSTALLATION [MZR 2.0, MZR 2.5].)
4. Remove the aerodynamic under cover No.2..
5. Drain the oil from the transaxle..
...
Trunk Lid Opener Switch Inspection
1. Disconnect the negative battery cable..
2. Remove the trunk lid trim..
3. Remove the high-mount brake light..
4. Remove the trunk lid opener switch..
5. Verify the continuity of trunk lid opener switch terminals A and B.
6. Verify that the continuity is as indicated in the table.
...