Hello Andrew and others,

I used Andrew's suggestion and set a debugger breakpoint in the emulator.
 The results are close to what I was looking for.  Its 28 bytes off.  If
any of you could please take a look and tell me why, I would appreciate it.
 Also, if its patch worthy to get the address I can submit the minor patch
to print out the start address is output.

https://sourceforge.net/p/uefinotes/wiki/Add%20a%20ROM%20to%20FV/

John


On Wed, Feb 12, 2014 at 10:10 AM, Andrew Fish <[email protected]> wrote:

>
> On Feb 12, 2014, at 9:51 AM, John Davis <[email protected]> wrote:
>
> Andrew and others,
>
> Here is the process I used to build a rom and how I tried to verify it.
>  The process seems to make it to the FV, but when I try to verify it with
> the simulator it crashes.  Any advice is appreciated.
>
> http://sourceforge.net/p/uefinotes/wiki/Add%20a%20ROM%20to%20FV/
>
>
> NT32 (I’ve not run it in like 6 years) does not used a fixed address for
> the FD, it is an address that is dynamically allocated in the emulator (The
> Unix EmulatorPkg tries to use a fixed address to better emulate FLASH).
>
> If you dump out gFdInfo in the debugger you should be able to see the load
> address. You could also update the prints to dump out the address and size
> of the FD that was loaded if that would help you, looks like it is just
> dumping out the filename.
>
> https://svn.code.sf.net/p/edk2/code/trunk/edk2/Nt32Pkg/Sec/SecMain.c
>
>    //
>     // Open the FD and remmeber where it got mapped into our processes 
> address space
>     //
>     Status = WinNtOpenFile (
>               FileName,
>               0,
>               OPEN_EXISTING,
>               &gFdInfo[Index].Address,
>               &gFdInfo[Index].Size
>               );
>
>
>
> John
>
>
> On Tue, Feb 11, 2014 at 7:04 PM, John Davis <[email protected]> wrote:
>
>> I guess I am confused. I don't have the files handy but I thought the
>> entire fv would be loaded at the top of memory. I'll post more detail
>> tomorrow morning.
>> On Feb 11, 2014 6:06 PM, "Andrew Fish" <[email protected]> wrote:
>>
>>>
>>> On Feb 11, 2014, at 4:34 PM, John Davis <[email protected]> wrote:
>>>
>>> > Hello
>>> >
>>> > Can you use the emulator to dump memory associated with roms?
>>> >
>>>
>>> The “emulator” is not a VM. If you want to assume magic addresses and
>>> hardware exist you need to run the OVFM, as it runs in a VM.
>>>
>>> The “emulator” is an OS application where there are drivers that
>>> abstract POSIX/Win32 APIs as hardware devices. For example on a Mac a
>>> 64-bit application can not map any memory < 4G (hard to have a pointer bug
>>> you don’t notice porting from 32-bit).
>>>
>>> If you run a memmap command in the Shell you can generally find the ROM
>>> as it will have a MemMapIO type and the upper bit of the attribute will be
>>> set.
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>> PS The EFI memory map is not used to tell the OS about MMIO, it is just
>>> used to get virtual MMIO mapping for EFI runtime services. So at a minimum
>>> the variable services need an virtual mapping to make the EFI Variable
>>> services to work. Note there is no requirement that the EFI Variables are
>>> in the same device as the Firmware code, but it is a common implementation.
>>>
>>> > For instance, dmem fff3c9e8 is a region where I believe I have a rom
>>> mapped, but that command will crash the emulator.
>>> >
>>> > --
>>> > John F. Davis
>>> > 6 Kandes Court
>>> > Durham, NC 27713
>>> > 919-888-8358
>>> >
>>> > 独树一帜
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Android apps run on BlackBerry 10
>>> > Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
>>> > Now with support for Jelly Bean, Bluetooth, Mapview and more.
>>> > Get your Android app in front of a whole new audience.  Start now.
>>> >
>>> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk_______________________________________________
>>> > edk2-devel mailing list
>>> > [email protected]
>>> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Android apps run on BlackBerry 10
>>> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
>>> Now with support for Jelly Bean, Bluetooth, Mapview and more.
>>> Get your Android app in front of a whole new audience.  Start now.
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> edk2-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>>
>>
>
>
> --
> John F. Davis
> 6 Kandes Court
> Durham, NC 27713
> 919-888-8358
>
> 独树一帜
>
>
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>


-- 
John F. Davis
6 Kandes Court
Durham, NC 27713
919-888-8358

独树一帜
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to