Pure64: a 64-bit OS loader (now with SMP initialization)
-
- Member
- Posts: 118
- Joined: Mon May 05, 2008 5:51 pm
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
Where in the code does it do that? Thats a pretty stealth trick.
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
The source code for Pure64 isn't public.. it is binary only at the moment.
The source code included with Pure64 is the bootsector (which loads Pure64) and a few stub "kernels" in Assembly and C/C++.
-Ian
The source code included with Pure64 is the bootsector (which loads Pure64) and a few stub "kernels" in Assembly and C/C++.
-Ian
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
-
- Member
- Posts: 118
- Joined: Mon May 05, 2008 5:51 pm
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
Ahhhhhhh, okay that makes sense. I was looking at the bootsector.asm and it looked like a straight forward kernel loader no protected mode jumps or anything.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
If you are looking for the method: Entering_Long_Mode_Directly
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
No worries.
The bootloader loads the PURE64.SYS file from disk and starts it. That code was taken from the FreeDOS project and I modified it to suit the needs of Pure64.
Once Pure64 starts it gets the computer into 64-bit mode and activates any other CPU/cores in the computer. Pure64 then loads the OS kernel (currently called KERNEL64.SYS) and jumps to it.
Pure64 is intended to simplify OS development since the programmer doesn't have to worry about setting up the PC and loading their kernel from the disk.
If you would like to see some other code on getting into 64-bit mode you can look here:
http://www.cs.usfca.edu/~cruse/cs630f08/try64bit.s
http://flatassembler.net/examples/longmode.zip
-Ian
The bootloader loads the PURE64.SYS file from disk and starts it. That code was taken from the FreeDOS project and I modified it to suit the needs of Pure64.
Once Pure64 starts it gets the computer into 64-bit mode and activates any other CPU/cores in the computer. Pure64 then loads the OS kernel (currently called KERNEL64.SYS) and jumps to it.
Pure64 is intended to simplify OS development since the programmer doesn't have to worry about setting up the PC and loading their kernel from the disk.
If you would like to see some other code on getting into 64-bit mode you can look here:
http://www.cs.usfca.edu/~cruse/cs630f08/try64bit.s
http://flatassembler.net/examples/longmode.zip
-Ian
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
-
- Member
- Posts: 118
- Joined: Mon May 05, 2008 5:51 pm
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
I've been trying to get this to work but to my frustration its fighting me the whole way.
My Steps:
Create VDI in VirtualBox
Use Balder(Freedos 1.0) to format the disk
Use Hexeditor to replace bootsector with pure64's
Use Balder again to copy the pure64.sys to C:
Restart virtual machine without balder floppy
Fail
dir confirms the file is there but its not working...
Is there a better way to do this process?
My Steps:
Create VDI in VirtualBox
Use Balder(Freedos 1.0) to format the disk
Use Hexeditor to replace bootsector with pure64's
Use Balder again to copy the pure64.sys to C:
Restart virtual machine without balder floppy
Fail
dir confirms the file is there but its not working...
Is there a better way to do this process?
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
Hi chezzestix,
Is the hard drive image formatted with FAT32?
When you copied the boot sector did you overwrite the first 60 bytes of the boot sector in the disk image? The first 60 bytes of the boot sector need to remain since they store the information about the FAT32 partition. The boot sector code looks at this data to figure out how the file system is laid out.
-Ian
Is the hard drive image formatted with FAT32?
When you copied the boot sector did you overwrite the first 60 bytes of the boot sector in the disk image? The first 60 bytes of the boot sector need to remain since they store the information about the FAT32 partition. The boot sector code looks at this data to figure out how the file system is laid out.
-Ian
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
-
- Member
- Posts: 118
- Joined: Mon May 05, 2008 5:51 pm
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
OK now I got it.
Steps:
Format with FAT32
Move .sys to HDD
Replace 5A - 1FE (offset based on beginning of boot sector) with pure64 boot sector
It Works!
Now I have to switch to QEMU because VirtualBox doesn't support 64 bit guests.
EDIT:
lol... QEMU throws a SMBIOS not detected
Steps:
Format with FAT32
Move .sys to HDD
Replace 5A - 1FE (offset based on beginning of boot sector) with pure64 boot sector
It Works!
Now I have to switch to QEMU because VirtualBox doesn't support 64 bit guests.
EDIT:
lol... QEMU throws a SMBIOS not detected
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
Hi chezzestix,
I'm sorry about the problems you are having with Pure64. Please see the link below for the latest version that I'm still developing. This will remove the SMBIOS issue.
http://www.returninfinity.com/pure64/files-1/
Grab the file called pure64-20090107.zip
-Ian
I'm sorry about the problems you are having with Pure64. Please see the link below for the latest version that I'm still developing. This will remove the SMBIOS issue.
http://www.returninfinity.com/pure64/files-1/
Grab the file called pure64-20090107.zip
-Ian
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
-
- Member
- Posts: 118
- Joined: Mon May 05, 2008 5:51 pm
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
Your a saint and a scholar... however
now its asking for a Pure64.cfg
now its asking for a Pure64.cfg
Re: Pure64: a 64-bit OS loader (now with SMP initialization)
OK. Just create an empty file called pure64.cfg in the root.
This config file isn't used yet but will allow you to change a few things (Like the name of the kernel to load)
-Ian
This config file isn't used yet but will allow you to change a few things (Like the name of the kernel to load)
-Ian
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly