loss of engine power on 2006 Hummer H2

The car would drive fine until the loss of engine power message would appear and the engine would shake and when you step on the gas pedal nothing would happen. The car would only go no more than 2 mph. After you you turn the engine off and restart again the engine light would be on but the engine seems to be a little weaker. The car only has 20,000 miles on it. No oil leaks no noise. It would drive fine for awhile with no problems.

Asked by for the 2006 Hummer H2
I would take it back to the deal sound like a really bad missfire. Might be a software update also