| plan 9 kernel history: overview | file list | diff list |
2000/1018/pc/apm.c (diff list | history)
| 2000/1018/sys/src/9/pc/apm.c:1,5 – 2000/1019/sys/src/9/pc/apm.c:1,12 (short | long | prev | next) | ||
|
Bug fix: work around NEC Versa SX hardware issue. Comment edits.
rsc Fri Mar 4 12:44:25 2005 | ||
| 2000/1018 | /* | |
| 2000/1019 | * Interface to Advanced Power Management 1.2 BIOS * * This is, in many ways, a giant hack, and when things settle down * a bit and standardize, hopefully we can write a driver that deals * more directly with the hardware and thus might be a bit cleaner. * * ACPI might be the answer, but at the moment this is simpler * and more widespread. | |
| 2000/1018 | */ #include "u.h" | |
| 2000/1018/sys/src/9/pc/apm.c:39,44 – 2000/1019/sys/src/9/pc/apm.c:46,54 | ||
| 2000/1018 | * type is 0 for system segment, 1 for code/data. * * clearly we know way too much about the memory unit. | |
| 2000/1019 | * however, knowing this much about the memory unit * means that the memory unit need not know anything * about us. | |
| 2000/1018 | * * what a crock. */ | |
| 2000/1018/sys/src/9/pc/apm.c:67,79 – 2000/1019/sys/src/9/pc/apm.c:77,82 | ||
| 2000/1018 | lgdt(ptr); } | |
| 2000/1018/sys/src/9/pc/apm.c:139,144 – 2000/1019/sys/src/9/pc/apm.c:142,154 | ||
| 2000/1018 | print("apm: missing register %s\n", s); return; } | |
| 2000/1019 | /* * The NEC Versa SX bios does not report the correct 16-bit code * segment length when loaded directly from mbr -> 9load (as compared * with going through ld.com). We'll make both code segments 64k-1 bytes. */ esi = 0xFFFFFFFF; | |
| 2000/1018 | /* * We are required by the BIOS to set up three consecutive segments, | |