Google will also get the option to purchase about $12 billion worth of Marvell’s stock.