Both AMD and Intel have introduced memory encryption at the hardware level. AMD calls this Secure Memory Encryption (SME), with the Intel version being Total Memory Encryption (TME).
What kind of attacks can this technology protect from, and what can't it protect from? A cursory glance at the technologies indicate it should protect against a cold boot attack.
A few attacks off the top of my head would be Spectre/Meltdown and Rowhammer, but this isn't exhaustive. Another question already asks whether encrypted memory can protect against DMA attacks.