guestfs_abort_cb guestfs_add_cdrom guestfs_add_drive guestfs_add_drive_ro guestfs_add_drive_ro_with_if guestfs_add_drive_with_if guestfs_aug_close guestfs_aug_defnode guestfs_aug_defvar guestfs_aug_get guestfs_aug_init guestfs_aug_insert guestfs_aug_load guestfs_aug_ls guestfs_aug_match guestfs_aug_mv guestfs_aug_rm guestfs_aug_save guestfs_aug_set guestfs_available guestfs_blockdev_flushbufs guestfs_blockdev_getbsz guestfs_blockdev_getro guestfs_blockdev_getsize64 guestfs_blockdev_getss guestfs_blockdev_getsz guestfs_blockdev_rereadpt guestfs_blockdev_setbsz guestfs_blockdev_setro guestfs_blockdev_setrw guestfs_case_sensitive_path guestfs_cat guestfs_checksum guestfs_chmod guestfs_chown guestfs_chunk guestfs_close guestfs_command guestfs_command_lines guestfs_config guestfs_copy_size guestfs_cp guestfs_cp_a guestfs_create guestfs_dd guestfs_debug guestfs_df guestfs_df_h guestfs_dirent guestfs_dirent_list guestfs_dmesg guestfs_download guestfs_drop_caches guestfs_du guestfs_e2fsck_f guestfs_echo_daemon guestfs_egrep guestfs_egrepi guestfs_end_busy guestfs_equal guestfs_error guestfs_error_handler_cb guestfs_exists guestfs_fallocate guestfs_fgrep guestfs_fgrepi guestfs_file guestfs_filesize guestfs_fill guestfs_find guestfs_find0 guestfs_fsck guestfs_get_append guestfs_get_autosync guestfs_getcon guestfs_get_direct guestfs_get_e2label guestfs_get_e2uuid guestfs_get_error_handler guestfs_get_memsize guestfs_get_out_of_memory_handler guestfs_get_path guestfs_get_pid guestfs_get_qemu guestfs_get_recovery_proc guestfs_get_selinux guestfs_get_state guestfs_get_trace guestfs_get_verbose guestfs_getxattrs guestfs_glob_expand guestfs_grep guestfs_grepi guestfs_grub_install guestfs_head guestfs_head_n guestfs_hexdump guestfs_initrd_cat guestfs_initrd_list guestfs_inotify_add_watch guestfs_inotify_close guestfs_inotify_event guestfs_inotify_event_list guestfs_inotify_files guestfs_inotify_init guestfs_inotify_read guestfs_inotify_rm_watch guestfs_int_bool guestfs_int_bool_list guestfs_int_dirent guestfs_int_dirent_list guestfs_int_inotify_event guestfs_int_inotify_event_list guestfs_int_int_bool guestfs_int_int_bool_list guestfs_int_lvm_lv guestfs_int_lvm_lv_list guestfs_int_lvm_pv guestfs_int_lvm_pv_list guestfs_int_lvm_vg guestfs_int_lvm_vg_list guestfs_int_partition guestfs_int_partition_list guestfs_int_stat guestfs_int_stat_list guestfs_int_statvfs guestfs_int_statvfs_list guestfs_int_version guestfs_int_version_list guestfs_int_xattr guestfs_int_xattr_list guestfs_is_busy guestfs_is_config guestfs_is_dir guestfs_is_file guestfs_is_launching guestfs_is_ready guestfs_kill_subprocess guestfs_last_error guestfs_launch guestfs_launch_done_cb guestfs_lchown guestfs_lgetxattrs guestfs_list_devices guestfs_list_partitions guestfs_ll guestfs_ln guestfs_ln_f guestfs_ln_s guestfs_ln_sf guestfs_log_message_cb guestfs_lremovexattr guestfs_ls guestfs_lsetxattr guestfs_lstat guestfs_lstatlist guestfs_lvcreate guestfs_lvm_lv guestfs_lvm_lv_list guestfs_lvm_pv guestfs_lvm_pv_list guestfs_lvm_remove_all guestfs_lvm_vg guestfs_lvm_vg_list guestfs_lvremove guestfs_lvrename guestfs_lvresize guestfs_lvs guestfs_lvs_full guestfs_lvuuid guestfs_lxattrlist guestfs_mkdir guestfs_mkdir_mode guestfs_mkdir_p guestfs_mkdtemp guestfs_mke2fs_J guestfs_mke2fs_JL guestfs_mke2fs_JU guestfs_mke2journal guestfs_mke2journal_L guestfs_mke2journal_U guestfs_mkfifo guestfs_mkfs guestfs_mkfs_b guestfs_mkmountpoint guestfs_mknod guestfs_mknod_b guestfs_mknod_c guestfs_mkswap guestfs_mkswap_file guestfs_mkswap_L guestfs_mkswap_U guestfs_modprobe guestfs_mount guestfs_mount_loop guestfs_mount_options guestfs_mountpoints guestfs_mount_ro guestfs_mounts guestfs_mount_vfs guestfs_mv guestfs_ntfs_3g_probe guestfs_part_add guestfs_part_del guestfs_part_disk guestfs_part_get_bootable guestfs_part_get_mbr_id guestfs_part_get_parttype guestfs_part_init guestfs_partition guestfs_partition_list guestfs_part_list guestfs_part_set_bootable guestfs_part_set_mbr_id guestfs_part_set_name guestfs_perrorf guestfs_ping_daemon guestfs_pread guestfs_protocol guestfs_pvcreate guestfs_pvremove guestfs_pvresize guestfs_pvs guestfs_pvs_full guestfs_pvuuid guestfs_readdir guestfs_read_file guestfs_read_lines guestfs_readlink guestfs_readlinklist guestfs_realpath guestfs_removexattr guestfs_resize2fs guestfs_rm guestfs_rmdir guestfs_rmmountpoint guestfs_rm_rf guestfs_safe_calloc guestfs_safe_malloc guestfs_safe_memdup guestfs_safe_realloc guestfs_safe_strdup guestfs_scrub_device guestfs_scrub_file guestfs_scrub_freespace guestfs_set_append guestfs_set_autosync guestfs_set_busy guestfs_setcon guestfs_set_direct guestfs_set_e2label guestfs_set_e2uuid guestfs_set_error_handler guestfs_set_launch_done_callback guestfs_set_log_message_callback guestfs_set_memsize guestfs_set_out_of_memory_handler guestfs_set_path guestfs_set_qemu guestfs_set_recovery_proc guestfs_set_selinux guestfs_set_subprocess_quit_callback guestfs_set_trace guestfs_set_verbose guestfs_setxattr guestfs_sfdisk guestfs_sfdisk_disk_geometry guestfs_sfdisk_kernel_geometry guestfs_sfdisk_l guestfs_sfdiskM guestfs_sfdisk_N guestfs_sh guestfs_sh_lines guestfs_sleep guestfs_stat guestfs_stat_list guestfs_statvfs guestfs_statvfs_list guestfs_strings guestfs_strings_e guestfs_subprocess_quit_cb guestfs_swapoff_device guestfs_swapoff_file guestfs_swapoff_label guestfs_swapoff_uuid guestfs_swapon_device guestfs_swapon_file guestfs_swapon_label guestfs_swapon_uuid guestfs_sync guestfs_tail guestfs_tail_n guestfs_tar_in guestfs_tar_out guestfs_tgz_in guestfs_tgz_out guestfs_touch guestfs_truncate guestfs_truncate_size guestfs_tune2fs_l guestfs_umask guestfs_umount guestfs_umount_all guestfs_upload guestfs_utimens guestfs_verbose guestfs_version guestfs_version_list guestfs_vfs_type guestfs_vg_activate guestfs_vg_activate_all guestfs_vgcreate guestfs_vglvuuids guestfs_vgpvuuids guestfs_vgremove guestfs_vgrename guestfs_vgs guestfs_vgs_full guestfs_vguuid guestfs_vmchannel guestfs_wait_ready guestfs_wc_c guestfs_wc_l guestfs_wc_w guestfs_write_file guestfs_xattr guestfs_xattr_list guestfs_zegrep guestfs_zegrepi guestfs_zero guestfs_zerofree guestfs_zfgrep guestfs_zfgrepi guestfs_zfile guestfs_zgrep guestfs_zgrepi /a> 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329
/* sis900.h Definitions for SiS ethernet controllers including 7014/7016 and 900
* Copyright 1999 Silicon Integrated System Corporation
* References:
* SiS 7016 Fast Ethernet PCI Bus 10/100 Mbps LAN Controller with OnNow Support,
* preliminary Rev. 1.0 Jan. 14, 1998
* SiS 900 Fast Ethernet PCI Bus 10/100 Mbps LAN Single Chip with OnNow Support,
* preliminary Rev. 1.0 Nov. 10, 1998
* SiS 7014 Single Chip 100BASE-TX/10BASE-T Physical Layer Solution,
* preliminary Rev. 1.0 Jan. 18, 1998
* http://www.sis.com.tw/support/databook.htm
*/
/*
* SiS 7016 and SiS 900 ethernet controller registers
*/
/* The I/O extent, SiS 900 needs 256 bytes of io address */
#define SIS900_TOTAL_SIZE 0x100
/* Symbolic offsets to registers. */
enum sis900_registers {
cr=0x0, //Command Register
cfg=0x4, //Configuration Register
mear=0x8, //EEPROM Access Register
ptscr=0xc, //PCI Test Control Register
isr=0x10, //Interrupt Status Register
imr=0x14, //Interrupt Mask Register
ier=0x18, //Interrupt Enable Register
epar=0x18, //Enhanced PHY Access Register
txdp=0x20, //Transmit Descriptor Pointer Register
txcfg=0x24, //Transmit Configuration Register
rxdp=0x30, //Receive Descriptor Pointer Register
rxcfg=0x34, //Receive Configuration Register
flctrl=0x38, //Flow Control Register
rxlen=0x3c, //Receive Packet Length Register
rfcr=0x48, //Receive Filter Control Register
rfdr=0x4C, //Receive Filter Data Register
pmctrl=0xB0, //Power Management Control Register
pmer=0xB4 //Power Management Wake-up Event Register
};
/* Symbolic names for bits in various registers */
enum sis900_command_register_bits {
RELOAD = 0x00000400, ACCESSMODE = 0x00000200,/* ET */
RESET = 0x00000100, SWI = 0x00000080, RxRESET = 0x00000020,
TxRESET = 0x00000010, RxDIS = 0x00000008, RxENA = 0x00000004,
TxDIS = 0x00000002, TxENA = 0x00000001
};
enum sis900_configuration_register_bits {
DESCRFMT = 0x00000100 /* 7016 specific */, REQALG = 0x00000080,
SB = 0x00000040, POW = 0x00000020, EXD = 0x00000010,
PESEL = 0x00000008, LPM = 0x00000004, BEM = 0x00000001,
/* 635 & 900B Specific */
RND_CNT = 0x00000400, FAIR_BACKOFF = 0x00000200,
EDB_MASTER_EN = 0x00002000
};
enum sis900_eeprom_access_reigster_bits {
MDC = 0x00000040, MDDIR = 0x00000020, MDIO = 0x00000010, /* 7016 specific */
EECS = 0x00000008, EECLK = 0x00000004, EEDO = 0x00000002,
EEDI = 0x00000001
};
enum sis900_interrupt_register_bits {
WKEVT = 0x10000000, TxPAUSEEND = 0x08000000, TxPAUSE = 0x04000000,
TxRCMP = 0x02000000, RxRCMP = 0x01000000, DPERR = 0x00800000,
SSERR = 0x00400000, RMABT = 0x00200000, RTABT = 0x00100000,
RxSOVR = 0x00010000, HIBERR = 0x00008000, SWINT = 0x00001000,
MIBINT = 0x00000800, TxURN = 0x00000400, TxIDLE = 0x00000200,
TxERR = 0x00000100, TxDESC = 0x00000080, TxOK = 0x00000040,
RxORN = 0x00000020, RxIDLE = 0x00000010, RxEARLY = 0x00000008,
RxERR = 0x00000004, RxDESC = 0x00000002, RxOK = 0x00000001
};
enum sis900_interrupt_enable_reigster_bits {
IE = 0x00000001
};
/* maximum dma burst for transmission and receive */
#define MAX_DMA_RANGE 7 /* actually 0 means MAXIMUM !! */
#define TxMXDMA_shift 20
#define RxMXDMA_shift 20
enum sis900_tx_rx_dma{
DMA_BURST_512 = 0, DMA_BURST_64 = 5
};
/* transmit FIFO thresholds */
#define TX_FILL_THRESH 16 /* 1/4 FIFO size */
#define TxFILLT_shift 8
#define TxDRNT_shift 0
#define TxDRNT_100 48 /* 3/4 FIFO size */
#define TxDRNT_10 16 /* 1/2 FIFO size */
enum sis900_transmit_config_register_bits {
TxCSI = 0x80000000, TxHBI = 0x40000000, TxMLB = 0x20000000,
TxATP = 0x10000000, TxIFG = 0x0C000000, TxFILLT = 0x00003F00,
TxDRNT = 0x0000003F
};
/* recevie FIFO thresholds */
#define RxDRNT_shift 1
#define RxDRNT_100 16 /* 1/2 FIFO size */
#define RxDRNT_10 24 /* 3/4 FIFO size */
enum sis900_reveive_config_register_bits {
RxAEP = 0x80000000, RxARP = 0x40000000, RxATX = 0x10000000,
RxAJAB = 0x08000000, RxDRNT = 0x0000007F
};
#define RFAA_shift 28
#define RFADDR_shift 16
enum sis900_receive_filter_control_register_bits {
RFEN = 0x80000000, RFAAB = 0x40000000, RFAAM = 0x20000000,
RFAAP = 0x10000000, RFPromiscuous = (RFAAB|RFAAM|RFAAP)
};
enum sis900_reveive_filter_data_mask {
RFDAT = 0x0000FFFF
};
/* EEPROM Addresses */
enum sis900_eeprom_address {
EEPROMSignature = 0x00, EEPROMVendorID = 0x02, EEPROMDeviceID = 0x03,
EEPROMMACAddr = 0x08, EEPROMChecksum = 0x0b
};
/* The EEPROM commands include the alway-set leading bit. Refer to NM93Cxx datasheet */
enum sis900_eeprom_command {
EEread = 0x0180, EEwrite = 0x0140, EEerase = 0x01C0,
EEwriteEnable = 0x0130, EEwriteDisable = 0x0100,
EEeraseAll = 0x0120, EEwriteAll = 0x0110,
EEaddrMask = 0x013F, EEcmdShift = 16
};
/* For SiS962 or SiS963, request the eeprom software access */
enum sis96x_eeprom_command {
EEREQ = 0x00000400, EEDONE = 0x00000200, EEGNT = 0x00000100
};
/* PCI Registers */
enum sis900_pci_registers {
CFGPMC = 0x40,
CFGPMCSR = 0x44
};
/* Power management capabilities bits */
enum sis900_cfgpmc_register_bits {
PMVER = 0x00070000,
DSI = 0x00100000,
PMESP = 0xf8000000
};
enum sis900_pmesp_bits {
PME_D0 = 0x1,
PME_D1 = 0x2,
PME_D2 = 0x4,
PME_D3H = 0x8,
PME_D3C = 0x10
};
/* Power management control/status bits */
enum sis900_cfgpmcsr_register_bits {
PMESTS = 0x00004000,
PME_EN = 0x00000100, // Power management enable
PWR_STA = 0x00000003 // Current power state
};
/* Wake-on-LAN support. */
enum sis900_power_management_control_register_bits {
LINKLOSS = 0x00000001,
LINKON = 0x00000002,
MAGICPKT = 0x00000400,
ALGORITHM = 0x00000800,
FRM1EN = 0x00100000,
FRM2EN = 0x00200000,
FRM3EN = 0x00400000,
FRM1ACS = 0x01000000,
FRM2ACS = 0x02000000,
FRM3ACS = 0x04000000,
WAKEALL = 0x40000000,
GATECLK = 0x80000000
};
/* Management Data I/O (mdio) frame */
#define MIIread 0x6000
#define MIIwrite 0x5002
#define MIIpmdShift 7
#define MIIregShift 2
#define MIIcmdLen 16
#define MIIcmdShift 16
/* Buffer Descriptor Status*/