Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bootloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
bootloader
Commits
b0cdfe51
Commit
b0cdfe51
authored
8 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Fixes for bootloader unreal loading
parent
30301ee0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
x86_64/bootsector.asm
+5
-2
5 additions, 2 deletions
x86_64/bootsector.asm
x86_64/startup-common.asm
+6
-4
6 additions, 4 deletions
x86_64/startup-common.asm
with
11 additions
and
6 deletions
x86_64/bootsector.asm
+
5
−
2
View file @
b0cdfe51
...
@@ -21,7 +21,7 @@ boot: ; dl comes with disk
...
@@ -21,7 +21,7 @@ boot: ; dl comes with disk
mov
bh
,
0
mov
bh
,
0
mov
bl
,
[
di
sk
]
mov
bl
,
[
di
sk
]
mov
ax
,
(
startup_start
-
boot
)
/
512
mov
e
ax
,
(
startup_start
-
boot
)
/
512
mov
bx
,
startup_start
mov
bx
,
startup_start
mov
cx
,
(
startup_end
-
startup_start
)
/
512
mov
cx
,
(
startup_end
-
startup_start
)
/
512
xor
dx
,
dx
xor
dx
,
dx
...
@@ -58,11 +58,14 @@ load:
...
@@ -58,11 +58,14 @@ load:
jmp
load
jmp
load
.good_size:
.good_size:
mov
[
DAPACK.addr
],
ax
mov
[
DAPACK.addr
],
e
ax
mov
[
DAPACK.buf
],
bx
mov
[
DAPACK.buf
],
bx
mov
[
DAPACK.count
],
cx
mov
[
DAPACK.count
],
cx
mov
[
DAPACK.seg
],
dx
mov
[
DAPACK.seg
],
dx
; mov bx, [DAPACK.addr + 2]
; call print_num
;
; mov bx, [DAPACK.addr]
; mov bx, [DAPACK.addr]
; call print_num
; call print_num
;
;
...
...
This diff is collapsed.
Click to expand it.
x86_64/startup-common.asm
+
6
−
4
View file @
b0cdfe51
...
@@ -23,7 +23,7 @@ kernel_base equ 0x100000
...
@@ -23,7 +23,7 @@ kernel_base equ 0x100000
; how often do we need to call load and move memory
; how often do we need to call load and move memory
mov
ecx
,
kernel_file.length_sectors
/
buffer_size_sectors
mov
ecx
,
kernel_file.length_sectors
/
buffer_size_sectors
mov
ax
,
(
kernel_file
-
boot
)
/
512
mov
e
ax
,
(
kernel_file
-
boot
)
/
512
mov
edi
,
kernel_base
mov
edi
,
kernel_base
cld
cld
.lp:
.lp:
...
@@ -35,19 +35,21 @@ kernel_base equ 0x100000
...
@@ -35,19 +35,21 @@ kernel_base equ 0x100000
mov
bx
,
kernel_file
mov
bx
,
kernel_file
mov
dx
,
0x0
mov
dx
,
0x0
push
ax
push
edi
push
eax
call
load
call
load
; moving buffer
; moving buffer
call
unreal
call
unreal
pop
ax
pop
eax
pop
edi
mov
esi
,
kernel_file
mov
esi
,
kernel_file
mov
ecx
,
buffer_size_bytes
/
4
mov
ecx
,
buffer_size_bytes
/
4
a32
rep
movsd
a32
rep
movsd
; preparing next iteration
; preparing next iteration
add
ax
,
buffer_size_sectors
add
e
ax
,
buffer_size_sectors
pop
cx
pop
cx
loop
.lp
loop
.lp
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment