Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
How does the Linux knows it's maximal physical address range on x86-64 arch.?

How does the Linux knows it's maximal physical address range, especially when it builds the paging tables hierarchy? How does it know not to map a virtual address to physical address that is beyond the maximum available hardware RAM? Is there are some CPU instruction for this, or it gets the info elsewhere?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

See the related OSDev wiki page:

There are BIOS functions to get the information, for example this one (Quote from OSDev):

By far the best way to detect the memory of a PC is by using the INT 0x15, EAX = 0xE820 command. This function is available on all PCs built since 2002, and on most existing PCs before then. It is the only BIOS function that can detect memory areas above 4G. It is meant to be the ultimate memory detection BIOS function.

Another source of information is the E820 wikipedia page (note the E820 in the quote above!). To my knowledge, detect_memory_e820(), which is located in arch/x86/boot/memory.c for x86 architecture, retrieves the physical memmap from the BIOS.

Also see http://www.uruk.org/orig-grub/mem64mb.html for a detailed description of physical address map-related interrupts.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!