mirror of
				https://gitlab.com/qemu-project/qboot.git
				synced 2024-02-13 08:33:40 +08:00 
			
		
		
		
	clear CF on entry to BIOS handlers
This simplifies the success case, which never has to manipulate the carry flag. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
		
							
								
								
									
										3
									
								
								code16.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								code16.c
									
									
									
									
									
								
							| @ -69,9 +69,6 @@ bioscall void e820_query_map(struct biosregs *regs) | ||||
| 	regs->ecx	= sizeof(struct e820entry); | ||||
| 	regs->ebx	= ++ndx; | ||||
|  | ||||
| 	/* Clear CF to indicate success.  */ | ||||
| 	regs->eflags	&= ~X86_EFLAGS_CF; | ||||
|  | ||||
| 	if (ndx >= map_size) | ||||
| 		regs->ebx	= 0;	/* end of map */ | ||||
| } | ||||
|  | ||||
							
								
								
									
										7
									
								
								entry.S
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								entry.S
									
									
									
									
									
								
							| @ -58,7 +58,7 @@ ENTRY(bios_intfake) | ||||
| 	 * interrupt handler succeeded and then treat the return values in | ||||
| 	 * registers as valid data. | ||||
| 	 */ | ||||
| 	orl	$X86_EFLAGS_CF, 0x4(%esp) | ||||
| 	orb	$X86_EFLAGS_CF, 0x4(%esp) | ||||
|  | ||||
| 	IRET | ||||
| ENTRY_END(bios_intfake) | ||||
| @ -67,6 +67,7 @@ ENTRY_END(bios_intfake) | ||||
|  * int 10 - video - service | ||||
|  */ | ||||
| ENTRY(bios_int10) | ||||
| 	andb	$~X86_EFLAGS_CF, 0x4(%esp) | ||||
| 	SAVE_BIOSREGS | ||||
|  | ||||
| 	movl		%esp, %eax | ||||
| @ -76,13 +77,11 @@ ENTRY(bios_int10) | ||||
|  | ||||
| 	RESTORE_BIOSREGS | ||||
|  | ||||
| 	/* Clear CF to indicate success.  */ | ||||
| 	andl	$~X86_EFLAGS_CF, 0x4(%esp) | ||||
|  | ||||
| 	IRET | ||||
| ENTRY_END(bios_int10) | ||||
|  | ||||
| ENTRY(bios_int15) | ||||
| 	andb	$~X86_EFLAGS_CF, 0x4(%esp) | ||||
| 	SAVE_BIOSREGS | ||||
|  | ||||
| 	movl	%esp, %eax | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Paolo Bonzini
					Paolo Bonzini