Put lentils, turmeric and 4 cups water into a medium pot and bring to a boil. Reduce heat and simmer until lentils are very soft and pulpy, about 25 minutes. Add salt to lentils after cooking, then purée in blender and set aside. Heat oil in a large skillet over medium heat. Add onions and garlic and cook until golden brown, taking care not to burn them. Add onion mixture to lentils and stir well. Serve hot, with basmati rice on the side.