Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bootxx needs to fit within 0th track of MBR partition?




To: Tobias Nygren <tnn%netbsd.org@localhost>, "NetBSD/amd64 Discussion List" <port-amd64%netbsd.org@localhost>

Subject: Re: bootxx needs to fit within 0th track of MBR partition?

From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>

Date: Wed, 6 Sep 2023 13:00:41 +0900


Hi,

Thank you guys for comments, and sorry for the late reply.

The original problem itself has already been fixed by christos@;
optimization flags for libi386 was unintentionally missing.

However, sparse room for bootxx_ffsv2 is still less than a sector,
and fix will be necessary in the near future.

I found bootxx works as follows:

(1) mbr(8) or BIOS load 1st sector of bootxx into the memory
(2) bootxx loads itself by "int 13h" calls (CHS ah:0x02 or LBA ah:0x42)

For (2), we use hardcoded 15-sectors (one track for 5" 2HD disk).
"int 13h" for old machines may have 1-track restriction, but
I still have not found any documentation.

Even if single reads had 1-track restriction, it should be OK to
use multiple BIOS calls, IMO.

Therefore, I *guess* that we can use entire sectors for target
filesystems even for old machines, in principle.

But this needs careful assembler coding and tests...

BTW:

On Fri, Aug 25, 2023 at 9:08 PM Tobias Nygren <tnn%netbsd.org@localhost> wrote:
> Side note I think there are other issues with boot code built with
> clang. For example I've encountered that bootx64.efi hangs for
> me when built with clang.

I could not reproduce this problem on QEMU with OVMF. Can you
please share more details? In my limited experience, I can say
printf debugging is useful for efiboot; at least you can find out
where it stalls.

Thanks,
rin


References:

bootxx needs to fit within 0th track of MBR partition?
From: Rin Okuyama

Re: bootxx needs to fit within 0th track of MBR partition?
From: Tobias Nygren




Prev by Date: Re: bootxx needs to fit within 0th track of MBR partition?

Next by Date: Help needed to port NetBSD to an alien i386 machine

Previous by Thread: Re: bootxx needs to fit within 0th track of MBR partition?

Next by Thread: Help needed to port NetBSD to an alien i386 machine

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index