Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oNyEe-0005mY-Sq for mharc-grub-devel@gnu.org; Tue, 16 Aug 2022 11:12:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNyEd-0005mK-9F for grub-devel@gnu.org; Tue, 16 Aug 2022 11:12:03 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:46686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNyEb-0004rA-Mr for grub-devel@gnu.org; Tue, 16 Aug 2022 11:12:03 -0400 Received: by mail-pl1-x62f.google.com with SMTP id jm11so7255403plb.13 for ; Tue, 16 Aug 2022 08:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=yXfbC4Vdw7OllrRFIE1U1C/uHIiuA0TLJXjprnI7f2A=; b=h7HGW1WhBIsavUkOgd0NoKzqXLnGj/FoZ+hSn0Qmb37gZbN8K2BF3t94ib0wlDPJcQ 3qFPgia6UtxNMLKJDJfqqM+gRqourma946OiSFGokDxG/9HI0FqIE5KFkfgs7tuFrWoi Nqv7dWFGBrj8gqo8uJVa3KpRByEMYJYHbcyKs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=yXfbC4Vdw7OllrRFIE1U1C/uHIiuA0TLJXjprnI7f2A=; b=BSblPqcRIMGNB5Ko6qFX2blsJ31V+LUtUeumU1sIoBOZoND75aBtaiddUudw343qFM 95P8A5f4JzGCv5QlwTiPnm08xt6m737DcMdkrAXENxGWH08hV9i8seAda7PgHN4YBI0T lmSMssHZ1HvA5KbaQq8j+hwGC/EBHzFApXcxK+cev5cFt8OvugQRrGOVHfUpVfu09Vyr MKYor/+4c4OShanO1SpNJ/jZgrT6bzFw4R/AsfU406oBUtKcOc/zLoDai3tFx4AcsQJQ nOi5X1qR/UKbtMFe/6DqkiShe6gxDOtBoTm67nsjpCBgHBD7F0zsTXhEp5ANRRpOahAP p4bg== X-Gm-Message-State: ACgBeo2bravWVZ7y4SrSNtqG/oDub5TFwlw84lWSBkZZv6GnS+FSFpMc lrQ3y6eEaYauAgxLayDakrVqaQ== X-Google-Smtp-Source: AA6agR72NTjRusWXcs8fC9YmeNs4px/s0m5vvHdd5OPw5M5ArVN6RXMT4LLBmbPShle9xVWbzMrRoA== X-Received: by 2002:a17:90a:1b8e:b0:1f3:7c7:9c3 with SMTP id w14-20020a17090a1b8e00b001f307c709c3mr33829323pjc.8.1660662719513; Tue, 16 Aug 2022 08:11:59 -0700 (PDT) Received: from localhost ([2001:4479:e300:5b00:9eb6:d0ff:fedc:8de7]) by smtp.gmail.com with ESMTPSA id 193-20020a6214ca000000b0052d98fbf8f3sm8544328pfu.56.2022.08.16.08.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 08:11:58 -0700 (PDT) From: Daniel Axtens To: Diego Domingos , grub-devel@gnu.org Cc: stefanb@linux.ibm.com, Diego Domingos Subject: Re: [PATCH 6/6] ieee1275: implement vec5 for cas negotiation In-Reply-To: <20220811174104.1148447-7-diegodo@linux.vnet.ibm.com> References: <20220811174104.1148447-1-diegodo@linux.vnet.ibm.com> <20220811174104.1148447-7-diegodo@linux.vnet.ibm.com> Date: Wed, 17 Aug 2022 01:11:55 +1000 Message-ID: <87r11g9q9w.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=dja@axtens.net; helo=mail-pl1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2022 15:12:03 -0000 Diego Domingos writes: > As a legacy support, if the vector 5 is not implemented, Power Hypervisor will > consider the max CPUs as 64 instead 256 currently supported during > client-architecture-support negotiation. > > This patch implements the vector 5 and set the MAX CPUs to 256 while setting the > others values to 0 (default). Ergh, CAS. I'm sorry I didn't check the defaults more carefully when I was at IBM! Anyway, this looks sane to me. I'm not in a position to test it any more, but it certainly follows the pattern I'd expect. And it is only likely to affect IBM machines anyway, so I think it's safe to add. > +struct option_vector5 { > + grub_uint8_t byte1; > + grub_uint8_t byte2; > + grub_uint8_t byte3; > + grub_uint8_t cmo; > + grub_uint8_t associativity; > + grub_uint8_t bin_opts; > + grub_uint8_t micro_checkpoint; > + grub_uint8_t reserved0; > + grub_uint32_t max_cpus; > +} __attribute__((packed)); > + I think the indent here should be 2 spaces? > + > struct pvr_entry { > grub_uint32_t mask; > grub_uint32_t entry; > @@ -512,6 +525,8 @@ struct cas_vector { > grub_uint16_t vec3; > grub_uint8_t vec4_size; > grub_uint16_t vec4; > + grub_uint8_t vec5_size; > + struct option_vector5 vec5; > } __attribute__((packed)); > > /* > @@ -534,7 +549,7 @@ grub_ieee1275_ibm_cas (void) > } args; > struct cas_vector vector = { > .pvr_list = { { 0x00000000, 0xffffffff } }, /* any processor */ > - .num_vecs = 4 - 1, > + .num_vecs = 5 - 1, > .vec1_size = 0, > .vec1 = 0x80, /* ignore */ > .vec2_size = 1 + sizeof(struct option_vector2) - 2, > @@ -545,6 +560,10 @@ grub_ieee1275_ibm_cas (void) > .vec3 = 0x00e0, /* ask for FP + VMX + DFP but don't halt if unsatisfied */ > .vec4_size = 2 - 1, > .vec4 = 0x0001, /* set required minimum capacity % to the lowest value */ > + .vec5_size = 1 + sizeof(struct option_vector5) - 2, > + .vec5 = { > + 0, 0, 0, 0, 0, 0, 0, 0, 256 This maybe should be indented 6 spaces instead of 1 tab? But I wouldn't do a whole new revision just for this. Acked-by: Daniel Axtens Kind regards, Daniel