Re: [edk2] [PATCH 1/3] MdePkg: introduce DxeRuntimeDebugLibSerialPort

2018-02-20 Thread Andrew Fish
> Possible ways of handling this that I can think > of include: > - Don't respect BREAKPOINT/DEADLOOP if at runtime. > - Respect BREAKPOINT/DEADLOOP and disable all cores. > - Take ownership back of the system and re-enable 1:1 mapping so > messages can be printed. > There

[edk2] OEM EFI_STATUS Code Ranges?

2018-02-19 Thread Andrew Fish
NG(a) ((MAX_BIT >> 1) | (a)) Thanks, Andrew Fish ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] [PATCH v2 05/10] MdeModulePkg/ResetSystemRuntimeDxe: Add more debug message

2018-02-19 Thread Andrew Fish
n't have a generic >solution as it is kind of dangerous. For example what happens if the OS has a >kernel debugger running on that serial port and EFI Spews DEBUG prints, that >would probably not come out well. For things I've written I usually end up writing a macro that does som

Re: [edk2] [Patch] MdePkg/BaseSafeIntLib: Add SafeIntLib class and instance

2018-02-13 Thread Andrew Fish
## @main .cfi_startproc ## BB#0: pushq %rbp Lcfi0: .cfi_def_cfa_offset 16 Lcfi1: .cfi_offset %rbp, -16 movq%rsp, %rbp Lcfi2: .cfi_def_cfa_register %rbp ud2 .cfi_endproc .subsections_via_symbols Thanks, Andrew Fish >

Re: [edk2] how do I use RamDiskDxe?

2018-02-12 Thread Andrew Fish
nd > on the wiki) regarding setting up RamDiskDxe? > Traditionally network booting has involved loading a single file over the network (like an OS Loader) and that file uses the UEFI networking stack to download (TFTP read) more images (like the Kernel) from a lo

Re: [edk2] Patch to fix EFIAPI definition

2018-02-12 Thread Andrew Fish
rk correctly with the supported toolchains. It is very hard to support some conceptual toolchain if a version of that toolchain is not checked in as there is no way to test it. Thanks, Andrew Fish > On Friday, February 9, 2018 2:17 AM, Andrew Fish <af...@apple.com> wrote: > &g

Re: [edk2] Patch to fix EFIAPI definition

2018-02-08 Thread Andrew Fish
arm parameter the compiler will generate correct > code. > Ruslan, Thanks for the info. I guess I still have the question of if you are making firmware why not solve this problem with compiler flags in the 1st place. Thanks, Andrew Fish > >On Friday, February 9, 2018 1:59 AM,

Re: [edk2] Patch to fix EFIAPI definition

2018-02-08 Thread Andrew Fish
ld EFIABI, but output a mach-O executable (we need the mach-O for our debugger). Basically with clang you could upstream what you need into the compiler you are using for other things... Thanks, Andrew Fish > - Ruslan > ___ > edk2-devel mailing

Re: [edk2] [EDK2] How to use compiler intrinsic function, such as :mmintrin.h

2018-02-05 Thread Andrew Fish
to be valid. Don't cause exceptions as there is no code to handle it. Etc. Thanks, Andrew Fish > On Feb 5, 2018, at 8:57 PM, Tiger Liu(BJ-RD) <tiger...@zhaoxin.com> wrote: > > Hi, Liming: > Thanks for your reply. > I tried to compile a UEFI shell application. >

Re: [edk2] Why the DEBUG can't output the full string?

2018-02-01 Thread Andrew Fish
ges, they > will be truncated. > > For example, in "MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c", > there is: > > #define MAX_DEBUG_MESSAGE_LENGTH 0x100 > > (I don't really understand your situation because the first debug > message that you pa

Re: [edk2] [Patch] BaseTools: Enhance parse performance by optimize ValueExpressionEx

2018-01-26 Thread Andrew Fish
Any data on the performance improvement? Thanks, Andrew Fish > On Jan 26, 2018, at 8:28 AM, Yonghong Zhu <yonghong@intel.com> wrote: > > From: Yunhua Feng <yunhuax.f...@intel.com> > > Optimize ValueExpressionEx function to enhance meta-data file parse > pe

Re: [edk2] DMA Buffer write operation not persisted

2018-01-25 Thread Andrew Fish
y need to change the cacheability of the region etc. Thanks, Andrew Fish > On Jan 25, 2018, at 10:53 AM, Rafael Machado > <rafaelrodrigues.mach...@gmail.com> wrote: > > Hi everyone. > > I'm currently work on a task, and I need to write some data at a DMA buffer. >

Re: [edk2] EDK debug question

2018-01-23 Thread Andrew Fish
ia inb is IoRead8() and outb is IoWrite8() C API and you don't have to write it in assembler. Thanks, Andrew Fish > On Jan 23, 2018, at 10:31 PM, JUNWEN JIA <jiajunwen...@gmail.com> wrote: > > Hi, Andrew: >Thanks for your reply. What I was trying is to restart my computer af

Re: [edk2] EDK debug question

2018-01-23 Thread Andrew Fish
e we should start with what you are trying to write in assembler as there is no portable way to reboot a system from assembler. Thanks, Andrew Fish > this: > #include > Void main() > { > Reboot(); > } > But the compiled result is Reboot.lib(Reboot.obj):error LNK2001

Re: [edk2] EDK II debug question

2018-01-22 Thread Andrew Fish
Also the BaseLib has a lot of C APIs that abstract a lot of common things you use online assembly for. Not to mention that how to do inline assembly is not standard in C. Sent from my iPhone > On Jan 22, 2018, at 7:18 AM, Gao, Liming wrote: > > You need to write the

[edk2] Anyone got a good example of using acpica.org to execute AML code under EFI?

2018-01-16 Thread Andrew Fish
I was looking for some code to execute AML under ACPI. I see the acpica github supports building acpidump... Does anyone know of an example that supports executing AML from EFI? Thanks, Andrew Fish ___ edk2-devel mailing list edk2-devel@lists.01.org

Re: [edk2] How to using PcdGetEx to change a PCD.

2017-12-14 Thread Andrew Fish
e non Ex form to save space. If different binaries that got compiled in different places need to work together then the Ex form is required. Thanks, Andrew Fish > EFI_STATUS > EFIAPI > UefiMain ( > IN EFI_HANDLE ImageHandle, > IN EFI_SYSTEM_TABLE *SystemTable &

Re: [edk2] Documentation on "dh" shell command

2017-12-13 Thread Andrew Fish
er Interface name for the handle. The names after the colon represent protocol instances on the handle. You can get more info about the protocols by dumping the handle so: dh 14D Thanks, Andrew Fish > But documentation is not saying what is column 1, 2 and so on > What I am looking

Re: [edk2] edk2 interface deprecation policy

2017-11-30 Thread Andrew Fish
, Andrew Fish > On Nov 30, 2017, at 6:00 AM, Felix Poludov <fel...@ami.com> wrote: > > Does edk2 have a policy regarding deprecation of interface definition headers? > I can see that definition of the UgaDraw protocol that was deprecated years > ago (I believe in UEFI 2.0) is still

Re: [edk2] [PATCH 0/2] Enable page table write protection

2017-11-29 Thread Andrew Fish
> In practice it's almost impossible to let it happen but the chances are we > will fall into > such recursive situation more than one level. > Why not just have the page table update code turn off the write protect when it is modifying tables, and then turn it back on? Or am I

[edk2] Anyone interested in core dumps for EFI?

2017-11-28 Thread Andrew Fish
. Seemed like an interesting topic to think about Thanks, Andrew Fish ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] [MdeModulePkg/TerminalDxe] Why do we delay 2s for ESC being pressed?

2017-11-28 Thread Andrew Fish
Big picture I think the goal is to not make the driver depend on the PCD protocol. A fixed at build PCD is just part of the build system, so not an issue. Thanks, Andrew Fish > On Nov 28, 2017, at 9:55 AM, Brian J. Johnson <brian.john...@hpe.com> wrote: > > On 11/24/2017 01:

Re: [edk2] EDK2 build issues

2017-11-27 Thread Andrew Fish
Liming, We have a top level GNUmakefile vs. having script files to build targets. Thus building BaseTools, or using build are subtasks of this higher level makefile. Looks like you have added some fixes to the BaseTools! Thanks, Andrew Fish > On Nov 22, 2017, at 9:28 PM, Gao, Liming <

Re: [edk2] Unable to Loacte EdkiiIoMmuProtocol.

2017-11-27 Thread Andrew Fish
Should drivers call gEdkiiIoMmuProtocolGuid directly or just use PciIo Protocol? Thanks, Andrew Fish > On Nov 27, 2017, at 3:24 AM, Amit kumar <akami...@hotmail.com> wrote: > > Hi. > I am trying to allocate a mem buffer above 4Gb address but the allocation > since

Re: [edk2] [RFC] ACPI table HID/CID allocation

2017-11-25 Thread Andrew Fish
need name > but for i2c mode it needs of_match_table > Udit, I think it is more like you only need ACPI if you don't have a driver. If it is standard bus with standard drivers the OS code can do power management without any help from ACPI. In general ACPI exists to abstract chipsets that d

Re: [edk2] [RFC v3 1/3] UefiCpuPkg/CpuExceptionHandlerLib/X64: Add stack trace support

2017-11-23 Thread Andrew Fish
int3 ## InlineAsm End popq%rbp retq .cfi_endproc .subsections_via_symbols ~/work/Compiler> Thanks, Andrew Fish PS some lldb Python that walks an x86 stack frame, assuming you have a stack pointer. Given dereferencing a non-canonical addresse

Re: [edk2] EDK2 build issues

2017-11-22 Thread Andrew Fish
of the build. I think the correct short term fix may be to put .NOTPARALLEL: in the BaseTools GNUmakefile given it is constructed in a way that it does not support parallelism. Thanks, Andrew Fish > https://bugzilla.tianocore.org/show_bug.cgi?id=786 > > For the ARCH environm

Re: [edk2] [RFC] ACPI table HID/CID allocation

2017-11-22 Thread Andrew Fish
630/overview>. Anyone can make a request. PNP ID Registry: http://www.uefi.org/pnp_id_list <http://www.uefi.org/pnp_id_list> ACPI ID Registry: http://www.uefi.org/acpi_id_list <http://www.uefi.org/acpi_id_list> Thanks, Andrew Fish > On Nov 22, 2017, at 5:39 AM, Udit Kumar <u

Re: [edk2] [RFC v2 0/3] Stack trace support in X64 exception handling

2017-11-15 Thread Andrew Fish
Paulo, Those attached stack traces don't look right. Thanks, Andrew Fish > On Nov 15, 2017, at 5:46 PM, Paulo Alcantara <pca...@zytor.com> wrote: > > Hi, > > On 11/15/2017 11:18 PM, Paulo Alcantara wrote: >> Hi, >> This series adds stack trace s

Re: [edk2] [RFC 0/1] Stack trace support in X64 exception handling

2017-11-14 Thread Andrew Fish
ed to the stack switch to help with stack unwind. https://github.com/tianocore/edk2/blob/master/MdePkg/Library/BaseLib/X64/SwitchStack.S <https://github.com/tianocore/edk2/blob/master/MdePkg/Library/BaseLib/X64/SwitchStack.S> If might be a good idea to have a PCD for the max number of st

Re: [edk2] [RFC 1/1] UefiCpuPkg/CpuExceptionHandlerLib/X64: Add stack trace support

2017-11-14 Thread Andrew Fish
ven 0 0x7E510F7F @ 0x7E509000+0x7F7E (0x7F762CB0) in PartitionDxe.dll If you load PartitionDxe.dll into gdb you can then do "l *0x7F7E" to dump the source. I'm mapping lldb behavior to gdb, but it should be close. Thanks, Andrew Fish > > Jeff > > 发件

Re: [edk2] [RFC 1/1] UefiCpuPkg/CpuExceptionHandlerLib/X64: Add stack trace support

2017-11-14 Thread Andrew Fish
. Thanks, Andrew Fish > On Nov 14, 2017, at 4:47 AM, Paulo Alcantara <pca...@zytor.com> wrote: > > This patch adds stack trace support during a X64 CPU exception. > > It will dump out back trace, stack contents as well as image module > names that were part of the call

Re: [edk2] Clarification about InitializeCpuExceptionHandlers() and TGE bit in hcr_el2

2017-10-05 Thread Andrew Fish
> On Oct 5, 2017, at 10:14 AM, Vabhav Sharma <vabhav.sha...@nxp.com> wrote: > > Andrew Fish, > Yes catching the exception is very critical for debugging. > Looks like, This is the model where edk2 starts from cold boot > > As per ARM Platform documentation(ArmPlat

Re: [edk2] Clarification about InitializeCpuExceptionHandlers() and TGE bit in hcr_el2

2017-10-05 Thread Andrew Fish
> On Oct 5, 2017, at 9:53 AM, Vabhav Sharma <vabhav.sha...@nxp.com> wrote: > > Thanks Andrew Fish, > I understand. > > In PEI Phase, No handlers are installed and there might be pending > exception. ExceptionHandlers() can be installed during PEI phase like af

Re: [edk2] Clarification about InitializeCpuExceptionHandlers() and TGE bit in hcr_el2

2017-09-28 Thread Andrew Fish
is is common for PEI to be 32-bit and and DXE to be 64-bit. This is mostly due to how complex it is to turn on memory, and the fact that there is no good place to put the page tables prior to memory init. I'll let the ARM folks comment on hcr_el2 usage. Thanks, Andrew Fish > Addition

Re: [edk2] [PATCH 0/4] [PATCH 0/5] Add HardwareInterrupt2 for ARM

2017-09-21 Thread Andrew Fish
d to at least the 1990s. Shouldn't I be the surly, > hide-bound, old, luddite dinosaur? > Yikes. There is actually no scientific data that one coding standard is better than another. The data does show having a consistent coding style is what has value. I wrote the original coding stan

Re: [edk2] Storing Non volatile variables on SD/NAND

2017-09-20 Thread Andrew Fish
unmodified OS it is going to conflict with the EFI runtime service. My gut feel is if the OS has a driver for the device it may be better to make the media format the architectural point. That way the OS can read/write it via a driver/app. There could be an UEFI Services Table entry that implies what s

Re: [edk2] Storing Non volatile variables on SD/NAND

2017-09-20 Thread Andrew Fish
Pankaj, We understand the use cases. We just don't have a good solution for the spec that is OS, Firmware, and hardware agnostic. Thanks, Andrew Fish > On Sep 20, 2017, at 7:51 AM, Pankaj Bansal <pankaj.ban...@nxp.com> wrote: > > This use case also arises for single-boa

Re: [edk2] Storing Non volatile variables on SD/NAND

2017-09-19 Thread Andrew Fish
parate is best case, no need to sync between > two. > > My reply to Ard, was to highlight that in any case (NOR or eMMC /NAND) > if we are keeping OS and firmware on same storage, we will have same > issue not limited to eMMC. > > For some requirement, if we need to ke

Re: [edk2] Storing Non volatile variables on SD/NAND

2017-09-19 Thread Andrew Fish
vice, just like you can't have 2 operating systems running on bare metal at the same time. It is a little like Occam's Razor the reason that the firmware and the OS can not share a hardware device is the mechanics of how to share a hardware device is not defined in the spec, thus it is not part of the

Re: [edk2] Fwd: Boot####, Key####

2017-09-07 Thread Andrew Fish
F which is slow > (takes 10+ seconds).What's the better way? > Usually there is another variable that implies the Boot value that is in use, like BootOrder. Thanks, Andrew Fish > Thanks. > ___ > edk2-devel mailing list > e

Re: [edk2] Question about Simple Text Out Protocol

2017-09-02 Thread Andrew Fish
sole and it follows the policy of the EFI NVRAM variables. You may need to make sure the BDS adds the device path for the VGA SimpleTextOut to the ConOut EFI Variable. Thanks, Andrew Fish > Thanks > > best wishes, > > > 保密声明: > 本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权

Re: [edk2] [EDK2] Questions about uefi bios's vga mode

2017-08-31 Thread Andrew Fish
> On Aug 31, 2017, at 2:08 AM, Tiger Liu wrote: > > Hi, experts: > I have a question about uefi bios’s vga mode. > Could we use VGA’s text mode to boot into uefi shell environment? > > It seems vga class driver/mini port driver could support VGA’s text mode. > Tiger,

Re: [edk2] [PATCH 0/2] Implement NULL pointer detection feature

2017-08-30 Thread Andrew Fish
ging. While the memory ranges would be platform specific it would be awesome to have some plumbing in the edk2 to make this easier to implement. Thanks, Andrew Fish > > > * For flexibility, I'd like NULL pointer protection to be controlled > independently in PEI, DXE, and SMM, us

Re: [edk2] [PATCH v2 4/5] MdePkg/PciSegmentLib: Add instances that consumes PciSegmentInfoLib

2017-08-29 Thread Andrew Fish
field that does not fit is put into the next unit or > overlaps adjacent units is implementation-defined. The order of > allocation of bit-fields within a unit (high-order to low-order or > low-order to high-order) is implementation-defined. The alignment of the > address

Re: [edk2] "practical" memory allocation limit?

2017-08-28 Thread Andrew Fish
ode I think the thunk code assumes it runs < 4G (at least it did a long time ago). Not to mention just general cruft in the code that has assumptions about running < 4G (things like AsmThunk16(), CPU drivers etc.). Thanks, Andrew Fish > On Aug 28, 2017, at 8:31 AM, Shi, Steven <ste

Re: [edk2] [PATCH v2 0/6] read-only UDF file system support

2017-08-22 Thread Andrew Fish
> On Aug 22, 2017, at 10:56 AM, Paulo Alcantara <pca...@zytor.com> wrote: > > Hi, > > On 8/22/2017 2:21 PM, Andrew Fish wrote: >>> On Aug 22, 2017, at 6:14 AM, Paulo Alcantara <pca...@zytor.com> wrote: >>> >>> Hi, >>> >>&

Re: [edk2] [PATCH v2 0/6] read-only UDF file system support

2017-08-22 Thread Andrew Fish
so is it possible to define a 32-bit MBR signature to indicate UDF. If not it should probably be a device path node like CD-ROM. You can all ways use the Vendor-Defined Media Device Path since it has GUID there is no risk of collision. Thanks, Andrew Fish > "PARTITION_TYPE_

Re: [edk2] What Bios data is sent to the Bootloader/OS ?

2017-08-13 Thread Andrew Fish
m 1996. For older stuff most people use Ralf Brown's interrupt list. You kind find all this old BIOS stuff searching the internwebs. Thanks, Andrew Fish > Thanks and Regards > Rafael Machado > > Em sáb, 12 de ago de 2017 00:23, Rod Smith <rodsm...@rodsbooks.com>

Re: [edk2] What Bios data is sent to the Bootloader/OS ?

2017-08-11 Thread Andrew Fish
ut a BIOS boot loader and a EFI Boot loader on the same disk and have them boot the same kernel. Seems like most of what the OS loader needs to do is a solved problem, it is just making everything coexist you have to figure out. Thanks, Andrew Fish > The first thing I see that is different

Re: [edk2] [edk2-CCodingStandardsSpecification PATCH 2/2] Source Files / Spacing / Multi-line func. calls: allow condensed arguments

2017-08-11 Thread Andrew Fish
ext line in this case. > > Status = gBS->AllocatePool ( > EfiBootServicesData, sizeof (DRIVER_NAME_INSTANCE), > ); > I like using as much width as allowed, but then again I've got 3440 X 1440 monitors I'm using all the time. Another place that multiple things on the same line

Re: [edk2] [Patch] BaseTools: Fix Segmentation fault: 11 when build AppPkg with XCODE5

2017-08-11 Thread Andrew Fish
(DebugEntry.Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) { ImageContext->DebugDirectoryEntryRva = (UINT32) (DebugDirectoryEntryRva + Index); return RETURN_SUCCESS; } Thanks, Andrew Fish > On Aug 10, 2017, at 10:49 PM, Gao, Liming <liming@intel.com> wrote: >

Re: [edk2] [Patch] BaseTools: Fix Segmentation fault: 11 when build AppPkg with XCODE5

2017-08-10 Thread Andrew Fish
EFI executable that the DXE Core will see is as new as the firmware, or was even built via the edk2. Option ROMs and OS loaders are good examples of this issue. Thanks, Andrew Fish > Thanks > Liming > From: af...@apple.com [mailto:af...@apple.com] > Sent: Friday, August 11, 2017 12:

Re: [edk2] [PATCH 1/3] Maintainers.txt: List Tianocore Stewards

2017-08-10 Thread Andrew Fish
Series Reviewed-by: Andrew Fish <af...@apple.com <mailto:af...@apple.com>> > On Aug 10, 2017, at 4:13 PM, Kinney, Michael D <michael.d.kin...@intel.com> > wrote: > > Series > > Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com> > >>

Re: [edk2] Does a double Page free report "ConvertPages: Incompatible memory types", maybe we could do better.

2017-08-10 Thread Andrew Fish
oadPeImage(). Bug 667 <https://bugzilla.tianocore.org/show_bug.cgi?id=667> Thanks, Andrew Fish > On Aug 9, 2017, at 6:33 PM, Zeng, Star <star.z...@intel.com> wrote: > > Andrew, > > Another path may hit this DEBUG message is AllocatePages() by AllocateAddress > type. > I think i

Re: [edk2] [Patch] BaseTools: Fix Segmentation fault: 11 when build AppPkg with XCODE5

2017-08-10 Thread Andrew Fish
PeCoff library in MdePkg. > Liming, EFI supports loading PE/COFF images that are not built at the same time as the platform firmware (UEFI Shell, OS loader), and that is why I added the fix to the PE/COFF library code. Thanks, Andrew Fish > Thanks > Liming > From: af...@apple.com

[edk2] Does a double Page free report "ConvertPages: Incompatible memory types", maybe we could do better.

2017-08-09 Thread Andrew Fish
to free pages that are already freed. That is not very obvious from the above DEBUG print. Could there be an if in the error path to print a better DEBUG message for a free pages bug? Also to be pedantic the function change names to: CoreConvertPagesEx(). Thanks,

Re: [edk2] [PATCH 4/4] OvmfPkg: Introduce UDF_ENABLE build flag

2017-08-09 Thread Andrew Fish
> On Aug 9, 2017, at 10:33 AM, Laszlo Ersek <ler...@redhat.com> wrote: > > On 08/09/17 17:45, Andrew Fish wrote: >> >>> On Aug 9, 2017, at 2:44 AM, Laszlo Ersek <ler...@redhat.com> wrote: >>> >>> CC Ard and Andrew >>> >>&g

Re: [edk2] [PATCH 4/4] OvmfPkg: Introduce UDF_ENABLE build flag

2017-08-09 Thread Andrew Fish
;El Torito" compatible. So UDF punted on boot ability by allowing compatibility with CD-ROMs. EFI supports booting from an ISO-9660 file system that conforms to the “El Torito” Bootable CD-ROM Format Specification on a DVD- ROM. A DVD-ROM that contains an ISO-9660 file system is defined as

Re: [edk2] [Patch] BaseTools: Fix Segmentation fault: 11 when build AppPkg with XCODE5

2017-08-07 Thread Andrew Fish
ion Agreement 1.1 Thanks, Andrew Fish > On Aug 6, 2017, at 9:00 PM, Yonghong Zhu <yonghong@intel.com> wrote: > > it is a bug in mtoc setting the size of the debug directory entry to > the size of the .debug section, not the size of the > EFI_IMAGE_DEBUG_DIRECTORY_ENTR

Re: [edk2] Issue of step by step debugging of OVMF SEC code in QEMU

2017-08-03 Thread Andrew Fish
, Andrew Fish > On Aug 3, 2017, at 8:41 PM, wang xiaofeng <winggundu...@163.com> wrote: > > Hi Andrew, > THe problem is solved, after the SEC code switch to protected mode, gdb > can work well now > > > > > > > At 2017-08-04 11:26:16, &q

Re: [edk2] Issue of step by step debugging of OVMF SEC code in QEMU

2017-08-03 Thread Andrew Fish
The reset vector is 16-bit real mode, so you have the debugger in the wrong mode. The code should transition to 32 bit protected early in the flow. Sent from my iPhone > On Aug 3, 2017, at 7:47 PM, wang xiaofeng wrote: > > Hello, > I am tring to add my own SEC code

Re: [edk2] [RFC v1 0/3] Add VIRTIO_F_IOMMU_PLATFORM support

2017-07-27 Thread Andrew Fish
for DMA Bus Master to complete the read operation. Call Unmap(). DMA Bus Master Write Operation == Call Map() for EfiPciOperationBusMasterWrite. Program the DMA Bus Master with the DeviceAddress returned by Map(). Start the DMA Bus Master. Wait for DMA Bus Master

Re: [edk2] Disable BIOS menu or set password EDK2

2017-07-27 Thread Andrew Fish
rkModulePkg.dsc are for package maintenance, think of them as a makefile that builds everything in package. A platform would have its own DSC file pulling in the features it needed. Thanks, Andrew Fish > Thanks, > Zach > > > > On Thu, Jul 27, 2017 at 10:49 AM, Gao, Liming <

Re: [edk2] Creating Event in an EventGroup that has already been signaled

2017-07-20 Thread Andrew Fish
nocore/edk2/blob/master/MdeModulePkg/Core/Dxe/Event/Event.c#L165> So basically you only signal the events that exists, including the event created to signal the event group. Thanks, Andrew Fish > Cheers, > Tom > ___ > edk2-devel mailin

Re: [edk2] [PATCH v6 00/17] x86: Secure Encrypted Virtualization (AMD)

2017-07-06 Thread Andrew Fish
t; > I am asking that you file and own a bugzilla for this. You'd obviously > need to work with the package owners though. Unless you drive this, I > don't think anyone will be motivated enough to get it fixed. > If some one will make a write up on this mailing list summarizing the issue

Re: [edk2] writing EDK compatible application.

2017-07-04 Thread Andrew Fish
Application that does not call the library constructors you need to name the entry point _ModuleEntryPoint, and don't list UefiApplicationEntryPoint in the [LibraryClasses] section of the INF file. Not to mention I'd leave off PcdLib too as that is an edk2 open source concept originally. Thanks,

Re: [edk2] [Patch] BaseTools: Update tools_def.template to remove old XCLANG and XCODE32

2017-07-03 Thread Andrew Fish
Reviewed-by: Andrew Fish <af...@apple.com> > On Jul 2, 2017, at 10:28 PM, Liming Gao <liming@intel.com> wrote: > > Per Andrew Fish recommendation, XCLANG and XCODE32 are not used anymore. > https://bugzilla.tianocore.org/show_bug.cgi?id=562 > https://bugzilla.ti

Re: [edk2] DisconnectController API not working.

2017-06-28 Thread Andrew Fish
p a specific handle in the shell. The EFI_HANDLE value is not going to change, it is only going to get removed if all protocols on that handle are uninstalled. So for example. 176: 7219E798 If you used 178 at the Shell you would expect to see 7219E798 printed out as the handle value. Thanks, Andrew F

Re: [edk2] DXE core - Connecting a controller to driver

2017-06-27 Thread Andrew Fish
u think a do while loop works in C? DriverFound = FALSE; do { ; } while (DriverFound); Is not an infinite loop? It just runs one time. The code is looping as long as Start() is called as calling Start() could cause other drivers Supported() to start returning TRUE, so you have to recheck the s

Re: [edk2] EmulatorPkg build issue

2017-06-21 Thread Andrew Fish
https://bugzilla.tianocore.org/show_bug.cgi?id=563 > Gao, Thanks works for me. The older Xcode versions don't run on current OS versions, and the current OS usually runs on 6 or 7 year old Macs. Thanks, Andrew Fish > Thanks > Liming >> -Original Message- >> From:

Re: [edk2] EmulatorPkg build issue

2017-06-21 Thread Andrew Fish
HOST_TOOLS=XCODE5 +TARGET_TOOLS=XCODE5 fi BUILD_NEW_SHELL="-D BUILD_NEW_SHELL" BUILD_FAT="-D BUILD_FAT" Thanks, Andrew Fish > On Jun 21, 2017, at 10:25 AM, Hengyan Tao <hengyan@gmail.com> wrote: > > Hi Dear EmulatorPkg

Re: [edk2] [PATCH v2] EmbeddedPkg/MmcDxe: Add alignment for ECSD data

2017-06-12 Thread Andrew Fish
> On Jun 12, 2017, at 9:13 PM, Jun Nie <jun@linaro.org> wrote: > > 2017-06-13 12:01 GMT+08:00 Andrew Fish <af...@apple.com > <mailto:af...@apple.com>>: >> >>> On Jun 12, 2017, at 7:14 PM, Jun Nie <jun@linaro.org> wrote: >>&g

Re: [edk2] [PATCH v2] EmbeddedPkg/MmcDxe: Add alignment for ECSD data

2017-06-12 Thread Andrew Fish
_TYPE; Per C spec sizeof(CARD_TYPE) can be 1, 2, 4, or 8 (64-bit integer), and it is legal for the compiler to pick any of these. So it is not portable C code to use an enum in a data structure when layout maters. Thanks, Andrew Fish > Jun > >> >>> Contributed-under: Tian

Re: [edk2] [PATCH v2] EmbeddedPkg/MmcDxe: Add alignment for ECSD data

2017-06-12 Thread Andrew Fish
er did see a reply to my proposed solution, and the below is not > it. Can you explain why you prefer this one? > And it is still exposed to enum optimization changing the alignment of the structure. Thanks, Andrew Fish > / >Leif > >> Contributed-under: TianoCore Con

Re: [edk2] ThundeBolt 3/ USB C UEFI drivers

2017-06-09 Thread Andrew Fish
lot like plugging in a PCIe card. Thanks, Andrew Fish ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] [PATCH] EmbeddedPkg/MmcDxe: Add alignment for ECSD data

2017-06-08 Thread Andrew Fish
ral alignment. So you can add padding elements to a structure. You can also union with a UINT64 for force 8 byte alignment. typedef struct { UINT16RCA; UINT32CardType; //CARD_TYPE OCR OCRData; CID CIDData; CSD CSDData; UINT32Pad; ECSD ECSDD

Re: [edk2] EDK2 build using Visual Studio

2017-06-08 Thread Andrew Fish
me: 00:00:00 > > Am I missing anything here? > Keshava, Is your Conf/tools_def.txt old? Does it match https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/tools_def.template You may need to run: Edk2Setup.bat --reconfig Thanks, Andrew Fish > Thanks. >

Re: [edk2] [Patch V2] UefiCpuPkg/MpInitLib: Fix X64 XCODE5/NASM compatibility issues

2017-06-06 Thread Andrew Fish
> On Jun 6, 2017, at 2:05 PM, h...@zytor.com wrote: > > On June 6, 2017 1:49:34 PM PDT, Andrew Fish <af...@apple.com> wrote: >> >>> On Jun 6, 2017, at 12:41 PM, H. Peter Anvin <h...@zytor.com> wrote: >>> >>> On 05/22/17 19:08, Fan,

Re: [edk2] [Patch V2] UefiCpuPkg/MpInitLib: Fix X64 XCODE5/NASM compatibility issues

2017-06-06 Thread Andrew Fish
lizeFloatingPointUnitsAddress] Does nasm remove the need for the ASM_PFX() macro? That macro hides if C is decorating with a _ prefix. Also given it is a #define (equ) why do we use camel case vs. all caps? Thanks, Andrew Fish >> subrsp, 20h >> call rax

Re: [edk2] [PATCH v6 00/17] x86: Secure Encrypted Virtualization (AMD)

2017-06-06 Thread Andrew Fish
ms like a feature like this should not require a work around 'So I think it is OK to accept this patch to get the feature enabled, but we need to look at the GCD implementation and PI architecture to figure out why there is not a cleaner way to add this feature. Maybe we need to change the imp

Re: [edk2] How to make my application automatically launch like uefi shell ?

2017-06-05 Thread Andrew Fish
as AutoGen.c. You can look at the ProcessLibraryConstructorList() and that will show you the code that is going be running before your entry point gets called. You could also try a release build of your App as that would remove the ASSERT macros in ProcessLi

Re: [edk2] EDK2 build using Visual Studio

2017-06-05 Thread Andrew Fish
d by the MSVC to tell the C runtime it needs to link in floating point libraries. EFI edk2 code does not support floating point, so you may run into porting issues from tool chain to toolchain if you use floating point. Thanks, Andrew Fish > Thanks > Liming > From: GN Keshava

Re: [edk2] Format SD card while on UEFI shell

2017-06-02 Thread Andrew Fish
The SD spec calls out MBR with a single partition and FAT32 or exFAT file system based on size. You need to follow those rules if you want to use it with embedded devices. A general purpose OS will treat the SD card like a disk and the format does not really matter. Thanks, Andrew Fish

Re: [edk2] Problem in EFI_BOOT_SERVICES.OpenProtocol()

2017-06-01 Thread Andrew Fish
> On Jun 1, 2017, at 10:40 AM, Amit kumar <akami...@hotmail.com> wrote: > > Certainly i will do that. > Meanwhile can i submit the patch too ? Yes as long as you follow the process. Thanks, Andrew Fish > Amit > From: af...@apple.com <mailto:af...@apple.com>

Re: [edk2] Problem in EFI_BOOT_SERVICES.OpenProtocol()

2017-06-01 Thread Andrew Fish
> On Jun 1, 2017, at 10:37 AM, Amit kumar <akami...@hotmail.com> wrote: > > Hello Andrew, > > Thanks for quick reply and acknowledging my query. > Please file a bugzilla against the code. Thanks, Andrew Fish > Amit > From: af...@apple.com <mailto:

Re: [edk2] Problem in EFI_BOOT_SERVICES.OpenProtocol()

2017-06-01 Thread Andrew Fish
if (ExactMatch) { Status = EFI_ALREADY_STARTED; goto Done; } } if ((OpenData->Attributes & EFI_OPEN_PROTOCOL_EXCLUSIVE) != 0) { Exclusive = TRUE; } else if (ExactMatch) { OpenData->OpenCount++; Status = EFI_SUCCESS; goto Done;

Re: [edk2] Problem in EFI_BOOT_SERVICES.OpenProtocol()

2017-06-01 Thread Andrew Fish
ist with an attribute of BY_DRIVER whose agent handle is the same as AgentHandle. Attributes is BY_DRIVER|EXCLUSIVE and there is an item on the open list with an attribute of BY_DRIVER|EXCLUSIVE whose agent handle is the same as AgentHandle. Thanks, Andrew Fish > There are a numbe

Re: [edk2] [PATCH v6 00/17] x86: Secure Encrypted Virtualization (AMD)

2017-06-01 Thread Andrew Fish
eMemoryMappedIo that have EFI_MEMORY_RUNTIME attribute set. vs. The GetMemoryMap() implementation must include all GCD map entries of types EfiGcdMemoryTypeReserved and EfiGcdMemoryTypeMemoryMappedIo into the UEFI memory map. Thanks, Andrew Fish > -Brijesh > > On 06/01/2017 08:4

Re: [edk2] [PATCH v6 00/17] x86: Secure Encrypted Virtualization (AMD)

2017-06-01 Thread Andrew Fish
one; } } } Maybe the issue is there is an attempt to change attributes too early and they currently get sent to the bit bucket? I guess they could get queued up and replayed after gEfiCpuArchProtocolGuid is preset? Thanks, Andrew Fish > On Jun 1, 2017, at 2:10 AM, Laszlo Erse

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Andrew Fish
> On May 25, 2017, at 2:02 PM, Laszlo Ersek <ler...@redhat.com> wrote: > > On 05/25/17 22:37, Andrew Fish wrote: >> >>> On May 25, 2017, at 1:28 PM, Laszlo Ersek <ler...@redhat.com> wrote: >>> >>> On 05/25/17 22:11, Ard Biesheuvel

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Andrew Fish
when warnings are cranked up. ~/work/Compiler>cat static.c static unsigned char gTest[] = { 42 }; static int test () { return 1; } int main () { return 0; } ~/work/Compiler>clang -Os static.c -Wall static.c:1:22: warning: unused variable 'gTest' [-Wunused-variable] static unsigned char gTest[] = { 42 }; ^ static.c:3:12: warning: unused function 'test' [-Wunused-function] static int test () ^ 2 warnings generated. Thanks, Andrew Fish > Thanks > Laszlo ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Andrew Fish
from there; instead we should figure out > if the same can be brought to MSFT and GCC. > Not to mention I was told by the Xcode linker developer that -all_load was required to ensure in all cases the Mach-O produced would be compatible with conversion to PE/COFF. Thanks, Andrew

Re: [edk2] [Patch 0/2] MdeModulePkg: Fix XCODE5 build failures

2017-05-24 Thread Andrew Fish
Reviewed-by: Andrew Fish <af...@apple.com <mailto:af...@apple.com>> > On May 23, 2017, at 4:10 PM, Michael Kinney <michael.d.kin...@intel.com> > wrote: > > https://bugzilla.tianocore.org/show_bug.cgi?id=572 > > Fix local variable type in RegularExpressionDx

Re: [edk2] Pressing ESC from "PXE windows Boot manager" causes ASSERT

2017-05-24 Thread Andrew Fish
. The pattern might give you some clues. Thanks, Andrew Fish > On May 23, 2017, at 10:16 PM, Karunakar P <karunak...@amiindia.co.in> wrote: > > Hello All, > > The ASSERT happens in the following function > > /** > Internal function to free a pool entry. > Call

Re: [edk2] Pressing ESC from "PXE windows Boot manager" causes ASSERT

2017-05-23 Thread Andrew Fish
of the structure. The ASSERT you are almost reporting is likely some kind of data corruption. Like buffer overflow, use after free, etc. But without line number info it is hard to say which one it is. Thanks, Andrew Fish > On May 23, 2017, at 9:20 PM, Karunakar P <karunak...@amiindia.co.in&

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-23 Thread Andrew Fish
Mike, Do the other compilers promote (or is that demote) to static? Would not making these lib globals, and private functions static solve this class of issue? Thanks, Andrew Fish > On May 23, 2017, at 4:21 PM, Michael Kinney <michael.d.kin...@intel.com> > wrote

Re: [edk2] [staging/cadence-aarch64] Add readme for cadence-aarch64 branch

2017-05-22 Thread Andrew Fish
> On May 22, 2017, at 11:12 AM, Leif Lindholm <leif.lindh...@linaro.org> wrote: > > Hi Scott, thanks for this. Looking forward to seeing it. > > Andrew, Mike - for what it's worth, I'm happy to do the mechanics here > unless there are any objections. > Looks good t

Re: [edk2] [Patch V2] UefiCpuPkg/MpInitLib: Fix X64 XCODE5/NASM compatibility issues

2017-05-22 Thread Andrew Fish
Reviewed-by: Andrew Fish <af...@apple.com> > On May 22, 2017, at 10:12 AM, Michael Kinney <michael.d.kin...@intel.com> > wrote: > > https://bugzilla.tianocore.org/show_bug.cgi?id=565 > > Fix NASM compatibility issues with XCODE5 tool chain. > The XCODE5 to

Re: [edk2] Strange issue in USB mass storage device

2017-05-22 Thread Andrew Fish
Your device path difference is based on having a partitioning scheme (MBR or GPT) or not. The partition driver will produce block io protocols for all the partitions. The file system driver goes after fixed block offsets. Sent from my iPhone > On May 22, 2017, at 1:37 AM, GN Keshava

<    2   3   4   5   6   7   8   9   10   11   >