]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
37839358 A |
6 | * The contents of this file constitute Original Code as defined in and |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
1c79356b | 11 | * |
37839358 A |
12 | * This Original Code and all software distributed under the License are |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
37839358 A |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * Copyright (C) 1990, NeXT, Inc. | |
24 | * | |
25 | * File: next/kern_machdep.c | |
26 | * Author: John Seamons | |
27 | * | |
28 | * Machine-specific kernel routines. | |
1c79356b A |
29 | */ |
30 | ||
31 | #include <sys/types.h> | |
32 | #include <mach/machine.h> | |
33 | #include <kern/cpu_number.h> | |
c0fea474 A |
34 | #include <machine/exec.h> |
35 | #include <machine/machine_routines.h> | |
1c79356b A |
36 | |
37 | /********************************************************************** | |
91447636 | 38 | * Routine: grade_binary() |
1c79356b | 39 | * |
c0fea474 A |
40 | * Function: Keep the API the same between PPC and X86; always say |
41 | * any CPU subtype is OK with us, but only OK CPU types | |
42 | * for which we are actually capable of executing the | |
43 | * binary, either directly or via an imputed interpreter. | |
1c79356b | 44 | **********************************************************************/ |
91447636 | 45 | int |
c0fea474 | 46 | grade_binary(cpu_type_t exectype, cpu_subtype_t execsubtype) |
1c79356b | 47 | { |
c0fea474 A |
48 | switch(exectype) { |
49 | case CPU_TYPE_X86: /* native */ | |
50 | case CPU_TYPE_POWERPC: /* via translator */ | |
51 | return 1; | |
52 | case CPU_TYPE_X86_64: /* native 64-bit */ | |
53 | return (ml_is64bit() && execsubtype == CPU_SUBTYPE_X86_64_ALL) ? 2 : 0; | |
54 | default: /* all other binary types */ | |
1c79356b A |
55 | return 0; |
56 | } | |
57 | } | |
91447636 A |
58 | |
59 | extern void md_prepare_for_shutdown(int, int, char *); | |
60 | ||
61 | void | |
62 | md_prepare_for_shutdown( | |
63 | __unused int paniced, | |
64 | __unused int howto, | |
65 | __unused char * command) | |
66 | { | |
67 | } |