// 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 #define MAX_RFRAME_IDX 255 // // Register frales // reg_t **rfs = NULL; size_t rfs_used = 0; long cpudev_testfn(ctx_t *ctx, dev_t *dev) { rax = 4; rdx = 3; return 0; } long cpudev_poweron(ctx_t *ctx, dev_t *dev) { rfs = malloc(sizeof(reg_t *) * (MAX_RFRAME_IDX + 1)); if (rfs == NULL) return -1; dev->state = DEVGOOD; dev->fslots[0] = cpudev_testfn; return 0; } long cpudev_poweroff(ctx_t *ctx, dev_t *dev) { if (rfs) free(rfs); return 0; } dev_t cpudev = { .type = "cpu", .name = "K-CPU", .modl = "Prisma 1", .vend = "The OS/K Team", .major = KARCH_MAJOR, .minor = KARCH_MINOR, .revis = KARCH_REVIS, .fpwon = cpudev_poweron, };