This paper proposes a novel longitudinal reference trajectory tracking guidance framework for Mars atmospheric entry. Unlike traditional methods that require strict adherence to pre-defined safe trajectories, this guidance framework incorporates path constraints into the closed-loop tracking process to ensure safety. The framework comprises a safety module and a guidance law module. The safety module employs an online path constraints management algorithm that converts real-time path constraints into equivalent control constraints and applies them to the guidance module. The guidance law module uses the anti-saturation generalized super-twisting based sliding mode (ASGSTSM) guidance law, which provides sufficient rapidity and robustness to achieve trajectory tracking while accounting for uncertainties and control saturation. Simulation results demonstrate that the proposed guidance framework effectively ensures compliance of the entry vehicle with path constraints. The ASGSTSM guidance law exhibits notable speed and robustness, making it adaptable within the guidance framework. Particularly, in Monte Carlo simulations introducing significant uncertainty, incorporating the ASGSTSM guidance law within the guidance framework resulted in convergence in all trajectory tracking processes, whereas guidance laws in the control group led to numerous failures. Additionally, the paper offers practical principles for designing guidance laws within this universal framework. This facilitates future research to easily replace the guidance law module based on specific mission requirements.