Thanks Andrew !!
Regards
Vijai Kumar K
On Mon, Jun 23, 2014 at 10:01 PM, <edk2-devel-requ...@lists.sourceforge.net>
wrote:
> Send edk2-devel mailing list submissions to
> edk2-devel@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> or, via email, send a message with subject or body 'help' to
> edk2-devel-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
> edk2-devel-ow...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of edk2-devel digest..."
>
>
> Today's Topics:
>
> 1. Re: Is it just me or is tianocore.org completely missing the
> useful front page?<eom> (Jordan Justen)
> 2. Re: NOR Flash Driver (Andrew Fish) (Andrew Fish)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 23 Jun 2014 09:06:29 -0700
> From: Jordan Justen <jljus...@gmail.com>
> Subject: Re: [edk2] Is it just me or is tianocore.org completely
> missing the useful front page?<eom>
> To: "edk2-devel@lists.sourceforge.net"
> <edk2-devel@lists.sourceforge.net>
> Message-ID:
> <
> cafe8ug-n4-uo00keu7ak4srvxu9qrs5oppmuerbreqzbj90...@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Thu, Jun 19, 2014 at 11:33 PM, Jordan Justen <jljus...@gmail.com>
> wrote:
> > It seems like the sourceforge mediawiki service is not working right now.
> >
> > It looks like it is affecting other projects too, including some of
> > sourceforge's own web pages.
>
> Despite the fact that it is messing up some sourceforge's own web
> pages, it looks as though the sourceforge run mediawiki service was
> shut down.
>
> We can still run mediawiki on sourceforge, but I'll need to set it up
> manually.
>
> Hopefully the wiki will be up and running again today, but the web
> page redirects may take a little extra time to work out.
>
> -Jordan
>
> > On Thu, Jun 19, 2014 at 6:26 PM, Tim Lewis <tim.le...@insyde.com> wrote:
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
> Solutions
> >> Find What Matters Most in Your Big Data with HPCC Systems
> >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> >> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> >> http://p.sf.net/sfu/hpccsystems
> >> _______________________________________________
> >> edk2-devel mailing list
> >> edk2-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> >>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 23 Jun 2014 09:31:20 -0700
> From: Andrew Fish <af...@apple.com>
> Subject: Re: [edk2] NOR Flash Driver (Andrew Fish)
> To: edk2-devel@lists.sourceforge.net
> Message-ID: <0b6e0248-c8e2-4160-94d1-4e9230069...@apple.com>
> Content-Type: text/plain; charset="us-ascii"
>
>
> On Jun 23, 2014, at 4:59 AM, vijaikumar k <
> vijaikuma...@mistralsolutions.com> wrote:
>
> > Hi All,
> > When I try to read my BLK device using DBLK command, I get 0
> always. There are some data in Nor Flash though.
> > Output of DBLK:
> > 2.0 Shell> dblk blk8 0 1
> > LBA 0000000000000000 Size 00000080 bytes BlkIo 7DDC2730
> > 00: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
> > 10: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
> > 20: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
> > 30: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
> > 40: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
> > 50: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
> > 60: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
> > 70: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
> > dblk command uses AllocateZeroPool to allocate the buffer. I changed it
> to AllocatePool to make sure that it is reading from my block device.
>
> Do you get some kind of error? It sounds like the data is not being copied
> into the callers buffer?
>
> > After making it AllocatePool, I get some junk values in dblk command. I
> dont think my read blocks function is correctly called.
>
> Well your code is new, so it is more likely it has an error.
>
> > I am suspecting something related to device path protocol. Dblk finds
> the BlockIoprotocol based on device path. In my NOR Flash private data
> structure should I use EFI_DEVICE_PATH_PROTOCOL??? Here is my Nor flash
> data structure
> >
>
> You are not installing a device path as you are using the device path on
> the PCI IO handle. It looks like you are installing the Block IO protocol
> on the PCI IO handle. Which is OK, as your code is a device driver, not a
> bus driver. Bus drivers create child handles.
>
> If you do a dh in the shell you should see a Block IO protocol on a handle
> with PCI IO.
>
> Thanks,
>
> Andrew Fish
>
> > NOR_FLASH_INSTANCE mNorFlashInstanceTemplate = {
> > NOR_FLASH_SIGNATURE, // Signature
> > NULL, // Handle ... NEED TO BE FILLED
> >
> > FALSE, // Initialized
> > NULL, // Initialize
> > 0, // Size ... NEED TO BE FILLED
> > 0, // StartLba
> >
> > {
> > EFI_BLOCK_IO_PROTOCOL_REVISION3, // Revision
> > NULL, // Media
> > (EFI_BLOCK_RESET)NorFlashBlockIoReset, // Reset
> > NorFlashBlockIoReadBlocks, // ReadBlocks
> > NorFlashBlockIoWriteBlocks, // WriteBlocks
> > NorFlashBlockIoFlushBlocks // FlushBlocks
> > },// BlockIoProtocol
> >
> > {
> > 0, // MediaId
> > FALSE, // RemovableMedia
> > TRUE, // MediaPresent
> > TRUE, // LogicalPartition
> > FALSE, // ReadOnly
> > FALSE, // WriteCaching
> > 512, // BlockSize
> > 0, // IoAlign
> > 0, // LastBlock
> > 0, // LowestAlignedLba
> > 0, // LogicalBlocksPerPhysicalBlock
> > 0 // OptimalTransferLengthGranularity
> > }, //Media;
> > NULL, //For PCI Access
> > NULL, //Device Path
> > };
> >
> > Start routine:
> > EFI_STATUS
> > EFIAPI
> > NorFlashDriverBindingStart (
> > IN EFI_DRIVER_BINDING_PROTOCOL *This,
> > IN EFI_HANDLE ControllerHandle,
> > IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
> > )
> > {
> > EFI_STATUS Status;
> > EFI_PCI_IO_PROTOCOL *PciIo;
> > EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
> > NOR_FLASH_INSTANCE *Instance;
> > UINT8 CmdSts;
> > Instance=NULL;
> > //CpuBreakpoint();
> > Print(L"\nInside Start of NorFlash");
> > Status = gBS->OpenProtocol(
> > ControllerHandle,
> > &gEfiPciIoProtocolGuid,
> > (VOID **)&PciIo,
> > This->DriverBindingHandle,
> > ControllerHandle,
> > EFI_OPEN_PROTOCOL_BY_DRIVER
> > );
> > if (EFI_ERROR (Status)) {
> > goto Error;
> > }
> > Print(L"\nPCI IO Protocol opened successfully");
> >
> > Status = gBS->OpenProtocol (
> > ControllerHandle,
> > &gEfiDevicePathProtocolGuid,
> > (VOID **) &ParentDevicePath,
> > This->DriverBindingHandle,
> > ControllerHandle,
> > EFI_OPEN_PROTOCOL_BY_DRIVER
> > );
> > if (EFI_ERROR (Status)) {
> > Print(L"\nDevice Path Protocol Failed to register");
> > goto Error;
> > }
> > Print(L"\nDevice Path Protocol Registered Successfully");
> > Instance = AllocateCopyPool
> (sizeof(NOR_FLASH_INSTANCE),&mNorFlashInstanceTemplate);
> > if (Instance == NULL) {
> > return EFI_OUT_OF_RESOURCES;
> > }
> > Print(L"\nResource Pool has been allocated");
> >
> > Instance->Handle=ControllerHandle;
> > Instance->Signature=NOR_FLASH_SIGNATURE;
> > Instance->Size = NOR_SIZE;
> > //Instance->PciIo=PciIo;
> >
> > Instance->BlockIoProtocol.Media = &Instance->Media;
> > Instance->Media.MediaId = NOR_MEDIA_ID;
> > Instance->Media.BlockSize = NOR_BLOCK_SIZE;
> > Instance->Media.LastBlock = (NOR_SIZE / NOR_BLOCK_SIZE)-1;
> > //Mistral:06/23/2014
> > Instance->PciIo=PciIo;
> >
> > Instance->Initialized = TRUE;
> > Print(L"\nBefore Installing multiple protocols");
> > //Set Command register to enable Bus Master and MemorySpace
> > PciIo->Pci.Read (
> > PciIo,
> > EfiPciIoWidthUint8,
> > PCI_COMMAND_OFFSET,
> > sizeof (UINT8),
> > &CmdSts
> > );
> >
> > CmdSts |= EFI_PCI_COMMAND_MEMORY_SPACE |
> > EFI_PCI_COMMAND_BUS_MASTER;
> >
> > PciIo->Pci.Write(
> > PciIo,
> > EfiPciIoWidthUint8,
> > PCI_COMMAND_OFFSET,
> > sizeof (UINT8),
> > &CmdSts
> > );
> > //Removed Device path as already there is a device path associated with
> PCIIO: by Andrew Fish
> > Status = gBS->InstallMultipleProtocolInterfaces (
> > &Instance->Handle,
> > &gEfiBlockIoProtocolGuid,
> &Instance->BlockIoProtocol,
> > //&gEfiDevicePathProtocolGuid,
> Instance->DevPath,
> > NULL
> > );
> >
> > if (EFI_ERROR(Status)) {
> > Print(L"\nFailedInstalling multiple protocols");
> > FreePool(Instance);
> > return Status;
> > }
> > Print(L"\nAfter Installing multiple protocols");
> > return Status;
> >
> > Error:
> >
> > gBS->CloseProtocol (
> > ControllerHandle,
> > &gEfiDevicePathProtocolGuid,
> > This->DriverBindingHandle,
> > ControllerHandle
> > );
> > gBS->CloseProtocol (
> > ControllerHandle,
> > &gEfiPciIoProtocolGuid,
> > This->DriverBindingHandle,
> > ControllerHandle
> > );
> > if (Instance->DevPath != NULL) {
> > FreePool (Instance->DevPath);
> > }
> > FreePool (Instance);
> > return Status;
> > }
> >
> > Regards
> > Vijai Kumar K
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
>
> ------------------------------
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
> End of edk2-devel Digest, Vol 54, Issue 61
> ******************************************
>
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel