Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
phoenix-os
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
PhoeniX
phoenix-os
Commits
b27ffd46
Unverified
Commit
b27ffd46
authored
May 28, 2019
by
PhoeniX
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move MMIO to ACPI code
parent
a1f6f81d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
acpi.cpp
src/platform/acpi.cpp
+9
-0
pagetable.hpp
src/platform/include/pagetable.hpp
+0
-9
No files found.
src/platform/acpi.cpp
View file @
b27ffd46
...
...
@@ -17,6 +17,15 @@ ACPI* ACPI::getController() {
return
const_cast
<
ACPI
*>
(
controller
);
}
inline
static
void
MmioWrite32
(
void
*
p
,
uint32_t
data
)
{
Pagetable
::
map
(
p
);
*
reinterpret_cast
<
volatile
uint32_t
*>
(
p
)
=
data
;
}
inline
static
uint32_t
MmioRead32
(
const
void
*
p
)
{
Pagetable
::
map
(
p
);
return
*
reinterpret_cast
<
const
volatile
uint32_t
*>
(
p
);
}
ACPI
::
ACPI
()
{
static
const
void
*
const
ACPI_FIND_START
=
reinterpret_cast
<
const
void
*>
(
0x000e0000
);
static
const
void
*
const
ACPI_FIND_TOP
=
reinterpret_cast
<
const
void
*>
(
0x000fffff
);
...
...
src/platform/include/pagetable.hpp
View file @
b27ffd46
...
...
@@ -76,12 +76,3 @@ class Pagetable {
static
void
*
lowalloc
(
size_t
count
=
1
);
static
void
free
(
void
*
page
);
};
inline
static
void
MmioWrite32
(
void
*
p
,
uint32_t
data
)
{
Pagetable
::
map
(
p
);
*
reinterpret_cast
<
volatile
uint32_t
*>
(
p
)
=
data
;
}
inline
static
uint32_t
MmioRead32
(
const
void
*
p
)
{
Pagetable
::
map
(
p
);
return
*
reinterpret_cast
<
const
volatile
uint32_t
*>
(
p
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment