  The impact of surface morphology on electronic structure of topological
crystalline insulators is studied theoretically. As an example, the structure
of topologically protected electronic states on a (001) (Pb,Sn)Se surface with
terraces of atomic height is modeled. Within the envelope function model it is
shown that valley mixing, the phenomenon responsible for the peculiar "double
Dirac cone" shape of the surface state dispersion, depends crucially on the
structure of the surface. By varying the width and the number of atomic layers
in the terraces, a comprehensive explanation of recent experimental findings,
i.e., the emergence of 1D states bound to odd-height atomic step edges as well
as the collapse of "double Dirac cone" structure on a rough surface, is
achieved. This approach allows us also to determine topological indices
characterizing terraces and their interfaces. In the (001) surface of (Pb,Sn)Se
the adjacent terraces turn out to be described by different values of the
winding number topological invariant.
