|
iPXE
|
Hyper-V interface. More...
Go to the source code of this file.
Data Structures | |
| A posted message. More... | |
| A received message. More... | |
| struct | hv_signal_event |
| A signalled event. More... | |
| struct | hv_event |
| A received event. More... | |
| struct | hv_monitor_trigger |
| A monitor trigger group. More... | |
| struct | hv_monitor_parameter |
| A monitor parameter set. More... | |
| struct | hv_monitor |
| A monitor page. More... | |
| struct | hv_synic |
| A synthetic interrupt controller. More... | |
| A message buffer. More... | |
| struct | hv_hypervisor |
| A Hyper-V hypervisor. More... | |
Macros | |
| #define | HV_INTERFACE_ID 0x31237648 /* "Hv#1" */ |
| Hyper-V interface identification. | |
| #define | HV_GUEST_OS_ID_IPXE ( ( 1ULL << 63 ) | ( 0x18aeULL << 48 ) ) |
| Guest OS identity for iPXE. | |
| #define | HV_GUEST_OS_ID_UEFI ( 1ULL << 40 ) |
| Guest OS identity for Gen 2 UEFI firmware. | |
| #define | HV_HYPERCALL_ENABLE 0x00000001UL |
| Enable hypercall page. | |
| #define | HV_SCONTROL_ENABLE 0x00000001UL |
| Enable SynIC. | |
| #define | HV_SIEFP_ENABLE 0x00000001UL |
| Enable SynIC event flags. | |
| #define | HV_SIMP_ENABLE 0x00000001UL |
| Enable SynIC messages. | |
| #define | HV_SINT_AUTO_EOI 0x00020000UL |
| Perform implicit EOI upon synthetic interrupt delivery. | |
| #define | HV_SINT_MASKED 0x00010000UL |
| Mask synthetic interrupt. | |
| #define | HV_SINT_VECTOR(x) |
| Synthetic interrupt vector. | |
| #define | HV_SINT_VECTOR_MASK HV_SINT_VECTOR ( 0xff ) |
| Synthetic interrupt vector mask. | |
| #define | HV_SINT_MAX 15 |
| Maximum synthetic interrupt number. | |
| #define | HV_POST_MESSAGE 0x005c |
| Post message. | |
| #define | HV_SIGNAL_EVENT 0x005d |
| Signal event. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| struct hv_post_message | __attribute__ ((packed)) |
| static unsigned int | hv_pfn_count (physaddr_t data, size_t len) |
| Calculate the number of pages covering an address range. | |
| __attribute__ ((sentinel)) int hv_alloc_pages(struct hv_hypervisor *hv | |
| void | hv_enable_sint (struct hv_hypervisor *hv, unsigned int sintx) |
| Enable synthetic interrupt. | |
| void | hv_disable_sint (struct hv_hypervisor *hv, unsigned int sintx) |
| Disable synthetic interrupt. | |
| int | hv_post_message (struct hv_hypervisor *hv, unsigned int id, unsigned int type, const void *data, size_t len) |
| Post message. | |
| int | hv_wait_for_message (struct hv_hypervisor *hv, unsigned int sintx) |
| Wait for received message. | |
| int | hv_signal_event (struct hv_hypervisor *hv, unsigned int id, unsigned int flag) |
| Signal event. | |
Variables | |
| uint32_t | id |
| Connection ID. | |
| uint32_t | reserved |
| Padding. | |
| uint32_t | type |
| Type. | |
| uint32_t | len |
| Length of message. | |
| uint8_t | data [240] |
| Message. | |
| uint8_t | flags |
| Flags. | |
| uint64_t | origin |
| Origin. | |
| uint16_t | flag |
| Flag number. | |
| uint32_t | pending |
| Pending events. | |
| uint32_t | armed |
| Armed events. | |
| uint8_t | reserved_a [4] |
| Reserved. | |
| struct hv_monitor_trigger | trigger [4] |
| Trigger groups. | |
| uint8_t | reserved_b [536] |
| Reserved. | |
| uint16 | latency [4][32] |
| Latencies. | |
| uint8_t | reserved_c [256] |
| Reserved. | |
| struct hv_monitor_parameter | param [4][32] |
| Parameters. | |
| uint8_t | reserved_d [1984] |
| Reserved. | |
| struct hv_synic | __attribute__ |
Hyper-V interface.
Definition in file hyperv.h.
| #define HV_INTERFACE_ID 0x31237648 /* "Hv#1" */ |
Hyper-V interface identification.
Definition at line 16 of file hyperv.h.
Referenced by hv_check_hv(), and hv_timer_probe().
| #define HV_GUEST_OS_ID_IPXE ( ( 1ULL << 63 ) | ( 0x18aeULL << 48 ) ) |
Guest OS identity for iPXE.
This field comprises:
Bit 63 : set to 1 to indicate an open source OS Bits 62:56 : OS Type Bits 55:48 : OS ID Bits 47:16 : Version Bits 15:0 : Build number
There appears to be no central registry for the "OS Type". The specification states that "Linux is 0x100", and the FreeBSD source states that "FreeBSD is 0x200". Both of these statements are actually referring to the combined "OS Type" and "OS ID" field.
We choose to use 0x98ae: this is generated by setting bit 63 (to indicate an open source OS) and setting the OS Type+ID equal to the PnP vendor ID used in romprefix.S. No version information or build number is included.
Definition at line 38 of file hyperv.h.
Referenced by hv_map_hypercall().
| #define HV_GUEST_OS_ID_UEFI ( 1ULL << 40 ) |
Guest OS identity for Gen 2 UEFI firmware.
This does not conform to the documented structure for guest OS identities.
Definition at line 45 of file hyperv.h.
Referenced by hv_check_uefi().
| #define HV_HYPERCALL_ENABLE 0x00000001UL |
Enable hypercall page.
Definition at line 48 of file hyperv.h.
Referenced by hv_map_hypercall(), and hv_unmap_hypercall().
| #define HV_SCONTROL_ENABLE 0x00000001UL |
Enable SynIC.
Definition at line 51 of file hyperv.h.
Referenced by hv_map_synic(), and hv_unmap_synic().
| #define HV_SIEFP_ENABLE 0x00000001UL |
Enable SynIC event flags.
Definition at line 54 of file hyperv.h.
Referenced by hv_map_synic(), and hv_unmap_synic_no_scontrol().
| #define HV_SIMP_ENABLE 0x00000001UL |
Enable SynIC messages.
Definition at line 57 of file hyperv.h.
Referenced by hv_map_synic(), hv_unmap_synic_no_scontrol(), and hv_unquiesce().
| #define HV_SINT_AUTO_EOI 0x00020000UL |
Perform implicit EOI upon synthetic interrupt delivery.
Definition at line 60 of file hyperv.h.
Referenced by hv_disable_sint(), and hv_enable_sint().
| #define HV_SINT_MASKED 0x00010000UL |
Mask synthetic interrupt.
Definition at line 63 of file hyperv.h.
Referenced by hv_disable_sint(), and hv_enable_sint().
| #define HV_SINT_VECTOR | ( | x | ) |
Synthetic interrupt vector.
Definition at line 66 of file hyperv.h.
Referenced by hv_enable_sint().
| #define HV_SINT_VECTOR_MASK HV_SINT_VECTOR ( 0xff ) |
Synthetic interrupt vector mask.
Definition at line 69 of file hyperv.h.
Referenced by hv_enable_sint().
| #define HV_SINT_MAX 15 |
Maximum synthetic interrupt number.
Definition at line 72 of file hyperv.h.
Referenced by hv_quiesce().
| #define HV_POST_MESSAGE 0x005c |
| #define HV_SIGNAL_EVENT 0x005d |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| struct hv_post_message __attribute__ | ( | (packed) | ) |
|
inlinestatic |
Calculate the number of pages covering an address range.
| data | Start of data |
| len | Length of data (must be non-zero) |
| pfn_count | Number of pages covered |
Definition at line 223 of file hyperv.h.
References data, len, and PAGE_SIZE.
Referenced by vmbus_establish_gpadl(), and vmbus_send_data().
|
extern |
Enable synthetic interrupt.
| hv | Hyper-V hypervisor |
| sintx | Synthetic interrupt number |
Definition at line 397 of file hyperv.c.
References DBGC2, HV_SINT_AUTO_EOI, HV_SINT_MASKED, HV_SINT_VECTOR, HV_SINT_VECTOR_MASK, HV_X64_MSR_SINT, and IRQ_INT.
Referenced by vmbus_probe(), and vmbus_reset().
|
extern |
Disable synthetic interrupt.
| hv | Hyper-V hypervisor |
| sintx | Synthetic interrupt number |
Definition at line 423 of file hyperv.c.
References DBGC2, HV_SINT_AUTO_EOI, HV_SINT_MASKED, and HV_X64_MSR_SINT.
Referenced by hv_quiesce(), vmbus_probe(), and vmbus_remove().
|
extern |
Post message.
| hv | Hyper-V hypervisor |
| id | Connection ID |
| type | Message type |
| data | Message |
| len | Length of message |
| rc | Return status code |
Definition at line 449 of file hyperv.c.
References assert, cpu_to_le32, data, DBGC, DBGC2, DBGC2_HDA, EHV, HV_POST_MESSAGE, len, memcpy(), memset(), hv_hypervisor::message, msg(), NULL, hv_message_buffer::posted, rc, status, strerror(), and type.
|
extern |
Wait for received message.
| hv | Hyper-V hypervisor |
| sintx | Synthetic interrupt number |
| rc | Return status code |
Definition at line 486 of file hyperv.c.
References assert, data, DBGC, DBGC2, DBGC2_HDA, ETIMEDOUT, HV_MESSAGE_MAX_WAIT_MS, HV_X64_MSR_EOM, le32_to_cpu, len, mdelay(), memcpy(), memset(), hv_hypervisor::message, hv_synic::message, msg(), offsetof, hv_message_buffer::received, src, hv_hypervisor::synic, and typeof().
Referenced by vmbus_wait_for_any_message().
|
extern |
Signal event.
| hv | Hyper-V hypervisor |
| id | Connection ID |
| flag | Flag number |
| rc | Return status code |
Definition at line 535 of file hyperv.c.
References cpu_to_le16, cpu_to_le32, DBGC, EHV, flag, HV_SIGNAL_EVENT, memset(), hv_hypervisor::message, NULL, rc, hv_message_buffer::signalled, status, and strerror().
| uint64_t origin |
Origin.
Definition at line 9 of file hyperv.h.
Referenced by efi_snp_hii_fetch(), fetch_setting(), fetch_setting_alloc(), fetch_setting_copy(), fetchf_setting(), fetchf_setting_copy(), fetchn_setting(), ibft_fill_nic(), ibft_set_string_setting(), ipv6_create_routes(), and show_exec().
| uint32_t pending |
Pending events.
Definition at line 1 of file hyperv.h.
Referenced by ath5k_hw_stop_tx_dma(), b44_process_rx_packets(), b44_rx_refill(), b44_rx_refill(), efi_get_wakeup_time_wrapper(), is_pending(), pending_get(), pending_put(), pending_rx_index(), pending_tx_index(), and sis190_process_tx().
| struct hv_monitor_trigger trigger[4] |
| struct hv_monitor_parameter param[4][32] |
Parameters.
Definition at line 13 of file hyperv.h.
Referenced by a3c90x_internal_IssueCommand(), add_parameter(), ansiesc_process(), ar5008_hw_ani_control_new(), ar5008_hw_ani_control_old(), ar9003_hw_ani_control(), ath9k_hw_4k_get_eeprom(), ath9k_hw_ani_control(), ath9k_hw_ar9287_get_eeprom(), ath9k_hw_ar9300_get_eeprom(), ath9k_hw_def_get_eeprom(), COMMAND(), fc_els_prli_detect(), fc_els_prli_rx(), fc_els_prli_tx(), fc_ulp_login(), fcp_prli_tx(), fcpdev_scsi_command(), fcpeerstat(), free_parameters(), http_form_params(), http_format_headers(), linda_set_serdes_param(), param_exec(), uri_params_list_okx(), uri_params_okx(), and xen_hvm_get_param().