Tuesday, June 27, 2017

Learning Python - Online Resources

I have been planning to learn Python for some time and needs some motivation to do so. So here are few links which I intend to use in future.

1. https://www.codecademy.com/learn/python
2.  http://www.python-course.eu/

I am planning to expand this post as I go along. But here are starting point for me currently. 

Saturday, July 2, 2016

Finding NVMe Passthru handle - UEFI Edk2.5

One of the challenge when I started working on NVMe devices in UEFI driver was the lack of sample code which can leverage the NvmExpressDxe code in the Edk2.5 code.

At this point, let me add that there is a quite a bit of different in the NvmExpressDxe code in Edk2 and Edk2.5.

1. The major difference is the GUID itself. Then all the data structures for sending command, completion etc are different. This is an important point - If you are using the wrong GUID, you will not be able to communicate with your NVMe driver using pass thru protocol.

2. The location of the NvmExpressPassthru.h is different in Edk2.5. You can find it in Edk_2.5\MdePkg\Include\Protocol. This file was previously included in the NvmExpressDxe folder in MdeModulePkg.

So here is a bit of reference code that can be used. Refer Edk2.5 code for better clarity.

#define EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL_GUID \
  { \
    0x52c78312, 0x8edc, 0x4233, { 0x98, 0xf2, 0x1a, 0x1a, 0xa5, 0xe3, 0x88, 0xa5 } \
  }

 EFI_GUID gNvmExpressPassThruProtocolGuid = EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL_GUID;
EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL *ptrNvmePassThru = NULL;
We can use the LocateHandleBuffer function to find the handles which has exposed the Nvm Pass thru protocol.

UINTN       NHandles = 0;
    EFI_HANDLE      *Handles = NULL;
        Status = gBS->LocateHandleBuffer (
                ByProtocol,
                &gNvmExpressPassThruProtocolGuid,
                NULL,
                &NHandles,
                &Handles
                );

    if (Status == EFI_NOT_FOUND || NHandles == 0) {
    //
    // If there are no Protocols handles, then return EFI_NOT_FOUND
    //
                return EFI_NOT_FOUND;
    }

    for(Index = 0; Index < NHandles; Index++) {

        Status = gBS->HandleProtocol(
                        Handles[Index],
                        &gNvmExpressPassThruProtocolGuid,
                        (VOID **) &ptrNvmePassThru                      
                        );
        if (EFI_ERROR (Status)) {              continue;
        }
//Use  ptrNvmePassThru for sending identify nvme controller to get the details of the nvme controller
}

This ptrNvmePassThru is the passthru handle required for sending any command to the NVMe device using NVMe passthru protocol.

Note: The above code is very much similar for getting handle who has exposed SATA Pass through protocol or SCSI pass through protocol.

Saturday, February 21, 2015

Custom Blogger to WordPress - Change DNS Records on eNom

update DNS Records. Moving from Custom Blogger blog to self hosted WordPress site

Update DNS Records Self Hosting on Bluehost


When you move you Custom Blogger blog to self hosted WordPress, you need to update your DNS Records with Enom so that the url points to the brand new self-hosted site. If you are moving your Custom Blogger blog to self hosted WordPress, then your DNS Records will need to be updated as shown above.

When you are using the Custom Blogger blog, the DNS Settings would be Default and there will be several details related to Google. You have to click on Edit and then Custom and enter the server names of Bluehost.

Logging into Enom Account


To update DNS Records, you need to login into your Domain Management console of eNom.

https://access.enom.com

Finding the eNom Login Information


To get the login details, you will have to get the eNom login details, login into Google apps

http://www.google.com/a/yourdomain.com

If you have forgotten the login user name, try bloggeradmin@yourdomain.com. This will

allow you to reset your password using your email id and give you access.

Once you login, click on Domains in the Admin Console. This will take you to the Domains Page.Click on Advanced DNS settings to get the eNom Login details to update DNS records.

You can click on Sign in to DNS console to go straight to the eNom Domain Management Page

Update DNS Records for CloudFlare


CloudFlare is a security and anti-spam tool used to protect my WordPress site. It came

with high recommendation and I hope CloudFlare will take care of my security as well as spam concerns about my self hosted WordPress site.

During the setup of CloudFlare on your website, you are asked to update your DNS Records

with CloudFlare details.

Login into eNom account with above login details. The url for the required login is

https://access.enom.com

Once you have logged in, click on Edit for DNS Information and add the CloudFlare DNS Server details. Go back to CloudFlare website and let them know that you have updated the DNS records.

Wait till CloudFlare takes over your website.

Friday, November 21, 2014

Storage Networks Explained - Book Recommendation


I think a good technical book about Storage Networks and other Storage Domain related information is hard to come by especially cheap ones. So here is a recommendation for a great book.

I liked this book very much and felt very bad that I could not get hold of this book when I started my career. I would have learned and understood much more about technical stuffs related to storage and network domain.

This book is priced at Rs 379 INR and will come cheaper if you are ordering it online. I believe I got this from flipkart.com.

If you are into Storage or related Domain, please take care to read this book. It has lots and lots of great information which is difficult to find anywhere else. eg - RAID, SAN, iSCSI etc.

Friday, November 7, 2014

C Interview Questions - Tackling the C Written Exam


Everyone who has done a course in computers be it a diploma or an Engineering course dreams of landing a dream job in a company of their job with a dream pay. To be frank, this dream remains to be a dream for many even after slogging for hours in front of computer for years. But there are a few who seems to get it all together.

Landing your dream job as a software developer requires systematic preparation especially if you are aiming for a job in a tier-1 or tier-2 company who gives emphasis on your coding skills or atleast knowledge of your basics. This is where most people fail. I know a lot of people who studies Yashavant Kanetkar books and expects to be placed well. As such there is nothing wrong in reading these books, but if your exposure to the subject is limited to these books, you are going to be in the group of mediocre programmers; forever.

In my few years of experience as a software developer, I have given a few interviews over the years.At this point, I am holding my third job after joining the company which placed me through the campus. Believe me, there are few basic things that you need to know how much ever experienced you are.

So I am giving you the shortest though not the easiest method to tackle the C interview round or the C written exam.

Read The C Programming Language book, preferably from the first page to the last page including the appendix.

Ok. Now for some confessions. I have not read the book fully, but has gone through most of the chapters during the first few years of my career. I did certainly read it during my college days and this book is still the best book about programming.

In the age of C#, .NET etc this book may look outdated, but this book is not going to be outdated for a long time. Because all other programming languages have evolved from C.

There is an answer book corresponding to the programming exercises in the end of the different chapters. It will be great if you can do those exercises too.

Wednesday, November 5, 2014

Reading Gustavo Duarte

If you are a computer enthusiastic who is interested in knowing more about OS, kernel, memory map, processor memory etc Gustavo Duarte is the person to read.

Gustavo has written awesome articles on his blog and he has written most of the highly technical stuffs in a very down to earth format.

Link: http://duartes.org/gustavo/blog/

Don't forget to check out the Archive section in the above webpage. It has few of the best article about OS, kernel, memory, processor, memory etc.

Few of his articles

About this Blog

Many times I create a blog like this and then go and delete it fully at a later date. So at this point, I have no idea about the fate of this blog. So let us wait and watch.