All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Philipson <Ross.Philipson@citrix.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH 03/07] HVM firmware passthrough: hvmloader init module support
Date: Mon, 19 Mar 2012 18:04:07 -0400	[thread overview]
Message-ID: <831D55AF5A11D64C9B4B43F59EEBF720724FB1BAAB@FTLPMAILBOX02.citrite.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

Fetch module set base address from ECX:EDX and call the module
support initialization routine.

Signed-off-by: Ross Philipson <ross.philipson@citrix.com>

[-- Attachment #2: hvm-firmware-passthrough-03.patch --]
[-- Type: application/octet-stream, Size: 1248 bytes --]

# HG changeset patch
# Parent 45d2dcc22c1824d8f1b1a26ac1bf3ea3f7e270b2
Fetch module set base address from ECX:EDX and call the module
support initialization routine.

Signed-off-by: Ross Philipson <ross.philipson@citrix.com>

diff -r 45d2dcc22c18 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c	Mon Mar 19 16:42:36 2012 -0400
+++ b/tools/firmware/hvmloader/hvmloader.c	Mon Mar 19 16:45:12 2012 -0400
@@ -23,6 +23,7 @@
 #include "util.h"
 #include "hypercall.h"
 #include "config.h"
+#include "modules.h"
 #include "pci_regs.h"
 #include "apic_regs.h"
 #include "acpi/acpi2_0.h"
@@ -257,6 +258,17 @@ int main(void)
 {
     const struct bios_config *bios;
     int acpi_enabled;
+    uint32_t mod_lo, mod_hi;
+    uint64_t mod_base;
+
+    /* First get the modules base address passed in ECX:EDC and init
+     * module support.
+     */
+    asm volatile ( "mov %%ecx, %0;" : "=r"(mod_hi));
+    asm volatile ( "mov %%edx, %0;" : "=r"(mod_lo));
+    mod_base = mod_hi;
+    mod_base = (0xFFFFFFFF00000000 & (mod_base << 32)) | mod_lo;
+    init_hvm_modules(mod_base);
 
     /* Initialise hypercall stubs with RET, rendering them no-ops. */
     memset((void *)HYPERCALL_PHYSICAL_ADDRESS, 0xc3 /* RET */, PAGE_SIZE);

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

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

             reply	other threads:[~2012-03-19 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 22:04 Ross Philipson [this message]
2012-04-04  9:30 ` [PATCH 03/07] HVM firmware passthrough: hvmloader init module support Ian Campbell
2012-04-04  9:47   ` Tim Deegan
2012-04-04  9:50     ` Ian Campbell
2012-04-04 19:30       ` Ross Philipson

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=831D55AF5A11D64C9B4B43F59EEBF720724FB1BAAB@FTLPMAILBOX02.citrite.net \
    --to=ross.philipson@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.