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/cpu.c

40 lines
620 B
C
Raw Normal View History

2019-06-05 19:31:48 +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.
#include <dv/dev.h>
2019-06-05 22:11:45 +02:00
long cpudev_testfn(ctx_t *ctx, dev_t *dev)
2019-06-05 19:48:56 +02:00
{
assert(dev == &cpudev);
rax = 4;
rdx = 3;
2019-06-05 22:11:45 +02:00
return 0;
2019-06-05 19:48:56 +02:00
}
2019-06-05 22:11:45 +02:00
long cpudev_poweron(ctx_t *ctx, dev_t *dev)
2019-06-05 19:48:56 +02:00
{
assert(dev == &cpudev);
dev->fslots[0] = cpudev_testfn;
dev->state = DEVGOOD;
2019-06-05 22:11:45 +02:00
return 0;
2019-06-05 19:48:56 +02:00
}
2019-06-05 19:31:48 +02:00
dev_t cpudev =
{
.type = "cpu",
.name = "K-CPU",
2019-06-05 22:11:45 +02:00
.modl = "Prisma 1",
2019-06-05 19:31:48 +02:00
.vend = "The OS/K Team",
.major = 0,
.minor = 1,
.revis = 0,
2019-06-05 19:48:56 +02:00
.fpwon = cpudev_poweron,
2019-06-05 19:31:48 +02:00
};