< prev index next >

src/hotspot/cpu/riscv/vm_version_riscv.hpp

Print this page

  1 /*
  2  * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
  3  * Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
  4  * Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
  5  * Copyright (c) 2023, Rivos Inc. All rights reserved.
  6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  7  *
  8  * This code is free software; you can redistribute it and/or modify it
  9  * under the terms of the GNU General Public License version 2 only, as
 10  * published by the Free Software Foundation.
 11  *
 12  * This code is distributed in the hope that it will be useful, but WITHOUT
 13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 15  * version 2 for more details (a copy is included in the LICENSE file that
 16  * accompanied this code).
 17  *
 18  * You should have received a copy of the GNU General Public License version
 19  * 2 along with this work; if not, write to the Free Software Foundation,
 20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 21  *
 22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 23  * or visit www.oracle.com if you need additional information or have any
 24  * questions.
 25  *
 26  */
 27 
 28 #ifndef CPU_RISCV_VM_VERSION_RISCV_HPP
 29 #define CPU_RISCV_VM_VERSION_RISCV_HPP
 30 
 31 #include "runtime/abstract_vm_version.hpp"
 32 #include "runtime/arguments.hpp"
 33 #include "runtime/globals_extension.hpp"
 34 #include "utilities/globalDefinitions.hpp"
 35 #include "utilities/growableArray.hpp"
 36 #include "utilities/sizes.hpp"
 37 
 38 class RiscvHwprobe;
 39 
 40 class VM_Version : public Abstract_VM_Version {
 41   friend RiscvHwprobe;
 42  private:
 43 
 44   // JEDEC encoded as ((bank - 1) << 7) | (0x7f & JEDEC)
 45   enum VendorId {
 46     RIVOS = 0x6cf, // JEDEC: 0x4f, Bank: 14
 47   };
 48 
 49   class RVExtFeatures;
 50 
 51   class RVFeatureValue {
 52     const char* const _pretty;
 53     const bool        _feature_string;
 54     const uint64_t    _linux_feature_bit;
 55 

  1 /*
  2  * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
  3  * Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
  4  * Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
  5  * Copyright (c) 2023, Rivos Inc. All rights reserved.
  6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  7  *
  8  * This code is free software; you can redistribute it and/or modify it
  9  * under the terms of the GNU General Public License version 2 only, as
 10  * published by the Free Software Foundation.
 11  *
 12  * This code is distributed in the hope that it will be useful, but WITHOUT
 13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 15  * version 2 for more details (a copy is included in the LICENSE file that
 16  * accompanied this code).
 17  *
 18  * You should have received a copy of the GNU General Public License version
 19  * 2 along with this work; if not, write to the Free Software Foundation,
 20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 21  *
 22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 23  * or visit www.oracle.com if you need additional information or have any
 24  * questions.
 25  *
 26  */
 27 
 28 #ifndef CPU_RISCV_VM_VERSION_RISCV_HPP
 29 #define CPU_RISCV_VM_VERSION_RISCV_HPP
 30 
 31 #include "runtime/abstract_vm_version.hpp"
 32 #include "runtime/arguments.hpp"
 33 #include "runtime/globals_extension.hpp"
 34 #include "utilities/globalDefinitions.hpp"
 35 #include "utilities/ostream.hpp"
 36 #include "utilities/sizes.hpp"
 37 
 38 class RiscvHwprobe;
 39 
 40 class VM_Version : public Abstract_VM_Version {
 41   friend RiscvHwprobe;
 42  private:
 43 
 44   // JEDEC encoded as ((bank - 1) << 7) | (0x7f & JEDEC)
 45   enum VendorId {
 46     RIVOS = 0x6cf, // JEDEC: 0x4f, Bank: 14
 47   };
 48 
 49   class RVExtFeatures;
 50 
 51   class RVFeatureValue {
 52     const char* const _pretty;
 53     const bool        _feature_string;
 54     const uint64_t    _linux_feature_bit;
 55 
< prev index next >