Based on first-principle total-energy calculations, we investigate the atomic and electronic structure of B-related defects in both strained and nonstrained tridymite- $SiO_2$ and propose a mechanism for dopant segre-gation in the Si/tridymtie- $SiO_2$ interface. We find that a B dopant can exist in stable and meta-stable states in tridymite- $SiO_2$, and the structural stability changes under strain, depending on the charge state of the dopant and its surrounding environment. In addition, we investigate the stability of various boron-related defects near the $Si/SiO_2$ interface. In the presence of abundant Si self-interstitials, a positively charged interstitial boron is found to diffuse into the oxide and become energetically very stable near the interface, while a substitutional B is unlikely to segregate to the interface. This result indicates that the activation of B dopants is suppressed in the Si region after segregation to the oxide region.