We present a surface passivation study of a B-diffused emitter and P-diffused back-surface field (BSF) of n-CZ Si substrates. The optimized passivation layers are subsequently incorporated into a 20%-efficient passivated emitter, rear totally-diffused (PERT) cell with V-oc of 672 mV. On the P-diffused, concentrated KOH-planarized BSF side, we compare different passivating plasma enhanced chemical vapor deposition (PECVD) SiNx layer compositions. We demonstrate that a favorable combination of best passivation quality is achieved by a stack of thermal oxide grown at similar to 700 degrees C, followed by a bilayer SiNx, consisting of stoichiometric PECVD nitride and capped with Si-rich nitride, or H-dilution nitride. The stack results in surface passivation quality of J(o) similar to 17 fA/cm(2) for bilayer SiNx and 14 fA/cm(2) for H-SiNx on lightly P-doped BSF, and is very resistive to HF-containing wet etches. Surface preparation, deposition parameters, and post-growth annealing collaborate to define the effectiveness of the passivation. Their optimization is critical for integration of SiNx:H into our high-efficiency solar cells. On the B-diffused textured emitter side, we use atomic layer deposition (ALD)-deposited Al2O3 for surface passivation and low-temperature stoichiometric PECVD SiNx for the anti-reflection coating. We discuss deposition conditions and thermal treatments for both ALD Al2O3 and PECVD nitride that result in the optimized passivation resulting in J(o) similar to 52 fA/cm(2) and that prevent the blistering of the film.