src/os/linux/vm/os_linux.cpp

Print this page
rev 7258 : 8064611: AARCH64: Changes to HotSpot shared code
Summary: Everything except cpu/ and os_cpu/.
Reviewed-by: kvn

*** 273,282 **** --- 273,284 ---- #ifdef _LP64 static char cpu_arch[] = "sparcv9"; #else static char cpu_arch[] = "sparc"; #endif + #elif defined(AARCH64) + static char cpu_arch[] = "aarch64"; #else #error Add appropriate cpu_arch setting #endif
*** 1924,1933 **** --- 1926,1938 ---- } arch_t; #ifndef EM_486 #define EM_486 6 /* Intel 80486 */ #endif + #ifndef EM_AARCH64 + #define EM_AARCH64 183 /* ARM AARCH64 */ + #endif static const arch_t arch_array[]={ {EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"}, {EM_486, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"}, {EM_IA_64, EM_IA_64, ELFCLASS64, ELFDATA2LSB, (char*)"IA 64"},
*** 1945,1955 **** {EM_S390, EM_S390, ELFCLASSNONE, ELFDATA2MSB, (char*)"IBM System/390"}, {EM_ALPHA, EM_ALPHA, ELFCLASS64, ELFDATA2LSB, (char*)"Alpha"}, {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"}, {EM_MIPS, EM_MIPS, ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"}, {EM_PARISC, EM_PARISC, ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"}, ! {EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"} }; #if (defined IA32) static Elf32_Half running_arch_code=EM_386; #elif (defined AMD64) --- 1950,1961 ---- {EM_S390, EM_S390, ELFCLASSNONE, ELFDATA2MSB, (char*)"IBM System/390"}, {EM_ALPHA, EM_ALPHA, ELFCLASS64, ELFDATA2LSB, (char*)"Alpha"}, {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"}, {EM_MIPS, EM_MIPS, ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"}, {EM_PARISC, EM_PARISC, ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"}, ! {EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"}, ! {EM_AARCH64, EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"}, }; #if (defined IA32) static Elf32_Half running_arch_code=EM_386; #elif (defined AMD64)
*** 1976,1988 **** static Elf32_Half running_arch_code=EM_PARISC; #elif (defined MIPS) static Elf32_Half running_arch_code=EM_MIPS; #elif (defined M68K) static Elf32_Half running_arch_code=EM_68K; #else #error Method os::dll_load requires that one of following is defined:\ ! IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K #endif // Identify compatability class for VM's architecture and library's architecture // Obtain string descriptions for architectures --- 1982,1996 ---- static Elf32_Half running_arch_code=EM_PARISC; #elif (defined MIPS) static Elf32_Half running_arch_code=EM_MIPS; #elif (defined M68K) static Elf32_Half running_arch_code=EM_68K; + #elif (defined AARCH64) + static Elf32_Half running_arch_code=EM_AARCH64; #else #error Method os::dll_load requires that one of following is defined:\ ! IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64 #endif // Identify compatability class for VM's architecture and library's architecture // Obtain string descriptions for architectures
*** 3305,3315 **** // format has been changed), we'll use the largest page size supported by // the processor. #ifndef ZERO large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) ! ARM_ONLY(2 * M) PPC_ONLY(4 * M); #endif // ZERO FILE *fp = fopen("/proc/meminfo", "r"); if (fp) { while (!feof(fp)) { --- 3313,3323 ---- // format has been changed), we'll use the largest page size supported by // the processor. #ifndef ZERO large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) ! ARM_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M); #endif // ZERO FILE *fp = fopen("/proc/meminfo", "r"); if (fp) { while (!feof(fp)) {
*** 5868,5882 **** extern char** environ; #ifndef __NR_fork ! #define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) #endif #ifndef __NR_execve ! #define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) #endif // Run the specified command in a separate process. Return its exit value, // or -1 on failure (e.g. can't fork a new process). // Unlike system(), this function can be called from signal handler. It --- 5876,5890 ---- extern char** environ; #ifndef __NR_fork ! #define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) AARCH64_ONLY(1079) #endif #ifndef __NR_execve ! #define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) AARCH64_ONLY(221) #endif // Run the specified command in a separate process. Return its exit value, // or -1 on failure (e.g. can't fork a new process). // Unlike system(), this function can be called from signal handler. It