{"action":"created","issue":{"url":"https://api.github.com/repos/theopolis/uefi-firmware-parser/issues/36","repository_url":"https://api.github.com/repos/theopolis/uefi-firmware-parser","labels_url":"https://api.github.com/repos/theopolis/uefi-firmware-parser/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/theopolis/uefi-firmware-parser/issues/36/comments","events_url":"https://api.github.com/repos/theopolis/uefi-firmware-parser/issues/36/events","html_url":"https://github.com/theopolis/uefi-firmware-parser/pull/36","id":134490639,"number":36,"title":"Extract PDR section of Flash","user":{"login":"timevortex","id":9387602,"avatar_url":"https://avatars.githubusercontent.com/u/9387602?v=3","gravatar_id":"","url":"https://api.github.com/users/timevortex","html_url":"https://github.com/timevortex","followers_url":"https://api.github.com/users/timevortex/followers","following_url":"https://api.github.com/users/timevortex/following{/other_user}","gists_url":"https://api.github.com/users/timevortex/gists{/gist_id}","starred_url":"https://api.github.com/users/timevortex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timevortex/subscriptions","organizations_url":"https://api.github.com/users/timevortex/orgs","repos_url":"https://api.github.com/users/timevortex/repos","events_url":"https://api.github.com/users/timevortex/events{/privacy}","received_events_url":"https://api.github.com/users/timevortex/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/theopolis/uefi-firmware-parser/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-02-18T06:07:17Z","updated_at":"2016-02-22T03:14:59Z","closed_at":"2016-02-22T03:08:28Z","pull_request":{"url":"https://api.github.com/repos/theopolis/uefi-firmware-parser/pulls/36","html_url":"https://github.com/theopolis/uefi-firmware-parser/pull/36","diff_url":"https://github.com/theopolis/uefi-firmware-parser/pull/36.diff","patch_url":"https://github.com/theopolis/uefi-firmware-parser/pull/36.patch"},"body":"FlashRegionSectionType already parses PdrBase and PdrLimit. This bit of the code just makes sure that FlashDescriptor uses that information to actually extract that region out.\r\n\r\nI've tested this against a BIOS that has PDR section and it seems to work fine:\r\n```\r\npparth@doctor:/tmp/uefi-firmware-parser/regions$ ls -al\r\ndrwxr-x---  3 pparth eng     4096 Feb 18 16:58 region-bios\r\n-rw-r-----  1 pparth eng 11468800 Feb 18 16:58 region-bios.fd\r\n-rw-r-----  1 pparth eng     8192 Feb 18 16:58 region-gbe.fd\r\n-rw-r-----  1 pparth eng  5287936 Feb 18 16:58 region-me.fd\r\n-rw-r-----  1 pparth eng     8192 Feb 18 16:58 region-pdr.fd\r\npparth@doctor:~/tmp/uefi-firmware-parser/regions$ \r\n```\r\n\r\n8192 bytes for the PDR region is correct - confirmed by extracting using UEFIExtract:\r\n```\r\npparth@doctor:/tmp/uefiextract/bios.dump/2 PDR region$ ls -al\r\n-rw-r----- 1 pparth eng 8192 Feb 18 17:01 body.bin\r\n-rw-r----- 1 pparth eng   49 Feb 18 17:01 info.txt\r\npparth@doctor:/tmp/uefiextract/bios.dump/2 PDR region$ cat info.txt \r\nType: Region\r\nSubtype: PDR\r\nFull size: 2000h (8192)\r\n```\r\n\r\nDiff confirms that the outputs between UEFIExtract and uefi_firmware are identical :)"},"comment":{"url":"https://api.github.com/repos/theopolis/uefi-firmware-parser/issues/comments/186980731","html_url":"https://github.com/theopolis/uefi-firmware-parser/pull/36#issuecomment-186980731","issue_url":"https://api.github.com/repos/theopolis/uefi-firmware-parser/issues/36","id":186980731,"user":{"login":"theopolis","id":981645,"avatar_url":"https://avatars.githubusercontent.com/u/981645?v=3","gravatar_id":"","url":"https://api.github.com/users/theopolis","html_url":"https://github.com/theopolis","followers_url":"https://api.github.com/users/theopolis/followers","following_url":"https://api.github.com/users/theopolis/following{/other_user}","gists_url":"https://api.github.com/users/theopolis/gists{/gist_id}","starred_url":"https://api.github.com/users/theopolis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theopolis/subscriptions","organizations_url":"https://api.github.com/users/theopolis/orgs","repos_url":"https://api.github.com/users/theopolis/repos","events_url":"https://api.github.com/users/theopolis/events{/privacy}","received_events_url":"https://api.github.com/users/theopolis/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T03:14:59Z","updated_at":"2016-02-22T03:14:59Z","body":"Yeah that'd be great! I'm happy to test offline if needed. I'm also sending some emails to figure out if I can just open the samples repository. There is a script in that private repo that tracks the expected number of \"objects\" discovered in each-- that's used to make sure no code changes remove functionality. But if we're adding more parsing then those should be updated inline to reflect the new (larger) counts."}}