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 19:48:56 +02:00
|
|
|
void cpudev_testfn(ctx_t *ctx, dev_t *dev)
|
|
|
|
{
|
|
|
|
assert(dev == &cpudev);
|
|
|
|
|
|
|
|
rax = 4;
|
|
|
|
rdx = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
void cpudev_poweron(ctx_t *ctx, dev_t *dev)
|
|
|
|
{
|
|
|
|
assert(dev == &cpudev);
|
|
|
|
|
|
|
|
dev->fslots[0] = cpudev_testfn;
|
|
|
|
|
|
|
|
dev->state = DEVGOOD;
|
|
|
|
}
|
|
|
|
|
2019-06-05 19:31:48 +02:00
|
|
|
dev_t cpudev =
|
|
|
|
{
|
|
|
|
.type = "cpu",
|
|
|
|
.name = "K-CPU",
|
|
|
|
.modl = "K-CPU",
|
|
|
|
.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
|
|
|
};
|
|
|
|
|