![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <acpi/acpi.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_def.h>
#include <string.h>
#include <delay.h>
#include <elog.h>
#include <stdlib.h>
#include "chip.h"
#include "me.h"
#include "pch.h"
#include <vendorcode/google/chromeos/chromeos.h>
Go to the source code of this file.
Data Structures | |
struct | mbp_payload |
Macros | |
#define | ASSIGN_FIELD_PTR(field_, val_) |
Functions | |
static void | mei_dump (u32 dword, int offset, const char *type) |
static union mei_csr | read_host_csr (void) |
static void | write_host_csr (union mei_csr csr) |
static union mei_csr | read_me_csr (void) |
static void | write_cb (u32 dword) |
static u32 | read_cb (void) |
static int | mei_wait_for_me_ready (void) |
static void | mei_reset (void) |
static int | mei_send_packet (union mei_header *mei, void *req_data) |
static int | mei_send_data (u8 me_address, u8 host_address, void *req_data, int req_bytes) |
static int | mei_send_header (u8 me_address, u8 host_address, void *header, int header_len, int complete) |
static int | mei_recv_msg (void *header, int header_bytes, void *rsp_data, int rsp_bytes) |
static int | mei_sendrecv_mkhi (struct mkhi_header *mkhi, void *req_data, int req_bytes, void *rsp_data, int rsp_bytes) |
static int | mei_sendrecv_icc (struct icc_header *icc, void *req_data, int req_bytes, void *rsp_data, int rsp_bytes) |
static void | intel_me_mbp_give_up (struct device *dev) |
static void | intel_me_mbp_clear (struct device *dev) |
static void | me_print_fw_version (struct mbp_fw_version_name *vers_name) |
static void | print_cap (const char *name, int state) |
static int | mkhi_get_fwcaps (struct mbp_mefwcaps *cap) |
static void | me_print_fwcaps (struct mbp_mefwcaps *cap) |
static int | mkhi_end_of_post (void) |
void | intel_me_finalize (struct device *dev) |
static int | me_icc_set_clock_enables (u32 mask) |
static enum me_bios_path | intel_me_path (struct device *dev) |
static int | intel_mei_setup (struct device *dev) |
static int | intel_me_extend_valid (struct device *dev) |
static u32 | me_to_host_words_pending (void) |
static int | intel_me_read_mbp (struct me_bios_payload *mbp_data, struct device *dev) |
static void | intel_me_init (struct device *dev) |
static void | intel_me_enable (struct device *dev) |
Variables | |
static const char *const | me_bios_path_values [] |
static u8 * | mei_base_address |
static struct device_operations | device_ops |
static const unsigned short | pci_device_ids [] |
static const struct pci_driver intel_me | __pci_driver |
#define ASSIGN_FIELD_PTR | ( | field_, | |
val_ | |||
) |
|
static |
Definition at line 669 of file me.c.
References BIOS_DEBUG, BIOS_ERR, CONFIG, count, me_heres::extend_feature_present, me_heres::extend_reg_algorithm, me_heres::extend_reg_valid, PCI_ME_EXT_SHA1, PCI_ME_EXT_SHA256, PCI_ME_HER, PCI_ME_HERES, pci_read_config32(), printk, and me_heres::raw.
Referenced by intel_me_init().
Definition at line 519 of file me.c.
References FD2, me_hfs::fpt_bad, intel_me_mbp_clear(), ME_HFS_CWS_NORMAL, ME_HFS_MODE_NORMAL, mei_base_address, mkhi_end_of_post(), me_hfs::operation_mode, PCH_DISABLE_MEI1, pci_and_config16(), PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_MEM_ATTR_MASK, PCI_COMMAND, PCI_COMMAND_IO, PCI_COMMAND_MASTER, PCI_COMMAND_MEMORY, PCI_ME_HFS, pci_read_config32(), me_hfs::raw, RCBA32_OR, and me_hfs::working_state.
Definition at line 850 of file me.c.
References BIOS_DEBUG, BIOS_NOTICE, device::chip_info, config, CONFIG, me_bios_payload::fw_capabilities, me_bios_payload::fw_version_name, intel_me_extend_valid(), intel_me_path(), intel_me_read_mbp(), intel_mei_setup(), me_bios_path_values, me_icc_set_clock_enables(), ME_NORMAL_BIOS_PATH, me_print_fw_version(), me_print_fwcaps(), memset(), mbp_plat_time::mrst_pltrst_time_ms, me_bios_payload::plat_time, mbp_plat_time::pltrst_cpurst_time_ms, printk, and mbp_plat_time::wake_event_mrst_time_ms.
Definition at line 413 of file me.c.
References BIOS_INFO, BIOS_WARNING, count, intel_me_mbp_give_up(), me_hfs2::mbp_cleared, ME_DELAY, ME_RETRY, PCI_ME_HFS2, pci_read_config32(), printk, me_hfs2::raw, and udelay().
Referenced by intel_me_finalize().
Definition at line 397 of file me.c.
References mei_csr::interrupt_generate, PCI_ME_H_GS2, PCI_ME_MBP_GIVE_UP, pci_write_config32(), read_host_csr(), mei_csr::reset, and write_host_csr().
Referenced by intel_me_mbp_clear(), and intel_me_read_mbp().
|
static |
Definition at line 554 of file me.c.
References icc_header::api_version, BIOS_ERR, BIOS_INFO, icc_clock_enables_msg::clock_enables, ICC_API_VERSION_LYNXPOINT, ICC_SET_CLOCK_ENABLES, mask, mei_sendrecv_icc(), NULL, and printk.
Referenced by intel_me_init().
|
static |
Definition at line 733 of file me.c.
References mbp_item_header::app_id, ASSIGN_FIELD_PTR, BIOS_DEBUG, BIOS_ERR, BIOS_INFO, CONFIG, mbp_payload::data, mbp_payload::header, ICC, intel_me_mbp_give_up(), mei_csr::interrupt_generate, mbp_item_header::item_id, mbp_item_header::length, malloc(), MBP_IDENT, MBP_MAKE_IDENT, me_hfs2::mbp_rdy, me_to_host_words_pending(), PCI_ME_HFS2, pci_read_config32(), printk, me_hfs2::raw, mbp_header::raw, read_cb(), read_host_csr(), and write_host_csr().
Referenced by intel_me_init().
|
static |
Definition at line 642 of file me.c.
References resource::base, BIOS_DEBUG, mei_csr::interrupt_generate, mei_base_address, PCI_BASE_ADDRESS_0, PCI_COMMAND, PCI_COMMAND_MASTER, PCI_COMMAND_MEMORY, pci_or_config16(), printk, probe_resource(), read_host_csr(), mei_csr::ready, res2mmio(), mei_csr::reset, resource::size, and write_host_csr().
Referenced by intel_me_init().
|
static |
Definition at line 554 of file me.c.
Referenced by intel_me_init().
|
static |
Definition at line 434 of file me.c.
References BIOS_DEBUG, BIOS_ERR, mbp_fw_version_name::build_version, mbp_fw_version_name::hotfix_version, mbp_fw_version_name::major_version, mbp_fw_version_name::minor_version, and printk.
Referenced by intel_me_init().
|
static |
Definition at line 473 of file me.c.
References BIOS_ERR, mbp_mefwcaps::full_net, mbp_mefwcaps::icc_over_clocking, mbp_mefwcaps::intel_at, mbp_mefwcaps::intel_cls, mbp_mefwcaps::intel_mpc, mbp_mefwcaps::ipv6, mbp_mefwcaps::kvm, mbp_mefwcaps::manageability, mkhi_get_fwcaps(), mbp_mefwcaps::och, mbp_mefwcaps::pavp, print_cap(), printk, mbp_mefwcaps::std_net, mbp_mefwcaps::tls, mbp_mefwcaps::vlan, and mbp_mefwcaps::wlan.
Referenced by intel_me_init().
Definition at line 713 of file me.c.
References mei_csr::buffer_depth, mei_csr::buffer_read_ptr, mei_csr::buffer_write_ptr, read_me_csr(), and mei_csr::ready.
Referenced by intel_me_read_mbp().
Definition at line 43 of file me.c.
References BIOS_SPEW, mei_csr::buffer_depth, mei_csr::buffer_read_ptr, mei_csr::buffer_write_ptr, CONFIG, mei_csr::interrupt_enable, mei_csr::interrupt_generate, mei_csr::interrupt_status, MEI_H_CB_WW, MEI_H_CSR, MEI_ME_CB_RW, MEI_ME_CSR_HA, offset, printk, mei_csr::raw, mei_csr::ready, mei_csr::reset, and type.
Referenced by read_cb(), read_me_csr(), and write_cb().
Definition at line 252 of file me.c.
References BIOS_ERR, mei_csr::buffer_read_ptr, mei_csr::buffer_write_ptr, header, mei_csr::interrupt_generate, mei_csr::interrupt_status, mei_header::is_complete, mei_header::length, ME_DELAY, ME_RETRY, mei_wait_for_me_ready(), printk, mei_header::raw, read_cb(), read_host_csr(), read_me_csr(), udelay(), and write_host_csr().
Referenced by mei_sendrecv_icc(), and mei_sendrecv_mkhi().
Definition at line 126 of file me.c.
References mei_csr::interrupt_generate, mei_wait_for_me_ready(), read_host_csr(), mei_csr::ready, mei_csr::reset, and write_host_csr().
Referenced by mei_send_packet().
Definition at line 204 of file me.c.
References mei_csr::buffer_depth, mei_csr::buffer_write_ptr, header, mei_header::host_address, mei_send_packet(), and read_host_csr().
Referenced by mei_sendrecv_icc(), and mei_sendrecv_mkhi().
|
static |
Definition at line 240 of file me.c.
References mei_header::client_address, header, mei_header::host_address, and mei_send_packet().
Referenced by mei_sendrecv_icc(), and mei_sendrecv_mkhi().
|
static |
Definition at line 150 of file me.c.
References BIOS_DEBUG, BIOS_ERR, mei_csr::buffer_depth, mei_csr::buffer_write_ptr, mei_csr::interrupt_generate, mei_header::length, mei_reset(), mei_wait_for_me_ready(), printk, mei_header::raw, read_host_csr(), write_cb(), and write_host_csr().
Referenced by mei_send_data(), and mei_send_header().
|
inlinestatic |
Definition at line 369 of file me.c.
References MEI_ADDRESS_ICC, MEI_HOST_ADDRESS, mei_recv_msg(), mei_send_data(), and mei_send_header().
Referenced by intel_me_path().
|
inlinestatic |
Definition at line 331 of file me.c.
References BIOS_ERR, mkhi_header::command, mkhi_header::group_id, mkhi_header::is_response, MEI_ADDRESS_MKHI, MEI_HOST_ADDRESS, mei_recv_msg(), mei_send_data(), mei_send_header(), and printk.
Referenced by mkhi_end_of_post(), and mkhi_get_fwcaps().
|
static |
Definition at line 110 of file me.c.
References BIOS_ERR, ME_DELAY, ME_RETRY, printk, read_me_csr(), mei_csr::ready, and udelay().
Referenced by mei_recv_msg(), mei_reset(), and mei_send_packet().
|
static |
Definition at line 500 of file me.c.
References BIOS_ERR, BIOS_INFO, BIOS_NOTICE, mkhi_header::group_id, mei_sendrecv_mkhi(), MKHI_END_OF_POST, MKHI_GROUP_ID_GEN, NULL, and printk.
Referenced by intel_me_finalize().
|
static |
Definition at line 453 of file me.c.
References BIOS_ERR, me_fwcaps::caps_sku, mkhi_header::group_id, mei_sendrecv_mkhi(), MKHI_FWCAPS_GET_RULE, MKHI_GROUP_ID_FWCAPS, and printk.
Referenced by me_print_fwcaps().
|
inlinestatic |
Definition at line 446 of file me.c.
References BIOS_DEBUG, name, and printk.
Referenced by me_print_fwcaps().
Definition at line 102 of file me.c.
References mei_base_address, mei_dump(), MEI_ME_CB_RW, and read32().
Referenced by intel_me_read_mbp(), and mei_recv_msg().
Definition at line 43 of file me.c.
Referenced by intel_me_mbp_give_up(), intel_me_read_mbp(), intel_mei_setup(), mei_recv_msg(), mei_reset(), mei_send_data(), and mei_send_packet().
Definition at line 83 of file me.c.
References mei_base_address, mei_dump(), MEI_H_CSR, mei_csr::raw, and write32().
Referenced by me_to_host_words_pending(), mei_recv_msg(), and mei_wait_for_me_ready().
Definition at line 96 of file me.c.
References mei_base_address, mei_dump(), MEI_H_CB_WW, and write32().
Referenced by mei_send_packet().
Definition at line 83 of file me.c.
Referenced by intel_me_mbp_give_up(), intel_me_read_mbp(), intel_mei_setup(), mei_recv_msg(), mei_reset(), and mei_send_packet().
|
static |
|
static |
|
static |
Definition at line 31 of file me.c.
Referenced by intel_me_init().
|
static |
Definition at line 41 of file me.c.
Referenced by intel_me_finalize(), intel_mei_setup(), read_cb(), read_me_csr(), and write_cb().
|
static |