VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DcsBoot/DcsBoot.c2
-rw-r--r--DcsInfo/DcsInfo.c17
-rw-r--r--DcsInt/DcsInt.c11
3 files changed, 26 insertions, 4 deletions
diff --git a/DcsBoot/DcsBoot.c b/DcsBoot/DcsBoot.c
index f897a48..7eaf41b 100644
--- a/DcsBoot/DcsBoot.c
+++ b/DcsBoot/DcsBoot.c
@@ -71,7 +71,7 @@ UpdateDriverBmlStart() {
CHAR16* tmp = NULL;
// Driver load selected?
- drvInst = ConfigReadInt("DcsBmlDriver", 1);
+ drvInst = ConfigReadInt("DcsBmlDriver", 0);
if (drvInst) {
res = EfiGetVar(sDcsBmlDriverVar, &gEfiGlobalVariableGuid, &tmp, &len, &attr);
// Driver installed?
diff --git a/DcsInfo/DcsInfo.c b/DcsInfo/DcsInfo.c
index 048640a..70f235e 100644
--- a/DcsInfo/DcsInfo.c
+++ b/DcsInfo/DcsInfo.c
@@ -212,7 +212,22 @@ InfoTcg() {
VOID
InfoBlockDevices() {
- XmlTag(fInfo, "BlockDevices", TRUE, NULL, " count=\"%d\"", gBIOCount, NULL);
+ UINTN i;
+ XmlTag(fInfo, "BlockDevices", FALSE, NULL, " count=\"%d\"", gBIOCount, NULL);
+ FileAsciiPrint(fInfo, "\n");
+ gXmlTabs++;
+ for (i = 0; i < gBIOCount; ++i) {
+ EFI_BLOCK_IO_PROTOCOL *bio;
+ bio = EfiGetBlockIO(gBIOHandles[i]);
+ if (bio != NULL && bio->Media != NULL) {
+ XmlTag(fInfo, "BlockDevice", TRUE, NULL,
+ " index=\"%d\" logical=\"%d\" block_size=\"%d\" revision=\"%llx\" read_only=\"%d\" last_block=\"%lld\"", i,
+ bio->Media->LogicalPartition, bio->Media->BlockSize, bio->Revision,
+ bio->Media->ReadOnly,
+ bio->Media->LastBlock, NULL);
+ }
+ }
+ XmlEndTag(fInfo, "BlockDevices");
}
VOID
diff --git a/DcsInt/DcsInt.c b/DcsInt/DcsInt.c
index 3dad27e..f7c3965 100644
--- a/DcsInt/DcsInt.c
+++ b/DcsInt/DcsInt.c
@@ -494,13 +494,20 @@ SecRegionLoadDefault(EFI_HANDLE partHandle)
// get BlockIo protocol
bio = EfiGetBlockIO(SecRegionHandle);
if (bio == NULL) {
- ERR_PRINT(L"Block io not supported\n,");
+ ERR_PRINT(L"Block I/O not supported\n");
return EFI_NOT_FOUND;
}
+ if (bio->Media != NULL) {
+ if (bio->Media->BlockSize != 512) {
+ ERR_PRINT(L"Block size is %d. (not supported)\n", bio->Media->BlockSize);
+ return EFI_INVALID_PARAMETER;
+ }
+ }
+
SecRegionData = MEM_ALLOC(512);
if (SecRegionData == NULL) {
- ERR_PRINT(L"No memory\n,");
+ ERR_PRINT(L"No memory\n");
return EFI_BUFFER_TOO_SMALL;
}
SecRegionSize = 512;