Books on operating systems usually mentions that the page size is decided by the processor architecture, for example Intel x86 supports 4KB page size. I have a perception that when we were installing an operating system on our hardware, the OS had read the page size of 4KB from hardware and logically divided the virtual address space into 4KB size pages and memory into frames respectively.
If my perception is true, from where or from which location in hardware does the operating system read this value of 4KB from the processor? What mechanism does the OS use to determine the page size provided by hardware? Can anybody enlighten me on this? How (On What Basis) Intel decides to keep 4KB page size.