[Mammoth] Move most classes to the mmth namespace.
This commit is contained in:
parent
5f8d577948
commit
8d730c67c1
42 changed files with 130 additions and 60 deletions
|
|
@ -3,8 +3,8 @@
|
|||
Framebuffer::Framebuffer(const FramebufferInfo& info)
|
||||
: fb_info_(info), cursor_pos_(0) {
|
||||
uint64_t buff_size_bytes = fb_info_.height() * fb_info_.pitch();
|
||||
fb_memory_ = OwnedMemoryRegion::DirectPhysical(fb_info_.address_phys(),
|
||||
buff_size_bytes);
|
||||
fb_memory_ = mmth::OwnedMemoryRegion::DirectPhysical(fb_info_.address_phys(),
|
||||
buff_size_bytes);
|
||||
fb_ = reinterpret_cast<uint32_t*>(fb_memory_.vaddr());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class Framebuffer {
|
|||
// don't have to store a reference here.
|
||||
const FramebufferInfo& fb_info_;
|
||||
|
||||
OwnedMemoryRegion fb_memory_;
|
||||
mmth::OwnedMemoryRegion fb_memory_;
|
||||
uint32_t* fb_;
|
||||
uint32_t cursor_pos_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const uint32_t kMagic = 0x864AB572;
|
|||
|
||||
}
|
||||
|
||||
Psf::Psf(OwnedMemoryRegion&& psf_file)
|
||||
Psf::Psf(mmth::OwnedMemoryRegion&& psf_file)
|
||||
: psf_file_(glcr::Move(psf_file)),
|
||||
header_(reinterpret_cast<PsfHeader*>(psf_file_.vaddr())) {
|
||||
EnsureValid();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ struct PsfHeader {
|
|||
|
||||
class Psf {
|
||||
public:
|
||||
Psf(OwnedMemoryRegion&& psf_file);
|
||||
Psf(mmth::OwnedMemoryRegion&& psf_file);
|
||||
|
||||
void DumpHeader();
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ class Psf {
|
|||
}
|
||||
|
||||
private:
|
||||
OwnedMemoryRegion psf_file_;
|
||||
mmth::OwnedMemoryRegion psf_file_;
|
||||
PsfHeader* header_;
|
||||
|
||||
void EnsureValid();
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ uint64_t main(uint64_t init_port) {
|
|||
OpenFileResponse fresp;
|
||||
check(vfs.OpenFile(freq, fresp));
|
||||
|
||||
Psf psf(OwnedMemoryRegion::FromCapability(fresp.memory()));
|
||||
Psf psf(mmth::OwnedMemoryRegion::FromCapability(fresp.memory()));
|
||||
psf.DumpHeader();
|
||||
|
||||
Console console(fbuf, psf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue