Use the get_bda_ptr() accessor function instead of hardcoding with MAKE_FLATPTR().
Signed-off-by: Helge Deller deller@gmx.de --- src/block.c | 2 +- src/fw/csm.c | 2 +- src/post.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/block.c b/src/block.c index 1f600b8..ec02d76 100644 --- a/src/block.c +++ b/src/block.c @@ -257,7 +257,7 @@ void map_hd_drive(struct drive_s *drive) { ASSERT32FLAT(); - struct bios_data_area_s *bda = MAKE_FLATPTR(SEG_BDA, 0); + struct bios_data_area_s *bda = get_bda_ptr(); int hdid = bda->hdcount; dprintf(3, "Mapping hd drive %p to %d\n", drive, hdid); add_drive(IDMap[EXTTYPE_HD], &bda->hdcount, drive); diff --git a/src/fw/csm.c b/src/fw/csm.c index 8359bcb..c0be9eb 100644 --- a/src/fw/csm.c +++ b/src/fw/csm.c @@ -181,7 +181,7 @@ handle_csm_0002(struct bregs *regs) enable_vga_console();
// EFI fills this in for us. Zero it for now... - struct bios_data_area_s *bda = MAKE_FLATPTR(SEG_BDA, 0); + struct bios_data_area_s *bda = get_bda_ptr(); bda->hdcount = 0;
thread_setup(); diff --git a/src/post.c b/src/post.c index f93106a..a504aef 100644 --- a/src/post.c +++ b/src/post.c @@ -75,7 +75,7 @@ bda_init(void) { dprintf(3, "init bda\n");
- struct bios_data_area_s *bda = MAKE_FLATPTR(SEG_BDA, 0); + struct bios_data_area_s *bda = get_bda_ptr(); memset(bda, 0, sizeof(*bda));
int esize = EBDA_SIZE_START; -- 2.29.2