Why is the x86 CR1 control register reserved?

Viewed 1136

Starting with the i386 CPU, Intel processors have exposed control registers to allow the kernel to configure the processor and specify characteristics of the currently executing task/process/thread. According to the Intel Systems Programming Manual (section 2-13), the CR1 control register is "Reserved". That is, the kernel manipulating control register CR1 results in undefined behavior. As the articles indicates, there are also CR2, CR3, CR4 and CR8 control registers, though they are not reserved.

Why is CR1 reserved? It is strange that Intel would introduce a reserved control register, and then start adding non-reserved control registers thereafter rather than simply adding functionality to CR1 as doing so would not cause any backwards compatibility breaks (that's the whole point of keeping it reserved). http://www.pagetable.com/?p=364 speculates that CR1 was kept reserved to have a second register available for architectural configuration, but as the article mentions, CR4 was used instead when the i486 was introduced.

1 Answers

The Intel® 64 and IA-32 Architectures Software Developer’s Manual says CR1 — Reserved. So CR1 is unused and reserved to Intel + AMD for future use. Since it is reserved, accessing CR1 throws an exception:

Attempts to reference CR1, CR5, CR6, CR7, and CR9–CR15 result in undefined opcode (#UD) exceptions.

Why they haven't used CR1 when they have used CR2 is anyone's guess. X86 is irregular and indeed, Intel hasn't said anything. This article Why is there no CR1 – and why are control registers such a mess anyway? has some history but really unless Intel says something official, and they haven't, there is no answer.

Related