PM and SM refer to primary master and secondary master. It is odd that your BIOS is intermittantly mis-detecting the drive.
When this problem occurs, does your secondary drive try to take over the PM position, or just disappear ?
Do you have any ATA drives connected ?
I don't know the specific answer in your case, but you could try the following :
1) Change the CMOS battery
2) Re-install / update your motherboard SATA drivers
3) Check for a BIOS update at the mobo manufacturer's website
Hope you find the problem.