Lines Matching +full:ati +full:- +full:base
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.
76 return vga_info->BIOSImage + flat - 0xc0000; in bios_ptr()
78 return buf + (flat - vbe_offset); in bios_ptr()
94 regs->e.eax = VESA_GET_INFO; in atibios_debug_mode()
95 regs->e.esi = buffer_seg; in atibios_debug_mode()
96 regs->e.edi = buffer_adr; in atibios_debug_mode()
99 strcpy(info->signature, "VBE2"); in atibios_debug_mode()
101 if (regs->e.eax != 0x4f) { in atibios_debug_mode()
102 debug("VESA_GET_INFO: error %x\n", regs->e.eax); in atibios_debug_mode()
103 return -ENOSYS; in atibios_debug_mode()
105 debug("version %x\n", le16_to_cpu(info->version)); in atibios_debug_mode()
107 info->oem_string_ptr)); in atibios_debug_mode()
109 info->vendor_name_ptr)); in atibios_debug_mode()
111 info->product_name_ptr)); in atibios_debug_mode()
113 info->product_rev_ptr)); in atibios_debug_mode()
114 modes_bios = bios_ptr(buffer, vga_info, info->modes_ptr); in atibios_debug_mode()
118 debug("\nmemory %dMB\n", le16_to_cpu(info->total_memory) >> 4); in atibios_debug_mode()
119 size = (ptr - modes_bios) * sizeof(u16) + 2; in atibios_debug_mode()
122 return -ENOMEM; in atibios_debug_mode()
125 regs->e.eax = VESA_GET_CUR_MODE; in atibios_debug_mode()
127 if (regs->e.eax != 0x4f) { in atibios_debug_mode()
128 debug("VESA_GET_CUR_MODE: error %x\n", regs->e.eax); in atibios_debug_mode()
129 return -ENOSYS; in atibios_debug_mode()
131 debug("Current mode %x\n", regs->e.ebx); in atibios_debug_mode()
141 regs->e.eax = VESA_GET_MODE_INFO; in atibios_debug_mode()
142 regs->e.ebx = 0; in atibios_debug_mode()
143 regs->e.ecx = mode; in atibios_debug_mode()
144 regs->e.edx = 0; in atibios_debug_mode()
145 regs->e.esi = buffer_seg; in atibios_debug_mode()
146 regs->e.edi = buffer_adr; in atibios_debug_mode()
148 if (regs->e.eax != 0x4f) { in atibios_debug_mode()
149 debug("VESA_GET_MODE_INFO: error %x\n", regs->e.eax); in atibios_debug_mode()
152 memcpy(mode_info->mode_info_block, buffer, in atibios_debug_mode()
154 mode_info->valid = true; in atibios_debug_mode()
155 vm = &mode_info->vesa; in atibios_debug_mode()
156 attr = le16_to_cpu(vm->mode_attributes); in atibios_debug_mode()
159 le16_to_cpu(vm->x_resolution), in atibios_debug_mode()
160 le16_to_cpu(vm->y_resolution), in atibios_debug_mode()
161 vm->bits_per_pixel, vm->memory_model, in atibios_debug_mode()
165 vm->red_mask_pos, vm->green_mask_pos, vm->blue_mask_pos, in atibios_debug_mode()
166 vm->red_mask_size, vm->green_mask_size, in atibios_debug_mode()
167 vm->blue_mask_size); in atibios_debug_mode()
182 regs->e.eax = VESA_SET_MODE; in atibios_set_vesa_mode()
183 regs->e.ebx = vesa_mode; in atibios_set_vesa_mode()
185 regs->e.ebx |= (1 << 14) | (1 << 15); in atibios_set_vesa_mode()
187 if (regs->e.eax != 0x4f) { in atibios_set_vesa_mode()
188 debug("VESA_SET_MODE: error %x\n", regs->e.eax); in atibios_set_vesa_mode()
189 return -ENOSYS; in atibios_set_vesa_mode()
194 regs->e.eax = VESA_GET_MODE_INFO; in atibios_set_vesa_mode()
195 regs->e.ecx = vesa_mode; in atibios_set_vesa_mode()
196 regs->e.esi = buffer_seg; in atibios_set_vesa_mode()
197 regs->e.edi = buffer_adr; in atibios_set_vesa_mode()
199 if (regs->e.eax != 0x4f) { in atibios_set_vesa_mode()
200 debug("VESA_GET_MODE_INFO: error %x\n", regs->e.eax); in atibios_set_vesa_mode()
201 return -ENOSYS; in atibios_set_vesa_mode()
204 memcpy(mode_info->mode_info_block, buffer, in atibios_set_vesa_mode()
206 mode_info->valid = true; in atibios_set_vesa_mode()
207 mode_info->video_mode = vesa_mode; in atibios_set_vesa_mode()
208 vm = &mode_info->vesa; in atibios_set_vesa_mode()
209 vm->x_resolution = le16_to_cpu(vm->x_resolution); in atibios_set_vesa_mode()
210 vm->y_resolution = le16_to_cpu(vm->y_resolution); in atibios_set_vesa_mode()
211 vm->bytes_per_scanline = le16_to_cpu(vm->bytes_per_scanline); in atibios_set_vesa_mode()
212 vm->phys_base_ptr = le32_to_cpu(vm->phys_base_ptr); in atibios_set_vesa_mode()
213 vm->mode_attributes = le16_to_cpu(vm->mode_attributes); in atibios_set_vesa_mode()
221 pcidev - PCI device info for the video card on the bus to boot
222 vga_info - BIOS emulator VGA info structure
269 if (vesa_mode != -1) in PCI_doBIOSPOST()
275 pcidev - PCI device info for the video card on the bus
276 bar - Place to return the base address register offset to use
282 Searches all the PCI base address registers for the device looking for a
287 by any PCI->PCI or AGP->PCI bridge that may be present.
291 ROM base address has been zero'ed out.
303 u32 base, size; in PCI_findBIOSAddr() local
307 dm_pci_read_config32(pcidev, *bar, &base); in PCI_findBIOSAddr()
309 pci_read_config_dword(pcidev, *bar, &base); in PCI_findBIOSAddr()
311 if (!(base & 0x1)) { in PCI_findBIOSAddr()
321 return base & ~0xFF; in PCI_findBIOSAddr()
329 Some non-x86 Linux kernels map PCI relocateable I/O to values that
331 the offset for the I/O ports to be a maximum of 16-bits. Ideally
335 64K of the I/O space - a total of more than 256 cards would be
338 Anyway to fix this we change all I/O mapped base registers and
342 static void PCI_fixupIObase(struct udevice *pcidev, int reg, u32 *base) in PCI_fixupIObase() argument
344 static void PCI_fixupIObase(pci_dev_t pcidev, int reg, u32 * base) in PCI_fixupIObase()
347 if ((*base & 0x1) && (*base > 0xFFFE)) { in PCI_fixupIObase()
348 *base &= 0xFFFF; in PCI_fixupIObase()
350 dm_pci_write_config32(pcidev, reg, *base); in PCI_fixupIObase()
352 pci_write_config_dword(pcidev, reg, *base); in PCI_fixupIObase()
360 pcidev - PCI device info for the video card on the bus
393 /*Fix up I/O base registers to less than 64K */ in PCI_mapBIOSImage()
439 pcidev - PCI device info for the video card on the bus
466 pcidev - PCI device info for the video card on the bus to boot
467 VGAInfo - BIOS emulator VGA info structure
521 vga_info->function = PCI_FUNC(bdf); in PCI_postController()
522 vga_info->device = PCI_DEV(bdf); in PCI_postController()
523 vga_info->bus = PCI_BUS(bdf); in PCI_postController()
525 vga_info->function = PCI_FUNC(pcidev); in PCI_postController()
526 vga_info->device = PCI_DEV(pcidev); in PCI_postController()
527 vga_info->bus = PCI_BUS(pcidev); in PCI_postController()
529 vga_info->pcidev = pcidev; in PCI_postController()
530 vga_info->BIOSImage = copy_of_bios; in PCI_postController()
531 vga_info->BIOSImageLen = bios_image_len; in PCI_postController()
542 vga_info->BIOSImageLen = copy_of_bios[2] * 512; in PCI_postController()
565 return -ENOMEM; in biosemu_setup()
592 return -EINVAL; in biosemu_run()
601 if (vga_info->BIOSImage && in biosemu_run()
602 (ulong)(vga_info->BIOSImage) != 0xc0000) in biosemu_run()
603 free(vga_info->BIOSImage); in biosemu_run()
613 pcidev - PCI device info for the video card on the bus to boot
614 pVGAInfo - Place to return VGA info structure is requested
615 cleanUp - true to clean up on exit, false to leave emulator active
634 ret = biosemu_run(pcidev, NULL, 0, VGAInfo, clean_up, -1, NULL); in BootVideoCardBIOS()