Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coco3: use CONFIG_TD_MAX_PART enumerating CCPT partitions #1144

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Kernel/platform/platform-coco3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ extern uint16_t swap_dev;
#define CONFIG_TD_SD
#define TD_SD_NUM 2
#define CONFIG_TD_CUSTOMPART /* Custom partition tables (CCPT) */
/* CCPT supports 14 partitions, but more than 6 makes the buffers take too much
* space for the memory map as it stands. Keep to the default of 4 for now. */
#define CONFIG_TD_MAX_PART 4

#define CONFIG_RTC /* enable RTC code */
#define CONFIG_RTC_INTERVAL 100 /* time in deciseconds to atually poll rtc */
Expand Down
2 changes: 1 addition & 1 deletion Kernel/platform/platform-coco3/mbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ uint_fast8_t td_plt_setup(uint_fast8_t dev, uint32_t *lba, void *buf)
k++;
kprintf("hd%c%d ", dev + 'a', k);
/* TODO: swap on CCPT */
if (k == MAX_PART)
if (k == CONFIG_TD_MAX_PART)
break;
}
}
Expand Down