first and last commit

This commit is contained in:
Chris Nutter committed 2023-07-08 13:03:17 -07:00
commit 1bf4efd552
2612 files changed
+636500

No files matched your search

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2007-2012 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
#include <platform.h>
#include <platform/chipid.h>
bool chipid_get_raw_production_mode(void)
{
bool current_production_mode = chipid_get_current_production_mode();
u_int32_t minimum_epoch = chipid_get_minimum_epoch();
// Pre-H6 platforms only support a "current" view of fuses.
// However, pre-H6 platforms only used epoch greater than 0 for
// production fused chips, so we can infer demotion.
return current_production_mode || (minimum_epoch > 0);
}
+37
View File
@@ -0,0 +1,37 @@
# Copyright (C) 2007 Apple Inc. All rights reserved.
#
# This document is the property of Apple Inc.
# It is considered confidential and proprietary.
#
# This document may not be reproduced or transmitted in any form,
# in whole or in part, without the express written permission of
# Apple Inc.
# Format a trivial function
#
# Input records are formatted as:
#
# $2 : return type
# $3 : function name
# $4 : argument list
# $5 : return value
#
# Caller is expected to set FUNCTION and TEMPLATE
#
BEGIN {
FS = "[ \t]*:[ \t]*"
}
$1=="#" {
next
}
$3==FUNCTION {
if ($2 == "void") {
cmd = sprintf("sed -e \'s/TYPE/%s/g\' -e \'s/FUNCTION/%s/g\' -e \'s/ARGLIST/%s/g\' -e \'s/RETVAL/%s/g\' -e \'s/RET//g\' %s", $2, $3, $4, $5, TEMPLATE)
} else {
cmd = sprintf("sed -e \'s/TYPE/%s/g\' -e \'s/FUNCTION/%s/g\' -e \'s/ARGLIST/%s/g\' -e \'s/RETVAL/%s/g\' -e \'s/RET/return/g\' %s", $2, $3, $4, $5, TEMPLATE)
}
system(cmd)
}
+49
View File
@@ -0,0 +1,49 @@
# Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
#
# This document is the property of Apple Computer, Inc.
# It is considered confidential and proprietary.
#
# This document may not be reproduced or transmitted in any form,
# in whole or in part, without the express written permission of
# Apple Computer, Inc.
#
LIBPD_DIR := $(GET_LOCAL_DIR)
LIBPD_BUILD := $(call TOLIBDIR,$(LIBPD_DIR)/LIBPD.a)
COMMONLIBS += LIBPD
# Only process the remainder of the makefile if we are building libraries
#
ifeq ($(MAKEPHASE),libraries)
# Build definitions for the target/platform independent parts of the platform defaults code
SPECIFICATION := $(LIBPD_DIR)/platform.defaults
TEMPLATE := $(LIBPD_DIR)/template.c
LISTER := $(LIBPD_DIR)/lister.awk
FORMATTER := $(LIBPD_DIR)/formatter.awk
PLATFORM_DEFAULTS := $(shell awk -v TAG=INDEP -f $(LISTER) $(SPECIFICATION))
ifneq ($(PLATFORM_DEFAULTS),)
GENERATED_SRC_DIR := $(call TOLIBOBJDIR,$(LIBPD_DIR))
GENERATED_NAMES := $(foreach tf,$(PLATFORM_DEFAULTS),$(word 1,$(subst :, ,$(tf))))
GENERATED_SRCS := $(addprefix $(GENERATED_SRC_DIR)/,$(addsuffix .c,$(GENERATED_NAMES)))
GENERATED_OBJS := $(addprefix $(GENERATED_SRC_DIR)/,$(addsuffix .o,$(GENERATED_NAMES)))
$(GENERATED_SRCS): $(SPECIFICATION) $(TEMPLATE) $(LISTER) $(FORMATTER)
$(GENERATED_SRCS): func = $(notdir $(@:.c=))
$(GENERATED_SRCS):
@echo GEN $@
@mkdir -p $(dir $@)
@awk -v TEMPLATE=$(TEMPLATE) -v FUNCTION=$(func) -f $(FORMATTER) < $(SPECIFICATION) > $@
LIBPD_OBJS := $(GENERATED_OBJS)
$(LIBPD_BUILD): $(LIBPD_OBJS)
ALL_DEPS += $(LIBPD_OBJS:%o=%d)
endif
endif
+18
View File
@@ -0,0 +1,18 @@
# Copyright (C) 2007 Apple Inc. All rights reserved.
#
# This document is the property of Apple Inc.
# It is considered confidential and proprietary.
#
# This document may not be reproduced or transmitted in any form,
# in whole or in part, without the express written permission of
# Apple Inc.
# Print the function field from lines with tags matching TAG
BEGIN {
FS = "[ \t]*:[ \t]*"
}
$1==TAG {
printf("%s ", $3)
}
+135
View File
@@ -0,0 +1,135 @@
#
# Copyright (C) 2007-2015 Apple Inc. All rights reserved.
#
# This document is the property of Apple Inc.
# It is considered confidential and proprietary.
#
# This document may not be reproduced or transmitted in any form,
# in whole or in part, without the express written permission of
# Apple Inc.
#
#
# This file describes default implementations of platform functions.
#
# Each line comprises five fields, separated by "<whitespace>:<whitespace>"
#
# The fields are:
#
# <tag> : <return type> : <function name> : <argument list> : <return expression>
#
# The tag field indicates whether the function is independent (INDEP) of or dependent (DEP) on the
# build configuration. Functions marked INDEP are built into a static library keyed off
# LIBRARY_TAG; functions marked DEP are built into a static library for every build pass.
# chipid
INDEP : bool : chipid_get_production_mode : void : false
INDEP : bool : chipid_get_current_production_mode : void : chipid_get_production_mode()
INDEP : void : chipid_clear_production_mode : void :
INDEP : bool : chipid_get_secure_mode : void : false
INDEP : u_int32_t : chipid_get_security_domain : void : kPlatformSecurityDomainDarwin
INDEP : u_int32_t : chipid_get_minimum_epoch : void : 0
INDEP : u_int32_t : chipid_get_chip_id : void : 0
INDEP : u_int32_t : chipid_get_chip_revision : void : 0
INDEP : u_int64_t : chipid_get_ecid_id : void : 0
INDEP : u_int64_t : chipid_get_die_id : void : 0
INDEP : uint32_t : chipid_get_fuse_revision : void : 0
INDEP : void : chipid_set_fuse_lock : bool locked :
INDEP : bool : chipid_get_memory_dqcal : u_int32_t *cal_data : false
INDEP : u_int32_t : chipid_get_memory_manufacturer : void : 0
# platform
INDEP : bool : platform_get_current_production_mode : void : chipid_get_current_production_mode()
INDEP : bool : platform_get_raw_production_mode : void : chipid_get_raw_production_mode()
INDEP : void : platform_clear_production_mode : void : chipid_clear_production_mode()
INDEP : int : platform_early_init : void : 0
INDEP : int : platform_init : void : 0
INDEP : int : platform_late_init : void : 0
INDEP : int : platform_debug_init : void : 0
INDEP : int : platform_init_hwpins : void : 0
INDEP : int : platform_init_internal_mem : void : 0
INDEP : int : platform_init_display : void : 0
INDEP : int : platform_init_display_mem : addr_t *base, size_t *size : 0
INDEP : int : platform_init_setup_clocks : void : 0
INDEP : int : platform_init_power : void : 0
INDEP : int : platform_init_mass_storage : void : 0
INDEP : int : platform_init_mass_storage_panic : void : 0
INDEP : void : platform_mmu_setup : bool resume :
INDEP : u_int32_t : platform_get_boot_config : void : 0
INDEP : u_int32_t : platform_get_board_id : void : 0
INDEP : u_int32_t : platform_get_security_domain : void : chipid_get_security_domain()
INDEP : bool : platform_get_secure_mode : void : chipid_get_secure_mode()||chipid_get_raw_production_mode()
INDEP : bool : platform_get_core_idle_enable : void : true
INDEP : bool : platform_get_ecid_image_personalization_required : void : false
INDEP : u_int32_t : platform_get_hardware_epoch : void : chipid_get_minimum_epoch()
INDEP : u_int64_t : platform_get_nonce : void : 0
INDEP : u_int32_t : platform_get_chip_id : void : chipid_get_chip_id()
INDEP : u_int32_t : platform_get_chip_revision : void : chipid_get_chip_revision()
INDEP : u_int64_t : platform_get_ecid_id : void : chipid_get_ecid_id()
INDEP : u_int64_t : platform_get_die_id : void : chipid_get_die_id()
INDEP : u_int32_t : platform_get_fuse_revision : void : chipid_get_fuse_revision()
INDEP : u_int32_t : platform_get_entropy : void : timer_get_entropy()
INDEP : u_int16_t : platform_get_usb_vendor_id : void : 0x05ac
INDEP : void : platform_set_dfu_status : bool dfu :
INDEP : bool : platform_get_force_dfu : void : false
INDEP : bool : platform_get_request_dfu1 : void : false
INDEP : bool : platform_get_request_dfu2 : void : false
INDEP : bool : platform_get_lock_fuses_required : void : true
INDEP : uint32_t : platform_get_pcie_link_width : uint32_t link : 0
INDEP : bool : platform_set_usb_brick_detect : int select : false
INDEP : void : platform_halt : void : arch_halt()
INDEP : void : platform_deep_idle : void : platform_halt()
INDEP : int : platform_quiesce_display : void : 0
INDEP : int : platform_update_device_tree : void : 0
INDEP : void : platform_sleep : void :
INDEP : const char * : platform_get_usb_manufacturer_string : void : "Apple Inc."
INDEP : u_int16_t : platform_get_usb_device_version : void : 0
INDEP : int : platform_init_mainmem : bool resume : 0
INDEP : void : platform_init_mainmem_map : void :
INDEP : int : platform_bootprep : enum boot_target target : 0
INDEP : int : platform_quiesce_hardware : enum boot_target target : 0
INDEP : u_int32_t : platform_set_performance : u_int32_t level : kPerformanceHigh
INDEP : bool : platform_provide_spec_blob : const void *common_name, const size_t common_name_length, const void *serial_number, const size_t serial_number_length, void **spec_blob, size_t *spec_blob_length : false
INDEP : void : platform_watchdog_tickle : void :
INDEP : u_int32_t : platform_get_base_cpu_voltage : void : 0
INDEP : u_int32_t : platform_get_base_ram_voltage : void : 0
INDEP : int : platform_get_cpu_voltages : u_int32_t count, u_int32_t *voltages : -1
INDEP : int : platform_get_cpu_min_voltages : u_int32_t count, u_int32_t *voltages : -1
INDEP : int : platform_get_ram_voltages : u_int32_t count, u_int32_t *voltages : -1
INDEP : int : platform_get_gpu_ram_voltages : u_int32_t count, u_int32_t *voltages : -1
INDEP : int : platform_convert_voltages : int buck, u_int32_t count, u_int32_t *voltages : -1
INDEP : bool : platform_is_pre_lpddr4 : void : true
INDEP : u_int64_t : platform_get_memory_size : void : 0
INDEP : void : platform_set_memory_info : u_int8_t manuf_id, u_int64_t memory_size :
INDEP : u_int8_t : platform_get_memory_manufacturer_id : void : 0
INDEP : void : platform_asynchronous_exception : void :
INDEP : void : platform_adjust_memory_layout : void :
INDEP : uint64_t : platform_map_host_to_pci_bus_addr : uintptr_t addr : addr
INDEP : void : platform_setup_default_environment : void : target_setup_default_environment()
INDEP : void * : platform_get_boot_trampoline : void : 0
INDEP : size_t : platform_get_display_memory_size : void : 0
# target
INDEP : color_policy_t * : target_color_map_init : enum colorspace cs, color_policy_t *color_policy : NULL
INDEP : void : target_early_init : void :
INDEP : void : target_init : void :
INDEP : void : target_late_init : void :
INDEP : int : target_debug_init : void : 0
INDEP : void : target_quiesce_hardware : void :
INDEP : bool : target_should_poweroff : bool at_boot : false
INDEP : bool : target_should_recover : void : false
INDEP : void : target_setup_default_environment : void :
INDEP : int : target_bootprep : enum boot_target target : 0
INDEP : int : target_update_device_tree : void : 0
INDEP : void : target_set_led : int color :
INDEP : void : target_watchdog_tickle : void :
INDEP : void : target_debug : int code :
INDEP : u_int32_t : target_lookup_backlight_cal : int index : 0
INDEP : int : target_dclr_from_clrc : uint8_t *buffer, size_t size : -1
INDEP : u_int8_t : target_lm3534_gpr : u_int32_t ctlr : 3
INDEP : void * : target_get_display_configuration : void : 0
# application (these really belong somewhere else)
INDEP : bool : env_blacklist : const char *var, bool write : false
INDEP : bool : env_blacklist_nvram : const char *var : false
INDEP : bool : security_allow_memory : const void *address, size_t length : false
INDEP : bool : syscfg_find_tag : uint32_t tag, void **data, uint32_t *size : false
@@ -0,0 +1,34 @@
/*
* Copyright (C) 2014-2015 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
#include <debug.h>
#include <platform.h>
#include <target.h>
#if !WITH_TARGET_CONFIG && WITH_HW_GPIO
#include <drivers/apple/gpio.h>
#include <platform/pinconfig.h>
#endif
const uint32_t* platform_get_default_gpio_cfg(uint32_t gpioc)
{
#if WITH_TARGET_CONFIG
return target_get_default_gpio_cfg(gpioc);
#elif WITH_HW_GPIO
if (gpioc == 0)
return gpio_default_cfg_0;
#ifdef GPIO_1_GROUP_COUNT
if (gpioc == 1)
return gpio_default_cfg_0;
#endif
panic("unknown gpio controller %u", gpioc);
#else
panic("no default pinconfig source");
#endif
}
@@ -0,0 +1,82 @@
/*
* Copyright (C) 2007-2014 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
#include <debug.h>
#include <platform.h>
#include <platform/memmap.h>
uintptr_t platform_get_memory_region_base_optional(memory_region_type_t region)
{
uintptr_t base;
switch (region) {
case kMemoryRegion_Panic:
base = SDRAM_BASE + platform_get_memory_size() - PANIC_SIZE;
break;
#if defined(DISPLAY_BASE)
case kMemoryRegion_Display:
base = SDRAM_BASE + platform_get_memory_size() - platform_get_memory_region_size(kMemoryRegion_Display) - PANIC_SIZE;
break;
#endif
#if defined(SLEEP_TOKEN_BUFFER_BASE)
case kMemoryRegion_SleepToken:
base = SLEEP_TOKEN_BUFFER_BASE;
break;
#endif
case kMemoryRegion_Kernel:
base = SDRAM_BASE;
break;
default:
base = (uintptr_t)-1;
}
return base;
}
size_t platform_get_memory_region_size_optional(memory_region_type_t region)
{
size_t size;
switch (region) {
case kMemoryRegion_Panic:
size = PANIC_SIZE;
break;
#if defined(DISPLAY_SIZE)
case kMemoryRegion_Display:
size = platform_get_display_memory_size();
ASSERT(size != 0);
break;
#endif
#if defined(SLEEP_TOKEN_BUFFER_SIZE)
case kMemoryRegion_SleepToken:
size = SLEEP_TOKEN_BUFFER_SIZE;
break;
#endif
case kMemoryRegion_Kernel:
#if defined(DISPLAY_BASE)
size = platform_get_memory_region_base(kMemoryRegion_Display)- platform_get_memory_region_base(kMemoryRegion_Kernel);
#else
size = platform_get_memory_region_base(kMemoryRegion_Panic) - platform_get_memory_region_base(kMemoryRegion_Kernel);
#endif
break;
default:
size = (size_t)-1;
}
return size;
}
@@ -0,0 +1,23 @@
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
#include <debug.h>
#include <platform.h>
u_int32_t platform_get_spi_frequency(void)
{
#if SUPPORT_FPGA
return 2500000;
#else
return 12000000;
#endif
}
+51
View File
@@ -0,0 +1,51 @@
/*
* Copyright (C) 2009-2012 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
#include <sys.h>
#include <platform/memmap.h>
/*
* Default platform memory map; takes advantage of common platform
* defintions about memory sizes and locations.
*
* Note that this definition should only be used for simple applications
* where memory is all cached and identity-mapped. More complicated
* memory arrangements should be described in platform-specific code,
* rather than complicating this table.
*
* For some platforms/targets, SDRAM_LEN is not constant and so we
* have to compute a maximum via other means.
*
*/
#ifndef SDRAM_MAX_LEN
# ifndef SDRAM_BANK_COUNT
# define SDRAM_BANK_COUNT 1
# endif
# define SDRAM_MAX_LEN (SDRAM_BANK_LEN * SDRAM_BANK_COUNT)
#endif
#ifndef SRAM_MAX_LEN
# ifndef SRAM_BANK_COUNT
# define SRAM_BANK_COUNT 1
# endif
# define SRAM_MAX_LEN (SRAM_BANK_LEN * SRAM_BANK_COUNT)
#endif
struct mem_static_map_entry mem_static_map_entries[] = {
/* cached uncached physical size */
#ifdef SDRAM_BASE
{ SDRAM_BASE, MAP_NO_ENTRY, SDRAM_BASE, SDRAM_MAX_LEN },
#endif
#ifdef SRAM_BASE
{ SRAM_BASE, MAP_NO_ENTRY, SRAM_BASE, SRAM_MAX_LEN },
#endif
{MAP_NO_ENTRY, MAP_NO_ENTRY, MAP_NO_ENTRY, 0}
};
@@ -0,0 +1,40 @@
/*
* Copyright (C) 2012 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
#include <debug.h>
#include <drivers/power.h>
#include <platform/memmap.h>
#include <sys/boot.h>
#include <sys/security.h>
int32_t platform_restore_system(void)
{
uint32_t *signature = (uint32_t *)(SLEEP_TOKEN_BUFFER_BASE + kSleepTokenKernelOffset);
power_will_resume();
dprintf(DEBUG_INFO, "restore_system: signature[0]: 0x%08x, signature[1]: 0x%08x\n",
signature[0], signature[1]);
if ((signature[0] != 'MOSX') || (signature[1] != 'SUSP')) return -1;
signature[0] = 0;
signature[1] = 0;
if (!security_validate_sleep_token(SLEEP_TOKEN_BUFFER_BASE + kSleepTokeniBootOffset)) return -1;
/* Jump to reset vector */
dprintf(DEBUG_INFO, "restoring kernel\n");
prepare_and_jump(BOOT_DARWIN_RESTORE, NULL, NULL);
/* shouldn't get here */
panic("returned from restore_system\n");
}
+52
View File
@@ -0,0 +1,52 @@
# Copyright (C) 2007-2013 Apple Inc. All rights reserved.
#
# This document is the property of Apple Inc.
# It is considered confidential and proprietary.
#
# This document may not be reproduced or transmitted in any form,
# in whole or in part, without the express written permission of
# Apple Inc.
#
LOCAL_DIR := $(GET_LOCAL_DIR)
ifeq ($(IMAGE_FORMAT),img3)
ALL_OBJS += \
$(LOCAL_DIR)/chipid_get_raw_production_mode.o
endif
# To avoid having a bunch of little tiny files containing default
# functions, we auto-generate the trivial ones from a specification.
#
# XXX The techniques used here could be generalised to provide
# default implementations for other subsystems.
# Default functions that are independent of the build configuration
# are built into a static library shared across builds.
LIBRARY_MODULES += $(LOCAL_DIR)
#
# Library sources
#
# Adding files here is very expensive, as each file
# gets compiled for every target/product/build permutation.
#
PLATFORM_DEFAULT_SRCS := \
$(LOCAL_DIR)/platform_get_default_gpio_cfg.c \
$(LOCAL_DIR)/platform_get_memory_region.c \
$(LOCAL_DIR)/platform_get_spi_frequency.c \
$(LOCAL_DIR)/platform_memory_map.c \
$(LOCAL_DIR)/platform_restore_system.c \
$(LOCAL_DIR)/target_get_boot_battery_capacity.c \
$(LOCAL_DIR)/target_get_precharge_gg_flag_mask.c \
$(LOCAL_DIR)/target_get_property.c \
$(LOCAL_DIR)/target_get_property_base.c
ALL_DEPS += $(PLATFORM_DEFAULT_SRCS:%c=%d)
PLATFORM_DEFAULT_OBJS := $(call TOBUILDDIR,$(PLATFORM_DEFAULT_SRCS:%c=%o))
LOCALLIBS += PLATFORM_DEFAULT
PLATFORM_DEFAULT_BUILD := $(call TOBUILDDIR,$(LOCAL_DIR)/PLATFORM_DEFAULT.a)
$(PLATFORM_DEFAULT_BUILD): $(PLATFORM_DEFAULT_OBJS)
@@ -0,0 +1,12 @@
#if WITH_HW_POWER && WITH_TARGET_CONFIG
#include <limits.h>
#include <target/powerconfig.h>
#include <target.h>
#ifdef TARGET_BOOT_BATTERY_CAPACITY
int target_get_boot_battery_capacity(void)
{
return TARGET_BOOT_BATTERY_CAPACITY;
}
#endif
#endif // WITH_TARGET_CONFIG
@@ -0,0 +1,17 @@
#if WITH_HW_POWER && WITH_TARGET_CONFIG
#include <limits.h>
#include <debug.h>
#include <drivers/gasgauge.h>
#include <target/powerconfig.h>
#include <target.h>
int target_get_precharge_gg_flag_mask(void)
{
#ifdef TARGET_PRECHARGE_GG_FLAG_MASK
return TARGET_PRECHARGE_GG_FLAG_MASK;
#else
return kHDQRegFlagsMaskSOC1;
#endif
}
#endif // WITH_TARGET_CONFIG
+17
View File
@@ -0,0 +1,17 @@
/*
* Copyright (C) 2012-2013 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
#include <target.h>
bool
target_get_property(enum target_property prop, void *data, int maxdata, int *retlen)
{
return target_get_property_base(prop, data, maxdata, retlen);
}
@@ -0,0 +1,49 @@
/*
* Copyright (C) 2012-2013 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
#include <debug.h>
#include <lib/syscfg.h>
#include <target.h>
static const uint32_t prop_map[TARGET_PROPERTY_MAX] = {
[TARGET_PROPERTY_WIFI_MACADDR] = 'WMac',
[TARGET_PROPERTY_WIFI_CALIBRATION_TX_24] = 'W24G',
[TARGET_PROPERTY_WIFI_CALIBRATION_TX_50] = 'W50G',
[TARGET_PROPERTY_WIFI_CALIBRATION_RX_24] = 'W24R',
[TARGET_PROPERTY_WIFI_CALIBRATION_RX_50] = 'W50R',
[TARGET_PROPERTY_WIFI_CALIBRATION_RX_TEMP] = 'WRxT',
[TARGET_PROPERTY_WIFI_CALIBRATION_FREQ_GROUP_2G]= 'FG2G',
[TARGET_PROPERTY_WIFI_WCAL] = 'WCAL',
[TARGET_PROPERTY_WIFI_BOARD_SNUM] = 'WBSn',
[TARGET_PROPERTY_BT_MACADDR] = 'BMac',
[TARGET_PROPERTY_ETH_MACADDR] = 'EMac',
[TARGET_PROPERTY_BB_REGION_SKU] = 'RSKU',
[TARGET_PROPERTY_PINTO_MACADDR] = 'MMac',
[TARGET_PROPERTY_WIFI1_MACADDR] = 'WMc2',
[TARGET_PROPERTY_BT1_MACADDR] = 'BMc2',
[TARGET_PROPERTY_ETH1_MACADDR] = 'EMc2',
[TARGET_PROPERTY_BLUETOOTH_DEV_MACADDR0] = 'RMac',
};
bool
target_get_property_base(enum target_property prop, void *data, int maxdata, int *retlen)
{
int length = 0;
bool result = false;
if ((prop < TARGET_PROPERTY_MAX) && (prop_map[prop] != 0)) {
length = syscfgCopyDataForTag(prop_map[prop], data, maxdata);
result = (length == maxdata);
}
if (retlen != NULL) *retlen = length;
return result;
}
+27
View File
@@ -0,0 +1,27 @@
/*
* Copyright (C) 2007-2010 Apple Inc. All rights reserved.
*
* This document is the property of Apple Inc.
* It is considered confidential and proprietary.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Apple Inc.
*/
/*
* Template for trivial default functions.
*
* Add header includes here as required; it's not super-efficient but it works.
*/
#include <arch.h>
#include <lib/paint.h>
#include <platform.h>
#include <platform/chipid.h>
#include <platform/timer.h>
#include <sys/types.h>
#include <target.h>
TYPE FUNCTION ( ARGLIST )
{
RET RETVAL ;
}