mirror of https://github.com/xemu-project/xemu.git
kvmvapic: Use optionrom helpers
Use OPTION_ROM_START/END from the common header file, add comment to init code. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
209ca750b9
commit
501981126d
|
@ -9,12 +9,10 @@
|
||||||
# option) any later version. See the COPYING file in the top-level directory.
|
# option) any later version. See the COPYING file in the top-level directory.
|
||||||
#
|
#
|
||||||
|
|
||||||
.text 0
|
#include "optionrom.h"
|
||||||
.code16
|
|
||||||
.global _start
|
OPTION_ROM_START
|
||||||
_start:
|
|
||||||
.short 0xaa55
|
|
||||||
.byte (_end - _start) / 512
|
|
||||||
# clear vapic area: firmware load using rep insb may cause
|
# clear vapic area: firmware load using rep insb may cause
|
||||||
# stale tpr/isr/irr data to corrupt the vapic area.
|
# stale tpr/isr/irr data to corrupt the vapic area.
|
||||||
push %es
|
push %es
|
||||||
|
@ -26,8 +24,11 @@ _start:
|
||||||
cld
|
cld
|
||||||
rep stosw
|
rep stosw
|
||||||
pop %es
|
pop %es
|
||||||
|
|
||||||
|
# announce presence to the hypervisor
|
||||||
mov $vapic_base, %ax
|
mov $vapic_base, %ax
|
||||||
out %ax, $0x7e
|
out %ax, $0x7e
|
||||||
|
|
||||||
lret
|
lret
|
||||||
|
|
||||||
.code32
|
.code32
|
||||||
|
@ -331,7 +332,4 @@ up_set_tpr_poll_irq:
|
||||||
vapic:
|
vapic:
|
||||||
. = . + vapic_size
|
. = . + vapic_size
|
||||||
|
|
||||||
.byte 0 # reserve space for signature
|
OPTION_ROM_END
|
||||||
.align 512, 0
|
|
||||||
|
|
||||||
_end:
|
|
||||||
|
|
Loading…
Reference in New Issue