Taiwan Semiconductor Manufacturing Co. and GlobalFoundries Inc. have finished negotiating binding agreements for billions of dollars in grants and loans to support US factories, people familiar with the matter said, as Biden administration officials race to get Chips and Science Act money out the door.