"Geophagy is the practice of eating earthy or soil-like substances such as clay, and chalk, in order to obtain essential nutrients such as sulfur and phosphorus from the soil."
http://en.wikipedia.org/wiki/Geophagy
Soil eating is not only done to get missing minerals it is done for several other reasons too...
Alleviating intestinal problems....
http://www.citeulike.org/group/344/article/148481
"Geophageous Rwandan mountain gorillas excavate and eat weathered leucite-rich regolith (subsoil C horizons) from the slopes of Mount Visoke in the Virunga Mountains. In the months of the dry season, the gorillas reportedly ingest a halloysitic natural earth having a chemical composition similar to that of Kaopectate, a pharmaceutical used by humans to treat gastrointestinal upsets. Several plants known to contain potential toxins are consumed more heavily by gorillas in these months. New information from geochemical and mineral analyses suggests that geophagy may alleviate intestinal problems associated with changes in their diet because the ingested weathered regolith, containing halloysitic clay minerals, may act as a pharmaceutical agent that helps to adsorb toxins and to control dehydration in the dry season."
http://www.ncbi.nlm.nih.gov/pubmed/19141837
Geophagy (Soil-eating) in relation to Anemia and Helminth infection among HIV-infected pregnant women in Tanzania.
Improving hindgut bacteria....
http://www.springerlink.com/content/k00u6524m4p35408/
"Summary Hatchling green iguanas (Iguana iguana) spend the first month of life obtaining their hindgut fermentation systems before settling into their characteristic habitat. Newly hatched iguanas consume soil within the nest chamber, establishing populations of soil microbes in the hindgut, before digestive activity begins in the stomach. Hatchlings dig their way out of the nest chamber during the first week after hatching; once on the surface, they may eat both soil and plant materials. The rudimentary microbial fermentation system acquired through soil consumption supports faster growth, and presumably more effective degradation of plant materials, than microbes obtained without contact with soil. During the second and third weeks of life, hatchling iguanas disperse away from the nesting area. They travel into the forest canopy, associate with older consepcifics, and obtain a more complex and effective microbe community by consuming the feces of their seniors. Approximately a month after hatching, iguanas settle into low vegetation in open habitats, and may continue to associate in groups."
Fighting off poisons/toxins....
http://www.livescience.com/animals/080604-bat-dirt.html
"Researchers suspect geophagy could help animals get key minerals they need for nutrition, much as they might from a salt lick. But hitting the dirt might also help them fight off poisons."
http://www.scielo.br/scielo.php?pid=S1676-06032005000300023&script=sci_arttext
"Current theory suggests that Neotropical parrots ingest soil to neutralize toxins in food such as seeds and unripe fruit and as a mineral supplement."
http://news.mongabay.com/2008/0110-chimps.html
Dirt-munching helps protect chimps from malaria
http://www.uic.edu/classes/osci/osci590/8_2DirtasFood.htm
"Feeding selected soils to cows, sheep, goats and pigs results in enhanced growth--by 20% or more."
"People seem to use geophagy to protect themselves against plant toxins."
Soil is not the only thing eaten as a remedy other things are eaten too...unusual (to us, anyway) as remedies...
http://www.ars-grin.gov/duke/syllabus/module8.htm
More sites...
http://cogweb.ucla.edu/Abstracts/Diamond_99.html
http://feralkevin.com/?p=55
"Geophagy is eating of dirt, or clay. It’s practiced by nearly every animal on the planet, and is essential to their health."
One reason not to eat soil...
http://www.ncbi.nlm.nih.gov/pubmed/9692137
"Geophagy was associated with an increased risk of reinfection with A. lumbricoides and possibly with T. trichiura."