xen: Prepare common code for Xen PVH support
Some common code needs to be special cased for Xen PVH mode. This hits mostly Xen PV mode specific areas. Split include/grub/i386/pc/int_types.h off from include/grub/i386/pc/int.h to support including this file later from xen_pvh code without the grub_bios_interrupt definition. Move definition of struct grub_e820_mmap_entry from grub-core/mmap/i386/pc/mmap.c to include/grub/i386/memory.h in order to make it usable from xen_pvh code. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> Tested-by: Hans van Kranenburg <hans@knorrie.org>
This commit is contained in:
		
							parent
							
								
									b85619206a
								
							
						
					
					
						commit
						ef5fcec192
					
				
					 8 changed files with 76 additions and 47 deletions
				
			
		|  | @ -65,7 +65,7 @@ grub_tsc_init (void) | |||
| 
 | ||||
|   tsc_boot_time = grub_get_tsc (); | ||||
| 
 | ||||
| #ifdef GRUB_MACHINE_XEN | ||||
| #if defined (GRUB_MACHINE_XEN) || defined (GRUB_MACHINE_XEN_PVH) | ||||
|   (void) (grub_tsc_calibrate_from_xen () || calibrate_tsc_hardcode()); | ||||
| #elif defined (GRUB_MACHINE_EFI) | ||||
|   (void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode()); | ||||
|  |  | |||
|  | @ -42,14 +42,6 @@ extern grub_uint16_t grub_machine_mmaphook_kblow; | |||
| extern grub_uint16_t grub_machine_mmaphook_kbin16mb; | ||||
| extern grub_uint16_t grub_machine_mmaphook_64kbin4gb; | ||||
| 
 | ||||
| struct grub_e820_mmap_entry | ||||
| { | ||||
|   grub_uint64_t addr; | ||||
|   grub_uint64_t len; | ||||
|   grub_uint32_t type; | ||||
| } GRUB_PACKED; | ||||
| 
 | ||||
| 
 | ||||
| /* Helper for preboot.  */ | ||||
| static int fill_hook (grub_uint64_t addr, grub_uint64_t size, | ||||
| 		      grub_memory_type_t type, void *data) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue