coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
id.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __SOC_NVIDIA_TEGRA210_INCLUDE_SOC_ID_H__
4 #define __SOC_NVIDIA_TEGRA210_INCLUDE_SOC_ID_H__
5 
6 #include <device/mmio.h>
7 #include <soc/addressmap.h>
8 
9 static inline int context_avp(void)
10 {
11  const uint32_t avp_id = 0xaaaaaaaa;
12  void *const uptag = (void *)(uintptr_t)TEGRA_PG_UP_BASE;
13 
14  return read32(uptag) == avp_id;
15 }
16 
17 #endif /* __SOC_NVIDIA_TEGRA210_INCLUDE_SOC_ID_H__ */
static uint32_t read32(const void *addr)
Definition: mmio.h:22
static int context_avp(void)
Definition: id.h:9
@ TEGRA_PG_UP_BASE
Definition: addressmap.h:19
unsigned int uint32_t
Definition: stdint.h:14
unsigned long uintptr_t
Definition: stdint.h:21