rocks in one's head, have - Phrases/Idioms
The American Heritage® Dictionary of Idioms by Christine Ammer. Copyright © 2003, 1997 by The Christine Ammer 1992 Trust. Published by Houghton Mifflin Harcourt Publishing Company. All rights reserved.
Show poor judgment, act stupidly, as in If you think that's an accurate summary, you've got rocks in your head. The rocks in this idiom are a supposed substitute for brains. [Slang; 1940s]