Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Ok I went back to [org 0x00], but now I get another triple fault the same as before I changed org [0x00] to [0x1000], I feel as though my gdt is not aligned correctly still or for some reason an invalid address is being passed, any ideas?
First, you need to make sure you understand where in memory your code is loaded. You have a jump to 0x1000:0x0000 in there, which is a jump to linear address 0x10000. If that is wrong, go back and change the jump to point to the correct location before doing anything else!
After that, you have a few options.
The first is to set the real mode segment registers to 0. You would then use "jmp 0:(linear address)" and "org (linear address)". This requires the code that jumps to protected mode to be within the first 64k of memory, but you're free to put the rest of your code elsewhere.
Another option is to use an org statement that is correct for the protected mode part but not the real mode part, and then correct all of the offsets in the real mode part manually. Since the real mode portion only contains one offset (in the lgdt instruction), this is quite simple: change it to "org (linear address)" and "lgdt [gdtr_descr - (linear address)]".
A third option is to load a temporary GDT with a base address that matches what you're using in real mode, and then later replace it with the correct values. I recommend avoiding this and using one of the previous two solutions.
My code has already successfully jumped to the 2bl (second stage) and has initialised protected mode as well as hopefully loaded the gdt. The problem is when I attempt to reset the code segment with the [descriptor:offset] memory addressing model (by jumping jmp 0x8:pm_reset) bochs triple faults. The data segment is set to zero as in the bochs debug dump (since lgdt[gdtr] only accepts linear addresses) and the code segment is set to 0x1000. It seems as though something is wrong with my gdt's alignment, but I don't know what, considering the data segment was set to zero at time of the load gdt instruction and it should be a linear address?
Your "lgdt" opcode loads the GDT descriptor from the data segment, not the code segment. You either need to override it to use CS (i.e. "lgdt [cs:gdtr_descr]") or adjust your code so that CS and DS have the same value. (Due to the previously mentioned issues with segmentation, I recommend using 0 for all of your segment registers in real mode, but that is not possible if any of your code is loaded above 64k.)