There are software limits in the firmware. But you have to enable them.

You are looking for this in your Configuration.h file:

#define min_software_endstops false // If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops false // If true, axis won't move to coordinates greater than the defined lengths below.