Home
last modified time | relevance | path

Searched full:otp (Results 1 – 25 of 100) sorted by relevance

1234

/openbmc/u-boot/arch/arm/mach-stm32mp/
H A Dbsec.c25 #define BSEC_SWLOCK_OFF 0x07C /* write in OTP sticky lock */
47 * OTP Lock services definition
53 * bsec_check_error() - Check status of one otp
55 * @otp: otp number (0 - BSEC_OTP_MAX_VALUE)
58 static u32 bsec_check_error(u32 base, u32 otp) in bsec_check_error() argument
63 bit = 1 << (otp & OTP_LOCK_MASK); in bsec_check_error()
64 bank = ((otp >> OTP_LOCK_BANK_SHIFT) & OTP_LOCK_MASK) * sizeof(u32); in bsec_check_error()
77 * @otp: otp number (0 - BSEC_OTP_MAX_VALUE)
80 static bool bsec_read_lock(u32 address, u32 otp) in bsec_read_lock() argument
85 bit = 1 << (otp & OTP_LOCK_MASK); in bsec_read_lock()
[all …]
H A Dcpu.c57 /* BSEC OTP index */
286 * (silently) from the value in the OTP.
293 u32 otp[2]; in setup_mac_address() local
308 otp, sizeof(otp)); in setup_mac_address()
313 enetaddr[i] = ((uint8_t *)&otp)[i]; in setup_mac_address()
316 pr_err("invalid MAC address in OTP %pM", enetaddr); in setup_mac_address()
319 pr_debug("OTP MAC address = %pM\n", enetaddr); in setup_mac_address()
322 pr_err("Failed to set mac address %pM from OTP: %d\n", in setup_mac_address()
332 u32 otp[3] = {0, 0, 0 }; in setup_serial_number() local
346 otp, sizeof(otp)); in setup_serial_number()
[all …]
/openbmc/qemu/include/hw/nvram/
H A Dbcm2835_otp.h2 * BCM2835 One-Time Programmable (OTP) Memory
15 #define TYPE_BCM2835_OTP "bcm2835-otp"
20 /* https://elinux.org/BCM2835_registers#OTP */
37 /* Lock OTP Programming (Customer OTP and private key) */
40 /* -- Row 36-43: Customer OTP -- */
45 /* Magic numbers to lock programming of customer OTP and private key */
H A Dnpcm7xx_otp.h2 * Nuvoton NPCM7xx OTP (Fuse Array) Interface
22 /* Each OTP module holds 8192 bits of one-time programmable storage */
44 * struct NPCM7xxOTPState - Device state for one OTP module.
48 * @array: OTP storage array.
58 #define TYPE_NPCM7XX_OTP "npcm7xx-otp"
67 * npcm7xx_otp_array_write - ECC encode and write data to OTP array.
68 * @s: OTP module.
70 * @offset: Offset of first byte to be written in the OTP array.
H A Daspeed_otp.h2 * ASPEED OTP (One-Time Programmable) memory
16 #define TYPE_ASPEED_OTP "aspeed-otp"
/openbmc/openbmc/meta-aspeed/classes/
H A Dotptool.bbclass2 # to create OTP image
31 bbfatal "Generated OTP image failed."
34 otptool print "${otptool_config_outdir}"/otp-all.image
37 bbfatal "Printed OTP image failed."
41 "${otptool_config_outdir}"/otp-all.image \
42 ${DEPLOYDIR}/"${otptool_config_slug}"-otp-all.image
45 # Creates the OTP image
48 bbwarn "OTP creation is only supported on AST2600 boards"
H A Dsocsec-sign.bbclass2 # to sign the SPL (pubkey written to OTP region)
67 --otp_image ${DEPLOYDIR}/"$(basename ${otptool_config} .json)"-otp-all.image
70 bbfatal "Verified OTP image failed."
/openbmc/qemu/hw/misc/
H A Daspeed_sbc.c50 /* OTP command */
83 AspeedOTPState *otp = &s->otp; in aspeed_sbc_otp_read() local
91 "Invalid OTP addr 0x%x\n", in aspeed_sbc_otp_read()
97 ret = address_space_read(&otp->as, otp_offset, MEMTXATTRS_UNSPECIFIED, in aspeed_sbc_otp_read()
101 "Failed to read OTP memory, addr = %x\n", in aspeed_sbc_otp_read()
109 ret = address_space_read(&otp->as, otp_offset + 4, in aspeed_sbc_otp_read()
114 "Failed to read OTP memory, addr = %x\n", in aspeed_sbc_otp_read()
160 AspeedOTPState *otp = &s->otp; in aspeed_sbc_otp_prog() local
163 ret = address_space_write(&otp->as, otp_addr, MEMTXATTRS_UNSPECIFIED, in aspeed_sbc_otp_prog()
167 "Failed to write OTP memory, addr = %x\n", in aspeed_sbc_otp_prog()
[all …]
H A Dbcm2835_property.c329 /* Customer OTP */ in bcm2835_property_mbox_push()
340 uint32_t otp_row = bcm2835_otp_get_row(s->otp, in bcm2835_property_mbox_push()
354 /* Magic numbers to permanently lock customer OTP */ in bcm2835_property_mbox_push()
357 bcm2835_otp_set_row(s->otp, in bcm2835_property_mbox_push()
364 if (bcm2835_otp_get_row(s->otp, BCM2835_OTP_ROW_32) & in bcm2835_property_mbox_push()
373 bcm2835_otp_set_row(s->otp, in bcm2835_property_mbox_push()
389 uint32_t otp_row = bcm2835_otp_get_row(s->otp, in bcm2835_property_mbox_push()
404 if (bcm2835_otp_get_row(s->otp, BCM2835_OTP_ROW_32) & in bcm2835_property_mbox_push()
413 bcm2835_otp_set_row(s->otp, in bcm2835_property_mbox_push()
545 obj = object_property_get_link(OBJECT(dev), "otp", &error_abort); in bcm2835_property_realize()
[all …]
/openbmc/qemu/tests/functional/
H A Dtest_arm_aspeed_otp.py34 "-blockdev", f"driver=file,filename={otp_img},node-name=otp",
35 "-global", "aspeed-otp.drive=otp",
48 "-blockdev", f"driver=file,filename={otp_img},node-name=otp",
49 "-global", "aspeed-otp.drive=otp",
H A Dtest_arm_aspeed_ast1030.py52 'otp info conf',
53 'otp info scu',
/openbmc/qemu/hw/nvram/
H A Dnpcm7xx_otp.c2 * Nuvoton NPCM7xx OTP (Fuse Array) Interface
62 * struct NPCM7xxOTPClass - OTP module class.
66 * The two OTP modules (key-storage and fuse-array) have slightly different
106 /* Common register read handler for both OTP classes. */
134 /* Read a byte from the OTP array into the data register. */
143 /* Program a byte from the data register into the OTP array. */
175 /* Common register write handler for both OTP classes. */
253 /* Register read handler specific to the fuse array OTP module. */
263 * work the same way for both kinds of OTP modules. in npcm7xx_fuse_array_read()
268 /* FUSTRAP is stored as three copies in the OTP array. */ in npcm7xx_fuse_array_read()
[all …]
H A Dbcm2835_otp.c2 * BCM2835 One-Time Programmable (OTP) Memory
4 * The OTP implementation is mostly a stub except for the OTP rows
7 * The OTP registers are unimplemented due to lack of documentation.
19 /* OTP rows are 1-indexed */
32 /* Real OTP rows work as e-fuses */ in bcm2835_otp_set_row()
H A Daspeed_otp.c2 * ASPEED OTP (One-Time Programmable) memory
35 * - if OTP word is even-indexed, programmed bits flip 0->1 in valid_program_data()
151 error_setg(errp, "aspeed.otp: 'size' property must be set"); in aspeed_otp_realize()
162 s, "aspeed.otp", s->size); in aspeed_otp_realize()
/openbmc/u-boot/board/imgtec/ci20/
H A Dci20.c167 struct ci20_otp otp; in misc_init_r() local
170 /* Read the board OTP data */ in misc_init_r()
172 jz4780_efuse_read(0x18, 16, (u8 *)&otp); in misc_init_r()
175 if (!is_valid_ethaddr(otp.mac)) { in misc_init_r()
177 jz4780_efuse_read(0x8, 4, &otp.mac[0]); in misc_init_r()
178 jz4780_efuse_read(0x12, 2, &otp.mac[4]); in misc_init_r()
179 otp.mac[0] = (otp.mac[0] | 0x02) & ~0x01; in misc_init_r()
181 eth_env_set_enetaddr("ethaddr", otp.mac); in misc_init_r()
184 env_set_ulong("serial#", otp.serial_number); in misc_init_r()
185 env_set_ulong("board_date", otp.date); in misc_init_r()
[all …]
/openbmc/phosphor-dbus-interfaces/yaml/xyz/openbmc_project/User/
H A DTOTPAuthenticator.interface.yaml26 This method verifies OTP with Time-based One-time Password
28 OTP is valid or not which make sure user has setup valid secret key
31 - name: OTP
39 Returns true if provided OTP is valid otherwise returns false.
/openbmc/u-boot/cmd/
H A Dotp.c1119 printf("OTP revision ID is invalid.\n"); in otp_print_conf_image()
1130 printf("OTP revision ID is invalid.\n"); in otp_print_conf_image()
1138 printf("OTP revision ID\n"); in otp_print_conf_image()
1140 printf("OTP revision ID: 0x%x\n", rid_num); in otp_print_conf_image()
1495 printf("OTP data header is empty\n"); in otp_print_key()
1767 // ignore last two dw, the last two dw is used for slt otp write check. in otp_check_data_image()
1777 printf("Input image can't program into OTP, please check.\n"); in otp_check_data_image()
1787 printf("Input image can't program into OTP, please check.\n"); in otp_check_data_image()
1829 printf("Input image can't program into OTP, please check.\n"); in otp_check_strap_image()
1851 printf("Input image can't program into OTP, please check.\n"); in otp_check_conf_image()
[all …]
H A Dotp_info.h314 { 0, 25, 1, 0, "OTP strap Region : Writable" },
315 { 0, 25, 1, 1, "OTP strap Region : Write Protect" },
320 { 0, 29, 1, 0, "OTP key retire Region : Writable" },
321 { 0, 29, 1, 1, "OTP key retire Region : Write Protect" },
322 { 0, 31, 1, 0, "OTP memory lock disable" },
323 { 0, 31, 1, 1, "OTP memory lock enable" },
366 { 0, 25, 1, 0, "OTP strap Region : Writable" },
367 { 0, 25, 1, 1, "OTP strap Region : Write Protect" },
372 { 0, 29, 1, 0, "OTP key retire Region : Writable" },
373 { 0, 29, 1, 1, "OTP key retire Region : Write Protect" },
[all …]
/openbmc/u-boot/include/mtd/
H A Dmtd-abi.h111 /* OTP mode selection */
168 /* Set OTP (One-Time Programmable) mode (factory vs. user) */
170 /* Get number of OTP (One-Time Programmable) regions */
172 /* Get all OTP (One-Time Programmable) info about MTD */
248 * @MTD_FILE_MODE_NORMAL: OTP disabled, ECC enabled
249 * @MTD_FILE_MODE_OTP_FACTORY: OTP enabled in factory mode
250 * @MTD_FILE_MODE_OTP_USER: OTP enabled in user mode
251 * @MTD_FILE_MODE_RAW: OTP disabled, ECC disabled
/openbmc/openbmc/meta-evb/meta-evb-aspeed/meta-evb-ast2600/conf/machine/
H A Devb-ast2600.conf10 # 2. Provide platform OTP config.
12 # If users enable socsec signing but do not provide OTP config,
/openbmc/openbmc/meta-ibm/recipes-bsp/u-boot/u-boot-aspeed-sdk/p10bmc/
H A Dibm.json39 "Disable OTP Memory BIST Mode": true,
55 "Write Protect: OTP strap region": true,
58 "Enable write Protect of OTP key retire bits": false,
60 "OTP memory lock enable": false,
H A Dips.json46 "Disable OTP Memory BIST Mode": true,
62 "Write Protect: OTP strap region": true,
65 "Enable write Protect of OTP key retire bits": false,
67 "OTP memory lock enable": false,
/openbmc/u-boot/board/toradex/colibri_imx6/
H A Ddo_fuse.c7 * Helpers for i.MX OTP fusing during module production
88 "OTP fusing during module production",
94 "OTP fusing during module update",
/openbmc/u-boot/board/toradex/apalis_imx6/
H A Ddo_fuse.c7 * Helpers for i.MX OTP fusing during module production
88 "OTP fusing during module production",
94 "OTP fusing during module update",
/openbmc/u-boot/board/st/stm32mp1/
H A DREADME246 Mac id storage and retrieval in stm32mp otp :
250 To program a MAC address on virgin OTP words above, you can use the fuse command
251 on bank 0 to access to internal OTP:
255 1- Write OTP
258 2- Read OTP
264 ### Setting environment from OTP MAC address = "12:34:56:78:9a:bc"

1234