1 Kings 2:8-9
8-9"You also will have to deal with Shimei son of Gera the Benjaminite from Bahurim, the one who cursed me so viciously when I was on my way to Mahanaim. Later, when he welcomed me back at the Jordan, I promised him under God, 'I won't put you to death.' But neither should you treat him as if nothing ever happened. You're wise, you know how to handle these things. You'll know what to do to make him pay before he dies."
10-12Then David joined his ancestors. He was buried in the City of David. David ruled Israel for forty years—seven years in Hebron and another thirty-three in Jerusalem. Solomon took over on the throne of his father David; he had a firm grip on the kingdom.