Compare commits
No commits in common. "454f0875f5e4ac4c56c214b6ba919480dce9fba3" and "70366fa7be99ee9477448b94f671728916ea702b" have entirely different histories.
454f0875f5
...
70366fa7be
7
Makefile
7
Makefile
@ -88,16 +88,11 @@ test: clean kernel disk.img
|
|||||||
run:kernel disk.img ## Run the OS on qemu
|
run:kernel disk.img ## Run the OS on qemu
|
||||||
qemu-system-x86_64 -kernel $< -serial stdio $(QEMU_OPT)
|
qemu-system-x86_64 -kernel $< -serial stdio $(QEMU_OPT)
|
||||||
|
|
||||||
debug: CFLAGS += $(DEBUG_FLAGS) ## Run the OS on qemu and attach a debugger to it (may need a clean before to have the debug symbols)
|
debug: CFLAGS += $(DEBUG_FLAGS) ## Run the OS on qemu and attach a debugger to it (may need a clean befor to have the debug symbols)
|
||||||
debug: CXXFLAGS += $(DEBUG_FLAGS)
|
debug: CXXFLAGS += $(DEBUG_FLAGS)
|
||||||
debug:kernel kernel.debug disk.img
|
debug:kernel kernel.debug disk.img
|
||||||
gdb -q -x debug.gdb
|
gdb -q -x debug.gdb
|
||||||
|
|
||||||
isodebug: CFLAGS += $(DEBUG_FLAGS) ## Same than previous but kernel is loaded by grub. So, for example, we can access the elf debug info
|
|
||||||
isodebug: CXXFLAGS += $(DEBUG_FLAGS)
|
|
||||||
isodebug:fd.iso disk.img
|
|
||||||
gdb -q -x debug.iso.gdb
|
|
||||||
|
|
||||||
debug_test: CFLAGS += $(DEBUG_FLAGS) -DRUN_TEST
|
debug_test: CFLAGS += $(DEBUG_FLAGS) -DRUN_TEST
|
||||||
debug_test: debug
|
debug_test: debug
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ void idleThread(void *arg)
|
|||||||
#define FILE_MAX_SIZE 64 // In nb of sectors
|
#define FILE_MAX_SIZE 64 // In nb of sectors
|
||||||
void loadUserSpace()
|
void loadUserSpace()
|
||||||
{
|
{
|
||||||
struct ata_partition *part = ATAGetPartitionByType(PART_TYPE_LINUX);
|
struct ata_partition *part = ATAGetPartition(1);
|
||||||
|
|
||||||
if (part == NULL) {
|
if (part == NULL) {
|
||||||
printf("No user partition found\n");
|
printf("No user partition found\n");
|
||||||
|
@ -521,19 +521,6 @@ struct ata_partition *ATAGetPartition(int id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ata_partition *ATAGetPartitionByType(uint type)
|
|
||||||
{
|
|
||||||
struct ata_partition *part;
|
|
||||||
int count;
|
|
||||||
list_foreach(partitions, part, count)
|
|
||||||
{
|
|
||||||
if (part->type == type)
|
|
||||||
return part;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct ata_partition *ATAPartitionCreate(uint type, uint size, uint32_t lba,
|
struct ata_partition *ATAPartitionCreate(uint type, uint size, uint32_t lba,
|
||||||
struct ata_device *dev)
|
struct ata_device *dev)
|
||||||
{
|
{
|
||||||
|
@ -104,6 +104,5 @@ int ATAReadPartitionSector(struct ata_partition *part, int offset, uint nbSector
|
|||||||
int ATAReadSector(struct ata_device *dev, int lba, uint nbSector, void *buf);
|
int ATAReadSector(struct ata_device *dev, int lba, uint nbSector, void *buf);
|
||||||
int ATAWriteSector(struct ata_device *dev, int lba, uint nbSector, void *buf);
|
int ATAWriteSector(struct ata_device *dev, int lba, uint nbSector, void *buf);
|
||||||
struct ata_device *ATAGetDevice(int ctlId, int devId);
|
struct ata_device *ATAGetDevice(int ctlId, int devId);
|
||||||
struct ata_partition *ATAGetPartitionByType(uint type);
|
|
||||||
int ATAReadPartition(struct ata_device *dev);
|
int ATAReadPartition(struct ata_device *dev);
|
||||||
struct ata_partition *ATAGetPartition(int id);
|
struct ata_partition *ATAGetPartition(int id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user