  Context. The different theoretical models concerning the formation of
high-mass stars make distinct predictions regarding their progenitors, i.e. the
high-mass prestellar cores. However, so far no conclusive observation of such
objects has been made.
  Aims. We aim to study the very early stages of high-mass star formation in
two infrared-dark, massive clumps, to identify the core population that they
harbour.
  Methods. We obtained ALMA observations of continuum emission at 0.8mm and of
the ortho-$\rm H_2D^+$ transition at 372GHz towards the two clumps. We use the
SCIMES algorithm to identify cores in the position-position-velocity space,
finding 16 cores. We model their observed spectra in the LTE approximation,
deriving the centroid velocity, linewidth, and column density maps. We also
study the correlation between the continuum and molecular data, which in
general do not present the same structure.
  Results. We report for the first time the detection of ortho-$\rm H_2D^+$ in
high-mass star-forming regions performed with an interferometer. The molecular
emission shows narrow and subsonic lines, suggesting that locally the
temperature of the gas is less than 10K. From the continuum emission we
estimate the cores' total masses, and compare them with the respective virial
masses. We also compute the volume density values, which are found to be higher
than $10^{6}\, \rm cm^{-3}$.
  Conclusions. Our data confirm that ortho-$\rm H_2D^+$ is an ideal tracer of
cold and dense gas. Interestingly, almost all the $\rm H_2D^+$-identified cores
are less massive than 13M_sun , with the exception of one core in AG354.
Furthermore, most of them are subvirial and larger than their Jeans masses.
These results are difficult to explain in the context of the turbulent
accretion models, which predict massive and virialised prestellar cores.
