kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: losemyheaven@qq.com (=?gb18030?B?wuS62w==?=)
To: kernelnewbies@lists.kernelnewbies.org
Subject: A question about kernel real-mode code's LMA & VMA
Date: Sat, 7 May 2016 14:40:27 +0800	[thread overview]
Message-ID: <tencent_5688499A3E55ADF12614066C@qq.com> (raw)

Hi,
   The following is extracted from Documentation/x86/boot.txt,
   which show's memory map when booting a kernel.


117         ~                        ~ 118         |  Protected-mode kernel | 119 100000  +------------------------+ 120         |  I/O memory hole       | 121 0A0000  +------------------------+ 122         |  Reserved for BIOS     |      Leave as much as possible unused 123         ~                        ~ 124         |  Command line          |      (Can also be below the X+10000 mark) 125 X+10000 +------------------------+ 126         |  Stack/heap            |      For use by the kernel real-mode code. 127 X+08000 +------------------------+       128         |  Kernel setup          |      The kernel real-mode code. 129         |  Kernel boot sector    |      The kernel legacy boot sector. 130 X       +------------------------+ 131         |  Boot loader           |      <- Boot sector entry point 0000:7C00 132 001000  +------------------------+ 133         |  Reserved for MBR/BIOS | 134 000800  +------------------------+ 135         |  Typically used by MBR | 136 000600  +------------------------+  137         |  BIOS use only         | 138 000000  +------------------------+where the address X is as low as the design of the boot loader 141 permits.
The address X is not determined by kernel, so the kernel real-mode code's VMA may not equal to LMA, how kernel solved it??


One more question, in ld script, does the location counter ".", represent VMA?? 


Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160507/2f52d155/attachment.html 

                 reply	other threads:[~2016-05-07  6:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_5688499A3E55ADF12614066C@qq.com \
    --to=losemyheaven@qq.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).