1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/vm/dv/memdev.c
julianb0 e1299836de
vm
2019-08-03 19:01:12 +02:00

44 lines
686 B
C

// The OS/K Team licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <pc/device.h>
long memdev_getmemoff(dev_t *dev)
{
R(RAX) = MEMOFF;
return 0;
}
long memdev_getmemsize(dev_t *dev)
{
R(RAX) = ctx->mz;
return 0;
}
long memdev_poweron(dev_t *dev)
{
dev->fslots[0] = memdev_getmemoff;
dev->fslots[1] = memdev_getmemsize;
dev->state = DEVGOOD;
return 0;
}
dev_t memdev =
{
.type = "ram",
.name = "K-RAM",
.modl = "",
.vend = "The OS/K Team",
.major = KARCH_MAJOR,
.minor = KARCH_MINOR,
.revis = KARCH_REVIS,
.fpwon = memdev_poweron,
};