[include][reg.h] define new mmio_read/write accessors

To work properly with some hypervisors on various architectures (ARM,
ARM64, x86), add global routines to allow access to MMIO registers via
architecturally defined accessors.

Add accessors for ARM, ARM64, and x86-32/64. Have the other arches
default to just using whatever the compiler emits.

Will need to generally move things off the legacy REG*() accessors
since they're really not safe going forward with what compilers emit.
This commit is contained in:
Travis Geiselbrecht
2024-05-13 00:28:27 -07:00
parent 356e9adc01
commit 86267ca23c
9 changed files with 275 additions and 9 deletions

View File

@@ -0,0 +1,9 @@
/*
* Copyright (c) 2024 Travis Geiselbrecht
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#pragma once