1. An integrated circuit comprising: at least one processor core; at least one programmable logic unit; and a Known Good Code (KGC) source configured to supply KGC to the processor core for execution, wherein the KGC is protected from modification in the integrated circuit and is provided from an authenticated entity, and wherein the KGC comprises interface code for the programmable logic unit whereby an application executing on the at least one processor core interfaces to the at least one programmable logic unit through the KGC, and wherein the KGC provides an application programming interface (API) for the application to interact with the at least one programmable logic unit, and wherein the processor core comprises a user state storage including a first plurality of registers and a KGC state storage including a second plurality of registers, wherein the KGC state storage is accessible in the processor core only when the KGC is being executed by the processor core to interface to the programmable logic unit.