src/include: Indent code using tabs
Fix the following error and warning detected by checkpatch.pl: ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line TEST=Build and run on Galileo Gen2 Change-Id: I487771b8f4d7e104457116b772cd32df5cd721a6 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18646 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
bb4ae07417
commit
708fc274b5
|
@ -157,9 +157,9 @@ struct boot_state_callback {
|
||||||
* individual callbacks on a given state. 0 is returned on success < 0 on
|
* individual callbacks on a given state. 0 is returned on success < 0 on
|
||||||
* error. */
|
* error. */
|
||||||
int boot_state_sched_on_entry(struct boot_state_callback *bscb,
|
int boot_state_sched_on_entry(struct boot_state_callback *bscb,
|
||||||
boot_state_t state);
|
boot_state_t state);
|
||||||
int boot_state_sched_on_exit(struct boot_state_callback *bscb,
|
int boot_state_sched_on_exit(struct boot_state_callback *bscb,
|
||||||
boot_state_t state);
|
boot_state_t state);
|
||||||
/* Schedule an array of entries of size num. */
|
/* Schedule an array of entries of size num. */
|
||||||
struct boot_state_init_entry;
|
struct boot_state_init_entry;
|
||||||
void boot_state_sched_entries(struct boot_state_init_entry *entries,
|
void boot_state_sched_entries(struct boot_state_init_entry *entries,
|
||||||
|
|
|
@ -52,7 +52,7 @@ struct cbmem_entry;
|
||||||
/* Determine the size for CBMEM root and the small allocations */
|
/* Determine the size for CBMEM root and the small allocations */
|
||||||
static inline size_t cbmem_overhead_size(void)
|
static inline size_t cbmem_overhead_size(void)
|
||||||
{
|
{
|
||||||
return 2 * CBMEM_ROOT_MIN_SIZE;
|
return 2 * CBMEM_ROOT_MIN_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* By default cbmem is attempted to be recovered. Returns 0 if cbmem was
|
/* By default cbmem is attempted to be recovered. Returns 0 if cbmem was
|
||||||
|
|
|
@ -151,7 +151,7 @@ struct gptimers {
|
||||||
struct watchdog {
|
struct watchdog {
|
||||||
unsigned short ctl;
|
unsigned short ctl;
|
||||||
unsigned short cntll;
|
unsigned short cntll;
|
||||||
unsigned short cntlh;
|
unsigned short cntlh;
|
||||||
unsigned char pad[10];
|
unsigned char pad[10];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,9 +100,9 @@ static inline unsigned int fms(unsigned int x)
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
__asm__("bsrl %1,%0\n\t"
|
__asm__("bsrl %1,%0\n\t"
|
||||||
"jnz 1f\n\t"
|
"jnz 1f\n\t"
|
||||||
"movl $0,%0\n"
|
"movl $0,%0\n"
|
||||||
"1:" : "=r" (r) : "g" (x));
|
"1:" : "=r" (r) : "g" (x));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,9 +112,9 @@ static inline unsigned int fls(unsigned int x)
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
__asm__("bsfl %1,%0\n\t"
|
__asm__("bsfl %1,%0\n\t"
|
||||||
"jnz 1f\n\t"
|
"jnz 1f\n\t"
|
||||||
"movl $32,%0\n"
|
"movl $32,%0\n"
|
||||||
"1:" : "=r" (r) : "g" (x));
|
"1:" : "=r" (r) : "g" (x));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -204,8 +204,8 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd_data);
|
||||||
int dimm_is_registered(enum spd_dimm_type type);
|
int dimm_is_registered(enum spd_dimm_type type);
|
||||||
void dram_print_spd_ddr3(const dimm_attr * dimm);
|
void dram_print_spd_ddr3(const dimm_attr * dimm);
|
||||||
int spd_xmp_decode_ddr3(dimm_attr * dimm,
|
int spd_xmp_decode_ddr3(dimm_attr * dimm,
|
||||||
spd_raw_data spd,
|
spd_raw_data spd,
|
||||||
enum ddr3_xmp_profile profile);
|
enum ddr3_xmp_profile profile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Read double word from specified address
|
* \brief Read double word from specified address
|
||||||
|
|
|
@ -100,7 +100,7 @@ static inline int i2c_read_raw(unsigned int bus, uint8_t chip, uint8_t *data,
|
||||||
* [start][slave addr][w][data][stop]
|
* [start][slave addr][w][data][stop]
|
||||||
*/
|
*/
|
||||||
static inline int i2c_write_raw(unsigned int bus, uint8_t chip, uint8_t *data,
|
static inline int i2c_write_raw(unsigned int bus, uint8_t chip, uint8_t *data,
|
||||||
int len)
|
int len)
|
||||||
{
|
{
|
||||||
struct i2c_seg seg =
|
struct i2c_seg seg =
|
||||||
{ .read = 0, .chip = chip, .buf = data, .len = len };
|
{ .read = 0, .chip = chip, .buf = data, .len = len };
|
||||||
|
|
|
@ -73,7 +73,7 @@ static inline unsigned long range_entry_tag(const struct range_entry *r)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void range_entry_update_tag(struct range_entry *r,
|
static inline void range_entry_update_tag(struct range_entry *r,
|
||||||
unsigned long new_tag)
|
unsigned long new_tag)
|
||||||
{
|
{
|
||||||
r->tag = new_tag;
|
r->tag = new_tag;
|
||||||
}
|
}
|
||||||
|
@ -89,14 +89,14 @@ static inline void range_entry_update_tag(struct range_entry *r,
|
||||||
/* Initialize memranges structure providing an optional array of range_entry
|
/* Initialize memranges structure providing an optional array of range_entry
|
||||||
* to use as the free list. */
|
* to use as the free list. */
|
||||||
void memranges_init_empty(struct memranges *ranges, struct range_entry *free,
|
void memranges_init_empty(struct memranges *ranges, struct range_entry *free,
|
||||||
size_t num_free);
|
size_t num_free);
|
||||||
|
|
||||||
/* Initialize and fill a memranges structure according to the
|
/* Initialize and fill a memranges structure according to the
|
||||||
* mask and match type for all memory resources. Tag each entry with the
|
* mask and match type for all memory resources. Tag each entry with the
|
||||||
* specified type. */
|
* specified type. */
|
||||||
void memranges_init(struct memranges *ranges,
|
void memranges_init(struct memranges *ranges,
|
||||||
unsigned long mask, unsigned long match,
|
unsigned long mask, unsigned long match,
|
||||||
unsigned long tag);
|
unsigned long tag);
|
||||||
|
|
||||||
/* Remove and free all entries within the memranges structure. */
|
/* Remove and free all entries within the memranges structure. */
|
||||||
void memranges_teardown(struct memranges *ranges);
|
void memranges_teardown(struct memranges *ranges);
|
||||||
|
@ -107,8 +107,8 @@ void memranges_teardown(struct memranges *ranges);
|
||||||
* memranges_add_resources(range, IORESOURCE_CACHEABLE,
|
* memranges_add_resources(range, IORESOURCE_CACHEABLE,
|
||||||
* IORESROUCE_CACHEABLE, my_cacheable_tag); */
|
* IORESROUCE_CACHEABLE, my_cacheable_tag); */
|
||||||
void memranges_add_resources(struct memranges *ranges,
|
void memranges_add_resources(struct memranges *ranges,
|
||||||
unsigned long mask, unsigned long match,
|
unsigned long mask, unsigned long match,
|
||||||
unsigned long tag);
|
unsigned long tag);
|
||||||
|
|
||||||
/* Add memory resources that match with the corresponding mask and match but
|
/* Add memory resources that match with the corresponding mask and match but
|
||||||
* also provide filter as additional check. The filter will return non-zero
|
* also provide filter as additional check. The filter will return non-zero
|
||||||
|
@ -119,31 +119,31 @@ void memranges_add_resources(struct memranges *ranges,
|
||||||
* IORESROUCE_CACHEABLE, my_cacheable_tag, filter); */
|
* IORESROUCE_CACHEABLE, my_cacheable_tag, filter); */
|
||||||
typedef int (*memrange_filter_t)(struct device *dev, struct resource *res);
|
typedef int (*memrange_filter_t)(struct device *dev, struct resource *res);
|
||||||
void memranges_add_resources_filter(struct memranges *ranges,
|
void memranges_add_resources_filter(struct memranges *ranges,
|
||||||
unsigned long mask, unsigned long match,
|
unsigned long mask, unsigned long match,
|
||||||
unsigned long tag,
|
unsigned long tag,
|
||||||
memrange_filter_t filter);
|
memrange_filter_t filter);
|
||||||
|
|
||||||
/* Fill all address ranges up to limit (exclusive) not covered by an entry by
|
/* Fill all address ranges up to limit (exclusive) not covered by an entry by
|
||||||
* inserting new entries with the provided tag. */
|
* inserting new entries with the provided tag. */
|
||||||
void memranges_fill_holes_up_to(struct memranges *ranges,
|
void memranges_fill_holes_up_to(struct memranges *ranges,
|
||||||
resource_t limit, unsigned long tag);
|
resource_t limit, unsigned long tag);
|
||||||
|
|
||||||
/* Create a hole in the range by deleting/modifying entries that overlap with
|
/* Create a hole in the range by deleting/modifying entries that overlap with
|
||||||
* the region specified by base and size. */
|
* the region specified by base and size. */
|
||||||
void memranges_create_hole(struct memranges *ranges,
|
void memranges_create_hole(struct memranges *ranges,
|
||||||
resource_t base, resource_t size);
|
resource_t base, resource_t size);
|
||||||
|
|
||||||
/* Insert a resource to the given memranges. All existing ranges
|
/* Insert a resource to the given memranges. All existing ranges
|
||||||
* covered by range specified by base and size will be removed before a
|
* covered by range specified by base and size will be removed before a
|
||||||
* new one is added. */
|
* new one is added. */
|
||||||
void memranges_insert(struct memranges *ranges,
|
void memranges_insert(struct memranges *ranges,
|
||||||
resource_t base, resource_t size, unsigned long tag);
|
resource_t base, resource_t size, unsigned long tag);
|
||||||
|
|
||||||
/* Update all entries with old_tag to new_tag. */
|
/* Update all entries with old_tag to new_tag. */
|
||||||
void memranges_update_tag(struct memranges *ranges, unsigned long old_tag,
|
void memranges_update_tag(struct memranges *ranges, unsigned long old_tag,
|
||||||
unsigned long new_tag);
|
unsigned long new_tag);
|
||||||
|
|
||||||
/* Returns next entry after the provided entry. NULL if r is last. */
|
/* Returns next entry after the provided entry. NULL if r is last. */
|
||||||
struct range_entry *memranges_next_entry(struct memranges *ranges,
|
struct range_entry *memranges_next_entry(struct memranges *ranges,
|
||||||
const struct range_entry *r);
|
const struct range_entry *r);
|
||||||
#endif /* MEMRANGE_H_ */
|
#endif /* MEMRANGE_H_ */
|
||||||
|
|
|
@ -45,7 +45,7 @@ int rmodule_load_alignment(const struct rmodule *m);
|
||||||
* load_offset is the address to load and relocate the rmodule.
|
* load_offset is the address to load and relocate the rmodule.
|
||||||
* region_alignment must be a power of 2. */
|
* region_alignment must be a power of 2. */
|
||||||
int rmodule_calc_region(unsigned int region_alignment, size_t rmodule_size,
|
int rmodule_calc_region(unsigned int region_alignment, size_t rmodule_size,
|
||||||
size_t *region_size, int *load_offset);
|
size_t *region_size, int *load_offset);
|
||||||
|
|
||||||
/* Support for loading rmodule stages. This API is only available when
|
/* Support for loading rmodule stages. This API is only available when
|
||||||
* using dynamic cbmem because it uses the dynamic cbmem API to obtain
|
* using dynamic cbmem because it uses the dynamic cbmem API to obtain
|
||||||
|
|
|
@ -47,7 +47,7 @@ int thread_run(void (*func)(void *), void *arg);
|
||||||
* transitions from occurring in the (state, seq) pair of the boot state
|
* transitions from occurring in the (state, seq) pair of the boot state
|
||||||
* machine. */
|
* machine. */
|
||||||
int thread_run_until(void (*func)(void *), void *arg,
|
int thread_run_until(void (*func)(void *), void *arg,
|
||||||
boot_state_t state, boot_state_sequence_t seq);
|
boot_state_t state, boot_state_sequence_t seq);
|
||||||
/* Return 0 on successful yield for the given amount of time, < 0 when thread
|
/* Return 0 on successful yield for the given amount of time, < 0 when thread
|
||||||
* did not yield. */
|
* did not yield. */
|
||||||
int thread_yield_microseconds(unsigned int microsecs);
|
int thread_yield_microseconds(unsigned int microsecs);
|
||||||
|
@ -70,7 +70,7 @@ void asmlinkage switch_to_thread(uintptr_t new_stack, uintptr_t *saved_stack);
|
||||||
* will enter the thread_entry() function with arg as a parameter. The
|
* will enter the thread_entry() function with arg as a parameter. The
|
||||||
* saved_stack field in the struct thread needs to be updated accordingly. */
|
* saved_stack field in the struct thread needs to be updated accordingly. */
|
||||||
void arch_prepare_thread(struct thread *t,
|
void arch_prepare_thread(struct thread *t,
|
||||||
void asmlinkage (*thread_entry)(void *), void *arg);
|
void asmlinkage (*thread_entry)(void *), void *arg);
|
||||||
#else
|
#else
|
||||||
static inline void threads_initialize(void) {}
|
static inline void threads_initialize(void) {}
|
||||||
static inline int thread_run(void (*func)(void *), void *arg) { return -1; }
|
static inline int thread_run(void (*func)(void *), void *arg) { return -1; }
|
||||||
|
|
|
@ -86,7 +86,7 @@ static inline void mono_time_add_msecs(struct mono_time *mt, long ms)
|
||||||
/* Compare two absolute times: Return -1, 0, or 1 if t1 is <, =, or > t2,
|
/* Compare two absolute times: Return -1, 0, or 1 if t1 is <, =, or > t2,
|
||||||
* respectively. */
|
* respectively. */
|
||||||
static inline int mono_time_cmp(const struct mono_time *t1,
|
static inline int mono_time_cmp(const struct mono_time *t1,
|
||||||
const struct mono_time *t2)
|
const struct mono_time *t2)
|
||||||
{
|
{
|
||||||
if (t1->microseconds == t2->microseconds)
|
if (t1->microseconds == t2->microseconds)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -99,14 +99,14 @@ static inline int mono_time_cmp(const struct mono_time *t1,
|
||||||
|
|
||||||
/* Return true if t1 after t2 */
|
/* Return true if t1 after t2 */
|
||||||
static inline int mono_time_after(const struct mono_time *t1,
|
static inline int mono_time_after(const struct mono_time *t1,
|
||||||
const struct mono_time *t2)
|
const struct mono_time *t2)
|
||||||
{
|
{
|
||||||
return mono_time_cmp(t1, t2) > 0;
|
return mono_time_cmp(t1, t2) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return true if t1 before t2. */
|
/* Return true if t1 before t2. */
|
||||||
static inline int mono_time_before(const struct mono_time *t1,
|
static inline int mono_time_before(const struct mono_time *t1,
|
||||||
const struct mono_time *t2)
|
const struct mono_time *t2)
|
||||||
{
|
{
|
||||||
return mono_time_cmp(t1, t2) < 0;
|
return mono_time_cmp(t1, t2) < 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ uint32_t tlcl_lib_init(void);
|
||||||
* Perform a raw TPM request/response transaction.
|
* Perform a raw TPM request/response transaction.
|
||||||
*/
|
*/
|
||||||
uint32_t tlcl_send_receive(const uint8_t *request, uint8_t *response,
|
uint32_t tlcl_send_receive(const uint8_t *request, uint8_t *response,
|
||||||
int max_length);
|
int max_length);
|
||||||
|
|
||||||
/* Commands */
|
/* Commands */
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ uint32_t tlcl_set_deactivated(uint8_t flag);
|
||||||
* be NULL. The TPM error code is returned.
|
* be NULL. The TPM error code is returned.
|
||||||
*/
|
*/
|
||||||
uint32_t tlcl_get_flags(uint8_t *disable, uint8_t *deactivated,
|
uint32_t tlcl_get_flags(uint8_t *disable, uint8_t *deactivated,
|
||||||
uint8_t *nvlocked);
|
uint8_t *nvlocked);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the bGlobalLock flag, which only a reboot can clear. The TPM error
|
* Set the bGlobalLock flag, which only a reboot can clear. The TPM error
|
||||||
|
@ -144,7 +144,7 @@ uint32_t tlcl_lock_nv_write(uint32_t index);
|
||||||
* Perform a TPM_Extend.
|
* Perform a TPM_Extend.
|
||||||
*/
|
*/
|
||||||
uint32_t tlcl_extend(int pcr_num, const uint8_t *in_digest,
|
uint32_t tlcl_extend(int pcr_num, const uint8_t *in_digest,
|
||||||
uint8_t *out_digest);
|
uint8_t *out_digest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the entire set of permanent flags.
|
* Get the entire set of permanent flags.
|
||||||
|
|
Loading…
Reference in New Issue