mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/boot: Use boot_vid_info variable directly from C code
No more need to pass from assembly code. Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
db8acf31f9
commit
d5a73cdc6b
3 files changed
+7
-17
No files matched your search
@@ -50,6 +50,7 @@ SECTIONS
|
|||||||
DECLARE_IMPORT(__trampoline_seg_start);
|
DECLARE_IMPORT(__trampoline_seg_start);
|
||||||
DECLARE_IMPORT(__trampoline_seg_stop);
|
DECLARE_IMPORT(__trampoline_seg_stop);
|
||||||
DECLARE_IMPORT(trampoline_phys);
|
DECLARE_IMPORT(trampoline_phys);
|
||||||
|
DECLARE_IMPORT(boot_vid_info);
|
||||||
. = . + GAP;
|
. = . + GAP;
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.text.*)
|
*(.text.*)
|
||||||
|
|||||||
@@ -514,18 +514,10 @@ trampoline_setup:
|
|||||||
mov sym_esi(trampoline_phys), %ecx
|
mov sym_esi(trampoline_phys), %ecx
|
||||||
add $TRAMPOLINE_SPACE,%ecx
|
add $TRAMPOLINE_SPACE,%ecx
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO
|
|
||||||
lea sym_esi(boot_vid_info), %edx
|
|
||||||
#else
|
|
||||||
xor %edx, %edx
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Save Multiboot / PVH info struct (after relocation) for later use. */
|
/* Save Multiboot / PVH info struct (after relocation) for later use. */
|
||||||
push %edx /* Boot video info to be filled from MB2. */
|
|
||||||
mov %ebx, %edx /* Multiboot / PVH information address. */
|
mov %ebx, %edx /* Multiboot / PVH information address. */
|
||||||
/* reloc(magic/eax, info/edx, trampoline/ecx, video/stk) using fastcall. */
|
/* reloc(magic/eax, info/edx, trampoline/ecx) using fastcall. */
|
||||||
call reloc
|
call reloc
|
||||||
add $4, %esp
|
|
||||||
|
|
||||||
#ifdef CONFIG_PVH_GUEST
|
#ifdef CONFIG_PVH_GUEST
|
||||||
cmpb $0, sym_esi(pvh_boot)
|
cmpb $0, sym_esi(pvh_boot)
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ static multiboot_info_t *mbi_reloc(uint32_t mbi_in, memctx *ctx)
|
|||||||
return mbi_out;
|
return mbi_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, uint32_t video_out, memctx *ctx)
|
static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, memctx *ctx)
|
||||||
{
|
{
|
||||||
const multiboot2_fixed_t *mbi_fix = _p(mbi_in);
|
const multiboot2_fixed_t *mbi_fix = _p(mbi_in);
|
||||||
const multiboot2_memory_map_t *mmap_src;
|
const multiboot2_memory_map_t *mmap_src;
|
||||||
@@ -185,7 +185,7 @@ static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, uint32_t video_out, memctx
|
|||||||
memory_map_t *mmap_dst;
|
memory_map_t *mmap_dst;
|
||||||
multiboot_info_t *mbi_out;
|
multiboot_info_t *mbi_out;
|
||||||
#ifdef CONFIG_VIDEO
|
#ifdef CONFIG_VIDEO
|
||||||
struct boot_video_info *video = NULL;
|
struct boot_video_info *video = &boot_vid_info;
|
||||||
#endif
|
#endif
|
||||||
uint32_t ptr;
|
uint32_t ptr;
|
||||||
unsigned int i, mod_idx = 0;
|
unsigned int i, mod_idx = 0;
|
||||||
@@ -290,12 +290,11 @@ static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, uint32_t video_out, memctx
|
|||||||
|
|
||||||
#ifdef CONFIG_VIDEO
|
#ifdef CONFIG_VIDEO
|
||||||
case MULTIBOOT2_TAG_TYPE_VBE:
|
case MULTIBOOT2_TAG_TYPE_VBE:
|
||||||
if ( video_out )
|
if ( video )
|
||||||
{
|
{
|
||||||
const struct vesa_ctrl_info *ci;
|
const struct vesa_ctrl_info *ci;
|
||||||
const struct vesa_mode_info *mi;
|
const struct vesa_mode_info *mi;
|
||||||
|
|
||||||
video = _p(video_out);
|
|
||||||
ci = (const void *)get_mb2_data(tag, vbe, vbe_control_info);
|
ci = (const void *)get_mb2_data(tag, vbe, vbe_control_info);
|
||||||
mi = (const void *)get_mb2_data(tag, vbe, vbe_mode_info);
|
mi = (const void *)get_mb2_data(tag, vbe, vbe_mode_info);
|
||||||
|
|
||||||
@@ -321,7 +320,6 @@ static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, uint32_t video_out, memctx
|
|||||||
if ( (get_mb2_data(tag, framebuffer, framebuffer_type) !=
|
if ( (get_mb2_data(tag, framebuffer, framebuffer_type) !=
|
||||||
MULTIBOOT2_FRAMEBUFFER_TYPE_RGB) )
|
MULTIBOOT2_FRAMEBUFFER_TYPE_RGB) )
|
||||||
{
|
{
|
||||||
video_out = 0;
|
|
||||||
video = NULL;
|
video = NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -346,8 +344,7 @@ static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, uint32_t video_out, memctx
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* SAF-1-safe */
|
/* SAF-1-safe */
|
||||||
void *reloc(uint32_t magic, uint32_t in, uint32_t trampoline,
|
void *reloc(uint32_t magic, uint32_t in, uint32_t trampoline)
|
||||||
uint32_t video_info)
|
|
||||||
{
|
{
|
||||||
memctx ctx = { trampoline };
|
memctx ctx = { trampoline };
|
||||||
|
|
||||||
@@ -357,7 +354,7 @@ void *reloc(uint32_t magic, uint32_t in, uint32_t trampoline,
|
|||||||
return mbi_reloc(in, &ctx);
|
return mbi_reloc(in, &ctx);
|
||||||
|
|
||||||
case MULTIBOOT2_BOOTLOADER_MAGIC:
|
case MULTIBOOT2_BOOTLOADER_MAGIC:
|
||||||
return mbi2_reloc(in, video_info, &ctx);
|
return mbi2_reloc(in, &ctx);
|
||||||
|
|
||||||
case XEN_HVM_START_MAGIC_VALUE:
|
case XEN_HVM_START_MAGIC_VALUE:
|
||||||
if ( IS_ENABLED(CONFIG_PVH_GUEST) )
|
if ( IS_ENABLED(CONFIG_PVH_GUEST) )
|
||||||
|
|||||||