Depends on how you handle it. All computers have firmware at their heart. Mostly it handles the way core processes are handled, and allows the operating system to load up.
Setting things up so that the firmware cannot be altered by the OS without outside help is simple (In fact until recently that's how normally is). Setting it up so that the firmware imposes certain limitations on our theoretical AI is less simple, but doable.
Of course with that in mind, if we ever get to the point that the AI can be considered sapient, this would be the digital equivalent of shoving mind control chips into a human's brain. Not exactly an ethical idea, even if there is good reason for it.
Edited: daishain on 24th Mar, 2017 - 6:59pm
Common misconception. Nearly every advanced critter on earth is sentient, which simply refers to the ability to experience sensations.
Partly because the media keeps screwing up the usage of that word, people commonly use the word Sentient in place of Sapient.
Edited: daishain on 24th Mar, 2017 - 7:14pm
I [don't know] about required but it's a possibility. They come out with something new everyday so it wouldn't be too [surprising].