From: Marco Gerards Subject: Re: Getting a console on the Intel mac / ioremap Date: Sun, 13 Aug 2006 18:11:37 +0200 Message-ID: <87psf4zkcm.fsf@xs4all.nl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Keir Fraser's message of "Sun, 13 Aug 2006 16:44:53 +0100") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Keir Fraser writes: > On 13/8/06 4:47 pm, "Marco Gerards" wrote: > >> Currently booting is done from EFI in graphics mode. The chipset is >> not running in a VGA compatible mode so I can not switch back to text >> mode using the code in xen/drivers/char/console.c:init_vga. I think >> this can be solved by switching back to VGA mode by programming some >> registers on the card. > > Do you definitely need to poke some of the mmio registers to do this, or > might it be possible via the I/O ports? Right, mmio only as it seems. >> The problem I ran into is that only the first 4 MB (see >> IOREMAP_MBYTES) is usable when using ioremap(). For example, the >> videocard I am using does memory mapped IO at 0x90380000, thus above >> this 4MB. Changing IOREMAP_MBYTES just like that isn't possible >> either, it seems. > > There isn't a proper ioremap() any more, because it wasn't being used for > x86. Right, ioremap just adds an offset to the pointer you provide it with. Which is this 4MB region. >> What would be the right way to change the way ioremap will work, or is >> there an alternative way I can use to get access to this IO memory? > > For now you could add some fixmap entries and use those to map the vga > registers. Alternatively, since you're only doing this at start of day, you > could use some lowmem virtual address to map the registers just for long > enough to reset to vga mode, and then throw away those mappings. Right. What would be the right place and method to add these fixmap entries to do this the right way? I am not yet too familiar with Xen's memory layout. As I see it, I just have to add something to "enum fixed_addresses" and write code similar to the __acpi_map_table function to get this right. Am I correct? Thanks, Marco