PERFORCE change 52155 for review
John Baldwin
jhb at FreeBSD.org
Mon May 3 12:07:23 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=52155
Change 52155 by jhb at jhb_slimer on 2004/05/03 12:06:32
IFC @52154.
Affected files ...
.. //depot/projects/power/sys/dev/acpica/acpi_video.c#3 edit
.. //depot/projects/power/sys/isa/vga_isa.c#4 edit
.. //depot/user/jhb/acpipci/alpha/alpha/pmap.c#19 integrate
.. //depot/user/jhb/acpipci/alpha/conf/GENERIC#13 integrate
.. //depot/user/jhb/acpipci/alpha/include/float.h#4 integrate
.. //depot/user/jhb/acpipci/amd64/acpica/acpi_machdep.c#7 integrate
.. //depot/user/jhb/acpipci/amd64/conf/GENERIC#15 integrate
.. //depot/user/jhb/acpipci/amd64/include/float.h#3 integrate
.. //depot/user/jhb/acpipci/boot/i386/boot0/Makefile#6 integrate
.. //depot/user/jhb/acpipci/boot/i386/boot0/boot0.S#1 branch
.. //depot/user/jhb/acpipci/boot/i386/boot0/boot0.s#6 delete
.. //depot/user/jhb/acpipci/boot/i386/boot0/boot0ext.S#1 branch
.. //depot/user/jhb/acpipci/boot/i386/boot0/boot0ext.s#3 delete
.. //depot/user/jhb/acpipci/boot/i386/boot0/boot0sio.s#3 delete
.. //depot/user/jhb/acpipci/boot/i386/boot0ext/Makefile#2 integrate
.. //depot/user/jhb/acpipci/boot/i386/boot0sio/Makefile#3 integrate
.. //depot/user/jhb/acpipci/boot/i386/boot2/boot1.S#2 integrate
.. //depot/user/jhb/acpipci/boot/i386/boot2/sio.S#2 integrate
.. //depot/user/jhb/acpipci/boot/i386/btx/btx/Makefile#4 integrate
.. //depot/user/jhb/acpipci/boot/i386/btx/btx/btx.S#2 integrate
.. //depot/user/jhb/acpipci/boot/i386/btx/btxldr/Makefile#5 integrate
.. //depot/user/jhb/acpipci/boot/i386/btx/btxldr/btxldr.S#2 integrate
.. //depot/user/jhb/acpipci/boot/i386/cdboot/Makefile#4 integrate
.. //depot/user/jhb/acpipci/boot/i386/libi386/amd64_tramp.S#3 integrate
.. //depot/user/jhb/acpipci/boot/i386/mbr/Makefile#4 integrate
.. //depot/user/jhb/acpipci/boot/i386/pxeldr/Makefile#6 integrate
.. //depot/user/jhb/acpipci/boot/i386/pxeldr/pxeldr.S#2 integrate
.. //depot/user/jhb/acpipci/boot/pc98/boot2/serial_16550.S#2 integrate
.. //depot/user/jhb/acpipci/boot/pc98/boot2/serial_8251.S#2 integrate
.. //depot/user/jhb/acpipci/boot/pc98/btx/btx/Makefile#4 integrate
.. //depot/user/jhb/acpipci/boot/pc98/btx/btx/btx.S#2 integrate
.. //depot/user/jhb/acpipci/boot/pc98/btx/btxldr/Makefile#4 integrate
.. //depot/user/jhb/acpipci/boot/pc98/btx/btxldr/btxldr.S#2 integrate
.. //depot/user/jhb/acpipci/cam/scsi/scsi_da.c#21 integrate
.. //depot/user/jhb/acpipci/compat/freebsd32/freebsd32_misc.c#9 integrate
.. //depot/user/jhb/acpipci/compat/ndis/kern_ndis.c#12 integrate
.. //depot/user/jhb/acpipci/compat/ndis/ntoskrnl_var.h#9 integrate
.. //depot/user/jhb/acpipci/compat/ndis/subr_hal.c#7 integrate
.. //depot/user/jhb/acpipci/compat/ndis/subr_ntoskrnl.c#12 integrate
.. //depot/user/jhb/acpipci/conf/NOTES#40 integrate
.. //depot/user/jhb/acpipci/conf/files#47 integrate
.. //depot/user/jhb/acpipci/conf/files.amd64#14 integrate
.. //depot/user/jhb/acpipci/conf/files.i386#48 integrate
.. //depot/user/jhb/acpipci/conf/files.pc98#22 integrate
.. //depot/user/jhb/acpipci/conf/files.sparc64#15 integrate
.. //depot/user/jhb/acpipci/conf/kern.pre.mk#19 integrate
.. //depot/user/jhb/acpipci/conf/majors#24 integrate
.. //depot/user/jhb/acpipci/conf/options#35 integrate
.. //depot/user/jhb/acpipci/conf/options.sparc64#6 integrate
.. //depot/user/jhb/acpipci/contrib/pf/net/pf.c#5 integrate
.. //depot/user/jhb/acpipci/contrib/pf/net/pf_ioctl.c#4 integrate
.. //depot/user/jhb/acpipci/contrib/pf/net/pf_norm.c#3 integrate
.. //depot/user/jhb/acpipci/dev/acpica/Osd/OsdTable.c#6 integrate
.. //depot/user/jhb/acpipci/dev/acpica/acpi.c#42 integrate
.. //depot/user/jhb/acpipci/dev/acpica/acpi_acad.c#10 integrate
.. //depot/user/jhb/acpipci/dev/acpica/acpi_cpu.c#23 integrate
.. //depot/user/jhb/acpipci/dev/acpica/acpi_pci.c#21 integrate
.. //depot/user/jhb/acpipci/dev/acpica/acpi_timer.c#8 integrate
.. //depot/user/jhb/acpipci/dev/acpica/acpivar.h#30 integrate
.. //depot/user/jhb/acpipci/dev/asr/asr.c#12 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-all.c#22 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-all.h#18 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-chipset.c#25 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-commands.h#2 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-disk.h#7 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-isa.c#12 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-lowlevel.c#15 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-pci.c#19 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-pci.h#16 integrate
.. //depot/user/jhb/acpipci/dev/ata/ata-queue.c#13 integrate
.. //depot/user/jhb/acpipci/dev/ata/atapi-cd.h#9 integrate
.. //depot/user/jhb/acpipci/dev/ata/atapi-fd.h#7 integrate
.. //depot/user/jhb/acpipci/dev/ata/atapi-tape.h#5 integrate
.. //depot/user/jhb/acpipci/dev/ciss/ciss.c#23 integrate
.. //depot/user/jhb/acpipci/dev/ciss/cissreg.h#6 integrate
.. //depot/user/jhb/acpipci/dev/cy/cy.c#1 branch
.. //depot/user/jhb/acpipci/dev/cy/cy_isa.c#1 branch
.. //depot/user/jhb/acpipci/dev/cy/cy_pci.c#1 branch
.. //depot/user/jhb/acpipci/dev/cy/cyreg.h#1 branch
.. //depot/user/jhb/acpipci/dev/cy/cyvar.h#1 branch
.. //depot/user/jhb/acpipci/dev/gem/if_gem.c#10 integrate
.. //depot/user/jhb/acpipci/dev/hfa/fore_load.c#5 delete
.. //depot/user/jhb/acpipci/dev/ic/cd1400.h#1 branch
.. //depot/user/jhb/acpipci/dev/if_ndis/if_ndis.c#12 integrate
.. //depot/user/jhb/acpipci/dev/led/led.c#7 integrate
.. //depot/user/jhb/acpipci/dev/mii/brgphy.c#10 integrate
.. //depot/user/jhb/acpipci/dev/mii/dcphy.c#7 integrate
.. //depot/user/jhb/acpipci/dev/mii/e1000phy.c#6 integrate
.. //depot/user/jhb/acpipci/dev/mii/mii.c#6 integrate
.. //depot/user/jhb/acpipci/dev/mii/mii_physubr.c#5 integrate
.. //depot/user/jhb/acpipci/dev/mii/mlphy.c#5 integrate
.. //depot/user/jhb/acpipci/dev/mii/rgephy.c#2 integrate
.. //depot/user/jhb/acpipci/dev/mii/ruephy.c#3 integrate
.. //depot/user/jhb/acpipci/dev/mii/tlphy.c#6 integrate
.. //depot/user/jhb/acpipci/dev/mii/xmphy.c#6 integrate
.. //depot/user/jhb/acpipci/dev/pccbb/pccbb.c#23 integrate
.. //depot/user/jhb/acpipci/dev/pci/pci.c#40 integrate
.. //depot/user/jhb/acpipci/dev/puc/pucdata.c#16 integrate
.. //depot/user/jhb/acpipci/dev/sio/sio.c#23 integrate
.. //depot/user/jhb/acpipci/dev/sio/sio_ebus.c#4 delete
.. //depot/user/jhb/acpipci/dev/sound/pci/cmi.c#12 integrate
.. //depot/user/jhb/acpipci/dev/sound/pcm/buffer.c#8 integrate
.. //depot/user/jhb/acpipci/dev/uart/uart_dev_sab82532.c#4 integrate
.. //depot/user/jhb/acpipci/dev/usb/if_axe.c#10 integrate
.. //depot/user/jhb/acpipci/dev/usb/usbdevs#25 integrate
.. //depot/user/jhb/acpipci/dev/usb/usbdevs.h#24 integrate
.. //depot/user/jhb/acpipci/dev/usb/usbdevs_data.h#24 integrate
.. //depot/user/jhb/acpipci/dev/usb/uvscom.c#10 integrate
.. //depot/user/jhb/acpipci/dev/vinum/vinumio.c#13 integrate
.. //depot/user/jhb/acpipci/geom/concat/g_concat.c#3 integrate
.. //depot/user/jhb/acpipci/geom/gate/g_gate.c#1 branch
.. //depot/user/jhb/acpipci/geom/gate/g_gate.h#1 branch
.. //depot/user/jhb/acpipci/geom/geom_gpt.c#11 integrate
.. //depot/user/jhb/acpipci/i386/acpica/acpi_asus.c#1 branch
.. //depot/user/jhb/acpipci/i386/acpica/acpi_machdep.c#21 integrate
.. //depot/user/jhb/acpipci/i386/conf/GENERIC#27 integrate
.. //depot/user/jhb/acpipci/i386/conf/NOTES#33 integrate
.. //depot/user/jhb/acpipci/i386/i386/elan-mmcr.c#17 integrate
.. //depot/user/jhb/acpipci/i386/i386/mptable_pci.c#9 integrate
.. //depot/user/jhb/acpipci/i386/include/float.h#5 integrate
.. //depot/user/jhb/acpipci/i386/include/legacyvar.h#11 integrate
.. //depot/user/jhb/acpipci/i386/isa/atpic.c#69 integrate
.. //depot/user/jhb/acpipci/i386/isa/clock.c#30 integrate
.. //depot/user/jhb/acpipci/i386/isa/cy.c#10 delete
.. //depot/user/jhb/acpipci/i386/isa/cyreg.h#2 delete
.. //depot/user/jhb/acpipci/i386/isa/ic/cd1400.h#2 delete
.. //depot/user/jhb/acpipci/i386/pci/pci_bus.c#41 integrate
.. //depot/user/jhb/acpipci/ia64/acpica/acpi_machdep.c#6 integrate
.. //depot/user/jhb/acpipci/ia64/acpica/madt.c#7 integrate
.. //depot/user/jhb/acpipci/ia64/conf/GENERIC#14 integrate
.. //depot/user/jhb/acpipci/ia64/conf/SKI#10 integrate
.. //depot/user/jhb/acpipci/ia64/ia64/trap.c#20 integrate
.. //depot/user/jhb/acpipci/ia64/include/float.h#5 integrate
.. //depot/user/jhb/acpipci/isa/fd.c#19 integrate
.. //depot/user/jhb/acpipci/kern/imgact_elf.c#18 integrate
.. //depot/user/jhb/acpipci/kern/kern_clock.c#12 integrate
.. //depot/user/jhb/acpipci/kern/kern_environment.c#6 integrate
.. //depot/user/jhb/acpipci/kern/kern_exec.c#30 integrate
.. //depot/user/jhb/acpipci/kern/kern_jail.c#12 integrate
.. //depot/user/jhb/acpipci/kern/kern_thread.c#39 integrate
.. //depot/user/jhb/acpipci/kern/kern_timeout.c#12 integrate
.. //depot/user/jhb/acpipci/kern/link_elf_obj.c#1 branch
.. //depot/user/jhb/acpipci/kern/sched_ule.c#28 integrate
.. //depot/user/jhb/acpipci/kern/subr_sleepqueue.c#3 integrate
.. //depot/user/jhb/acpipci/kern/vfs_export.c#7 integrate
.. //depot/user/jhb/acpipci/kern/vfs_syscalls.c#26 integrate
.. //depot/user/jhb/acpipci/modules/Makefile#37 integrate
.. //depot/user/jhb/acpipci/modules/acpi/Makefile#17 integrate
.. //depot/user/jhb/acpipci/modules/acpi/acpi/Makefile#4 integrate
.. //depot/user/jhb/acpipci/modules/acpi/acpi_asus/Makefile#1 branch
.. //depot/user/jhb/acpipci/modules/asr/Makefile#2 integrate
.. //depot/user/jhb/acpipci/modules/geom/geom_gate/Makefile#1 branch
.. //depot/user/jhb/acpipci/modules/ipfilter/Makefile#3 integrate
.. //depot/user/jhb/acpipci/modules/netgraph/Makefile#10 integrate
.. //depot/user/jhb/acpipci/modules/sio/Makefile#2 integrate
.. //depot/user/jhb/acpipci/net/bridge.c#12 integrate
.. //depot/user/jhb/acpipci/net/if.c#22 integrate
.. //depot/user/jhb/acpipci/net/if.h#8 integrate
.. //depot/user/jhb/acpipci/net/if_arcsubr.c#9 integrate
.. //depot/user/jhb/acpipci/net/if_atmsubr.c#13 integrate
.. //depot/user/jhb/acpipci/net/if_ethersubr.c#22 integrate
.. //depot/user/jhb/acpipci/net/if_fddisubr.c#12 integrate
.. //depot/user/jhb/acpipci/net/if_gre.c#14 integrate
.. //depot/user/jhb/acpipci/net/if_iso88025subr.c#13 integrate
.. //depot/user/jhb/acpipci/net/if_var.h#14 integrate
.. //depot/user/jhb/acpipci/net/if_vlan.c#14 integrate
.. //depot/user/jhb/acpipci/net/radix.c#8 integrate
.. //depot/user/jhb/acpipci/net/route.c#17 integrate
.. //depot/user/jhb/acpipci/net/route.h#10 integrate
.. //depot/user/jhb/acpipci/net/rtsock.c#16 integrate
.. //depot/user/jhb/acpipci/netatalk/aarp.c#11 integrate
.. //depot/user/jhb/acpipci/netatalk/at_extern.h#3 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/common/ng_bluetooth.c#3 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#5 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/drivers/h4/ng_h4.c#5 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/drivers/ubt/ng_ubt.c#9 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/hci/ng_hci_cmds.c#5 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/hci/ng_hci_evnt.c#6 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/hci/ng_hci_main.c#3 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/hci/ng_hci_misc.c#6 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/hci/ng_hci_ulpi.c#6 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c#4 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c#6 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c#6 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/l2cap/ng_l2cap_main.c#3 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/l2cap/ng_l2cap_misc.c#6 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c#4 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/socket/ng_btsocket.c#6 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#10 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#9 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#8 integrate
.. //depot/user/jhb/acpipci/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#5 integrate
.. //depot/user/jhb/acpipci/netgraph/ng_parse.c#5 integrate
.. //depot/user/jhb/acpipci/netgraph/ng_pptpgre.c#7 integrate
.. //depot/user/jhb/acpipci/netgraph/ng_pptpgre.h#3 integrate
.. //depot/user/jhb/acpipci/netinet/if_ether.c#11 integrate
.. //depot/user/jhb/acpipci/netinet/in_pcb.c#22 integrate
.. //depot/user/jhb/acpipci/netinet/ip_fastfwd.c#6 integrate
.. //depot/user/jhb/acpipci/netinet/ip_fw.h#11 integrate
.. //depot/user/jhb/acpipci/netinet/ip_fw2.c#27 integrate
.. //depot/user/jhb/acpipci/netinet/ip_input.c#27 integrate
.. //depot/user/jhb/acpipci/netinet/ip_output.c#24 integrate
.. //depot/user/jhb/acpipci/netinet/ip_var.h#15 integrate
.. //depot/user/jhb/acpipci/netinet/raw_ip.c#17 integrate
.. //depot/user/jhb/acpipci/netinet/tcp_hostcache.c#4 integrate
.. //depot/user/jhb/acpipci/netinet/tcp_input.c#26 integrate
.. //depot/user/jhb/acpipci/netinet/tcp_subr.c#24 integrate
.. //depot/user/jhb/acpipci/netinet/tcp_var.h#13 integrate
.. //depot/user/jhb/acpipci/netinet6/nd6.c#13 integrate
.. //depot/user/jhb/acpipci/netipsec/key.c#9 integrate
.. //depot/user/jhb/acpipci/netipsec/xform_tcp.c#2 integrate
.. //depot/user/jhb/acpipci/pc98/conf/GENERIC#21 integrate
.. //depot/user/jhb/acpipci/pc98/conf/NOTES#25 integrate
.. //depot/user/jhb/acpipci/pc98/pc98/fd.c#16 integrate
.. //depot/user/jhb/acpipci/pc98/pc98/sio.c#20 integrate
.. //depot/user/jhb/acpipci/pci/agp.c#17 integrate
.. //depot/user/jhb/acpipci/pci/agp_i810.c#14 integrate
.. //depot/user/jhb/acpipci/pci/amdpm.c#7 integrate
.. //depot/user/jhb/acpipci/pci/cy_pci.c#6 delete
.. //depot/user/jhb/acpipci/powerpc/conf/GENERIC#11 integrate
.. //depot/user/jhb/acpipci/powerpc/include/float.h#5 integrate
.. //depot/user/jhb/acpipci/powerpc/include/param.h#8 integrate
.. //depot/user/jhb/acpipci/powerpc/include/pmap.h#7 integrate
.. //depot/user/jhb/acpipci/powerpc/powermac/ata_kauai.c#4 integrate
.. //depot/user/jhb/acpipci/powerpc/powermac/ata_macio.c#9 integrate
.. //depot/user/jhb/acpipci/sparc64/conf/GENERIC#16 integrate
.. //depot/user/jhb/acpipci/sparc64/conf/NOTES#5 integrate
.. //depot/user/jhb/acpipci/sparc64/ebus/ebus.c#8 integrate
.. //depot/user/jhb/acpipci/sparc64/include/float.h#4 integrate
.. //depot/user/jhb/acpipci/sparc64/include/nexusvar.h#2 integrate
.. //depot/user/jhb/acpipci/sparc64/isa/ofw_isa.c#4 integrate
.. //depot/user/jhb/acpipci/sparc64/isa/ofw_isa.h#3 integrate
.. //depot/user/jhb/acpipci/sparc64/pci/psycho.c#13 integrate
.. //depot/user/jhb/acpipci/sparc64/pci/psychoreg.h#5 integrate
.. //depot/user/jhb/acpipci/sparc64/pci/psychovar.h#7 integrate
.. //depot/user/jhb/acpipci/sparc64/sparc64/identcpu.c#5 integrate
.. //depot/user/jhb/acpipci/sparc64/sparc64/iommu.c#14 integrate
.. //depot/user/jhb/acpipci/sparc64/sparc64/nexus.c#5 integrate
.. //depot/user/jhb/acpipci/sparc64/sparc64/ofw_machdep.c#6 integrate
.. //depot/user/jhb/acpipci/sys/callout.h#3 integrate
.. //depot/user/jhb/acpipci/sys/imgact.h#7 integrate
.. //depot/user/jhb/acpipci/sys/jail.h#5 integrate
.. //depot/user/jhb/acpipci/sys/mbuf.h#20 integrate
.. //depot/user/jhb/acpipci/sys/mman.h#7 integrate
.. //depot/user/jhb/acpipci/sys/proc.h#47 integrate
.. //depot/user/jhb/acpipci/sys/types.h#14 integrate
.. //depot/user/jhb/acpipci/ufs/ffs/ffs_vfsops.c#22 integrate
.. //depot/user/jhb/acpipci/vm/device_pager.c#9 integrate
.. //depot/user/jhb/acpipci/vm/phys_pager.c#7 integrate
.. //depot/user/jhb/acpipci/vm/vm_kern.c#19 integrate
.. //depot/user/jhb/acpipci/vm/vm_map.c#32 integrate
.. //depot/user/jhb/acpipci/vm/vm_map.h#14 integrate
.. //depot/user/jhb/acpipci/vm/vm_page.c#25 integrate
.. //depot/user/jhb/acpipci/vm/vnode_pager.c#19 integrate
.. //depot/user/jhb/libdisk/lib/libdisk/contents_map.hpp#2 edit
.. //depot/user/jhb/libdisk/lib/libdisk/geom_tree.cpp#2 edit
Differences ...
==== //depot/projects/power/sys/dev/acpica/acpi_video.c#3 (text+ko) ====
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2002-2003 Taku YAMAMOTO <taku at cent.saitama-u.ac.jp>
+ * Copyright (c) 2004 Benjamin Close <Benjamin.Close at clearchain.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,10 +35,33 @@
#include <sys/power.h>
#include <sys/queue.h>
#include <sys/sysctl.h>
+#ifdef __i386__
+#include <machine/vm86.h>
+#endif
#include "acpi.h"
#include <dev/acpica/acpivar.h>
+#ifdef __i386__
+#define USE_DPMS
+
+/*
+ * VESA DPMS States
+ */
+#define DPMS_ON 0x00
+#define DPMS_STANDBY 0x01
+#define DPMS_SUSPEND 0x02
+#define DPMS_OFF 0x04
+#define DPMS_REDUCEDON 0x08
+
+#define VBE_DPMS_FUNCTION 0x4F10
+#define VBE_DPMS_GET_SUPPORTED_STATES 0x00
+#define VBE_DPMS_GET_STATE 0x02
+#define VBE_DPMS_SET_STATE 0x01
+#define VBE_MAJORVERSION_MASK 0x0F
+#define VBE_MINORVERSION_MASK 0xF0
+#endif
+
/* ACPI video extension driver. */
struct acpi_video_output {
ACPI_HANDLE handle;
@@ -63,6 +87,10 @@
ACPI_HANDLE handle;
STAILQ_HEAD(, acpi_video_output) vid_outputs;
eventhandler_tag vid_pwr_evh;
+#ifdef USE_DPMS
+ int vid_dpms_supported_states;
+ int vid_dpms_initial_state;
+#endif
};
/* interfaces */
@@ -71,6 +99,8 @@
static int acpi_video_attach(device_t);
static int acpi_video_detach(device_t);
static int acpi_video_shutdown(device_t);
+static int acpi_video_suspend(device_t);
+static int acpi_video_resume(device_t);
static void acpi_video_notify_handler(ACPI_HANDLE, UINT32, void *);
static void acpi_video_power_profile(void *);
static void acpi_video_bind_outputs(struct acpi_video_softc *);
@@ -94,6 +124,11 @@
static UINT32 vo_get_device_status(ACPI_HANDLE);
static UINT32 vo_query_graphics_state(ACPI_HANDLE);
static void vo_set_device_state(ACPI_HANDLE, UINT32);
+#ifdef USE_DPMS
+static int dpms_get_supported_states(int *);
+static int dpms_get_current_state(int *);
+static int dpms_set_state(int);
+#endif
/* events */
#define VID_NOTIFY_SWITCHED 0x80
@@ -141,6 +176,8 @@
DEVMETHOD(device_attach, acpi_video_attach),
DEVMETHOD(device_detach, acpi_video_detach),
DEVMETHOD(device_shutdown, acpi_video_shutdown),
+ DEVMETHOD(device_resume, acpi_video_resume),
+ DEVMETHOD(device_suspend, acpi_video_suspend),
{ 0, 0 }
};
@@ -242,6 +279,13 @@
ACPI_UNLOCK;
acpi_video_power_profile(sc);
+#ifdef USE_DPMS
+ if (dpms_get_supported_states(&sc->vid_dpms_supported_states) == 0)
+ dpms_get_current_state(&sc->vid_dpms_initial_state);
+ else
+ sc->vid_dpms_supported_states = -1;
+#endif
+
return (0);
}
@@ -283,6 +327,32 @@
return (0);
}
+static int
+acpi_video_suspend(device_t dev)
+{
+ struct acpi_video_softc *sc;
+
+ sc = device_get_softc(dev);
+#ifdef USE_DPMS
+ if (sc->vid_dpms_supported_states != -1)
+ dpms_set_state(DPMS_OFF);
+#endif
+ return (0);
+}
+
+static int
+acpi_video_resume(device_t dev)
+{
+ struct acpi_video_softc *sc;
+
+ sc = device_get_softc(dev);
+#ifdef USE_DPMS
+ if (sc->vid_dpms_supported_states != -1)
+ dpms_set_state(sc->vid_dpms_initial_state);
+#endif
+ return (0);
+}
+
static void
acpi_video_notify_handler(ACPI_HANDLE handle __unused, UINT32 notify, void *context)
{
@@ -929,3 +999,49 @@
printf("can't evaluate %s._DSS - %s\n",
acpi_name(handle), AcpiFormatException(status));
}
+
+#ifdef USE_DPMS
+/* XXX: Requires VM86 support in the kernel. */
+static int
+dpms_call_bios(int subfunction, int *bh)
+{
+ struct vm86frame vmf;
+ int error;
+
+ bzero(&vmf, sizeof(vmf));
+ vmf.vmf_ax = VBE_DPMS_FUNCTION;
+ vmf.vmf_bl = subfunction;
+ vmf.vmf_bh = *bh;
+ vmf.vmf_es = 0;
+ vmf.vmf_di = 0;
+ error = vm86_intcall(0x10, &vmf);
+ if (error == 0 && (vmf.vmf_eax & 0xffff) != 0x004f)
+ error = ENXIO;
+ if (error == 0)
+ *bh = vmf.vmf_bh;
+ return (error);
+}
+
+static int
+dpms_get_supported_states(int *states)
+{
+
+ *states = 0;
+ return (dpms_call_bios(VBE_DPMS_GET_SUPPORTED_STATES, states));
+}
+
+static int
+dpms_get_current_state(int *state)
+{
+
+ *state = 0;
+ return (dpms_call_bios(VBE_DPMS_GET_STATE, state));
+}
+
+static int
+dpms_set_state(int state)
+{
+
+ return (dpms_call_bios(VBE_DPMS_SET_STATE, &state));
+}
+#endif
==== //depot/projects/power/sys/isa/vga_isa.c#4 (text+ko) ====
@@ -159,6 +159,26 @@
return 0;
}
+static int
+isavga_suspend(device_t dev)
+{
+ vga_softc_t *sc;
+
+ sc = device_get_softc(dev);
+ (*vidsw[sc->adp->va_index]->blank_display)(sc->adp, V_DISPLAY_SUSPEND);
+ return (0);
+}
+
+static int
+isavga_resume(device_t dev)
+{
+ vga_softc_t *sc;
+
+ sc = device_get_softc(dev);
+ (*vidsw[sc->adp->va_index]->blank_display)(sc->adp, V_DISPLAY_ON);
+ return (0);
+}
+
#ifdef FB_INSTALL_CDEV
static int
@@ -203,6 +223,8 @@
DEVMETHOD(device_identify, isavga_identify),
DEVMETHOD(device_probe, isavga_probe),
DEVMETHOD(device_attach, isavga_attach),
+ DEVMETHOD(device_suspend, isavga_suspend),
+ DEVMETHOD(device_resume, isavga_resume),
DEVMETHOD(bus_print_child, bus_generic_print_child),
{ 0, 0 }
==== //depot/user/jhb/acpipci/alpha/alpha/pmap.c#19 (text+ko) ====
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.143 2004/04/11 05:08:26 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.146 2004/04/26 17:49:05 gallatin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1074,7 +1074,7 @@
*/
VM_OBJECT_LOCK(pmap->pm_pteobj);
lev1pg = vm_page_grab(pmap->pm_pteobj, NUSERLEV3MAPS + NUSERLEV2MAPS,
- VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
+ VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO);
vm_page_lock_queues();
vm_page_flag_clear(lev1pg, PG_BUSY);
@@ -1083,10 +1083,7 @@
VM_OBJECT_UNLOCK(pmap->pm_pteobj);
pmap->pm_lev1 = (pt_entry_t*) ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(lev1pg));
- if ((lev1pg->flags & PG_ZERO) == 0)
- bzero(pmap->pm_lev1, PAGE_SIZE);
-
/* install self-referential address mapping entry (not PG_ASM) */
pmap->pm_lev1[PTLEV1I] = pmap_phys_to_pte(VM_PAGE_TO_PHYS(lev1pg))
| PG_V | PG_KRE | PG_KWE;
@@ -1194,8 +1191,6 @@
VM_OBJECT_LOCK(pmap->pm_pteobj);
m = vm_page_grab(pmap->pm_pteobj, ptepindex,
VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY);
- if ((m->flags & PG_ZERO) == 0)
- pmap_zero_page(m);
KASSERT(m->queue == PQ_NONE,
("_pmap_allocpte: %p->queue != PQ_NONE", m));
@@ -1242,7 +1237,6 @@
vm_page_lock_queues();
m->valid = VM_PAGE_BITS_ALL;
- vm_page_flag_clear(m, PG_ZERO);
vm_page_wakeup(m);
vm_page_unlock_queues();
if (!is_object_locked)
@@ -1906,7 +1900,8 @@
* raise IPL while manipulating pv_table since pmap_enter can be
* called at interrupt time.
*/
- if (pmap_initialized && (m->flags & PG_FICTITIOUS) == 0) {
+ if (pmap_initialized &&
+ (m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) {
pmap_insert_entry(pmap, va, mpte, m);
managed |= PG_MANAGED;
}
@@ -1966,7 +1961,7 @@
pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t mpte)
{
register pt_entry_t *pte;
-
+ int managed;
/*
* In the case that a page table page is not
@@ -2031,7 +2026,11 @@
* raise IPL while manipulating pv_table since pmap_enter can be
* called at interrupt time.
*/
- pmap_insert_entry(pmap, va, mpte, m);
+ managed = 0;
+ if ((m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) {
+ pmap_insert_entry(pmap, va, mpte, m);
+ managed = PG_MANAGED | PG_FOR | PG_FOW | PG_FOE;
+ }
/*
* Increment counters
@@ -2041,7 +2040,7 @@
/*
* Now validate mapping with RO protection
*/
- *pte = pmap_phys_to_pte(VM_PAGE_TO_PHYS(m)) | PG_V | PG_KRE | PG_URE | PG_MANAGED | PG_FOR | PG_FOE | PG_FOW;
+ *pte = pmap_phys_to_pte(VM_PAGE_TO_PHYS(m)) | PG_V | PG_KRE | PG_URE | managed;
alpha_pal_imb(); /* XXX overkill? */
return mpte;
==== //depot/user/jhb/acpipci/alpha/conf/GENERIC#13 (text+ko) ====
@@ -18,7 +18,7 @@
#
# For hardware specific information check HARDWARE.TXT
#
-# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.168 2004/01/24 21:45:25 jeff Exp $
+# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.170 2004/05/02 20:40:17 marcel Exp $
machine alpha
cpu EV4
@@ -60,6 +60,7 @@
options CD9660 #ISO 9660 Filesystem
options PROCFS #Process filesystem (requires PSEUDOFS)
options PSEUDOFS #Pseudo-filesystem framework
+options GEOM_GPT #GUID Partition Tables.
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]
options COMPAT_FREEBSD4 #Compatible with FreeBSD4
options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI
@@ -194,10 +195,10 @@
device umass # Disks/Mass storage - Requires scbus and da0
device ums # Mouse
# USB Ethernet
-device aue # ADMtek USB ethernet
-device axe # ASIX Electronics USB ethernet
-device cue # CATC USB ethernet
-device kue # Kawasaki LSI USB ethernet
+device aue # ADMtek USB Ethernet
+device axe # ASIX Electronics USB Ethernet
+device cue # CATC USB Ethernet
+device kue # Kawasaki LSI USB Ethernet
# FireWire support
device firewire # FireWire bus code
==== //depot/user/jhb/acpipci/alpha/include/float.h#4 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/alpha/include/float.h,v 1.5 2004/04/05 21:00:50 imp Exp $ */
+/* $FreeBSD: src/sys/alpha/include/float.h,v 1.6 2004/04/25 02:36:28 das Exp $ */
/* From: NetBSD: float.h,v 1.6 1997/07/17 21:36:03 thorpej Exp */
/*
@@ -41,8 +41,10 @@
#define FLT_RADIX 2 /* b */
#define FLT_ROUNDS __flt_rounds()
+#if __ISO_C_VISIBLE >= 1999
#define FLT_EVAL_METHOD 0 /* no promotions */
#define DECIMAL_DIG 17 /* max precision in decimal digits */
+#endif
#define FLT_MANT_DIG 24 /* p */
#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
==== //depot/user/jhb/acpipci/amd64/acpica/acpi_machdep.c#7 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.12 2003/09/22 22:12:46 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.13 2004/04/21 02:10:58 njl Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -40,8 +40,7 @@
{
struct acpi_softc *sc;
- if ((sc = device_get_softc(dev)) == NULL)
- return (ENXIO);
+ sc = device_get_softc(dev);
acpi_install_wakeup_handler(sc);
==== //depot/user/jhb/acpipci/amd64/conf/GENERIC#15 (text+ko) ====
@@ -16,7 +16,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.405 2004/03/25 03:19:28 obrien Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.407 2004/05/02 20:40:18 marcel Exp $
machine amd64
cpu HAMMER
@@ -44,6 +44,7 @@
options CD9660 # ISO 9660 Filesystem
options PROCFS # Process filesystem (requires PSEUDOFS)
options PSEUDOFS # Pseudo-filesystem framework
+options GEOM_GPT # GUID Partition Tables.
options IA32 # Compatible with i386 binaries
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options SCSI_DELAY=15000 # Delay (in ms) before probing SCSI
@@ -180,7 +181,7 @@
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device miibus # MII bus support
-device bfe # Broadcom BCM440x 10/100 ethernet
+device bfe # Broadcom BCM440x 10/100 Ethernet
device bge # Broadcom BCM570xx Gigabit Ethernet
device dc # DEC/Intel 21143 and various workalikes
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
@@ -189,9 +190,9 @@
device rl # RealTek 8129/8139
device sf # Adaptec AIC-6915 (``Starfire'')
device sis # Silicon Integrated Systems SiS 900/SiS 7016
-device sk # SysKonnect SK-984x & SK-982x gigabit ethernet
+device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet
device ste # Sundance ST201 (D-Link DFE-550TX)
-device ti # Alteon Networks Tigon I/II gigabit ethernet
+device ti # Alteon Networks Tigon I/II gigabit Ethernet
device tl # Texas Instruments ThunderLAN
device tx # SMC EtherPower II (83c170 ``EPIC'')
device vr # VIA Rhine, Rhine II
@@ -210,8 +211,8 @@
#device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc.
# XXX kvtop brokenness, pointer/int warnings
#device lnc # NE2100, NE32-VL Lance Ethernet cards
-device sn # SMC's 9000 series of ethernet chips
-device xe # Xircom pccard ethernet
+device sn # SMC's 9000 series of Ethernet chips
+device xe # Xircom pccard Ethernet
# ISA devices that use the old ISA shims
#device le
@@ -253,10 +254,10 @@
device urio # Diamond Rio 500 MP3 player
device uscanner # Scanners
# USB Ethernet, requires mii
-device aue # ADMtek USB ethernet
-device axe # ASIX Electronics USB ethernet
-device cue # CATC USB ethernet
-device kue # Kawasaki LSI USB ethernet
+device aue # ADMtek USB Ethernet
+device axe # ASIX Electronics USB Ethernet
+device cue # CATC USB Ethernet
+device kue # Kawasaki LSI USB Ethernet
# FireWire support
device firewire # FireWire bus code
==== //depot/user/jhb/acpipci/amd64/include/float.h#3 (text+ko) ====
@@ -27,16 +27,20 @@
* SUCH DAMAGE.
*
* from: @(#)float.h 7.1 (Berkeley) 5/8/90
- * $FreeBSD: src/sys/amd64/include/float.h,v 1.11 2004/04/05 21:25:51 imp Exp $
+ * $FreeBSD: src/sys/amd64/include/float.h,v 1.12 2004/04/25 02:36:28 das Exp $
*/
#ifndef _MACHINE_FLOAT_H_
#define _MACHINE_FLOAT_H_ 1
+#include <sys/cdefs.h>
+
#define FLT_RADIX 2 /* b */
#define FLT_ROUNDS 1 /* FP addition rounds to nearest */
+#if __ISO_C_VISIBLE >= 1999
#define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */
#define DECIMAL_DIG 21 /* max precision in decimal digits */
+#endif
#define FLT_MANT_DIG 24 /* p */
#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
==== //depot/user/jhb/acpipci/boot/i386/boot0/Makefile#6 (text+ko) ====
@@ -1,13 +1,10 @@
-# $FreeBSD: src/sys/boot/i386/boot0/Makefile,v 1.23 2004/02/09 14:11:56 ru Exp $
+# $FreeBSD: src/sys/boot/i386/boot0/Makefile,v 1.29 2004/04/28 21:31:19 ru Exp $
-PROG= ${BOOT}.out
-INTERNALPROG=
-FILES= ${BOOT}
+PROG?= boot0
+STRIP=
+BINMODE=${NOBINMODE}
NOMAN=
-SRCS= ${BOOT}.s
-CLEANFILES= ${BOOT}
-
-BOOT?= boot0
+SRCS= ${PROG}.S
# The default set of flags compiled into boot0. This enables update (writing
# the modified boot0 back to disk after running so that the selection made is
@@ -30,13 +27,10 @@
# command line
BOOT_BOOT0_COMCONSOLE_SPEED?= 0xE3
-AFLAGS+=--defsym FLAGS=${BOOT_BOOT0_FLAGS} \
- --defsym TICKS=${BOOT_BOOT0_TICKS} \
- --defsym COMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED}
+CFLAGS+=-DFLAGS=${BOOT_BOOT0_FLAGS} \
+ -DTICKS=${BOOT_BOOT0_TICKS} \
+ -DCOMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED}
-LDFLAGS=-N -e start -Ttext ${BOOT_BOOT0_ORG}
-
-${BOOT}: ${BOOT}.out
- objcopy -S -O binary ${BOOT}.out ${.TARGET}
+LDFLAGS=-N -e start -Ttext ${BOOT_BOOT0_ORG} -Wl,-S,--oformat,binary
.include <bsd.prog.mk>
==== //depot/user/jhb/acpipci/boot/i386/boot0ext/Makefile#2 (text+ko) ====
@@ -1,7 +1,7 @@
-# $FreeBSD: src/sys/boot/i386/boot0ext/Makefile,v 1.1 2004/03/26 18:46:31 obrien Exp $
+# $FreeBSD: src/sys/boot/i386/boot0ext/Makefile,v 1.2 2004/04/28 21:31:20 ru Exp $
.PATH: ${.CURDIR}/../boot0
-BOOT= boot0ext
+PROG= boot0ext
.include "${.CURDIR}/../boot0/Makefile"
==== //depot/user/jhb/acpipci/boot/i386/boot0sio/Makefile#3 (text+ko) ====
@@ -1,7 +1,8 @@
-# $FreeBSD: src/sys/boot/i386/boot0sio/Makefile,v 1.2 2004/02/06 21:58:31 ru Exp $
+# $FreeBSD: src/sys/boot/i386/boot0sio/Makefile,v 1.4 2004/04/28 21:31:20 ru Exp $
.PATH: ${.CURDIR}/../boot0
-BOOT= boot0sio
+PROGNAME= boot0sio
+CFLAGS+= -DSIO
.include "${.CURDIR}/../boot0/Makefile"
==== //depot/user/jhb/acpipci/boot/i386/boot2/boot1.S#2 (text+ko) ====
@@ -1,21 +1,21 @@
-//
-// Copyright (c) 1998 Robert Nordier
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms are freely
-// permitted provided that the above copyright notice and this
-// paragraph and the following disclaimer are duplicated in all
-// such forms.
-//
-// This software is provided "AS IS" and without any express or
-// implied warranties, including, without limitation, the implied
-// warranties of merchantability and fitness for a particular
-// purpose.
-//
+/*
+ * Copyright (c) 1998 Robert Nordier
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are freely
+ * permitted provided that the above copyright notice and this
+ * paragraph and the following disclaimer are duplicated in all
+ * such forms.
+ *
+ * This software is provided "AS IS" and without any express or
+ * implied warranties, including, without limitation, the implied
+ * warranties of merchantability and fitness for a particular
+ * purpose.
+ *
+ * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.26 2004/04/28 14:31:43 ru Exp $
+ */
-// $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.24 2004/02/17 07:13:04 ru Exp $
-
-// Memory Locations
+/* Memory Locations */
.set MEM_REL,0x700 // Relocation address
.set MEM_ARG,0x900 // Arguments
.set MEM_ORG,0x7c00 // Origin
@@ -25,15 +25,15 @@
.set MEM_USR,0xa000 // Client start
.set BDA_BOOT,0x472 // Boot howto flag
-// Partition Constants
+/* Partition Constants */
.set PRT_OFF,0x1be // Partition offset
.set PRT_NUM,0x4 // Partitions
.set PRT_BSD,0xa5 // Partition type
-// Flag Bits
+/* Flag Bits */
.set FL_PACKET,0x80 // Packet mode
-// Misc. Constants
+/* Misc. Constants */
.set SIZ_PAG,0x1000 // Page size
.set SIZ_SEC,0x200 // Sector size
@@ -44,19 +44,20 @@
start: jmp main // Start recognizably
-// This is the start of a standard BIOS Parameter Block (BPB). Most bootable
-// FAT disks have this at the start of their MBR. While normal BIOS's will
-// work fine without this section, IBM's El Torito emulation "fixes" up the
-// BPB by writing into the memory copy of the MBR. Rather than have data
-// written into our xread routine, we'll define a BPB to work around it.
-// The data marked with (T) indicates a field required for a ThinkPad to
-// recognize the disk and (W) indicates fields written from IBM BIOS code.
-// The use of the BPB is based on what OpenBSD and NetBSD implemented in
-// their boot code but the required fields were determined by trial and error.
-//
-// Note: If additional space is needed in boot1, one solution would be to
-// move the "prompt" message data (below) to replace the OEM ID.
-
+/*
+ * This is the start of a standard BIOS Parameter Block (BPB). Most bootable
+ * FAT disks have this at the start of their MBR. While normal BIOS's will
+ * work fine without this section, IBM's El Torito emulation "fixes" up the
+ * BPB by writing into the memory copy of the MBR. Rather than have data
+ * written into our xread routine, we'll define a BPB to work around it.
+ * The data marked with (T) indicates a field required for a ThinkPad to
+ * recognize the disk and (W) indicates fields written from IBM BIOS code.
+ * The use of the BPB is based on what OpenBSD and NetBSD implemented in
+ * their boot code but the required fields were determined by trial and error.
+ *
+ * Note: If additional space is needed in boot1, one solution would be to
+ * move the "prompt" message data (below) to replace the OEM ID.
+ */
.org 0x03, 0x00
oemid: .space 0x08, 0x00 // OEM ID
@@ -78,21 +79,21 @@
ebpb: .byte 0 // BIOS physical drive number (W)
.org 0x25,0x90
-//
-// Trampoline used by boot2 to call read to read data from the disk via
-// the BIOS. Call with:
-//
-// %cx:%ax - long - LBA to read in
-// %es:(%bx) - caddr_t - buffer to read data into
-// %dl - byte - drive to read from
-// %dh - byte - num sectors to read
-//
+/*
+ * Trampoline used by boot2 to call read to read data from the disk via
+ * the BIOS. Call with:
+ *
+ * %cx:%ax - long - LBA to read in
+ * %es:(%bx) - caddr_t - buffer to read data into
+ * %dl - byte - drive to read from
+ * %dh - byte - num sectors to read
+ */
xread: push %ss // Address
pop %ds // data
-//
-// Setup an EDD disk packet and pass it to read
-//
+/*
+ * Setup an EDD disk packet and pass it to read
+ */
xread.1: // Starting
pushl $0x0 // absolute
push %cx // block
@@ -107,37 +108,37 @@
callw read // Read from disk
lea 0x10(%bp),%sp // Clear stack
lret // To far caller
-//
-// Load the rest of boot2 and BTX up, copy the parts to the right locations,
-// and start it all up.
-//
+/*
+ * Load the rest of boot2 and BTX up, copy the parts to the right locations,
+ * and start it all up.
+ */
-//
-// Setup the segment registers to flat addressing (segment 0) and setup the
-// stack to end just below the start of our code.
-//
+/*
+ * Setup the segment registers to flat addressing (segment 0) and setup the
+ * stack to end just below the start of our code.
+ */
main: cld // String ops inc
xor %cx,%cx // Zero
mov %cx,%es // Address
mov %cx,%ds // data
mov %cx,%ss // Set up
mov $start,%sp // stack
-//
-// Relocate ourself to MEM_REL. Since %cx == 0, the inc %ch sets
-// %cx == 0x100.
-//
+/*
+ * Relocate ourself to MEM_REL. Since %cx == 0, the inc %ch sets
+ * %cx == 0x100.
+ */
mov %sp,%si // Source
mov $MEM_REL,%di // Destination
incb %ch // Word count
rep // Copy
movsw // code
-//
-// If we are on a hard drive, then load the MBR and look for the first
-// FreeBSD slice. We use the fake partition entry below that points to
-// the MBR when we call nread. The first pass looks for the first active
-// FreeBSD slice. The second pass looks for the first non-active FreeBSD
-// slice if the first one fails.
-//
+/*
+ * If we are on a hard drive, then load the MBR and look for the first
+ * FreeBSD slice. We use the fake partition entry below that points to
+ * the MBR when we call nread. The first pass looks for the first active
+ * FreeBSD slice. The second pass looks for the first non-active FreeBSD
+ * slice if the first one fails.
+ */
mov $part4,%si // Partition
cmpb $0x80,%dl // Hard drive?
jb main.4 // No
@@ -157,30 +158,30 @@
jb main.2 // Yes
dec %cx // Do two
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list