Were you thinking 100 MJ perhaps (which seems awfully low). Energy isn't normally measured in tons. But if you were applying e = mc^2, then that would be 8.988e21 MJ [1], which is a considerable amount of energy.
The energy stored in the part of the Earth's magnetic field above the surface is about the same as the yield of a 100 megaton nuclear bomb. This is about 4e17 J, or about 13 gigawatt-years.
Mars is smaller, and so the volume of the magnetic field would be smaller, and a lower field is probably enough. Since stored energy goes as B^2, maybe this energy could be reduced by two orders of magnitude.
The mass required is prodigious, but the energy requirements would be surprisingly small. The magnetic field of Earth above the surface stores about 100 megatons of magnetic energy; on Mars, and if the field were a bit weak, the energy needed would be much less.