static void print_xsdt_table(sfi_info_t *sfi_info) { if(sfi_info->xsdt_table) { size_t i; DLOGV("Number of XSDT table entries: %u", SFI_NUM_XSDT_ENTRIES(sfi_info->xsdt_table)); DLOGV("(addr, name)"); for(i = 0; i < SFI_NUM_XSDT_ENTRIES(sfi_info->xsdt_table); i++) { ACPI_TABLE_HEADER *table = (ACPI_TABLE_HEADER*) map_virtual_page((sfi_info->xsdt_table->TableOffsetEntry[i] & 0xFFFFF000) | 3); if(table == NULL) { panic("Failed to map XSDT sub-table"); } table = (ACPI_TABLE_HEADER*)(uint32) (((uint32)table) | (sfi_info->xsdt_table->TableOffsetEntry[i] & 0xFFF)); DLOGV("(0x%llX, %c%c%c%c)", sfi_info->xsdt_table->TableOffsetEntry[i], table->Signature[0], table->Signature[1], table->Signature[2], table->Signature[3]); if(strncmp(table->Signature, SFI_SIG_MCFG, 4) == 0) { sfi_info->mcfg_table = (sfi_mcfg_table_t*)table; print_mcfg_table(sfi_info); } else { unmap_virtual_page(table); } } } else { DLOGV("NO XSDT Table"); } }
static void print_wake_table(sfi_info_t *sfi_info) { if(sfi_info->wake_table) { DLOGV("Wake routine vector phys addr = 0x%X", (uint32)sfi_info->wake_table->phys_addr); } else { DLOGV("No Wake Table"); } }
void HWCDisplayExternal::ApplyScanAdjustment(hwc_rect_t *display_frame) { if (display_intf_->IsUnderscanSupported()) { return; } // Read user defined width and height ratio int width = 0, height = 0; HWCDebugHandler::Get()->GetProperty("sdm.external_action_safe_width", &width); float width_ratio = FLOAT(width) / 100.0f; HWCDebugHandler::Get()->GetProperty("sdm.external_action_safe_height", &height); float height_ratio = FLOAT(height) / 100.0f; if (width_ratio == 0.0f || height_ratio == 0.0f) { return; } uint32_t panel_width = 0; uint32_t panel_height = 0; GetPanelResolution(&panel_width, &panel_height); if (panel_width == 0 || panel_height == 0) { DLOGV("Invalid panel dimensions (%d, %d)", panel_width, panel_height); return; } int x_offset = INT((FLOAT(panel_width) * width_ratio) / 2.0f); int y_offset = INT((FLOAT(panel_height) * height_ratio) / 2.0f); display_frame->left = display_frame->left + x_offset; display_frame->top = display_frame->top + y_offset; display_frame->right = display_frame->right - x_offset; display_frame->bottom = display_frame->bottom - y_offset; }
static void print_syst_table(sfi_info_t *sfi_info) { size_t i; DLOGV("Number of SFI table entries: %u", SFI_NUM_SYST_ENTRIES(sfi_info->system_table)); for(i = 0; i < SFI_NUM_SYST_ENTRIES(sfi_info->system_table); i++) { #ifdef DEBUG_SFI_VERBOSE sfi_common_table_header_t *table = (sfi_common_table_header_t*) SFI_PHYS_TO_VIRT(sfi_info, sfi_info->system_table->entries[i]); #endif DLOGV("syst_table[%u] 0x%X %c%c%c%c", i, sfi_info->system_table->entries[i], table->signature[0], table->signature[1], table->signature[2], table->signature[3]); } }
static void print_apic_table(sfi_info_t *sfi_info) { if(sfi_info->cpus_table) { size_t i; DLOGV("Number of APIC table entries: %u", SFI_NUM_APIC_ENTRIES(sfi_info->cpus_table)); for(i = 0; i < SFI_NUM_APIC_ENTRIES(sfi_info->cpus_table); i++) { DLOGV("ioapic_phys = 0x%X", (uint32)sfi_info->apic_table->ioapic_phys[i]); } } else { DLOGV("No APIC Table"); } }
static void print_cpus_table(sfi_info_t *sfi_info) { if(sfi_info->cpus_table) { size_t i; DLOGV("Number of CPU table entries: %u", SFI_NUM_CPUS_ENTRIES(sfi_info->cpus_table)); for(i = 0; i < SFI_NUM_CPUS_ENTRIES(sfi_info->cpus_table); i++) { DLOGV("sfi_info->cpus_table->lapic_ids[%d] = %u", i, sfi_info->cpus_table->lapic_ids[i]); } } else { DLOGV("No CPUS Table"); } }
static void print_mrtc_table(sfi_info_t *sfi_info) { if(sfi_info->mrtc_table) { size_t i; DLOGV("Number of M-Real Time Clock table entries: %u", SFI_NUM_MRTC_ENTRIES(sfi_info->mrtc_table)); for(i = 0; i < SFI_NUM_MRTC_ENTRIES(sfi_info->mtmr_table); i++) { DLOGV("phys_addr = 0x%X\nirq = 0x%X", sfi_info->mtmr_table->timers[i].phys_addr, sfi_info->mtmr_table->timers[i].irq); } } else { DLOGV("No M-Real Time Clock Table"); } }
void d_memory_print_memusage(){ #if __WIN32__ == 1 struct mallinfo info = mallinfo(); DLOGI("used memory %.2f Mo, %.2f Mo with mmap\n",info.arena / 1000000.0f,info.hblkhd / 1000000.0f); #else DLOGV("function mallinfo() not available on this platform"); #endif }
static void print_mtmr_table(sfi_info_t *sfi_info) { if(sfi_info->mtmr_table) { size_t i; DLOGV("Number of M-Timer table entries: %u", SFI_NUM_MTMR_ENTRIES(sfi_info->mtmr_table)); for(i = 0; i < SFI_NUM_MTMR_ENTRIES(sfi_info->mtmr_table); i++) { DLOGV("phys_addr = 0x%X\nfrequency = 0x%X\nirq = 0x%X", sfi_info->mtmr_table->timers[i].phys_addr, sfi_info->mtmr_table->timers[i].frequency, sfi_info->mtmr_table->timers[i].irq); } } else { DLOGV("No M-Timer Table"); } }
static void print_mcfg_table(sfi_info_t *sfi_info) { if(sfi_info->mcfg_table) { DLOGV("Number of MCFG table entries: %u", SFI_NUM_MCFG_ENTRIES(sfi_info->mcfg_table)); size_t i; DLOGV("(Address, PciSegment, StartBusNumber, EndBusNumber)"); for(i = 0; i < SFI_NUM_MCFG_ENTRIES(sfi_info->mcfg_table); i++) { DLOGV("(0x%llX, 0x%X, 0x%X, 0x%X)", sfi_info->mcfg_table->entries[i].Address, (uint32)sfi_info->mcfg_table->entries[i].PciSegment, (uint32)sfi_info->mcfg_table->entries[i].StartBusNumber, (uint32)sfi_info->mcfg_table->entries[i].EndBusNumber); } } else { DLOGV("No MCFG Table"); } }
static void print_freq_table(sfi_info_t *sfi_info) { if(sfi_info->freq_table) { size_t i; DLOGV("Number of Frequency table entries: %u", SFI_NUM_FREQ_ENTRIES(sfi_info->freq_table)); DLOGV("(frequency, transition_latency, perf_ctl_val)"); for(i = 0; i < SFI_NUM_FREQ_ENTRIES(sfi_info->freq_table); i++) { DLOGV("(0x%X, 0x%X, 0x%X)", sfi_info->freq_table->frequencies[i].frequency, sfi_info->freq_table->frequencies[i].transition_latency, sfi_info->freq_table->frequencies[i].perf_ctl_val); } } else { DLOGV("No Frequency Table"); } }
static void print_mmap_table(sfi_info_t *sfi_info) { if(sfi_info->mmap_table) { size_t i; DLOGV("Number of MMAP table entries: %u", SFI_NUM_MMAP_ENTRIES(sfi_info->mmap_table)); DLOGV("(type, physical_start, virtual_start, num_of_pages, attribute)"); for(i = 0; i < SFI_NUM_MMAP_ENTRIES(sfi_info->mmap_table); i++) { DLOGV("(%u, 0x%X, 0x%X, 0x%X, 0x%X)", (uint32)sfi_info->mmap_table->memory_descriptors[i].type, (uint32)sfi_info->mmap_table->memory_descriptors[i].physical_start, (uint32)sfi_info->mmap_table->memory_descriptors[i].virtual_start, (uint32)sfi_info->mmap_table->memory_descriptors[i].num_of_pages, (uint32)sfi_info->mmap_table->memory_descriptors[i].attribute); } } else { DLOGV("No Memory Map Table"); } }
static void print_gpio_table(sfi_info_t *sfi_info) { if(sfi_info->gpio_table) { size_t i; DLOGV("Number of GPIO table entries: %u", SFI_NUM_GPIO_ENTRIES(sfi_info->gpio_table)); DLOGV("(controller_name, pin_number, pin_name)"); for(i = 0; i < SFI_NUM_GPIO_ENTRIES(sfi_info->gpio_table); i++) { DLOGV_NO_PRE("SFI: ("); print_non_null_string_name(sfi_info->gpio_table->gpios[i].controller_name, sizeof(sfi_info->gpio_table->gpios[i].controller_name)); DLOGV_NO_PRE(", 0x%X, ", (uint32)sfi_info->gpio_table->gpios[i].pin_number); print_non_null_string_name(sfi_info->gpio_table->gpios[i].pin_name, sizeof(sfi_info->gpio_table->gpios[i].pin_name)); DLOGV_NO_PRE(")\n"); } } else { DLOGV("No GPIO Table"); } }
static void print_devs_table(sfi_info_t *sfi_info) { if(sfi_info->devs_table) { size_t i; DLOGV("Number of device table entries: %u", SFI_NUM_DEVS_ENTRIES(sfi_info->devs_table)); DLOGV("(host_type, host_number, address, irq, max_frequency, name)"); for(i = 0; i < SFI_NUM_DEVS_ENTRIES(sfi_info->devs_table); i++) { DLOGV_NO_PRE("SFI: (0x%X, 0x%X, 0x%X, 0x%X, 0x%X, ", (uint32)sfi_info->devs_table->devices[i].host_type, (uint32)sfi_info->devs_table->devices[i].host_number, (uint32)sfi_info->devs_table->devices[i].address, (uint32)sfi_info->devs_table->devices[i].irq, (uint32)sfi_info->devs_table->devices[i].max_frequency); print_non_null_string_name(sfi_info->devs_table->devices[i].name, sizeof(sfi_info->devs_table->devices[i].name)); DLOGV_NO_PRE(")\n"); } } else { DLOGV("No Device Table"); } }