summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ArmPkg/Drivers/CpuDxe/CpuDxe.h4
-rw-r--r--ArmPkg/Drivers/CpuDxe/Mmu.c16
-rw-r--r--ArmPkg/Drivers/PL34xDmc/PL341Dmc.c256
-rw-r--r--ArmPkg/Drivers/PL390Gic/PL390GicNonSec.c24
-rw-r--r--ArmPkg/Drivers/PL390Gic/PL390GicSec.c42
-rw-r--r--ArmPkg/Include/Drivers/PL341Dmc.h80
-rw-r--r--ArmPkg/Include/Library/L2X0CacheLib.h2
-rw-r--r--ArmPkg/Include/Protocol/VirtualUncachedPages.h2
-rw-r--r--ArmPkg/Library/ArmLib/Arm9/Arm9Support.S12
-rw-r--r--ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm4
-rw-r--r--ArmPkg/Library/ArmLib/ArmV7/ArmLibSupport.asm22
-rw-r--r--ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.S2
-rw-r--r--ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.asm2
-rw-r--r--ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S12
-rw-r--r--ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm12
-rw-r--r--ArmPkg/Library/ArmLib/Common/ArmLibSupport.S52
-rw-r--r--ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm52
-rw-r--r--ArmPkg/Library/ArmMPCoreMailBoxLib/ArmMPCoreMailBox.c2
-rw-r--r--ArmPkg/Library/ArmTrustZoneLib/ArmTrustZone.c4
-rwxr-xr-xArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S120
-rwxr-xr-xArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.asm126
-rwxr-xr-xArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S68
-rwxr-xr-xArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.asm74
-rwxr-xr-xArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S120
-rwxr-xr-xArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm124
-rwxr-xr-xArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S54
-rwxr-xr-xArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm58
-rw-r--r--ArmPkg/Library/BdsLib/BdsFilePathFs.c4
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashldi3.S38
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S38
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/clzsi2.S82
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S68
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/divdi3.S68
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/divsi3.S34
-rwxr-xr-xArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.S6
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S38
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/memcpy.S30
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/memset.S30
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/moddi3.S60
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/modsi3.S22
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S80
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/mullu.asm4
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch.asm18
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S40
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivdi3.S22
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S412
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivsi3.S74
-rwxr-xr-xArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.S6
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/umoddi3.S26
-rw-r--r--ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.S24
-rw-r--r--ArmPkg/Universal/MmcDxe/Mmc.h12
-rw-r--r--UnixPkg/Include/Common/UnixInclude.h78
-rw-r--r--UnixPkg/Include/Protocol/UnixThunk.h12
-rw-r--r--UnixPkg/Include/Protocol/UnixUgaIo.h22
-rw-r--r--UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c2
-rw-r--r--UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c2
-rw-r--r--UnixPkg/Library/EdkUnixPeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c2
-rw-r--r--UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c2
-rw-r--r--UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c2
-rw-r--r--UnixPkg/Sec/Gasket.c2
-rw-r--r--UnixPkg/Sec/Ia32/Gasket.S42
-rw-r--r--UnixPkg/Sec/SecMain.c22
-rw-r--r--UnixPkg/Sec/UgaX11.c16
-rw-r--r--UnixPkg/Sec/X64/MangleGasket.S490
-rw-r--r--UnixPkg/Sec/X64/SwitchStack.S12
-rw-r--r--UnixPkg/TimerDxe/Timer.c2
-rw-r--r--UnixPkg/UnixBlockIoDxe/DriverDiagnostics.c2
-rw-r--r--UnixPkg/UnixBlockIoDxe/UnixBlockIo.c2
-rw-r--r--UnixPkg/UnixBusDriverDxe/UnixBusDriver.c2
-rw-r--r--UnixPkg/UnixSerialIoDxe/UnixSerialIo.h4
-rw-r--r--UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c34
-rw-r--r--UnixPkg/UnixSnpDxe/UnixSnp.c2012
-rw-r--r--UnixPkg/UnixSnpDxe/UnixSnp.h38
73 files changed, 2692 insertions, 2692 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
index e11d5d6bf4..70f77ca059 100644
--- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h
+++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
@@ -111,8 +111,8 @@ CpuSetMemoryAttributes (
EFI_STATUS
InitializeExceptions (
-\s\sIN EFI_CPU_ARCH_PROTOCOL *Cpu
-\s\s);
+ IN EFI_CPU_ARCH_PROTOCOL *Cpu
+ );
EFI_STATUS
SyncCacheConfig (
diff --git a/ArmPkg/Drivers/CpuDxe/Mmu.c b/ArmPkg/Drivers/CpuDxe/Mmu.c
index 0b86b8bc98..9ba5c83448 100644
--- a/ArmPkg/Drivers/CpuDxe/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Mmu.c
@@ -338,11 +338,11 @@ UpdatePageEntries (
// modify cacheability attributes
EntryMask |= TT_DESCRIPTOR_PAGE_CACHE_POLICY_MASK;
if (FeaturePcdGet(PcdEfiUncachedMemoryToStronglyOrdered)) {
-\s\s\s\s // map to strongly ordered
-\s\s\s\s EntryValue |= TT_DESCRIPTOR_PAGE_CACHE_POLICY_STRONGLY_ORDERED; // TEX[2:0] = 0, C=0, B=0
+ // map to strongly ordered
+ EntryValue |= TT_DESCRIPTOR_PAGE_CACHE_POLICY_STRONGLY_ORDERED; // TEX[2:0] = 0, C=0, B=0
} else {
- \s\s // map to normal non-cachable
- \s\s EntryValue |= TT_DESCRIPTOR_PAGE_CACHE_POLICY_NON_CACHEABLE; // TEX [2:0]= 001 = 0x2, B=0, C=0
+ // map to normal non-cachable
+ EntryValue |= TT_DESCRIPTOR_PAGE_CACHE_POLICY_NON_CACHEABLE; // TEX [2:0]= 001 = 0x2, B=0, C=0
}
break;
@@ -486,11 +486,11 @@ UpdateSectionEntries (
// modify cacheability attributes
EntryMask |= TT_DESCRIPTOR_SECTION_CACHE_POLICY_MASK;
if (FeaturePcdGet(PcdEfiUncachedMemoryToStronglyOrdered)) {
-\s\s\s\s // map to strongly ordered
-\s\s\s\s EntryValue |= TT_DESCRIPTOR_SECTION_CACHE_POLICY_STRONGLY_ORDERED; // TEX[2:0] = 0, C=0, B=0
+ // map to strongly ordered
+ EntryValue |= TT_DESCRIPTOR_SECTION_CACHE_POLICY_STRONGLY_ORDERED; // TEX[2:0] = 0, C=0, B=0
} else {
- \s\s // map to normal non-cachable
- \s\s EntryValue |= TT_DESCRIPTOR_SECTION_CACHE_POLICY_NON_CACHEABLE; // TEX [2:0]= 001 = 0x2, B=0, C=0
+ // map to normal non-cachable
+ EntryValue |= TT_DESCRIPTOR_SECTION_CACHE_POLICY_NON_CACHEABLE; // TEX [2:0]= 001 = 0x2, B=0, C=0
}
break;
diff --git a/ArmPkg/Drivers/PL34xDmc/PL341Dmc.c b/ArmPkg/Drivers/PL34xDmc/PL341Dmc.c
index 6ba82e1270..4a1e1fc87c 100644
--- a/ArmPkg/Drivers/PL34xDmc/PL341Dmc.c
+++ b/ArmPkg/Drivers/PL34xDmc/PL341Dmc.c
@@ -64,7 +64,7 @@
#define DMC_DIRECT_CMD_MEMCMD_NOP (0x3 << 18)
#define DMC_DIRECT_CMD_MEMCMD_DPD (0x1 << 22)
#define DMC_DIRECT_CMD_BANKADDR(n) ((n & 0x3) << 16)
-#define DMC_DIRECT_CMD_CHIP_ADDR(n)\s\s\s\s((n & 0x3) << 20)
+#define DMC_DIRECT_CMD_CHIP_ADDR(n) ((n & 0x3) << 20)
//
@@ -163,25 +163,25 @@ VOID PL341DmcInit(struct pl341_dmc_config *config) {
//
if (config->has_qos) {
-\s\s// CLCD AXIID = 000
-\s\sDmcWriteReg(DMC_ID_0_CFG_REG, DMC_ID_CFG_QOS_ENABLE | DMC_ID_CFG_QOS_MIN);
-
-\s\s// Default disable QoS
-\s\sDmcWriteReg(DMC_ID_1_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_2_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_3_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_4_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_5_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_6_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_7_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_8_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_9_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_10_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_11_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_12_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_13_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_14_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
-\s\sDmcWriteReg(DMC_ID_15_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ // CLCD AXIID = 000
+ DmcWriteReg(DMC_ID_0_CFG_REG, DMC_ID_CFG_QOS_ENABLE | DMC_ID_CFG_QOS_MIN);
+
+ // Default disable QoS
+ DmcWriteReg(DMC_ID_1_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_2_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_3_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_4_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_5_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_6_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_7_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_8_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_9_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_10_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_11_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_12_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_13_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_14_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
+ DmcWriteReg(DMC_ID_15_CFG_REG, DMC_ID_CFG_QOS_DISABLE);
}
//
@@ -231,104 +231,104 @@ VOID PL341DmcInit(struct pl341_dmc_config *config) {
// |======================================
DmcWriteReg(DMC_MEMORY_CFG3_REG, config->memory_cfg3);
-\s\s// |========================================================
-\s\s// |Set Test Chip PHY Registers via PL341 User Config Reg
-\s\s// |Note that user_cfgX registers are Write Only
-\s\s// |
-\s\s// |DLL Freq set = 250MHz - 266MHz
-\s\s// |========================================================
-\s\sDmcWriteReg(DMC_USER_0_CFG_REG, 0x7C924924);
+ // |========================================================
+ // |Set Test Chip PHY Registers via PL341 User Config Reg
+ // |Note that user_cfgX registers are Write Only
+ // |
+ // |DLL Freq set = 250MHz - 266MHz
+ // |========================================================
+ DmcWriteReg(DMC_USER_0_CFG_REG, 0x7C924924);
-\s\s// user_config2
-\s\s// ------------
-\s\s// Set defaults before calibrating the DDR2 buffer impendence
-\s\s// -Disable ODT
-\s\s// -Default drive strengths
-\s\sDmcWriteReg(DMC_USER_2_CFG_REG, 0x40000198);
+ // user_config2
+ // ------------
+ // Set defaults before calibrating the DDR2 buffer impendence
+ // -Disable ODT
+ // -Default drive strengths
+ DmcWriteReg(DMC_USER_2_CFG_REG, 0x40000198);
-\s\s// |=======================================================
-\s\s// |Auto calibrate the DDR2 buffers impendence
-\s\s// |=======================================================
-\s\sval32 = DmcReadReg(DMC_USER_STATUS_REG);
-\s\swhile (!(val32 & 0x100)) {
-\s\s val32 = DmcReadReg(DMC_USER_STATUS_REG);
-\s\s}
-
-\s\s// Set the output driven strength
-\s\sDmcWriteReg(DMC_USER_2_CFG_REG, 0x40800000 |
-\s\s\s\s (TC_UIOLHXC_VALUE << TC_UIOLHNC_SHIFT) |
-\s\s\s\s (TC_UIOLHXC_VALUE << TC_UIOLHPC_SHIFT) |
-\s\s\s\s (0x1 << TC_UIOHOCT_SHIFT) |
-\s\s\s\s (0x1 << TC_UIOHSTOP_SHIFT));
-
-\s\s// |======================================
-\s\s// | Set PL341 Feature Control Register
-\s\s// |======================================
-\s\s// | Disable early BRESP - use to optimise CLCD performance
-\s\sDmcWriteReg(DMC_FEATURE_CRTL_REG, 0x00000001);
+ // |=======================================================
+ // |Auto calibrate the DDR2 buffers impendence
+ // |=======================================================
+ val32 = DmcReadReg(DMC_USER_STATUS_REG);
+ while (!(val32 & 0x100)) {
+ val32 = DmcReadReg(DMC_USER_STATUS_REG);
+ }
+
+ // Set the output driven strength
+ DmcWriteReg(DMC_USER_2_CFG_REG, 0x40800000 |
+ (TC_UIOLHXC_VALUE << TC_UIOLHNC_SHIFT) |
+ (TC_UIOLHXC_VALUE << TC_UIOLHPC_SHIFT) |
+ (0x1 << TC_UIOHOCT_SHIFT) |
+ (0x1 << TC_UIOHSTOP_SHIFT));
+
+ // |======================================
+ // | Set PL341 Feature Control Register
+ // |======================================
+ // | Disable early BRESP - use to optimise CLCD performance
+ DmcWriteReg(DMC_FEATURE_CRTL_REG, 0x00000001);
//=================
// Config memories
//=================
for (chip = 0; chip <= config-> max_chip; chip++) {
-\s\s// send nop
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_NOP);
-\s\s// pre-charge all
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_PRECHARGEALL);
-
-\s\s// delay
-\s\sfor (i = 0; i < 10; i++) {
-\s\s val32 = DmcReadReg(DMC_STATUS_REG);
-\s\s}
-
-\s\s// set (EMR2) extended mode register 2
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG,
-\s\s\s\s DMC_DIRECT_CMD_CHIP_ADDR(chip) |
-\s\s\s\s DMC_DIRECT_CMD_BANKADDR(2) |
-\s\s\s\s DMC_DIRECT_CMD_MEMCMD_EXTMODEREG);
-\s\s// set (EMR3) extended mode register 3
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG,
-\s\s\s\s DMC_DIRECT_CMD_CHIP_ADDR(chip) |
-\s\s\s\s DMC_DIRECT_CMD_BANKADDR(3) |
-\s\s\s\s DMC_DIRECT_CMD_MEMCMD_EXTMODEREG);
-
-\s\s// =================================
-\s\s// set (EMR) Extended Mode Register
-\s\s// ==================================
-\s\s// Put into OCD default state
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG,
-\s\s\s\s DMC_DIRECT_CMD_CHIP_ADDR(chip) |
-\s\s\s\s DMC_DIRECT_CMD_BANKADDR(1) |
-\s\s\s\s DMC_DIRECT_CMD_MEMCMD_EXTMODEREG);
-
-\s\s// ===========================================================
-\s\s// set (MR) mode register - With DLL reset
-\s\s// ===========================================================
-\s\s// Burst Length = 4 (010)
-\s\s// Burst Type = Seq (0)
-\s\s// Latency = 4 (100)
-\s\s// Test mode = Off (0)
-\s\s// DLL reset = Yes (1)
-\s\s// Wr Recovery = 4 (011)
-\s\s// PD = Normal (0)
+ // send nop
+ DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_NOP);
+ // pre-charge all
+ DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_PRECHARGEALL);
+
+ // delay
+ for (i = 0; i < 10; i++) {
+ val32 = DmcReadReg(DMC_STATUS_REG);
+ }
+
+ // set (EMR2) extended mode register 2
+ DmcWriteReg(DMC_DIRECT_CMD_REG,
+ DMC_DIRECT_CMD_CHIP_ADDR(chip) |
+ DMC_DIRECT_CMD_BANKADDR(2) |
+ DMC_DIRECT_CMD_MEMCMD_EXTMODEREG);
+ // set (EMR3) extended mode register 3
+ DmcWriteReg(DMC_DIRECT_CMD_REG,
+ DMC_DIRECT_CMD_CHIP_ADDR(chip) |
+ DMC_DIRECT_CMD_BANKADDR(3) |
+ DMC_DIRECT_CMD_MEMCMD_EXTMODEREG);
+
+ // =================================
+ // set (EMR) Extended Mode Register
+ // ==================================
+ // Put into OCD default state
+ DmcWriteReg(DMC_DIRECT_CMD_REG,
+ DMC_DIRECT_CMD_CHIP_ADDR(chip) |
+ DMC_DIRECT_CMD_BANKADDR(1) |
+ DMC_DIRECT_CMD_MEMCMD_EXTMODEREG);
+
+ // ===========================================================
+ // set (MR) mode register - With DLL reset
+ // ===========================================================
+ // Burst Length = 4 (010)
+ // Burst Type = Seq (0)
+ // Latency = 4 (100)
+ // Test mode = Off (0)
+ // DLL reset = Yes (1)
+ // Wr Recovery = 4 (011)
+ // PD = Normal (0)
DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | 0x00080742);
-\s\s// pre-charge all
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_PRECHARGEALL);
-\s\s// auto-refresh
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_AUTOREFRESH);
-\s\s// auto-refresh
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_AUTOREFRESH);
-
-\s\s// delay
-\s\sfor (i = 0; i < 10; i++) {
-\s\s val32 = DmcReadReg(DMC_STATUS_REG);
-\s\s}
-
-\s\s// ===========================================================
-\s\s// set (MR) mode register - Without DLL reset
-\s\s// ===========================================================
+ // pre-charge all
+ DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_PRECHARGEALL);
+ // auto-refresh
+ DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_AUTOREFRESH);
+ // auto-refresh
+ DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_AUTOREFRESH);
+
+ // delay
+ for (i = 0; i < 10; i++) {
+ val32 = DmcReadReg(DMC_STATUS_REG);
+ }
+
+ // ===========================================================
+ // set (MR) mode register - Without DLL reset
+ // ===========================================================
// auto-refresh
DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | DMC_DIRECT_CMD_MEMCMD_AUTOREFRESH);
DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | 0x00080642);
@@ -338,26 +338,26 @@ VOID PL341DmcInit(struct pl341_dmc_config *config) {
val32 = DmcReadReg(DMC_STATUS_REG);
}
-\s\s// ======================================================
-\s\s// set (EMR) extended mode register - Enable OCD defaults
-\s\s// ======================================================
-\s\sval32 = 0; //NOP
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | 0x00090000 |
-\s\s\s\s (DDR_EMR_OCD_DEFAULT << DDR_EMR_OCD_SHIFT) |
-\s\s\s\s DDR_EMR_RTT_75R |
-\s\s\s\s (DDR_EMR_ODS_VAL << DDR_EMR_ODS_MASK));
-
-\s\s// delay
-\s\sfor (i = 0; i < 10; i++) {
-\s\s val32 = DmcReadReg(DMC_STATUS_REG);
-\s\s}
-
-\s\s// Set (EMR) extended mode register - OCD Exit
-\s\sval32 = 0; //NOP
-\s\sDmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | 0x00090000 |
-\s\s\s\s (DDR_EMR_OCD_NS << DDR_EMR_OCD_SHIFT) |
-\s\s\s\s DDR_EMR_RTT_75R |
-\s\s\s\s (DDR_EMR_ODS_VAL << DDR_EMR_ODS_MASK));
+ // ======================================================
+ // set (EMR) extended mode register - Enable OCD defaults
+ // ======================================================
+ val32 = 0; //NOP
+ DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | 0x00090000 |
+ (DDR_EMR_OCD_DEFAULT << DDR_EMR_OCD_SHIFT) |
+ DDR_EMR_RTT_75R |
+ (DDR_EMR_ODS_VAL << DDR_EMR_ODS_MASK));
+
+ // delay
+ for (i = 0; i < 10; i++) {
+ val32 = DmcReadReg(DMC_STATUS_REG);
+ }
+
+ // Set (EMR) extended mode register - OCD Exit
+ val32 = 0; //NOP
+ DmcWriteReg(DMC_DIRECT_CMD_REG, DMC_DIRECT_CMD_CHIP_ADDR(chip) | 0x00090000 |
+ (DDR_EMR_OCD_NS << DDR_EMR_OCD_SHIFT) |
+ DDR_EMR_RTT_75R |
+ (DDR_EMR_ODS_VAL << DDR_EMR_ODS_MASK));
}
diff --git a/ArmPkg/Drivers/PL390Gic/PL390GicNonSec.c b/ArmPkg/Drivers/PL390Gic/PL390GicNonSec.c
index 9a9006f0a3..526af02d3e 100644
--- a/ArmPkg/Drivers/PL390Gic/PL390GicNonSec.c
+++ b/ArmPkg/Drivers/PL390Gic/PL390GicNonSec.c
@@ -21,11 +21,11 @@ EFIAPI
PL390GicEnableInterruptInterface (
IN INTN GicInterruptInterfaceBase
)
-{\s\s
-\s\s/*
-\s\s * Enable the CPU interface in Non-Secure world
-\s\s * Note: The ICCICR register is banked when Security extensions are implemented\s\s
-\s\s */
+{
+ /*
+ * Enable the CPU interface in Non-Secure world
+ * Note: The ICCICR register is banked when Security extensions are implemented
+ */
MmioWrite32(GicInterruptInterfaceBase + GIC_ICCICR,0x00000001);
}
@@ -50,7 +50,7 @@ PL390GicSendSgiTo (
IN INTN CPUTargetList
)
{
-\s\sMmioWrite32(GicDistributorBase + GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16));
+ MmioWrite32(GicDistributorBase + GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16));
}
UINT32
@@ -65,9 +65,9 @@ PL390GicAcknowledgeSgiFrom (
InterruptId = MmioRead32(GicInterruptInterfaceBase + GIC_ICCIAR);
//Check if the Interrupt ID is valid, The read from Interrupt Ack register returns CPU ID and Interrupt ID
-\s\sif (((CoreId & 0x7) << 10) == (InterruptId & 0x1C00)) {
-\s\s //Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
-\s\s\s\sMmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
+ if (((CoreId & 0x7) << 10) == (InterruptId & 0x1C00)) {
+ //Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
+ MmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
return 1;
} else {
return 0;
@@ -87,9 +87,9 @@ PL390GicAcknowledgeSgi2From (
InterruptId = MmioRead32(GicInterruptInterfaceBase + GIC_ICCIAR);
//Check if the Interrupt ID is valid, The read from Interrupt Ack register returns CPU ID and Interrupt ID
-\s\sif((((CoreId & 0x7) << 10) | (SgiId & 0x3FF)) == (InterruptId & 0x1FFF)) {
-\s\s //Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
-\s\s\s\sMmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
+ if((((CoreId & 0x7) << 10) | (SgiId & 0x3FF)) == (InterruptId & 0x1FFF)) {
+ //Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
+ MmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
return 1;
} else {
return 0;
diff --git a/ArmPkg/Drivers/PL390Gic/PL390GicSec.c b/ArmPkg/Drivers/PL390Gic/PL390GicSec.c
index 7bb0f3dd6f..156e0601e8 100644
--- a/ArmPkg/Drivers/PL390Gic/PL390GicSec.c
+++ b/ArmPkg/Drivers/PL390Gic/PL390GicSec.c
@@ -34,11 +34,11 @@ PL390GicSetupNonSecure (
//Check if there are any pending interrupts
while(0 != (MmioRead32(GicDistributorBase + GIC_ICDICPR) & 0xF))
{
-\s\s //Some of the SGI's are still pending, read Ack register and send End of Interrupt Signal
-\s\s UINTN InterruptId = MmioRead32(GicInterruptInterfaceBase + GIC_ICCIAR);
+ //Some of the SGI's are still pending, read Ack register and send End of Interrupt Signal
+ UINTN InterruptId = MmioRead32(GicInterruptInterfaceBase + GIC_ICCIAR);
-\s\s //Write to End of interrupt signal
-\s\s MmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
+ //Write to End of interrupt signal
+ MmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
}
// Ensure all GIC interrupts are Non-Secure
@@ -56,19 +56,19 @@ PL390GicEnableInterruptInterface (
IN INTN GicInterruptInterfaceBase
)
{
-\s\sMmioWrite32(GicInterruptInterfaceBase + GIC_ICCPMR, 0x000000FF); /* Set Priority Mask to allow interrupts */
+ MmioWrite32(GicInterruptInterfaceBase + GIC_ICCPMR, 0x000000FF); /* Set Priority Mask to allow interrupts */
-\s\s/*
-\s\s * Enable CPU interface in Secure world
+ /*
+ * Enable CPU interface in Secure world
* Enable CPU inteface in Non-secure World
-\s\s * Signal Secure Interrupts to CPU using FIQ line *
-\s\s */
+ * Signal Secure Interrupts to CPU using FIQ line *
+ */
MmioWrite32(GicInterruptInterfaceBase + GIC_ICCICR,
- \s\s\s\sGIC_ICCICR_ENABLE_SECURE(1) |
- \s\s\s\sGIC_ICCICR_ENABLE_NS(1) |
- \s\s\s\sGIC_ICCICR_ACK_CTL(0) |
- \s\s\s\sGIC_ICCICR_SIGNAL_SECURE_TO_FIQ(1) |
- \s\s\s\sGIC_ICCICR_USE_SBPR(0));
+ GIC_ICCICR_ENABLE_SECURE(1) |
+ GIC_ICCICR_ENABLE_NS(1) |
+ GIC_ICCICR_ACK_CTL(0) |
+ GIC_ICCICR_SIGNAL_SECURE_TO_FIQ(1) |
+ GIC_ICCICR_USE_SBPR(0));
}
VOID
@@ -88,7 +88,7 @@ PL390GicSendSgiTo (
IN INTN CPUTargetList
)
{
-\s\sMmioWrite32(GicDistributorBase + GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16));
+ MmioWrite32(GicDistributorBase + GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16));
}
UINT32
@@ -103,9 +103,9 @@ PL390GicAcknowledgeSgiFrom (
InterruptId = MmioRead32(GicInterruptInterfaceBase + GIC_ICCIAR);
//Check if the Interrupt ID is valid, The read from Interrupt Ack register returns CPU ID and Interrupt ID
-\s\sif (((CoreId & 0x7) << 10) == (InterruptId & 0x1C00)) {
-\s\s //Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
-\s\s\s\sMmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
+ if (((CoreId & 0x7) << 10) == (InterruptId & 0x1C00)) {
+ //Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
+ MmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
return 1;
} else {
return 0;
@@ -125,9 +125,9 @@ PL390GicAcknowledgeSgi2From (
InterruptId = MmioRead32(GicInterruptInterfaceBase + GIC_ICCIAR);
//Check if the Interrupt ID is valid, The read from Interrupt Ack register returns CPU ID and Interrupt ID
-\s\sif((((CoreId & 0x7) << 10) | (SgiId & 0x3FF)) == (InterruptId & 0x1FFF)) {
-\s\s //Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
-\s\s\s\sMmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
+ if((((CoreId & 0x7) << 10) | (SgiId & 0x3FF)) == (InterruptId & 0x1FFF)) {
+ //Got SGI number 0 hence signal End of Interrupt by writing to ICCEOIR
+ MmioWrite32(GicInterruptInterfaceBase + GIC_ICCEIOR, InterruptId);
return 1;
} else {
return 0;
diff --git a/ArmPkg/Include/Drivers/PL341Dmc.h b/ArmPkg/Include/Drivers/PL341Dmc.h
index 38ac70d17d..6ccc8482b5 100644
--- a/ArmPkg/Include/Drivers/PL341Dmc.h
+++ b/ArmPkg/Include/Drivers/PL341Dmc.h
@@ -17,32 +17,32 @@
struct pl341_dmc_config {
- UINTN\s\sbase; // base address for the controller
- UINTN\s\shas_qos; // has QoS registers
- UINTN\s\smax_chip; // number of memory chips accessible
- UINT32\s\srefresh_prd;
- UINT32\s\scas_latency;
- UINT32\s\swrite_latency;
- UINT32\s\st_mrd;
- UINT32\s\st_ras;
- UINT32\s\st_rc;
- UINT32\s\st_rcd;
- UINT32\s\st_rfc;
- UINT32\s\st_rp;
- UINT32\s\st_rrd;
- UINT32\s\st_wr;
- UINT32\s\st_wtr;
- UINT32\s\st_xp;
- UINT32\s\st_xsr;
- UINT32\s\st_esr;
- UINT32\s\smemory_cfg;
- UINT32\s\smemory_cfg2;
- UINT32\s\smemory_cfg3;
- UINT32\s\schip_cfg0;
- UINT32\s\schip_cfg1;
- UINT32\s\schip_cfg2;
- UINT32\s\schip_cfg3;
- UINT32\s\st_faw;
+ UINTN base; // base address for the controller
+ UINTN has_qos; // has QoS registers
+ UINTN max_chip; // number of memory chips accessible
+ UINT32 refresh_prd;
+ UINT32 cas_latency;
+ UINT32 write_latency;
+ UINT32 t_mrd;
+ UINT32 t_ras;
+ UINT32 t_rc;
+ UINT32 t_rcd;
+ UINT32 t_rfc;
+ UINT32 t_rp;
+ UINT32 t_rrd;
+ UINT32 t_wr;
+ UINT32 t_wtr;
+ UINT32 t_xp;
+ UINT32 t_xsr;
+ UINT32 t_esr;
+ UINT32 memory_cfg;
+ UINT32 memory_cfg2;
+ UINT32 memory_cfg3;
+ UINT32 chip_cfg0;
+ UINT32 chip_cfg1;
+ UINT32 chip_cfg2;
+ UINT32 chip_cfg3;
+ UINT32 t_faw;
};
/* Memory config bit fields */
@@ -60,21 +60,21 @@ struct pl341_dmc_config {
#define DMC_MEMORY_CONFIG_BURST_4 (0x2 << 15)
#define DMC_MEMORY_CONFIG_BURST_8 (0x3 << 15)
#define DMC_MEMORY_CONFIG_BURST_16 (0x4 << 15)
-#define DMC_MEMORY_CONFIG_ACTIVE_CHIP_1\s\s\s\s(0x0 << 21)
-#define DMC_MEMORY_CONFIG_ACTIVE_CHIP_2\s\s\s\s(0x1 << 21)
-#define DMC_MEMORY_CONFIG_ACTIVE_CHIP_3\s\s\s\s(0x2 << 21)
-#define DMC_MEMORY_CONFIG_ACTIVE_CHIP_4\s\s\s\s(0x3 << 21)
+#define DMC_MEMORY_CONFIG_ACTIVE_CHIP_1 (0x0 << 21)
+#define DMC_MEMORY_CONFIG_ACTIVE_CHIP_2 (0x1 << 21)
+#define DMC_MEMORY_CONFIG_ACTIVE_CHIP_3 (0x2 << 21)
+#define DMC_MEMORY_CONFIG_ACTIVE_CHIP_4 (0x3 << 21)
-#define DMC_MEMORY_CFG2_CLK_ASYNC\s\s\s\s(0x0 << 0)
-#define DMC_MEMORY_CFG2_CLK_SYNC\s\s\s\s(0x1 << 0)
-#define DMC_MEMORY_CFG2_DQM_INIT\s\s\s\s(0x1 << 2)
-#define DMC_MEMORY_CFG2_CKE_INIT\s\s\s\s(0x1 << 3)
-#define DMC_MEMORY_CFG2_BANK_BITS_2\s\s\s\s(0x0 << 4)
-#define DMC_MEMORY_CFG2_BANK_BITS_3\s\s\s\s(0x3 << 4)
-#define DMC_MEMORY_CFG2_MEM_WIDTH_16\s\s\s\s(0x0 << 6)
-#define DMC_MEMORY_CFG2_MEM_WIDTH_32\s\s\s\s(0x1 << 6)
-#define DMC_MEMORY_CFG2_MEM_WIDTH_64\s\s\s\s(0x2 << 6)
-#define DMC_MEMORY_CFG2_MEM_WIDTH_RESERVED\s\s(0x3 << 6)
+#define DMC_MEMORY_CFG2_CLK_ASYNC (0x0 << 0)
+#define DMC_MEMORY_CFG2_CLK_SYNC (0x1 << 0)
+#define DMC_MEMORY_CFG2_DQM_INIT (0x1 << 2)
+#define DMC_MEMORY_CFG2_CKE_INIT (0x1 << 3)
+#define DMC_MEMORY_CFG2_BANK_BITS_2 (0x0 << 4)
+#define DMC_MEMORY_CFG2_BANK_BITS_3 (0x3 << 4)
+#define DMC_MEMORY_CFG2_MEM_WIDTH_16 (0x0 << 6)
+#define DMC_MEMORY_CFG2_MEM_WIDTH_32 (0x1 << 6)
+#define DMC_MEMORY_CFG2_MEM_WIDTH_64 (0x2 << 6)
+#define DMC_MEMORY_CFG2_MEM_WIDTH_RESERVED (0x3 << 6)
diff --git a/ArmPkg/Include/Library/L2X0CacheLib.h b/ArmPkg/Include/Library/L2X0CacheLib.h
index e2c4ea29d1..69754e4fbb 100644
--- a/ArmPkg/Include/Library/L2X0CacheLib.h
+++ b/ArmPkg/Include/Library/L2X0CacheLib.h
@@ -29,7 +29,7 @@
#define L230_TAG_LATENCY 0x108
#define L230_DATA_LATENCY 0x10C
#define L2X0_INTCLEAR 0x220
-#define L2X0_CACHE_SYNC\s\s\s\s\s\s0x730
+#define L2X0_CACHE_SYNC 0x730
#define L2X0_INVWAY 0x77C
#define L2X0_CLEAN_WAY 0x7BC
#define L2X0_PFCTRL 0xF60
diff --git a/ArmPkg/Include/Protocol/VirtualUncachedPages.h b/ArmPkg/Include/Protocol/VirtualUncachedPages.h
index 866263faf1..cf987b0438 100644
--- a/ArmPkg/Include/Protocol/VirtualUncachedPages.h
+++ b/ArmPkg/Include/Protocol/VirtualUncachedPages.h
@@ -57,4 +57,4 @@ struct _VIRTUAL_UNCACHED_PAGES_PROTOCOL {
extern EFI_GUID gVirtualUncachedPagesProtocolGuid;
-#endif\s\s
+#endif
diff --git a/ArmPkg/Library/ArmLib/Arm9/Arm9Support.S b/ArmPkg/Library/ArmLib/Arm9/Arm9Support.S
index badec4a72f..49e266dd38 100644
--- a/ArmPkg/Library/ArmLib/Arm9/Arm9Support.S
+++ b/ArmPkg/Library/ArmLib/Arm9/Arm9Support.S
@@ -58,18 +58,18 @@ ASM_PFX(ArmEnableInstructionCache):
orr r0,r0,r1 @Set I bit
mcr p15,0,r0,c1,c0,0 @Write control register configuration data
bx LR
-\s\s
+
ASM_PFX(ArmDisableInstructionCache):
ldr r1,=IC_ON
mrc p15,0,r0,c1,c0,0 @Read control register configuration data
bic r0,r0,r1 @Clear I bit.
mcr p15,0,r0,c1,c0,0 @Write control register configuration data
bx LR
-\s\s
+
ASM_PFX(ArmInvalidateInstructionCache):
mov r0,#0
mcr p15,0,r0,c7,c5,0 @Invalidate entire Instruction cache.
-\s\s @Also flushes the branch target cache.
+ @Also flushes the branch target cache.
mov r0,#0
mcr p15,0,r0,c7,c10,4 @Data write buffer
bx LR
@@ -99,7 +99,7 @@ ASM_PFX(ArmEnableDataCache):
orr R0,R0,R1 @Set C bit
mcr p15,0,r0,c1,c0,0 @Write control register configuration data
bx LR
-\s\s
+
ASM_PFX(ArmDisableDataCache):
ldr R1,=DC_ON
mrc p15,0,R0,c1,c0,0 @Read control register configuration data
@@ -111,7 +111,7 @@ ASM_PFX(ArmCleanDataCache):
mrc p15,0,r15,c7,c10,3
bne ASM_PFX(ArmCleanDataCache)
mov R0,#0
- mcr p15,0,R0,c7,c10,4\s\s@Drain write buffer
+ mcr p15,0,R0,c7,c10,4 @Drain write buffer
bx LR
ASM_PFX(ArmInvalidateDataCache):
@@ -125,7 +125,7 @@ ASM_PFX(ArmCleanInvalidateDataCache):
mrc p15,0,r15,c7,c14,3
bne ASM_PFX(ArmCleanInvalidateDataCache)
mov R0,#0
- mcr p15,0,R0,c7,c10,4\s\s @Drain write buffer
+ mcr p15,0,R0,c7,c10,4 @Drain write buffer
bx LR
ASM_PFX(ArmEnableBranchPrediction):
diff --git a/ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm b/ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm
index 2a147eff3a..dfee136b2b 100644
--- a/ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm
+++ b/ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm
@@ -112,7 +112,7 @@ ArmCleanDataCache
MRC p15,0,r15,c7,c10,3
BNE ArmCleanDataCache
MOV R0,#0
- MCR p15,0,R0,c7,c10,4\s\s ;Drain write buffer
+ MCR p15,0,R0,c7,c10,4 ;Drain write buffer
BX LR
ArmInvalidateDataCache
@@ -126,7 +126,7 @@ ArmCleanInvalidateDataCache
MRC p15,0,r15,c7,c14,3
BNE ArmCleanInvalidateDataCache
MOV R0,#0
- MCR p15,0,R0,c7,c10,4\s\s ;Drain write buffer
+ MCR p15,0,R0,c7,c10,4 ;Drain write buffer
BX LR
ArmEnableBranchPrediction
diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupport.asm b/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupport.asm
index 831532f4d2..19f489f3c0 100644
--- a/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupport.asm
+++ b/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupport.asm
@@ -70,17 +70,17 @@ ArmDisableAsynchronousAbort
ArmEnableIrq
cpsie i
isb
-\s\sbx LR
+ bx LR
ArmDisableIrq
cpsid i
isb
-\s\sbx LR
+ bx LR
ArmEnableFiq
cpsie f
isb
-\s\sbx LR
+ bx LR
ArmDisableFiq
cpsid f
@@ -99,17 +99,17 @@ ArmDisableInterrupts
ArmGetInterruptState
mrs R0,CPSR
- tst R0,#0x80\s\s ;Check if IRQ is enabled.
+ tst R0,#0x80 ;Check if IRQ is enabled.
moveq R0,#1
movne R0,#0
-\s\sbx LR
+ bx LR
ArmGetFiqState
-\s\smrs R0,CPSR
-\s\stst R0,#0x40\s\s ;Check if FIQ is enabled.
-\s\smoveq R0,#1
-\s\smovne R0,#0
-\s\sbx LR
+ mrs R0,CPSR
+ tst R0,#0x40 ;Check if FIQ is enabled.
+ moveq R0,#1
+ movne R0,#0
+ bx LR
ArmInvalidateTlb
mov r0,#0
@@ -126,7 +126,7 @@ ArmSetTTBR0
ArmGetTTBR0BaseAddress
mrc p15,0,r0,c2,c0,0
- ldr\s\s r1, = 0xFFFFC000
+ ldr r1, = 0xFFFFC000
and r0, r0, r1
isb
bx lr
diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.S b/ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.S
index 9d7b31efdc..da35a09b1d 100644
--- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.S
+++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.S
@@ -31,7 +31,7 @@ ASM_PFX(ArmGetScuBaseAddress):
# the Configuration BAR as a stack is not necessary setup. The SCU is at the
# offset 0x0000 from the Private Memory Region.
mrc p15, 4, r0, c15, c0, 0
- bx\s\slr
+ bx lr
# IN None
# OUT r1 = SCU enabled (boolean)
diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.asm b/ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.asm
index e87d231356..6cc17c4c6a 100644
--- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.asm
+++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreHelper.asm
@@ -31,7 +31,7 @@ ArmGetScuBaseAddress
// the Configuration BAR as a stack is not necessary setup. The SCU is at the
// offset 0x0000 from the Private Memory Region.
mrc p15, 4, r0, c15, c0, 0
- bx\s\slr
+ bx lr
// IN None
// OUT r1 = SCU enabled (boolean)
diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S
index 00704164f9..7dbbaf7d0f 100644
--- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S
+++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S
@@ -80,21 +80,21 @@ ASM_PFX(ArmCleanInvalidateDataCacheEntryByMVA):
ASM_PFX(ArmInvalidateDataCacheEntryBySetWay):
- mcr p15, 0, r0, c7, c6, 2 @ Invalidate this line\s\s\s\s
+ mcr p15, 0, r0, c7, c6, 2 @ Invalidate this line
dsb
isb
bx lr
ASM_PFX(ArmCleanInvalidateDataCacheEntryBySetWay):
- mcr p15, 0, r0, c7, c14, 2 @ Clean and Invalidate this line\s\s\s\s
+ mcr p15, 0, r0, c7, c14, 2 @ Clean and Invalidate this line
dsb
isb
bx lr
ASM_PFX(ArmCleanDataCacheEntryBySetWay):
- mcr p15, 0, r0, c7, c10, 2 @ Clean this line\s\s\s\s
+ mcr p15, 0, r0, c7, c10, 2 @ Clean this line
dsb
isb
bx lr
@@ -119,7 +119,7 @@ ASM_PFX(ArmDisableMmu):
bic R0,R0,#1
mcr p15,0,R0,c1,c0,0 @Disable MMU
-\s\smcr \s\s\s\sp15,0,R0,c8,c7,0 @Invalidate TLB
+ mcr p15,0,R0,c8,c7,0 @Invalidate TLB
mcr p15,0,R0,c7,c5,6 @Invalidate Branch predictor array
dsb
isb
@@ -309,7 +309,7 @@ ASM_PFX(ArmCallWFI):
//Note: Return 0 in Uniprocessor implementation
ASM_PFX(ArmReadCbar):
- mrc p15, 4, r0, c15, c0, 0\s\s//Read Configuration Base Address Register
+ mrc p15, 4, r0, c15, c0, 0 //Read Configuration Base Address Register
bx lr
ASM_PFX(ArmInvalidateInstructionAndDataTlb):
@@ -318,7 +318,7 @@ ASM_PFX(ArmInvalidateInstructionAndDataTlb):
bx lr
ASM_PFX(ArmReadMpidr):
- mrc p15, 0, r0, c0, c0, 5\s\s @ read MPIDR
+ mrc p15, 0, r0, c0, c0, 5 @ read MPIDR
bx lr
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm
index 4cd78d8a23..4c78c54674 100644
--- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm
+++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm
@@ -82,21 +82,21 @@ ArmCleanInvalidateDataCacheEntryByMVA
ArmInvalidateDataCacheEntryBySetWay
- mcr p15, 0, r0, c7, c6, 2 ; Invalidate this line\s\s\s\s
+ mcr p15, 0, r0, c7, c6, 2 ; Invalidate this line
dsb
isb
bx lr
ArmCleanInvalidateDataCacheEntryBySetWay
- mcr p15, 0, r0, c7, c14, 2 ; Clean and Invalidate this line\s\s\s\s
+ mcr p15, 0, r0, c7, c14, 2 ; Clean and Invalidate this line
dsb
isb
bx lr
ArmCleanDataCacheEntryBySetWay
- mcr p15, 0, r0, c7, c10, 2 ; Clean this line\s\s\s\s
+ mcr p15, 0, r0, c7, c10, 2 ; Clean this line
dsb
isb
bx lr
@@ -125,7 +125,7 @@ ArmDisableMmu
bic R0,R0,#1 ; Clear SCTLR.M bit : Disable MMU
mcr p15,0,R0,c1,c0,0 ; Write R0 into SCTLR (Write control register configuration data)
- mcr \s\s p15,0,R0,c8,c7,0 ; TLBIALL : Invalidate unified TLB
+ mcr p15,0,R0,c8,c7,0 ; TLBIALL : Invalidate unified TLB
mcr p15,0,R0,c7,c5,6 ; BPIALL : Invalidate entire branch predictor array
dsb
isb
@@ -307,7 +307,7 @@ ArmCallWFI
//Note: Return 0 in Uniprocessor implementation
ArmReadCbar
- mrc p15, 4, r0, c15, c0, 0\s\s//Read Configuration Base Address Register
+ mrc p15, 4, r0, c15, c0, 0 //Read Configuration Base Address Register
bx lr
ArmInvalidateInstructionAndDataTlb
@@ -316,7 +316,7 @@ ArmInvalidateInstructionAndDataTlb
bx lr
ArmReadMpidr
- mrc p15, 0, r0, c0, c0, 5\s\s\s\s; read MPIDR
+ mrc p15, 0, r0, c0, c0, 5 ; read MPIDR
bx lr
END
diff --git a/ArmPkg/Library/ArmLib/Common/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/ArmLibSupport.S
index 94b11a5d77..29ccf6dceb 100644
--- a/ArmPkg/Library/ArmLib/Common/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/Common/ArmLibSupport.S
@@ -42,48 +42,48 @@ ASM_PFX(Cp15CacheInfo):
bx LR
ASM_PFX(ArmEnableInterrupts):
-\s\smrs R0,CPSR
-\s\sbic R0,R0,#0x80\s\s\s\s@Enable IRQ interrupts
-\s\smsr CPSR_c,R0
-\s\sbx LR
+ mrs R0,CPSR
+ bic R0,R0,#0x80 @Enable IRQ interrupts
+ msr CPSR_c,R0
+ bx LR
ASM_PFX(ArmDisableInterrupts):
-\s\smrs R0,CPSR
-\s\sorr R1,R0,#0x80\s\s\s\s@Disable IRQ interrupts
-\s\smsr CPSR_c,R1
+ mrs R0,CPSR
+ orr R1,R0,#0x80 @Disable IRQ interrupts
+ msr CPSR_c,R1
tst R0,#0x80
moveq R0,#1
movne R0,#0
-\s\sbx LR
+ bx LR
ASM_PFX(ArmGetInterruptState):
-\s\smrs R0,CPSR
-\s\stst R0,#0x80\s\s @Check if IRQ is enabled.
-\s\smoveq R0,#1
-\s\smovne R0,#0
-\s\sbx LR
+ mrs R0,CPSR
+ tst R0,#0x80 @Check if IRQ is enabled.
+ moveq R0,#1
+ movne R0,#0
+ bx LR
ASM_PFX(ArmEnableFiq):
-\s\smrs R0,CPSR
-\s\sbic R0,R0,#0x40\s\s\s\s@Enable FIQ interrupts
-\s\smsr CPSR_c,R0
-\s\sbx LR
+ mrs R0,CPSR
+ bic R0,R0,#0x40 @Enable FIQ interrupts
+ msr CPSR_c,R0
+ bx LR
ASM_PFX(ArmDisableFiq):
-\s\smrs R0,CPSR
-\s\sorr R1,R0,#0x40\s\s\s\s@Disable FIQ interrupts
-\s\smsr CPSR_c,R1
+ mrs R0,CPSR
+ orr R1,R0,#0x40 @Disable FIQ interrupts
+ msr CPSR_c,R1
tst R0,#0x80
moveq R0,#1
movne R0,#0
-\s\sbx LR
+ bx LR
ASM_PFX(ArmGetFiqState):
-\s\smrs R0,CPSR
-\s\stst R0,#0x80\s\s @Check if FIQ is enabled.
-\s\smoveq R0,#1
-\s\smovne R0,#0
-\s\sbx LR
+ mrs R0,CPSR
+ tst R0,#0x80 @Check if FIQ is enabled.
+ moveq R0,#1
+ movne R0,#0
+ bx LR
ASM_PFX(ArmInvalidateTlb):
mov r0,#0
diff --git a/ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm b/ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm
index 0b023fed42..4d6c253cd2 100644
--- a/ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm
+++ b/ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm
@@ -48,48 +48,48 @@ ArmIsMPCore
bx LR
ArmEnableInterrupts
-\s\smrs R0,CPSR
-\s\sbic R0,R0,#0x80\s\s\s\s;Enable IRQ interrupts
-\s\smsr CPSR_c,R0
-\s\sbx LR
+ mrs R0,CPSR
+ bic R0,R0,#0x80 ;Enable IRQ interrupts
+ msr CPSR_c,R0
+ bx LR
ArmDisableInterrupts
-\s\smrs R0,CPSR
-\s\sorr R1,R0,#0x80\s\s\s\s;Disable IRQ interrupts
-\s\smsr CPSR_c,R1
+ mrs R0,CPSR
+ orr R1,R0,#0x80 ;Disable IRQ interrupts
+ msr CPSR_c,R1
tst R0,#0x80
moveq R0,#1
movne R0,#0
-\s\sbx LR
+ bx LR
ArmGetInterruptState
-\s\smrs R0,CPSR
-\s\stst R0,#0x80\s\s ;Check if IRQ is enabled.
-\s\smoveq R0,#1
-\s\smovne R0,#0
-\s\sbx LR
+ mrs R0,CPSR
+ tst R0,#0x80 ;Check if IRQ is enabled.
+ moveq R0,#1
+ movne R0,#0
+ bx LR
ArmEnableFiq
-\s\smrs R0,CPSR
-\s\sbic R0,R0,#0x40\s\s\s\s;Enable IRQ interrupts
-\s\smsr CPSR_c,R0
-\s\sbx LR
+ mrs R0,CPSR
+ bic R0,R0,#0x40 ;Enable IRQ interrupts
+ msr CPSR_c,R0
+ bx LR
ArmDisableFiq
-\s\smrs R0,CPSR
-\s\sorr R1,R0,#0x40\s\s\s\s;Disable IRQ interrupts
-\s\smsr CPSR_c,R1
+ mrs R0,CPSR
+ orr R1,R0,#0x40 ;Disable IRQ interrupts
+ msr CPSR_c,R1
tst R0,#0x40
moveq R0,#1
movne R0,#0
-\s\sbx LR
+ bx LR
ArmGetFiqState
-\s\smrs R0,CPSR
-\s\stst R0,#0x40\s\s ;Check if IRQ is enabled.
-\s\smoveq R0,#1
-\s\smovne R0,#0
-\s\sbx LR
+ mrs R0,CPSR
+ tst R0,#0x40 ;Check if IRQ is enabled.
+ moveq R0,#1
+ movne R0,#0
+ bx LR
ArmInvalidateTlb
mov r0,#0
diff --git a/ArmPkg/Library/ArmMPCoreMailBoxLib/ArmMPCoreMailBox.c b/ArmPkg/Library/ArmMPCoreMailBoxLib/ArmMPCoreMailBox.c
index 98a5b6c606..c7a9341e86 100644
--- a/ArmPkg/Library/ArmMPCoreMailBoxLib/ArmMPCoreMailBox.c
+++ b/ArmPkg/Library/ArmMPCoreMailBoxLib/ArmMPCoreMailBox.c
@@ -17,7 +17,7 @@
#include <Library/IoLib.h>
VOID ArmClearMPCoreMailbox() {
-\s\sMmioWrite32(PcdGet32(PcdMPCoreMailboxClearAddress),PcdGet32(PcdMPCoreMailboxClearValue));
+ MmioWrite32(PcdGet32(PcdMPCoreMailboxClearAddress),PcdGet32(PcdMPCoreMailboxClearValue));
}
UINTN ArmGetMPCoreMailbox() {
diff --git a/ArmPkg/Library/ArmTrustZoneLib/ArmTrustZone.c b/ArmPkg/Library/ArmTrustZoneLib/ArmTrustZone.c
index 1e4809bc81..56d1311f84 100644
--- a/ArmPkg/Library/ArmTrustZoneLib/ArmTrustZone.c
+++ b/ArmPkg/Library/ArmTrustZoneLib/ArmTrustZone.c
@@ -72,8 +72,8 @@ EFI_STATUS TZASCSetRegion(UINTN TzascBase, UINTN RegionId, UINTN Enabled, UINTN
Region = (UINT32*)((UINTN)TzascBase + TZASC_REGIONS_REG + (RegionId * 0x10));
MmioWrite32((UINTN)(Region), LowAddress&0xFFFF8000);
-\s\sMmioWrite32((UINTN)(Region+1), HighAddress);
-\s\sMmioWrite32((UINTN)(Region+2), ((Security & 0xF) <<28) | ((Size & 0x3F) << 1) | (Enabled & 0x1));
+ MmioWrite32((UINTN)(Region+1), HighAddress);
+ MmioWrite32((UINTN)(Region+2), ((Security & 0xF) <<28) | ((Size & 0x3F) << 1) | (Enabled & 0x1));
return EFI_SUCCESS;
}
diff --git a/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S b/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S
index fcd7199d4b..1298f94e8d 100755
--- a/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S
+++ b/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S
@@ -42,71 +42,71 @@ InternalMemCopyMem (
GCC_ASM_EXPORT(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
-\s\sstmfd\s\ssp!, {r4-r11, lr}
-\s\stst\s\sr0, #3
-\s\smov\s\sr11, r0
-\s\smov\s\sr10, r0
-\s\smov\s\sip, r2
-\s\smov\s\slr, r1
-\s\smovne\s\sr0, #0
-\s\sbne\s\sL4
-\s\stst\s\sr1, #3
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #1
-\s\scmp\s\sr2, #31
-\s\smovls\s\sr0, #0
-\s\sandhi\s\sr0, r3, #1
+ stmfd sp!, {r4-r11, lr}
+ tst r0, #3
+ mov r11, r0
+ mov r10, r0
+ mov ip, r2
+ mov lr, r1
+ movne r0, #0
+ bne L4
+ tst r1, #3
+ movne r3, #0
+ moveq r3, #1
+ cmp r2, #31
+ movls r0, #0
+ andhi r0, r3, #1
L4:
-\s\scmp\s\sr11, r1
-\s\sbcc\s\sL26
-\s\sbls\s\sL7
-\s\srsb\s\sr3, r1, r11
-\s\scmp\s\sip, r3
-\s\sbcc\s\sL26
-\s\scmp\s\sip, #0
-\s\sbeq\s\sL7
-\s\sadd\s\sr10, r11, ip
-\s\sadd\s\slr, ip, r1
-\s\sb\s\sL16
+ cmp r11, r1
+ bcc L26
+ bls L7
+ rsb r3, r1, r11
+ cmp ip, r3
+ bcc L26
+ cmp ip, #0
+ beq L7
+ add r10, r11, ip
+ add lr, ip, r1
+ b L16
L29:
-\s\ssub\s\sip, ip, #8
-\s\scmp\s\sip, #7
-\s\sldrd\s\sr2, [lr, #-8]!
-\s\smovls\s\sr0, #0
-\s\scmp\s\sip, #0
-\s\sstrd\s\sr2, [r10, #-8]!
-\s\sbeq\s\sL7
+ sub ip, ip, #8
+ cmp ip, #7
+ ldrd r2, [lr, #-8]!
+ movls r0, #0
+ cmp ip, #0
+ strd r2, [r10, #-8]!
+ beq L7
L16:
-\s\scmp\s\sr0, #0
-\s\sbne\s\sL29
-\s\ssub\s\sr3, lr, #1
-\s\ssub\s\sip, ip, #1
-\s\sldrb\s\sr3, [r3, #0]\s\s
-\s\ssub\s\sr2, r10, #1
-\s\scmp\s\sip, #0
-\s\ssub\s\sr10, r10, #1
-\s\ssub\s\slr, lr, #1
-\s\sstrb\s\sr3, [r2, #0]
-\s\sbne\s\sL16
-\s\sb L7
+ cmp r0, #0
+ bne L29
+ sub r3, lr, #1
+ sub ip, ip, #1
+ ldrb r3, [r3, #0]
+ sub r2, r10, #1
+ cmp ip, #0
+ sub r10, r10, #1
+ sub lr, lr, #1
+ strb r3, [r2, #0]
+ bne L16
+ b L7
L11:
-\s\sldrb\s\sr3, [lr], #1\s\s
-\s\ssub\s\sip, ip, #1
-\s\sstrb\s\sr3, [r10], #1
+ ldrb r3, [lr], #1
+ sub ip, ip, #1
+ strb r3, [r10], #1
L26:
-\s\scmp\s\sip, #0
-\s\sbeq\s\sL7
+ cmp ip, #0
+ beq L7
L30:
-\s\scmp\s\sr0, #0
-\s\sbeq\s\sL11
-\s\ssub\s\sip, ip, #32
-\s\scmp\s\sip, #31
-\s\sldmia\s\slr!, {r2-r9}
-\s\smovls\s\sr0, #0
-\s\scmp\s\sip, #0
-\s\sstmia\s\sr10!, {r2-r9}
-\s\sbne\s\sL30
+ cmp r0, #0
+ beq L11
+ sub ip, ip, #32
+ cmp ip, #31
+ ldmia lr!, {r2-r9}
+ movls r0, #0
+ cmp ip, #0
+ stmia r10!, {r2-r9}
+ bne L30
L7:
- mov\s\sr0, r11
-\s\sldmfd\s\ssp!, {r4-r11, pc}
+ mov r0, r11
+ ldmfd sp!, {r4-r11, pc}
diff --git a/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.asm b/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.asm
index afb74072a0..1a5e18e120 100755
--- a/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.asm
+++ b/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.asm
@@ -37,78 +37,78 @@ InternalMemCopyMem (
IN UINTN Length
)
**/
-\s\sEXPORT InternalMemCopyMem
+ EXPORT InternalMemCopyMem
-\s\sAREA AsmMemStuff, CODE, READONLY
+ AREA AsmMemStuff, CODE, READONLY
InternalMemCopyMem
-\s\sstmfd\s\ssp!, {r4-r11, lr}
-\s\stst\s\sr0, #3
-\s\smov\s\sr11, r0
-\s\smov\s\sr10, r0
-\s\smov\s\sip, r2
-\s\smov\s\slr, r1
-\s\smovne\s\sr0, #0
-\s\sbne\s\sL4
-\s\stst\s\sr1, #3
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #1
-\s\scmp\s\sr2, #31
-\s\smovls\s\sr0, #0
-\s\sandhi\s\sr0, r3, #1
+ stmfd sp!, {r4-r11, lr}
+ tst r0, #3
+ mov r11, r0
+ mov r10, r0
+ mov ip, r2
+ mov lr, r1
+ movne r0, #0
+ bne L4
+ tst r1, #3
+ movne r3, #0
+ moveq r3, #1
+ cmp r2, #31
+ movls r0, #0
+ andhi r0, r3, #1
L4
-\s\scmp\s\sr11, r1
-\s\sbcc\s\sL26
-\s\sbls\s\sL7
-\s\srsb\s\sr3, r1, r11
-\s\scmp\s\sip, r3
-\s\sbcc\s\sL26
-\s\scmp\s\sip, #0
-\s\sbeq\s\sL7
-\s\sadd\s\sr10, r11, ip
-\s\sadd\s\slr, ip, r1
-\s\sb\s\sL16
+ cmp r11, r1
+ bcc L26
+ bls L7
+ rsb r3, r1, r11
+ cmp ip, r3
+ bcc L26
+ cmp ip, #0
+ beq L7
+ add r10, r11, ip
+ add lr, ip, r1
+ b L16
L29
-\s\ssub\s\sip, ip, #8
-\s\scmp\s\sip, #7
-\s\sldrd\s\sr2, [lr, #-8]!
-\s\smovls\s\sr0, #0
-\s\scmp\s\sip, #0
-\s\sstrd\s\sr2, [r10, #-8]!
-\s\sbeq\s\sL7
+ sub ip, ip, #8
+ cmp ip, #7
+ ldrd r2, [lr, #-8]!
+ movls r0, #0
+ cmp ip, #0
+ strd r2, [r10, #-8]!
+ beq L7
L16
-\s\scmp\s\sr0, #0
-\s\sbne\s\sL29
-\s\ssub\s\sr3, lr, #1
-\s\ssub\s\sip, ip, #1
-\s\sldrb\s\sr3, [r3, #0]\s\s
-\s\ssub\s\sr2, r10, #1
-\s\scmp\s\sip, #0
-\s\ssub\s\sr10, r10, #1
-\s\ssub\s\slr, lr, #1
-\s\sstrb\s\sr3, [r2, #0]
-\s\sbne\s\sL16
-\s\sb L7
+ cmp r0, #0
+ bne L29
+ sub r3, lr, #1
+ sub ip, ip, #1
+ ldrb r3, [r3, #0]
+ sub r2, r10, #1
+ cmp ip, #0
+ sub r10, r10, #1
+ sub lr, lr, #1
+ strb r3, [r2, #0]
+ bne L16
+ b L7
L11
-\s\sldrb\s\sr3, [lr], #1\s\s
-\s\ssub\s\sip, ip, #1
-\s\sstrb\s\sr3, [r10], #1
+ ldrb r3, [lr], #1
+ sub ip, ip, #1
+ strb r3, [r10], #1
L26
-\s\scmp\s\sip, #0
-\s\sbeq\s\sL7
+ cmp ip, #0
+ beq L7
L30
-\s\scmp\s\sr0, #0
-\s\sbeq\s\sL11
-\s\ssub\s\sip, ip, #32
-\s\scmp\s\sip, #31
-\s\sldmia\s\slr!, {r2-r9}
-\s\smovls\s\sr0, #0
-\s\scmp\s\sip, #0
-\s\sstmia\s\sr10!, {r2-r9}
-\s\sbne\s\sL30
+ cmp r0, #0
+ beq L11
+ sub ip, ip, #32
+ cmp ip, #31
+ ldmia lr!, {r2-r9}
+ movls r0, #0
+ cmp ip, #0
+ stmia r10!, {r2-r9}
+ bne L30
L7
- mov\s\sr0, r11
-\s\sldmfd\s\ssp!, {r4-r11, pc}
-\s\s
+ mov r0, r11
+ ldmfd sp!, {r4-r11, pc}
+
END
diff --git a/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S b/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S
index db37cb47d4..8a61a6b44e 100755
--- a/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S
+++ b/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S
@@ -34,49 +34,49 @@ InternalMemSetMem (
IN UINT8 Value
)
**/
-\s\s
+
.text
.align 2
GCC_ASM_EXPORT(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
-\s\sstmfd\s\ssp!, {r4-r11, lr}
-\s\stst\s\s r0, #3
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #1
-\s\scmp\s\s r1, #31
-\s\smovls lr, #0
-\s\sandhi\s\slr, r3, #1
-\s\scmp\s\s lr, #0
-\s\smov\s\s r12, r0
-\s\sbne\s\s L31
+ stmfd sp!, {r4-r11, lr}
+ tst r0, #3
+ movne r3, #0
+ moveq r3, #1
+ cmp r1, #31
+ movls lr, #0
+ andhi lr, r3, #1
+ cmp lr, #0
+ mov r12, r0
+ bne L31
L32:
-\s\smov\s\s r3, #0
-\s\sb\s\s L43
+ mov r3, #0
+ b L43
L31:
and r4, r2, #0xff
orr r4, r4, r4, LSL #8
orr r4, r4, r4, LSL #16
-\s\smov r5, r4
-\s\smov r5, r4
-\s\smov r6, r4
-\s\smov r7, r4
-\s\smov r8, r4
-\s\smov r9, r4
-\s\smov r10, r4
-\s\smov r11, r4
-\s\sb\s\s L32
+ mov r5, r4
+ mov r5, r4
+ mov r6, r4
+ mov r7, r4
+ mov r8, r4
+ mov r9, r4
+ mov r10, r4
+ mov r11, r4
+ b L32
L34:
-\s\scmp\s\s lr, #0
-\s\sstreqb\s\sr2, [r12], #1
-\s\ssubeq\s\s r1, r1, #1
-\s\sbeq\s\s L43
-\s\ssub\s\s r1, r1, #32
-\s\scmp\s\s r1, #31
-\s\smovls\s\s lr, r3
-\s\sstmia\s\s r12!, {r4-r11}
+ cmp lr, #0
+ streqb r2, [r12], #1
+ subeq r1, r1, #1
+ beq L43
+ sub r1, r1, #32
+ cmp r1, #31
+ movls lr, r3
+ stmia r12!, {r4-r11}
L43:
-\s\scmp\s\s r1, #0
-\s\sbne\s\s L34
-\s\sldmfd\s\s sp!, {r4-r11, pc}
-\s\s \ No newline at end of file
+ cmp r1, #0
+ bne L34
+ ldmfd sp!, {r4-r11, pc}
+ \ No newline at end of file
diff --git a/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.asm b/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.asm
index 4a4d2380b0..7222cf9b7f 100755
--- a/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.asm
+++ b/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.asm
@@ -33,51 +33,51 @@ InternalMemSetMem (
IN UINT8 Value
)
**/
-\s\s
-\s\sEXPORT InternalMemSetMem
-\s\s
-\s\sAREA AsmMemStuff, CODE, READONLY
+
+ EXPORT InternalMemSetMem
+
+ AREA AsmMemStuff, CODE, READONLY
InternalMemSetMem
-\s\sstmfd\s\ssp!, {r4-r11, lr}
-\s\stst\s\s r0, #3
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #1
-\s\scmp\s\s r1, #31
-\s\smovls lr, #0
-\s\sandhi\s\slr, r3, #1
-\s\scmp\s\s lr, #0
-\s\smov\s\s r12, r0
-\s\sbne\s\s L31
+ stmfd sp!, {r4-r11, lr}
+ tst r0, #3
+ movne r3, #0
+ moveq r3, #1
+ cmp r1, #31
+ movls lr, #0
+ andhi lr, r3, #1
+ cmp lr, #0
+ mov r12, r0
+ bne L31
L32
-\s\smov\s\s r3, #0
-\s\sb\s\s L43
+ mov r3, #0
+ b L43
L31
and r4, r2, #0xff
orr r4, r4, r4, LSL #8
orr r4, r4, r4, LSL #16
-\s\smov r5, r4
-\s\smov r5, r4
-\s\smov r6, r4
-\s\smov r7, r4
-\s\smov r8, r4
-\s\smov r9, r4
-\s\smov r10, r4
-\s\smov r11, r4
-\s\sb\s\s L32
+ mov r5, r4
+ mov r5, r4
+ mov r6, r4
+ mov r7, r4
+ mov r8, r4
+ mov r9, r4
+ mov r10, r4
+ mov r11, r4
+ b L32
L34
-\s\scmp\s\s lr, #0
-\s\sstreqb\s\sr2, [r12], #1
-\s\ssubeq\s\s r1, r1, #1
-\s\sbeq\s\s L43
-\s\ssub\s\s r1, r1, #32
-\s\scmp\s\s r1, #31
-\s\smovls\s\s lr, r3
-\s\sstmia\s\s r12!, {r4-r11}
+ cmp lr, #0
+ streqb r2, [r12], #1
+ subeq r1, r1, #1
+ beq L43
+ sub r1, r1, #32
+ cmp r1, #31
+ movls lr, r3
+ stmia r12!, {r4-r11}
L43
-\s\scmp\s\s r1, #0
-\s\sbne\s\s L34
-\s\sldmfd\s\s sp!, {r4-r11, pc}
-\s\s
+ cmp r1, #0
+ bne L34
+ ldmfd sp!, {r4-r11, pc}
+
END
\ No newline at end of file
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S
index 2e389b045f..8cfd9a9c50 100755
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S
+++ b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S
@@ -42,73 +42,73 @@ InternalMemCopyMem (
GCC_ASM_EXPORT(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
-\s\sstmfd\s\ssp!, {r4, r9, lr}
-\s\stst\s\sr0, #3
-\s\smov\s\sr4, r0
-\s\smov\s\sr9, r0
-\s\smov\s\sip, r2
-\s\smov\s\slr, r1
-\s\smovne\s\sr0, #0
-\s\sbne\s\sL4
-\s\stst\s\sr1, #3
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #1
-\s\scmp\s\sr2, #127
-\s\smovls\s\sr0, #0
-\s\sandhi\s\sr0, r3, #1
+ stmfd sp!, {r4, r9, lr}
+ tst r0, #3
+ mov r4, r0
+ mov r9, r0
+ mov ip, r2
+ mov lr, r1
+ movne r0, #0
+ bne L4
+ tst r1, #3
+ movne r3, #0
+ moveq r3, #1
+ cmp r2, #127
+ movls r0, #0
+ andhi r0, r3, #1
L4:
-\s\scmp\s\sr4, r1
-\s\sbcc\s\sL26
-\s\sbls\s\sL7
-\s\srsb\s\sr3, r1, r4
-\s\scmp\s\sip, r3
-\s\sbcc\s\sL26
-\s\scmp\s\sip, #0
-\s\sbeq\s\sL7
-\s\sadd\s\sr9, r4, ip
-\s\sadd\s\slr, ip, r1
-\s\sb\s\sL16
+ cmp r4, r1
+ bcc L26
+ bls L7
+ rsb r3, r1, r4
+ cmp ip, r3
+ bcc L26
+ cmp ip, #0
+ beq L7
+ add r9, r4, ip
+ add lr, ip, r1
+ b L16
L29:
-\s\ssub\s\sip, ip, #8
-\s\scmp\s\sip, #7
-\s\sldrd\s\sr2, [lr, #-8]!
-\s\smovls\s\sr0, #0
-\s\scmp\s\sip, #0
-\s\sstrd\s\sr2, [r9, #-8]!
-\s\sbeq\s\sL7
+ sub ip, ip, #8
+ cmp ip, #7
+ ldrd r2, [lr, #-8]!
+ movls r0, #0
+ cmp ip, #0
+ strd r2, [r9, #-8]!
+ beq L7
L16:
-\s\scmp\s\sr0, #0
-\s\sbne\s\sL29
-\s\ssub\s\sr3, lr, #1
-\s\ssub\s\sip, ip, #1
-\s\sldrb\s\sr3, [r3, #0]\s\s
-\s\ssub\s\sr2, r9, #1
-\s\scmp\s\sip, #0
-\s\ssub\s\sr9, r9, #1
-\s\ssub\s\slr, lr, #1
-\s\sstrb\s\sr3, [r2, #0]
-\s\sbne\s\sL16
-\s\sb L7
+ cmp r0, #0
+ bne L29
+ sub r3, lr, #1
+ sub ip, ip, #1
+ ldrb r3, [r3, #0]
+ sub r2, r9, #1
+ cmp ip, #0
+ sub r9, r9, #1
+ sub lr, lr, #1
+ strb r3, [r2, #0]
+ bne L16
+ b L7
L11:
-\s\sldrb\s\sr3, [lr], #1\s\s
-\s\ssub\s\sip, ip, #1
-\s\sstrb\s\sr3, [r9], #1
+ ldrb r3, [lr], #1
+ sub ip, ip, #1
+ strb r3, [r9], #1
L26:
-\s\scmp\s\sip, #0
-\s\sbeq\s\sL7
+ cmp ip, #0
+ beq L7
L30:
-\s\scmp\s\sr0, #0
-\s\sbeq\s\sL11
-\s\ssub\s\sip, ip, #128 // 32
-\s\scmp\s\sip, #127 // 31
-\s\svldm lr!, {d0-d15}
-\s\smovls\s\sr0, #0
-\s\scmp\s\sip, #0
-\s\svstm r9!, {d0-d15}
-\s\sbne\s\sL30
+ cmp r0, #0
+ beq L11
+ sub ip, ip, #128 // 32
+ cmp ip, #127 // 31
+ vldm lr!, {d0-d15}
+ movls r0, #0
+ cmp ip, #0
+ vstm r9!, {d0-d15}
+ bne L30
L7:
dsb
- mov\s\sr0, r4
-\s\sldmfd\s\ssp!, {r4, r9, pc}
+ mov r0, r4
+ ldmfd sp!, {r4, r9, pc}
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm
index a0b7596a9f..e7cbdf1ed0 100755
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm
+++ b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm
@@ -37,79 +37,79 @@ InternalMemCopyMem (
IN UINTN Length
)
**/
-\s\sEXPORT InternalMemCopyMem
+ EXPORT InternalMemCopyMem
-\s\sAREA AsmMemStuff, CODE, READONLY
+ AREA AsmMemStuff, CODE, READONLY
InternalMemCopyMem
-\s\sstmfd\s\ssp!, {r4, r9, lr}
-\s\stst\s\sr0, #3
-\s\smov\s\sr4, r0
-\s\smov\s\sr9, r0
-\s\smov\s\sip, r2
-\s\smov\s\slr, r1
-\s\smovne\s\sr0, #0
-\s\sbne\s\sL4
-\s\stst\s\sr1, #3
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #1
-\s\scmp\s\sr2, #127
-\s\smovls\s\sr0, #0
-\s\sandhi\s\sr0, r3, #1
+ stmfd sp!, {r4, r9, lr}
+ tst r0, #3
+ mov r4, r0
+ mov r9, r0
+ mov ip, r2
+ mov lr, r1
+ movne r0, #0
+ bne L4
+ tst r1, #3
+ movne r3, #0
+ moveq r3, #1
+ cmp r2, #127
+ movls r0, #0
+ andhi r0, r3, #1
L4
-\s\scmp\s\sr4, r1
-\s\sbcc\s\sL26
-\s\sbls\s\sL7
-\s\srsb\s\sr3, r1, r4
-\s\scmp\s\sip, r3
-\s\sbcc\s\sL26
-\s\scmp\s\sip, #0
-\s\sbeq\s\sL7
-\s\sadd\s\sr9, r4, ip
-\s\sadd\s\slr, ip, r1
-\s\sb\s\sL16
+ cmp r4, r1
+ bcc L26
+ bls L7
+ rsb r3, r1, r4
+ cmp ip, r3
+ bcc L26
+ cmp ip, #0
+ beq L7
+ add r9, r4, ip
+ add lr, ip, r1
+ b L16
L29
-\s\ssub\s\sip, ip, #8
-\s\scmp\s\sip, #7
-\s\sldrd\s\sr2, [lr, #-8]!
-\s\smovls\s\sr0, #0
-\s\scmp\s\sip, #0
-\s\sstrd\s\sr2, [r9, #-8]!
-\s\sbeq\s\sL7
+ sub ip, ip, #8
+ cmp ip, #7
+ ldrd r2, [lr, #-8]!
+ movls r0, #0
+ cmp ip, #0
+ strd r2, [r9, #-8]!
+ beq L7
L16
-\s\scmp\s\sr0, #0
-\s\sbne\s\sL29
-\s\ssub\s\sr3, lr, #1
-\s\ssub\s\sip, ip, #1
-\s\sldrb\s\sr3, [r3, #0]\s\s
-\s\ssub\s\sr2, r9, #1
-\s\scmp\s\sip, #0
-\s\ssub\s\sr9, r9, #1
-\s\ssub\s\slr, lr, #1
-\s\sstrb\s\sr3, [r2, #0]
-\s\sbne\s\sL16
-\s\sb L7
+ cmp r0, #0
+ bne L29
+ sub r3, lr, #1
+ sub ip, ip, #1
+ ldrb r3, [r3, #0]
+ sub r2, r9, #1
+ cmp ip, #0
+ sub r9, r9, #1
+ sub lr, lr, #1
+ strb r3, [r2, #0]
+ bne L16
+ b L7
L11
-\s\sldrb\s\sr3, [lr], #1\s\s
-\s\ssub\s\sip, ip, #1
-\s\sstrb\s\sr3, [r9], #1
+ ldrb r3, [lr], #1
+ sub ip, ip, #1
+ strb r3, [r9], #1
L26
-\s\scmp\s\sip, #0
-\s\sbeq\s\sL7
+ cmp ip, #0
+ beq L7
L30
-\s\scmp\s\sr0, #0
-\s\sbeq\s\sL11
-\s\ssub\s\sip, ip, #128 // 32
-\s\scmp\s\sip, #127 // 31
-\s\svldm lr!, {d0-d15}
-\s\smovls\s\sr0, #0
-\s\scmp\s\sip, #0
-\s\svstm r9!, {d0-d15}
-\s\sbne\s\sL30
+ cmp r0, #0
+ beq L11
+ sub ip, ip, #128 // 32
+ cmp ip, #127 // 31
+ vldm lr!, {d0-d15}
+ movls r0, #0
+ cmp ip, #0
+ vstm r9!, {d0-d15}
+ bne L30
L7
dsb
- mov\s\sr0, r4
-\s\sldmfd\s\ssp!, {r4, r9, pc}
+ mov r0, r4
+ ldmfd sp!, {r4, r9, pc}
END
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S
index 24388ebba6..d5c50cbef4 100755
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S
+++ b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S
@@ -34,25 +34,25 @@ InternalMemSetMem (
IN UINT8 Value
)
**/
-\s\s
+
.text
.align 2
GCC_ASM_EXPORT(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
-\s\sstmfd\s\ssp!, {r4-r7, lr}
-\s\stst\s\s r0, #3
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #1
-\s\scmp\s\s r1, #127
-\s\smovls lr, #0
-\s\sandhi\s\slr, r3, #1
-\s\scmp\s\s lr, #0
-\s\smov\s\s r12, r0
-\s\sbne\s\s L31
+ stmfd sp!, {r4-r7, lr}
+ tst r0, #3
+ movne r3, #0
+ moveq r3, #1
+ cmp r1, #127
+ movls lr, #0
+ andhi lr, r3, #1
+ cmp lr, #0
+ mov r12, r0
+ bne L31
L32:
-\s\smov\s\s r3, #0
-\s\sb\s\s L43
+ mov r3, #0
+ b L43
L31:
vdup.8 q0,r2
vmov q1,q0
@@ -62,19 +62,19 @@ L31:
vmov q5,q0
vmov q6,q0
vmov q7,q0
-\s\sb\s\s L32
+ b L32
L34:
-\s\scmp\s\s lr, #0
-\s\sstreqb\s\sr2, [r12], #1
-\s\ssubeq\s\s r1, r1, #1
-\s\sbeq\s\s L43
-\s\ssub\s\s r1, r1, #128
-\s\scmp\s\s r1, #127
-\s\scmp\s\s r1, #31
-\s\smovls\s\s lr, r3
-\s\svstm r12!, {d0-d15}
+ cmp lr, #0
+ streqb r2, [r12], #1
+ subeq r1, r1, #1
+ beq L43
+ sub r1, r1, #128
+ cmp r1, #127
+ cmp r1, #31
+ movls lr, r3
+ vstm r12!, {d0-d15}
L43:
-\s\scmp\s\s r1, #0
-\s\sbne\s\s L34
-\s\sldmfd\s\s sp!, {pc}
-\s\s \ No newline at end of file
+ cmp r1, #0
+ bne L34
+ ldmfd sp!, {pc}
+ \ No newline at end of file
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm
index b0d26d641c..bbab580cf1 100755
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm
+++ b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm
@@ -33,25 +33,25 @@ InternalMemSetMem (
IN UINT8 Value
)
**/
-\s\s
-\s\sEXPORT InternalMemSetMem
-\s\s
-\s\sAREA AsmMemStuff, CODE, READONLY
+
+ EXPORT InternalMemSetMem
+
+ AREA AsmMemStuff, CODE, READONLY
InternalMemSetMem
-\s\sstmfd\s\ssp!, {lr}
-\s\stst\s\s r0, #3
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #1
-\s\scmp\s\s r1, #127
-\s\smovls lr, #0
-\s\sandhi\s\slr, r3, #1
-\s\scmp\s\s lr, #0
-\s\smov\s\s r12, r0
-\s\sbne\s\s L31
+ stmfd sp!, {lr}
+ tst r0, #3
+ movne r3, #0
+ moveq r3, #1
+ cmp r1, #127
+ movls lr, #0
+ andhi lr, r3, #1
+ cmp lr, #0
+ mov r12, r0
+ bne L31
L32
-\s\smov\s\s r3, #0
-\s\sb\s\s L43
+ mov r3, #0
+ b L43
L31
vdup.8 q0,r2
vmov q1,q0
@@ -61,20 +61,20 @@ L31
vmov q5,q0
vmov q6,q0
vmov q7,q0
-\s\sb\s\s L32
+ b L32
L34
-\s\scmp\s\s lr, #0
-\s\sstreqb\s\sr2, [r12], #1
-\s\ssubeq\s\s r1, r1, #1
-\s\sbeq\s\s L43
-\s\ssub\s\s r1, r1, #128
-\s\scmp\s\s r1, #127
-\s\smovls\s\s lr, r3
-\s\svstm r12!, {d0-d15}
+ cmp lr, #0
+ streqb r2, [r12], #1
+ subeq r1, r1, #1
+ beq L43
+ sub r1, r1, #128
+ cmp r1, #127
+ movls lr, r3
+ vstm r12!, {d0-d15}
L43
-\s\scmp\s\s r1, #0
-\s\sbne\s\s L34
-\s\sldmfd\s\s sp!, {pc}
-\s\s
+ cmp r1, #0
+ bne L34
+ ldmfd sp!, {pc}
+
END
\ No newline at end of file
diff --git a/ArmPkg/Library/BdsLib/BdsFilePathFs.c b/ArmPkg/Library/BdsLib/BdsFilePathFs.c
index e5792b8afd..0b7f9d39a5 100644
--- a/ArmPkg/Library/BdsLib/BdsFilePathFs.c
+++ b/ArmPkg/Library/BdsLib/BdsFilePathFs.c
@@ -34,8 +34,8 @@ EFI_STATUS BdsLoadFileFromSimpleFileSystem(
}
//Try to Open the volume and get root directory
-\s\sStatus = FsProtocol->OpenVolume(FsProtocol, &Fs);
-\s\sif (EFI_ERROR(Status)) {
+ Status = FsProtocol->OpenVolume(FsProtocol, &Fs);
+ if (EFI_ERROR(Status)) {
return Status;
}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashldi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashldi3.S
index 89beba0877..5578797125 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashldi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashldi3.S
@@ -12,24 +12,24 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__ashldi3)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__ashldi3)
+
ASM_PFX(__ashldi3):
-\s\scmp\s\sr2, #31
-\s\sbls\s\sL2
-\s\scmp\s\sr2, #63
-\s\ssubls\s\sr2, r2, #32
-\s\smovls\s\sr2, r0, asl r2
-\s\smovhi\s\sr2, #0
-\s\smov\s\sr1, r2
-\s\smov\s\sr0, #0
-\s\sbx\s\slr
+ cmp r2, #31
+ bls L2
+ cmp r2, #63
+ subls r2, r2, #32
+ movls r2, r0, asl r2
+ movhi r2, #0
+ mov r1, r2
+ mov r0, #0
+ bx lr
L2:
-\s\scmp\s\sr2, #0
-\s\srsbne\s\sr3, r2, #32
-\s\smovne\s\sr3, r0, lsr r3
-\s\smovne\s\sr0, r0, asl r2
-\s\sorrne\s\sr1, r3, r1, asl r2
-\s\sbx\s\slr
+ cmp r2, #0
+ rsbne r3, r2, #32
+ movne r3, r0, lsr r3
+ movne r0, r0, asl r2
+ orrne r1, r3, r1, asl r2
+ bx lr
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S
index 8c99f18e52..defd1f081c 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S
@@ -12,25 +12,25 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__ashrdi3)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__ashrdi3)
ASM_PFX(__ashrdi3):
-\s\scmp\s\sr2, #31
-\s\sbls\s\sL2
-\s\scmp\s\sr2, #63
-\s\ssubls\s\sr2, r2, #32
-\s\smov\s\sip, r1, asr #31
-\s\smovls\s\sr2, r1, asr r2
-\s\smovhi\s\sr2, ip
-\s\smov\s\sr0, r2
-\s\smov\s\sr1, ip
-\s\sbx\s\slr
+ cmp r2, #31
+ bls L2
+ cmp r2, #63
+ subls r2, r2, #32
+ mov ip, r1, asr #31
+ movls r2, r1, asr r2
+ movhi r2, ip
+ mov r0, r2
+ mov r1, ip
+ bx lr
L2:
-\s\scmp\s\sr2, #0
-\s\srsbne\s\sr3, r2, #32
-\s\smovne\s\sr3, r1, asl r3
-\s\smovne\s\sr1, r1, asr r2
-\s\sorrne\s\sr0, r3, r0, lsr r2
-\s\sbx\s\slr
+ cmp r2, #0
+ rsbne r3, r2, #32
+ movne r3, r1, asl r3
+ movne r1, r1, asr r2
+ orrne r0, r3, r0, lsr r2
+ bx lr
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/clzsi2.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/clzsi2.S
index ed01174bd2..11ea95cef4 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/clzsi2.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/clzsi2.S
@@ -12,46 +12,46 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__clzsi2)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__clzsi2)
ASM_PFX(__clzsi2):
-\s\s@ frame_needed = 1, uses_anonymous_args = 0
-\s\sstmfd\s\ssp!, {r7, lr}
-\s\sadd\s\sr7, sp, #0
-\s\smovs\s\sr3, r0, lsr #16
-\s\smovne\s\sr3, #16
-\s\smoveq\s\sr3, #0
-\s\smovne\s\sr9, #0
-\s\smoveq\s\sr9, #16
-\s\smov\s\sr3, r0, lsr r3
-\s\stst\s\sr3, #65280
-\s\smovne\s\sr0, #8
-\s\smoveq\s\sr0, #0
-\s\smovne\s\slr, #0
-\s\smoveq\s\slr, #8
-\s\smov\s\sr3, r3, lsr r0
-\s\stst\s\sr3, #240
-\s\smovne\s\sr0, #4
-\s\smoveq\s\sr0, #0
-\s\smovne\s\sip, #0
-\s\smoveq\s\sip, #4
-\s\smov\s\sr3, r3, lsr r0
-\s\stst\s\sr3, #12
-\s\smovne\s\sr0, #2
-\s\smoveq\s\sr0, #0
-\s\smovne\s\sr1, #0
-\s\smoveq\s\sr1, #2
-\s\smov\s\sr2, r3, lsr r0
-\s\sadd\s\sr3, lr, r9
-\s\sadd\s\sr0, r3, ip
-\s\sadd\s\sr1, r0, r1
-\s\smov\s\sr0, r2, lsr #1
-\s\seor\s\sr0, r0, #1
-\s\sands\s\sr0, r0, #1
-\s\smvnne\s\sr0, #0
-\s\srsb\s\sr3, r2, #2
-\s\sand\s\sr0, r0, r3
-\s\sadd\s\sr0, r1, r0
-\s\sldmfd\s\ssp!, {r7, pc}
+ @ frame_needed = 1, uses_anonymous_args = 0
+ stmfd sp!, {r7, lr}
+ add r7, sp, #0
+ movs r3, r0, lsr #16
+ movne r3, #16
+ moveq r3, #0
+ movne r9, #0
+ moveq r9, #16
+ mov r3, r0, lsr r3
+ tst r3, #65280
+ movne r0, #8
+ moveq r0, #0
+ movne lr, #0
+ moveq lr, #8
+ mov r3, r3, lsr r0
+ tst r3, #240
+ movne r0, #4
+ moveq r0, #0
+ movne ip, #0
+ moveq ip, #4
+ mov r3, r3, lsr r0
+ tst r3, #12
+ movne r0, #2
+ moveq r0, #0
+ movne r1, #0
+ moveq r1, #2
+ mov r2, r3, lsr r0
+ add r3, lr, r9
+ add r0, r3, ip
+ add r1, r0, r1
+ mov r0, r2, lsr #1
+ eor r0, r0, #1
+ ands r0, r0, #1
+ mvnne r0, #0
+ rsb r3, r2, #2
+ and r0, r0, r3
+ add r0, r1, r0
+ ldmfd sp!, {r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S
index 3d9025ad1a..0c8e78d961 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S
@@ -12,38 +12,38 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__ctzsi2)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__ctzsi2)
+
ASM_PFX(__ctzsi2):
-\s\suxth\s\sr3, r0
-\s\scmp\s\sr3, #0
-\s\smoveq\s\sip, #16
-\s\smovne\s\sip, #0
-\s\s@ lr needed for prologue
-\s\smov\s\sr0, r0, lsr ip
-\s\stst\s\sr0, #255
-\s\smovne\s\sr3, #0
-\s\smoveq\s\sr3, #8
-\s\smov\s\sr0, r0, lsr r3
-\s\stst\s\sr0, #15
-\s\smovne\s\sr1, #0
-\s\smoveq\s\sr1, #4
-\s\sadd\s\sr3, r3, ip
-\s\smov\s\sr0, r0, lsr r1
-\s\stst\s\sr0, #3
-\s\smovne\s\sr2, #0
-\s\smoveq\s\sr2, #2
-\s\sadd\s\sr3, r3, r1
-\s\smov\s\sr0, r0, lsr r2
-\s\sand\s\sr0, r0, #3
-\s\sadd\s\sr2, r3, r2
-\s\seor\s\sr3, r0, #1
-\s\smov\s\sr0, r0, lsr #1
-\s\sands\s\sr3, r3, #1
-\s\smvnne\s\sr3, #0
-\s\srsb\s\sr0, r0, #2
-\s\sand\s\sr0, r3, r0
-\s\sadd\s\sr0, r2, r0
-\s\sbx\s\slr
+ uxth r3, r0
+ cmp r3, #0
+ moveq ip, #16
+ movne ip, #0
+ @ lr needed for prologue
+ mov r0, r0, lsr ip
+ tst r0, #255
+ movne r3, #0
+ moveq r3, #8
+ mov r0, r0, lsr r3
+ tst r0, #15
+ movne r1, #0
+ moveq r1, #4
+ add r3, r3, ip
+ mov r0, r0, lsr r1
+ tst r0, #3
+ movne r2, #0
+ moveq r2, #2
+ add r3, r3, r1
+ mov r0, r0, lsr r2
+ and r0, r0, #3
+ add r2, r3, r2
+ eor r3, r0, #1
+ mov r0, r0, lsr #1
+ ands r3, r3, #1
+ mvnne r3, #0
+ rsb r0, r0, #2
+ and r0, r3, r0
+ add r0, r2, r0
+ bx lr
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divdi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divdi3.S
index 080091a52f..342f376bb0 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divdi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divdi3.S
@@ -12,38 +12,38 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__divdi3)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__divdi3)
+
ASM_PFX(__divdi3):
-\s\s@ args = 0, pretend = 0, frame = 0
-\s\s@ frame_needed = 1, uses_anonymous_args = 0
-\s\sstmfd\s\ssp!, {r4, r5, r7, lr}
-\s\smov\s\sr4, r3, asr #31
-\s\sadd\s\sr7, sp, #8
-\s\sstmfd\s\ssp!, {r10, r11}
-\s\smov\s\sr10, r1, asr #31
-\s\ssub\s\ssp, sp, #8
-\s\smov\s\sr11, r10
-\s\smov\s\sr5, r4
-\s\seor\s\sr0, r0, r10
-\s\seor\s\sr1, r1, r10
-\s\seor\s\sr2, r2, r4
-\s\seor\s\sr3, r3, r4
-\s\ssubs\s\sr2, r2, r4
-\s\ssbc\s\sr3, r3, r5
-\s\smov\s\sip, #0
-\s\ssubs\s\sr0, r0, r10
-\s\ssbc\s\sr1, r1, r11
-\s\sstr\s\sip, [sp, #0]
-\s\sbl\s\sASM_PFX(__udivmoddi4)
-\s\seor\s\sr2, r10, r4
-\s\seor\s\sr3, r10, r4
-\s\seor\s\sr0, r0, r2
-\s\seor\s\sr1, r1, r3
-\s\ssubs\s\sr0, r0, r2
-\s\ssbc\s\sr1, r1, r3
-\s\ssub\s\ssp, r7, #16
-\s\sldmfd\s\ssp!, {r10, r11}
-\s\sldmfd\s\ssp!, {r4, r5, r7, pc}
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 1, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r7, lr}
+ mov r4, r3, asr #31
+ add r7, sp, #8
+ stmfd sp!, {r10, r11}
+ mov r10, r1, asr #31
+ sub sp, sp, #8
+ mov r11, r10
+ mov r5, r4
+ eor r0, r0, r10
+ eor r1, r1, r10
+ eor r2, r2, r4
+ eor r3, r3, r4
+ subs r2, r2, r4
+ sbc r3, r3, r5
+ mov ip, #0
+ subs r0, r0, r10
+ sbc r1, r1, r11
+ str ip, [sp, #0]
+ bl ASM_PFX(__udivmoddi4)
+ eor r2, r10, r4
+ eor r3, r10, r4
+ eor r0, r0, r2
+ eor r1, r1, r3
+ subs r0, r0, r2
+ sbc r1, r1, r3
+ sub sp, r7, #16
+ ldmfd sp!, {r10, r11}
+ ldmfd sp!, {r4, r5, r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divsi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divsi3.S
index 473f1f22b9..3976fda148 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divsi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/divsi3.S
@@ -12,21 +12,21 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__divsi3)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__divsi3)
+
ASM_PFX(__divsi3):
-\s\seor\s\sr3, r0, r0, asr #31
-\s\seor\s\sr2, r1, r1, asr #31
-\s\sstmfd\s\ssp!, {r4, r5, r7, lr}
-\s\smov\s\sr5, r0, asr #31
-\s\sadd\s\sr7, sp, #8
-\s\smov\s\sr4, r1, asr #31
-\s\ssub\s\sr0, r3, r0, asr #31
-\s\ssub\s\sr1, r2, r1, asr #31
-\s\sbl\s\sASM_PFX(__udivsi3)
-\s\seor\s\sr1, r5, r4
-\s\seor\s\sr0, r0, r1
-\s\srsb\s\sr0, r1, r0
-\s\sldmfd\s\ssp!, {r4, r5, r7, pc}
+ eor r3, r0, r0, asr #31
+ eor r2, r1, r1, asr #31
+ stmfd sp!, {r4, r5, r7, lr}
+ mov r5, r0, asr #31
+ add r7, sp, #8
+ mov r4, r1, asr #31
+ sub r0, r3, r0, asr #31
+ sub r1, r2, r1, asr #31
+ bl ASM_PFX(__udivsi3)
+ eor r1, r5, r4
+ eor r0, r0, r1
+ rsb r0, r1, r0
+ ldmfd sp!, {r4, r5, r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.S
index 2e7d70ab36..02ecdfe8d7 100755
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ldivmod.S
@@ -13,9 +13,9 @@
//------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__aeabi_ldivmod)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__aeabi_ldivmod)
//
// A pair of (unsigned) long longs is returned in {{r0, r1}, {r2, r3}},
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S
index 82e7cf78bb..73d83599ba 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S
@@ -12,24 +12,24 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__lshrdi3)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__lshrdi3)
+
ASM_PFX(__lshrdi3):
-\s\scmp\s\sr2, #31
-\s\sbls\s\sL2
-\s\scmp\s\sr2, #63
-\s\ssubls\s\sr2, r2, #32
-\s\smovls\s\sr2, r1, lsr r2
-\s\smovhi\s\sr2, #0
-\s\smov\s\sr0, r2
-\s\smov\s\sr1, #0
-\s\sbx\s\slr
+ cmp r2, #31
+ bls L2
+ cmp r2, #63
+ subls r2, r2, #32
+ movls r2, r1, lsr r2
+ movhi r2, #0
+ mov r0, r2
+ mov r1, #0
+ bx lr
L2:
-\s\scmp\s\sr2, #0
-\s\srsbne\s\sr3, r2, #32
-\s\smovne\s\sr3, r1, asl r3
-\s\smovne\s\sr1, r1, lsr r2
-\s\sorrne\s\sr0, r3, r0, lsr r2
-\s\sbx\s\slr
+ cmp r2, #0
+ rsbne r3, r2, #32
+ movne r3, r1, asl r3
+ movne r1, r1, lsr r2
+ orrne r0, r3, r0, lsr r2
+ bx lr
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memcpy.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memcpy.S
index 63d6c683d9..18299326ca 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memcpy.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memcpy.S
@@ -12,23 +12,23 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(memcpy)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(memcpy)
ASM_PFX(memcpy):
-\s\sstmfd\s\ssp!, {r7, lr}
-\s\smov\s\sip, #0
-\s\sadd\s\sr7, sp, #0
-\s\smov\s\slr, r0
-\s\sb\s\sL4
+ stmfd sp!, {r7, lr}
+ mov ip, #0
+ add r7, sp, #0
+ mov lr, r0
+ b L4
L5:
-\s\sldrb\s\sr3, [r1], #1\s\s@ zero_extendqisi2
-\s\sadd\s\sip, ip, #1
-\s\sand\s\sr3, r3, #255
-\s\sstrb\s\sr3, [lr], #1
+ ldrb r3, [r1], #1 @ zero_extendqisi2
+ add ip, ip, #1
+ and r3, r3, #255
+ strb r3, [lr], #1
L4:
-\s\scmp\s\sip, r2
-\s\sbne\s\sL5
-\s\sldmfd\s\ssp!, {r7, pc}
+ cmp ip, r2
+ bne L5
+ ldmfd sp!, {r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memset.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memset.S
index 3cd71e9f5f..35783620c7 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memset.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memset.S
@@ -14,25 +14,25 @@
.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT (memset)
+ .align 2
+ GCC_ASM_EXPORT (memset)
ASM_PFX(memset):
-\s\s@ args = 0, pretend = 0, frame = 0
-\s\s@ frame_needed = 1, uses_anonymous_args = 0
-\s\sstmfd\s\ssp!, {r7, lr}
-\s\smov\s\sip, #0
-\s\sadd\s\sr7, sp, #0
-\s\smov\s\slr, r0
-\s\sb\s\sL9
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 1, uses_anonymous_args = 0
+ stmfd sp!, {r7, lr}
+ mov ip, #0
+ add r7, sp, #0
+ mov lr, r0
+ b L9
L10:
-\s\sand\s\sr3, r1, #255
-\s\sadd\s\sip, ip, #1
-\s\sstrb\s\sr3, [lr], #1
+ and r3, r1, #255
+ add ip, ip, #1
+ strb r3, [lr], #1
L9:
-\s\scmp\s\sip, r2
-\s\sbne\s\sL10
-\s\sldmfd\s\ssp!, {r7, pc}
+ cmp ip, r2
+ bne L10
+ ldmfd sp!, {r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/moddi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/moddi3.S
index c5b7ab301b..75572c82b6 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/moddi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/moddi3.S
@@ -12,35 +12,35 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__moddi3)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__moddi3)
ASM_PFX(__moddi3):
-\s\sstmfd\s\ssp!, {r4, r5, r7, lr}
-\s\smov\s\sr4, r1, asr #31
-\s\sadd\s\sr7, sp, #8
-\s\sstmfd\s\ssp!, {r10, r11}
-\s\smov\s\sr10, r3, asr #31
-\s\ssub\s\ssp, sp, #16
-\s\smov\s\sr5, r4
-\s\smov\s\sr11, r10
-\s\seor\s\sr0, r0, r4
-\s\seor\s\sr1, r1, r4
-\s\seor\s\sr2, r2, r10
-\s\seor\s\sr3, r3, r10
-\s\sadd\s\sip, sp, #8
-\s\ssubs\s\sr0, r0, r4
-\s\ssbc\s\sr1, r1, r5
-\s\ssubs\s\sr2, r2, r10
-\s\ssbc\s\sr3, r3, r11
-\s\sstr\s\sip, [sp, #0]
-\s\sbl\s\sASM_PFX(__udivmoddi4)
-\s\sldrd\s\sr0, [sp, #8]
-\s\seor\s\sr0, r0, r4
-\s\seor\s\sr1, r1, r4
-\s\ssubs\s\sr0, r0, r4
-\s\ssbc\s\sr1, r1, r5
-\s\ssub\s\ssp, r7, #16
-\s\sldmfd\s\ssp!, {r10, r11}
-\s\sldmfd\s\ssp!, {r4, r5, r7, pc}
+ stmfd sp!, {r4, r5, r7, lr}
+ mov r4, r1, asr #31
+ add r7, sp, #8
+ stmfd sp!, {r10, r11}
+ mov r10, r3, asr #31
+ sub sp, sp, #16
+ mov r5, r4
+ mov r11, r10
+ eor r0, r0, r4
+ eor r1, r1, r4
+ eor r2, r2, r10
+ eor r3, r3, r10
+ add ip, sp, #8
+ subs r0, r0, r4
+ sbc r1, r1, r5
+ subs r2, r2, r10
+ sbc r3, r3, r11
+ str ip, [sp, #0]
+ bl ASM_PFX(__udivmoddi4)
+ ldrd r0, [sp, #8]
+ eor r0, r0, r4
+ eor r1, r1, r4
+ subs r0, r0, r4
+ sbc r1, r1, r5
+ sub sp, r7, #16
+ ldmfd sp!, {r10, r11}
+ ldmfd sp!, {r4, r5, r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/modsi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/modsi3.S
index 56b360426c..eb698d604f 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/modsi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/modsi3.S
@@ -12,16 +12,16 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__modsi3)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__modsi3)
ASM_PFX(__modsi3):
-\s\sstmfd\s\ssp!, {r4, r5, r7, lr}
-\s\sadd\s\sr7, sp, #8
-\s\smov\s\sr5, r0
-\s\smov\s\sr4, r1
-\s\sbl\s\s___divsi3
-\s\smul\s\sr0, r4, r0
-\s\srsb\s\sr0, r0, r5
-\s\sldmfd\s\ssp!, {r4, r5, r7, pc}
+ stmfd sp!, {r4, r5, r7, lr}
+ add r7, sp, #8
+ mov r5, r0
+ mov r4, r1
+ bl ___divsi3
+ mul r0, r4, r0
+ rsb r0, r0, r5
+ ldmfd sp!, {r4, r5, r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S
index ab5d0cac2e..36956c24e2 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S
@@ -12,47 +12,47 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__muldi3)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__muldi3)
ASM_PFX(__muldi3):
-\s\sstmfd\s\ssp!, {r4, r5, r6, r7, lr}
-\s\sadd\s\sr7, sp, #12
-\s\sstmfd\s\ssp!, {r8, r10, r11}
-\s\sldr\s\sr11, L4
-\s\smov\s\sr4, r0, lsr #16
-\s\sand\s\sr8, r0, r11
-\s\sand\s\sip, r2, r11
-\s\smul\s\slr, ip, r8
-\s\smul\s\sip, r4, ip
-\s\ssub\s\ssp, sp, #8
-\s\sadd\s\sr10, ip, lr, lsr #16
-\s\sand\s\sip, r10, r11
-\s\sand\s\slr, lr, r11
-\s\smov\s\sr6, r2, lsr #16
-\s\sstr\s\sr4, [sp, #4]
-\s\sadd\s\sr4, lr, ip, asl #16
-\s\smul\s\sip, r8, r6
-\s\smov\s\sr5, r10, lsr #16
-\s\sadd\s\sr10, ip, r4, lsr #16
-\s\sand\s\sip, r10, r11
-\s\sand\s\slr, r4, r11
-\s\sadd\s\sr4, lr, ip, asl #16
-\s\smul\s\sr0, r3, r0
-\s\sadd\s\sip, r5, r10, lsr #16
-\s\sldr\s\sr5, [sp, #4]
-\s\smla\s\sr0, r2, r1, r0
-\s\smla\s\sr5, r6, r5, ip
-\s\smov\s\sr10, r4
-\s\sadd\s\sr11, r0, r5
-\s\smov\s\sr1, r11
-\s\smov\s\sr0, r4
-\s\ssub\s\ssp, r7, #24
-\s\sldmfd\s\ssp!, {r8, r10, r11}
-\s\sldmfd\s\ssp!, {r4, r5, r6, r7, pc}
-\s\s.p2align 2
+ stmfd sp!, {r4, r5, r6, r7, lr}
+ add r7, sp, #12
+ stmfd sp!, {r8, r10, r11}
+ ldr r11, L4
+ mov r4, r0, lsr #16
+ and r8, r0, r11
+ and ip, r2, r11
+ mul lr, ip, r8
+ mul ip, r4, ip
+ sub sp, sp, #8
+ add r10, ip, lr, lsr #16
+ and ip, r10, r11
+ and lr, lr, r11
+ mov r6, r2, lsr #16
+ str r4, [sp, #4]
+ add r4, lr, ip, asl #16
+ mul ip, r8, r6
+ mov r5, r10, lsr #16
+ add r10, ip, r4, lsr #16
+ and ip, r10, r11
+ and lr, r4, r11
+ add r4, lr, ip, asl #16
+ mul r0, r3, r0
+ add ip, r5, r10, lsr #16
+ ldr r5, [sp, #4]
+ mla r0, r2, r1, r0
+ mla r5, r6, r5, ip
+ mov r10, r4
+ add r11, r0, r5
+ mov r1, r11
+ mov r0, r4
+ sub sp, r7, #24
+ ldmfd sp!, {r8, r10, r11}
+ ldmfd sp!, {r4, r5, r6, r7, pc}
+ .p2align 2
L5:
-\s\s.align 2
+ .align 2
L4:
-\s\s.long\s\s65535
+ .long 65535
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/mullu.asm b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/mullu.asm
index 533912426f..5d369e9afb 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/mullu.asm
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/mullu.asm
@@ -13,8 +13,8 @@
//------------------------------------------------------------------------------
- EXPORT\s\s__ARM_ll_mullu
- EXPORT\s\s__aeabi_lmul
+ EXPORT __ARM_ll_mullu
+ EXPORT __aeabi_lmul
AREA Math, CODE, READONLY
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch.asm b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch.asm
index 7a52a039ff..8d34c5de52 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch.asm
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch.asm
@@ -14,16 +14,16 @@
- EXPORT\s\s__ARM_switch8
+ EXPORT __ARM_switch8
- AREA\s\sArmSwitch, CODE, READONLY
-\s\s
+ AREA ArmSwitch, CODE, READONLY
+
__ARM_switch8
-\s\sLDRB\s\s r12,[lr,#-1]
-\s\sCMP\s\s\s\s r3,r12
-\s\sLDRBCC\s\sr3,[lr,r3]
-\s\sLDRBCS\s\sr3,[lr,r12]
-\s\sADD\s\s\s\s r12,lr,r3,LSL #1
-\s\sBX\s\s\s\s r12
+ LDRB r12,[lr,#-1]
+ CMP r3,r12
+ LDRBCC r3,[lr,r3]
+ LDRBCS r3,[lr,r12]
+ ADD r12,lr,r3,LSL #1
+ BX r12
END
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S
index ea5cf07eba..e85be6cae0 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S
@@ -12,27 +12,27 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__ucmpdi2)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__ucmpdi2)
+
ASM_PFX(__ucmpdi2):
-\s\sstmfd\s\ssp!, {r4, r5, r8, lr}
-\s\scmp\s\sr1, r3
-\s\smov\s\sr8, r0
-\s\smov\s\sr4, r2
-\s\smov\s\sr5, r3
-\s\sbcc\s\sL2
-\s\sbhi\s\sL4
-\s\scmp\s\sr0, r2
-\s\sbcc\s\sL2
-\s\smovls\s\sr0, #1
-\s\sbls\s\sL8
-\s\sb\s\sL4
+ stmfd sp!, {r4, r5, r8, lr}
+ cmp r1, r3
+ mov r8, r0
+ mov r4, r2
+ mov r5, r3
+ bcc L2
+ bhi L4
+ cmp r0, r2
+ bcc L2
+ movls r0, #1
+ bls L8
+ b L4
L2:
-\s\smov\s\sr0, #0
-\s\sb\s\sL8
+ mov r0, #0
+ b L8
L4:
-\s\smov\s\sr0, #2
+ mov r0, #2
L8:
-\s\sldmfd\s\ssp!, {r4, r5, r8, pc}
+ ldmfd sp!, {r4, r5, r8, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivdi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivdi3.S
index 36e2a11cd7..a8b9702707 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivdi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivdi3.S
@@ -12,16 +12,16 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__udivdi3)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__udivdi3)
ASM_PFX(__udivdi3):
-\s\sstmfd\s\ssp!, {r7, lr}
-\s\sadd\s\sr7, sp, #0
-\s\ssub\s\ssp, sp, #8
-\s\smov\s\sip, #0
-\s\sstr\s\sip, [sp, #0]
-\s\sbl\s\sASM_PFX(__udivmoddi4)
-\s\ssub\s\ssp, r7, #0
-\s\sldmfd\s\ssp!, {r7, pc}
+ stmfd sp!, {r7, lr}
+ add r7, sp, #0
+ sub sp, sp, #8
+ mov ip, #0
+ str ip, [sp, #0]
+ bl ASM_PFX(__udivmoddi4)
+ sub sp, r7, #0
+ ldmfd sp!, {r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S
index 63e25094e9..cadc1d291a 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S
@@ -12,231 +12,231 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__udivmoddi4)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__udivmoddi4)
+
ASM_PFX(__udivmoddi4):
-\s\sstmfd\s\ssp!, {r4, r5, r6, r7, lr}
-\s\sadd\s\sr7, sp, #12
-\s\sstmfd\s\ssp!, {r10, r11}
-\s\ssub\s\ssp, sp, #20
-\s\sstmia\s\ssp, {r2-r3}
-\s\sldr\s\sr6, [sp, #48]
-\s\sorrs\s\sr2, r2, r3
-\s\smov\s\sr10, r0
-\s\smov\s\sr11, r1
-\s\sbeq\s\sL2
-\s\ssubs\s\sip, r1, #0
-\s\sbne\s\sL4
-\s\scmp\s\sr3, #0
-\s\sbne\s\sL6
-\s\scmp\s\sr6, #0
-\s\sbeq\s\sL8
-\s\smov\s\sr1, r2
-\s\sbl\s\sASM_PFX(__umodsi3)
-\s\smov\s\sr1, #0
-\s\sstmia\s\sr6, {r0-r1}
+ stmfd sp!, {r4, r5, r6, r7, lr}
+ add r7, sp, #12
+ stmfd sp!, {r10, r11}
+ sub sp, sp, #20
+ stmia sp, {r2-r3}
+ ldr r6, [sp, #48]
+ orrs r2, r2, r3
+ mov r10, r0
+ mov r11, r1
+ beq L2
+ subs ip, r1, #0
+ bne L4
+ cmp r3, #0
+ bne L6
+ cmp r6, #0
+ beq L8
+ mov r1, r2
+ bl ASM_PFX(__umodsi3)
+ mov r1, #0
+ stmia r6, {r0-r1}
L8:
-\s\sldr\s\sr1, [sp, #0]
-\s\smov\s\sr0, r10
-\s\sb\s\sL45
+ ldr r1, [sp, #0]
+ mov r0, r10
+ b L45
L6:
-\s\scmp\s\sr6, #0
-\s\smovne\s\sr1, #0
-\s\sstmneia\s\sr6, {r0-r1}
-\s\sb\s\sL2
+ cmp r6, #0
+ movne r1, #0
+ stmneia r6, {r0-r1}
+ b L2
L4:
-\s\sldr\s\sr1, [sp, #0]
-\s\scmp\s\sr1, #0
-\s\sbne\s\sL12
-\s\sldr\s\sr2, [sp, #4]
-\s\scmp\s\sr2, #0
-\s\sbne\s\sL14
-\s\scmp\s\sr6, #0
-\s\sbeq\s\sL16
-\s\smov\s\sr1, r2
-\s\smov\s\sr0, r11
-\s\sbl\s\sASM_PFX(__umodsi3)
-\s\smov\s\sr1, #0
-\s\sstmia\s\sr6, {r0-r1}
+ ldr r1, [sp, #0]
+ cmp r1, #0
+ bne L12
+ ldr r2, [sp, #4]
+ cmp r2, #0
+ bne L14
+ cmp r6, #0
+ beq L16
+ mov r1, r2
+ mov r0, r11
+ bl ASM_PFX(__umodsi3)
+ mov r1, #0
+ stmia r6, {r0-r1}
L16:
-\s\sldr\s\sr1, [sp, #4]
-\s\smov\s\sr0, r11
+ ldr r1, [sp, #4]
+ mov r0, r11
L45:
-\s\sbl\s\sASM_PFX(__udivsi3)
+ bl ASM_PFX(__udivsi3)
L46:
-\s\smov\s\sr10, r0
-\s\smov\s\sr11, #0
-\s\sb\s\sL10
+ mov r10, r0
+ mov r11, #0
+ b L10
L14:
-\s\ssubs\s\sr1, r0, #0
-\s\sbne\s\sL18
-\s\scmp\s\sr6, #0
-\s\sbeq\s\sL16
-\s\sldr\s\sr1, [sp, #4]
-\s\smov\s\sr0, r11
-\s\sbl\s\sASM_PFX(__umodsi3)
-\s\smov\s\sr4, r10
-\s\smov\s\sr5, r0
-\s\sstmia\s\sr6, {r4-r5}
-\s\sb\s\sL16
+ subs r1, r0, #0
+ bne L18
+ cmp r6, #0
+ beq L16
+ ldr r1, [sp, #4]
+ mov r0, r11
+ bl ASM_PFX(__umodsi3)
+ mov r4, r10
+ mov r5, r0
+ stmia r6, {r4-r5}
+ b L16
L18:
-\s\ssub\s\sr3, r2, #1
-\s\stst\s\sr2, r3
-\s\sbne\s\sL22
-\s\scmp\s\sr6, #0
-\s\smovne\s\sr4, r0
-\s\sandne\s\sr5, ip, r3
-\s\sstmneia\s\sr6, {r4-r5}
+ sub r3, r2, #1
+ tst r2, r3
+ bne L22
+ cmp r6, #0
+ movne r4, r0
+ andne r5, ip, r3
+ stmneia r6, {r4-r5}
L24:
-\s\srsb\s\sr3, r2, #0
-\s\sand\s\sr3, r2, r3
-\s\sclz\s\sr3, r3
-\s\srsb\s\sr3, r3, #31
-\s\smov\s\sr0, ip, lsr r3
-\s\sb\s\sL46
+ rsb r3, r2, #0
+ and r3, r2, r3
+ clz r3, r3
+ rsb r3, r3, #31
+ mov r0, ip, lsr r3
+ b L46
L22:
-\s\sclz\s\sr2, r2
-\s\sclz\s\sr3, ip
-\s\srsb\s\sr3, r3, r2
-\s\scmp\s\sr3, #30
-\s\sbhi\s\sL48
-\s\srsb\s\sr2, r3, #31
-\s\sadd\s\slr, r3, #1
-\s\smov\s\sr3, r1, asl r2
-\s\sstr\s\sr3, [sp, #12]
-\s\smov\s\sr3, r1, lsr lr
-\s\sldr\s\sr0, [sp, #0]
-\s\smov\s\sr5, ip, lsr lr
-\s\sorr\s\sr4, r3, ip, asl r2
-\s\sstr\s\sr0, [sp, #8]
-\s\sb\s\sL29
+ clz r2, r2
+ clz r3, ip
+ rsb r3, r3, r2
+ cmp r3, #30
+ bhi L48
+ rsb r2, r3, #31
+ add lr, r3, #1
+ mov r3, r1, asl r2
+ str r3, [sp, #12]
+ mov r3, r1, lsr lr
+ ldr r0, [sp, #0]
+ mov r5, ip, lsr lr
+ orr r4, r3, ip, asl r2
+ str r0, [sp, #8]
+ b L29
L12:
-\s\sldr\s\sr3, [sp, #4]
-\s\scmp\s\sr3, #0
-\s\sbne\s\sL30
-\s\ssub\s\sr3, r1, #1
-\s\stst\s\sr1, r3
-\s\sbne\s\sL32
-\s\scmp\s\sr6, #0
-\s\sandne\s\sr3, r3, r0
-\s\smovne\s\sr2, r3
-\s\smovne\s\sr3, #0
-\s\sstmneia\s\sr6, {r2-r3}
+ ldr r3, [sp, #4]
+ cmp r3, #0
+ bne L30
+ sub r3, r1, #1
+ tst r1, r3
+ bne L32
+ cmp r6, #0
+ andne r3, r3, r0
+ movne r2, r3
+ movne r3, #0
+ stmneia r6, {r2-r3}
L34:
-\s\scmp\s\sr1, #1
-\s\sbeq\s\sL10
-\s\srsb\s\sr3, r1, #0
-\s\sand\s\sr3, r1, r3
-\s\sclz\s\sr3, r3
-\s\srsb\s\sr0, r3, #31
-\s\smov\s\sr1, ip, lsr r0
-\s\srsb\s\sr3, r0, #32
-\s\smov\s\sr0, r10, lsr r0
-\s\sorr\s\sip, r0, ip, asl r3
-\s\sstr\s\sr1, [sp, #12]
-\s\sstr\s\sip, [sp, #8]
-\s\sldrd\s\sr10, [sp, #8]
-\s\sb\s\sL10
+ cmp r1, #1
+ beq L10
+ rsb r3, r1, #0
+ and r3, r1, r3
+ clz r3, r3
+ rsb r0, r3, #31
+ mov r1, ip, lsr r0
+ rsb r3, r0, #32
+ mov r0, r10, lsr r0
+ orr ip, r0, ip, asl r3
+ str r1, [sp, #12]
+ str ip, [sp, #8]
+ ldrd r10, [sp, #8]
+ b L10
L32:
-\s\sclz\s\sr2, r1
-\s\sclz\s\sr3, ip
-\s\srsb\s\sr3, r3, r2
-\s\srsb\s\sr4, r3, #31
-\s\smov\s\sr2, r0, asl r4
-\s\smvn\s\sr1, r3
-\s\sand\s\sr2, r2, r1, asr #31
-\s\sadd\s\slr, r3, #33
-\s\sstr\s\sr2, [sp, #8]
-\s\sadd\s\sr2, r3, #1
-\s\smov\s\sr3, r3, asr #31
-\s\sand\s\sr0, r3, r0, asl r1
-\s\smov\s\sr3, r10, lsr r2
-\s\sorr\s\sr3, r3, ip, asl r4
-\s\sand\s\sr3, r3, r1, asr #31
-\s\sorr\s\sr0, r0, r3
-\s\smov\s\sr3, ip, lsr lr
-\s\sstr\s\sr0, [sp, #12]
-\s\smov\s\sr0, r10, lsr lr
-\s\sand\s\sr5, r3, r2, asr #31
-\s\srsb\s\sr3, lr, #31
-\s\smov\s\sr3, r3, asr #31
-\s\sorr\s\sr0, r0, ip, asl r1
-\s\sand\s\sr3, r3, ip, lsr r2
-\s\sand\s\sr0, r0, r2, asr #31
-\s\sorr\s\sr4, r3, r0
-\s\sb\s\sL29
+ clz r2, r1
+ clz r3, ip
+ rsb r3, r3, r2
+ rsb r4, r3, #31
+ mov r2, r0, asl r4
+ mvn r1, r3
+ and r2, r2, r1, asr #31
+ add lr, r3, #33
+ str r2, [sp, #8]
+ add r2, r3, #1
+ mov r3, r3, asr #31
+ and r0, r3, r0, asl r1
+ mov r3, r10, lsr r2
+ orr r3, r3, ip, asl r4
+ and r3, r3, r1, asr #31
+ orr r0, r0, r3
+ mov r3, ip, lsr lr
+ str r0, [sp, #12]
+ mov r0, r10, lsr lr
+ and r5, r3, r2, asr #31
+ rsb r3, lr, #31
+ mov r3, r3, asr #31
+ orr r0, r0, ip, asl r1
+ and r3, r3, ip, lsr r2
+ and r0, r0, r2, asr #31
+ orr r4, r3, r0
+ b L29
L30:
-\s\sclz\s\sr2, r3
-\s\sclz\s\sr3, ip
-\s\srsb\s\sr3, r3, r2
-\s\scmp\s\sr3, #31
-\s\sbls\s\sL37
+ clz r2, r3
+ clz r3, ip
+ rsb r3, r3, r2
+ cmp r3, #31
+ bls L37
L48:
-\s\scmp\s\sr6, #0
-\s\sstmneia\s\sr6, {r10-r11}
-\s\sb\s\sL2
+ cmp r6, #0
+ stmneia r6, {r10-r11}
+ b L2
L37:
-\s\srsb\s\sr1, r3, #31
-\s\smov\s\sr0, r0, asl r1
-\s\sadd\s\slr, r3, #1
-\s\smov\s\sr2, #0
-\s\sstr\s\sr0, [sp, #12]
-\s\smov\s\sr0, r10, lsr lr
-\s\sstr\s\sr2, [sp, #8]
-\s\ssub\s\sr2, r3, #31
-\s\sand\s\sr0, r0, r2, asr #31
-\s\smov\s\sr3, ip, lsr lr
-\s\sorr\s\sr4, r0, ip, asl r1
-\s\sand\s\sr5, r3, r2, asr #31
+ rsb r1, r3, #31
+ mov r0, r0, asl r1
+ add lr, r3, #1
+ mov r2, #0
+ str r0, [sp, #12]
+ mov r0, r10, lsr lr
+ str r2, [sp, #8]
+ sub r2, r3, #31
+ and r0, r0, r2, asr #31
+ mov r3, ip, lsr lr
+ orr r4, r0, ip, asl r1
+ and r5, r3, r2, asr #31
L29:
-\s\smov\s\sip, #0
-\s\smov\s\sr10, ip
-\s\sb\s\sL40
+ mov ip, #0
+ mov r10, ip
+ b L40
L41:
-\s\sldr\s\sr1, [sp, #12]
-\s\sldr\s\sr2, [sp, #8]
-\s\smov\s\sr3, r4, lsr #31
-\s\sorr\s\sr5, r3, r5, asl #1
-\s\smov\s\sr3, r1, lsr #31
-\s\sorr\s\sr4, r3, r4, asl #1
-\s\smov\s\sr3, r2, lsr #31
-\s\sorr\s\sr0, r3, r1, asl #1
-\s\sorr\s\sr1, ip, r2, asl #1
-\s\sldmia\s\ssp, {r2-r3}
-\s\sstr\s\sr0, [sp, #12]
-\s\ssubs\s\sr2, r2, r4
-\s\ssbc\s\sr3, r3, r5
-\s\sstr\s\sr1, [sp, #8]
-\s\ssubs\s\sr0, r2, #1
-\s\ssbc\s\sr1, r3, #0
-\s\smov\s\sr2, r1, asr #31
-\s\sldmia\s\ssp, {r0-r1}
-\s\smov\s\sr3, r2
-\s\sand\s\sip, r2, #1
-\s\sand\s\sr3, r3, r1
-\s\sand\s\sr2, r2, r0
-\s\ssubs\s\sr4, r4, r2
-\s\ssbc\s\sr5, r5, r3
-\s\sadd\s\sr10, r10, #1
+ ldr r1, [sp, #12]
+ ldr r2, [sp, #8]
+ mov r3, r4, lsr #31
+ orr r5, r3, r5, asl #1
+ mov r3, r1, lsr #31
+ orr r4, r3, r4, asl #1
+ mov r3, r2, lsr #31
+ orr r0, r3, r1, asl #1
+ orr r1, ip, r2, asl #1
+ ldmia sp, {r2-r3}
+ str r0, [sp, #12]
+ subs r2, r2, r4
+ sbc r3, r3, r5
+ str r1, [sp, #8]
+ subs r0, r2, #1
+ sbc r1, r3, #0
+ mov r2, r1, asr #31
+ ldmia sp, {r0-r1}
+ mov r3, r2
+ and ip, r2, #1
+ and r3, r3, r1
+ and r2, r2, r0
+ subs r4, r4, r2
+ sbc r5, r5, r3
+ add r10, r10, #1
L40:
-\s\scmp\s\sr10, lr
-\s\sbne\s\sL41
-\s\sldrd\s\sr0, [sp, #8]
-\s\sadds\s\sr0, r0, r0
-\s\sadc\s\sr1, r1, r1
-\s\scmp\s\sr6, #0
-\s\sorr\s\sr10, r0, ip
-\s\smov\s\sr11, r1
-\s\sstmneia\s\sr6, {r4-r5}
-\s\sb\s\sL10
+ cmp r10, lr
+ bne L41
+ ldrd r0, [sp, #8]
+ adds r0, r0, r0
+ adc r1, r1, r1
+ cmp r6, #0
+ orr r10, r0, ip
+ mov r11, r1
+ stmneia r6, {r4-r5}
+ b L10
L2:
-\s\smov\s\sr10, #0
-\s\smov\s\sr11, #0
+ mov r10, #0
+ mov r11, #0
L10:
-\s\smov\s\sr0, r10
-\s\smov\s\sr1, r11
-\s\ssub\s\ssp, r7, #20
-\s\sldmfd\s\ssp!, {r10, r11}
-\s\sldmfd\s\ssp!, {r4, r5, r6, r7, pc}
+ mov r0, r10
+ mov r1, r11
+ sub sp, r7, #20
+ ldmfd sp!, {r10, r11}
+ ldmfd sp!, {r4, r5, r6, r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivsi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivsi3.S
index 903d1b1a87..92c9cad960 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivsi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/udivsi3.S
@@ -12,46 +12,46 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__udivsi3)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__udivsi3)
ASM_PFX(__udivsi3):
-\s\scmp\s\sr1, #0
-\s\scmpne\s\sr0, #0
-\s\sstmfd\s\ssp!, {r4, r5, r7, lr}
-\s\sadd\s\sr7, sp, #8
-\s\sbeq\s\sL2
-\s\sclz\s\sr2, r1
-\s\sclz\s\sr3, r0
-\s\srsb\s\sr3, r3, r2
-\s\scmp\s\sr3, #31
-\s\sbhi\s\sL2
-\s\sldmeqfd\s\ssp!, {r4, r5, r7, pc}
-\s\sadd\s\sr5, r3, #1
-\s\srsb\s\sr3, r3, #31
-\s\smov\s\slr, #0
-\s\smov\s\sr2, r0, asl r3
-\s\smov\s\sip, r0, lsr r5
-\s\smov\s\sr4, lr
-\s\sb\s\sL8
+ cmp r1, #0
+ cmpne r0, #0
+ stmfd sp!, {r4, r5, r7, lr}
+ add r7, sp, #8
+ beq L2
+ clz r2, r1
+ clz r3, r0
+ rsb r3, r3, r2
+ cmp r3, #31
+ bhi L2
+ ldmeqfd sp!, {r4, r5, r7, pc}
+ add r5, r3, #1
+ rsb r3, r3, #31
+ mov lr, #0
+ mov r2, r0, asl r3
+ mov ip, r0, lsr r5
+ mov r4, lr
+ b L8
L9:
-\s\smov\s\sr0, r2, lsr #31
-\s\sorr\s\sip, r0, ip, asl #1
-\s\sorr\s\sr2, r3, lr
-\s\srsb\s\sr3, ip, r1
-\s\ssub\s\sr3, r3, #1
-\s\sand\s\sr0, r1, r3, asr #31
-\s\smov\s\slr, r3, lsr #31
-\s\srsb\s\sip, r0, ip
-\s\sadd\s\sr4, r4, #1
+ mov r0, r2, lsr #31
+ orr ip, r0, ip, asl #1
+ orr r2, r3, lr
+ rsb r3, ip, r1
+ sub r3, r3, #1
+ and r0, r1, r3, asr #31
+ mov lr, r3, lsr #31
+ rsb ip, r0, ip
+ add r4, r4, #1
L8:
-\s\scmp\s\sr4, r5
-\s\smov\s\sr3, r2, asl #1
-\s\sbne\s\sL9
-\s\sorr\s\sr0, r3, lr
-\s\sldmfd\s\ssp!, {r4, r5, r7, pc}
+ cmp r4, r5
+ mov r3, r2, asl #1
+ bne L9
+ orr r0, r3, lr
+ ldmfd sp!, {r4, r5, r7, pc}
L2:
-\s\smov\s\sr0, #0
-\s\sldmfd\s\ssp!, {r4, r5, r7, pc}
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.S
index 6b309f9b0b..6b55135f33 100755
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldiv.S
@@ -14,9 +14,9 @@
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__aeabi_uldivmod)
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__aeabi_uldivmod)
//
//UINT64
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umoddi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umoddi3.S
index df47e70319..75bb240888 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umoddi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umoddi3.S
@@ -12,18 +12,18 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__umoddi3)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__umoddi3)
+
ASM_PFX(__umoddi3):
-\s\sstmfd\s\ssp!, {r7, lr}
-\s\sadd\s\sr7, sp, #0
-\s\ssub\s\ssp, sp, #16
-\s\sadd\s\sip, sp, #8
-\s\sstr\s\sip, [sp, #0]
-\s\sbl\s\sASM_PFX(__udivmoddi4)
-\s\sldrd\s\sr0, [sp, #8]
-\s\ssub\s\ssp, r7, #0
-\s\sldmfd\s\ssp!, {r7, pc}
+ stmfd sp!, {r7, lr}
+ add r7, sp, #0
+ sub sp, sp, #16
+ add ip, sp, #8
+ str ip, [sp, #0]
+ bl ASM_PFX(__udivmoddi4)
+ ldrd r0, [sp, #8]
+ sub sp, r7, #0
+ ldmfd sp!, {r7, pc}
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.S b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.S
index 9506eedb38..9d0f17e6e9 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.S
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.S
@@ -12,17 +12,17 @@
#
#------------------------------------------------------------------------------
-\s\s.text
-\s\s.align 2
-\s\sGCC_ASM_EXPORT(__umodsi3)
-\s\s
+ .text
+ .align 2
+ GCC_ASM_EXPORT(__umodsi3)
+
ASM_PFX(__umodsi3):
-\s\sstmfd\s\ssp!, {r4, r5, r7, lr}
-\s\sadd\s\sr7, sp, #8
-\s\smov\s\sr5, r0
-\s\smov\s\sr4, r1
-\s\sbl \s\sASM_PFX(__udivsi3)
-\s\smul\s\sr0, r4, r0
-\s\srsb\s\sr0, r0, r5
-\s\sldmfd\s\ssp!, {r4, r5, r7, pc}
+ stmfd sp!, {r4, r5, r7, lr}
+ add r7, sp, #8
+ mov r5, r0
+ mov r4, r1
+ bl ASM_PFX(__udivsi3)
+ mul r0, r4, r0
+ rsb r0, r0, r5
+ ldmfd sp!, {r4, r5, r7, pc}
diff --git a/ArmPkg/Universal/MmcDxe/Mmc.h b/ArmPkg/Universal/MmcDxe/Mmc.h
index 412e0192bc..eced1d8e20 100644
--- a/ArmPkg/Universal/MmcDxe/Mmc.h
+++ b/ArmPkg/Universal/MmcDxe/Mmc.h
@@ -30,12 +30,12 @@
#define MMC_OCR_POWERUP 0x80000000
-#define MMC_CSD_GET_CCC(Response)\s\s\s\s(Response[1] >> 20)
-#define MMC_CSD_GET_TRANSPEED(Response)\s\s\s\s(Response[0] & 0xFF)
-#define MMC_CSD_GET_READBLLEN(Response)\s\s\s\s((Response[1] >> 16) & 0xF)
-#define MMC_CSD_GET_WRITEBLLEN(Response)\s\s((Response[3] >> 22) & 0xF)
-#define MMC_CSD_GET_FILEFORMAT(Response)\s\s((Response[3] >> 10) & 0x3)
-#define MMC_CSD_GET_FILEFORMATGRP(Response)\s\s((Response[3] >> 15) & 0x1)
+#define MMC_CSD_GET_CCC(Response) (Response[1] >> 20)
+#define MMC_CSD_GET_TRANSPEED(Response) (Response[0] & 0xFF)
+#define MMC_CSD_GET_READBLLEN(Response) ((Response[1] >> 16) & 0xF)
+#define MMC_CSD_GET_WRITEBLLEN(Response) ((Response[3] >> 22) & 0xF)
+#define MMC_CSD_GET_FILEFORMAT(Response) ((Response[3] >> 10) & 0x3)
+#define MMC_CSD_GET_FILEFORMATGRP(Response) ((Response[3] >> 15) & 0x1)
#define MMC_CSD_GET_DEVICESIZE(csd) (((Response[2] >> 30) & 0x3) | ((Response[1] & 0x3FF) << 2))
#define MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[2] >> 15) & 0x7)
diff --git a/UnixPkg/Include/Common/UnixInclude.h b/UnixPkg/Include/Common/UnixInclude.h
index 8cfa2a3deb..e37fc4265a 100644
--- a/UnixPkg/Include/Common/UnixInclude.h
+++ b/UnixPkg/Include/Common/UnixInclude.h
@@ -94,20 +94,20 @@ Abstract:
typedef struct {
- UINTN tv_sec; /* seconds */
- UINTN tv_nsec; /* and nanoseconds */
+ UINTN tv_sec; /* seconds */
+ UINTN tv_nsec; /* and nanoseconds */
} EFI_timespec;
typedef struct stat_fix { \
- dev_t st_dev; /* [XSI] ID of device containing file */
- mode_t st_mode; /* [XSI] Mode of file (see below) */
- nlink_t st_nlink; /* [XSI] Number of hard links */
- __darwin_ino64_t st_ino; /* [XSI] File serial number */
- uid_t st_uid; /* [XSI] User ID of the file */
- gid_t st_gid; /* [XSI] Group ID of the file */
- dev_t st_rdev; /* [XSI] Device ID */
+ dev_t st_dev; /* [XSI] ID of device containing file */
+ mode_t st_mode; /* [XSI] Mode of file (see below) */
+ nlink_t st_nlink; /* [XSI] Number of hard links */
+ __darwin_ino64_t st_ino; /* [XSI] File serial number */
+ uid_t st_uid; /* [XSI] User ID of the file */
+ gid_t st_gid; /* [XSI] Group ID of the file */
+ dev_t st_rdev; /* [XSI] Device ID */
// clang for X64 ABI follows Windows and a long is 32-bits
// this breaks system inlcude files so that is why we need
@@ -117,44 +117,44 @@ typedef struct stat_fix { \
EFI_timespec st_ctimespec;
EFI_timespec st_birthtimespec;
- off_t st_size; /* [XSI] file size, in bytes */
- blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
- blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
- __uint32_t st_flags; /* user defined flags for file */
- __uint32_t st_gen; /* file generation number */
- __int32_t st_lspare; /* RESERVED: DO NOT USE! */
- __int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
+ off_t st_size; /* [XSI] file size, in bytes */
+ blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
+ blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
+ __uint32_t st_flags; /* user defined flags for file */
+ __uint32_t st_gen; /* file generation number */
+ __int32_t st_lspare; /* RESERVED: DO NOT USE! */
+ __int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
} STAT_FIX;
#else /* !__DARWIN_64_BIT_INO_T */
typedef struct stat_fix {
- dev_t st_dev; /* [XSI] ID of device containing file */
- ino_t st_ino; /* [XSI] File serial number */
- mode_t st_mode; /* [XSI] Mode of file (see below) */
- nlink_t st_nlink; /* [XSI] Number of hard links */
- uid_t st_uid; /* [XSI] User ID of the file */
- gid_t st_gid; /* [XSI] Group ID of the file */
- dev_t st_rdev; /* [XSI] Device ID */
+ dev_t st_dev; /* [XSI] ID of device containing file */
+ ino_t st_ino; /* [XSI] File serial number */
+ mode_t st_mode; /* [XSI] Mode of file (see below) */
+ nlink_t st_nlink; /* [XSI] Number of hard links */
+ uid_t st_uid; /* [XSI] User ID of the file */
+ gid_t st_gid; /* [XSI] Group ID of the file */
+ dev_t st_rdev; /* [XSI] Device ID */
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
- struct timespec st_atimespec; /* time of last access */
- struct timespec st_mtimespec; /* time of last data modification */
- struct timespec st_ctimespec; /* time of last status change */
+ struct timespec st_atimespec; /* time of last access */
+ struct timespec st_mtimespec; /* time of last data modification */
+ struct timespec st_ctimespec; /* time of last status change */
#else
- time_t st_atime; /* [XSI] Time of last access */
- long st_atimensec; /* nsec of last access */
- time_t st_mtime; /* [XSI] Last data modification time */
- long st_mtimensec; /* last data modification nsec */
- time_t st_ctime; /* [XSI] Time of last status change */
- long st_ctimensec; /* nsec of last status change */
+ time_t st_atime; /* [XSI] Time of last access */
+ long st_atimensec; /* nsec of last access */
+ time_t st_mtime; /* [XSI] Last data modification time */
+ long st_mtimensec; /* last data modification nsec */
+ time_t st_ctime; /* [XSI] Time of last status change */
+ long st_ctimensec; /* nsec of last status change */
#endif
- off_t st_size; /* [XSI] file size, in bytes */
- blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
- blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
- __uint32_t st_flags; /* user defined flags for file */
- __uint32_t st_gen; /* file generation number */
- __int32_t st_lspare; /* RESERVED: DO NOT USE! */
- __int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
+ off_t st_size; /* [XSI] file size, in bytes */
+ blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
+ blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
+ __uint32_t st_flags; /* user defined flags for file */
+ __uint32_t st_gen; /* file generation number */
+ __int32_t st_lspare; /* RESERVED: DO NOT USE! */
+ __int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
} STAT_FIX;
#endif
diff --git a/UnixPkg/Include/Protocol/UnixThunk.h b/UnixPkg/Include/Protocol/UnixThunk.h
index 85ac5f9086..476dcc659f 100644
--- a/UnixPkg/Include/Protocol/UnixThunk.h
+++ b/UnixPkg/Include/Protocol/UnixThunk.h
@@ -192,7 +192,7 @@ struct _EFI_UNIX_UGA_IO_PROTOCOL;
typedef
EFI_STATUS
(EFIAPI *UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
- CONST CHAR16 *Title);
+ CONST CHAR16 *Title);
typedef
int
@@ -229,7 +229,7 @@ int
typedef
int
(EFIAPI *UnixTcsetattr) (int __fd, int __optional_actions,
- __const struct termios *__termios_p);
+ __const struct termios *__termios_p);
//
@@ -292,13 +292,13 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
UINT64 Signature;
UnixSleep Sleep;
- UnixExit Exit;
+ UnixExit Exit;
UnixSetTimer SetTimer;
- UnixGetLocalTime GetLocalTime;
+ UnixGetLocalTime GetLocalTime;
UnixGmTime GmTime;
UnixGetTimeZone GetTimeZone;
UnixGetDayLight GetDayLight;
- UnixPoll Poll;
+ UnixPoll Poll;
UnixRead Read;
UnixWrite Write;
UnixGetenv Getenv;
@@ -322,7 +322,7 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
UnixChmod Chmod;
UnixUTime UTime;
UnixTcflush Tcflush;
- UnixUgaCreate UgaCreate;
+ UnixUgaCreate UgaCreate;
UnixPerror Perror;
UnixIoCtl IoCtl;
UnixFcntl Fcntl;
diff --git a/UnixPkg/Include/Protocol/UnixUgaIo.h b/UnixPkg/Include/Protocol/UnixUgaIo.h
index 5200e4c4e0..1327e6a096 100644
--- a/UnixPkg/Include/Protocol/UnixUgaIo.h
+++ b/UnixPkg/Include/Protocol/UnixUgaIo.h
@@ -81,23 +81,23 @@ EFI_STATUS
typedef struct {
- UINTN SourceX;
- UINTN SourceY;
- UINTN DestinationX;
- UINTN DestinationY;
- UINTN Width;
- UINTN Height;
- UINTN Delta;
+ UINTN SourceX;
+ UINTN SourceY;
+ UINTN DestinationX;
+ UINTN DestinationY;
+ UINTN Width;
+ UINTN Height;
+ UINTN Delta;
} UGA_BLT_ARGS;
typedef
EFI_STATUS
(EFIAPI *UGABlt)(
IN EFI_UNIX_UGA_IO_PROTOCOL *Uga,
- IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
- IN EFI_UGA_BLT_OPERATION BltOperation,
- IN UGA_BLT_ARGS *Args
- );
+ IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
+ IN EFI_UGA_BLT_OPERATION BltOperation,
+ IN UGA_BLT_ARGS *Args
+ );
typedef
BOOLEAN
diff --git a/UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c b/UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
index 00bedfc65b..d9a7b3e981 100644
--- a/UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
+++ b/UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
@@ -134,7 +134,7 @@ OemHookStatusCodeReport (
mStdOut,
Buffer,
CharCount
- );
+ );
return EFI_SUCCESS;
diff --git a/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c b/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c
index 68bd7f84e2..f98b30bed8 100644
--- a/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c
+++ b/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c
@@ -56,7 +56,7 @@ DxeUnixPeCoffLibExtraActionConstructor (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_HOB_GUID_TYPE *GuidHob;
+ EFI_HOB_GUID_TYPE *GuidHob;
//
// Retrieve UnixThunkProtocol from GUID'ed HOB
diff --git a/UnixPkg/Library/EdkUnixPeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c b/UnixPkg/Library/EdkUnixPeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
index 40715ec8f0..3a8f304020 100644
--- a/UnixPkg/Library/EdkUnixPeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
+++ b/UnixPkg/Library/EdkUnixPeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
@@ -55,7 +55,7 @@ Returns:
--*/
{
- PEI_UNIX_THUNK_PPI *UnixThunkPpi;
+ PEI_UNIX_THUNK_PPI *UnixThunkPpi;
EFI_STATUS Status;
EFI_UNIX_THUNK_PROTOCOL *Unix;
diff --git a/UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c b/UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
index 2945b08b59..b42101c24f 100644
--- a/UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
+++ b/UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
@@ -142,7 +142,7 @@ OemHookStatusCodeReport (
mStdOut,
Buffer,
CharCount
- );
+ );
return EFI_SUCCESS;
diff --git a/UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c b/UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c
index e3a3c7ca3e..98b5b9e116 100644
--- a/UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c
+++ b/UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c
@@ -48,7 +48,7 @@ EFIAPI
UnixPeCoffGetUnixThunkStucture (
)
{
- PEI_UNIX_THUNK_PPI *UnixThunkPpi;
+ PEI_UNIX_THUNK_PPI *UnixThunkPpi;
EFI_STATUS Status;
diff --git a/UnixPkg/Sec/Gasket.c b/UnixPkg/Sec/Gasket.c
index 3c7ef80097..04c65f1a8d 100644
--- a/UnixPkg/Sec/Gasket.c
+++ b/UnixPkg/Sec/Gasket.c
@@ -398,7 +398,7 @@ GasketUgaBlt (
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
IN EFI_UGA_BLT_OPERATION BltOperation,
- IN UGA_BLT_ARGS *Args
+ IN UGA_BLT_ARGS *Args
)
{
return GasketUintnUintnUintnUintn (UgaBlt, (UINTN)UgaIo, (UINTN)BltBuffer, (UINTN)BltOperation, (UINTN)Args);
diff --git a/UnixPkg/Sec/Ia32/Gasket.S b/UnixPkg/Sec/Ia32/Gasket.S
index 440e73d6df..5f762a3782 100644
--- a/UnixPkg/Sec/Ia32/Gasket.S
+++ b/UnixPkg/Sec/Ia32/Gasket.S
@@ -264,21 +264,21 @@ _GasketUintnUint16:
.globl _ReverseGasketUint64
_ReverseGasketUint64:
- pushl %ebp
- movl %esp, %ebp
- subl $40, %esp
- movl 12(%ebp), %eax
- movl %eax, -16(%ebp)
- movl 16(%ebp), %eax
- movl %eax, -12(%ebp)
- movl -16(%ebp), %eax
- movl -12(%ebp), %edx
- movl %eax, (%esp)
- movl %edx, 4(%esp)
- movl 8(%ebp), %eax
- call *%eax
- leave
- ret
+ pushl %ebp
+ movl %esp, %ebp
+ subl $40, %esp
+ movl 12(%ebp), %eax
+ movl %eax, -16(%ebp)
+ movl 16(%ebp), %eax
+ movl %eax, -12(%ebp)
+ movl -16(%ebp), %eax
+ movl -12(%ebp), %edx
+ movl %eax, (%esp)
+ movl %edx, 4(%esp)
+ movl 8(%ebp), %eax
+ call *%eax
+ leave
+ ret
.globl _ReverseGasketUint64Uint64
@@ -314,31 +314,31 @@ _ReverseGasketUint64Uint64:
.globl _GasketSecUnixPeiLoadFile
_GasketSecUnixPeiLoadFile:
- jmp _SecUnixPeiLoadFile
+ jmp _SecUnixPeiLoadFile
.globl _GasketSecUnixPeiAutoScan
_GasketSecUnixPeiAutoScan:
- jmp _SecUnixPeiAutoScan
+ jmp _SecUnixPeiAutoScan
.globl _GasketSecUnixUnixThunkAddress
_GasketSecUnixUnixThunkAddress:
- jmp _SecUnixUnixThunkAddress
+ jmp _SecUnixUnixThunkAddress
.globl _GasketSecPeiReportStatusCode
_GasketSecPeiReportStatusCode:
- jmp _SecPeiReportStatusCode
+ jmp _SecPeiReportStatusCode
.globl _GasketSecUnixFdAddress
_GasketSecUnixFdAddress:
- jmp _SecUnixFdAddress
+ jmp _SecUnixFdAddress
.globl _GasketSecTemporaryRamSupport
_GasketSecTemporaryRamSupport:
- jmp _SecTemporaryRamSupport
+ jmp _SecTemporaryRamSupport
#endif
diff --git a/UnixPkg/Sec/SecMain.c b/UnixPkg/Sec/SecMain.c
index dc4b14c00f..a82ec1cce1 100644
--- a/UnixPkg/Sec/SecMain.c
+++ b/UnixPkg/Sec/SecMain.c
@@ -279,17 +279,17 @@ Returns:
// Open the FD and remmeber where it got mapped into our processes address space
//
Status = MapFile (
- FileName,
- &gFdInfo[Index].Address,
- &gFdInfo[Index].Size
- );
+ FileName,
+ &gFdInfo[Index].Address,
+ &gFdInfo[Index].Size
+ );
if (EFI_ERROR (Status)) {
printf ("ERROR : Can not open Firmware Device File %s (%x). Exiting.\n", FileName, (unsigned int)Status);
exit (1);
}
printf (" FD loaded from %s at 0x%08lx",
- FileName, (unsigned long)gFdInfo[Index].Address);
+ FileName, (unsigned long)gFdInfo[Index].Address);
if (PeiCoreFile == NULL) {
//
@@ -419,10 +419,10 @@ Returns:
/* Read entry address. */
lseek (fd, FileSize - 0x20, SEEK_SET);
if (read (fd, &EntryAddress, 4) != 4)
- {
- close (fd);
- return EFI_DEVICE_ERROR;
- }
+ {
+ close (fd);
+ return EFI_DEVICE_ERROR;
+ }
}
#endif
@@ -664,8 +664,8 @@ Returns:
*MemoryBase = 0;
res = MapMemory(0, gSystemMemory[Index].Size,
- PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS);
+ PROT_READ | PROT_WRITE | PROT_EXEC,
+ MAP_PRIVATE | MAP_ANONYMOUS);
if (res == MAP_FAILED)
return EFI_DEVICE_ERROR;
*MemorySize = gSystemMemory[Index].Size;
diff --git a/UnixPkg/Sec/UgaX11.c b/UnixPkg/Sec/UgaX11.c
index 0a9b0a314c..5250fb3c61 100644
--- a/UnixPkg/Sec/UgaX11.c
+++ b/UnixPkg/Sec/UgaX11.c
@@ -59,7 +59,7 @@ typedef struct {
EFI_UNIX_UGA_IO_PROTOCOL UgaIo;
Display *display;
- int screen; /* values for window_size in main */
+ int screen; /* values for window_size in main */
Window win;
GC gc;
Visual *visual;
@@ -393,15 +393,15 @@ handleMouseMoved(UGA_IO_PRIVATE *drv, XEvent *ev)
if ( ev->xmotion.x != drv->previous_x )
{
drv->pointer_state.RelativeMovementX += ( ev->xmotion.x - drv->previous_x );
- drv->previous_x = ev->xmotion.x;
- drv->pointer_state_changed = 1;
+ drv->previous_x = ev->xmotion.x;
+ drv->pointer_state_changed = 1;
}
if ( ev->xmotion.y != drv->previous_y )
{
drv->pointer_state.RelativeMovementY += ( ev->xmotion.y - drv->previous_y );
drv->previous_y = ev->xmotion.y;
- drv->pointer_state_changed = 1;
+ drv->pointer_state_changed = 1;
}
drv->pointer_state.RelativeMovementZ = 0;
@@ -413,12 +413,12 @@ handleMouseDown(UGA_IO_PRIVATE *drv, XEvent *ev, BOOLEAN Pressed)
if ( ev->xbutton.button == Button1 )
{
drv->pointer_state_changed = ( drv->pointer_state.LeftButton != Pressed );
- drv->pointer_state.LeftButton = Pressed;
+ drv->pointer_state.LeftButton = Pressed;
}
if ( ev->xbutton.button == Button2 )
{
drv->pointer_state_changed = ( drv->pointer_state.RightButton != Pressed );
- drv->pointer_state.RightButton = Pressed;
+ drv->pointer_state.RightButton = Pressed;
}
}
@@ -460,10 +460,10 @@ HandleEvent(UGA_IO_PRIVATE *drv, XEvent *ev)
break;
case ButtonPress:
handleMouseDown(drv, ev, TRUE);
- break;
+ break;
case ButtonRelease:
handleMouseDown(drv, ev, FALSE);
- break;
+ break;
#if 0
case DestroyNotify:
XCloseDisplay (drv->display);
diff --git a/UnixPkg/Sec/X64/MangleGasket.S b/UnixPkg/Sec/X64/MangleGasket.S
index 532585b608..d457f6be12 100644
--- a/UnixPkg/Sec/X64/MangleGasket.S
+++ b/UnixPkg/Sec/X64/MangleGasket.S
@@ -9,7 +9,7 @@
# to get the correct binding (does not work from assembly). So we have 4 functions
# that do an indirect call, while the others call POSIX APIs directly
#
-# movq _gUnixRmDir@GOTPCREL(%rip), %rax
+# movq _gUnixRmDir@GOTPCREL(%rip), %rax
#
#
# UNIX Arg passing: RCX, RDX, R8, R9
@@ -34,7 +34,7 @@
// EFI ABI code will sub 40 (0x28) from %rsp before calling a function
// This is the 32 (0x20) byte to spill registers and 8 bytes to align stack on 16 byte boundry.
//
- .text
+ .text
// 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundry
// Any call with 0 - 4 arguments allocates 40 bytes on the stack.
@@ -47,154 +47,154 @@
- .text
+ .text
ASM_GLOBAL ASM_PFX(Gasketrmdir)
ASM_PFX(Gasketrmdir):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
- pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
- pushq %rdi
+ pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+ pushq %rdi
movq %rcx, %rdi // Swizzle args
- movq ASM_PFX(gUnixRmDir)@GOTPCREL(%rip), %rax // Get function name mangled by C
- movq (%rax), %rax
- call *%rax
+ movq ASM_PFX(gUnixRmDir)@GOTPCREL(%rip), %rax // Get function name mangled by C
+ movq (%rax), %rax
+ call *%rax
- popq %rdi // restore state
- popq %rsi
- popq %rbp
- ret
+ popq %rdi // restore state
+ popq %rsi
+ popq %rbp
+ ret
ASM_GLOBAL ASM_PFX(Gasketopendir)
ASM_PFX(Gasketopendir):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
- pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
- pushq %rdi
+ pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+ pushq %rdi
movq %rcx, %rdi // Swizzle args
- movq ASM_PFX(gUnixOpenDir)@GOTPCREL(%rip), %rax // Get function name mangled by C
- movq (%rax), %rax
- call *%rax
-
- popq %rdi // restore state
- popq %rsi
- popq %rbp
+ movq ASM_PFX(gUnixOpenDir)@GOTPCREL(%rip), %rax // Get function name mangled by C
+ movq (%rax), %rax
+ call *%rax
+
+ popq %rdi // restore state
+ popq %rsi
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketstat)
ASM_PFX(Gasketstat):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
- pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
- pushq %rdi
+ pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+ pushq %rdi
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- movq ASM_PFX(gUnixStat)@GOTPCREL(%rip), %rax // Get function name mangled by C
- movq (%rax), %rax
- call *%rax
-
+ movq ASM_PFX(gUnixStat)@GOTPCREL(%rip), %rax // Get function name mangled by C
+ movq (%rax), %rax
+ call *%rax
+
- popq %rdi // restore state
- popq %rsi
- popq %rbp
+ popq %rdi // restore state
+ popq %rsi
+ popq %rbp
ret
-
-
+
+
ASM_GLOBAL ASM_PFX(Gasketstatfs)
ASM_PFX(Gasketstatfs):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
- pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
- pushq %rdi
+ pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+ pushq %rdi
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- movq ASM_PFX(gUnixStatFs)@GOTPCREL(%rip), %rax // Get function name mangled by C
- movq (%rax), %rax
- call *%rax
-
- popq %rdi // restore state
- popq %rsi
- popq %rbp
+ movq ASM_PFX(gUnixStatFs)@GOTPCREL(%rip), %rax // Get function name mangled by C
+ movq (%rax), %rax
+ call *%rax
+
+ popq %rdi // restore state
+ popq %rsi
+ popq %rbp
ret
-
+
ASM_GLOBAL ASM_PFX(Gasketrewinddir)
ASM_PFX(Gasketrewinddir):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
- pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
- pushq %rdi
+ pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+ pushq %rdi
movq %rcx, %rdi // Swizzle args
- movq ASM_PFX(gUnixRewinddir)@GOTPCREL(%rip), %rax // Get function name mangled by C
- movq (%rax), %rax
- call *%rax
-
- popq %rdi // restore state
- popq %rsi
- popq %rbp
+ movq ASM_PFX(gUnixRewinddir)@GOTPCREL(%rip), %rax // Get function name mangled by C
+ movq (%rax), %rax
+ call *%rax
+
+ popq %rdi // restore state
+ popq %rsi
+ popq %rbp
ret
-
+
ASM_GLOBAL ASM_PFX(Gasketreaddir)
ASM_PFX(Gasketreaddir):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
- pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
- pushq %rdi
+ pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+ pushq %rdi
movq %rcx, %rdi // Swizzle args
- movq ASM_PFX(gUnixReaddir)@GOTPCREL(%rip), %rax // Get function name mangled by C
- movq (%rax), %rax
- call *%rax
-
- popq %rdi // restore state
- popq %rsi
- popq %rbp
+ movq ASM_PFX(gUnixReaddir)@GOTPCREL(%rip), %rax // Get function name mangled by C
+ movq (%rax), %rax
+ call *%rax
+
+ popq %rdi // restore state
+ popq %rsi
+ popq %rbp
ret
-
+
ASM_GLOBAL ASM_PFX(GasketmsSleep)
ASM_PFX(GasketmsSleep):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
- pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
- pushq %rdi
+ pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+ pushq %rdi
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(msSleep)
-
- popq %rdi // restore state
- popq %rsi
- popq %rbp
+ call ASM_PFX(msSleep)
+
+ popq %rdi // restore state
+ popq %rsi
+ popq %rbp
ret
-
-
+
+
ASM_GLOBAL ASM_PFX(Gasketexit)
ASM_PFX(Gasketexit):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(exit) // Less to do as we will never return to EFI ABI world
+ call ASM_PFX(exit) // Less to do as we will never return to EFI ABI world
LDEAD_LOOP:
jmp LDEAD_LOOP // _exit should never return
@@ -202,26 +202,26 @@ LDEAD_LOOP:
ASM_GLOBAL ASM_PFX(GasketSetTimer)
ASM_PFX(GasketSetTimer):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
- pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
- pushq %rdi
+ pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+ pushq %rdi
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(SetTimer)
-
- popq %rdi // restore state
- popq %rsi
- popq %rbp
+ call ASM_PFX(SetTimer)
+
+ popq %rdi // restore state
+ popq %rsi
+ popq %rbp
ret
-
+
ASM_GLOBAL ASM_PFX(GasketGetLocalTime)
ASM_PFX(GasketGetLocalTime):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -229,18 +229,18 @@ ASM_PFX(GasketGetLocalTime):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(GetLocalTime)
+ call ASM_PFX(GetLocalTime)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketgmtime)
ASM_PFX(Gasketgmtime):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -248,50 +248,50 @@ ASM_PFX(Gasketgmtime):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(localtime)
+ call ASM_PFX(localtime)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketGetTimeZone)
ASM_PFX(GasketGetTimeZone):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
pushq %rdi
- call ASM_PFX(GetTimeZone)
+ call ASM_PFX(GetTimeZone)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketGetDayLight)
ASM_PFX(GasketGetDayLight):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
pushq %rdi
- call ASM_PFX(GetDayLight)
+ call ASM_PFX(GetDayLight)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketpoll)
ASM_PFX(Gasketpoll):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -301,18 +301,18 @@ ASM_PFX(Gasketpoll):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(poll)
+ call ASM_PFX(poll)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketread)
ASM_PFX(Gasketread):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -322,17 +322,17 @@ ASM_PFX(Gasketread):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(read)
+ call ASM_PFX(read)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketwrite)
ASM_PFX(Gasketwrite):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -342,17 +342,17 @@ ASM_PFX(Gasketwrite):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(write)
+ call ASM_PFX(write)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketgetenv)
ASM_PFX(Gasketgetenv):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -360,17 +360,17 @@ ASM_PFX(Gasketgetenv):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(getenv)
+ call ASM_PFX(getenv)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketopen)
ASM_PFX(Gasketopen):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -380,17 +380,17 @@ ASM_PFX(Gasketopen):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(open)
+ call ASM_PFX(open)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketlseek)
ASM_PFX(Gasketlseek):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -400,17 +400,17 @@ ASM_PFX(Gasketlseek):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(lseek)
+ call ASM_PFX(lseek)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketftruncate)
ASM_PFX(Gasketftruncate):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -420,17 +420,17 @@ ASM_PFX(Gasketftruncate):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(ftruncate)
+ call ASM_PFX(ftruncate)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketclose)
ASM_PFX(Gasketclose):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -438,18 +438,18 @@ ASM_PFX(Gasketclose):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(close)
+ call ASM_PFX(close)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketmkdir)
ASM_PFX(Gasketmkdir):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -458,17 +458,17 @@ ASM_PFX(Gasketmkdir):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(mkdir)
+ call ASM_PFX(mkdir)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketunlink)
ASM_PFX(Gasketunlink):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -476,32 +476,32 @@ ASM_PFX(Gasketunlink):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(unlink)
+ call ASM_PFX(unlink)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketGetErrno)
ASM_PFX(GasketGetErrno):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
pushq %rdi
- call ASM_PFX(GetErrno)
+ call ASM_PFX(GetErrno)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketclosedir)
ASM_PFX(Gasketclosedir):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -509,17 +509,17 @@ ASM_PFX(Gasketclosedir):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(closedir)
+ call ASM_PFX(closedir)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketrename)
ASM_PFX(Gasketrename):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -528,17 +528,17 @@ ASM_PFX(Gasketrename):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(rename)
+ call ASM_PFX(rename)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketmktime)
ASM_PFX(Gasketmktime):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -547,17 +547,17 @@ ASM_PFX(Gasketmktime):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(mktime)
+ call ASM_PFX(mktime)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketfsync)
ASM_PFX(Gasketfsync):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -566,17 +566,17 @@ ASM_PFX(Gasketfsync):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(fsync)
+ call ASM_PFX(fsync)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketchmod)
ASM_PFX(Gasketchmod):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -585,17 +585,17 @@ ASM_PFX(Gasketchmod):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(chmod)
+ call ASM_PFX(chmod)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketutime)
ASM_PFX(Gasketutime):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -604,17 +604,17 @@ ASM_PFX(Gasketutime):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(utime)
+ call ASM_PFX(utime)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gaskettcflush)
ASM_PFX(Gaskettcflush):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -623,17 +623,17 @@ ASM_PFX(Gaskettcflush):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(tcflush)
+ call ASM_PFX(tcflush)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUgaCreate)
ASM_PFX(GasketUgaCreate):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -642,17 +642,17 @@ ASM_PFX(GasketUgaCreate):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(UgaCreate)
+ call ASM_PFX(UgaCreate)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketperror)
ASM_PFX(Gasketperror):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -661,17 +661,17 @@ ASM_PFX(Gasketperror):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(perror)
+ call ASM_PFX(perror)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketioctl)
ASM_PFX(Gasketioctl):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -681,17 +681,17 @@ ASM_PFX(Gasketioctl):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(UnixIoCtl1)
+ call ASM_PFX(UnixIoCtl1)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketfcntl)
ASM_PFX(Gasketfcntl):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -701,18 +701,18 @@ ASM_PFX(Gasketfcntl):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(UnixFcntl1)
+ call ASM_PFX(UnixFcntl1)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketcfsetispeed)
ASM_PFX(Gasketcfsetispeed):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -721,18 +721,18 @@ ASM_PFX(Gasketcfsetispeed):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(cfsetispeed)
+ call ASM_PFX(cfsetispeed)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketcfsetospeed)
ASM_PFX(Gasketcfsetospeed):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -741,17 +741,17 @@ ASM_PFX(Gasketcfsetospeed):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(cfsetospeed)
+ call ASM_PFX(cfsetospeed)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gaskettcgetattr)
ASM_PFX(Gaskettcgetattr):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -761,17 +761,17 @@ ASM_PFX(Gaskettcgetattr):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(tcgetattr)
+ call ASM_PFX(tcgetattr)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gaskettcsetattr)
ASM_PFX(Gaskettcsetattr):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -781,17 +781,17 @@ ASM_PFX(Gaskettcsetattr):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(tcsetattr)
+ call ASM_PFX(tcsetattr)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUnixPeCoffGetEntryPoint)
ASM_PFX(GasketUnixPeCoffGetEntryPoint):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -800,18 +800,18 @@ ASM_PFX(GasketUnixPeCoffGetEntryPoint):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(SecPeCoffGetEntryPoint)
+ call ASM_PFX(SecPeCoffGetEntryPoint)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction)
ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -819,17 +819,17 @@ ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(SecPeCoffRelocateImageExtraAction)
+ call ASM_PFX(SecPeCoffRelocateImageExtraAction)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction)
ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -837,11 +837,11 @@ ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(SecPeCoffLoaderUnloadImageExtraAction)
+ call ASM_PFX(SecPeCoffLoaderUnloadImageExtraAction)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
@@ -850,7 +850,7 @@ ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction):
ASM_GLOBAL ASM_PFX(Gasketsocket)
ASM_PFX(Gasketsocket):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -865,14 +865,14 @@ ASM_PFX(Gasketsocket):
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(Gasketgetifaddrs)
ASM_PFX(Gasketgetifaddrs):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -883,16 +883,16 @@ ASM_PFX(Gasketgetifaddrs):
call ASM_PFX(getifaddrs)
- popq %rbp
- popq %rsi
- popq %rbp
+ popq %rbp
+ popq %rsi
+ popq %rbp
ret
ASM_GLOBAL _Gasketfreeifaddrs
_Gasketfreeifaddrs:
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -905,7 +905,7 @@ _Gasketfreeifaddrs:
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
@@ -914,7 +914,7 @@ _Gasketfreeifaddrs:
ASM_GLOBAL ASM_PFX(GasketUgaClose)
ASM_PFX(GasketUgaClose):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -922,11 +922,11 @@ ASM_PFX(GasketUgaClose):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(UgaClose)
+ call ASM_PFX(UgaClose)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
@@ -934,7 +934,7 @@ ASM_PFX(GasketUgaClose):
ASM_GLOBAL ASM_PFX(GasketUgaSize)
ASM_PFX(GasketUgaSize):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -944,17 +944,17 @@ ASM_PFX(GasketUgaSize):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(UgaSize)
+ call ASM_PFX(UgaSize)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUgaCheckKey)
ASM_PFX(GasketUgaCheckKey):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -962,17 +962,17 @@ ASM_PFX(GasketUgaCheckKey):
movq %rcx, %rdi // Swizzle args
- call ASM_PFX(UgaCheckKey)
+ call ASM_PFX(UgaCheckKey)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUgaGetKey)
ASM_PFX(GasketUgaGetKey):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -981,16 +981,16 @@ ASM_PFX(GasketUgaGetKey):
movq %rcx, %rdi // Swizzle args
movq %rdx, %rsi
- call ASM_PFX(UgaGetKey)
+ call ASM_PFX(UgaGetKey)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUgaKeySetState)
ASM_PFX(GasketUgaKeySetState):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1003,13 +1003,13 @@ ASM_PFX(GasketUgaKeySetState):
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUgaRegisterKeyNotify)
ASM_PFX(GasketUgaRegisterKeyNotify):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1023,7 +1023,7 @@ ASM_PFX(GasketUgaRegisterKeyNotify):
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
@@ -1032,7 +1032,7 @@ ASM_PFX(GasketUgaRegisterKeyNotify):
ASM_GLOBAL ASM_PFX(GasketUgaBlt)
ASM_PFX(GasketUgaBlt):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1043,17 +1043,17 @@ ASM_PFX(GasketUgaBlt):
movq %r8, %rdx
movq %r9, %rcx
- call ASM_PFX(UgaBlt)
+ call ASM_PFX(UgaBlt)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUgaCheckPointer)
ASM_PFX(GasketUgaCheckPointer):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1065,13 +1065,13 @@ ASM_PFX(GasketUgaCheckPointer):
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUgaGetPointerState)
ASM_PFX(GasketUgaGetPointerState):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1084,13 +1084,13 @@ ASM_PFX(GasketUgaGetPointerState):
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUnixEnableInterrupt)
ASM_PFX(GasketUnixEnableInterrupt):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1100,12 +1100,12 @@ ASM_PFX(GasketUnixEnableInterrupt):
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketUnixDisableInterrupt)
ASM_PFX(GasketUnixDisableInterrupt):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1115,7 +1115,7 @@ ASM_PFX(GasketUnixDisableInterrupt):
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
//
@@ -1128,7 +1128,7 @@ ASM_PFX(GasketUnixDisableInterrupt):
// );
ASM_GLOBAL ASM_PFX(ReverseGasketUint64)
ASM_PFX(ReverseGasketUint64):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
movq %rdi, %rax // Swizzle args
@@ -1138,7 +1138,7 @@ ASM_PFX(ReverseGasketUint64):
call *%rax
addq $32, %rsp
- popq %rbp
+ popq %rbp
ret
//
@@ -1152,7 +1152,7 @@ ASM_PFX(ReverseGasketUint64):
// );
ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64)
ASM_PFX(ReverseGasketUint64Uint64):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
movq %rdi, %rax // Swizzle args
@@ -1162,7 +1162,7 @@ ASM_PFX(ReverseGasketUint64Uint64):
call *%rax
addq $32, %rsp
- popq %rbp
+ popq %rbp
ret
@@ -1170,7 +1170,7 @@ ASM_PFX(ReverseGasketUint64Uint64):
ASM_GLOBAL ASM_PFX(GasketSecUnixPeiLoadFile)
ASM_PFX(GasketSecUnixPeiLoadFile):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1181,7 +1181,7 @@ ASM_PFX(GasketSecUnixPeiLoadFile):
movq %r8, %rdx
movq %r9, %rcx
- call ASM_PFX(SecUnixPeiLoadFile)
+ call ASM_PFX(SecUnixPeiLoadFile)
popq %rdi // restore state
popq %rsi
@@ -1192,7 +1192,7 @@ ASM_PFX(GasketSecUnixPeiLoadFile):
ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
ASM_PFX(GasketSecUnixPeiAutoScan):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1202,33 +1202,33 @@ ASM_PFX(GasketSecUnixPeiAutoScan):
movq %rdx, %rsi
movq %r8, %rdx
- call ASM_PFX(SecUnixPeiAutoScan)
+ call ASM_PFX(SecUnixPeiAutoScan)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketSecUnixUnixThunkAddress)
ASM_PFX(GasketSecUnixUnixThunkAddress):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
pushq %rdi
- call ASM_PFX(SecUnixUnixThunkAddress)
+ call ASM_PFX(SecUnixUnixThunkAddress)
- popq %rdi
- popq %rsi
- popq %rbp
+ popq %rdi
+ popq %rsi
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketSecPeiReportStatusCode)
ASM_PFX(GasketSecPeiReportStatusCode):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1241,17 +1241,17 @@ ASM_PFX(GasketSecPeiReportStatusCode):
movq $0, %r8 // BugBug: This should come from the stack
movq $0, %r9 // But we can cheat since they are optional for bringup....
- call ASM_PFX(SecPeiReportStatusCode)
+ call ASM_PFX(SecPeiReportStatusCode)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress)
ASM_PFX(GasketSecUnixFdAddress):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1262,11 +1262,11 @@ ASM_PFX(GasketSecUnixFdAddress):
movq %r8, %rdx
movq %r9, %rcx
- call ASM_PFX(SecUnixFdAddress)
+ call ASM_PFX(SecUnixFdAddress)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
@@ -1274,7 +1274,7 @@ ASM_PFX(GasketSecUnixFdAddress):
ASM_GLOBAL ASM_PFX(GasketSecTemporaryRamSupport)
ASM_PFX(GasketSecTemporaryRamSupport):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
@@ -1285,11 +1285,11 @@ ASM_PFX(GasketSecTemporaryRamSupport):
movq %r8, %rdx
movq %r9, %rcx
- call ASM_PFX(SecTemporaryRamSupport)
+ call ASM_PFX(SecTemporaryRamSupport)
popq %rdi // restore state
popq %rsi
- popq %rbp
+ popq %rbp
ret
diff --git a/UnixPkg/Sec/X64/SwitchStack.S b/UnixPkg/Sec/X64/SwitchStack.S
index e964e4d178..e9adefce39 100644
--- a/UnixPkg/Sec/X64/SwitchStack.S
+++ b/UnixPkg/Sec/X64/SwitchStack.S
@@ -39,8 +39,8 @@
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(PeiSwitchStacks)
ASM_PFX(PeiSwitchStacks):
- pushq %rbp // stack frame is for the debugger
- movq %rsp, %rbp
+ pushq %rbp // stack frame is for the debugger
+ movq %rsp, %rbp
movq %r8, %rsp
@@ -52,7 +52,7 @@ ASM_PFX(PeiSwitchStacks):
# Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,
# in case the callee wishes to spill them.
#
- subq $32, %rsp // 32-byte shadow space plus alignment pad
+ subq $32, %rsp // 32-byte shadow space plus alignment pad
call *%rax
@@ -76,8 +76,8 @@ ASM_PFX(PeiSwitchStacks):
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(UnixPeiSwitchStacks)
ASM_PFX(UnixPeiSwitchStacks):
- pushq %rbp // stack frame is for the debugger
- movq %rsp, %rbp
+ pushq %rbp // stack frame is for the debugger
+ movq %rsp, %rbp
mov %rdi, %rax
mov %rsi, %rdi
@@ -105,7 +105,7 @@ ASM_PFX(UnixPeiSwitchStacks):
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(SecSwitchStack)
ASM_PFX(SecSwitchStack):
- pushq %rbp // stack frame is for the debugger
+ pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
mov %rsp, %rax
diff --git a/UnixPkg/TimerDxe/Timer.c b/UnixPkg/TimerDxe/Timer.c
index 385db630db..5314d11ccd 100644
--- a/UnixPkg/TimerDxe/Timer.c
+++ b/UnixPkg/TimerDxe/Timer.c
@@ -227,7 +227,7 @@ Returns:
//
if (TimerPeriod == 0
|| ((TimerPeriod > TIMER_MINIMUM_VALUE)
- && (TimerPeriod < TIMER_MAXIMUM_VALUE))) {
+ && (TimerPeriod < TIMER_MAXIMUM_VALUE))) {
mTimerPeriodMs = DivU64x32 (TimerPeriod + 5000, 10000);
gUnix->SetTimer (mTimerPeriodMs, TimerCallback);
diff --git a/UnixPkg/UnixBlockIoDxe/DriverDiagnostics.c b/UnixPkg/UnixBlockIoDxe/DriverDiagnostics.c
index 0df0e3d967..69ba61dfb5 100644
--- a/UnixPkg/UnixBlockIoDxe/DriverDiagnostics.c
+++ b/UnixPkg/UnixBlockIoDxe/DriverDiagnostics.c
@@ -149,7 +149,7 @@ UnixBlockIoDriverDiagnosticsRunDiagnostics (
*ErrorType = &gEfiBlockIoProtocolGuid;
*BufferSize = 0x60;
gBS->AllocatePool (EfiBootServicesData, (UINTN) (*BufferSize),
- (void *)Buffer);
+ (void *)Buffer);
CopyMem (*Buffer, L"Unix Block I/O Driver Diagnostics Failed\n", *BufferSize);
return EFI_DEVICE_ERROR;
}
diff --git a/UnixPkg/UnixBlockIoDxe/UnixBlockIo.c b/UnixPkg/UnixBlockIoDxe/UnixBlockIo.c
index f61db9481b..2de6cc6282 100644
--- a/UnixPkg/UnixBlockIoDxe/UnixBlockIo.c
+++ b/UnixPkg/UnixBlockIoDxe/UnixBlockIo.c
@@ -410,7 +410,7 @@ Returns:
BOOLEAN WriteProtected;
UINTN NumberOfBlocks;
UINTN BlockSize;
- INTN i;
+ INTN i;
//
// Grab the protocols we need
diff --git a/UnixPkg/UnixBusDriverDxe/UnixBusDriver.c b/UnixPkg/UnixBusDriverDxe/UnixBusDriver.c
index 52618d73a0..e1ec083822 100644
--- a/UnixPkg/UnixBusDriverDxe/UnixBusDriver.c
+++ b/UnixPkg/UnixBusDriverDxe/UnixBusDriver.c
@@ -468,7 +468,7 @@ Returns:
UnixDevice->ControllerNameTable = NULL;
- // FIXME: check size
+ // FIXME: check size
StrCpy(ComponentName, UnixDevice->UnixIo.EnvString);
UnixDevice->DevicePath = UnixBusCreateDevicePath (
diff --git a/UnixPkg/UnixSerialIoDxe/UnixSerialIo.h b/UnixPkg/UnixSerialIoDxe/UnixSerialIo.h
index 484a07c482..704b54e234 100644
--- a/UnixPkg/UnixSerialIoDxe/UnixSerialIo.h
+++ b/UnixPkg/UnixSerialIoDxe/UnixSerialIo.h
@@ -191,10 +191,10 @@ extern EFI_COMPONENT_NAME_PROTOCOL gUnixSerialIoComponentName;
#define __MAX_BAUD B4000000
#endif
#ifndef CMSPAR
-#define CMSPAR 010000000000 /* mark or space (stick) parity */
+#define CMSPAR 010000000000 /* mark or space (stick) parity */
#endif
#ifndef FIONREAD
-#define FIONREAD 0x541B
+#define FIONREAD 0x541B
#endif
//
// Function Prototypes
diff --git a/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c b/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c
index 81065e7355..e697b99a38 100644
--- a/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c
+++ b/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c
@@ -350,9 +350,9 @@ Done:
if (Private != NULL) {
if (Private->VolumeLabel != NULL)
- gBS->FreePool (Private->VolumeLabel);
+ gBS->FreePool (Private->VolumeLabel);
if (Private->FilePath != NULL)
- gBS->FreePool (Private->FilePath);
+ gBS->FreePool (Private->FilePath);
FreeUnicodeStringTable (Private->ControllerNameTable);
gBS->FreePool (Private);
@@ -862,7 +862,7 @@ OpenRoot:
// Create a directory
//
if (NewPrivateFile->UnixThunk->MkDir (NewPrivateFile->FileName, 0777) != 0) {
- INTN LastError;
+ INTN LastError;
LastError = PrivateFile->UnixThunk->GetErrno ();
if (LastError != EEXIST) {
@@ -897,9 +897,9 @@ OpenRoot:
0666);
if (NewPrivateFile->fd < 0) {
if (PrivateFile->UnixThunk->GetErrno () == ENOENT) {
- Status = EFI_NOT_FOUND;
+ Status = EFI_NOT_FOUND;
} else {
- Status = EFI_ACCESS_DENIED;
+ Status = EFI_ACCESS_DENIED;
}
}
}
@@ -1184,7 +1184,7 @@ Returns:
}
if (PrivateFile->UnixThunk->Stat (
FileName == NULL ? PrivateFile->FileName : FileName,
- &buf) < 0)
+ &buf) < 0)
return EFI_DEVICE_ERROR;
Status = EFI_SUCCESS;
@@ -1285,9 +1285,9 @@ Returns:
}
Res = PrivateFile->UnixThunk->Read (
- PrivateFile->fd,
- Buffer,
- *BufferSize);
+ PrivateFile->fd,
+ Buffer,
+ *BufferSize);
if (Res < 0) {
Status = EFI_DEVICE_ERROR;
goto Done;
@@ -1336,14 +1336,14 @@ Returns:
if (EFI_ERROR (Status)) {
goto Done;
}
-
+
AsciiStrCpy(FullFileName, PrivateFile->FileName);
AsciiStrCat(FullFileName, "/");
AsciiStrCat(FullFileName, PrivateFile->Dirent->d_name);
Status = UnixSimpleFileSystemFileInfo (PrivateFile,
- FullFileName,
- BufferSize,
- Buffer);
+ FullFileName,
+ BufferSize,
+ Buffer);
gBS->FreePool (FullFileName);
PrivateFile->Dirent = NULL;
@@ -1423,9 +1423,9 @@ Returns:
}
Res = PrivateFile->UnixThunk->Write (
- PrivateFile->fd,
- Buffer,
- *BufferSize);
+ PrivateFile->fd,
+ Buffer,
+ *BufferSize);
if (Res == (UINTN)-1) {
Status = EFI_DEVICE_ERROR;
goto Done;
@@ -1850,7 +1850,7 @@ Returns:
}
Status = gBS->AllocatePool (EfiBootServicesData, OldInfoSize,
- (VOID **)&OldFileInfo);
+ (VOID **)&OldFileInfo);
if (EFI_ERROR (Status)) {
goto Done;
diff --git a/UnixPkg/UnixSnpDxe/UnixSnp.c b/UnixPkg/UnixSnpDxe/UnixSnp.c
index 8dcadd7508..b910041911 100644
--- a/UnixPkg/UnixSnpDxe/UnixSnp.c
+++ b/UnixPkg/UnixSnpDxe/UnixSnp.c
@@ -24,12 +24,12 @@ Abstract:
EFI_DRIVER_BINDING_PROTOCOL gUnixSnpDriverBinding =
{
- UnixSnpDriverBindingSupported,
- UnixSnpDriverBindingStart,
- UnixSnpDriverBindingStop,
- 0xA,
- NULL,
- NULL
+ UnixSnpDriverBindingSupported,
+ UnixSnpDriverBindingStart,
+ UnixSnpDriverBindingStop,
+ 0xA,
+ NULL,
+ NULL
};
/**
@@ -43,8 +43,8 @@ EFI_DRIVER_BINDING_PROTOCOL gUnixSnpDriverBinding =
EFI_STATUS
EFIAPI
UnixSnpStart(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This
+ );
/**
Changes the state of a network interface from "started" to "stopped".
@@ -57,8 +57,8 @@ UnixSnpStart(
EFI_STATUS
EFIAPI
UnixSnpStop(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This
+ );
/**
Resets a network adapter and allocates the transmit and receive buffers
@@ -83,10 +83,10 @@ UnixSnpStop(
EFI_STATUS
EFIAPI
UnixSnpInitialize(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN UINTN ExtraRxBufferSize OPTIONAL,
- IN UINTN ExtraTxBufferSize OPTIONAL
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN UINTN ExtraRxBufferSize OPTIONAL,
+ IN UINTN ExtraTxBufferSize OPTIONAL
+ );
/**
Resets a network adapter and re-initializes it with the parameters that were
@@ -103,9 +103,9 @@ UnixSnpInitialize(
EFI_STATUS
EFIAPI
UnixSnpReset(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN ExtendedVerification
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN ExtendedVerification
+ );
/**
Resets a network adapter and leaves it in a state that is safe for
@@ -119,8 +119,8 @@ UnixSnpReset(
EFI_STATUS
EFIAPI
UnixSnpShutdown(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This
+ );
/**
Manages the multicast receive filters of a network interface.
@@ -146,13 +146,13 @@ UnixSnpShutdown(
EFI_STATUS
EFIAPI
UnixSnpReceiveFilters(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN UINT32 EnableBits,
- IN UINT32 DisableBits,
- IN BOOLEAN ResetMcastFilter,
- IN UINTN McastFilterCount OPTIONAL,
- IN EFI_MAC_ADDRESS* McastFilter OPTIONAL
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN UINT32 EnableBits,
+ IN UINT32 DisableBits,
+ IN BOOLEAN ResetMcastFilter,
+ IN UINTN McastFilterCount OPTIONAL,
+ IN EFI_MAC_ADDRESS* McastFilter OPTIONAL
+ );
/**
Modifies or resets the current station address, if supported.
@@ -168,10 +168,10 @@ UnixSnpReceiveFilters(
EFI_STATUS
EFIAPI
UnixSnpStationAddress(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN Reset,
- IN EFI_MAC_ADDRESS* NewMacAddr OPTIONAL
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN Reset,
+ IN EFI_MAC_ADDRESS* NewMacAddr OPTIONAL
+ );
/**
Resets or collects the statistics on a network interface.
@@ -195,11 +195,11 @@ UnixSnpStationAddress(
EFI_STATUS
EFIAPI
UnixSnpStatistics(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN Reset,
- IN OUT UINTN* StatisticsSize OPTIONAL,
- OUT EFI_NETWORK_STATISTICS* StatisticsTable OPTIONAL
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN Reset,
+ IN OUT UINTN* StatisticsSize OPTIONAL,
+ OUT EFI_NETWORK_STATISTICS* StatisticsTable OPTIONAL
+ );
/**
Converts a multicast IP address to a multicast HW MAC address.
@@ -223,11 +223,11 @@ UnixSnpStatistics(
EFI_STATUS
EFIAPI
UnixSnpMcastIptoMac(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN Ipv6,
- IN EFI_IP_ADDRESS* Ip,
- OUT EFI_MAC_ADDRESS* Mac
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN Ipv6,
+ IN EFI_IP_ADDRESS* Ip,
+ OUT EFI_MAC_ADDRESS* Mac
+ );
/**
Performs read and write operations on the NVRAM device attached to a
@@ -248,12 +248,12 @@ UnixSnpMcastIptoMac(
EFI_STATUS
EFIAPI
UnixSnpNvdata(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN ReadOrWrite,
- IN UINTN Offset,
- IN UINTN BufferSize,
- IN OUT VOID* Buffer
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN ReadOrWrite,
+ IN UINTN Offset,
+ IN UINTN BufferSize,
+ IN OUT VOID* Buffer
+ );
/**
Reads the current interrupt status and recycled transmit buffer status from
@@ -279,10 +279,10 @@ UnixSnpNvdata(
EFI_STATUS
EFIAPI
UnixSnpGetStatus(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- OUT UINT32* InterruptStatus,
- OUT VOID** TxBuffer
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ OUT UINT32* InterruptStatus,
+ OUT VOID** TxBuffer
+ );
/**
Places a packet in the transmit queue of a network interface.
@@ -316,14 +316,14 @@ UnixSnpGetStatus(
EFI_STATUS
EFIAPI
UnixSnpTransmit(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN UINTN HeaderSize,
- IN UINTN BufferSize,
- IN VOID* Buffer,
- IN EFI_MAC_ADDRESS* SrcAddr OPTIONAL,
- IN EFI_MAC_ADDRESS* DestAddr OPTIONAL,
- IN UINT16* Protocol OPTIONAL
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN UINTN HeaderSize,
+ IN UINTN BufferSize,
+ IN VOID* Buffer,
+ IN EFI_MAC_ADDRESS* SrcAddr OPTIONAL,
+ IN EFI_MAC_ADDRESS* DestAddr OPTIONAL,
+ IN UINT16* Protocol OPTIONAL
+ );
/**
Receives a packet from a network interface.
@@ -358,21 +358,21 @@ UnixSnpTransmit(
EFI_STATUS
EFIAPI
UnixSnpReceive(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- OUT UINTN* HeaderSize OPTIONAL,
- IN OUT UINTN* BuffSize,
- OUT VOID* Buffer,
- OUT EFI_MAC_ADDRESS* SourceAddr OPTIONAL,
- OUT EFI_MAC_ADDRESS* DestinationAddr OPTIONAL,
- OUT UINT16* Protocol OPTIONAL
- );
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ OUT UINTN* HeaderSize OPTIONAL,
+ IN OUT UINTN* BuffSize,
+ OUT VOID* Buffer,
+ OUT EFI_MAC_ADDRESS* SourceAddr OPTIONAL,
+ OUT EFI_MAC_ADDRESS* DestinationAddr OPTIONAL,
+ OUT UINT16* Protocol OPTIONAL
+ );
VOID
EFIAPI
UnixSnpWaitForPacketNotify(
- IN EFI_EVENT Event,
- IN VOID* Private
- );
+ IN EFI_EVENT Event,
+ IN VOID* Private
+ );
//
// Strange, but there doesn't appear to be any structure for the Ethernet header in edk2...
@@ -380,171 +380,171 @@ UnixSnpWaitForPacketNotify(
typedef struct
{
- UINT8 DstAddr[ NET_ETHER_ADDR_LEN ];
- UINT8 SrcAddr[ NET_ETHER_ADDR_LEN ];
- UINT16 Type;
+ UINT8 DstAddr[ NET_ETHER_ADDR_LEN ];
+ UINT8 SrcAddr[ NET_ETHER_ADDR_LEN ];
+ UINT16 Type;
} EthernetHeader;
UNIX_SNP_PRIVATE_DATA gUnixSnpPrivateTemplate =
{
- UNIX_SNP_PRIVATE_DATA_SIGNATURE, // Signature
- NULL, // UnixThunk
- NULL, // DeviceHandle
- NULL, // DevicePath
- { 0 }, // MacAddress
- NULL, // InterfaceName
- 0, // ReadBufferSize
- NULL, // ReadBuffer
- NULL, // CurrentReadPointer
- NULL, // EndReadPointer
- 0, // BpfFd
- { // Snp
- EFI_SIMPLE_NETWORK_PROTOCOL_REVISION, // Revision
- UnixSnpStart, // Start
- UnixSnpStop, // Stop
- UnixSnpInitialize, // Initialize
- UnixSnpReset, // Reset
- UnixSnpShutdown, // Shutdown
- UnixSnpReceiveFilters, // ReceiveFilters
- UnixSnpStationAddress, // StationAddress
- UnixSnpStatistics, // Statistics
- UnixSnpMcastIptoMac, // MCastIpToMac
- UnixSnpNvdata, // NvData
- UnixSnpGetStatus, // GetStatus
- UnixSnpTransmit, // Transmit
- UnixSnpReceive, // Receive
- NULL, // WaitForPacket
- NULL // Mode
- },
- { // Mode
- EfiSimpleNetworkStopped, // State
- NET_ETHER_ADDR_LEN, // HwAddressSize
- NET_ETHER_HEADER_SIZE, // MediaHeaderSize
- 1500, // MaxPacketSize
- 0, // NvRamSize
- 0, // NvRamAccessSize
- 0, // ReceiveFilterMask
- 0, // ReceiveFilterSetting
- MAX_MCAST_FILTER_CNT, // MaxMCastFilterCount
- 0, // MCastFilterCount
- {
- 0
- }, // MCastFilter
- {
- 0
- }, // CurrentAddress
- {
- 0
- }, // BroadcastAddress
- {
- 0
- }, // PermanentAddress
- NET_IFTYPE_ETHERNET, // IfType
- FALSE, // MacAddressChangeable
- FALSE, // MultipleTxSupported
- FALSE, // MediaPresentSupported
- TRUE // MediaPresent
- }
+ UNIX_SNP_PRIVATE_DATA_SIGNATURE, // Signature
+ NULL, // UnixThunk
+ NULL, // DeviceHandle
+ NULL, // DevicePath
+ { 0 }, // MacAddress
+ NULL, // InterfaceName
+ 0, // ReadBufferSize
+ NULL, // ReadBuffer
+ NULL, // CurrentReadPointer
+ NULL, // EndReadPointer
+ 0, // BpfFd
+ { // Snp
+ EFI_SIMPLE_NETWORK_PROTOCOL_REVISION, // Revision
+ UnixSnpStart, // Start
+ UnixSnpStop, // Stop
+ UnixSnpInitialize, // Initialize
+ UnixSnpReset, // Reset
+ UnixSnpShutdown, // Shutdown
+ UnixSnpReceiveFilters, // ReceiveFilters
+ UnixSnpStationAddress, // StationAddress
+ UnixSnpStatistics, // Statistics
+ UnixSnpMcastIptoMac, // MCastIpToMac
+ UnixSnpNvdata, // NvData
+ UnixSnpGetStatus, // GetStatus
+ UnixSnpTransmit, // Transmit
+ UnixSnpReceive, // Receive
+ NULL, // WaitForPacket
+ NULL // Mode
+ },
+ { // Mode
+ EfiSimpleNetworkStopped, // State
+ NET_ETHER_ADDR_LEN, // HwAddressSize
+ NET_ETHER_HEADER_SIZE, // MediaHeaderSize
+ 1500, // MaxPacketSize
+ 0, // NvRamSize
+ 0, // NvRamAccessSize
+ 0, // ReceiveFilterMask
+ 0, // ReceiveFilterSetting
+ MAX_MCAST_FILTER_CNT, // MaxMCastFilterCount
+ 0, // MCastFilterCount
+ {
+ 0
+ }, // MCastFilter
+ {
+ 0
+ }, // CurrentAddress
+ {
+ 0
+ }, // BroadcastAddress
+ {
+ 0
+ }, // PermanentAddress
+ NET_IFTYPE_ETHERNET, // IfType
+ FALSE, // MacAddressChangeable
+ FALSE, // MultipleTxSupported
+ FALSE, // MediaPresentSupported
+ TRUE // MediaPresent
+ }
};
STATIC EFI_STATUS
GetInterfaceMacAddr(
- IN UNIX_SNP_PRIVATE_DATA* Private,
- IN EFI_UNIX_IO_PROTOCOL* UnixIo
- )
+ IN UNIX_SNP_PRIVATE_DATA* Private,
+ IN EFI_UNIX_IO_PROTOCOL* UnixIo
+ )
{
- struct ifaddrs* IfAddrs;
- struct ifaddrs* If;
- struct sockaddr_dl* IfSdl;
- EFI_STATUS Status;
- INTN Result;
-
- Result = UnixIo->UnixThunk->GetIfAddrs( &IfAddrs );
- if ( Result != 0 )
- {
- return( EFI_UNSUPPORTED );
- }
-
- //
- // Convert the interface name to ASCII so we can find it.
- //
- Private->InterfaceName = AllocateZeroPool( StrLen( UnixIo->EnvString ) );
-
- if ( !Private->InterfaceName )
- {
- Status = EFI_OUT_OF_RESOURCES;
- goto Exit;
- }
-
- UnicodeStrToAsciiStr( UnixIo->EnvString, Private->InterfaceName );
-
- If = IfAddrs;
-
- while ( If != NULL )
- {
- IfSdl = ( struct sockaddr_dl * ) If->ifa_addr;
-
- if ( IfSdl->sdl_family == AF_LINK )
- {
- if ( !AsciiStrCmp( Private->InterfaceName, If->ifa_name ) )
- {
- CopyMem( &Private->MacAddress, LLADDR( IfSdl ), NET_ETHER_ADDR_LEN );
-
- Status = EFI_SUCCESS;
- break;
- }
- }
-
- If = If->ifa_next;
- }
+ struct ifaddrs* IfAddrs;
+ struct ifaddrs* If;
+ struct sockaddr_dl* IfSdl;
+ EFI_STATUS Status;
+ INTN Result;
+
+ Result = UnixIo->UnixThunk->GetIfAddrs( &IfAddrs );
+ if ( Result != 0 )
+ {
+ return( EFI_UNSUPPORTED );
+ }
+
+ //
+ // Convert the interface name to ASCII so we can find it.
+ //
+ Private->InterfaceName = AllocateZeroPool( StrLen( UnixIo->EnvString ) );
+
+ if ( !Private->InterfaceName )
+ {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto Exit;
+ }
+
+ UnicodeStrToAsciiStr( UnixIo->EnvString, Private->InterfaceName );
+
+ If = IfAddrs;
+
+ while ( If != NULL )
+ {
+ IfSdl = ( struct sockaddr_dl * ) If->ifa_addr;
+
+ if ( IfSdl->sdl_family == AF_LINK )
+ {
+ if ( !AsciiStrCmp( Private->InterfaceName, If->ifa_name ) )
+ {
+ CopyMem( &Private->MacAddress, LLADDR( IfSdl ), NET_ETHER_ADDR_LEN );
+
+ Status = EFI_SUCCESS;
+ break;
+ }
+ }
+
+ If = If->ifa_next;
+ }
Exit:
- ( VOID ) UnixIo->UnixThunk->FreeIfAddrs( IfAddrs );
+ ( VOID ) UnixIo->UnixThunk->FreeIfAddrs( IfAddrs );
- return( Status );
+ return( Status );
}
STATIC EFI_STATUS
OpenBpfFileDescriptor(
- IN UNIX_SNP_PRIVATE_DATA* Private,
- OUT INTN* Fd
- )
+ IN UNIX_SNP_PRIVATE_DATA* Private,
+ OUT INTN* Fd
+ )
{
- CHAR8 BfpDeviceName[ 256 ];
- INTN Index;
- EFI_STATUS Status = EFI_OUT_OF_RESOURCES;
- INTN Result;
-
- //
- // Open a Berkeley Packet Filter device. This must be done as root, so this is probably
- // the place which is most likely to fail...
- //
- for ( Index = 0; TRUE; Index++ )
- {
- AsciiSPrint( BfpDeviceName, sizeof( BfpDeviceName ), "/dev/bpf%d", Index );
-
- *Fd = Private->UnixThunk->Open( BfpDeviceName, O_RDWR, 0 );
-
- if ( *Fd >= 0 )
- {
- Status = EFI_SUCCESS;
- break;
- }
-
- Result = Private->UnixThunk->GetErrno();
+ CHAR8 BfpDeviceName[ 256 ];
+ INTN Index;
+ EFI_STATUS Status = EFI_OUT_OF_RESOURCES;
+ INTN Result;
+
+ //
+ // Open a Berkeley Packet Filter device. This must be done as root, so this is probably
+ // the place which is most likely to fail...
+ //
+ for ( Index = 0; TRUE; Index++ )
+ {
+ AsciiSPrint( BfpDeviceName, sizeof( BfpDeviceName ), "/dev/bpf%d", Index );
+
+ *Fd = Private->UnixThunk->Open( BfpDeviceName, O_RDWR, 0 );
+
+ if ( *Fd >= 0 )
+ {
+ Status = EFI_SUCCESS;
+ break;
+ }
+
+ Result = Private->UnixThunk->GetErrno();
if ( Result == EACCES )
{
DEBUG( ( EFI_D_ERROR, "Permissions on '%a' are incorrect. Fix with 'sudo chmod 666 %a'.\n",
BfpDeviceName, BfpDeviceName ) );
}
- if ( Result != EBUSY )
- {
- break;
- }
- }
+ if ( Result != EBUSY )
+ {
+ break;
+ }
+ }
- return( Status );
+ return( Status );
}
@@ -568,51 +568,51 @@ OpenBpfFileDescriptor(
EFI_STATUS
EFIAPI
UnixSnpDriverBindingSupported(
- IN EFI_DRIVER_BINDING_PROTOCOL* This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL* RemainingDevicePath OPTIONAL
- )
+ IN EFI_DRIVER_BINDING_PROTOCOL* This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL* RemainingDevicePath OPTIONAL
+ )
{
- EFI_STATUS Status;
- EFI_UNIX_IO_PROTOCOL* UnixIo;
-
- //
- // Open the I/O abstraction needed to perform the supported test.
- //
- Status = gBS->OpenProtocol(
- ControllerHandle,
- &gEfiUnixIoProtocolGuid,
- ( VOID ** ) &UnixIo,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
-
- if ( EFI_ERROR( Status ) )
- {
- return( Status );
- }
-
- //
- // Validate GUID
- //
- Status = EFI_UNSUPPORTED;
- if ( CompareGuid( UnixIo->TypeGuid, &gEfiUnixNetworkGuid ) )
- {
- Status = EFI_SUCCESS;
- }
-
- //
- // Close the I/O abstraction used to perform the supported test.
- //
- gBS->CloseProtocol(
- ControllerHandle,
- &gEfiUnixIoProtocolGuid,
- This->DriverBindingHandle,
- ControllerHandle
- );
-
- return( Status );
+ EFI_STATUS Status;
+ EFI_UNIX_IO_PROTOCOL* UnixIo;
+
+ //
+ // Open the I/O abstraction needed to perform the supported test.
+ //
+ Status = gBS->OpenProtocol(
+ ControllerHandle,
+ &gEfiUnixIoProtocolGuid,
+ ( VOID ** ) &UnixIo,
+ This->DriverBindingHandle,
+ ControllerHandle,
+ EFI_OPEN_PROTOCOL_BY_DRIVER
+ );
+
+ if ( EFI_ERROR( Status ) )
+ {
+ return( Status );
+ }
+
+ //
+ // Validate GUID
+ //
+ Status = EFI_UNSUPPORTED;
+ if ( CompareGuid( UnixIo->TypeGuid, &gEfiUnixNetworkGuid ) )
+ {
+ Status = EFI_SUCCESS;
+ }
+
+ //
+ // Close the I/O abstraction used to perform the supported test.
+ //
+ gBS->CloseProtocol(
+ ControllerHandle,
+ &gEfiUnixIoProtocolGuid,
+ This->DriverBindingHandle,
+ ControllerHandle
+ );
+
+ return( Status );
}
@@ -635,175 +635,175 @@ UnixSnpDriverBindingSupported(
EFI_STATUS
EFIAPI
UnixSnpDriverBindingStart(
- IN EFI_DRIVER_BINDING_PROTOCOL* This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL* RemainingDevicePath OPTIONAL
- )
+ IN EFI_DRIVER_BINDING_PROTOCOL* This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL* RemainingDevicePath OPTIONAL
+ )
{
- MAC_ADDR_DEVICE_PATH Node;
- EFI_DEVICE_PATH_PROTOCOL* ParentDevicePath = NULL;
- EFI_UNIX_IO_PROTOCOL* UnixIo;
- UNIX_SNP_PRIVATE_DATA* Private = NULL;
- EFI_STATUS Status;
- BOOLEAN CreateDevice;
-
- //
- // Grab the protocols we need.
- //
- Status = gBS->OpenProtocol(
- ControllerHandle,
- &gEfiDevicePathProtocolGuid,
- ( VOID ** ) &ParentDevicePath,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if ( EFI_ERROR( Status ) )
- {
- goto ErrorExit;
- }
-
- //
- // Open the I/O abstraction needed to perform the supported test.
- //
- Status = gBS->OpenProtocol(
- ControllerHandle,
- &gEfiUnixIoProtocolGuid,
- ( VOID ** ) &UnixIo,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if ( EFI_ERROR( Status ) )
- {
- goto ErrorExit;
- }
-
- //
- // Validate GUID
- //
- if ( !CompareGuid( UnixIo->TypeGuid, &gEfiUnixNetworkGuid ) )
- {
- Status = EFI_UNSUPPORTED;
- goto ErrorExit;
- }
-
- CreateDevice = TRUE;
- if ( ( RemainingDevicePath != NULL ) && IsDevicePathEnd( RemainingDevicePath ) )
- {
- CreateDevice = FALSE;
- }
-
- if ( CreateDevice )
- {
- //
- // Allocate the private data.
- //
- Private = AllocateCopyPool( sizeof( UNIX_SNP_PRIVATE_DATA ), &gUnixSnpPrivateTemplate );
- if ( Private == NULL )
- {
- Status = EFI_OUT_OF_RESOURCES;
- goto ErrorExit;
- }
-
- Status = GetInterfaceMacAddr( Private, UnixIo );
- if ( EFI_ERROR( Status ) )
- {
- goto ErrorExit;
- }
-
- Private->UnixThunk = UnixIo->UnixThunk;
-
- Private->Snp.Mode = &Private->Mode;
-
- //
- // Set the broadcast address.
- //
- SetMem( &Private->Mode.BroadcastAddress, sizeof( EFI_MAC_ADDRESS ), 0xFF );
-
- CopyMem( &Private->Mode.CurrentAddress, &Private->MacAddress, sizeof( EFI_MAC_ADDRESS ) );
- CopyMem( &Private->Mode.PermanentAddress, &Private->MacAddress, sizeof( EFI_MAC_ADDRESS ) );
-
- //
- // Since the fake SNP is based on a real NIC, to avoid conflict with the host NIC
- // network stack, we use a different MAC address.
- // So just change the last byte of the MAC address for the real NIC.
- //
- Private->Mode.CurrentAddress.Addr[ NET_ETHER_ADDR_LEN - 1 ]++;
-
- //
- // Build the device path by appending the MAC node to the ParentDevicePath
- // from the UnixIo handle.
- //
- ZeroMem( &Node, sizeof( MAC_ADDR_DEVICE_PATH ) );
-
- Node.Header.Type = MESSAGING_DEVICE_PATH;
- Node.Header.SubType = MSG_MAC_ADDR_DP;
- Node.IfType = Private->Mode.IfType;
-
- SetDevicePathNodeLength( ( EFI_DEVICE_PATH_PROTOCOL * ) &Node, sizeof( MAC_ADDR_DEVICE_PATH ) );
-
- CopyMem( &Node.MacAddress, &Private->Mode.CurrentAddress, sizeof( EFI_MAC_ADDRESS ) );
-
- //
- // Build the device path by appending the MAC node to the ParentDevicePath from the UnixIo handle.
- //
- Private->DevicePath = AppendDevicePathNode( ParentDevicePath, ( EFI_DEVICE_PATH_PROTOCOL * ) &Node );
- if ( Private->DevicePath == NULL )
- {
- Status = EFI_OUT_OF_RESOURCES;
- goto ErrorExit;
- }
-
- Status = gBS->InstallMultipleProtocolInterfaces(
- &Private->DeviceHandle,
- &gEfiSimpleNetworkProtocolGuid,
- &Private->Snp,
- &gEfiDevicePathProtocolGuid,
- Private->DevicePath,
- NULL
- );
- if ( EFI_ERROR( Status ) )
- {
- goto ErrorExit;
- }
-
- Status = gBS->OpenProtocol(
- ControllerHandle,
- &gEfiUnixIoProtocolGuid,
- ( VOID ** ) &UnixIo,
- This->DriverBindingHandle,
- Private->DeviceHandle,
- EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
- );
- if ( EFI_ERROR( Status ) )
- {
- goto ErrorExit;
- }
- }
- return( Status );
+ MAC_ADDR_DEVICE_PATH Node;
+ EFI_DEVICE_PATH_PROTOCOL* ParentDevicePath = NULL;
+ EFI_UNIX_IO_PROTOCOL* UnixIo;
+ UNIX_SNP_PRIVATE_DATA* Private = NULL;
+ EFI_STATUS Status;
+ BOOLEAN CreateDevice;
+
+ //
+ // Grab the protocols we need.
+ //
+ Status = gBS->OpenProtocol(
+ ControllerHandle,
+ &gEfiDevicePathProtocolGuid,
+ ( VOID ** ) &ParentDevicePath,
+ This->DriverBindingHandle,
+ ControllerHandle,
+ EFI_OPEN_PROTOCOL_BY_DRIVER
+ );
+ if ( EFI_ERROR( Status ) )
+ {
+ goto ErrorExit;
+ }
+
+ //
+ // Open the I/O abstraction needed to perform the supported test.
+ //
+ Status = gBS->OpenProtocol(
+ ControllerHandle,
+ &gEfiUnixIoProtocolGuid,
+ ( VOID ** ) &UnixIo,
+ This->DriverBindingHandle,
+ ControllerHandle,
+ EFI_OPEN_PROTOCOL_BY_DRIVER
+ );
+ if ( EFI_ERROR( Status ) )
+ {
+ goto ErrorExit;
+ }
+
+ //
+ // Validate GUID
+ //
+ if ( !CompareGuid( UnixIo->TypeGuid, &gEfiUnixNetworkGuid ) )
+ {
+ Status = EFI_UNSUPPORTED;
+ goto ErrorExit;
+ }
+
+ CreateDevice = TRUE;
+ if ( ( RemainingDevicePath != NULL ) && IsDevicePathEnd( RemainingDevicePath ) )
+ {
+ CreateDevice = FALSE;
+ }
+
+ if ( CreateDevice )
+ {
+ //
+ // Allocate the private data.
+ //
+ Private = AllocateCopyPool( sizeof( UNIX_SNP_PRIVATE_DATA ), &gUnixSnpPrivateTemplate );
+ if ( Private == NULL )
+ {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto ErrorExit;
+ }
+
+ Status = GetInterfaceMacAddr( Private, UnixIo );
+ if ( EFI_ERROR( Status ) )
+ {
+ goto ErrorExit;
+ }
+
+ Private->UnixThunk = UnixIo->UnixThunk;
+
+ Private->Snp.Mode = &Private->Mode;
+
+ //
+ // Set the broadcast address.
+ //
+ SetMem( &Private->Mode.BroadcastAddress, sizeof( EFI_MAC_ADDRESS ), 0xFF );
+
+ CopyMem( &Private->Mode.CurrentAddress, &Private->MacAddress, sizeof( EFI_MAC_ADDRESS ) );
+ CopyMem( &Private->Mode.PermanentAddress, &Private->MacAddress, sizeof( EFI_MAC_ADDRESS ) );
+
+ //
+ // Since the fake SNP is based on a real NIC, to avoid conflict with the host NIC
+ // network stack, we use a different MAC address.
+ // So just change the last byte of the MAC address for the real NIC.
+ //
+ Private->Mode.CurrentAddress.Addr[ NET_ETHER_ADDR_LEN - 1 ]++;
+
+ //
+ // Build the device path by appending the MAC node to the ParentDevicePath
+ // from the UnixIo handle.
+ //
+ ZeroMem( &Node, sizeof( MAC_ADDR_DEVICE_PATH ) );
+
+ Node.Header.Type = MESSAGING_DEVICE_PATH;
+ Node.Header.SubType = MSG_MAC_ADDR_DP;
+ Node.IfType = Private->Mode.IfType;
+
+ SetDevicePathNodeLength( ( EFI_DEVICE_PATH_PROTOCOL * ) &Node, sizeof( MAC_ADDR_DEVICE_PATH ) );
+
+ CopyMem( &Node.MacAddress, &Private->Mode.CurrentAddress, sizeof( EFI_MAC_ADDRESS ) );
+
+ //
+ // Build the device path by appending the MAC node to the ParentDevicePath from the UnixIo handle.
+ //
+ Private->DevicePath = AppendDevicePathNode( ParentDevicePath, ( EFI_DEVICE_PATH_PROTOCOL * ) &Node );
+ if ( Private->DevicePath == NULL )
+ {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto ErrorExit;
+ }
+
+ Status = gBS->InstallMultipleProtocolInterfaces(
+ &Private->DeviceHandle,
+ &gEfiSimpleNetworkProtocolGuid,
+ &Private->Snp,
+ &gEfiDevicePathProtocolGuid,
+ Private->DevicePath,
+ NULL
+ );
+ if ( EFI_ERROR( Status ) )
+ {
+ goto ErrorExit;
+ }
+
+ Status = gBS->OpenProtocol(
+ ControllerHandle,
+ &gEfiUnixIoProtocolGuid,
+ ( VOID ** ) &UnixIo,
+ This->DriverBindingHandle,
+ Private->DeviceHandle,
+ EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
+ );
+ if ( EFI_ERROR( Status ) )
+ {
+ goto ErrorExit;
+ }
+ }
+ return( Status );
ErrorExit:
- if ( Private->InterfaceName != NULL )
- {
- FreePool( Private->InterfaceName );
- Private->InterfaceName = NULL;
- }
- if ( Private != NULL )
- {
- FreePool( Private );
- }
- if ( ParentDevicePath != NULL )
- {
- gBS->CloseProtocol(
- ControllerHandle,
- &gEfiDevicePathProtocolGuid,
- This->DriverBindingHandle,
- ControllerHandle
- );
- }
-
- return( Status );
+ if ( Private->InterfaceName != NULL )
+ {
+ FreePool( Private->InterfaceName );
+ Private->InterfaceName = NULL;
+ }
+ if ( Private != NULL )
+ {
+ FreePool( Private );
+ }
+ if ( ParentDevicePath != NULL )
+ {
+ gBS->CloseProtocol(
+ ControllerHandle,
+ &gEfiDevicePathProtocolGuid,
+ This->DriverBindingHandle,
+ ControllerHandle
+ );
+ }
+
+ return( Status );
}
/**
@@ -826,55 +826,55 @@ ErrorExit:
EFI_STATUS
EFIAPI
UnixSnpDriverBindingStop(
- IN EFI_DRIVER_BINDING_PROTOCOL* This,
- IN EFI_HANDLE ControllerHandle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE* ChildHandleBuffer
- )
+ IN EFI_DRIVER_BINDING_PROTOCOL* This,
+ IN EFI_HANDLE ControllerHandle,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE* ChildHandleBuffer
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private = NULL;
- EFI_SIMPLE_NETWORK_PROTOCOL* Snp;
- EFI_STATUS Status;
-
- //
- // Get our context back.
- //
- Status = gBS->OpenProtocol(
- ControllerHandle,
- &gEfiSimpleNetworkProtocolGuid,
- ( VOID ** ) &Snp,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if ( EFI_ERROR( Status ) )
- {
- return( EFI_UNSUPPORTED );
- }
-
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( Snp );
-
- Status = gBS->CloseProtocol(
- ControllerHandle,
- &gEfiUnixIoProtocolGuid,
- This->DriverBindingHandle,
- Private->DeviceHandle
- );
-
- Status = gBS->UninstallMultipleProtocolInterfaces(
- Private->DeviceHandle,
- &gEfiSimpleNetworkProtocolGuid,
- &Private->Snp,
- &gEfiDevicePathProtocolGuid,
- Private->DevicePath,
- NULL
- );
-
- FreePool( Private->InterfaceName );
- FreePool( Private->DevicePath );
- FreePool( Private );
-
- return( EFI_SUCCESS );
+ UNIX_SNP_PRIVATE_DATA* Private = NULL;
+ EFI_SIMPLE_NETWORK_PROTOCOL* Snp;
+ EFI_STATUS Status;
+
+ //
+ // Get our context back.
+ //
+ Status = gBS->OpenProtocol(
+ ControllerHandle,
+ &gEfiSimpleNetworkProtocolGuid,
+ ( VOID ** ) &Snp,
+ This->DriverBindingHandle,
+ ControllerHandle,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if ( EFI_ERROR( Status ) )
+ {
+ return( EFI_UNSUPPORTED );
+ }
+
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( Snp );
+
+ Status = gBS->CloseProtocol(
+ ControllerHandle,
+ &gEfiUnixIoProtocolGuid,
+ This->DriverBindingHandle,
+ Private->DeviceHandle
+ );
+
+ Status = gBS->UninstallMultipleProtocolInterfaces(
+ Private->DeviceHandle,
+ &gEfiSimpleNetworkProtocolGuid,
+ &Private->Snp,
+ &gEfiDevicePathProtocolGuid,
+ Private->DevicePath,
+ NULL
+ );
+
+ FreePool( Private->InterfaceName );
+ FreePool( Private->DevicePath );
+ FreePool( Private );
+
+ return( EFI_SUCCESS );
}
@@ -889,210 +889,210 @@ UnixSnpDriverBindingStop(
EFI_STATUS
EFIAPI
UnixSnpStart(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This
+ )
{
- STATIC struct bpf_insn FilterInstructionTemplate[] =
- {
- // Load 4 bytes from the destination MAC address.
- BPF_STMT( BPF_LD + BPF_W + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 0 ] ) ),
-
- // Compare to first 4 bytes of fake MAC address.
- BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0x12345678, 0, 3 ),
-
- // Load remaining 2 bytes from the destination MAC address.
- BPF_STMT( BPF_LD + BPF_H + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 4 ] ) ),
-
- // Compare to remaining 2 bytes of fake MAC address.
- BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0x9ABC, 5, 0 ),
-
- // Load 4 bytes from the destination MAC address.
- BPF_STMT( BPF_LD + BPF_W + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 0 ] ) ),
-
- // Compare to first 4 bytes of broadcast MAC address.
- BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0xFFFFFFFF, 0, 2 ),
-
- // Load remaining 2 bytes from the destination MAC address.
- BPF_STMT( BPF_LD + BPF_H + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 4 ] ) ),
-
- // Compare to remaining 2 bytes of broadcast MAC address.
- BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0xFFFF, 1, 0 ),
-
- // Reject packet.
- BPF_STMT( BPF_RET + BPF_K, 0 ),
-
- // Receive entire packet.
- BPF_STMT( BPF_RET + BPF_K, -1 )
- };
- struct ifreq BoundIf;
- struct bpf_program BpfProgram;
- struct bpf_insn* FilterProgram;
- UNIX_SNP_PRIVATE_DATA* Private;
- EFI_STATUS Status;
- UINT32 Temp32;
- INTN Fd;
- INTN Result;
- INTN Value;
- UINT16 Temp16;
-
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
-
- switch ( Private->Snp.Mode->State )
- {
- case EfiSimpleNetworkStopped:
- break;
-
- case EfiSimpleNetworkStarted:
- case EfiSimpleNetworkInitialized:
- return( EFI_ALREADY_STARTED );
- break;
-
- default:
- return( EFI_DEVICE_ERROR );
- break;
- }
-
- if ( Private->BpfFd == 0 )
- {
- Status = OpenBpfFileDescriptor( Private, &Fd );
-
- if ( EFI_ERROR( Status ) )
- {
- goto ErrorExit;
- }
-
- Private->BpfFd = Fd;
-
- //
- // Associate our interface with this BPF file descriptor.
- //
- AsciiStrCpy( BoundIf.ifr_name, Private->InterfaceName );
- Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSETIF, &BoundIf );
-
- if ( Result < 0 )
- {
- goto DeviceErrorExit;
- }
-
- //
- // Enable immediate mode and find out the buffer size.
- //
- Value = 1;
- Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCIMMEDIATE, &Value );
-
- if ( Result < 0 )
- {
- goto DeviceErrorExit;
- }
-
- //
- // Enable non-blocking I/O.
- //
-
- Value = Private->UnixThunk->Fcntl( Private->BpfFd, F_GETFL, 0 );
-
- if ( Value == -1 )
- {
- goto DeviceErrorExit;
- }
-
- Value |= O_NONBLOCK;
-
- Result = Private->UnixThunk->Fcntl( Private->BpfFd, F_SETFL, (void *) Value );
-
- if ( Result == -1 )
- {
- goto DeviceErrorExit;
- }
-
- //
- // Disable "header complete" flag. This means the supplied source MAC address is
- // what goes on the wire.
- //
- Value = 1;
- Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSHDRCMPLT, &Value );
-
- if ( Result < 0 )
- {
- goto DeviceErrorExit;
- }
-
- Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCGBLEN, &Value );
-
- if ( Result < 0 )
- {
- goto DeviceErrorExit;
- }
-
- //
- // Allocate read buffer.
- //
- Private->ReadBufferSize = Value;
- Private->ReadBuffer = AllocateZeroPool( Private->ReadBufferSize );
- if ( Private->ReadBuffer == NULL )
- {
- Status = EFI_OUT_OF_RESOURCES;
- goto ErrorExit;
- }
-
- Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer;
-
- //
- // Install our packet filter: successful reads should only produce broadcast or unitcast
- // packets directed to our fake MAC address.
- //
- FilterProgram = AllocateCopyPool( sizeof( FilterInstructionTemplate ), &FilterInstructionTemplate );
- if ( FilterProgram == NULL )
- {
- goto ErrorExit;
- }
-
- //
- // Insert out fake MAC address into the filter. The data has to be host endian.
- //
- CopyMem( &Temp32, &Private->Mode.CurrentAddress.Addr[ 0 ], sizeof( UINT32 ) );
- FilterProgram[ 1 ].k = NTOHL( Temp32 );
- CopyMem( &Temp16, &Private->Mode.CurrentAddress.Addr[ 4 ], sizeof( UINT16 ) );
- FilterProgram[ 3 ].k = NTOHS( Temp16 );
-
- BpfProgram.bf_len = sizeof( FilterInstructionTemplate ) / sizeof( struct bpf_insn );
- BpfProgram.bf_insns = FilterProgram;
-
- Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSETF, &BpfProgram );
-
- if ( Result < 0 )
- {
- goto DeviceErrorExit;
- }
-
- FreePool( FilterProgram );
-
- //
- // Enable promiscuous mode.
- //
-
- Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCPROMISC, 0 );
-
- if ( Result < 0 )
- {
- goto DeviceErrorExit;
- }
+ STATIC struct bpf_insn FilterInstructionTemplate[] =
+ {
+ // Load 4 bytes from the destination MAC address.
+ BPF_STMT( BPF_LD + BPF_W + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 0 ] ) ),
+
+ // Compare to first 4 bytes of fake MAC address.
+ BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0x12345678, 0, 3 ),
+
+ // Load remaining 2 bytes from the destination MAC address.
+ BPF_STMT( BPF_LD + BPF_H + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 4 ] ) ),
+
+ // Compare to remaining 2 bytes of fake MAC address.
+ BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0x9ABC, 5, 0 ),
+
+ // Load 4 bytes from the destination MAC address.
+ BPF_STMT( BPF_LD + BPF_W + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 0 ] ) ),
+
+ // Compare to first 4 bytes of broadcast MAC address.
+ BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0xFFFFFFFF, 0, 2 ),
+
+ // Load remaining 2 bytes from the destination MAC address.
+ BPF_STMT( BPF_LD + BPF_H + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 4 ] ) ),
+
+ // Compare to remaining 2 bytes of broadcast MAC address.
+ BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0xFFFF, 1, 0 ),
+
+ // Reject packet.
+ BPF_STMT( BPF_RET + BPF_K, 0 ),
+
+ // Receive entire packet.
+ BPF_STMT( BPF_RET + BPF_K, -1 )
+ };
+ struct ifreq BoundIf;
+ struct bpf_program BpfProgram;
+ struct bpf_insn* FilterProgram;
+ UNIX_SNP_PRIVATE_DATA* Private;
+ EFI_STATUS Status;
+ UINT32 Temp32;
+ INTN Fd;
+ INTN Result;
+ INTN Value;
+ UINT16 Temp16;
+
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
+
+ switch ( Private->Snp.Mode->State )
+ {
+ case EfiSimpleNetworkStopped:
+ break;
+
+ case EfiSimpleNetworkStarted:
+ case EfiSimpleNetworkInitialized:
+ return( EFI_ALREADY_STARTED );
+ break;
+
+ default:
+ return( EFI_DEVICE_ERROR );
+ break;
+ }
+
+ if ( Private->BpfFd == 0 )
+ {
+ Status = OpenBpfFileDescriptor( Private, &Fd );
+
+ if ( EFI_ERROR( Status ) )
+ {
+ goto ErrorExit;
+ }
+
+ Private->BpfFd = Fd;
+
+ //
+ // Associate our interface with this BPF file descriptor.
+ //
+ AsciiStrCpy( BoundIf.ifr_name, Private->InterfaceName );
+ Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSETIF, &BoundIf );
+
+ if ( Result < 0 )
+ {
+ goto DeviceErrorExit;
+ }
+
+ //
+ // Enable immediate mode and find out the buffer size.
+ //
+ Value = 1;
+ Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCIMMEDIATE, &Value );
+
+ if ( Result < 0 )
+ {
+ goto DeviceErrorExit;
+ }
+
+ //
+ // Enable non-blocking I/O.
+ //
+
+ Value = Private->UnixThunk->Fcntl( Private->BpfFd, F_GETFL, 0 );
+
+ if ( Value == -1 )
+ {
+ goto DeviceErrorExit;
+ }
+
+ Value |= O_NONBLOCK;
+
+ Result = Private->UnixThunk->Fcntl( Private->BpfFd, F_SETFL, (void *) Value );
+
+ if ( Result == -1 )
+ {
+ goto DeviceErrorExit;
+ }
+
+ //
+ // Disable "header complete" flag. This means the supplied source MAC address is
+ // what goes on the wire.
+ //
+ Value = 1;
+ Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSHDRCMPLT, &Value );
+
+ if ( Result < 0 )
+ {
+ goto DeviceErrorExit;
+ }
+
+ Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCGBLEN, &Value );
+
+ if ( Result < 0 )
+ {
+ goto DeviceErrorExit;
+ }
+
+ //
+ // Allocate read buffer.
+ //
+ Private->ReadBufferSize = Value;
+ Private->ReadBuffer = AllocateZeroPool( Private->ReadBufferSize );
+ if ( Private->ReadBuffer == NULL )
+ {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto ErrorExit;
+ }
+
+ Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer;
+
+ //
+ // Install our packet filter: successful reads should only produce broadcast or unitcast
+ // packets directed to our fake MAC address.
+ //
+ FilterProgram = AllocateCopyPool( sizeof( FilterInstructionTemplate ), &FilterInstructionTemplate );
+ if ( FilterProgram == NULL )
+ {
+ goto ErrorExit;
+ }
+
+ //
+ // Insert out fake MAC address into the filter. The data has to be host endian.
+ //
+ CopyMem( &Temp32, &Private->Mode.CurrentAddress.Addr[ 0 ], sizeof( UINT32 ) );
+ FilterProgram[ 1 ].k = NTOHL( Temp32 );
+ CopyMem( &Temp16, &Private->Mode.CurrentAddress.Addr[ 4 ], sizeof( UINT16 ) );
+ FilterProgram[ 3 ].k = NTOHS( Temp16 );
+
+ BpfProgram.bf_len = sizeof( FilterInstructionTemplate ) / sizeof( struct bpf_insn );
+ BpfProgram.bf_insns = FilterProgram;
+
+ Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSETF, &BpfProgram );
+
+ if ( Result < 0 )
+ {
+ goto DeviceErrorExit;
+ }
+
+ FreePool( FilterProgram );
+
+ //
+ // Enable promiscuous mode.
+ //
+
+ Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCPROMISC, 0 );
+
+ if ( Result < 0 )
+ {
+ goto DeviceErrorExit;
+ }
- Private->Snp.Mode->State = EfiSimpleNetworkStarted;
- }
+ Private->Snp.Mode->State = EfiSimpleNetworkStarted;
+ }
- return( Status );
+ return( Status );
DeviceErrorExit:
- Status = EFI_DEVICE_ERROR;
+ Status = EFI_DEVICE_ERROR;
ErrorExit:
- if ( Private->ReadBuffer != NULL )
- {
- FreePool( Private->ReadBuffer );
- Private->ReadBuffer = NULL;
- }
- return( Status );
+ if ( Private->ReadBuffer != NULL )
+ {
+ FreePool( Private->ReadBuffer );
+ Private->ReadBuffer = NULL;
+ }
+ return( Status );
}
@@ -1107,43 +1107,43 @@ ErrorExit:
EFI_STATUS
EFIAPI
UnixSnpStop(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private = EFI_SUCCESS;
- EFI_STATUS Status;
+ UNIX_SNP_PRIVATE_DATA* Private = EFI_SUCCESS;
+ EFI_STATUS Status;
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
- switch ( Private->Snp.Mode->State )
- {
- case EfiSimpleNetworkStarted:
- break;
+ switch ( Private->Snp.Mode->State )
+ {
+ case EfiSimpleNetworkStarted:
+ break;
- case EfiSimpleNetworkStopped:
- return( EFI_NOT_STARTED );
- break;
+ case EfiSimpleNetworkStopped:
+ return( EFI_NOT_STARTED );
+ break;
- default:
- return( EFI_DEVICE_ERROR );
- break;
- }
+ default:
+ return( EFI_DEVICE_ERROR );
+ break;
+ }
- if ( Private->BpfFd != 0 )
- {
- Private->UnixThunk->Close( Private->BpfFd );
- Private->BpfFd = 0;
- }
+ if ( Private->BpfFd != 0 )
+ {
+ Private->UnixThunk->Close( Private->BpfFd );
+ Private->BpfFd = 0;
+ }
- if ( Private->ReadBuffer != NULL )
- {
- FreePool( Private->ReadBuffer );
- Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer = NULL;
- }
+ if ( Private->ReadBuffer != NULL )
+ {
+ FreePool( Private->ReadBuffer );
+ Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer = NULL;
+ }
- Private->Snp.Mode->State = EfiSimpleNetworkStopped;
+ Private->Snp.Mode->State = EfiSimpleNetworkStopped;
- return( Status );
+ return( Status );
}
@@ -1170,50 +1170,50 @@ UnixSnpStop(
EFI_STATUS
EFIAPI
UnixSnpInitialize(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN UINTN ExtraRxBufferSize OPTIONAL,
- IN UINTN ExtraTxBufferSize OPTIONAL
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN UINTN ExtraRxBufferSize OPTIONAL,
+ IN UINTN ExtraTxBufferSize OPTIONAL
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private = EFI_SUCCESS;
- EFI_STATUS Status;
+ UNIX_SNP_PRIVATE_DATA* Private = EFI_SUCCESS;
+ EFI_STATUS Status;
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
- switch ( Private->Snp.Mode->State )
- {
- case EfiSimpleNetworkStarted:
- break;
+ switch ( Private->Snp.Mode->State )
+ {
+ case EfiSimpleNetworkStarted:
+ break;
- case EfiSimpleNetworkStopped:
- return( EFI_NOT_STARTED );
- break;
+ case EfiSimpleNetworkStopped:
+ return( EFI_NOT_STARTED );
+ break;
- default:
- return( EFI_DEVICE_ERROR );
- break;
- }
+ default:
+ return( EFI_DEVICE_ERROR );
+ break;
+ }
#if 0
- Status = gBS->CreateEvent(
- EVT_NOTIFY_WAIT,
- TPL_NOTIFY,
- UnixSnpWaitForPacketNotify,
- Private,
- &Private->Snp.WaitForPacket
- );
+ Status = gBS->CreateEvent(
+ EVT_NOTIFY_WAIT,
+ TPL_NOTIFY,
+ UnixSnpWaitForPacketNotify,
+ Private,
+ &Private->Snp.WaitForPacket
+ );
#endif
- if ( !EFI_ERROR( Status ) )
- {
- Private->Mode.MCastFilterCount = 0;
- Private->Mode.ReceiveFilterSetting = 0;
- ZeroMem( Private->Mode.MCastFilter, sizeof( Private->Mode.MCastFilter ) );
+ if ( !EFI_ERROR( Status ) )
+ {
+ Private->Mode.MCastFilterCount = 0;
+ Private->Mode.ReceiveFilterSetting = 0;
+ ZeroMem( Private->Mode.MCastFilter, sizeof( Private->Mode.MCastFilter ) );
- Private->Snp.Mode->State = EfiSimpleNetworkInitialized;
- }
+ Private->Snp.Mode->State = EfiSimpleNetworkInitialized;
+ }
- return( Status );
+ return( Status );
}
/**
@@ -1231,30 +1231,30 @@ UnixSnpInitialize(
EFI_STATUS
EFIAPI
UnixSnpReset(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN ExtendedVerification
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN ExtendedVerification
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private;
- EFI_STATUS Success = EFI_SUCCESS;
+ UNIX_SNP_PRIVATE_DATA* Private;
+ EFI_STATUS Success = EFI_SUCCESS;
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
- switch ( Private->Snp.Mode->State )
- {
- case EfiSimpleNetworkInitialized:
- break;
+ switch ( Private->Snp.Mode->State )
+ {
+ case EfiSimpleNetworkInitialized:
+ break;
- case EfiSimpleNetworkStopped:
- return( EFI_NOT_STARTED );
- break;
+ case EfiSimpleNetworkStopped:
+ return( EFI_NOT_STARTED );
+ break;
- default:
- return( EFI_DEVICE_ERROR );
- break;
- }
+ default:
+ return( EFI_DEVICE_ERROR );
+ break;
+ }
- return( Success );
+ return( Success );
}
/**
@@ -1269,53 +1269,53 @@ UnixSnpReset(
EFI_STATUS
EFIAPI
UnixSnpShutdown(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private;
- EFI_STATUS Success = EFI_SUCCESS;
-
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
-
- switch ( Private->Snp.Mode->State )
- {
- case EfiSimpleNetworkInitialized:
- break;
-
- case EfiSimpleNetworkStopped:
- return( EFI_NOT_STARTED );
- break;
-
- default:
- return( EFI_DEVICE_ERROR );
- break;
- }
-
- Private->Snp.Mode->State = EfiSimpleNetworkStarted;
-
- Private->Mode.ReceiveFilterSetting = 0;
- Private->Mode.MCastFilterCount = 0;
- ZeroMem( Private->Mode.MCastFilter, sizeof( Private->Mode.MCastFilter ) );
-
- if ( Private->Snp.WaitForPacket != NULL )
- {
- gBS->CloseEvent( Private->Snp.WaitForPacket );
- Private->Snp.WaitForPacket = NULL;
- }
-
- if ( Private->BpfFd != 0 )
- {
- Private->UnixThunk->Close( Private->BpfFd );
- Private->BpfFd = 0;
- }
-
- if ( Private->ReadBuffer != NULL )
- {
- FreePool( Private->ReadBuffer );
- Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer = NULL;
- }
-
- return( Success );
+ UNIX_SNP_PRIVATE_DATA* Private;
+ EFI_STATUS Success = EFI_SUCCESS;
+
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
+
+ switch ( Private->Snp.Mode->State )
+ {
+ case EfiSimpleNetworkInitialized:
+ break;
+
+ case EfiSimpleNetworkStopped:
+ return( EFI_NOT_STARTED );
+ break;
+
+ default:
+ return( EFI_DEVICE_ERROR );
+ break;
+ }
+
+ Private->Snp.Mode->State = EfiSimpleNetworkStarted;
+
+ Private->Mode.ReceiveFilterSetting = 0;
+ Private->Mode.MCastFilterCount = 0;
+ ZeroMem( Private->Mode.MCastFilter, sizeof( Private->Mode.MCastFilter ) );
+
+ if ( Private->Snp.WaitForPacket != NULL )
+ {
+ gBS->CloseEvent( Private->Snp.WaitForPacket );
+ Private->Snp.WaitForPacket = NULL;
+ }
+
+ if ( Private->BpfFd != 0 )
+ {
+ Private->UnixThunk->Close( Private->BpfFd );
+ Private->BpfFd = 0;
+ }
+
+ if ( Private->ReadBuffer != NULL )
+ {
+ FreePool( Private->ReadBuffer );
+ Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer = NULL;
+ }
+
+ return( Success );
}
/**
@@ -1342,17 +1342,17 @@ UnixSnpShutdown(
EFI_STATUS
EFIAPI
UnixSnpReceiveFilters(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN UINT32 EnableBits,
- IN UINT32 DisableBits,
- IN BOOLEAN ResetMcastFilter,
- IN UINTN McastFilterCount OPTIONAL,
- IN EFI_MAC_ADDRESS* McastFilter OPTIONAL
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN UINT32 EnableBits,
+ IN UINT32 DisableBits,
+ IN BOOLEAN ResetMcastFilter,
+ IN UINTN McastFilterCount OPTIONAL,
+ IN EFI_MAC_ADDRESS* McastFilter OPTIONAL
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private;
+ UNIX_SNP_PRIVATE_DATA* Private;
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
// ReturnValue = GlobalData->NtNetUtilityTable.SetReceiveFilter (
// Instance->InterfaceInfo.InterfaceIndex,
@@ -1361,8 +1361,8 @@ UnixSnpReceiveFilters(
// McastFilter
// );
- // For now, just succeed...
- return( EFI_SUCCESS );
+ // For now, just succeed...
+ return( EFI_SUCCESS );
}
/**
@@ -1379,12 +1379,12 @@ UnixSnpReceiveFilters(
EFI_STATUS
EFIAPI
UnixSnpStationAddress(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN Reset,
- IN EFI_MAC_ADDRESS* NewMacAddr OPTIONAL
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN Reset,
+ IN EFI_MAC_ADDRESS* NewMacAddr OPTIONAL
+ )
{
- return( EFI_UNSUPPORTED );
+ return( EFI_UNSUPPORTED );
}
/**
@@ -1409,13 +1409,13 @@ UnixSnpStationAddress(
EFI_STATUS
EFIAPI
UnixSnpStatistics(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN Reset,
- IN OUT UINTN* StatisticsSize OPTIONAL,
- OUT EFI_NETWORK_STATISTICS* StatisticsTable OPTIONAL
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN Reset,
+ IN OUT UINTN* StatisticsSize OPTIONAL,
+ OUT EFI_NETWORK_STATISTICS* StatisticsTable OPTIONAL
+ )
{
- return( EFI_UNSUPPORTED );
+ return( EFI_UNSUPPORTED );
}
/**
@@ -1440,13 +1440,13 @@ UnixSnpStatistics(
EFI_STATUS
EFIAPI
UnixSnpMcastIptoMac(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN Ipv6,
- IN EFI_IP_ADDRESS* Ip,
- OUT EFI_MAC_ADDRESS* Mac
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN Ipv6,
+ IN EFI_IP_ADDRESS* Ip,
+ OUT EFI_MAC_ADDRESS* Mac
+ )
{
- return( EFI_UNSUPPORTED );
+ return( EFI_UNSUPPORTED );
}
@@ -1469,14 +1469,14 @@ UnixSnpMcastIptoMac(
EFI_STATUS
EFIAPI
UnixSnpNvdata(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN BOOLEAN ReadOrWrite,
- IN UINTN Offset,
- IN UINTN BufferSize,
- IN OUT VOID* Buffer
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN BOOLEAN ReadOrWrite,
+ IN UINTN Offset,
+ IN UINTN BufferSize,
+ IN OUT VOID* Buffer
+ )
{
- return( EFI_UNSUPPORTED );
+ return( EFI_UNSUPPORTED );
}
@@ -1504,22 +1504,22 @@ UnixSnpNvdata(
EFI_STATUS
EFIAPI
UnixSnpGetStatus(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- OUT UINT32* InterruptStatus,
- OUT VOID** TxBuffer
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ OUT UINT32* InterruptStatus,
+ OUT VOID** TxBuffer
+ )
{
- if ( TxBuffer != NULL )
- {
- *( ( UINT8 ** ) TxBuffer ) = ( UINT8 * ) 1;
- }
+ if ( TxBuffer != NULL )
+ {
+ *( ( UINT8 ** ) TxBuffer ) = ( UINT8 * ) 1;
+ }
- if ( InterruptStatus != NULL )
- {
- *InterruptStatus = EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;
- }
+ if ( InterruptStatus != NULL )
+ {
+ *InterruptStatus = EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;
+ }
- return( EFI_SUCCESS );
+ return( EFI_SUCCESS );
}
@@ -1556,56 +1556,56 @@ UnixSnpGetStatus(
EFI_STATUS
EFIAPI
UnixSnpTransmit(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- IN UINTN HeaderSize,
- IN UINTN BufferSize,
- IN VOID* Buffer,
- IN EFI_MAC_ADDRESS* SrcAddr OPTIONAL,
- IN EFI_MAC_ADDRESS* DestAddr OPTIONAL,
- IN UINT16* Protocol OPTIONAL
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ IN UINTN HeaderSize,
+ IN UINTN BufferSize,
+ IN VOID* Buffer,
+ IN EFI_MAC_ADDRESS* SrcAddr OPTIONAL,
+ IN EFI_MAC_ADDRESS* DestAddr OPTIONAL,
+ IN UINT16* Protocol OPTIONAL
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private;
- EthernetHeader* EnetHeader;
- INTN Result;
-
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
-
- if ( This->Mode->State < EfiSimpleNetworkStarted )
- {
- return( EFI_NOT_STARTED );
- }
-
- if ( HeaderSize != 0 )
- {
- if ( ( DestAddr == NULL ) || ( Protocol == NULL ) || ( HeaderSize != This->Mode->MediaHeaderSize ) )
- {
- return( EFI_INVALID_PARAMETER );
- }
-
- if ( SrcAddr == NULL )
- {
- SrcAddr = &This->Mode->CurrentAddress;
- }
-
- EnetHeader = ( EthernetHeader * ) Buffer;
-
- CopyMem( EnetHeader->DstAddr, DestAddr, NET_ETHER_ADDR_LEN );
- CopyMem( EnetHeader->SrcAddr, SrcAddr, NET_ETHER_ADDR_LEN );
-
- EnetHeader->Type = HTONS( *Protocol );
- }
-
- Result = Private->UnixThunk->Write( Private->BpfFd, Buffer, BufferSize );
-
- if ( Result < 0 )
- {
- return( EFI_DEVICE_ERROR );
- }
- else
- {
- return( EFI_SUCCESS );
- }
+ UNIX_SNP_PRIVATE_DATA* Private;
+ EthernetHeader* EnetHeader;
+ INTN Result;
+
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
+
+ if ( This->Mode->State < EfiSimpleNetworkStarted )
+ {
+ return( EFI_NOT_STARTED );
+ }
+
+ if ( HeaderSize != 0 )
+ {
+ if ( ( DestAddr == NULL ) || ( Protocol == NULL ) || ( HeaderSize != This->Mode->MediaHeaderSize ) )
+ {
+ return( EFI_INVALID_PARAMETER );
+ }
+
+ if ( SrcAddr == NULL )
+ {
+ SrcAddr = &This->Mode->CurrentAddress;
+ }
+
+ EnetHeader = ( EthernetHeader * ) Buffer;
+
+ CopyMem( EnetHeader->DstAddr, DestAddr, NET_ETHER_ADDR_LEN );
+ CopyMem( EnetHeader->SrcAddr, SrcAddr, NET_ETHER_ADDR_LEN );
+
+ EnetHeader->Type = HTONS( *Protocol );
+ }
+
+ Result = Private->UnixThunk->Write( Private->BpfFd, Buffer, BufferSize );
+
+ if ( Result < 0 )
+ {
+ return( EFI_DEVICE_ERROR );
+ }
+ else
+ {
+ return( EFI_SUCCESS );
+ }
}
/**
@@ -1641,116 +1641,116 @@ UnixSnpTransmit(
EFI_STATUS
EFIAPI
UnixSnpReceive(
- IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
- OUT UINTN* HeaderSize OPTIONAL,
- IN OUT UINTN* BuffSize,
- OUT VOID* Buffer,
- OUT EFI_MAC_ADDRESS* SourceAddr OPTIONAL,
- OUT EFI_MAC_ADDRESS* DestinationAddr OPTIONAL,
- OUT UINT16* Protocol OPTIONAL
- )
+ IN EFI_SIMPLE_NETWORK_PROTOCOL* This,
+ OUT UINTN* HeaderSize OPTIONAL,
+ IN OUT UINTN* BuffSize,
+ OUT VOID* Buffer,
+ OUT EFI_MAC_ADDRESS* SourceAddr OPTIONAL,
+ OUT EFI_MAC_ADDRESS* DestinationAddr OPTIONAL,
+ OUT UINT16* Protocol OPTIONAL
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private;
- struct bpf_hdr* BpfHeader;
- EthernetHeader* EnetHeader;
- EFI_STATUS Status = EFI_SUCCESS;
- INTN Result;
-
- if ( This->Mode->State < EfiSimpleNetworkStarted )
- {
- return( EFI_NOT_STARTED );
- }
-
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
-
- //
- // Do we have any remaining packets from the previous read?
- //
- if ( Private->CurrentReadPointer >= Private->EndReadPointer )
- {
- Result = Private->UnixThunk->Read( Private->BpfFd, Private->ReadBuffer, Private->ReadBufferSize );
-
- if ( Result < 0 )
- {
- Result = Private->UnixThunk->GetErrno();
-
- //
- // EAGAIN means that there's no I/O outstanding against this file descriptor.
- //
- if ( Result == EAGAIN )
- {
- return( EFI_NOT_READY );
- }
- else
- {
- return( EFI_DEVICE_ERROR );
- }
- }
-
- if ( Result == 0 )
- {
- return( EFI_NOT_READY );
- }
-
- Private->CurrentReadPointer = Private->ReadBuffer;
- Private->EndReadPointer = Private->CurrentReadPointer + Result;
- }
-
- BpfHeader = Private->CurrentReadPointer;
- EnetHeader = Private->CurrentReadPointer + BpfHeader->bh_hdrlen;
-
- if ( BpfHeader->bh_caplen > *BuffSize )
- {
- *BuffSize = BpfHeader->bh_caplen;
- return( EFI_BUFFER_TOO_SMALL );
- }
-
- CopyMem( Buffer, EnetHeader, BpfHeader->bh_caplen );
- *BuffSize = BpfHeader->bh_caplen;
-
- if ( HeaderSize != NULL )
- {
- *HeaderSize = sizeof( EthernetHeader );
- }
-
- if ( DestinationAddr != NULL )
- {
- ZeroMem( DestinationAddr, sizeof( EFI_MAC_ADDRESS ) );
- CopyMem( DestinationAddr, EnetHeader->DstAddr, NET_ETHER_ADDR_LEN );
- }
-
- if ( SourceAddr != NULL )
- {
- ZeroMem( SourceAddr, sizeof( EFI_MAC_ADDRESS ) );
- CopyMem( SourceAddr, EnetHeader->SrcAddr, NET_ETHER_ADDR_LEN );
- }
-
- if ( Protocol != NULL )
- {
- *Protocol = NTOHS( EnetHeader->Type );
- }
-
- Private->CurrentReadPointer += BPF_WORDALIGN( BpfHeader->bh_hdrlen + BpfHeader->bh_caplen );
-
- return( Status );
+ UNIX_SNP_PRIVATE_DATA* Private;
+ struct bpf_hdr* BpfHeader;
+ EthernetHeader* EnetHeader;
+ EFI_STATUS Status = EFI_SUCCESS;
+ INTN Result;
+
+ if ( This->Mode->State < EfiSimpleNetworkStarted )
+ {
+ return( EFI_NOT_STARTED );
+ }
+
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );
+
+ //
+ // Do we have any remaining packets from the previous read?
+ //
+ if ( Private->CurrentReadPointer >= Private->EndReadPointer )
+ {
+ Result = Private->UnixThunk->Read( Private->BpfFd, Private->ReadBuffer, Private->ReadBufferSize );
+
+ if ( Result < 0 )
+ {
+ Result = Private->UnixThunk->GetErrno();
+
+ //
+ // EAGAIN means that there's no I/O outstanding against this file descriptor.
+ //
+ if ( Result == EAGAIN )
+ {
+ return( EFI_NOT_READY );
+ }
+ else
+ {
+ return( EFI_DEVICE_ERROR );
+ }
+ }
+
+ if ( Result == 0 )
+ {
+ return( EFI_NOT_READY );
+ }
+
+ Private->CurrentReadPointer = Private->ReadBuffer;
+ Private->EndReadPointer = Private->CurrentReadPointer + Result;
+ }
+
+ BpfHeader = Private->CurrentReadPointer;
+ EnetHeader = Private->CurrentReadPointer + BpfHeader->bh_hdrlen;
+
+ if ( BpfHeader->bh_caplen > *BuffSize )
+ {
+ *BuffSize = BpfHeader->bh_caplen;
+ return( EFI_BUFFER_TOO_SMALL );
+ }
+
+ CopyMem( Buffer, EnetHeader, BpfHeader->bh_caplen );
+ *BuffSize = BpfHeader->bh_caplen;
+
+ if ( HeaderSize != NULL )
+ {
+ *HeaderSize = sizeof( EthernetHeader );
+ }
+
+ if ( DestinationAddr != NULL )
+ {
+ ZeroMem( DestinationAddr, sizeof( EFI_MAC_ADDRESS ) );
+ CopyMem( DestinationAddr, EnetHeader->DstAddr, NET_ETHER_ADDR_LEN );
+ }
+
+ if ( SourceAddr != NULL )
+ {
+ ZeroMem( SourceAddr, sizeof( EFI_MAC_ADDRESS ) );
+ CopyMem( SourceAddr, EnetHeader->SrcAddr, NET_ETHER_ADDR_LEN );
+ }
+
+ if ( Protocol != NULL )
+ {
+ *Protocol = NTOHS( EnetHeader->Type );
+ }
+
+ Private->CurrentReadPointer += BPF_WORDALIGN( BpfHeader->bh_hdrlen + BpfHeader->bh_caplen );
+
+ return( Status );
}
VOID
EFIAPI
UnixSnpWaitForPacketNotify(
- IN EFI_EVENT Event,
- IN VOID* Context
- )
+ IN EFI_EVENT Event,
+ IN VOID* Context
+ )
{
- UNIX_SNP_PRIVATE_DATA* Private;
+ UNIX_SNP_PRIVATE_DATA* Private;
- Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( Context );
+ Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( Context );
- if ( Private->Snp.Mode->State < EfiSimpleNetworkStarted )
- {
- return;
- }
+ if ( Private->Snp.Mode->State < EfiSimpleNetworkStarted )
+ {
+ return;
+ }
}
@@ -1768,24 +1768,24 @@ UnixSnpWaitForPacketNotify(
**/
EFI_STATUS
InitializeUnixSnpDriver(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE* SystemTable
- )
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE* SystemTable
+ )
{
- EFI_STATUS Status;
-
- //
- // Install the Driver Protocols
- //
-
- Status = EfiLibInstallDriverBindingComponentName2(
- ImageHandle,
- SystemTable,
- &gUnixSnpDriverBinding,
- ImageHandle,
- &gUnixSnpDriverComponentName,
- &gUnixSnpDriverComponentName2
- );
-
- return( Status );
+ EFI_STATUS Status;
+
+ //
+ // Install the Driver Protocols
+ //
+
+ Status = EfiLibInstallDriverBindingComponentName2(
+ ImageHandle,
+ SystemTable,
+ &gUnixSnpDriverBinding,
+ ImageHandle,
+ &gUnixSnpDriverComponentName,
+ &gUnixSnpDriverComponentName2
+ );
+
+ return( Status );
}
diff --git a/UnixPkg/UnixSnpDxe/UnixSnp.h b/UnixPkg/UnixSnpDxe/UnixSnp.h
index 9f0a34a28d..532119afa4 100644
--- a/UnixPkg/UnixSnpDxe/UnixSnp.h
+++ b/UnixPkg/UnixSnpDxe/UnixSnp.h
@@ -46,33 +46,33 @@ Abstract:
typedef struct
{
- UINT32 Signature;
+ UINT32 Signature;
- EFI_UNIX_THUNK_PROTOCOL* UnixThunk;
+ EFI_UNIX_THUNK_PROTOCOL* UnixThunk;
- EFI_HANDLE DeviceHandle;
- EFI_DEVICE_PATH_PROTOCOL* DevicePath;
+ EFI_HANDLE DeviceHandle;
+ EFI_DEVICE_PATH_PROTOCOL* DevicePath;
- EFI_MAC_ADDRESS MacAddress;
+ EFI_MAC_ADDRESS MacAddress;
- CHAR8* InterfaceName;
- INTN ReadBufferSize;
- VOID* ReadBuffer;
- //
- // Two walking pointers to manage the multiple packets that can be returned
- // in a single read.
- //
- VOID* CurrentReadPointer;
- VOID* EndReadPointer;
+ CHAR8* InterfaceName;
+ INTN ReadBufferSize;
+ VOID* ReadBuffer;
+ //
+ // Two walking pointers to manage the multiple packets that can be returned
+ // in a single read.
+ //
+ VOID* CurrentReadPointer;
+ VOID* EndReadPointer;
- INTN BpfFd;
+ INTN BpfFd;
- EFI_SIMPLE_NETWORK_PROTOCOL Snp;
- EFI_SIMPLE_NETWORK_MODE Mode;
+ EFI_SIMPLE_NETWORK_PROTOCOL Snp;
+ EFI_SIMPLE_NETWORK_MODE Mode;
} UNIX_SNP_PRIVATE_DATA;
#define UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS(a) \
- CR( a, UNIX_SNP_PRIVATE_DATA, Snp, UNIX_SNP_PRIVATE_DATA_SIGNATURE )
+ CR( a, UNIX_SNP_PRIVATE_DATA, Snp, UNIX_SNP_PRIVATE_DATA_SIGNATURE )
extern EFI_DRIVER_BINDING_PROTOCOL gUnixSnpDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gUnixSnpDriverComponentName;
@@ -153,4 +153,4 @@ UnixSnpDriverBindingStop (
IN EFI_HANDLE *ChildHandleBuffer
);
-#endif // _UNIX_SNP_H_
+#endif // _UNIX_SNP_H_