alpha: Notice if we're being run under QEMU
When building a generic kernel, do a run-time check on the serial number, like we do for MILO. When building a custom kernel, make this a configure-time check. Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:

committed by
Matt Turner

parent
a47e5bb576
commit
994dcf7055
@@ -115,10 +115,17 @@ unsigned long alpha_agpgart_size = DEFAULT_AGP_APER_SIZE;
|
||||
|
||||
#ifdef CONFIG_ALPHA_GENERIC
|
||||
struct alpha_machine_vector alpha_mv;
|
||||
#endif
|
||||
|
||||
#ifndef alpha_using_srm
|
||||
int alpha_using_srm;
|
||||
EXPORT_SYMBOL(alpha_using_srm);
|
||||
#endif
|
||||
|
||||
#ifndef alpha_using_qemu
|
||||
int alpha_using_qemu;
|
||||
#endif
|
||||
|
||||
static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long,
|
||||
unsigned long);
|
||||
static struct alpha_machine_vector *get_sysvec_byname(const char *);
|
||||
@@ -529,11 +536,15 @@ setup_arch(char **cmdline_p)
|
||||
atomic_notifier_chain_register(&panic_notifier_list,
|
||||
&alpha_panic_block);
|
||||
|
||||
#ifdef CONFIG_ALPHA_GENERIC
|
||||
#ifndef alpha_using_srm
|
||||
/* Assume that we've booted from SRM if we haven't booted from MILO.
|
||||
Detect the later by looking for "MILO" in the system serial nr. */
|
||||
alpha_using_srm = strncmp((const char *)hwrpb->ssn, "MILO", 4) != 0;
|
||||
#endif
|
||||
#ifndef alpha_using_qemu
|
||||
/* Similarly, look for QEMU. */
|
||||
alpha_using_qemu = strstr((const char *)hwrpb->ssn, "QEMU") != 0;
|
||||
#endif
|
||||
|
||||
/* If we are using SRM, we want to allow callbacks
|
||||
as early as possible, so do this NOW, and then
|
||||
|
Reference in New Issue
Block a user