This relic is a major pain in the ass that can still be found in Pentium 4 PCs today, and is probably here to stay for even longer, for compatibility reasons.
To give you an idea how insane the whole idea is, consider the following:

To control whether or not the CPU should wrap around addresses above 1MB, you had to write something to a port of the keyboard controller, of all things.

You couldn't read back what the current state was. To find out, you wrote something to an address > 1MB and checked if it showed up at the beginning of the memory (in that case the address was wrapped around).