From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH V2] xen/arm: UART addresses are not always aligned to a page. Date: Wed, 30 Oct 2013 16:09:17 -0700 Message-ID: <5271919D.9010709@linaro.org> References: <1383167881-29571-1-git-send-email-jfraser@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383167881-29571-1-git-send-email-jfraser@broadcom.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jon Fraser , xen-devel@lists.xen.org Cc: tim@xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 10/30/2013 02:18 PM, Jon Fraser wrote: > When calculating the virtual address of the UART, > add the page offset of the UART to the mapped address. > > Create define EARLY_UART_VIRTUAL_ADDRESS and use instead > of FIXMAP_ADDR(FIXMAP_CONSOLE) > > Signed-off-by: Jon Fraser > --- [...] > diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h > index 5f7c529..759d59a 100644 > --- a/xen/include/asm-arm/early_printk.h > +++ b/xen/include/asm-arm/early_printk.h > @@ -12,6 +12,14 @@ > > #include > > +#ifdef __ASSEMBLY__ > + > +/* need to add the uart address offset in page to the fixmap address */ > +#define EARLY_UART_VIRTUAL_ADDRESS \ > + (FIXMAP_ADDR(FIXMAP_CONSOLE) +(EARLY_UART_BASE_ADDRESS & ~PAGE_MASK)) > + Aside Andrew's comment, you should only define EARLY_UART_VIRTUAL_ADDRESS when EARLY_PRINTK is enabled. -- Julien Grall