  In this paper we use the Morse theory of the Yang-Mills-Higgs functional on
the singular space of Higgs bundles on Riemann surfaces to compute the
equivariant cohomology of the space of semistable U(2,1) and SU(2,1) Higgs
bundles with fixed Toledo invariant. In the non-coprime case this gives new
results about the topology of the U(2,1) and SU(2,1) character varieties of
surface groups. The main results are a calculation of the equivariant Poincare
polynomials, a Kirwan surjectivity theorem in the non-fixed determinant case,
and a description of the action of the Torelli group on the equivariant
cohomology of the character variety. This builds on earlier work for stable
pairs and rank 2 Higgs bundles.
