diff --git a/FatPkg/EnhancedFatDxe/Fat.inf b/FatPkg/EnhancedFatDxe/Fat.inf
index 17b6348a25..92864278c4 100644
--- a/FatPkg/EnhancedFatDxe/Fat.inf
+++ b/FatPkg/EnhancedFatDxe/Fat.inf
@@ -56,6 +56,7 @@
[Packages]
MdePkg/MdePkg.dec
+ FatPkg/FatPkg.dec
[LibraryClasses]
UefiRuntimeServicesTableLib
@@ -82,6 +83,7 @@
gEfiUnicodeCollation2ProtocolGuid ## TO_START
[Pcd]
+ gEfiFatPkgTokenSpaceGuid.PcdFatReadOnlyMode ## CONSUMES
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang ## SOMETIMES_CONSUMES
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang ## SOMETIMES_CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
diff --git a/FatPkg/EnhancedFatDxe/Init.c b/FatPkg/EnhancedFatDxe/Init.c
index 208318c7ad..feae369693 100644
--- a/FatPkg/EnhancedFatDxe/Init.c
+++ b/FatPkg/EnhancedFatDxe/Init.c
@@ -51,7 +51,7 @@ FatAllocateVolume (
Volume->DiskIo2 = DiskIo2;
Volume->BlockIo = BlockIo;
Volume->MediaId = BlockIo->Media->MediaId;
- Volume->ReadOnly = BlockIo->Media->ReadOnly;
+ Volume->ReadOnly = BlockIo->Media->ReadOnly || FeaturePcdGet (PcdFatReadOnlyMode);
Volume->VolumeInterface.Revision = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION;
Volume->VolumeInterface.OpenVolume = FatOpenVolume;
InitializeListHead (&Volume->CheckRef);
diff --git a/FatPkg/FatPkg.dec b/FatPkg/FatPkg.dec
index ecd086b41a..017402984a 100644
--- a/FatPkg/FatPkg.dec
+++ b/FatPkg/FatPkg.dec
@@ -17,3 +17,16 @@
[UserExtensions.TianoCore."ExtraFiles"]
FatPkgExtra.uni
+
+[Guids]
+ #
+ # GUID defined in package
+ #
+ gEfiFatPkgTokenSpaceGuid = { 0xbe1f59ff, 0x65f5, 0x4b28, {0xb2, 0x8d, 0x56, 0x85, 0x36, 0x4a, 0xb1, 0xd2 } }
+
+[PcdsFeatureFlag.common]
+ ## Indicates if driver is in read-only mode.
+ # TRUE - Restricts write operations.
+ # FALSE - Write operations allowed. Default behavior
+ # @Prompt Disables write operations on fat filesystem.
+ gEfiFatPkgTokenSpaceGuid.PcdFatReadOnlyMode |FALSE|BOOLEAN|0x00000001
diff --git a/FatPkg/FatPkg.dsc b/FatPkg/FatPkg.dsc
index 076b577972..e377c25ea1 100644
--- a/FatPkg/FatPkg.dsc
+++ b/FatPkg/FatPkg.dsc
@@ -82,3 +82,6 @@
[Components]
FatPkg/FatPei/FatPei.inf
FatPkg/EnhancedFatDxe/Fat.inf
+
+[PcdsFeatureFlag]
+ gEfiFatPkgTokenSpaceGuid.PcdFatReadOnlyMode|FALSE