ahci: move MASTER_PASSWORD in options.mk as ATA_MASTER_PASSWORD

pull/443/head
Marco Oliverio 2024-04-23 14:14:02 +02:00
parent 8dc8c8ca22
commit e784c75aef
1 changed files with 2 additions and 4 deletions

View File

@ -85,8 +85,6 @@
#define HBA_TBL_SIZE 0x800
#define HBA_TBL_ALIGN 0x80
#define MASTER_PASSWORD "master"
static uint8_t ahci_hba_fis[HBA_FIS_SIZE * AHCI_MAX_PORTS]
__attribute__((aligned(HBA_FIS_SIZE)));
static uint8_t ahci_hba_clb[HBA_CLB_SIZE * AHCI_MAX_PORTS]
@ -406,10 +404,10 @@ static int sata_disable_password(int drv)
ata_st = ata_security_get_state(drv);
wolfBoot_printf("ATA: State SEC%d\r\n", ata_st);
if (ata_st == ATA_SEC4) {
r = ata_security_unlock_device(drv, MASTER_PASSWORD, 1);
r = ata_security_unlock_device(drv, ATA_MASTER_PASSWORD, 1);
wolfBoot_printf("ATA device unlock: returned %d\r\n", r);
if (r == 0) {
r = ata_security_disable_password(drv, MASTER_PASSWORD, 1);
r = ata_security_disable_password(drv, ATA_MASTER_PASSWORD, 1);
wolfBoot_printf("ATA disable password: returned %d\r\n", r);
}
}