ia64/xen-unstable

changeset 3902:27a2fdfeba20

bitkeeper revision 1.1236.1.6 (421d38d66ZGTXP7EnaZjRjZIbQKLfg)

[PATCH] Setup EFI memory descriptors for I/O Ports

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
author arun.sharma@intel.com[adsharma]
date Thu Feb 24 02:15:50 2005 +0000 (2005-02-24)
parents 89cabb316ba2
children 8e0ac8ed218b
files xen/arch/ia64/dom_fw.c
line diff
     1.1 --- a/xen/arch/ia64/dom_fw.c	Thu Feb 24 01:54:51 2005 +0000
     1.2 +++ b/xen/arch/ia64/dom_fw.c	Thu Feb 24 02:15:50 2005 +0000
     1.3 @@ -319,12 +319,12 @@ dom_fw_init (struct domain *d, char *arg
     1.4  	unsigned long maxmem = d->max_pages * PAGE_SIZE;
     1.5  	unsigned long start_mpaddr = ((d==dom0)?dom0_start:0);
     1.6  
     1.7 -#	define MAKE_MD(typ, attr, start, end)		\
     1.8 +#	define MAKE_MD(typ, attr, start, end, abs) 	\	
     1.9  	do {						\
    1.10  		md = efi_memmap + i++;			\
    1.11  		md->type = typ;				\
    1.12  		md->pad = 0;				\
    1.13 -		md->phys_addr = start_mpaddr + start;	\
    1.14 +		md->phys_addr = abs ? start : start_mpaddr + start;	\
    1.15  		md->virt_addr = 0;			\
    1.16  		md->num_pages = (end - start) >> 12;	\
    1.17  		md->attribute = attr;			\
    1.18 @@ -472,27 +472,27 @@ dom_fw_init (struct domain *d, char *arg
    1.19  
    1.20  	/* simulate 1MB free memory at physical address zero */
    1.21  	i = 0;
    1.22 -	MAKE_MD(EFI_BOOT_SERVICES_DATA,EFI_MEMORY_WB,0*MB,1*MB);
    1.23 +	MAKE_MD(EFI_BOOT_SERVICES_DATA,EFI_MEMORY_WB,0*MB,1*MB, 0);
    1.24  	/* hypercall patches live here, masquerade as reserved PAL memory */
    1.25 -	MAKE_MD(EFI_PAL_CODE,EFI_MEMORY_WB,HYPERCALL_START,HYPERCALL_END);
    1.26 -	MAKE_MD(EFI_CONVENTIONAL_MEMORY,EFI_MEMORY_WB,HYPERCALL_END,maxmem);
    1.27 +	MAKE_MD(EFI_PAL_CODE,EFI_MEMORY_WB,HYPERCALL_START,HYPERCALL_END, 0);
    1.28 +	MAKE_MD(EFI_CONVENTIONAL_MEMORY,EFI_MEMORY_WB,HYPERCALL_END,maxmem, 0);
    1.29  #ifdef PASS_THRU_IOPORT_SPACE
    1.30  	if (d == dom0 && !running_on_sim) {
    1.31  		/* pass through the I/O port space */
    1.32 -		efi_memory_desc_t efi_get_io_md(void);
    1.33 -		efi_memory_desc_t ia64_efi_io_md = efi_get_io_md();
    1.34 +		efi_memory_desc_t *efi_get_io_md(void);
    1.35 +		efi_memory_desc_t *ia64_efi_io_md = efi_get_io_md();
    1.36  		u32 type;
    1.37  		u64 iostart, ioend, ioattr;
    1.38  		
    1.39 -		type = ia64_efi_io_md.type;
    1.40 -		iostart = ia64_efi_io_md.phys_addr;
    1.41 -		ioend = ia64_efi_io_md.phys_addr +
    1.42 -			(ia64_efi_io_md.num_pages << 12);
    1.43 -		ioattr = ia64_efi_io_md.attribute;
    1.44 -		MAKE_MD(type,ioattr,iostart,ioend);
    1.45 +		type = ia64_efi_io_md->type;
    1.46 +		iostart = ia64_efi_io_md->phys_addr;
    1.47 +		ioend = ia64_efi_io_md->phys_addr +
    1.48 +			(ia64_efi_io_md->num_pages << 12);
    1.49 +		ioattr = ia64_efi_io_md->attribute;
    1.50 +		MAKE_MD(type,ioattr,iostart,ioend, 1);
    1.51  	}
    1.52  	else
    1.53 -		MAKE_MD(EFI_RESERVED_TYPE,0,0,0);
    1.54 +		MAKE_MD(EFI_RESERVED_TYPE,0,0,0,0);
    1.55  #endif
    1.56  
    1.57  	bp->efi_systab = dom_pa(fw_mem);