All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
@ 2011-07-23 19:02 Bei Guan
  2011-07-25 13:23 ` Keir Fraser
  0 siblings, 1 reply; 10+ messages in thread
From: Bei Guan @ 2011-07-23 19:02 UTC (permalink / raw)
  To: Keir Fraser
  Cc: Jordan Justen, Xen Devel, Keir Fraser, Tim Deegan, Andrei Warkentin


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

Hi,

These set of patches are affected by replacing bios_relocate hook with
bios_load hook in hvmloader. The patches for code files config.h and
hvmloader.c also contains part of the contents of Enabling UEFI BIOS(OVMF)
support in Xen-unstable HVM. Is there any problem with these patches? Thank
you very much.



# HG changeset patch
# User gbtju85@gmail.com
#

Replace bios_relocate hook with bios_load hook in hvmloader.
This patch also contains part of the contents of Enabling UEFI BIOS(OVMF)
support in Xen-unstable HVM

Sign-off-by: Bei Guan <gbtju85@gmail.com>

diff -r 42edf1481c57 tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Fri Jul 22 08:55:19 2011 +0100
+++ b/tools/firmware/hvmloader/config.h Sun Jul 24 02:22:42 2011 +0800
@@ -3,7 +3,7 @@

 #include <stdint.h>

-enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
+enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt, VGA_custom };
 extern enum virtual_vga virtual_vga;

 struct bios_config {
@@ -16,6 +16,9 @@
     /* Physical address to load at */
     unsigned int bios_address;

+    /* Custom load function. */
+    void (*load)(const struct bios_config *config);
+
     /* ROMS */
     int load_roms;
     unsigned int optionrom_start, optionrom_end;
@@ -23,8 +26,6 @@
     void (*bios_info_setup)(void);
     void (*bios_info_finish)(void);

-    void (*bios_relocate)(void);
-
     void (*vm86_setup)(void);
     void (*e820_setup)(void);

@@ -36,6 +37,8 @@

 extern struct bios_config rombios_config;
 extern struct bios_config seabios_config;
+extern struct bios_config ovmf32_config;
+extern struct bios_config ovmf64_config;

 #define PAGE_SHIFT 12
 #define PAGE_SIZE  (1ul << PAGE_SHIFT)
diff -r 42edf1481c57 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c Fri Jul 22 08:55:19 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c Sun Jul 24 02:22:42 2011 +0800
@@ -360,6 +360,8 @@
 #ifdef ENABLE_SEABIOS
     { "seabios", &seabios_config, },
 #endif
+    { "ovmf-ia32", &ovmf32_config, },
+    { "ovmf-x64", &ovmf64_config, },
     { NULL, NULL }
 };

@@ -416,12 +418,13 @@
         bios->create_smbios_tables();
     }

-    printf("Loading %s ...\n", bios->name);
-    memcpy((void *)bios->bios_address, bios->image,
-           bios->image_size);
-
-    if (bios->bios_relocate)
-        bios->bios_relocate();
+    if (bios->load) {
+        bios->load(bios);
+    } else {
+        printf("Loading %s ...\n", bios->name);
+        memcpy((void *)bios->bios_address, bios->image,
+               bios->image_size);
+    }

     if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode ) {
         if ( bios->create_mp_tables )
@@ -451,6 +454,8 @@
             vgabios_sz = round_option_rom(
                 (*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);
             break;
+        case VGA_custom:
+            break;
         default:
             printf("No emulated VGA adaptor ...\n");
             break;
diff -r 42edf1481c57 tools/firmware/hvmloader/rombios.c
--- a/tools/firmware/hvmloader/rombios.c Fri Jul 22 08:55:19 2011 +0100
+++ b/tools/firmware/hvmloader/rombios.c Sun Jul 24 02:22:42 2011 +0800
@@ -81,11 +81,15 @@
     memset(info, 0, sizeof(*info));
 }

-static void rombios_relocate(void)
+static void rombios_load(const struct bios_config *config)
 {
     uint32_t bioshigh;
     struct rombios_info *info;

+    printf("Loading %s ...\n", config->name);
+    memcpy((void *)config->bios_address, config->image,
+           config->image_size);
+
     bioshigh = rombios_highbios_setup();

     info = (struct rombios_info *)BIOS_INFO_PHYSICAL_ADDRESS;
@@ -163,6 +167,7 @@
     .image_size = sizeof(rombios),

     .bios_address = ROMBIOS_PHYSICAL_ADDRESS,
+    .load = rombios_load,

     .load_roms = 1,

@@ -172,8 +177,6 @@
     .bios_info_setup = rombios_setup_bios_info,
     .bios_info_finish = NULL,

-    .bios_relocate = rombios_relocate,
-
     .vm86_setup = rombios_init_vm86_tss,
     .e820_setup = rombios_setup_e820,

diff -r 42edf1481c57 tools/firmware/hvmloader/seabios.c
--- a/tools/firmware/hvmloader/seabios.c Fri Jul 22 08:55:19 2011 +0100
+++ b/tools/firmware/hvmloader/seabios.c Sun Jul 24 02:22:42 2011 +0800
@@ -132,6 +132,7 @@
     .image_size = sizeof(seabios),

     .bios_address = SEABIOS_PHYSICAL_ADDRESS,
+    .load = NULL,

     .load_roms = 0,

@@ -141,8 +142,6 @@
     .bios_info_setup = seabios_setup_bios_info,
     .bios_info_finish = seabios_finish_bios_info,

-    .bios_relocate = NULL,
-
     .vm86_setup = NULL,
     .e820_setup = seabios_setup_e820,





Best Regards,
Bei Guan




2011/7/24 Keir Fraser <keir.xen@gmail.com>

> On 23/07/2011 16:18, "Bei Guan" <gbtju85@gmail.com> wrote:
>
> > Do you mean that put the bios_relocate hook in the "else" statement? Just
> like
> > this:
> >
> >     if (bios->load) {
> >         bios->load(bios);
> >     } else {
> >         printf("Loading %s ...\n", bios->name);
> >         memcpy((void *)bios->bios_address, bios->image,
> >                bios->image_size);
> >
> >         if (bios->bios_relocate)
> >             bios->bios_relocate();
> >    }
>
> No I mean remove the bios_relocate hook entirely, and modify the rombios
> handler to use your new hook instead. It should be quite easy.
>
>  -- Keir
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 8259 bytes --]

[-- Attachment #2: bios_load_config.patch --]
[-- Type: text/x-patch, Size: 1403 bytes --]

# HG changeset patch
# User gbtju85@gmail.com
#

Replace bios_relocate hook with bios_load hook in hvmloader.
This patch also contains part of the contents of Enabling UEFI BIOS(OVMF) support in Xen-unstable HVM

Sign-off-by: Bei Guan <gbtju85@gmail.com>

diff -r 42edf1481c57 tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h	Fri Jul 22 08:55:19 2011 +0100
+++ b/tools/firmware/hvmloader/config.h	Sun Jul 24 02:22:42 2011 +0800
@@ -3,7 +3,7 @@
 
 #include <stdint.h>
 
-enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
+enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt, VGA_custom };
 extern enum virtual_vga virtual_vga;
 
 struct bios_config {
@@ -16,6 +16,9 @@
     /* Physical address to load at */
     unsigned int bios_address;
 
+    /* Custom load function. */
+    void (*load)(const struct bios_config *config);
+
     /* ROMS */
     int load_roms;
     unsigned int optionrom_start, optionrom_end;
@@ -23,8 +26,6 @@
     void (*bios_info_setup)(void);
     void (*bios_info_finish)(void);
 
-    void (*bios_relocate)(void);
-
     void (*vm86_setup)(void);
     void (*e820_setup)(void);
 
@@ -36,6 +37,8 @@
 
 extern struct bios_config rombios_config;
 extern struct bios_config seabios_config;
+extern struct bios_config ovmf32_config;
+extern struct bios_config ovmf64_config;
 
 #define PAGE_SHIFT 12
 #define PAGE_SIZE  (1ul << PAGE_SHIFT)

[-- Attachment #3: bios_load_hvmloader.patch --]
[-- Type: text/x-patch, Size: 1522 bytes --]

# HG changeset patch
# User gbtju85@gmail.com
#

Replace bios_relocate hook with bios_load hook in hvmloader.
This patch also contains part of the contents of Enabling UEFI BIOS(OVMF) support in Xen-unstable HVM

Sign-off-by: Bei Guan <gbtju85@gmail.com>

diff -r 42edf1481c57 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c	Fri Jul 22 08:55:19 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c	Sun Jul 24 02:22:42 2011 +0800
@@ -360,6 +360,8 @@
 #ifdef ENABLE_SEABIOS
     { "seabios", &seabios_config, },
 #endif
+    { "ovmf-ia32", &ovmf32_config, },
+    { "ovmf-x64", &ovmf64_config, },
     { NULL, NULL }
 };
 
@@ -416,12 +418,13 @@
         bios->create_smbios_tables();
     }
 
-    printf("Loading %s ...\n", bios->name);
-    memcpy((void *)bios->bios_address, bios->image,
-           bios->image_size);
-
-    if (bios->bios_relocate)
-        bios->bios_relocate();
+    if (bios->load) {
+        bios->load(bios);
+    } else {
+        printf("Loading %s ...\n", bios->name);
+        memcpy((void *)bios->bios_address, bios->image,
+               bios->image_size);
+    }
 
     if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode ) {
         if ( bios->create_mp_tables )
@@ -451,6 +454,8 @@
             vgabios_sz = round_option_rom(
                 (*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);
             break;
+        case VGA_custom:
+            break;
         default:
             printf("No emulated VGA adaptor ...\n");
             break;

[-- Attachment #4: bios_load_rombios.patch --]
[-- Type: text/x-patch, Size: 1203 bytes --]

# HG changeset patch
# User gbtju85@gmail.com
#

Replace bios_relocate hook with bios_load hook in hvmloader.

Sign-off-by: Bei Guan <gbtju85@gmail.com>

diff -r 42edf1481c57 tools/firmware/hvmloader/rombios.c
--- a/tools/firmware/hvmloader/rombios.c	Fri Jul 22 08:55:19 2011 +0100
+++ b/tools/firmware/hvmloader/rombios.c	Sun Jul 24 02:22:42 2011 +0800
@@ -81,11 +81,15 @@
     memset(info, 0, sizeof(*info));
 }
 
-static void rombios_relocate(void)
+static void rombios_load(const struct bios_config *config)
 {
     uint32_t bioshigh;
     struct rombios_info *info;
 
+    printf("Loading %s ...\n", config->name);
+    memcpy((void *)config->bios_address, config->image,
+           config->image_size);
+
     bioshigh = rombios_highbios_setup();
 
     info = (struct rombios_info *)BIOS_INFO_PHYSICAL_ADDRESS;
@@ -163,6 +167,7 @@
     .image_size = sizeof(rombios),
 
     .bios_address = ROMBIOS_PHYSICAL_ADDRESS,
+    .load = rombios_load,
 
     .load_roms = 1,
 
@@ -172,8 +177,6 @@
     .bios_info_setup = rombios_setup_bios_info,
     .bios_info_finish = NULL,
 
-    .bios_relocate = rombios_relocate,
-
     .vm86_setup = rombios_init_vm86_tss,
     .e820_setup = rombios_setup_e820,
 

[-- Attachment #5: bios_load_seabios.patch --]
[-- Type: text/x-patch, Size: 721 bytes --]

# HG changeset patch
# User gbtju85@gmail.com
#

Replace bios_relocate hook with bios_load hook in hvmloader.

Sign-off-by: Bei Guan <gbtju85@gmail.com>

diff -r 42edf1481c57 tools/firmware/hvmloader/seabios.c
--- a/tools/firmware/hvmloader/seabios.c	Fri Jul 22 08:55:19 2011 +0100
+++ b/tools/firmware/hvmloader/seabios.c	Sun Jul 24 02:22:42 2011 +0800
@@ -132,6 +132,7 @@
     .image_size = sizeof(seabios),
 
     .bios_address = SEABIOS_PHYSICAL_ADDRESS,
+    .load = NULL,
 
     .load_roms = 0,
 
@@ -141,8 +142,6 @@
     .bios_info_setup = seabios_setup_bios_info,
     .bios_info_finish = seabios_finish_bios_info,
 
-    .bios_relocate = NULL,
-
     .vm86_setup = NULL,
     .e820_setup = seabios_setup_e820,
 

[-- Attachment #6: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-23 19:02 [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader Bei Guan
@ 2011-07-25 13:23 ` Keir Fraser
  2011-07-26 13:29   ` Andrei Warkentin
  2011-07-27  2:02   ` Bei Guan
  0 siblings, 2 replies; 10+ messages in thread
From: Keir Fraser @ 2011-07-25 13:23 UTC (permalink / raw)
  To: Bei Guan; +Cc: Xen Devel, Jordan Justen, Tim Deegan, Andrei Warkentin

On 23/07/2011 20:02, "Bei Guan" <gbtju85@gmail.com> wrote:

> Hi,
> 
> These set of patches are affected by replacing bios_relocate hook with
> bios_load hook in hvmloader. The patches for code files config.h and
> hvmloader.c also contains part of the contents of Enabling UEFI BIOS(OVMF)
> support in Xen-unstable HVM. Is there any problem with these patches? Thank
> you very much.

As of xen-unstable:23745 I've made some improvements to hvmloader which
include your new bios_load hook. You can rebase your remaining patches on
top of that.

 -- Keir

> 
> 
> # HG changeset patch
> # User gbtju85@gmail.com
> #
> 
> Replace bios_relocate hook with bios_load hook in hvmloader.
> This patch also contains part of the contents of Enabling UEFI BIOS(OVMF)
> support in Xen-unstable HVM
> 
> Sign-off-by: Bei Guan <gbtju85@gmail.com>
> 
> diff -r 42edf1481c57 tools/firmware/hvmloader/config.h
> --- a/tools/firmware/hvmloader/config.h Fri Jul 22 08:55:19 2011 +0100
> +++ b/tools/firmware/hvmloader/config.h Sun Jul 24 02:22:42 2011 +0800
> @@ -3,7 +3,7 @@
>  
>  #include <stdint.h>
>  
> -enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
> +enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt, VGA_custom };
>  extern enum virtual_vga virtual_vga;
>  
>  struct bios_config {
> @@ -16,6 +16,9 @@
>      /* Physical address to load at */
>      unsigned int bios_address;
>  
> +    /* Custom load function. */
> +    void (*load)(const struct bios_config *config);
> +
>      /* ROMS */
>      int load_roms;
>      unsigned int optionrom_start, optionrom_end;
> @@ -23,8 +26,6 @@
>      void (*bios_info_setup)(void);
>      void (*bios_info_finish)(void);
>  
> -    void (*bios_relocate)(void);
> -
>      void (*vm86_setup)(void);
>      void (*e820_setup)(void);
>  
> @@ -36,6 +37,8 @@
>  
>  extern struct bios_config rombios_config;
>  extern struct bios_config seabios_config;
> +extern struct bios_config ovmf32_config;
> +extern struct bios_config ovmf64_config;
>  
>  #define PAGE_SHIFT 12
>  #define PAGE_SIZE  (1ul << PAGE_SHIFT)
> diff -r 42edf1481c57 tools/firmware/hvmloader/hvmloader.c
> --- a/tools/firmware/hvmloader/hvmloader.c Fri Jul 22 08:55:19 2011 +0100
> +++ b/tools/firmware/hvmloader/hvmloader.c Sun Jul 24 02:22:42 2011 +0800
> @@ -360,6 +360,8 @@
>  #ifdef ENABLE_SEABIOS
>      { "seabios", &seabios_config, },
>  #endif
> +    { "ovmf-ia32", &ovmf32_config, },
> +    { "ovmf-x64", &ovmf64_config, },
>      { NULL, NULL }
>  };
>  
> @@ -416,12 +418,13 @@
>          bios->create_smbios_tables();
>      }
>  
> -    printf("Loading %s ...\n", bios->name);
> -    memcpy((void *)bios->bios_address, bios->image,
> -           bios->image_size);
> -
> -    if (bios->bios_relocate)
> -        bios->bios_relocate();
> +    if (bios->load) {
> +        bios->load(bios);
> +    } else {
> +        printf("Loading %s ...\n", bios->name);
> +        memcpy((void *)bios->bios_address, bios->image,
> +               bios->image_size);
> +    }
>  
>      if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode ) {
>          if ( bios->create_mp_tables )
> @@ -451,6 +454,8 @@
>              vgabios_sz = round_option_rom(
>                  (*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);
>              break;
> +        case VGA_custom:
> +            break;
>          default:
>              printf("No emulated VGA adaptor ...\n");
>              break;
> diff -r 42edf1481c57 tools/firmware/hvmloader/rombios.c
> --- a/tools/firmware/hvmloader/rombios.c Fri Jul 22 08:55:19 2011 +0100
> +++ b/tools/firmware/hvmloader/rombios.c Sun Jul 24 02:22:42 2011 +0800
> @@ -81,11 +81,15 @@
>      memset(info, 0, sizeof(*info));
>  }
>  
> -static void rombios_relocate(void)
> +static void rombios_load(const struct bios_config *config)
>  {
>      uint32_t bioshigh;
>      struct rombios_info *info;
>  
> +    printf("Loading %s ...\n", config->name);
> +    memcpy((void *)config->bios_address, config->image,
> +           config->image_size);
> +
>      bioshigh = rombios_highbios_setup();
>  
>      info = (struct rombios_info *)BIOS_INFO_PHYSICAL_ADDRESS;
> @@ -163,6 +167,7 @@
>      .image_size = sizeof(rombios),
>  
>      .bios_address = ROMBIOS_PHYSICAL_ADDRESS,
> +    .load = rombios_load,
>  
>      .load_roms = 1,
>  
> @@ -172,8 +177,6 @@
>      .bios_info_setup = rombios_setup_bios_info,
>      .bios_info_finish = NULL,
>  
> -    .bios_relocate = rombios_relocate,
> -
>      .vm86_setup = rombios_init_vm86_tss,
>      .e820_setup = rombios_setup_e820,
>  
> diff -r 42edf1481c57 tools/firmware/hvmloader/seabios.c
> --- a/tools/firmware/hvmloader/seabios.c Fri Jul 22 08:55:19 2011 +0100
> +++ b/tools/firmware/hvmloader/seabios.c Sun Jul 24 02:22:42 2011 +0800
> @@ -132,6 +132,7 @@
>      .image_size = sizeof(seabios),
>  
>      .bios_address = SEABIOS_PHYSICAL_ADDRESS,
> +    .load = NULL,
>  
>      .load_roms = 0,
>  
> @@ -141,8 +142,6 @@
>      .bios_info_setup = seabios_setup_bios_info,
>      .bios_info_finish = seabios_finish_bios_info,
>  
> -    .bios_relocate = NULL,
> -
>      .vm86_setup = NULL,
>      .e820_setup = seabios_setup_e820,
>  
> 
> 
> 
> 
> Best Regards,
> Bei Guan
> 
> 
> 
> 
> 2011/7/24 Keir Fraser <keir.xen@gmail.com>
>> On 23/07/2011 16:18, "Bei Guan" <gbtju85@gmail.com> wrote:
>> 
>>> Do you mean that put the bios_relocate hook in the "else" statement? Just
>>> like
>>> this:
>>> 
>>>     if (bios->load) {
>>>         bios->load(bios);
>>>     } else {
>>>         printf("Loading %s ...\n", bios->name);
>>>         memcpy((void *)bios->bios_address, bios->image,
>>>                bios->image_size);
>>> 
>>>         if (bios->bios_relocate)
>>>             bios->bios_relocate(); 
>>>    }
>> 
>> No I mean remove the bios_relocate hook entirely, and modify the rombios
>> handler to use your new hook instead. It should be quite easy.
>> 
>>  -- Keir
>> 
>> 
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-25 13:23 ` Keir Fraser
@ 2011-07-26 13:29   ` Andrei Warkentin
  2011-07-27  7:34     ` Keir Fraser
  2011-07-27  2:02   ` Bei Guan
  1 sibling, 1 reply; 10+ messages in thread
From: Andrei Warkentin @ 2011-07-26 13:29 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Xen Devel, Jordan Justen, Bei Guan, Tim Deegan

Hi,

On Mon, Jul 25, 2011 at 8:23 AM, Keir Fraser <keir@xen.org> wrote:
> On 23/07/2011 20:02, "Bei Guan" <gbtju85@gmail.com> wrote:
>
>> Hi,
>>
>> These set of patches are affected by replacing bios_relocate hook with
>> bios_load hook in hvmloader. The patches for code files config.h and
>> hvmloader.c also contains part of the contents of Enabling UEFI BIOS(OVMF)
>> support in Xen-unstable HVM. Is there any problem with these patches? Thank
>> you very much.
>
> As of xen-unstable:23745 I've made some improvements to hvmloader which
> include your new bios_load hook. You can rebase your remaining patches on
> top of that.
>

Thank you for looking into this :-).

A

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-25 13:23 ` Keir Fraser
  2011-07-26 13:29   ` Andrei Warkentin
@ 2011-07-27  2:02   ` Bei Guan
  2011-07-27  7:10     ` Keir Fraser
  1 sibling, 1 reply; 10+ messages in thread
From: Bei Guan @ 2011-07-27  2:02 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Xen Devel, Jordan Justen, Tim Deegan, Andrei Warkentin


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

2011/7/25 Keir Fraser <keir@xen.org>

> On 23/07/2011 20:02, "Bei Guan" <gbtju85@gmail.com> wrote:
>
> > Hi,
> >
> > These set of patches are affected by replacing bios_relocate hook with
> > bios_load hook in hvmloader. The patches for code files config.h and
> > hvmloader.c also contains part of the contents of Enabling UEFI
> BIOS(OVMF)
> > support in Xen-unstable HVM. Is there any problem with these patches?
> Thank
> > you very much.
>
> As of xen-unstable:23745 I've made some improvements to hvmloader which
> include your new bios_load hook. You can rebase your remaining patches on
> top of that.
>
Thank you very much.
I am looking forward to the new xen-unstable version: 23745.

Best Regards,
Bei Guan


>  -- Keir
>
> >
> >
> > # HG changeset patch
> > # User gbtju85@gmail.com
> > #
> >
> > Replace bios_relocate hook with bios_load hook in hvmloader.
> > This patch also contains part of the contents of Enabling UEFI BIOS(OVMF)
> > support in Xen-unstable HVM
> >
> > Sign-off-by: Bei Guan <gbtju85@gmail.com>
> >
> > diff -r 42edf1481c57 tools/firmware/hvmloader/config.h
> > --- a/tools/firmware/hvmloader/config.h Fri Jul 22 08:55:19 2011 +0100
> > +++ b/tools/firmware/hvmloader/config.h Sun Jul 24 02:22:42 2011 +0800
> > @@ -3,7 +3,7 @@
> >
> >  #include <stdint.h>
> >
> > -enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
> > +enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt, VGA_custom };
> >  extern enum virtual_vga virtual_vga;
> >
> >  struct bios_config {
> > @@ -16,6 +16,9 @@
> >      /* Physical address to load at */
> >      unsigned int bios_address;
> >
> > +    /* Custom load function. */
> > +    void (*load)(const struct bios_config *config);
> > +
> >      /* ROMS */
> >      int load_roms;
> >      unsigned int optionrom_start, optionrom_end;
> > @@ -23,8 +26,6 @@
> >      void (*bios_info_setup)(void);
> >      void (*bios_info_finish)(void);
> >
> > -    void (*bios_relocate)(void);
> > -
> >      void (*vm86_setup)(void);
> >      void (*e820_setup)(void);
> >
> > @@ -36,6 +37,8 @@
> >
> >  extern struct bios_config rombios_config;
> >  extern struct bios_config seabios_config;
> > +extern struct bios_config ovmf32_config;
> > +extern struct bios_config ovmf64_config;
> >
> >  #define PAGE_SHIFT 12
> >  #define PAGE_SIZE  (1ul << PAGE_SHIFT)
> > diff -r 42edf1481c57 tools/firmware/hvmloader/hvmloader.c
> > --- a/tools/firmware/hvmloader/hvmloader.c Fri Jul 22 08:55:19 2011 +0100
> > +++ b/tools/firmware/hvmloader/hvmloader.c Sun Jul 24 02:22:42 2011 +0800
> > @@ -360,6 +360,8 @@
> >  #ifdef ENABLE_SEABIOS
> >      { "seabios", &seabios_config, },
> >  #endif
> > +    { "ovmf-ia32", &ovmf32_config, },
> > +    { "ovmf-x64", &ovmf64_config, },
> >      { NULL, NULL }
> >  };
> >
> > @@ -416,12 +418,13 @@
> >          bios->create_smbios_tables();
> >      }
> >
> > -    printf("Loading %s ...\n", bios->name);
> > -    memcpy((void *)bios->bios_address, bios->image,
> > -           bios->image_size);
> > -
> > -    if (bios->bios_relocate)
> > -        bios->bios_relocate();
> > +    if (bios->load) {
> > +        bios->load(bios);
> > +    } else {
> > +        printf("Loading %s ...\n", bios->name);
> > +        memcpy((void *)bios->bios_address, bios->image,
> > +               bios->image_size);
> > +    }
> >
> >      if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode ) {
> >          if ( bios->create_mp_tables )
> > @@ -451,6 +454,8 @@
> >              vgabios_sz = round_option_rom(
> >                  (*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);
> >              break;
> > +        case VGA_custom:
> > +            break;
> >          default:
> >              printf("No emulated VGA adaptor ...\n");
> >              break;
> > diff -r 42edf1481c57 tools/firmware/hvmloader/rombios.c
> > --- a/tools/firmware/hvmloader/rombios.c Fri Jul 22 08:55:19 2011 +0100
> > +++ b/tools/firmware/hvmloader/rombios.c Sun Jul 24 02:22:42 2011 +0800
> > @@ -81,11 +81,15 @@
> >      memset(info, 0, sizeof(*info));
> >  }
> >
> > -static void rombios_relocate(void)
> > +static void rombios_load(const struct bios_config *config)
> >  {
> >      uint32_t bioshigh;
> >      struct rombios_info *info;
> >
> > +    printf("Loading %s ...\n", config->name);
> > +    memcpy((void *)config->bios_address, config->image,
> > +           config->image_size);
> > +
> >      bioshigh = rombios_highbios_setup();
> >
> >      info = (struct rombios_info *)BIOS_INFO_PHYSICAL_ADDRESS;
> > @@ -163,6 +167,7 @@
> >      .image_size = sizeof(rombios),
> >
> >      .bios_address = ROMBIOS_PHYSICAL_ADDRESS,
> > +    .load = rombios_load,
> >
> >      .load_roms = 1,
> >
> > @@ -172,8 +177,6 @@
> >      .bios_info_setup = rombios_setup_bios_info,
> >      .bios_info_finish = NULL,
> >
> > -    .bios_relocate = rombios_relocate,
> > -
> >      .vm86_setup = rombios_init_vm86_tss,
> >      .e820_setup = rombios_setup_e820,
> >
> > diff -r 42edf1481c57 tools/firmware/hvmloader/seabios.c
> > --- a/tools/firmware/hvmloader/seabios.c Fri Jul 22 08:55:19 2011 +0100
> > +++ b/tools/firmware/hvmloader/seabios.c Sun Jul 24 02:22:42 2011 +0800
> > @@ -132,6 +132,7 @@
> >      .image_size = sizeof(seabios),
> >
> >      .bios_address = SEABIOS_PHYSICAL_ADDRESS,
> > +    .load = NULL,
> >
> >      .load_roms = 0,
> >
> > @@ -141,8 +142,6 @@
> >      .bios_info_setup = seabios_setup_bios_info,
> >      .bios_info_finish = seabios_finish_bios_info,
> >
> > -    .bios_relocate = NULL,
> > -
> >      .vm86_setup = NULL,
> >      .e820_setup = seabios_setup_e820,
> >
> >
> >
> >
> >
> > Best Regards,
> > Bei Guan
> >
> >
> >
> >
> > 2011/7/24 Keir Fraser <keir.xen@gmail.com>
> >> On 23/07/2011 16:18, "Bei Guan" <gbtju85@gmail.com> wrote:
> >>
> >>> Do you mean that put the bios_relocate hook in the "else" statement?
> Just
> >>> like
> >>> this:
> >>>
> >>>     if (bios->load) {
> >>>         bios->load(bios);
> >>>     } else {
> >>>         printf("Loading %s ...\n", bios->name);
> >>>         memcpy((void *)bios->bios_address, bios->image,
> >>>                bios->image_size);
> >>>
> >>>         if (bios->bios_relocate)
> >>>             bios->bios_relocate();
> >>>    }
> >>
> >> No I mean remove the bios_relocate hook entirely, and modify the rombios
> >> handler to use your new hook instead. It should be quite easy.
> >>
> >>  -- Keir
> >>
> >>
> >
> >
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

[-- Attachment #1.2: Type: text/html, Size: 8940 bytes --]

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

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-27  2:02   ` Bei Guan
@ 2011-07-27  7:10     ` Keir Fraser
  0 siblings, 0 replies; 10+ messages in thread
From: Keir Fraser @ 2011-07-27  7:10 UTC (permalink / raw)
  To: Bei Guan, Keir Fraser
  Cc: Xen Devel, Jordan Justen, Tim Deegan, Andrei Warkentin

On 27/07/2011 03:02, "Bei Guan" <gbtju85@gmail.com> wrote:

> 
> 
> 2011/7/25 Keir Fraser <keir@xen.org>
>> On 23/07/2011 20:02, "Bei Guan" <gbtju85@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> These set of patches are affected by replacing bios_relocate hook with
>>> bios_load hook in hvmloader. The patches for code files config.h and
>>> hvmloader.c also contains part of the contents of Enabling UEFI BIOS(OVMF)
>>> support in Xen-unstable HVM. Is there any problem with these patches? Thank
>>> you very much.
>> 
>> As of xen-unstable:23745 I've made some improvements to hvmloader which
>> include your new bios_load hook. You can rebase your remaining patches on
>> top of that.
> Thank you very much. 
> I am looking forward to the new xen-unstable version: 23745.

http://xenbits.xen.org/staging/xen-unstable.hg

> Best Regards, 
> Bei Guan
> 
>> 
>>  -- Keir
>> 
>>> 
>>> 
>>> # HG changeset patch
>>> # User gbtju85@gmail.com
>>> #
>>> 
>>> Replace bios_relocate hook with bios_load hook in hvmloader.
>>> This patch also contains part of the contents of Enabling UEFI BIOS(OVMF)
>>> support in Xen-unstable HVM
>>> 
>>> Sign-off-by: Bei Guan <gbtju85@gmail.com>
>>> 
>>> diff -r 42edf1481c57 tools/firmware/hvmloader/config.h
>>> --- a/tools/firmware/hvmloader/config.h Fri Jul 22 08:55:19 2011 +0100
>>> +++ b/tools/firmware/hvmloader/config.h Sun Jul 24 02:22:42 2011 +0800
>>> @@ -3,7 +3,7 @@
>>>  
>>>  #include <stdint.h>
>>>  
>>> -enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
>>> +enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt, VGA_custom };
>>>  extern enum virtual_vga virtual_vga;
>>>  
>>>  struct bios_config {
>>> @@ -16,6 +16,9 @@
>>>      /* Physical address to load at */
>>>      unsigned int bios_address;
>>>  
>>> +    /* Custom load function. */
>>> +    void (*load)(const struct bios_config *config);
>>> +
>>>      /* ROMS */
>>>      int load_roms;
>>>      unsigned int optionrom_start, optionrom_end;
>>> @@ -23,8 +26,6 @@
>>>      void (*bios_info_setup)(void);
>>>      void (*bios_info_finish)(void);
>>>  
>>> -    void (*bios_relocate)(void);
>>> -
>>>      void (*vm86_setup)(void);
>>>      void (*e820_setup)(void);
>>>  
>>> @@ -36,6 +37,8 @@
>>>  
>>>  extern struct bios_config rombios_config;
>>>  extern struct bios_config seabios_config;
>>> +extern struct bios_config ovmf32_config;
>>> +extern struct bios_config ovmf64_config;
>>>  
>>>  #define PAGE_SHIFT 12
>>>  #define PAGE_SIZE  (1ul << PAGE_SHIFT)
>>> diff -r 42edf1481c57 tools/firmware/hvmloader/hvmloader.c
>>> --- a/tools/firmware/hvmloader/hvmloader.c Fri Jul 22 08:55:19 2011 +0100
>>> +++ b/tools/firmware/hvmloader/hvmloader.c Sun Jul 24 02:22:42 2011 +0800
>>> @@ -360,6 +360,8 @@
>>>  #ifdef ENABLE_SEABIOS
>>>      { "seabios", &seabios_config, },
>>>  #endif
>>> +    { "ovmf-ia32", &ovmf32_config, },
>>> +    { "ovmf-x64", &ovmf64_config, },
>>>      { NULL, NULL }
>>>  };
>>>  
>>> @@ -416,12 +418,13 @@
>>>          bios->create_smbios_tables();
>>>      }
>>>  
>>> -    printf("Loading %s ...\n", bios->name);
>>> -    memcpy((void *)bios->bios_address, bios->image,
>>> -           bios->image_size);
>>> -
>>> -    if (bios->bios_relocate)
>>> -        bios->bios_relocate();
>>> +    if (bios->load) {
>>> +        bios->load(bios);
>>> +    } else {
>>> +        printf("Loading %s ...\n", bios->name);
>>> +        memcpy((void *)bios->bios_address, bios->image,
>>> +               bios->image_size);
>>> +    }
>>>  
>>>      if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode ) {
>>>          if ( bios->create_mp_tables )
>>> @@ -451,6 +454,8 @@
>>>              vgabios_sz = round_option_rom(
>>>                  (*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);
>>>              break;
>>> +        case VGA_custom:
>>> +            break;
>>>          default:
>>>              printf("No emulated VGA adaptor ...\n");
>>>              break;
>>> diff -r 42edf1481c57 tools/firmware/hvmloader/rombios.c
>>> --- a/tools/firmware/hvmloader/rombios.c Fri Jul 22 08:55:19 2011 +0100
>>> +++ b/tools/firmware/hvmloader/rombios.c Sun Jul 24 02:22:42 2011 +0800
>>> @@ -81,11 +81,15 @@
>>>      memset(info, 0, sizeof(*info));
>>>  }
>>>  
>>> -static void rombios_relocate(void)
>>> +static void rombios_load(const struct bios_config *config)
>>>  {
>>>      uint32_t bioshigh;
>>>      struct rombios_info *info;
>>>  
>>> +    printf("Loading %s ...\n", config->name);
>>> +    memcpy((void *)config->bios_address, config->image,
>>> +           config->image_size);
>>> +
>>>      bioshigh = rombios_highbios_setup();
>>>  
>>>      info = (struct rombios_info *)BIOS_INFO_PHYSICAL_ADDRESS;
>>> @@ -163,6 +167,7 @@
>>>      .image_size = sizeof(rombios),
>>>  
>>>      .bios_address = ROMBIOS_PHYSICAL_ADDRESS,
>>> +    .load = rombios_load,
>>>  
>>>      .load_roms = 1,
>>>  
>>> @@ -172,8 +177,6 @@
>>>      .bios_info_setup = rombios_setup_bios_info,
>>>      .bios_info_finish = NULL,
>>>  
>>> -    .bios_relocate = rombios_relocate,
>>> -
>>>      .vm86_setup = rombios_init_vm86_tss,
>>>      .e820_setup = rombios_setup_e820,
>>>  
>>> diff -r 42edf1481c57 tools/firmware/hvmloader/seabios.c
>>> --- a/tools/firmware/hvmloader/seabios.c Fri Jul 22 08:55:19 2011 +0100
>>> +++ b/tools/firmware/hvmloader/seabios.c Sun Jul 24 02:22:42 2011 +0800
>>> @@ -132,6 +132,7 @@
>>>      .image_size = sizeof(seabios),
>>>  
>>>      .bios_address = SEABIOS_PHYSICAL_ADDRESS,
>>> +    .load = NULL,
>>>  
>>>      .load_roms = 0,
>>>  
>>> @@ -141,8 +142,6 @@
>>>      .bios_info_setup = seabios_setup_bios_info,
>>>      .bios_info_finish = seabios_finish_bios_info,
>>>  
>>> -    .bios_relocate = NULL,
>>> -
>>>      .vm86_setup = NULL,
>>>      .e820_setup = seabios_setup_e820,
>>>  
>>> 
>>> 
>>> 
>>> 
>>> Best Regards,
>>> Bei Guan
>>> 
>>> 
>>> 
>>> 
>>> 2011/7/24 Keir Fraser <keir.xen@gmail.com>
>>>> On 23/07/2011 16:18, "Bei Guan" <gbtju85@gmail.com> wrote:
>>>> 
>>>>> Do you mean that put the bios_relocate hook in the "else" statement? Just
>>>>> like
>>>>> this:
>>>>> 
>>>>>     if (bios->load) {
>>>>>         bios->load(bios);
>>>>>     } else {
>>>>>         printf("Loading %s ...\n", bios->name);
>>>>>         memcpy((void *)bios->bios_address, bios->image,
>>>>>                bios->image_size);
>>>>> 
>>>>>         if (bios->bios_relocate)
>>>>>             bios->bios_relocate(); 
>>>>>    }
>>>> 
>>>> No I mean remove the bios_relocate hook entirely, and modify the rombios
>>>> handler to use your new hook instead. It should be quite easy.
>>>> 
>>>>  -- Keir
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-26 13:29   ` Andrei Warkentin
@ 2011-07-27  7:34     ` Keir Fraser
  2011-07-27  8:09       ` Tim Deegan
  0 siblings, 1 reply; 10+ messages in thread
From: Keir Fraser @ 2011-07-27  7:34 UTC (permalink / raw)
  To: Andrei Warkentin; +Cc: Xen Devel, Jordan Justen, Bei Guan, Tim Deegan

On 26/07/2011 14:29, "Andrei Warkentin" <andreiw@motorola.com> wrote:

> Hi,
> 
> On Mon, Jul 25, 2011 at 8:23 AM, Keir Fraser <keir@xen.org> wrote:
>> On 23/07/2011 20:02, "Bei Guan" <gbtju85@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> These set of patches are affected by replacing bios_relocate hook with
>>> bios_load hook in hvmloader. The patches for code files config.h and
>>> hvmloader.c also contains part of the contents of Enabling UEFI BIOS(OVMF)
>>> support in Xen-unstable HVM. Is there any problem with these patches? Thank
>>> you very much.
>> 
>> As of xen-unstable:23745 I've made some improvements to hvmloader which
>> include your new bios_load hook. You can rebase your remaining patches on
>> top of that.
>> 
> 
> Thank you for looking into this :-).

By the way, what are the advantages for us of supporting OVMF? I know it
gets us the UEFI support tickybox, but for me that begs the same question.
Why is it useful?

 Thanks,
 Keir


> A

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-27  7:34     ` Keir Fraser
@ 2011-07-27  8:09       ` Tim Deegan
  2011-07-27  8:35         ` Keir Fraser
  0 siblings, 1 reply; 10+ messages in thread
From: Tim Deegan @ 2011-07-27  8:09 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Xen Devel, Jordan Justen, Bei Guan, Andrei Warkentin

At 08:34 +0100 on 27 Jul (1311755670), Keir Fraser wrote:
> By the way, what are the advantages for us of supporting OVMF? I know it
> gets us the UEFI support tickybox, but for me that begs the same question.
> Why is it useful?

When Windows boots from UEFI it can load just its system-disk driver via
the firmware and the rest of the OS using its own driver; that ought to
make Windows boot times much faster.  I'm told that an EFI framebuffer
could make PV graphics easier too, but I don't know anything about
Windows graphics drivers.

Also, eventually some server SKUs may go EFI-only, or we may need EFI
for system logo tests, but that seems unlikely to happen soon.

Tim.

-- 
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-27  8:09       ` Tim Deegan
@ 2011-07-27  8:35         ` Keir Fraser
  2011-07-27  8:45           ` Tim Deegan
  2011-07-27 17:55           ` Andrei Warkentin
  0 siblings, 2 replies; 10+ messages in thread
From: Keir Fraser @ 2011-07-27  8:35 UTC (permalink / raw)
  To: Tim Deegan; +Cc: Xen Devel, Jordan Justen, Bei Guan, Andrei Warkentin

On 27/07/2011 09:09, "Tim Deegan" <Tim.Deegan@citrix.com> wrote:

> At 08:34 +0100 on 27 Jul (1311755670), Keir Fraser wrote:
>> By the way, what are the advantages for us of supporting OVMF? I know it
>> gets us the UEFI support tickybox, but for me that begs the same question.
>> Why is it useful?
> 
> When Windows boots from UEFI it can load just its system-disk driver via
> the firmware and the rest of the OS using its own driver; that ought to
> make Windows boot times much faster.

That's interesting. Why can't it do that with legacy firmware? Does it need
to keep the legacy BIOS alive for a while and hence can't use its own
drivers, or something like that?

 -- Keir

> I'm told that an EFI framebuffer
> could make PV graphics easier too, but I don't know anything about
> Windows graphics drivers.
> 
> Also, eventually some server SKUs may go EFI-only, or we may need EFI
> for system logo tests, but that seems unlikely to happen soon.
> 
> Tim.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-27  8:35         ` Keir Fraser
@ 2011-07-27  8:45           ` Tim Deegan
  2011-07-27 17:55           ` Andrei Warkentin
  1 sibling, 0 replies; 10+ messages in thread
From: Tim Deegan @ 2011-07-27  8:45 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Xen Devel, Jordan Justen, Bei Guan, Andrei Warkentin

At 09:35 +0100 on 27 Jul (1311759322), Keir Fraser wrote:
> On 27/07/2011 09:09, "Tim Deegan" <Tim.Deegan@citrix.com> wrote:
> 
> > At 08:34 +0100 on 27 Jul (1311755670), Keir Fraser wrote:
> >> By the way, what are the advantages for us of supporting OVMF? I know it
> >> gets us the UEFI support tickybox, but for me that begs the same question.
> >> Why is it useful?
> > 
> > When Windows boots from UEFI it can load just its system-disk driver via
> > the firmware and the rest of the OS using its own driver; that ought to
> > make Windows boot times much faster.
> 
> That's interesting. Why can't it do that with legacy firmware? Does it need
> to keep the legacy BIOS alive for a while and hence can't use its own
> drivers, or something like that?

I don't think it's "can't" so much as "doesn't". :)  We'd get much of
the same speedup from PV drivers in the ROMBIOS, of course.

Oh, and I think Mac OS X relies on EFI to boot, doesn't it?  Among other
things, of course.

Tim.

-- 
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader
  2011-07-27  8:35         ` Keir Fraser
  2011-07-27  8:45           ` Tim Deegan
@ 2011-07-27 17:55           ` Andrei Warkentin
  1 sibling, 0 replies; 10+ messages in thread
From: Andrei Warkentin @ 2011-07-27 17:55 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Xen Devel, Jordan Justen, Tim Deegan, Bei Guan

Hi,

On Wed, Jul 27, 2011 at 3:35 AM, Keir Fraser <keir.xen@gmail.com> wrote:
> On 27/07/2011 09:09, "Tim Deegan" <Tim.Deegan@citrix.com> wrote:
>
>> At 08:34 +0100 on 27 Jul (1311755670), Keir Fraser wrote:
>>> By the way, what are the advantages for us of supporting OVMF? I know it
>>> gets us the UEFI support tickybox, but for me that begs the same question.
>>> Why is it useful?
>>

IPv4/IPv6 iSCSI, for example. Larger disk support for booting (GPT vs
MBR). Reducing dependence on I/O emulators for HVM guest bootup, with
the associated speedup by having UEFI use PV drivers for block, net,
console, etc.

>> When Windows boots from UEFI it can load just its system-disk driver via
>> the firmware and the rest of the OS using its own driver; that ought to
>> make Windows boot times much faster.

Not quite. It uses the firmware services (UEFI or BIOS) to do the load
of everything (NT, HAL, registry, drivers). This is easy to test -
disable DMA inside ATAPI driver and see how fast a windows CD boots
from UEFI... After the bootloader  is ready to hand-off, it quiesces
the firmware. To make things faster, you ought to make PV drivers,
although it already could be faster if the ATA/ATAPI drivers use
features not used in legacy ROM.

>
> That's interesting. Why can't it do that with legacy firmware? Does it need
> to keep the legacy BIOS alive for a while and hence can't use its own
> drivers, or something like that?
>

Implementing PV drivers in BIOS presents challenges imposed by the
operating environment (16bit RM), additionally, since there is never
an explicit hand-off of HW from firmware to OS, you have no
opportunity for clean-up of PV state (pages, evtchns, etc).

A

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-07-27 17:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-23 19:02 [PATCH] Replace bios_relocate hook with bios_load hook in hvmloader Bei Guan
2011-07-25 13:23 ` Keir Fraser
2011-07-26 13:29   ` Andrei Warkentin
2011-07-27  7:34     ` Keir Fraser
2011-07-27  8:09       ` Tim Deegan
2011-07-27  8:35         ` Keir Fraser
2011-07-27  8:45           ` Tim Deegan
2011-07-27 17:55           ` Andrei Warkentin
2011-07-27  2:02   ` Bei Guan
2011-07-27  7:10     ` Keir Fraser

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.