xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: start of day, special pages
Date: Wed, 30 Oct 2013 21:17:33 +0100	[thread overview]
Message-ID: <5271695D.5030808@gmail.com> (raw)
In-Reply-To: <20131030190308.GA14100@phenom.dumpdata.com>


[-- Attachment #1.1: Type: text/plain, Size: 2501 bytes --]

>> Yes, I understand that but it's not my question. My question is where I
>> should map it to when handing off control to another kernel.
> 
> Oh, I think you just leave it alone.
But it seems that xen does something different and in my own bootstrap
code I have to take special care to move them out of the way and I put
them in the end of mfn list.

> Oh, but you are saying: "> >> Now I'm able to load pvgrub2 from pvgrub2. Now I'm trying to load 
>>>> NetBSD. Apparently NetBSD assumes that console interface is mapping in
>>>> start-of-day layout and I paid special care not to map any special pages
>>>> in start-of-day. Which special pages have to be mapped and where?
> " which means that NetBSD expects something else besides
> this structure?
> 
Yes, looks like it expects, at least that the console page is in mfn
list, no farther than some point, possibly even mapped in default.
It's not even clear to me why you would assume console page to be in mfn
list in the first place.
> It eventually ends up calling xen_bootstrap_tables which does this:
> 
>  if ((xpmap_ptom_masked(page - KERNBASE) >> PAGE_SHIFT)  
>                             == xen_start_info.console.domU.mfn) {               
>                                 xencons_interface = (void *)page;               
>                                 pte[pl1_pi(page)] = xen_start_info.console_mfn; 
>                                 pte[pl1_pi(page)] <<= PAGE_SHIFT;               
>                                 __PRINTK(("xencons_interface "                  
>                                     "va %#lx pte %#" PRIxPADDR "\n",            
>                                     xencons_interface, pte[pl1_pi(page)]));         
>                         }                                                       
> 
> which is to say to make xencons_interface be a pointer to this MFN.
> 
Yes and this if is never triggered.
> Based on that I think it does the mapping as it boots up.
> 
Possibly but looks like console page is not there in the list where
netbsd expects it.
> The initial printks are done using the hypercall_io.
> 
They don't work for me.
> Could it be that the hypercall page is not setup properly?
I set up the hypercall page. I suppose that it's correct but I'm not
100% sure.
> As PVGRUB2
> Is it doing any of the ELF
> parsing to figure out where to start the OS and such?
>
Yes, it does ELF parsing. And it parses __xen_guest/Note phdr as well.



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2013-10-30 20:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 12:32 start of day, special pages Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-30 13:03 ` Konrad Rzeszutek Wilk
2013-10-30 13:11   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-30 19:03     ` Konrad Rzeszutek Wilk
2013-10-30 20:17       ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-10-30 22:12     ` Daniel Kiper
2013-10-31  0:39       ` Vladimir 'φ-coder/phcoder' Serbinenko

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=5271695D.5030808@gmail.com \
    --to=phcoder@gmail.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xen.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).