Skip to content

Conversation

@wjn740
Copy link
Contributor

@wjn740 wjn740 commented Feb 12, 2020

I move INITSEG to 0x0050. it is the lowest address for useable.
this area about 30KB. it is enough to store GDT and E820.

https://wiki.osdev.org/Memory_Map_(x86)#Overview

I move INITSEG to 0x0050. it is the lowest address for useable.
this area about 30KB. it is enough to store GDT and E820.
CYLS = 10
BOOTSEG = 0x07C0
INITSEG = 0x7000
INITSEG = 0x0050
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use #include <common.h> and remove INITSEG here.
BTW: the file name bootsector.s to bootsector.S.

# Type 5: Area containing bad memory
#Set register base https://wiki.osdev.org/Detecting_Memory_(x86)
mov $0x8004, %di
E820_OFFSET=0x1004
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment, move E820_OFFSET to common.h

jmp fin

INITSEG = 0x7000
INITSEG = 0x0050
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

#define COL8_848484 15
#define MEM_MAP_ADDR (char *)((0x00078004)-(SYSSEG << 4))
#define E820_OFFSET 0x1004
#define MEM_MAP_ADDR (char *)((INITSEG << 4)+(E820_OFFSET)-(SYSSEG << 4))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is the address after paging? so this PR depend on the paging PR?

@coolgw
Copy link
Contributor

coolgw commented Feb 13, 2020

I have no idea the point of move this to the lower memory, could you help explain it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants