From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 04/21] arm: use correct attributes for mappings in copy_from_paddr()
Date: Thu, 28 Jun 2012 14:47:52 +0000 [thread overview]
Message-ID: <1340894890-4369-4-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1340894890-4369-1-git-send-email-ian.campbell@citrix.com>
The DTB is in RAM (hence bufferable), kernel is in flash and therefor requires
a device type mapping (hence dev shared).
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: David Vrabel <david.vrabel@citrix.com>
---
xen/arch/arm/kernel.c | 8 ++++----
xen/arch/arm/setup.c | 2 +-
xen/include/asm-arm/setup.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 130d488..2d56130 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -39,7 +39,7 @@ struct minimal_dtb_header {
* @paddr: source physical address
* @len: length to copy
*/
-void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
+void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int attrindx)
{
void *src = (void *)FIXMAP_ADDR(FIXMAP_MISC);
@@ -51,7 +51,7 @@ void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
s = paddr & (PAGE_SIZE-1);
l = min(PAGE_SIZE - s, len);
- set_fixmap(FIXMAP_MISC, p, DEV_SHARED);
+ set_fixmap(FIXMAP_MISC, p, attrindx);
memcpy(dst, src + s, l);
paddr += l;
@@ -111,7 +111,7 @@ static int kernel_try_zimage_prepare(struct kernel_info *info)
/*
* Check for an appended DTB.
*/
- copy_from_paddr(&dtb_hdr, KERNEL_FLASH_ADDRESS + end - start, sizeof(dtb_hdr));
+ copy_from_paddr(&dtb_hdr, KERNEL_FLASH_ADDRESS + end - start, sizeof(dtb_hdr), DEV_SHARED);
if (be32_to_cpu(dtb_hdr.magic) == DTB_MAGIC) {
end += be32_to_cpu(dtb_hdr.total_size);
}
@@ -151,7 +151,7 @@ static int kernel_try_elf_prepare(struct kernel_info *info)
if ( info->kernel_img == NULL )
panic("Cannot allocate temporary buffer for kernel.\n");
- copy_from_paddr(info->kernel_img, KERNEL_FLASH_ADDRESS, KERNEL_FLASH_SIZE);
+ copy_from_paddr(info->kernel_img, KERNEL_FLASH_ADDRESS, KERNEL_FLASH_SIZE, DEV_SHARED);
if ( (rc = elf_init(&info->elf.elf, info->kernel_img, KERNEL_FLASH_SIZE )) != 0 )
return rc;
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index d6c0178..fd70553 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -122,7 +122,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
* TODO: handle other payloads too.
*/
device_tree_flattened = mfn_to_virt(alloc_boot_pages(dtb_pages, 1));
- copy_from_paddr(device_tree_flattened, dtb_paddr, dtb_size);
+ copy_from_paddr(device_tree_flattened, dtb_paddr, dtb_size, BUFFERABLE);
/* Add non-xenheap memory */
init_boot_pages(pfn_to_paddr(xenheap_mfn_start + xenheap_pages),
diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h
index 05ff89e..6433b4e 100644
--- a/xen/include/asm-arm/setup.h
+++ b/xen/include/asm-arm/setup.h
@@ -3,7 +3,7 @@
#include <public/version.h>
-void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len);
+void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int attrindx);
void arch_get_xen_caps(xen_capabilities_info_t *info);
--
1.7.9.1
next prev parent reply other threads:[~2012-06-28 14:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 14:47 [PATCH 0/21 V3] arm: boot a dom1 to "Calibrating delay loop" then hang Ian Campbell
2012-06-28 14:47 ` [PATCH 01/21] arm: allow p2m to be created with specific MATTR Ian Campbell
2012-06-28 14:47 ` [PATCH 02/21] arm: implement vpl011 (UART) emulator Ian Campbell
2012-06-28 14:47 ` [PATCH 03/21] arm: implement vcpu_show_execution_state Ian Campbell
2012-06-28 14:47 ` Ian Campbell [this message]
2012-06-28 14:47 ` [PATCH 05/21] arm: split pending SPIs (global) out from pending PPIs and SGIs (per CPU) Ian Campbell
2012-06-28 14:47 ` [PATCH 06/21] arm: make vgic lock safe for use in interrupt context Ian Campbell
2012-07-02 15:42 ` Stefano Stabellini
2012-06-28 14:47 ` [PATCH 07/21] arm: map GICV in all domains, not just dom0 Ian Campbell
2012-06-28 14:47 ` [PATCH 08/21] arm: enable data-cache at the same time as enabling the MMU, not before Ian Campbell
2012-06-28 14:47 ` [PATCH 09/21] arm: Upgrade guest barriers to Outer-Shareable. Enable Protected Table Walk Ian Campbell
2012-06-28 14:47 ` [PATCH 10/21] arm: gic.lock can be taken in interrupt context, so lock appropriately Ian Campbell
2012-06-28 14:47 ` [PATCH 11/21] arm: context switch virtual timer registers Ian Campbell
2012-06-28 14:48 ` [PATCH 12/21] arm: the hyp timer seems to work in newer model versions, default to using it Ian Campbell
2012-06-28 14:48 ` [PATCH 13/21] arm: unwind allocations etc on arch_domain_create_failure Ian Campbell
2012-06-28 14:48 ` [PATCH 14/21] arm: move PSR flag definitions into interface, for tools use Ian Campbell
2012-06-28 14:48 ` [PATCH 15/21] arm: fix typo s/approprately/appropriately/g Ian Campbell
2012-06-28 14:48 ` [PATCH 16/21] HACK: arm: initial XENMAPSPACE_gmfn_foreign Ian Campbell
2012-06-28 14:48 ` [PATCH 17/21] libxc: add ARM support to xc_dom (PV domain building) Ian Campbell
2012-06-28 14:48 ` [PATCH 18/21] arm: implement VGCF_online Ian Campbell
2012-06-28 14:48 ` [PATCH 19/21] HACK: add simple xcbuild Ian Campbell
2012-06-28 14:48 ` [PATCH 20/21] HACK: arm: disable hypercall continuations Ian Campbell
2012-06-28 14:48 ` [PATCH 21/21] xen: add assertion in default_vcpu0_location to protect against broken masks Ian Campbell
2012-07-03 10:07 ` [PATCH 0/21 V3] arm: boot a dom1 to "Calibrating delay loop" then hang Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340894890-4369-4-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).