Underground dwarven (and other) civilizations are a staple of fantasy worlds. The obvious question (what do these people eat?) is rarely answered.
As an explanation, I considered a food chain based in some kind of organism that feeds on thermal energy. These organisms would inhabit volcanic regions, exploiting the temperature gradient to free up energy, which could then be used to synthesize complex sugars, much like earth plants. The actual atoms used could be extracted from water and either carbon-rich minerals or air. This 'plant' would probably have thin snaky roots to cover a wider range of temperatures and better extract the required minerals.
Are such organisms at all plausible, biologically? Would they be able to produce enough energy to support at least a small ecosystem? Could they be cultivated on large-scales, assuming that this world has weirdly favorable cave/volcano systems that provide them with a lot of habitat?