A hydraulic system (HS) of a rock drilling rig comprising: at least one hydraulic circuit (CL, OL) provided with a hydraulic power unit (Pu) comprising a hydraulic pump (Hp) driven by means of a motor (M); at least one hydraulic drilling actuator (Ha) powered by hydraulic pressure and flow generated by the mentioned hydraulic power unit (Pu); wherein the hydraulic system (HS) is provided with a safety function feature for limiting features of the input hydraulic fluid directed to the mentioned at least one hydraulic drilling actuator (Ha) for temporarily limiting output performance of the hydraulic drilling actuator (Ha); and the hydraulic system (HS) is provided with at least one control unit (CU) comprising at least one restricted operating mode (ROM) serving as the mentioned safety function feature and configured to limit magnitude of output flow of the pumping unit (Pu) whereby motion speed of the hydraulic drilling actuator (Ha) is limited due to received limited magnitude of input flow, characterized in that the hydraulic pump (Hp) is a fixed displacement hydraulic pump driven by means of an electric motor (M); the electric motor (M) is controlled by means of at least one electrical motor control device (Mc); and the control unit (CU) is configured to control the electrical motor control device (Mc) for controlling rotation speed of the electric motor (M) and the hydraulic pump (Hp) ; wherein the motor (M) is a speed controlled electric motor controlled by means of variable frequency drive serving as the electrical motor control device (Mc) the mentioned variable frequency drive comprises an integrated safety function based on hard wired safety circuit; and the limited output flow of the hydraulic fluid is implemented under control of the control unit (CU) in response to the selected restricted operating mode (ROM). at least one hydraulic circuit (CL, OL) provided with a hydraulic power unit (Pu) comprising a hydraulic pump (Hp) driven by means of a motor (M); at least one hydraulic drilling actuator (Ha) powered by hydraulic pressure and flow generated by the mentioned hydraulic power unit (Pu); wherein the hydraulic system (HS) is provided with a safety function feature for limiting features of the input hydraulic fluid directed to the mentioned at least one hydraulic drilling actuator (Ha) for temporarily limiting output performance of the hydraulic drilling actuator (Ha); and the hydraulic system (HS) is provided with at least one control unit (CU) comprising at least one restricted operating mode (ROM) serving as the mentioned safety function feature and configured to limit magnitude of output flow of the pumping unit (Pu) whereby motion speed of the hydraulic drilling actuator (Ha) is limited due to received limited magnitude of input flow, characterized in that the hydraulic pump (Hp) is a fixed displacement hydraulic pump driven by means of an electric motor (M); the electric motor (M) is controlled by means of at least one electrical motor control device (Mc); and the control unit (CU) is configured to control the electrical motor control device (Mc) for controlling rotation speed of the electric motor (M) and the hydraulic pump (Hp) ; wherein the motor (M) is a speed controlled electric motor controlled by means of variable frequency drive serving as the electrical motor control device (Mc) the mentioned variable frequency drive comprises an integrated safety function based on hard wired safety circuit; and the limited output flow of the hydraulic fluid is implemented under control of the control unit (CU) in response to the selected restricted operating mode (ROM). <EOS>