type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines |
#define SEP_LINE2 \ |
defines | #define EBDA_POINTER 0x040e /* location of EBDA pointer */ |
defines | #define TOPOFMEM_POINTER 0x0413 /* BIOS: base memory size */ |
defines |
#define DEFAULT_TOPOFMEM 0xa0000 |
defines |
#define BIOS_BASE 0xf0000 |
defines | #define BIOS_BASE2 0xe0000 |
defines | #define BIOS_SIZE 0x10000 |
defines | #define ONE_KBYTE 1024 |
defines |
#define GROPE_AREA1 0x80000 |
defines | #define GROPE_AREA2 0x90000 |
defines | #define GROPE_SIZE 0x10000 |
defines |
#define PROCENTRY_FLAG_EN 0x01 |
defines | #define PROCENTRY_FLAG_BP 0x02 |
defines | #define IOAPICENTRY_FLAG_EN 0x01 |
defines |
#define MAXPNSTR 132 |
defines |
#define COREBOOT_MP_TABLE 0 |
defines | #define NEXT(X) ((X) += 4) |
functions | void usage(void)
{
fprintf(stderr,
"usage: mptable [-dmesg] [-verbose] [-grope] [-help]\n");
exit(0);
} |
functions | void write_code(char **code)
{
while (*code)
printf("%s\n", *code++);
} |
functions | void apic_probe(vm_offset_t * paddr, int *where)
{
/*
* c rewrite of apic_probe() by Jack F. Vogel
*/
int x;
u_short segment;
vm_offset_t target;
u_int buffer[BIOS_SIZE / sizeof(int)];
if (verbose)
printf("\n");
/* search Extended Bios Data Area, if present */
if (verbose)
printf(" looking for EBDA p... |
functions | void MPFloatingPointer(vm_offset_t paddr, int where, mpfps_t * mpfps)
{
/* read in mpfps structure */
seekEntry(paddr);
readEntry(mpfps, sizeof(mpfps_t));
/* show its contents */
if (verbose) {
printf("MP Floating Pointer Structure:\n\n");
printf(" location:\t\t\t");
switch (where) {
case 1:
printf(... |
functions | void MPConfigDefault(int featureByte)
{
printf(" MP default config type: %d\n\n", featureByte);
switch (featureByte) {
case 1:
printf(" bus: ISA, APIC: 82489DX\n");
break;
case 2:
printf(" bus: EISA, APIC: 82489DX\n");
break;
case 3:
printf(" bus: EISA, APIC: 82489DX\n");
break;
case 4:
print... |
functions | void MPConfigTableHeader(uint32_t pap)
{
vm_offset_t paddr;
mpcth_t cth;
int x;
int totalSize;
int count, c;
int type;
if (pap == 0) {
printf("MP Configuration Table Header MISSING!\n");
exit(1);
} |
functions | if defined( RAW_DUMP )
{
int ofd;
u_char dumpbuf[4096];
ofd = open("/tmp/mpdump", O_CREAT | O_RDWR);
seekEntry(paddr);
readEntry(dumpbuf, 1024);
write(ofd, dumpbuf, 1024);
close(ofd);
} |
functions | int readType(void)
{
u_char type;
if (read(pfd, &type, sizeof(u_char)) != sizeof(u_char))
err(1, "type read; pfd: %d", pfd);
if (lseek(pfd, -1, SEEK_CUR) < 0)
err(1, "type seek");
return (int)type;
} |
functions | void seekEntry(vm_offset_t addr)
{
if (lseek(pfd, (off_t) addr, SEEK_SET) < 0)
err(1, "/dev/mem seek");
} |
functions | void readEntry(void *entry, int size)
{
if (read(pfd, entry, size) != size)
err(1, "readEntry");
} |
functions | void processorEntry(void)
{
ProcEntry entry;
/* read it into local memory */
readEntry(&entry, sizeof(entry));
/* count it */
++ncpu;
if (noisy) {
printf("\t\t%2d", entry.apicID);
printf("\t 0x%2x", entry.apicVersion);
printf("\t %s, %s",
(entry.cpuFlags & PROCENTRY_FLAG_BP) ? "BSP" : "AP",
... |
functions | int lookupBusType(char *name)
{
int x;
for (x = 0; x < MAX_BUSTYPE; ++x)
if (strcmp(busTypeTable[x].name, name) == 0)
return busTypeTable[x].type;
return UNKNOWN_BUSTYPE;
} |
functions | void busEntry(void)
{
char name[8];
BusEntry entry;
int i;
/* read it into local memory */
readEntry(&entry, sizeof(entry));
/* count it */
++nbus;
if (verbose) {
printf("\t\t%2d", entry.busID);
printf("\t ");
pnstr(entry.busType, 6);
printf("\n");
} |
functions | void ioApicEntry(void)
{
IOApicEntry entry;
/* read it into local memory */
readEntry(&entry, sizeof(entry));
/* count it */
++napic;
if (noisy) {
printf("\t\t%2d", entry.apicID);
printf("\t 0x%02x", entry.apicVersion);
printf("\t %s",
(entry.
apicFlags & IOAPICENTRY_FLAG_EN) ? "usable" :
... |
functions | void intEntry(void)
{
IntEntry entry;
/* read it into local memory */
readEntry(&entry, sizeof(entry));
/* count it */
if ((int)entry.type == 3)
++nintr;
if (noisy) {
printf("\n\t\t%s", intTypes[(int)entry.intType]);
printf("\t%9s", polarityMode[(int)entry.intFlags & 0x03]);
printf("%12s", triggerMode... |
functions | void lintEntry(void)
{
IntEntry entry;
/* read it into local memory */
readEntry(&entry, sizeof(entry));
/* count it */
if ((int)entry.type == 3)
++nintr;
if (noisy) {
printf("\t\t%s", intTypes[(int)entry.intType]);
printf("\t%9s", polarityMode[(int)entry.intFlags & 0x03]);
printf("%12s", triggerMode[... |
functions | void sasEntry(void)
{
SasEntry entry;
/* read it into local memory */
readEntry(&entry, sizeof(entry));
printf("--\n%s\n", extendedtableEntryTypes[entry.type - 128].name);
printf(" bus ID: %d", entry.busID);
printf(" address type: ");
switch (entry.addressType) {
case 0:
printf("I/O address\n");
break;
c... |
functions | void bhdEntry(void)
{
BhdEntry entry;
/* read it into local memory */
readEntry(&entry, sizeof(entry));
printf("--\n%s\n", extendedtableEntryTypes[entry.type - 128].name);
printf(" bus ID: %d", entry.busID);
printf(" bus info: 0x%02x", entry.busInfo);
printf(" parent bus ID: %d", entry.busParent);
} |
functions | void cbasmEntry(void)
{
CbasmEntry entry;
/* read it into local memory */
readEntry(&entry, sizeof(entry));
printf("--\n%s\n", extendedtableEntryTypes[entry.type - 128].name);
printf(" bus ID: %d", entry.busID);
printf(" address modifier: %s\n", (entry.addressMod & 0x01) ?
"subtract" : "add");
printf("... |
functions | void doDmesg(void)
{
if (verbose)
puts(SEP_LINE);
printf("dmesg output:\n\n");
fflush(stdout);
system("dmesg");
} |
functions | void doOptionList(void)
{
if (verbose)
puts(SEP_LINE);
printf("# SMP kernel config file options:\n\n");
printf("\n# Required:\n");
printf("options SMP\t\t\t# Symmetric MultiProcessor Kernel\n");
printf("options APIC_IO\t\t\t# Symmetric (APIC) I/O\n");
printf("\n# Optional (built-in defaults will work in mos... |
functions | void pnstr(uint8_t * s, int c)
{
uint8_t string[MAXPNSTR + 1];
if (c > MAXPNSTR)
c = MAXPNSTR;
strncpy((char *)string, (char *)s, c);
string[c] = '\0';
printf("%s", string);
} |
main | int main(int argc, char *argv[])
{
vm_offset_t paddr;
int where;
mpfps_t mpfps;
int defaultConfig;
/* announce ourselves */
if (verbose)
puts(SEP_LINE2);
printf("/* generated by MPTable, version %d.%d.%d*/\n", VMAJOR, VMINOR,
VDELTA);
printf("/* as modified by RGM for coreboot */\n");
write_code(p... |
includes |
#include <epan/packet.h> |
includes | #include <epan/to_str.h> |
includes | #include <epan/etypes.h> |
includes | #include <epan/expert.h> |
defines | #define FIP_HEADER_LEN 10 |
defines | #define FIP_BPW 4 /* bytes per descriptor length unit */ |
functions | void
fip_desc_fc4f(tvbuff_t *tvb, proto_tree *tree, proto_item *item)
{
guint mask;
guint offset;
static const int *types_word0[] = { /* types 0 - 31 */
&hf_fip_type_ip,
&hf_fip_type_fcp,
NULL
} |
functions | void
dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint op;
guint sub;
guint rlen;
proto_item *ti;
proto_item *item;
proto_tree *fip_tree;
proto_tree *subtree;
guint dtype;
guint dlen;
guint desc_offset;
guint va... |
functions | void
proto_register_fip(void)
{
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
/*
* FIP header fields.
*/
{ &hf_fip_ver,
{ "Version", "fip.ver",
FT_UINT8, BASE_DEC, NULL, 0xf0,
NULL, HFILL} |
functions | void
proto_reg_handoff_fip(void)
{
dissector_handle_t fip_handle;
fip_handle = create_dissector_handle(dissect_fip, proto_fip);
dissector_add_uint("ethertype", ETHERTYPE_FIP, fip_handle);
fc_handle = find_dissector("fc");
} |
includes | #include <linux/gpio.h> |
includes | #include <linux/wlan_plat.h> |
includes | #include <linux/kernel.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/pinctrl/consumer.h> |
includes | #include <linux/msm_pcie.h> |
includes | #include <linux/mmc/host.h> |
includes | #include <linux/platform_device.h> |
includes | #include <linux/of_gpio.h> |
includes | #include <linux/module.h> |
includes | #include <net/somc_wifi.h> |
structs | struct bcmdhd_platform_data {
struct platform_device *pdev;
struct pinctrl *pinctrl;
struct pinctrl_state *gpio_state_active;
struct pinctrl_state *gpio_state_suspend;
unsigned int wlan_reg_on;
unsigned int pci_number;
}; |
functions | int somc_wifi_init(struct platform_device *pdev)
{
int ret, ret_sus, gpio;
struct pinctrl *pinctrl;
struct pinctrl_state *lookup_state;
bcmdhd_data = kzalloc(sizeof(*bcmdhd_data), GFP_KERNEL);
if (!bcmdhd_data) {
dev_err(&pdev->dev, "%s: no memory\n", __func__);
ret = -ENOMEM;
goto err_alloc_bcmdhd_data;
} |
functions | void somc_wifi_deinit(struct platform_device *pdev)
{
if (bcmdhd_data) {
if (gpio_is_valid(bcmdhd_data->wlan_reg_on))
gpio_free(bcmdhd_data->wlan_reg_on);
if (!IS_ERR_OR_NULL(bcmdhd_data->pinctrl) &&
!IS_ERR_OR_NULL(bcmdhd_data->gpio_state_suspend)) {
int ret = pinctrl_select_state(bcmdhd_data->pinctrl,
... |
functions | void somc_wifi_mmc_host_register(struct mmc_host *host)
{
wlan_mmc_host = host;
} |
functions | int somc_wifi_set_power(int on)
{
gpio_set_value(bcmdhd_data->wlan_reg_on, on);
return 0;
} |
functions | int somc_wifi_set_carddetect(int present)
{
int ret = 0;
if (present)
ret = msm_pcie_enumerate_locked(bcmdhd_data->pci_number);
return ret;
} |
functions | int somc_wifi_set_carddetect(int present)
{
if (wlan_mmc_host)
mmc_detect_change(wlan_mmc_host, 0);
return 0;
} |
includes |
#include <sys/types.h> |
includes | #include <sys/ioctl.h> |
includes | #include <sys/mman.h> |
includes | #include <sys/utsname.h> |
includes |
#include <linux/kvm.h> |
includes | #include <linux/kvm_para.h> |
defines | #define DPRINTF(fmt, ...) \ |
defines | #define DPRINTF(fmt, ...) \ |
defines |
#define MSR_KVM_WALL_CLOCK 0x11 |
defines | #define MSR_KVM_SYSTEM_TIME 0x12 |
defines | #define BUS_MCEERR_AR 4 |
defines | #define BUS_MCEERR_AO 5 |
defines |
#define XSAVE_FCW_FSW 0 |
defines | #define XSAVE_FTW_FOP 1 |
defines | #define XSAVE_CWD_RIP 2 |
defines | #define XSAVE_CWD_RDP 4 |
defines | #define XSAVE_MXCSR 6 |
defines | #define XSAVE_ST_SPACE 8 |
defines | #define XSAVE_XMM_SPACE 40 |
defines | #define XSAVE_XSTATE_BV 128 |
defines | #define XSAVE_YMMH_SPACE 144 |
defines |
#define HFLAG_COPY_MASK \ |
defines |
#define VMX_INVALID_GUEST_STATE 0x80000021 |
functions | bool kvm_allows_irq0_override(void)
{
return !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();
} |
functions | int get_para_features(KVMState *s)
{
int i, features = 0;
for (i = 0; i < ARRAY_SIZE(para_features) - 1; i++) {
if (kvm_check_extension(s, para_features[i].cap)) {
features |= (1 << para_features[i].feature);
} |
functions | uint32_t cpuid_entry_get_reg(struct kvm_cpuid_entry2 *entry, int reg)
{
uint32_t ret = 0;
switch (reg) {
case R_EAX:
ret = entry->eax;
break;
case R_EBX:
ret = entry->ebx;
break;
case R_ECX:
ret = entry->ecx;
break;
case R_EDX:
ret = entry-... |
functions | uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
uint32_t index, int reg)
{
struct kvm_cpuid2 *cpuid;
uint32_t ret = 0;
uint32_t cpuid_1_edx;
bool found = false;
cpuid = get_supported_cpuid(s);
struct kvm_cpuid_entry2 *entry = cpuid_fi... |
functions | else if (function == 1 && reg == R_ECX) {
/* We can set the hypervisor flag, even if KVM does not return it on
* GET_SUPPORTED_CPUID
*/
ret |= CPUID_EXT_HYPERVISOR;
/* tsc-deadline flag is not returned by GET_SUPPORTED_CPUID, but it
* can be enabled if the kernel has K... |
functions | else if (function == 0x80000001 && reg == R_EDX) {
/* On Intel, kvm returns cpuid according to the Intel spec,
* so add missing bits according to the AMD spec:
*/
cpuid_1_edx = kvm_arch_get_supported_cpuid(s, 1, 0, R_EDX);
ret |= cpuid_1_edx & CPUID_EXT2_AMD_ALIASES;
} |
functions | void kvm_unpoison_all(void *param)
{
HWPoisonPage *page, *next_page;
QLIST_FOREACH_SAFE(page, &hwpoison_page_list, list, next_page) {
QLIST_REMOVE(page, list);
qemu_ram_remap(page->ram_addr, TARGET_PAGE_SIZE);
g_free(page);
} |
functions | void kvm_hwpoison_page_add(ram_addr_t ram_addr)
{
HWPoisonPage *page;
QLIST_FOREACH(page, &hwpoison_page_list, list) {
if (page->ram_addr == ram_addr) {
return;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.