diff options
author | Robin Randhawa <robin.randhawa@arm.com> | 2011-12-20 15:54:33 +0000 |
---|---|---|
committer | Robin Randhawa <robin.randhawa@arm.com> | 2011-12-20 15:54:33 +0000 |
commit | 06193b40307e17cf6b675000abb5859838b0c841 (patch) | |
tree | bc792d2f9e8be28dd8ffc2913df4bc0cd6a2b5eb /big-little/virtualisor/virt_setup.c | |
parent | 0656dea51f48c51a57e77187de4d5f66a6ba1337 (diff) |
Updated to release v2.1.
Intended to be the basis for the VSM development.
Diffstat (limited to 'big-little/virtualisor/virt_setup.c')
-rw-r--r-- | big-little/virtualisor/virt_setup.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/big-little/virtualisor/virt_setup.c b/big-little/virtualisor/virt_setup.c index cc90936..c2dd75e 100644 --- a/big-little/virtualisor/virt_setup.c +++ b/big-little/virtualisor/virt_setup.c @@ -1,18 +1,24 @@ /* - * $Copyright: - * ---------------------------------------------------------------- - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2011 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. - * ---------------------------------------------------------------- - * File: virt_setup.c - * ---------------------------------------------------------------- - * $ - */ + * Copyright (c) 2011, ARM Limited. All rights reserved. + * + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the + * above copyright notice, this list of conditions and + * the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of ARM nor the names of its + * contributors may be used to endorse or promote products + * derived from this software without specific prior written + * permission. + */ #include "virt_helpers.h" #include "virtualisor.h" @@ -49,13 +55,14 @@ static unsigned virt_init[NUM_CPUS]; */ unsigned find_sibling_cpu() { - unsigned cpu_no = read_midr(); + unsigned cpu_no = PART_NO(read_midr()); switch (DC_SYSTYPE) { case A15_A15: if(cpu_no == A15) return cpu_no; break; + case A7_A15: case A15_A7: if(cpu_no == A15) return A7; @@ -73,7 +80,7 @@ unsigned find_sibling_cpu() void SetupVirtualisor(unsigned first_cpu) { - unsigned rc = 0, cpu_id = read_cpuid(), cpu_no = read_midr(); + unsigned rc = 0, cpu_id = read_cpuid(), cpu_no = PART_NO(read_midr()); unsigned vd_len = 0, index = 0, cluster_id = read_clusterid(); virt_descriptor *vd_array = &virt_desc_section$$Base; unsigned (*handler) (unsigned, unsigned) = 0x0, sibling; |