mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
Kernel: Refactor storage stack with u64 as mmap offset
This commit is contained in:
parent
0d8c9024ee
commit
6698fd84ff
15 changed files with 21 additions and 21 deletions
|
@ -173,7 +173,7 @@ UNMAP_AFTER_INIT u32 BXVGADevice::find_framebuffer_address()
|
|||
return framebuffer_address;
|
||||
}
|
||||
|
||||
KResultOr<Region*> BXVGADevice::mmap(Process& process, FileDescription&, const Range& range, size_t offset, int prot, bool shared)
|
||||
KResultOr<Region*> BXVGADevice::mmap(Process& process, FileDescription&, const Range& range, u64 offset, int prot, bool shared)
|
||||
{
|
||||
REQUIRE_PROMISE(video);
|
||||
if (!shared)
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
BXVGADevice();
|
||||
|
||||
virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override;
|
||||
virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, size_t offset, int prot, bool shared) override;
|
||||
virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, u64 offset, int prot, bool shared) override;
|
||||
|
||||
// ^Device
|
||||
virtual mode_t required_mode() const override { return 0660; }
|
||||
|
|
|
@ -51,7 +51,7 @@ UNMAP_AFTER_INIT MBVGADevice::MBVGADevice(PhysicalAddress addr, size_t pitch, si
|
|||
s_the = this;
|
||||
}
|
||||
|
||||
KResultOr<Region*> MBVGADevice::mmap(Process& process, FileDescription&, const Range& range, size_t offset, int prot, bool shared)
|
||||
KResultOr<Region*> MBVGADevice::mmap(Process& process, FileDescription&, const Range& range, u64 offset, int prot, bool shared)
|
||||
{
|
||||
REQUIRE_PROMISE(video);
|
||||
if (!shared)
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
MBVGADevice(PhysicalAddress addr, size_t pitch, size_t width, size_t height);
|
||||
|
||||
virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override;
|
||||
virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, size_t offset, int prot, bool shared) override;
|
||||
virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, u64 offset, int prot, bool shared) override;
|
||||
|
||||
// ^Device
|
||||
virtual mode_t required_mode() const override { return 0660; }
|
||||
|
|
|
@ -52,7 +52,7 @@ void MemoryDevice::did_seek(FileDescription&, off_t)
|
|||
TODO();
|
||||
}
|
||||
|
||||
KResultOr<Region*> MemoryDevice::mmap(Process& process, FileDescription&, const Range& range, size_t offset, int prot, bool shared)
|
||||
KResultOr<Region*> MemoryDevice::mmap(Process& process, FileDescription&, const Range& range, u64 offset, int prot, bool shared)
|
||||
{
|
||||
auto viewed_address = PhysicalAddress(offset);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
MemoryDevice();
|
||||
~MemoryDevice();
|
||||
|
||||
virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, size_t offset, int prot, bool shared) override;
|
||||
virtual KResultOr<Region*> mmap(Process&, FileDescription&, const Range&, u64 offset, int prot, bool shared) override;
|
||||
|
||||
// ^Device
|
||||
virtual mode_t required_mode() const override { return 0660; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue