Opened 15 years ago
Closed 14 years ago
#6061 closed bug (fixed)
[PATCH] Fix OpenFirmware system_time
Reported by: | andreasf | Owned by: | andreasf |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/Boot Loader | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #5240 | |
Platform: | PowerPC |
Description
OpenFirmware-based system_time
implementation returned the number of milliseconds since boot multiplied by 1000. On my PowerMac G3 300 MHz this results in values around 1600000 and due to the limited resolution often to identical values on subsequent boots.
Thus system_time
becomes unusable as a PRNG seed for TCP client ports since the server would be in the Timed Wait state, resulting in a connection timeout.
Attachments (4)
Change History (10)
by , 15 years ago
Attachment: | 0001-Fix-some-line-endings-with-dos2unix.pl.patch added |
---|
comment:1 by , 15 years ago
patch: | 0 → 1 |
---|
by , 15 years ago
Attachment: | 0002-of_milliseconds-returned-0-in-case-of-failure-so-the.patch added |
---|
proposed patch: of_milliseconds would never fail
by , 15 years ago
Attachment: | 0003-system_time-Fall-back-to-get-msecs-if-milliseconds-f.patch added |
---|
optional patch: Besides milliseconds there appears to be a get-msecs
by , 15 years ago
Attachment: | 0004-system_time-Use-get-time-on-rtc-device.patch added |
---|
proposed patch: Use get-time on rtc device
comment:3 by , 15 years ago
The attached patch series first fixes line endings (feel free to run a tool yourself, there may be more files affected - helps keep patches readable), then fixes the return value of of_milliseconds
, optionally makes system_time
fall back to get-msecs
and as main change uses get-time
for system_time
, as done later in the kernel real time clock implementation.
follow-up: 5 comment:4 by , 14 years ago
Patch 4 withdrawn due to errors later on about missing close method (and with of_close
commented out the kernel hanging immediately after load). The preceding patches are not affected and could be reviewed and applied.
comment:5 by , 14 years ago
Sorry for the noise - breakage is no longer reproducible, must've been a side effect of my playings with the frame buffer (e.g., handle vs. package issues).
comment:6 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
Applied a new run of dos2unix.pl
in hrev37265, obsoleting patch 0001.
comment:7 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
proposed patch to fix line endings