Port-next68k archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: next68k: current issues
Hello,
>> I'm pretty sure the patch below will fix the problem with Previous,
>> as it has a 54 byte message. But on the other hand it would be
>> more secure to handle any (short) length of message. The messages
>> might vary, especially on old disks. I don't see the point of
>> treating this as an error condition.
>
> I see your point. Drivers should handle short transfers especially
> for SCSI disconnect etc. But one concern is the residual byte number
> check was explicitly added 20 years ago and it looks a workaround of
> some problem:
> https://github.com/NetBSD/src/commit/b1ce5975467f3b2651ba9b206a1e35a4af60e0f1
>
> If a fix against a number of inquiry xfer bytes works around,
> I would like to commit it for now.
I am OK with that although I think that the problem described in the old commit might have had another source. That kind of bus error would happen if someone tries writing to a non-existent physical address via DMA.
>
>>> --- a/sys/arch/next68k/stand/boot/sd.c
>>> +++ b/sys/arch/next68k/stand/boot/sd.c
>>> @@ -98,8 +98,8 @@ sdprobe(char target, char lun)
>>>
>>> memset(&cdb2, 0, sizeof(cdb2));
>>> cdb2.opcode = INQUIRY;
>>> - cdb2.length = sizeof(inq);
>>> - count = sizeof (inq);
>>> + cdb2.length = SCSIPI_INQUIRY_LENGTH_SCSI2;
>>> + count = SCSIPI_INQUIRY_LENGTH_SCSI2;
>>> error = scsiicmd(target, lun, (u_char *)&cdb2, sizeof(cdb2),
>>> (char *)&inq, &count);
>>> if (error != 0)
>
>> The bootloader is not contained on a partition. The first 160 kB
>> (320 blocks) are reserved for the disk label and bootloader.
>> There are 4 copies of the label and 2 copies of the bootloader
>> in case there are faulty blocks. The label already contains
>> correct information about the bootloader positions (else NeXT
>> ROM wouldn't load it). But the first partition overlaps with
>> the bootloader.
>
> I'm using the following label on my NetBSD/next68k:
> ---
> 4 partitions:
> # size offset fstype [fsize bsize cpg/sgs]
> a: 2026528 872 4.2BSD 2048 16384 128 # (Cyl. 2 - 4649)
> b: 76736 2027400 swap # (Cyl. 4650 - 4825)
> c: 2109840 0 unused 0 0 # (Cyl. 0 - 4839*)
> d: 872 0 boot # (Cyl. 0 - 1)
> ---
>
> The partition d is not necessary for kernel or bootloader,
> but we can denote explicitly leading sectors should be preserved
> for a bootloader so that installboot(8) utility can check not
> overwriting existing root partition.
>
> Anyway we have to update install notes..
> https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.3/next68k/INSTALL.html
I do not exactly know how these things are handled. But if this leads to the first 160 kB being protected against overlap with partitions that should be OK.
>
> Thanks,
> ---
> Izumi Tsutsui
Thank you very much for your efforts!
Andreas Grabher
Home |
Main Index |
Thread Index |
Old Index