{"action":"closed","number":51,"pull_request":{"url":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls/51","id":170370584,"html_url":"https://github.com/ReturnInfinity/Pure64/pull/51","diff_url":"https://github.com/ReturnInfinity/Pure64/pull/51.diff","patch_url":"https://github.com/ReturnInfinity/Pure64/pull/51.patch","issue_url":"https://api.github.com/repos/ReturnInfinity/Pure64/issues/51","number":51,"state":"closed","locked":false,"title":"Increased Maximum Kernel Size","user":{"login":"tay10r","id":4486381,"avatar_url":"https://avatars0.githubusercontent.com/u/4486381?v=4","gravatar_id":"","url":"https://api.github.com/users/tay10r","html_url":"https://github.com/tay10r","followers_url":"https://api.github.com/users/tay10r/followers","following_url":"https://api.github.com/users/tay10r/following{/other_user}","gists_url":"https://api.github.com/users/tay10r/gists{/gist_id}","starred_url":"https://api.github.com/users/tay10r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tay10r/subscriptions","organizations_url":"https://api.github.com/users/tay10r/orgs","repos_url":"https://api.github.com/users/tay10r/repos","events_url":"https://api.github.com/users/tay10r/events{/privacy}","received_events_url":"https://api.github.com/users/tay10r/received_events","type":"User","site_admin":false},"body":"The problem fixed by this pull request was the kernel file size limits imposed by the extended disk read function from the BIOS interrupt. The maximum size that this function can read is about 64 KiB, including the Pure64 binary. This pull request increases that limit to the memory that's available to the system.\r\n\r\nThere were several things that needed to be added for this to work. Many of these things are also required for supporting GPT partitioning. The first was memory mapping, used to allocate memory in an automated way. The second was an AHCI driver, which is used to load the file system and kernel. The last was a printf-like debug function, used in the development of this pull request.\r\n\r\nNow here are the technical details.\r\n\r\n### Memory Manager\r\n\r\nThe memory manager is initialized at the first address found in the E820 entries, not does not overlap with known Pure64 data. In QEMU, this is `0x60000`. It is made up of a allocation table, which contains a series of memory allocation entries. Initially, the allocation table contains two entries. One entry is for itself and the other is for the memory range used by the boot code (`0x00` to `0x60000`). As entries are added, the allocation table is resized and moved to different locations in memory. It is found by structure containing its address `pure64_map`. The memory manager has no practical limit.\r\n\r\n### AHCI Driver\r\n\r\nThe AHCI driver is very simple. It supports read functions only. You may noticed that loading the kernel and file system is a little bit slow. This is because the file system code treats it like a byte stream, instead of a stream of sectors. Hence, there are a lot of read operations on the same sector when there doesn't need to be. I may add caching in the future to avoid this. It's speed also has a lot to do with not using all available PRDT entries. In the code I wrote, I only use one of them. This will be fixed in the next pull request.\r\n\r\n### Debugging\r\n\r\nThe debug output is written to COM1. The C function, `debug`, supports many format specifiers from the C standard. It also takes advantage of GCC's function attribute that warns you for missing arguments. For example, this would cause a GCC warning:\r\n\r\n```\r\ndebug(\"Here's a string: %s\\n\");\r\n```\r\n\r\nBecause it should be:\r\n\r\n```\r\ndebug(\"Here's a string: %s\\n\", \"A string!\");\r\n``\r\n\r\nI'm not sure how many of the format specifiers work, but here's some of the ones I tried.\r\n\r\n```\r\ndebug(\"string: %s\", \"aabbcc\");\r\ndebug(\"string with length: %.*s\\n\", 6, \"aabbcc\");\r\ndebug(\"pointer address: %p\\n\", (void *) 0x112233);\r\ndebug(\"hex value: %lx\\n\", 0x334455UL);\r\n```\r\n\r\n### GPT Support\r\n\r\nGPT support is still in it's early stages. There is a new command, called `init`, which starts a GPT partitioned disk image. The rest of the commands and the boot loader have yet to be updated for GPT support, though.\r\n\r\nYou can create an empty GPT partition like this:\r\n\r\n```\r\n./src/util/pure64 init\r\n```\r\n\r\nWhich will create the file, `pure64.img`. You can examine it with `fdisk`, like this:\r\n\r\n```\r\nfdisk ./pure64.img\r\n```\r\n\r\nOr any other partitioning tool.","created_at":"2018-02-21T03:50:40Z","updated_at":"2018-02-21T14:40:56Z","closed_at":"2018-02-21T14:40:56Z","merged_at":"2018-02-21T14:40:56Z","merge_commit_sha":"30bf4c1974043223a3539dc9b8ed6f73862052d2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls/51/commits","review_comments_url":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls/51/comments","review_comment_url":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReturnInfinity/Pure64/issues/51/comments","statuses_url":"https://api.github.com/repos/ReturnInfinity/Pure64/statuses/041a5912ea655c3bd713db52e320bb3cecba2ec7","head":{"label":"tay10r:master","ref":"master","sha":"041a5912ea655c3bd713db52e320bb3cecba2ec7","user":{"login":"tay10r","id":4486381,"avatar_url":"https://avatars0.githubusercontent.com/u/4486381?v=4","gravatar_id":"","url":"https://api.github.com/users/tay10r","html_url":"https://github.com/tay10r","followers_url":"https://api.github.com/users/tay10r/followers","following_url":"https://api.github.com/users/tay10r/following{/other_user}","gists_url":"https://api.github.com/users/tay10r/gists{/gist_id}","starred_url":"https://api.github.com/users/tay10r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tay10r/subscriptions","organizations_url":"https://api.github.com/users/tay10r/orgs","repos_url":"https://api.github.com/users/tay10r/repos","events_url":"https://api.github.com/users/tay10r/events{/privacy}","received_events_url":"https://api.github.com/users/tay10r/received_events","type":"User","site_admin":false},"repo":{"id":110453512,"name":"Pure64","full_name":"tay10r/Pure64","owner":{"login":"tay10r","id":4486381,"avatar_url":"https://avatars0.githubusercontent.com/u/4486381?v=4","gravatar_id":"","url":"https://api.github.com/users/tay10r","html_url":"https://github.com/tay10r","followers_url":"https://api.github.com/users/tay10r/followers","following_url":"https://api.github.com/users/tay10r/following{/other_user}","gists_url":"https://api.github.com/users/tay10r/gists{/gist_id}","starred_url":"https://api.github.com/users/tay10r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tay10r/subscriptions","organizations_url":"https://api.github.com/users/tay10r/orgs","repos_url":"https://api.github.com/users/tay10r/repos","events_url":"https://api.github.com/users/tay10r/events{/privacy}","received_events_url":"https://api.github.com/users/tay10r/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tay10r/Pure64","description":"Pure64 is a software loader that was initially created for BareMetal OS. The loader sets the computer into a full 64-bit state with no legacy compatibility layers and also enables all available CPU Cores in the computer.","fork":true,"url":"https://api.github.com/repos/tay10r/Pure64","forks_url":"https://api.github.com/repos/tay10r/Pure64/forks","keys_url":"https://api.github.com/repos/tay10r/Pure64/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tay10r/Pure64/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tay10r/Pure64/teams","hooks_url":"https://api.github.com/repos/tay10r/Pure64/hooks","issue_events_url":"https://api.github.com/repos/tay10r/Pure64/issues/events{/number}","events_url":"https://api.github.com/repos/tay10r/Pure64/events","assignees_url":"https://api.github.com/repos/tay10r/Pure64/assignees{/user}","branches_url":"https://api.github.com/repos/tay10r/Pure64/branches{/branch}","tags_url":"https://api.github.com/repos/tay10r/Pure64/tags","blobs_url":"https://api.github.com/repos/tay10r/Pure64/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tay10r/Pure64/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tay10r/Pure64/git/refs{/sha}","trees_url":"https://api.github.com/repos/tay10r/Pure64/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tay10r/Pure64/statuses/{sha}","languages_url":"https://api.github.com/repos/tay10r/Pure64/languages","stargazers_url":"https://api.github.com/repos/tay10r/Pure64/stargazers","contributors_url":"https://api.github.com/repos/tay10r/Pure64/contributors","subscribers_url":"https://api.github.com/repos/tay10r/Pure64/subscribers","subscription_url":"https://api.github.com/repos/tay10r/Pure64/subscription","commits_url":"https://api.github.com/repos/tay10r/Pure64/commits{/sha}","git_commits_url":"https://api.github.com/repos/tay10r/Pure64/git/commits{/sha}","comments_url":"https://api.github.com/repos/tay10r/Pure64/comments{/number}","issue_comment_url":"https://api.github.com/repos/tay10r/Pure64/issues/comments{/number}","contents_url":"https://api.github.com/repos/tay10r/Pure64/contents/{+path}","compare_url":"https://api.github.com/repos/tay10r/Pure64/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tay10r/Pure64/merges","archive_url":"https://api.github.com/repos/tay10r/Pure64/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tay10r/Pure64/downloads","issues_url":"https://api.github.com/repos/tay10r/Pure64/issues{/number}","pulls_url":"https://api.github.com/repos/tay10r/Pure64/pulls{/number}","milestones_url":"https://api.github.com/repos/tay10r/Pure64/milestones{/number}","notifications_url":"https://api.github.com/repos/tay10r/Pure64/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tay10r/Pure64/labels{/name}","releases_url":"https://api.github.com/repos/tay10r/Pure64/releases{/id}","deployments_url":"https://api.github.com/repos/tay10r/Pure64/deployments","created_at":"2017-11-12T17:30:35Z","updated_at":"2018-02-13T04:46:19Z","pushed_at":"2018-02-21T03:22:21Z","git_url":"git://github.com/tay10r/Pure64.git","ssh_url":"git@github.com:tay10r/Pure64.git","clone_url":"https://github.com/tay10r/Pure64.git","svn_url":"https://github.com/tay10r/Pure64","homepage":"http://www.returninfinity.com","size":410,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"ReturnInfinity:master","ref":"master","sha":"96dc9d662c9e1dff97b68197dd9b8db5fd51ac00","user":{"login":"ReturnInfinity","id":40145,"avatar_url":"https://avatars0.githubusercontent.com/u/40145?v=4","gravatar_id":"","url":"https://api.github.com/users/ReturnInfinity","html_url":"https://github.com/ReturnInfinity","followers_url":"https://api.github.com/users/ReturnInfinity/followers","following_url":"https://api.github.com/users/ReturnInfinity/following{/other_user}","gists_url":"https://api.github.com/users/ReturnInfinity/gists{/gist_id}","starred_url":"https://api.github.com/users/ReturnInfinity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReturnInfinity/subscriptions","organizations_url":"https://api.github.com/users/ReturnInfinity/orgs","repos_url":"https://api.github.com/users/ReturnInfinity/repos","events_url":"https://api.github.com/users/ReturnInfinity/events{/privacy}","received_events_url":"https://api.github.com/users/ReturnInfinity/received_events","type":"Organization","site_admin":false},"repo":{"id":1777707,"name":"Pure64","full_name":"ReturnInfinity/Pure64","owner":{"login":"ReturnInfinity","id":40145,"avatar_url":"https://avatars0.githubusercontent.com/u/40145?v=4","gravatar_id":"","url":"https://api.github.com/users/ReturnInfinity","html_url":"https://github.com/ReturnInfinity","followers_url":"https://api.github.com/users/ReturnInfinity/followers","following_url":"https://api.github.com/users/ReturnInfinity/following{/other_user}","gists_url":"https://api.github.com/users/ReturnInfinity/gists{/gist_id}","starred_url":"https://api.github.com/users/ReturnInfinity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReturnInfinity/subscriptions","organizations_url":"https://api.github.com/users/ReturnInfinity/orgs","repos_url":"https://api.github.com/users/ReturnInfinity/repos","events_url":"https://api.github.com/users/ReturnInfinity/events{/privacy}","received_events_url":"https://api.github.com/users/ReturnInfinity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ReturnInfinity/Pure64","description":"Pure64 is a software loader that was initially created for BareMetal OS. The loader sets the computer into a full 64-bit state with no legacy compatibility layers and also enables all available CPU Cores in the computer.","fork":false,"url":"https://api.github.com/repos/ReturnInfinity/Pure64","forks_url":"https://api.github.com/repos/ReturnInfinity/Pure64/forks","keys_url":"https://api.github.com/repos/ReturnInfinity/Pure64/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReturnInfinity/Pure64/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReturnInfinity/Pure64/teams","hooks_url":"https://api.github.com/repos/ReturnInfinity/Pure64/hooks","issue_events_url":"https://api.github.com/repos/ReturnInfinity/Pure64/issues/events{/number}","events_url":"https://api.github.com/repos/ReturnInfinity/Pure64/events","assignees_url":"https://api.github.com/repos/ReturnInfinity/Pure64/assignees{/user}","branches_url":"https://api.github.com/repos/ReturnInfinity/Pure64/branches{/branch}","tags_url":"https://api.github.com/repos/ReturnInfinity/Pure64/tags","blobs_url":"https://api.github.com/repos/ReturnInfinity/Pure64/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReturnInfinity/Pure64/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReturnInfinity/Pure64/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReturnInfinity/Pure64/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReturnInfinity/Pure64/statuses/{sha}","languages_url":"https://api.github.com/repos/ReturnInfinity/Pure64/languages","stargazers_url":"https://api.github.com/repos/ReturnInfinity/Pure64/stargazers","contributors_url":"https://api.github.com/repos/ReturnInfinity/Pure64/contributors","subscribers_url":"https://api.github.com/repos/ReturnInfinity/Pure64/subscribers","subscription_url":"https://api.github.com/repos/ReturnInfinity/Pure64/subscription","commits_url":"https://api.github.com/repos/ReturnInfinity/Pure64/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReturnInfinity/Pure64/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReturnInfinity/Pure64/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReturnInfinity/Pure64/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReturnInfinity/Pure64/contents/{+path}","compare_url":"https://api.github.com/repos/ReturnInfinity/Pure64/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReturnInfinity/Pure64/merges","archive_url":"https://api.github.com/repos/ReturnInfinity/Pure64/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReturnInfinity/Pure64/downloads","issues_url":"https://api.github.com/repos/ReturnInfinity/Pure64/issues{/number}","pulls_url":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls{/number}","milestones_url":"https://api.github.com/repos/ReturnInfinity/Pure64/milestones{/number}","notifications_url":"https://api.github.com/repos/ReturnInfinity/Pure64/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReturnInfinity/Pure64/labels{/name}","releases_url":"https://api.github.com/repos/ReturnInfinity/Pure64/releases{/id}","deployments_url":"https://api.github.com/repos/ReturnInfinity/Pure64/deployments","created_at":"2011-05-20T18:01:25Z","updated_at":"2018-02-17T17:14:16Z","pushed_at":"2018-02-21T14:40:56Z","git_url":"git://github.com/ReturnInfinity/Pure64.git","ssh_url":"git@github.com:ReturnInfinity/Pure64.git","clone_url":"https://github.com/ReturnInfinity/Pure64.git","svn_url":"https://github.com/ReturnInfinity/Pure64","homepage":"http://www.returninfinity.com","size":375,"stargazers_count":385,"watchers_count":385,"language":"Assembly","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":69,"open_issues":11,"watchers":385,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls/51"},"html":{"href":"https://github.com/ReturnInfinity/Pure64/pull/51"},"issue":{"href":"https://api.github.com/repos/ReturnInfinity/Pure64/issues/51"},"comments":{"href":"https://api.github.com/repos/ReturnInfinity/Pure64/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReturnInfinity/Pure64/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/ReturnInfinity/Pure64/statuses/041a5912ea655c3bd713db52e320bb3cecba2ec7"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"IanSeyler","id":800906,"avatar_url":"https://avatars0.githubusercontent.com/u/800906?v=4","gravatar_id":"","url":"https://api.github.com/users/IanSeyler","html_url":"https://github.com/IanSeyler","followers_url":"https://api.github.com/users/IanSeyler/followers","following_url":"https://api.github.com/users/IanSeyler/following{/other_user}","gists_url":"https://api.github.com/users/IanSeyler/gists{/gist_id}","starred_url":"https://api.github.com/users/IanSeyler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanSeyler/subscriptions","organizations_url":"https://api.github.com/users/IanSeyler/orgs","repos_url":"https://api.github.com/users/IanSeyler/repos","events_url":"https://api.github.com/users/IanSeyler/events{/privacy}","received_events_url":"https://api.github.com/users/IanSeyler/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":39,"additions":3176,"deletions":263,"changed_files":31}}
{"actor":{"display_login":"IanSeyler"}}