diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86_64/include/x86_64/cpu/control_register.hpp | 3 | ||||
| -rw-r--r-- | arch/x86_64/include/x86_64/cpu/model_specific_register.hpp | 3 | ||||
| -rw-r--r-- | arch/x86_64/include/x86_64/device_io/port_io.hpp | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86_64/include/x86_64/cpu/control_register.hpp b/arch/x86_64/include/x86_64/cpu/control_register.hpp index 9c3bad5..67ae87e 100644 --- a/arch/x86_64/include/x86_64/cpu/control_register.hpp +++ b/arch/x86_64/include/x86_64/cpu/control_register.hpp @@ -85,6 +85,9 @@ namespace teachos::cpu::x86_64 template<typename Derived, typename ValueType, typename = void> struct control_register_with_flags { + private: + constexpr control_register_with_flags() noexcept = default; + friend Derived; }; //! @copydoc control_register_with_flags diff --git a/arch/x86_64/include/x86_64/cpu/model_specific_register.hpp b/arch/x86_64/include/x86_64/cpu/model_specific_register.hpp index 857b444..39765fe 100644 --- a/arch/x86_64/include/x86_64/cpu/model_specific_register.hpp +++ b/arch/x86_64/include/x86_64/cpu/model_specific_register.hpp @@ -52,6 +52,9 @@ namespace teachos::cpu::x86_64 template<typename Derived, typename ValueType, typename = void> struct model_specific_register_with_flags { + private: + constexpr model_specific_register_with_flags() noexcept = default; + friend Derived; }; //! @copydoc model_specific_register_with_flags diff --git a/arch/x86_64/include/x86_64/device_io/port_io.hpp b/arch/x86_64/include/x86_64/device_io/port_io.hpp index c3e5271..295a0cd 100644 --- a/arch/x86_64/include/x86_64/device_io/port_io.hpp +++ b/arch/x86_64/include/x86_64/device_io/port_io.hpp @@ -38,6 +38,9 @@ namespace teachos::io::x86_64 } private: + constexpr port_read() noexcept = default; + friend Derived; + //! The assembly templates used for reading from an I/O port. constexpr auto static code = std::array{ std::string_view{"mov %[port], %%dx\nin %%dx, %%al\nmov %%al, %[data]"}, @@ -61,6 +64,9 @@ namespace teachos::io::x86_64 } private: + constexpr port_write() noexcept = default; + friend Derived; + //! The assembly templates used for writing to an I/O port. constexpr auto static code = std::array{ std::string_view{"mov %[port], %%dx\nmov %%dx, %[data]\nout %%al, %%dx"}, |
