2019-06-13 23:12:11 +02:00
|
|
|
// The OS/K Team licenses this file to you under the MIT license.
|
|
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
|
2019-06-21 22:19:55 +02:00
|
|
|
#include <pc/device.h>
|
2019-06-13 23:12:11 +02:00
|
|
|
|
2019-08-03 19:01:12 +02:00
|
|
|
long memdev_getmemoff(dev_t *dev)
|
2019-06-14 16:47:01 +02:00
|
|
|
{
|
2019-07-24 16:52:26 +02:00
|
|
|
R(RAX) = MEMOFF;
|
2019-06-14 16:47:01 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-08-03 19:01:12 +02:00
|
|
|
long memdev_getmemsize(dev_t *dev)
|
2019-06-14 16:47:01 +02:00
|
|
|
{
|
2019-07-24 16:52:26 +02:00
|
|
|
R(RAX) = ctx->mz;
|
2019-06-14 16:47:01 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-08-03 19:01:12 +02:00
|
|
|
long memdev_poweron(dev_t *dev)
|
2019-06-13 23:12:11 +02:00
|
|
|
{
|
2019-06-14 16:47:01 +02:00
|
|
|
dev->fslots[0] = memdev_getmemoff;
|
|
|
|
dev->fslots[1] = memdev_getmemsize;
|
|
|
|
|
2019-06-13 23:12:11 +02:00
|
|
|
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,
|
|
|
|
};
|
|
|
|
|