We extend the SM5 solvation model for calculating solvation free energies of a variety of organic solutes in both aqueous and organic solvents so that it can be employed in conjunction with high-level electronic structure calculations. The extension is illustrated by presenting three implementations based on density-functional theory (DFT). The three implementations are called SM5.42R/BPW91/MIDI!6D, SM5.42R/BPW91/DZVP, and SM5.42R/BPW91/6-31G*. They have the following features: (1) They utilize gradient-corrected DFT with polarized double zeta basis sets to describe the electronic structure of a solute. The particular exchange-correlation functional adopted is Becke's exchange with the Perdew-Wang 1991 correlation functional, usually called BPW91. The MIDI!6D, DZVP, and 6-31G* basis sets are used. (2) They employ fixed solute geometries in solvation calculations. The model is designed to predict solvation free energies based on any reasonably accurate gas-phase solute geometry. (3) The electric polarization in the solute-solvent system is described by the generalized Born approximation with self-consistent reaction-field solute partial atomic charges obtained from the CM2 class IV charge model. (4) The solvation effects within the first solvation shell are included in the form of SM5-type atomic surface tensions. Both DFT parameterizations are developed using 275 neutral solutes and 49 ions with gas-phase Hartree-Fock/MIDI! geometries. These solutes contain a wide variety of organic functional groups which include H, C, N, O, F, P, S, Cl, Br, and I atoms. For 2135 free energies of solvation of the neutral molecules in water and 90 organic solvents, SM5.42R/BPW91/MIDI!6D, SM5.42R/BPW91/DZVP, and SM5.42R/BPW91/6-31G* yield mean unsigned errors in solvation free energies of 0.45 kcal/mol, 0.44 kcal/mol, and 0.43 kcal/mol, respectively. For 49 ions in water, SM5.42R/BPW91/MIDI!6D produces a mean unsigned error of 3.9 kcal/mol, while SM5.42R/BPW91/DZVP and SM5.42R/BPW91/6-31G* give 3.6 kcal/mol and 3.9 kcal/mol, respectively.