Preheat the oven to 400°F.
Rub off the papery outer skin of the garlic. Slice off the upper third of each head, exposing the cloves. Stand the heads on a square piece of aluminum foil and drizzle with olive oil. Wrap the foil around the garlic and bake for 50 to 60 minutes.
Remove the garlic from the foil and cool for 15 minutes. Squeeze out the soft garlic in the cloves into a small bowl and mash well with a fork.
Put the potatoes into a large pot and add enough water to cover by about 2 inches. Bring to a boil, add 2 teaspoons of salt, and cook, uncovered, for 15 to 20 minutes, or until tender but not falling apart. Drain and return the potatoes to the pan. Shake the pan several times, letting the heat of the pan dry up any moisture clinging to the potatoes. Add the half-and-half, butter, mashed garlic, and ½ teaspoon of salt. Using a hand masher or fork, mash the potatoes, leaving them a little lumpy.
Add the sour cream, pepper, to taste, and Parmesan cheese, if desired, and mash to blend.