Every effort is made to keep everything cleanly split into 'Machine Dependent' (MD) and 'Machine Independent' (MI) areas. For example, an Ethernet chipset would have a single MI core hardware driver, which would be matched with appropriate MD bus attachment code for a given platform. Not all drivers are as clean as we would like for historical reasons, but any new driver will be, and old drivers are in the process of being converted across.
As a concrete example, a driver, such as the fxp(4) Intel i82557, i82558, and i82559 Ethernet interface driver, would be used to operate an Intel EtherExpress card in an alpha, arc, cats, cobalt, i386, macppc, or a prep system, all of which have pci slots.
Additionally, the same driver would operate a Cardbus device which used the same chipset. This means that the code is written once, and used many times in many places. If mistakes had been made in the original implementation of the driver, use on such a wide variety of systems would usually bring problems to the surface more quickly. Understanding what makes a PPC different from an i386 leads to well thought out design, and better code.
NetBSD's slogan is "Of course it runs NetBSD", and with good cause. At the time of writing NetBSD provides formal releases for 40 architectures, and has integrated ports for eight others. Those numbers can be deceptive - within one platform (mac68k), there are 93 different machines, of which 89 are currently supported (37 fully).