Lines Matching +full:vm +full:- +full:map
9 * Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
45 * Jason ported this file to u-boot to run the ATI video card
46 * BIOS in u-boot.
77 return vga_info->BIOSImage + flat - 0xc0000; in bios_ptr()
79 return buf + (flat - vbe_offset); in bios_ptr()
88 struct vesa_mode_info *vm; in atibios_debug_mode() local
95 regs->e.eax = VESA_GET_INFO; in atibios_debug_mode()
96 regs->e.esi = buffer_seg; in atibios_debug_mode()
97 regs->e.edi = buffer_adr; in atibios_debug_mode()
100 strcpy(info->signature, "VBE2"); in atibios_debug_mode()
102 if (regs->e.eax != 0x4f) { in atibios_debug_mode()
103 debug("VESA_GET_INFO: error %x\n", regs->e.eax); in atibios_debug_mode()
104 return -ENOSYS; in atibios_debug_mode()
106 debug("version %x\n", le16_to_cpu(info->version)); in atibios_debug_mode()
108 info->oem_string_ptr)); in atibios_debug_mode()
110 info->vendor_name_ptr)); in atibios_debug_mode()
112 info->product_name_ptr)); in atibios_debug_mode()
114 info->product_rev_ptr)); in atibios_debug_mode()
115 modes_bios = bios_ptr(buffer, vga_info, info->modes_ptr); in atibios_debug_mode()
119 debug("\nmemory %dMB\n", le16_to_cpu(info->total_memory) >> 4); in atibios_debug_mode()
120 size = (ptr - modes_bios) * sizeof(u16) + 2; in atibios_debug_mode()
123 return -ENOMEM; in atibios_debug_mode()
126 regs->e.eax = VESA_GET_CUR_MODE; in atibios_debug_mode()
128 if (regs->e.eax != 0x4f) { in atibios_debug_mode()
129 debug("VESA_GET_CUR_MODE: error %x\n", regs->e.eax); in atibios_debug_mode()
130 return -ENOSYS; in atibios_debug_mode()
132 debug("Current mode %x\n", regs->e.ebx); in atibios_debug_mode()
142 regs->e.eax = VESA_GET_MODE_INFO; in atibios_debug_mode()
143 regs->e.ebx = 0; in atibios_debug_mode()
144 regs->e.ecx = mode; in atibios_debug_mode()
145 regs->e.edx = 0; in atibios_debug_mode()
146 regs->e.esi = buffer_seg; in atibios_debug_mode()
147 regs->e.edi = buffer_adr; in atibios_debug_mode()
149 if (regs->e.eax != 0x4f) { in atibios_debug_mode()
150 debug("VESA_GET_MODE_INFO: error %x\n", regs->e.eax); in atibios_debug_mode()
153 memcpy(mode_info->mode_info_block, buffer, in atibios_debug_mode()
155 mode_info->valid = true; in atibios_debug_mode()
156 vm = &mode_info->vesa; in atibios_debug_mode()
157 attr = le16_to_cpu(vm->mode_attributes); in atibios_debug_mode()
160 le16_to_cpu(vm->x_resolution), in atibios_debug_mode()
161 le16_to_cpu(vm->y_resolution), in atibios_debug_mode()
162 vm->bits_per_pixel, vm->memory_model, in atibios_debug_mode()
166 vm->red_mask_pos, vm->green_mask_pos, vm->blue_mask_pos, in atibios_debug_mode()
167 vm->red_mask_size, vm->green_mask_size, in atibios_debug_mode()
168 vm->blue_mask_size); in atibios_debug_mode()
180 struct vesa_mode_info *vm; in atibios_set_vesa_mode() local
183 regs->e.eax = VESA_SET_MODE; in atibios_set_vesa_mode()
184 regs->e.ebx = vesa_mode; in atibios_set_vesa_mode()
186 regs->e.ebx |= (1 << 14) | (1 << 15); in atibios_set_vesa_mode()
188 if (regs->e.eax != 0x4f) { in atibios_set_vesa_mode()
189 debug("VESA_SET_MODE: error %x\n", regs->e.eax); in atibios_set_vesa_mode()
190 return -ENOSYS; in atibios_set_vesa_mode()
195 regs->e.eax = VESA_GET_MODE_INFO; in atibios_set_vesa_mode()
196 regs->e.ecx = vesa_mode; in atibios_set_vesa_mode()
197 regs->e.esi = buffer_seg; in atibios_set_vesa_mode()
198 regs->e.edi = buffer_adr; in atibios_set_vesa_mode()
200 if (regs->e.eax != 0x4f) { in atibios_set_vesa_mode()
201 debug("VESA_GET_MODE_INFO: error %x\n", regs->e.eax); in atibios_set_vesa_mode()
202 return -ENOSYS; in atibios_set_vesa_mode()
205 memcpy(mode_info->mode_info_block, buffer, in atibios_set_vesa_mode()
207 mode_info->valid = true; in atibios_set_vesa_mode()
208 mode_info->video_mode = vesa_mode; in atibios_set_vesa_mode()
209 vm = &mode_info->vesa; in atibios_set_vesa_mode()
210 vm->x_resolution = le16_to_cpu(vm->x_resolution); in atibios_set_vesa_mode()
211 vm->y_resolution = le16_to_cpu(vm->y_resolution); in atibios_set_vesa_mode()
212 vm->bytes_per_scanline = le16_to_cpu(vm->bytes_per_scanline); in atibios_set_vesa_mode()
213 vm->phys_base_ptr = le32_to_cpu(vm->phys_base_ptr); in atibios_set_vesa_mode()
214 vm->mode_attributes = le16_to_cpu(vm->mode_attributes); in atibios_set_vesa_mode()
223 pcidev - PCI device info for the video card on the bus to boot
224 vga_info - BIOS emulator VGA info structure
272 if (vesa_mode != -1) in PCI_doBIOSPOST()
279 pcidev - PCI device info for the video card on the bus
280 bar - Place to return the base address register offset to use
283 The address to use to map the secondary BIOS (AGP devices)
289 to map the BIOS for the device into. We use a mapping that is already
291 by any PCI->PCI or AGP->PCI bridge that may be present.
333 Some non-x86 Linux kernels map PCI relocateable I/O to values that
335 the offset for the I/O ports to be a maximum of 16-bits. Ideally
336 someone should fix the kernel to map the I/O ports for VGA compatible
339 64K of the I/O space - a total of more than 256 cards would be
364 pcidev - PCI device info for the video card on the bus
418 /*Change the PCI BAR registers to map it onto the bus.*/ in PCI_mapBIOSImage()
425 /*Change the PCI BAR registers to map it onto the bus.*/ in PCI_mapBIOSImage()
443 pcidev - PCI device info for the video card on the bus
470 pcidev - PCI device info for the video card on the bus to boot
471 VGAInfo - BIOS emulator VGA info structure
507 printf("videoboot: Video ROM failed to map!\n"); in PCI_postController()
525 vga_info->function = PCI_FUNC(bdf); in PCI_postController()
526 vga_info->device = PCI_DEV(bdf); in PCI_postController()
527 vga_info->bus = PCI_BUS(bdf); in PCI_postController()
529 vga_info->function = PCI_FUNC(pcidev); in PCI_postController()
530 vga_info->device = PCI_DEV(pcidev); in PCI_postController()
531 vga_info->bus = PCI_BUS(pcidev); in PCI_postController()
533 vga_info->pcidev = pcidev; in PCI_postController()
534 vga_info->BIOSImage = copy_of_bios; in PCI_postController()
535 vga_info->BIOSImageLen = bios_image_len; in PCI_postController()
546 vga_info->BIOSImageLen = copy_of_bios[2] * 512; in PCI_postController()
569 return -ENOMEM; in biosemu_setup()
596 return -EINVAL; in biosemu_run()
605 if (vga_info->BIOSImage && in biosemu_run()
606 (ulong)(vga_info->BIOSImage) != 0xc0000) in biosemu_run()
607 free(vga_info->BIOSImage); in biosemu_run()
616 pcidev - PCI device info for the video card on the bus to boot
617 pVGAInfo - Place to return VGA info structure is requested
618 cleanUp - true to clean up on exit, false to leave emulator active
637 ret = biosemu_run(pcidev, NULL, 0, VGAInfo, clean_up, -1, NULL); in BootVideoCardBIOS()