  For a large class of transitive non-hyperbolic systems, we construct
nonhyperbolic ergodic measures with entropy arbitrarily close to its maximal
possible value. The systems we consider are partially hyperbolic with
one-dimension central direction for which there are positive entropy ergodic
measures whose central Lyapunov exponent is negative, zero, or positive. We
construct ergodic measures with zero central Lyapunov exponent whose entropy is
positive and arbitrarily close to the topological entropy of the set of points
with central Lyapunov exponent zero. This provides a restricted variational
principle for nonhyperbolic (zero exponent) ergodic measures.
  The result is applied to the setting of $\mathrm{SL}(2,\mathbb R)$ matrix
cocycles and provides a counterpart to Furstenberg's classical result: for an
open and dense subset of elliptic $\mathrm{SL}(2,\mathbb R)$ cocycles we
construct ergodic measures with upper Lyapunov exponent zero and with metric
entropy arbitrarily close to the topological entropy of the set of infinite
matrix products with subexponential growth of the norm.
