First : This Question have a duplicate here :
How does a modern operating system like Windows or Linux know the chipset specific memory map?
But the answer in