j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2007-11-27 01:23:05 +0100 (Tue, 27 Nov 2007) New Revision: 739
Modified: cpu/x86/pc/olpc/gxmsrs.fth cpu/x86/pc/olpc/lxmsrs.fth cpu/x86/pc/olpc/rtcwake.fth Log: OLPC Trac 5128 - Set RTC alarm day, alarm month, and century offset MSRs, and set century byte to 20.
Modified: cpu/x86/pc/olpc/gxmsrs.fth =================================================================== --- cpu/x86/pc/olpc/gxmsrs.fth 2007-11-20 07:40:33 UTC (rev 738) +++ cpu/x86/pc/olpc/gxmsrs.fth 2007-11-27 00:23:05 UTC (rev 739) @@ -291,6 +291,9 @@ \ msr: 5140.004e 00000000.ef2500c0. \ LPC_SIRQ \ msr: 5140.004e 00000000.effd0080. \ LPC_SIRQ msr: 5140.004e 00000000.effd00c0. \ LPC_SIRQ - Active high bit 12 (mouse) and 2 (kbd), Enable, Quiet, 17 frames +msr: 5140.0055 00000000.0000003d. \ RTC alarm day (offset into CMOS RAM) +msr: 5140.0056 00000000.0000003e. \ RTC alarm month (offset into CMOS RAM) +msr: 5140.0057 00000000.00000032. \ RTC century (offset into CMOS RAM)
\ USB host controller msr: 5120.0001 0000000b.00000000. \ USB_GLD_MSR_CONFIG - 5536 page 262
Modified: cpu/x86/pc/olpc/lxmsrs.fth =================================================================== --- cpu/x86/pc/olpc/lxmsrs.fth 2007-11-20 07:40:33 UTC (rev 738) +++ cpu/x86/pc/olpc/lxmsrs.fth 2007-11-27 00:23:05 UTC (rev 739) @@ -241,6 +241,9 @@ \ msr: 5140.004e 00000000.ef2500c0. \ LPC_SIRQ \ msr: 5140.004e 00000000.effd0080. \ LPC_SIRQ msr: 5140.004e 00000000.effd00c0. \ LPC_SIRQ - Active high bit 12 (mouse) and 2 (kbd), Enable, Quiet, 17 frames + msr: 5140.0055 00000000.0000003d. \ RTC alarm day (offset into CMOS RAM) + msr: 5140.0056 00000000.0000003e. \ RTC alarm month (offset into CMOS RAM) + msr: 5140.0057 00000000.00000032. \ RTC century (offset into CMOS RAM)
\ USB host controller msr: 5120.0001 0000000b.00000000. \ USB_GLD_MSR_CONFIG - 5536 page 262
Modified: cpu/x86/pc/olpc/rtcwake.fth =================================================================== --- cpu/x86/pc/olpc/rtcwake.fth 2007-11-20 07:40:33 UTC (rev 738) +++ cpu/x86/pc/olpc/rtcwake.fth 2007-11-27 00:23:05 UTC (rev 739) @@ -4,17 +4,17 @@ : enable-rtc-irq ( -- ) h# a1 pc@ h# fe and h# a1 pc! ; : disable-rtc-irq ( -- ) h# a1 pc@ 1 or h# a1 pc! ;
-0 value cmos-alarm-day \ Offset of day alarm in CMOS -0 value cmos-alarm-month \ Offset of month alarm in CMOS +\ Must agree with lxmsrs.fth +h# 3d constant cmos-alarm-day \ Offset of day alarm in CMOS +h# 3e constant cmos-alarm-month \ Offset of month alarm in CMOS +h# 32 constant cmos-century \ Offset of century byte in CMOS
-: set-alarm-offsets ( -- ) - h# 10. h# 5140.0055 wrmsr - h# 11. h# 5140.0056 wrmsr +dev /rtc + cmos-alarm-day " alarm_day" integer-property + cmos-alarm-month " alarm_month" integer-property + cmos-century " century" integer-property +dend
- h# 5140.0055 rdmsr drop to cmos-alarm-day - h# 5140.0056 rdmsr drop to cmos-alarm-month -; - false value enable-rtc-irq?
: rtc-handler ( -- ) h# c cmos@ drop ." R" ; \ Clear RTC interrupt flags @@ -51,12 +51,15 @@ 0 0 acpi-l! \ Disable RTC SCI ; : rtc-wackup - set-alarm-offsets 0 begin pm-sleep-rtc space dup . (cr 1+ key? until key drop ;
+stand-init: Century + d# 20 cmos-century cmos! +; + \ LICENSE_BEGIN \ Copyright (c) 2007 FirmWorks \