The form of the verb ‘swept’ is in simple past tense so it determines the form of the sentence which is the same.
So, in a passive voice, it will be- The floor was swept by the boy. ( was+ past participle form of sweep which is swept)
THe subject ‘boy’ is now being acted upon.