Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi.
I'm currently assigned to a project at the University,
where we are teamed up with students from other fields of study.
I have a hard time explaining how code is stored in a microprocessor.

They asked me a question, which I do not know how to answer:

"If a program has been stored in the microprocessor, is it then possible for other firms to take that microprocessor and read the program code in order to make a copy of it?"

Thanks you in advance
Br.
Nikolai
Posted

Depends on the microcontroller, and on how the data has been written to it.

Some have a security bit which when set corrupts some or all of the data when it is transferred out of the device (PIC devices do this -they are called the Code Protection Bits[^]) You explicitly set these bits once you have verified the information in the device against your master file to prevent subsequent access.
Some devices do not have anything like this - the older EPROM based ones in particular are very vulnerable in general.

BNe aware that most of these system can be broken in some way - the info is out there on the net, so this probably shouldnt be your only security mechanism if IP theft is a significant risk with your devices.
 
Share this answer
 
Yes and no. It highly depends on many factors. In principle, in some processors architectures, code can be isolated the way it cannot be read in any other way except actually executing this code, which is, of course, does not fully reveal the content of the code memory.

(Some changes of state of the processor can be done strictly one-way. For example, with Intel x86/I64 architectures, it's possible to protect some memory segment which nothing can ever read, no matter in what protection ring. The segment can only be removed, by re-setting the processor or removing power supply.)

In simple processors, this is not the case. Also, the answer depends on what do you call "stored" and what is "in microprocessor". The code executed in microprocessor is not normally stored on it at all. It is stored in RAM, outside the processor. The exclusion is microcode (please see the reference below). Are your talking about some non-volatile memory? Usually, the RAM information which can be protected the way I explained, is stored only when the power is supplied. Some code can be stored in non-volatile memory which is logically act as RAM (example is BIOS, which has volatile and non-volatile memory, another thing is UEFI, which can be considered as BIOS alternative).

So, non-volatile memory outside processor can be read by at least one simple reason: it does not have to be attached to the CPU at all, at the same time, it is preserved when power is off. However, microcode could be totally protected, as its functionality does not require reading its context at all; its execution is engaged only when processor's instructions are get executed, so the presence of microcode is completely hidden from an outside observer.

Some information, just for general understanding:
http://en.wikipedia.org/wiki/Ring_%28computer_security%29[^],
http://en.wikipedia.org/wiki/RAM[^],
http://en.wikipedia.org/wiki/Non-volatile_memory[^],
http://en.wikipedia.org/wiki/Micro-code[^],
http://en.wikipedia.org/wiki/BIOS[^],
http://en.wikipedia.org/wiki/UEFI[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900