mirror of https://github.com/acidanthera/audk.git
ARM Packages: Minor typo, mispellings and coding style changes
Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13752 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4706ff4fbc
commit
b34e4db382
|
@ -2,7 +2,7 @@
|
||||||
# ARM processor package.
|
# ARM processor package.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
|
||||||
# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
|
# Copyright (c) 2011 - 2012, ARM Limited. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
|
|
@ -749,14 +749,14 @@ ConvertSectionToPages (
|
||||||
|
|
||||||
DEBUG ((EFI_D_PAGE, "Converting section at 0x%x to pages\n", (UINTN)BaseAddress));
|
DEBUG ((EFI_D_PAGE, "Converting section at 0x%x to pages\n", (UINTN)BaseAddress));
|
||||||
|
|
||||||
// obtain page table base
|
// Obtain page table base
|
||||||
FirstLevelTable = (ARM_FIRST_LEVEL_DESCRIPTOR *)ArmGetTTBR0BaseAddress ();
|
FirstLevelTable = (ARM_FIRST_LEVEL_DESCRIPTOR *)ArmGetTTBR0BaseAddress ();
|
||||||
|
|
||||||
// calculate index into first level translation table for start of modification
|
// Calculate index into first level translation table for start of modification
|
||||||
FirstLevelIdx = TT_DESCRIPTOR_SECTION_BASE_ADDRESS(BaseAddress) >> TT_DESCRIPTOR_SECTION_BASE_SHIFT;
|
FirstLevelIdx = TT_DESCRIPTOR_SECTION_BASE_ADDRESS(BaseAddress) >> TT_DESCRIPTOR_SECTION_BASE_SHIFT;
|
||||||
ASSERT (FirstLevelIdx < TRANSLATION_TABLE_SECTION_COUNT);
|
ASSERT (FirstLevelIdx < TRANSLATION_TABLE_SECTION_COUNT);
|
||||||
|
|
||||||
// get section attributes and convert to page attributes
|
// Get section attributes and convert to page attributes
|
||||||
SectionDescriptor = FirstLevelTable[FirstLevelIdx];
|
SectionDescriptor = FirstLevelTable[FirstLevelIdx];
|
||||||
PageDescriptor = TT_DESCRIPTOR_PAGE_TYPE_PAGE;
|
PageDescriptor = TT_DESCRIPTOR_PAGE_TYPE_PAGE;
|
||||||
PageDescriptor |= TT_DESCRIPTOR_CONVERT_TO_PAGE_CACHE_POLICY(SectionDescriptor,0);
|
PageDescriptor |= TT_DESCRIPTOR_CONVERT_TO_PAGE_CACHE_POLICY(SectionDescriptor,0);
|
||||||
|
@ -765,7 +765,7 @@ ConvertSectionToPages (
|
||||||
PageDescriptor |= TT_DESCRIPTOR_CONVERT_TO_PAGE_NG(SectionDescriptor);
|
PageDescriptor |= TT_DESCRIPTOR_CONVERT_TO_PAGE_NG(SectionDescriptor);
|
||||||
PageDescriptor |= TT_DESCRIPTOR_CONVERT_TO_PAGE_S(SectionDescriptor);
|
PageDescriptor |= TT_DESCRIPTOR_CONVERT_TO_PAGE_S(SectionDescriptor);
|
||||||
|
|
||||||
// allocate a page table for the 4KB entries (we use up a full page even though we only need 1KB)
|
// Allocate a page table for the 4KB entries (we use up a full page even though we only need 1KB)
|
||||||
Status = gBS->AllocatePages (AllocateAnyPages, EfiBootServicesData, 1, &PageTableAddr);
|
Status = gBS->AllocatePages (AllocateAnyPages, EfiBootServicesData, 1, &PageTableAddr);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -773,18 +773,18 @@ ConvertSectionToPages (
|
||||||
|
|
||||||
PageTable = (volatile ARM_PAGE_TABLE_ENTRY *)(UINTN)PageTableAddr;
|
PageTable = (volatile ARM_PAGE_TABLE_ENTRY *)(UINTN)PageTableAddr;
|
||||||
|
|
||||||
// write the page table entries out
|
// Write the page table entries out
|
||||||
for (Index = 0; Index < TRANSLATION_TABLE_PAGE_COUNT; Index++) {
|
for (Index = 0; Index < TRANSLATION_TABLE_PAGE_COUNT; Index++) {
|
||||||
PageTable[Index] = TT_DESCRIPTOR_PAGE_BASE_ADDRESS(BaseAddress + (Index << 12)) | PageDescriptor;
|
PageTable[Index] = TT_DESCRIPTOR_PAGE_BASE_ADDRESS(BaseAddress + (Index << 12)) | PageDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
// flush d-cache so descriptors make it back to uncached memory for subsequent table walks
|
// Flush d-cache so descriptors make it back to uncached memory for subsequent table walks
|
||||||
WriteBackInvalidateDataCacheRange ((VOID *)(UINTN)PageTableAddr, TT_DESCRIPTOR_PAGE_SIZE);
|
WriteBackInvalidateDataCacheRange ((VOID *)(UINTN)PageTableAddr, TT_DESCRIPTOR_PAGE_SIZE);
|
||||||
|
|
||||||
// formulate page table entry, Domain=0, NS=0
|
// Formulate page table entry, Domain=0, NS=0
|
||||||
PageTableDescriptor = (((UINTN)PageTableAddr) & TT_DESCRIPTOR_SECTION_PAGETABLE_ADDRESS_MASK) | TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE;
|
PageTableDescriptor = (((UINTN)PageTableAddr) & TT_DESCRIPTOR_SECTION_PAGETABLE_ADDRESS_MASK) | TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE;
|
||||||
|
|
||||||
// write the page table entry out, replacing section entry
|
// Write the page table entry out, replacing section entry
|
||||||
FirstLevelTable[FirstLevelIdx] = PageTableDescriptor;
|
FirstLevelTable[FirstLevelIdx] = PageTableDescriptor;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
|
@ -118,11 +118,11 @@ EnableInterruptSource (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate enable register offset and bit position
|
// Calculate enable register offset and bit position
|
||||||
RegOffset = Source / 32;
|
RegOffset = Source / 32;
|
||||||
RegShift = Source % 32;
|
RegShift = Source % 32;
|
||||||
|
|
||||||
// write set-enable register
|
// Write set-enable register
|
||||||
MmioWrite32 (PcdGet32(PcdGicDistributorBase) + ARM_GIC_ICDISER + (4*RegOffset), 1 << RegShift);
|
MmioWrite32 (PcdGet32(PcdGicDistributorBase) + ARM_GIC_ICDISER + (4*RegOffset), 1 << RegShift);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
|
@ -137,7 +137,7 @@ TimerDriverSetTimerPeriod (
|
||||||
{
|
{
|
||||||
UINT64 TimerTicks;
|
UINT64 TimerTicks;
|
||||||
|
|
||||||
// always disable the timer
|
// Always disable the timer
|
||||||
ArmArchTimerDisableTimer ();
|
ArmArchTimerDisableTimer ();
|
||||||
|
|
||||||
if (TimerPeriod != 0) {
|
if (TimerPeriod != 0) {
|
||||||
|
|
|
@ -17,35 +17,13 @@
|
||||||
#define __SEMIHOST_FS_H__
|
#define __SEMIHOST_FS_H__
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
SemihostFsSupported(
|
VolumeOpen (
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE Controller,
|
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
SemihostFsStart(
|
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE Controller,
|
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
SemihostFsStop(
|
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE Controller,
|
|
||||||
IN UINTN NumberOfChildren,
|
|
||||||
IN EFI_HANDLE *ChildHandleBuffer
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
VolumeOpen(
|
|
||||||
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,
|
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,
|
||||||
OUT EFI_FILE **Root
|
OUT EFI_FILE **Root
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileOpen(
|
FileOpen (
|
||||||
IN EFI_FILE *File,
|
IN EFI_FILE *File,
|
||||||
OUT EFI_FILE **NewHandle,
|
OUT EFI_FILE **NewHandle,
|
||||||
IN CHAR16 *FileName,
|
IN CHAR16 *FileName,
|
||||||
|
@ -54,7 +32,7 @@ FileOpen(
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileClose(
|
FileClose (
|
||||||
IN EFI_FILE *File
|
IN EFI_FILE *File
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -64,33 +42,33 @@ FileDelete(
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileRead(
|
FileRead (
|
||||||
IN EFI_FILE *File,
|
IN EFI_FILE *File,
|
||||||
IN OUT UINTN *BufferSize,
|
IN OUT UINTN *BufferSize,
|
||||||
OUT VOID *Buffer
|
OUT VOID *Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileWrite(
|
FileWrite (
|
||||||
IN EFI_FILE *File,
|
IN EFI_FILE *File,
|
||||||
IN OUT UINTN *BufferSize,
|
IN OUT UINTN *BufferSize,
|
||||||
IN VOID *Buffer
|
IN VOID *Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileGetPosition(
|
FileGetPosition (
|
||||||
IN EFI_FILE *File,
|
IN EFI_FILE *File,
|
||||||
OUT UINT64 *Position
|
OUT UINT64 *Position
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileSetPosition(
|
FileSetPosition (
|
||||||
IN EFI_FILE *File,
|
IN EFI_FILE *File,
|
||||||
IN UINT64 Position
|
IN UINT64 Position
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileGetInfo(
|
FileGetInfo (
|
||||||
IN EFI_FILE *File,
|
IN EFI_FILE *File,
|
||||||
IN EFI_GUID *InformationType,
|
IN EFI_GUID *InformationType,
|
||||||
IN OUT UINTN *BufferSize,
|
IN OUT UINTN *BufferSize,
|
||||||
|
@ -98,7 +76,7 @@ FileGetInfo(
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileSetInfo(
|
FileSetInfo (
|
||||||
IN EFI_FILE *File,
|
IN EFI_FILE *File,
|
||||||
IN EFI_GUID *InformationType,
|
IN EFI_GUID *InformationType,
|
||||||
IN UINTN BufferSize,
|
IN UINTN BufferSize,
|
||||||
|
@ -106,7 +84,7 @@ FileSetInfo(
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
FileFlush(
|
FileFlush (
|
||||||
IN EFI_FILE *File
|
IN EFI_FILE *File
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
#/** @file
|
#/** @file
|
||||||
# Support a Semi Host file system over a debuggers JTAG
|
# Support a Semi Host file system over a debuggers JTAG
|
||||||
#
|
#
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "BdsInternal.h"
|
#include "BdsInternal.h"
|
||||||
|
#include "BdsLinuxLoader.h"
|
||||||
|
|
||||||
#define ALIGN32_BELOW(addr) ALIGN_POINTER(addr - 32,32)
|
#define ALIGN32_BELOW(addr) ALIGN_POINTER(addr - 32,32)
|
||||||
|
|
||||||
|
@ -122,7 +123,7 @@ Exit:
|
||||||
Start a Linux kernel from a Device Path
|
Start a Linux kernel from a Device Path
|
||||||
|
|
||||||
@param LinuxKernel Device Path to the Linux Kernel
|
@param LinuxKernel Device Path to the Linux Kernel
|
||||||
@param Parameters Linux kernel agruments
|
@param Parameters Linux kernel arguments
|
||||||
@param Fdt Device Path to the Flat Device Tree
|
@param Fdt Device Path to the Flat Device Tree
|
||||||
|
|
||||||
@retval EFI_SUCCESS All drivers have been connected
|
@retval EFI_SUCCESS All drivers have been connected
|
||||||
|
@ -193,7 +194,7 @@ BdsBootLinuxAtag (
|
||||||
Start a Linux kernel from a Device Path
|
Start a Linux kernel from a Device Path
|
||||||
|
|
||||||
@param LinuxKernel Device Path to the Linux Kernel
|
@param LinuxKernel Device Path to the Linux Kernel
|
||||||
@param Parameters Linux kernel agruments
|
@param Parameters Linux kernel arguments
|
||||||
@param Fdt Device Path to the Flat Device Tree
|
@param Fdt Device Path to the Flat Device Tree
|
||||||
|
|
||||||
@retval EFI_SUCCESS All drivers have been connected
|
@retval EFI_SUCCESS All drivers have been connected
|
||||||
|
|
|
@ -307,8 +307,8 @@ StartDefaultBootOnTimeout (
|
||||||
UINTN BootOrderSize;
|
UINTN BootOrderSize;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
CHAR16 BootVariableName[9];
|
CHAR16 BootVariableName[9];
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_INPUT_KEY Key;
|
EFI_INPUT_KEY Key;
|
||||||
|
|
||||||
Size = sizeof(UINT16);
|
Size = sizeof(UINT16);
|
||||||
Timeout = (UINT16)PcdGet16 (PcdPlatformBootTimeOut);
|
Timeout = (UINT16)PcdGet16 (PcdPlatformBootTimeOut);
|
||||||
|
|
|
@ -778,7 +778,7 @@ BdsLoadOptionTftpList (
|
||||||
Status = GenerateDeviceDescriptionName (HandleBuffer[Index], DeviceDescription);
|
Status = GenerateDeviceDescriptionName (HandleBuffer[Index], DeviceDescription);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
UnicodeSPrint (SupportedDevice->Description,BOOT_DEVICE_DESCRIPTION_MAX,L"TFP on %s",DeviceDescription);
|
UnicodeSPrint (SupportedDevice->Description,BOOT_DEVICE_DESCRIPTION_MAX,L"TFTP on %s",DeviceDescription);
|
||||||
|
|
||||||
SupportedDevice->DevicePathProtocol = DevicePathProtocol;
|
SupportedDevice->DevicePathProtocol = DevicePathProtocol;
|
||||||
SupportedDevice->Support = &BdsLoadOptionSupportList[BDS_DEVICE_TFTP];
|
SupportedDevice->Support = &BdsLoadOptionSupportList[BDS_DEVICE_TFTP];
|
||||||
|
|
|
@ -35,7 +35,7 @@ InitMmu (
|
||||||
UINTN TranslationTableSize;
|
UINTN TranslationTableSize;
|
||||||
|
|
||||||
// Get Virtual Memory Map from the Platform Library
|
// Get Virtual Memory Map from the Platform Library
|
||||||
ArmPlatformGetVirtualMemoryMap(&MemoryTable);
|
ArmPlatformGetVirtualMemoryMap (&MemoryTable);
|
||||||
|
|
||||||
//Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in
|
//Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in
|
||||||
// DRAM (even at the top of DRAM as it is the first permanent memory allocation)
|
// DRAM (even at the top of DRAM as it is the first permanent memory allocation)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
#
|
#
|
||||||
# Component discription file for Timer module
|
# Component description file for Timer module
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009, Apple Inc. All rights reserved.<BR>
|
# Copyright (c) 2009, Apple Inc. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
|
|
Loading…
Reference in New Issue