[add] laos using xv6-riscv thought

This commit is contained in:
bLueriVerLHR
2023-05-18 00:05:52 +08:00
parent 399c978c09
commit 5d31bf294c
21 changed files with 462 additions and 22 deletions

View File

@@ -3,9 +3,15 @@
#include <cstdint>
#include <cstdlib>
class Device {
protected:
bool cacheable_ = false;
public:
Device() = default;
Device(bool cacheable);
bool is_cacheable();
virtual const size_t &size() const = 0;
@@ -29,7 +35,9 @@ public:
template <typename T>
class WRDevice : public Device{
protected:
size_t devsiz;
public:
WRDevice(size_t siz);

View File

@@ -7,7 +7,7 @@
#include <device.hh>
class SystemBus {
std::map<uint64_t, Device *> iomap;
std::map<uint64_t, Device *> iomap_;
std::pair<const uint64_t, Device *> &finddev(uint64_t addr);