How do UC's calculate senior year GPA when it comes to rescinding?

I’m currently a high school senior who didn’t do so hot first semester, so i’m worried about getting rescinded if i mess up second semester. Most uc’s (aside from ucla and ucb) say they require a 3.0 minimum GPA, but how is it calculated?

Besides UCLA and UCB, it’s a 3.0 minimum weighted that you need to maintain each semester.

A=4, B=3, C=2, D=1. Add up your scores and divide by the number of classes. Add an extra point to the numerator for each AP class or dual enrollment class.

UCLA and UCB require a 3.0 unweighted GPA with no more than 2 C’s for Senior year.