git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: standard vga support (mode switching, framebuffer remapping)
[lunaix-os.git]
/
lunaix-os
/
hal
/
rng
/
rngx86.c
diff --git
a/lunaix-os/hal/rng/rngx86.c
b/lunaix-os/hal/rng/rngx86.c
index bb069d7f61d13025f05ad19a05abd248e360b343..3035f314dc6b238ca3f56afc0c20d791667845ae 100644
(file)
--- a/
lunaix-os/hal/rng/rngx86.c
+++ b/
lunaix-os/hal/rng/rngx86.c
@@
-31,16
+31,18
@@
__rand_rd(struct device* dev, void* buf, size_t offset, size_t len)
int
pdev_randdev_init(struct device_def* devdef)
{
int
pdev_randdev_init(struct device_def* devdef)
{
- struct device* devrand = device_a
ddseq(NULL, NULL, "rand"
);
+ struct device* devrand = device_a
llocseq(NULL, NULL
);
devrand->ops.read = __rand_rd;
devrand->ops.read_page = __rand_rd_pg;
devrand->ops.read = __rand_rd;
devrand->ops.read_page = __rand_rd_pg;
+ device_register(devrand, &devdef->class, "rand");
+
return 0;
}
static struct device_def devrandx86_def = {
return 0;
}
static struct device_def devrandx86_def = {
- .name = "
null
",
- .class = DEVCLASS(DEVIF_SOC, DEVFN_CHAR, DEV_RNG
, 0
),
+ .name = "
x86 On-Chip RNG
",
+ .class = DEVCLASS(DEVIF_SOC, DEVFN_CHAR, DEV_RNG),
.init = pdev_randdev_init
};
EXPORT_DEVICE(randdev, &devrandx86_def, load_earlystage);
\ No newline at end of file
.init = pdev_randdev_init
};
EXPORT_DEVICE(randdev, &devrandx86_def, load_earlystage);
\ No newline at end of file