Plasma generation and confinement in a toroidal magnetic cusp