-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 333740 b: refs/heads/master c: a0f0dd5 h: refs/heads/master v: v3
- Loading branch information
Russell King
committed
Oct 11, 2012
1 parent
3cab9a8
commit 6a22b3d
Showing
41 changed files
with
622 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 846a136881b8f73c1f74250bf6acfaa309cab1f2 | ||
refs/heads/master: a0f0dd57f4a85310d9936f1770a0424b49fef876 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
ashldi3.S | ||
font.c | ||
lib1funcs.S | ||
hyp-stub.S | ||
piggy.gzip | ||
piggy.lzo | ||
piggy.lzma | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright (c) 2012 Linaro Limited. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
#ifndef VIRT_H | ||
#define VIRT_H | ||
|
||
#include <asm/ptrace.h> | ||
|
||
/* | ||
* Flag indicating that the kernel was not entered in the same mode on every | ||
* CPU. The zImage loader stashes this value in an SPSR, so we need an | ||
* architecturally defined flag bit here (the N flag, as it happens) | ||
*/ | ||
#define BOOT_CPU_MODE_MISMATCH (1<<31) | ||
|
||
#ifndef __ASSEMBLY__ | ||
|
||
#ifdef CONFIG_ARM_VIRT_EXT | ||
/* | ||
* __boot_cpu_mode records what mode the primary CPU was booted in. | ||
* A correctly-implemented bootloader must start all CPUs in the same mode: | ||
* if it fails to do this, the flag BOOT_CPU_MODE_MISMATCH is set to indicate | ||
* that some CPU(s) were booted in a different mode. | ||
* | ||
* This allows the kernel to flag an error when the secondaries have come up. | ||
*/ | ||
extern int __boot_cpu_mode; | ||
|
||
void __hyp_set_vectors(unsigned long phys_vector_base); | ||
unsigned long __hyp_get_vectors(void); | ||
#else | ||
#define __boot_cpu_mode (SVC_MODE) | ||
#endif | ||
|
||
#ifndef ZIMAGE | ||
void hyp_mode_check(void); | ||
|
||
/* Reports the availability of HYP mode */ | ||
static inline bool is_hyp_mode_available(void) | ||
{ | ||
return ((__boot_cpu_mode & MODE_MASK) == HYP_MODE && | ||
!(__boot_cpu_mode & BOOT_CPU_MODE_MISMATCH)); | ||
} | ||
|
||
/* Check if the bootloader has booted CPUs in different modes */ | ||
static inline bool is_hyp_mode_mismatched(void) | ||
{ | ||
return !!(__boot_cpu_mode & BOOT_CPU_MODE_MISMATCH); | ||
} | ||
#endif | ||
|
||
#endif /* __ASSEMBLY__ */ | ||
|
||
#endif /* ! VIRT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.